Frame 2
function moveOn() {
this.gotoAndStop(3);
}
MochiAd.showPreGameAd({id:"5621058e496a8550", res:"500x580", background:7895160, color:10433279, outline:16777215, no_bg:true, ad_finished:function () {
moveOn();
}});
Frame 3
stop();
Instance of Symbol 96 MovieClip [Splash] in Frame 3
//component parameters
onClipEvent (construct) {
frameAfterCompletion = 7;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 7
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("aa5e412f", this, 10301, true);
stop();
if (game != undefined) {
removeMovieClip(game);
}
this.play_Button.gotoAndStop(1);
this.credits_Button.gotoAndStop(1);
this.score_Button.gotoAndStop(1);
this.playMore_Button.gotoAndStop(1);
this.play_Button.onRelease = function () {
_root.musmute.lvlMusic.stop();
_root.musmute.lvl2Music.start();
this._parent.gotoAndStop(11);
};
this.play_Button.onRollOver = function () {
this.gotoAndStop(2);
};
this.play_Button.onRollOut = function () {
this.gotoAndStop(1);
};
this.credits_Button.onRollOver = function () {
this.gotoAndStop(2);
};
this.credits_Button.onRollOut = function () {
this.gotoAndStop(1);
};
this.score_Button.onRollOver = function () {
this.gotoAndStop(2);
};
this.score_Button.onRollOut = function () {
this.gotoAndStop(1);
};
this.playMore_Button.onRollOver = function () {
this.gotoAndStop(2);
};
this.playMore_Button.onRollOut = function () {
this.gotoAndStop(1);
};
this.credits_Button.onRelease = function () {
this._parent.gotoAndStop(14);
};
this.score_Button.onRelease = function () {
getURL ("http://www.gimme5games.com/index.jsp?id=splitemup_hs", "_blank");
};
this.playMore_Button.onRelease = function () {
getURL ("http://www.gimme5games.com", "_blank");
};
Frame 11
stop();
attachMovie("Game", "game", 1, {_x:0, _y:0});
Frame 14
stop();
this.mmButton.gotoAndStop(1);
this.mmButton.onRelease = function () {
_root.gotoAndStop(7);
};
this.mmButton.onRollOver = function () {
this.gotoAndStop(2);
};
this.mmButton.onRollOut = function () {
this.gotoAndStop(1);
};
this.g5Button.onRelease = function () {
getURL ("http://www.gimme5games.com", "_blank");
};
this.letsButton.onRelease = function () {
getURL ("http://www.letsdesign.co.uk/splitemup/", "_blank");
};
Frame 16
stop();
this.SubScoreText.text = _root.game.playerScore;
this.mmButton.gotoAndStop(1);
this.sButton.gotoAndStop(1);
this.mmButton.onRelease = function () {
_root.musmute.lvl2Music.stop();
_root.musmute.lvlMusic.start();
_root.removeMovieClip(_root.game);
_root.gotoAndStop(7);
};
this.mmButton.onRollOver = function () {
this.gotoAndStop(2);
};
this.mmButton.onRollOut = function () {
this.gotoAndStop(1);
};
this.sButton.onRelease = function () {
_root.nextFrame();
};
this.sButton.onRollOver = function () {
this.gotoAndStop(2);
};
this.sButton.onRollOut = function () {
this.gotoAndStop(1);
};
Frame 17
stop();
this.movHiScores.setDetails(119, 0, "splitemup", false, _root.game.playerScore, _root.game.playerScore, "Points");
this.mmButton.gotoAndStop(1);
this.mmButton.onRelease = function () {
_root.musmute.lvl2Music.stop();
_root.musmute.lvlMusic.start();
_root.removeMovieClip(_root.game);
_root.gotoAndStop(7);
};
this.mmButton.onRollOver = function () {
this.gotoAndStop(2);
};
this.mmButton.onRollOut = function () {
this.gotoAndStop(1);
};
Instance of Symbol 328 MovieClip [HiScores] "movHiScores" in Frame 17
//component parameters
onClipEvent (construct) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 19
stop();
Symbol 10 MovieClip Frame 1
function onEnterFrame() {
this._rotation = -this._parent._rotation;
}
Symbol 12 MovieClip [ship2] Frame 1
#initclip 55
Object.registerClass("ship2", playerB);
#endinitclip
Symbol 15 MovieClip [ePulse2] Frame 1
#initclip 38
Object.registerClass("ePulse2", ePJ);
#endinitclip
Symbol 17 MovieClip [crabGun] Frame 1
#initclip 39
Object.registerClass("crabGun", bsGun);
#endinitclip
Symbol 19 MovieClip [bossBubble] Frame 1
#initclip 40
Object.registerClass("bossBubble", crabBut);
#endinitclip
Symbol 20 MovieClip [sndctrl] Frame 1
#initclip 41
Object.registerClass("sndctrl", soundCTRL);
#endinitclip
Symbol 26 MovieClip [healthPUP] Frame 1
#initclip 42
Object.registerClass("healthPUP", healthPU);
#endinitclip
Symbol 28 MovieClip [powerPUP] Frame 1
#initclip 43
Object.registerClass("powerPUP", powerPU);
#endinitclip
Symbol 30 MovieClip [left_Pincer] Frame 1
#initclip 44
Object.registerClass("left_Pincer", crab_pincer);
#endinitclip
Symbol 32 MovieClip [right_Pincer] Frame 1
#initclip 45
Object.registerClass("right_Pincer", crab_pincer);
#endinitclip
Symbol 38 MovieClip [target] Frame 1
#initclip 46
Object.registerClass("target", bonus_target);
#endinitclip
Symbol 40 MovieClip [marker] Frame 1
#initclip 47
Object.registerClass("marker", pMarker);
#endinitclip
Symbol 43 MovieClip [crab] Frame 1
#initclip 48
Object.registerClass("crab", crabBoss);
#endinitclip
Symbol 46 MovieClip [bTimer] Frame 1
#initclip 49
Object.registerClass("bTimer", bonusController);
#endinitclip
Symbol 49 MovieClip [boss1] Frame 1
#initclip 50
Object.registerClass("boss1", bossEnemyA);
#endinitclip
Symbol 57 MovieClip [beamEFX] Frame 1
function onEnterFrame() {
if (this._alpha > 0) {
this._alpha = this._alpha * 0.6;
}
}
Symbol 59 MovieClip [enemy4] Frame 1
#initclip 51
Object.registerClass("enemy4", enemyD);
#endinitclip
Symbol 62 MovieClip [enemy3] Frame 1
#initclip 52
Object.registerClass("enemy3", enemyC);
#endinitclip
Symbol 66 MovieClip [enemy2] Frame 1
#initclip 53
Object.registerClass("enemy2", enemyB);
#endinitclip
Symbol 71 MovieClip [Pbutton] Frame 1
#initclip 54
Object.registerClass("Pbutton", pbutton);
#endinitclip
Symbol 329 MovieClip [__Packages.ePJ] Frame 0
class ePJ extends MovieClip
{
var _x, dirx, _y, diry, gridX, gridY;
function ePJ () {
super();
power = power * _root.game.sModifyer;
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_x = _x + dirx;
_y = _y + diry;
if ((((_x < 25) || (_x > 475)) || (_y < 25)) || (_y > 475)) {
destroy();
}
_root.game.getGridRef(this);
var _local3 = _root.game.playerA;
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_root.game.checkCollision(this, _local3)) {
hit(_local3);
}
}
}
_local3 = _root.game.playerB;
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_root.game.checkCollision(this, _local3)) {
hit(_local3);
}
}
}
}
}
function hit(enemy) {
if (!bHasHit) {
bHasHit = true;
enemy.takeHit(power);
destroy();
}
}
function takeHit() {
destroy();
}
function destroy() {
_root.game.hitFX_2(_x, _y);
_root.game.removeMC(this);
}
var power = 4;
var bHasHit = false;
var radius = 6;
}
Symbol 330 MovieClip [__Packages.bsGun] Frame 0
class bsGun extends MovieClip
{
var shieldFX, attachMovie, _x, _y, _rotation;
function bsGun () {
super();
health = health * (_root.game.hModifyer * 3);
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0, _xscale:50, _yscale:50});
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.playerScore = _root.game.playerScore + 10;
_root.game.criticalHit(_x, _y);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
_root.game.playerScore = _root.game.playerScore + 10;
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if (health <= 0) {
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 100;
}
_root.game.kill(this);
}
function onEnterFrame() {
_root.game.getGridRef(this);
}
var health = 100;
var radius = 8;
var lastImpactTime = 0;
var lastImpactAngle = 0;
}
Symbol 331 MovieClip [__Packages.crabBut] Frame 0
class crabBut extends MovieClip
{
var shieldFX, attachMovie, _x, _y, _rotation;
function crabBut () {
super();
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.playerScore = _root.game.playerScore + 10;
_root.game.criticalHit(_x, _y);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
_root.game.playerScore = _root.game.playerScore + 10;
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if (health <= 0) {
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 100;
}
_root.game.kill(this);
}
function onEnterFrame() {
_root.game.getGridRef(this);
}
var health = 300;
var radius = 10;
var lastImpactTime = 0;
var lastImpactAngle = 0;
}
Symbol 332 MovieClip [__Packages.soundCTRL] Frame 0
class soundCTRL extends MovieClip
{
var shot, shot2, hitA, hitB, explode, spawn, clicker;
function soundCTRL () {
super();
shot = new Sound(this);
shot2 = new Sound(this);
hitA = new Sound(this);
hitB = new Sound(this);
explode = new Sound(this);
spawn = new Sound(this);
clicker = new Sound(this);
shot.attachSound("shot1");
shot2.attachSound("shot2");
hitA.attachSound("hit1");
hitB.attachSound("hit2");
explode.attachSound("explo1");
spawn.attachSound("spawn");
clicker.attachSound("clicker");
}
}
Symbol 333 MovieClip [__Packages.healthPU] Frame 0
class healthPU extends MovieClip
{
var _x, _y, Target;
function healthPU () {
super();
}
function onEnterFrame() {
_x = _x + dirx;
_y = _y + diry;
speed = speed + 0.1;
if ((((_x < 35) || (_x > 465)) || (_y < 35)) || (_y > 465)) {
if (bHasHit == false) {
bHasHit = true;
destroy();
}
}
var _local4 = _x - Target._x;
var _local3 = _y - Target._y;
var _local2 = Math.atan2(-_local3, -_local4);
dirx = Math.cos(_local2) * speed;
diry = Math.sin(_local2) * speed;
}
function destroy() {
Target = _root.game.playerA;
if (Target.health < 96) {
Target.health = Target.health + 1;
} else {
Target.health = 100;
}
_root.game.sndCTRL.hitA.start();
Target._xscale = 130;
Target._yscale = 130;
_root.game.removeMC(this);
}
var dirx = 0;
var diry = 0;
var bHasHit = false;
var radius = 6;
var speed = 0;
}
Symbol 334 MovieClip [__Packages.powerPU] Frame 0
class powerPU extends MovieClip
{
var _x, _y, Target;
function powerPU () {
super();
}
function onEnterFrame() {
_x = _x + dirx;
_y = _y + diry;
speed = speed + 0.1;
if ((((_x < 35) || (_x > 465)) || (_y < 35)) || (_y > 465)) {
if (bHasHit == false) {
bHasHit = true;
destroy();
}
}
var _local4 = _x - Target._x;
var _local3 = _y - Target._y;
var _local2 = Math.atan2(-_local3, -_local4);
dirx = Math.cos(_local2) * speed;
diry = Math.sin(_local2) * speed;
}
function destroy() {
_root.game.sndCTRL.hitA.start();
if (_root.game.playerA.power < 98) {
_root.game.playerA.power = _root.game.playerA.power + 1;
} else {
_root.game.playerA.power = 100;
}
Target._xscale = 130;
Target._yscale = 130;
_root.game.removeMC(this);
}
var dirx = 0;
var diry = 0;
var bHasHit = false;
var radius = 6;
var speed = 0;
}
Symbol 335 MovieClip [__Packages.crab_pincer] Frame 0
class crab_pincer extends MovieClip
{
var shieldFX, attachMovie, _rotation, pControl;
function crab_pincer () {
super();
_root.game.enemys.push(this);
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0, _yscale:70});
}
function takeHit(amount, actor) {
var _local4 = (Math.atan2(-actor.diry, -actor.dirx) * 180) / Math.PI;
var _local3 = _root.game.closestAngle(_local4, _rotation);
if ((_local3 > 50) || (_local3 < -50)) {
pControl._y = pControl._y + dir;
_root.game.playerScore = _root.game.playerScore + 5;
}
shieldFX._alpha = 100;
}
function onEnterFrame() {
_root.game.getGridRef(this);
}
var radius = 20;
var dir = 0;
var lastImpactTime = 0;
var lastImpactAngle = 0;
var aState = "forming";
}
Symbol 336 MovieClip [__Packages.bonus_target] Frame 0
class bonus_target extends MovieClip
{
var shieldFX, attachMovie, _alpha, _xscale, _yscale, gotoAndStop, _x, _y, _rotation;
function bonus_target () {
super();
health = health * _root.game.hModifyer;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
_alpha = 0;
_xscale = 20;
_yscale = 20;
gotoAndStop(1);
_root.game.getGridRef(this);
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
var _local5 = actor.playerOwner;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 10;
_root.game.playerScore = _root.game.playerScore + 100;
health = health - amount;
_root.game.criticalHit(_x, _y);
_root.game.addHealth(_x, _y, _local5);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
lastImpactTime = _local4;
lastImpactAngle = _local3;
if (health <= 0) {
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 100;
}
_root.game.kill(this);
}
function onEnterFrame() {
if (_xscale < 100) {
_xscale = _xscale + 2;
_yscale = _yscale + 2;
}
if (_alpha < 100) {
_alpha = _alpha + 2;
}
}
var health = 50;
var radius = 25;
var lastImpactTime = 0;
var lastImpactAngle = 0;
var bNoForce = true;
}
Symbol 337 MovieClip [__Packages.pMarker] Frame 0
class pMarker extends MovieClip
{
var baseX, _x, baseY, _y, localToGlobal;
function pMarker () {
super();
baseX = _x;
baseY = _y;
}
function Update() {
bPoint = {x:0, y:0};
localToGlobal(bPoint);
if (_y != baseY) {
var _local2 = (baseY - _y) * 0.01;
_y = _y + _local2;
}
aPoint = {x:bPoint.x, y:bPoint.y};
}
var aPoint = {x:0, y:0};
var bPoint = {x:0, y:0};
}
Symbol 338 MovieClip [__Packages.crabBoss] Frame 0
class crabBoss extends MovieClip
{
var diry, dirx, right_gun, right_gun2, left_gun, left_gun2, rear_point, front_point, right_pincer, left_pincer, aiTicker, _x, _y, gotoAndStop, gun1, _parent, gun2, gun3, gun4, pincer1, pincer2, weakpoint, _rotation, _alpha, Target, fireTimer, hitTest;
function crabBoss () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
right_gun.Update();
right_gun2.Update();
left_gun.Update();
left_gun2.Update();
rear_point.Update();
front_point.Update();
right_pincer.Update();
left_pincer.Update();
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 300;
aState = "returning";
gotoAndStop(1);
buildAddons();
}
function buildAddons() {
gun1 = _parent.attachMovie("crabGun", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:right_gun.aPoint.x, _y:right_gun.aPoint.y});
gun2 = _parent.attachMovie("crabGun", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:right_gun2.aPoint.x, _y:right_gun2.aPoint.y});
gun3 = _parent.attachMovie("crabGun", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:left_gun.aPoint.x, _y:left_gun.aPoint.y});
gun4 = _parent.attachMovie("crabGun", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:left_gun2.aPoint.x, _y:left_gun2.aPoint.y});
pincer1 = _parent.attachMovie("left_Pincer", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:left_pincer.aPoint.x, _y:left_pincer.aPoint.y});
pincer1.pControl = left_pincer;
pincer1.dir = -5;
pincer2 = _parent.attachMovie("right_Pincer", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:right_pincer.aPoint.x, _y:right_pincer.aPoint.y});
pincer2.pControl = right_pincer;
pincer2.dir = 5;
weakpoint = _parent.attachMovie("bossBubble", "cGun" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:rear_point.aPoint.x, _y:rear_point.aPoint.y});
}
function updateAddons() {
if (bVunerable) {
var _local2 = _rotation - 90;
var _local3 = _rotation + 90;
} else {
var _local2 = _rotation;
var _local3 = _rotation;
}
gun1._x = right_gun.aPoint.x;
gun1._y = right_gun.aPoint.y;
gun1._rotation = _local2;
gun2._x = right_gun2.aPoint.x;
gun2._y = right_gun2.aPoint.y;
gun2._rotation = _local2;
gun3._x = left_gun.aPoint.x;
gun3._y = left_gun.aPoint.y;
gun3._rotation = _local3;
gun4._x = left_gun2.aPoint.x;
gun4._y = left_gun2.aPoint.y;
gun4._rotation = _local3;
pincer1._x = left_pincer.aPoint.x;
pincer1._y = left_pincer.aPoint.y;
pincer1._rotation = _rotation;
pincer2._x = right_pincer.aPoint.x;
pincer2._y = right_pincer.aPoint.y;
pincer2._rotation = _rotation;
weakpoint._x = rear_point.aPoint.x;
weakpoint._y = rear_point.aPoint.y;
weakpoint._rotation = _local2;
}
function takeHit(amount, actor) {
}
function takeDamage(amount) {
var _local4 = front_point.aPoint.x;
var _local3 = front_point.aPoint.y;
health = health - 100000;
_root.game.hitFX(right_pincer.aPoint.x, right_pincer.aPoint.y);
_root.game.hitFX(left_pincer.aPoint.x, left_pincer.aPoint.y);
_root.game.gameLevel.attachMovie("explo", "part_" + _root.game.gameLevel.getNextHighestDepth(), _root.game.gameLevel.getNextHighestDepth(), {_x:_local4, _y:_local3, _xscale:90, _yscale:90});
_root.game.gameLevel.attachMovie("explo", "part_" + _root.game.gameLevel.getNextHighestDepth(), _root.game.gameLevel.getNextHighestDepth(), {_x:_x, _y:_y, _xscale:90, _yscale:90});
_root.game.sndCTRL.explode.start();
if ((health <= 0) && (!bDestroyed)) {
bDestroyed = true;
_root.game.fixPipes();
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 3000;
}
_root.game.kill(gun1);
_root.game.kill(gun2);
_root.game.kill(gun3);
_root.game.kill(gun4);
_root.game.kill(pincer1);
_root.game.kill(pincer2);
_root.game.levelEnemies = 0;
_root.game.kill(this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_root.game.getGridRef(this);
right_gun.Update();
right_gun2.Update();
left_gun.Update();
left_gun2.Update();
rear_point.Update();
front_point.Update();
right_pincer.Update();
left_pincer.Update();
updateAddons();
if (right_pincer._y > -2) {
right_pincer._y = -2;
}
if (left_pincer._y < 2) {
left_pincer._y = 2;
}
if (!bVunerable) {
if (weakpoint.health == undefined) {
bVunerable = true;
gotoAndStop(2);
}
} else {
if (right_pincer._y > -5) {
if (left_pincer._y < 5) {
takeDamage(500);
right_pincer._y = right_pincer._y - 30;
left_pincer._y = left_pincer._y + 30;
}
}
if (right_pincer._y > -7) {
_root.game.hitFX(front_point.aPoint.x, front_point.aPoint.y);
}
if (left_pincer._y < 7) {
_root.game.hitFX(front_point.aPoint.x, front_point.aPoint.y);
}
}
if (_alpha > 99) {
_x = _x + dirx;
_y = _y + diry;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.05;
if ((_rotation != desiredAngle) && (aState != "crazy")) {
_rotation = _rotation + turnAmount;
}
if (aState == "crazy") {
_rotation = _rotation + 2;
}
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
getNewTarget();
}
if (_x < 85) {
_x = 87;
dirx = dirx * -2;
} else if (_x > 425) {
_x = 423;
dirx = dirx * -2;
} else if (_y < 85) {
_y = 87;
diry = diry * -2;
} else if (_y > 425) {
_y = 423;
diry = diry * -2;
}
if (aiTimer >= 20) {
aiTimer = 0;
if (Target != undefined) {
var _local3 = Target._x - _x;
var _local5 = Target._y - _y;
}
if (bVunerable && (bState != "kill")) {
var _local6 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local6 + 90;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.02;
} else {
var _local6 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local6;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.02;
}
if (aState == "attacking") {
if (bCanFire) {
bCanFire = false;
fireTimer = setInterval(fireTime, 300, this);
if (bVunerable) {
fire2();
} else {
fire();
}
}
}
if (bState == "kill") {
if (hitTest(Target)) {
Target.takeHit(50);
}
var _local8 = _x - Target._x;
var _local7 = _y - Target._y;
var _local4 = Math.atan2(-_local7, -_local8);
dirx = Math.cos(_local4) * 2;
diry = Math.sin(_local4) * 2;
}
}
} else {
_alpha = _alpha + 2;
}
}
}
function fire() {
var _local7 = false;
var _local8 = (_rotation / 180) * Math.PI;
var _local3 = 0;
var _local5 = Math.cos(_local8) * 4;
var _local4 = Math.sin(_local8) * 4;
if (gun1.health != undefined) {
_local7 = true;
_local3 = ((_rotation - 75) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 75) + _x) + (_local5 * 3);
var _local9 = ((Math.sin(_local3) * 75) + _y) + (_local4 * 3);
var _local6 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local6.dirx = _local5;
_local6.diry = _local4;
}
if (gun2.health != undefined) {
_local7 = true;
_local3 = ((_rotation - 45) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 60) + _x) + (_local5 * 3);
var _local9 = ((Math.sin(_local3) * 60) + _y) + (_local4 * 3);
var _local6 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local6.dirx = _local5;
_local6.diry = _local4;
}
if (gun3.health != undefined) {
_local7 = true;
_local3 = ((_rotation + 75) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 75) + _x) + (_local5 * 3);
var _local9 = ((Math.sin(_local3) * 75) + _y) + (_local4 * 3);
var _local6 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local6.dirx = _local5;
_local6.diry = _local4;
}
if (gun4.health != undefined) {
_local7 = true;
_local3 = ((_rotation + 45) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 60) + _x) + (_local5 * 3);
var _local9 = ((Math.sin(_local3) * 60) + _y) + (_local4 * 3);
var _local6 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local6.dirx = _local5;
_local6.diry = _local4;
}
if (_local7) {
_root.game.sndCTRL.shot2.start();
}
}
function fire2() {
var _local5 = false;
var _local8 = (_rotation / 180) * Math.PI;
var _local3 = 0;
var _local7 = Math.cos(_local8 - 1.5) * 4;
var _local6 = Math.sin(_local8 - 1.5) * 4;
if (gun1.health != undefined) {
_local5 = true;
_local3 = ((_rotation - 90) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 75) + _x) + (_local7 * 3);
var _local9 = ((Math.sin(_local3) * 75) + _y) + (_local6 * 3);
var _local4 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local4.dirx = _local7;
_local4.diry = _local6;
}
if (gun2.health != undefined) {
_local5 = true;
_local3 = ((_rotation - 80) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 60) + _x) + (_local7 * 3);
var _local9 = ((Math.sin(_local3) * 60) + _y) + (_local6 * 3);
var _local4 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local4.dirx = _local7;
_local4.diry = _local6;
}
_local7 = Math.cos(_local8 + 1.5) * 4;
_local6 = Math.sin(_local8 + 1.5) * 4;
if (gun3.health != undefined) {
_local5 = true;
_local3 = ((_rotation + 90) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 75) + _x) + (_local7 * 3);
var _local9 = ((Math.sin(_local3) * 75) + _y) + (_local6 * 3);
var _local4 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local4.dirx = _local7;
_local4.diry = _local6;
}
if (gun4.health != undefined) {
_local5 = true;
_local3 = ((_rotation + 80) / 180) * Math.PI;
var _local10 = ((Math.cos(_local3) * 60) + _x) + (_local7 * 3);
var _local9 = ((Math.sin(_local3) * 60) + _y) + (_local6 * 3);
var _local4 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local10, _y:_local9});
_local4.dirx = _local7;
_local4.diry = _local6;
}
if (_local5) {
_root.game.sndCTRL.shot2.start();
}
}
function getNewTarget() {
Target = _root.game.playerA;
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
actor.dirx = -1.5 + (Math.random() * 3);
actor.diry = -1.5 + (Math.random() * 3);
if ((actor.aState == "attacking") || (actor.aState == "crazy")) {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
} else if (Math.random() > 0.6) {
actor.aState = "attacking";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 1000;
var radius = 40;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var bState = "forming";
var bDestroyed = false;
var bVunerable = false;
}
Symbol 339 MovieClip [__Packages.bonusController] Frame 0
class bonusController extends MovieClip
{
var start_time, timeLeft, gotoAndStop, spawnTimer, _parent, elapsed_time, count_down;
function bonusController () {
super();
start_time = getTimer();
timeLeft = 30000;
gotoAndStop(1);
_root.game.levelEnemies = 1;
new Array(0, 0, 0, 0, 0);
new Array(0, 0, 0, 0, 0);
new Array(0, 0, 0, 0, 0);
new Array(0, 0, 0, 0, 0);
pos = new Array(0, 0, 0, 0, 0);
spawnTarget();
spawnTimer = setInterval(spawnTime, 2000, this);
}
function getPos() {
var _local6 = {x:100, y:100};
var _local5 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < 100) {
_local5 = Math.floor(Math.random() * 4.99);
_local4 = Math.floor(Math.random() * 4.99);
var _local3 = pos[_local5][_local4];
if (_local3 == 0) {
pos[_local5][_local4] = 1;
break;
}
_local2++;
}
_local6.x = 100 + (_local5 * 75);
_local6.y = 100 + (_local4 * 75);
return(_local6);
}
function spawnTarget() {
if (!bDone) {
var _local2 = getPos();
create_target(_local2.x, _local2.y);
}
}
function create_target(xpos, ypos) {
var _local2 = _parent.attachMovie("target", "target_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:xpos, _y:ypos});
}
function onEnterFrame() {
if (!bDone) {
elapsed_time = getTimer() - start_time;
if (elapsed_time < timeLeft) {
count_down.text = time_to_string(timeLeft - elapsed_time) + " ";
} else {
count_down.text = "00:00:00";
bDone = true;
_root.game.cleanLevel();
_root.game.levelEnemies = 0;
}
}
}
function time_to_string(time_to_convert) {
var _local6 = Math.floor(time_to_convert / 3600000);
var _local1 = time_to_convert - (_local6 * 3600000);
var _local3 = Math.floor(_local1 / 60000);
_local1 = _local1 - (_local3 * 60000);
var _local2 = Math.floor(_local1 / 1000);
_local1 = _local1 - (_local2 * 1000);
var _local4 = Math.floor(_local1 / 10);
if (_local3 < 10) {
var _local7 = "0" + _local3.toString();
} else {
var _local7 = _local3.toString();
}
if (_local2 < 10) {
var _local5 = "0" + _local2.toString();
} else {
var _local5 = _local2.toString();
}
if (_local4 < 10) {
var _local9 = "0" + _local4.toString();
} else {
var _local9 = _local4.toString();
}
return((_local7 + ":") + _local5);
}
function spawnTime(actor) {
actor.spawnTarget();
}
var bDone = false;
var pos = new Array();
}
Symbol 340 MovieClip [__Packages.bossEnemyA] Frame 0
class bossEnemyA extends MovieClip
{
var diry, dirx, baseX, _x, baseY, _y, aiTicker, shieldFX, attachMovie, shieldGenA, _parent, shieldGenB, _alpha, gotoAndStop, _rotation, Target, fireTimer;
function bossEnemyA () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
baseX = _x;
baseY = _y;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 300;
aState = "returning";
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
shieldGenA = _parent.attachMovie("bossShieldGen", "hsfx" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y});
shieldGenB = _parent.attachMovie("bossShieldGen", "hsfx" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y});
_alpha = 0;
gotoAndStop(1);
}
function takeHit(amount, actor) {
if (bVunerable) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
dirx = dirx + (actor.dirx * 0.05);
diry = diry + (actor.diry * 0.05);
_root.game.criticalHit(_x, _y);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if ((health <= 0) && (!bDestroyed)) {
bDestroyed = true;
_root.game.fixPipes();
destroy(true);
}
} else {
shieldFX._alpha = 100;
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 1000;
}
_root.game.levelEnemies = 0;
_root.game.kill(this);
}
function onEnterFrame() {
_root.game.getGridRef(this);
var _local3 = ((_rotation + 120) / 180) * Math.PI;
shieldGenA._x = (Math.cos(_local3) * 55) + _x;
shieldGenA._y = (Math.sin(_local3) * 55) + _y;
shieldGenA._rotation = _rotation;
_local3 = ((_rotation - 120) / 180) * Math.PI;
shieldGenB._rotation = _rotation;
shieldGenB._x = (Math.cos(_local3) * 55) + _x;
shieldGenB._y = (Math.sin(_local3) * 55) + _y;
if (!bVunerable) {
if (shieldGenA.health == undefined) {
if (shieldGenB.health == undefined) {
bVunerable = true;
gotoAndStop(2);
}
}
}
if (_alpha > 99) {
_x = _x + dirx;
_y = _y + diry;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.05;
if ((_rotation != desiredAngle) && (aState != "crazy")) {
_rotation = _rotation + turnAmount;
}
if (aState == "crazy") {
_rotation = _rotation + 2;
}
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
getNewTarget();
}
if (_x < 85) {
_x = 87;
dirx = dirx * -2;
} else if (_x > 425) {
_x = 423;
dirx = dirx * -2;
} else if (_y < 85) {
_y = 87;
diry = diry * -2;
} else if (_y > 425) {
_y = 423;
diry = diry * -2;
}
if (aState == "crazy") {
if (bCanFire) {
bCanFire = false;
fireTimer = setInterval(fireTime, 100, this);
fire2();
}
}
if (aiTimer >= 20) {
aiTimer = 0;
if (Target != undefined) {
var _local4 = Target._x - _x;
var _local6 = Target._y - _y;
}
var _local5 = (Math.atan2(_local6, _local4) * 180) / Math.PI;
desiredAngle = _local5;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.02;
if (aState == "attacking") {
if (bCanFire) {
bCanFire = false;
fireTimer = setInterval(fireTime, 200, this);
fire();
}
}
}
} else {
_alpha = _alpha + 2;
}
}
function fire() {
var _local7 = (_rotation / 180) * Math.PI;
var _local4 = ((_rotation + 75) / 180) * Math.PI;
var _local6 = Math.cos(_local7) * 4;
var _local5 = Math.sin(_local7) * 4;
var _local9 = ((Math.cos(_local4) * 40) + _x) + (dirx * 3);
var _local8 = ((Math.sin(_local4) * 40) + _y) + (diry * 3);
var _local3 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local9, _y:_local8});
_local3.dirx = _local6;
_local3.diry = _local5;
_local4 = ((_rotation - 75) / 180) * Math.PI;
_local9 = ((Math.cos(_local4) * 40) + _x) + (dirx * 3);
_local8 = ((Math.sin(_local4) * 40) + _y) + (diry * 3);
_local3 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local9, _y:_local8});
_local3.dirx = _local6;
_local3.diry = _local5;
_root.game.sndCTRL.shot2.start();
}
function fire2() {
var _local9 = (_rotation / 180) * Math.PI;
var _local3 = ((_rotation + 90) / 180) * Math.PI;
var _local6 = Math.cos(_local3) * 4;
var _local5 = Math.sin(_local3) * 4;
var _local8 = ((Math.cos(_local3) * 50) + _x) + (dirx * 3);
var _local7 = ((Math.sin(_local3) * 50) + _y) + (diry * 3);
var _local4 = _parent.attachMovie("ePulse2", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local8, _y:_local7});
_local4.dirx = _local6;
_local4.diry = _local5;
_local3 = ((_rotation - 90) / 180) * Math.PI;
_local8 = ((Math.cos(_local3) * 50) + _x) + (dirx * 3);
_local7 = ((Math.sin(_local3) * 50) + _y) + (diry * 3);
_local4 = _parent.attachMovie("ePulse2", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_local8, _y:_local7});
_local4.dirx = -_local6;
_local4.diry = -_local5;
_root.game.sndCTRL.shot2.start();
}
function getNewTarget() {
Target = _root.game.getPlayerTarget(this);
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
actor.dirx = -1.5 + (Math.random() * 3);
actor.diry = -1.5 + (Math.random() * 3);
if ((actor.aState == "attacking") || (actor.aState == "crazy")) {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
} else if (Math.random() > 0.7) {
actor.aState = "crazy";
actor.aiTicker = actor.setInterval(aiTick, 9000, actor);
} else if (Math.random() > 0.4) {
actor.aState = "attacking";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 1000;
var radius = 25;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var lastImpactTime = 0;
var lastImpactAngle = 0;
var bDestroyed = false;
var bVunerable = false;
}
Symbol 341 MovieClip [__Packages.enemyD] Frame 0
class enemyD extends MovieClip
{
var diry, dirx, baseX, _x, baseY, _y, aiTicker, shieldFX, attachMovie, _alpha, gotoAndStop, _rotation, shieldGenA, shieldGenB, Target, fireTimer, beamFX;
function enemyD () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
baseX = _x;
baseY = _y;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 300;
aState = "returning";
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
_alpha = 0;
gotoAndStop(1);
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
var _local5 = actor.playerOwner;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.playerScore = _root.game.playerScore + 10;
_root.game.criticalHit(_x, _y);
_root.game.addPower(_x, _y, _local5);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
_root.game.playerScore = _root.game.playerScore + 10;
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if (health <= 0) {
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 1000;
}
_root.game.kill(this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_root.game.getGridRef(this);
var _local3 = ((_rotation + 120) / 180) * Math.PI;
shieldGenA._x = (Math.cos(_local3) * 55) + _x;
shieldGenA._y = (Math.sin(_local3) * 55) + _y;
shieldGenA._rotation = _rotation;
_local3 = ((_rotation - 120) / 180) * Math.PI;
shieldGenB._rotation = _rotation;
shieldGenB._x = (Math.cos(_local3) * 55) + _x;
shieldGenB._y = (Math.sin(_local3) * 55) + _y;
if (_alpha > 99) {
if (aState != "attacking") {
}
_x = _x + dirx;
_y = _y + diry;
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
aState == "returning";
getNewTarget();
}
if (_x < 50) {
_x = 52;
dirx = dirx * -2;
} else if (_x > 450) {
_x = 452;
dirx = dirx * -2;
} else if (_y < 50) {
_y = 52;
diry = diry * -2;
} else if (_y > 450) {
_y = 452;
diry = diry * -2;
}
if (Target != undefined) {
var _local4 = Target._x - _x;
var _local6 = Target._y - _y;
}
var _local5 = (Math.atan2(_local6, _local4) * 180) / Math.PI;
desiredAngle = _local5;
if ((Target == _root.game.playerA) || (Target == _root.game.playerB)) {
getNewTarget();
}
if (aState == "attacking") {
_rotation = desiredAngle;
gotoAndStop(2);
if (bCanFire) {
bCanFire = false;
fireTimer = setInterval(fireTime, 50, this);
fire();
}
} else {
gotoAndStop(1);
}
} else {
_alpha = _alpha + 2;
}
}
}
function fire() {
var _local4 = Target._x - _x;
var _local3 = Target._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
beamFX._alpha = 100;
beamFX._xscale = _local5;
Target.takeHit(2);
_root.game.hitFX(Target._x, Target._y);
}
function getNewTarget() {
Target = _root.game.getEnemyTarget(this);
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
actor.dirx = -1.5 + (Math.random() * 3);
actor.diry = -1.5 + (Math.random() * 3);
if (actor.aState == "attacking") {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
} else if (Math.random() > 0.8) {
actor.aState = "attacking";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 250;
var radius = 25;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var lastImpactTime = 0;
var lastImpactAngle = 0;
var bNoForce = true;
var speed = 1;
}
Symbol 342 MovieClip [__Packages.enemyC] Frame 0
class enemyC extends MovieClip
{
var diry, dirx, baseX, _x, baseY, _y, aiTicker, shieldFX, attachMovie, _alpha, _rotation, Target, gotoAndStop, fireTimer, _parent;
function enemyC () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
speed = speed * _root.game.sModifyer;
baseX = _x;
baseY = _y;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 300;
aState = "returning";
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
_alpha = 0;
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
var _local5 = actor.playerOwner;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.criticalHit(_x, _y);
_root.game.addHealth(_x, _y, _local5);
_root.game.playerScore = _root.game.playerScore + 10;
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
_root.game.playerScore = _root.game.playerScore + 10;
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if (health <= 0) {
destroy(true);
}
if (aState == "attacking") {
aState = "returning";
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 50;
}
_root.game.kill(this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_root.game.getGridRef(this);
if (_alpha > 99) {
_x = _x + dirx;
_y = _y + diry;
if (_rotation != desiredAngle) {
_rotation = _rotation + turnAmount;
}
if (aState == "attacking") {
_rotation = _rotation + 3;
}
if (aState == "returning") {
dirx = Math.cos((_rotation / 180) * Math.PI) * 2;
diry = Math.sin((_rotation / 180) * Math.PI) * 2;
if (Math.abs(_x - (baseX + _root.game.formX)) <= 10) {
if (Math.abs(_y - baseY) <= 10) {
_y = baseY;
_x = baseX + _root.game.formX;
_rotation = 0;
aState = "forming";
}
}
}
if (aState == "forming") {
_x = baseX + _root.game.formX;
_y = baseY;
if (_root.game.playerA._rotation != undefined) {
desiredAngle = _root.game.playerA._rotation + 90;
} else {
desiredAngle = _root.game.playerB._rotation + 90;
}
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.1;
}
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
getNewTarget();
}
if (_x < 35) {
_x = 37;
dirx = dirx * -1;
} else if (_x > 465) {
_x = 463;
dirx = dirx * -1;
} else if (_y < 35) {
_y = 37;
diry = diry * -1;
} else if (_y > 465) {
_y = 463;
diry = diry * -1;
}
if (aiTimer >= 10) {
aiTimer = 0;
if (aState == "attacking") {
gotoAndStop(2);
turnAmount = 3;
if (bCanFire) {
bCanFire = false;
fireTimer = setInterval(fireTime, 3000, this);
fire();
}
} else if (aState == "returning") {
gotoAndStop(1);
var _local3 = (baseX + _root.game.formX) - _x;
var _local5 = baseY - _y;
var _local4 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local4;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.06;
}
}
} else {
_alpha = _alpha + 2;
}
}
}
function fire() {
_root.game.sndCTRL.shot2.start();
var _local3 = Math.cos((_rotation / 180) * Math.PI);
var _local4 = Math.sin((_rotation / 180) * Math.PI);
var _local5 = _parent.attachMovie("spinPulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + (_local3 * 3), _y:_y + (_local4 * 3)});
_local5.dirx = -_local4;
_local5.diry = -_local3;
_local5 = _parent.attachMovie("spinPulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + (_local3 * 3), _y:_y + (_local4 * 3)});
_local5.dirx = _local4;
_local5.diry = _local3;
}
function getNewTarget() {
Target = _root.game.getPlayerTarget(this);
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
if (_root.game.levelEnemies > 5) {
if (actor.aState == "attacking") {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
} else {
if (Math.random() > 0.9) {
actor.dirx = -3 + (Math.random() * 6);
actor.diry = -3 + (Math.random() * 6);
actor.aState = "attacking";
}
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
} else {
actor.aState = "attacking";
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 75;
var radius = 10;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var lastImpactTime = 0;
var lastImpactAngle = 0;
var speed = 2;
}
Symbol 343 MovieClip [__Packages.enemyB] Frame 0
class enemyB extends MovieClip
{
var diry, dirx, baseX, _x, baseY, _y, aiTicker, shieldFX, attachMovie, _alpha, _rotation, Target, gotoAndStop, fireTimer, _parent;
function enemyB () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
speed = speed * _root.game.sModifyer;
baseX = _x;
baseY = _y;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 300;
aState = "returning";
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
_alpha = 0;
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.criticalHit(_x, _y);
_root.game.playerScore = _root.game.playerScore + 10;
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
lastImpactTime = _local4;
lastImpactAngle = _local3;
_root.game.playerScore = _root.game.playerScore + 10;
health = health - amount;
if (health <= 0) {
destroy(true);
}
if (aState == "attacking") {
aState = "returning";
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 50;
}
_root.game.kill(this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_root.game.getGridRef(this);
if (_alpha > 99) {
_x = _x + dirx;
_y = _y + diry;
if (_rotation != desiredAngle) {
_rotation = _rotation + turnAmount;
}
if (aState != "forming") {
dirx = Math.cos((_rotation / 180) * Math.PI) * speed;
diry = Math.sin((_rotation / 180) * Math.PI) * speed;
}
if (aState == "returning") {
if (Math.abs(_x - (baseX + _root.game.formX)) <= 10) {
if (Math.abs(_y - baseY) <= 10) {
_y = baseY;
_x = baseX + _root.game.formX;
_rotation = 0;
aState = "forming";
}
}
}
if (aState == "forming") {
_x = baseX + _root.game.formX;
_y = baseY;
if (_root.game.playerA._rotation != undefined) {
desiredAngle = _root.game.playerA._rotation + 90;
} else {
desiredAngle = _root.game.playerB._rotation + 90;
}
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.1;
}
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
getNewTarget();
}
if (_x < 35) {
_x = 37;
dirx = dirx * -2;
turnAmount = turnAmount * 2;
} else if (_x > 465) {
_x = 463;
dirx = dirx * -2;
turnAmount = turnAmount * 2;
} else if (_y < 35) {
_y = 37;
diry = diry * -2;
turnAmount = turnAmount * 2;
} else if (_y > 465) {
_y = 463;
diry = diry * -2;
turnAmount = turnAmount * 2;
}
if (aiTimer >= 10) {
aiTimer = 0;
if (aState == "attacking") {
gotoAndStop(2);
if (Target != undefined) {
var _local3 = Target._x - _x;
var _local5 = Target._y - _y;
}
var _local4 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local4;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.08;
if (bCanFire) {
if (Math.abs(_rotation - desiredAngle) < 3) {
bCanFire = false;
fireTimer = setInterval(fireTime, 2000, this);
fire();
}
}
} else if (aState == "returning") {
gotoAndStop(1);
var _local3 = (baseX + _root.game.formX) - _x;
var _local5 = baseY - _y;
var _local4 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local4;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.06;
}
}
} else {
_alpha = _alpha + 2;
}
}
}
function fire() {
_root.game.sndCTRL.shot2.start();
var _local3 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + (dirx * 3), _y:_y + (diry * 3)});
_local3._rotation = _rotation;
_local3.dirx = dirx * 2;
_local3.diry = diry * 2;
}
function getNewTarget() {
Target = _root.game.getPlayerTarget(this);
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
if (_root.game.levelEnemies > 5) {
if (actor.aState == "attacking") {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
} else {
if (Math.random() > 0.9) {
actor.aState = "attacking";
}
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
} else {
actor.aState = "attacking";
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 50;
var radius = 10;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var lastImpactTime = 0;
var lastImpactAngle = 0;
var speed = 2;
}
Symbol 344 MovieClip [__Packages.pbutton] Frame 0
class pbutton extends MovieClip
{
var gotoAndStop, _parent;
function pbutton () {
super();
gotoAndStop(1);
}
function onRollOver() {
gotoAndStop(2);
}
function onRollOut() {
gotoAndStop(1);
}
function onRelease() {
_parent.gotoAndStop(2);
}
}
Symbol 345 MovieClip [__Packages.playerB] Frame 0
class playerB extends MovieClip
{
var shieldFX, attachMovie, stop, gotoAndStop, _parent, _rotation, _y, _x, angle, gridX, gridY;
function playerB () {
super();
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0, _rotation:-90});
stop();
}
function Toggle(num) {
if (num < 0) {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
}
function fire() {
var _local3 = _parent.attachMovie("pulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + shotset.x, _y:_y + shotset.y, _rotation:_rotation, _xscale:90 + _root.game.playerA.power, _yscale:90 + _root.game.playerA.power});
_local3.power = _root.game.playerA.power;
_local3.dirx = shotset.sx;
_local3.diry = shotset.sy;
_local3.playerOwner = this;
}
function Move(dir) {
var _local5 = _x - 250;
var _local4 = _y - 250;
angle = (Math.atan2(_local4, _local5) * 180) / Math.PI;
if (_x < 20) {
_x = 20;
}
if (_x > 480) {
_x = 480;
}
if (_y < 20) {
_y = 20;
}
if (_y > 480) {
_y = 480;
}
if ((angle <= 45) && (angle >= -45)) {
_rotation = -90;
if (dir == "left") {
_y = _y + _root.game.speedB;
} else {
_y = _y - _root.game.speedB;
}
shotset = {x:-20, y:0, sx:-15, sy:0};
} else if ((angle <= -45) && (angle >= -135)) {
_rotation = 180;
if (dir == "left") {
_x = _x + _root.game.speedB;
} else {
_x = _x - _root.game.speedB;
}
shotset = {x:0, y:20, sx:0, sy:15};
} else if ((angle >= 45) && (angle <= 135)) {
_rotation = 0;
if (dir == "left") {
_x = _x - _root.game.speedB;
} else {
_x = _x + _root.game.speedB;
}
shotset = {x:0, y:-20, sx:0, sy:-15};
} else {
_rotation = 90;
if (dir == "left") {
_y = _y - _root.game.speedB;
} else {
_y = _y + _root.game.speedB;
}
shotset = {x:20, y:0, sx:15, sy:0};
}
_root.game.getGridRef(this);
}
function checkPlayerCollide(xpos, ypos) {
var _local3 = _root.game.playerA;
var _local4 = false;
if (_local3._rotation == _rotation) {
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
var _local6 = _local3._x - xpos;
var _local5 = _local3._y - ypos;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (_local7 < 20) {
_local4 = true;
}
}
}
}
return(_local4);
}
function takeHit(amount) {
_root.game.playerA.health = _root.game.playerA.health - (amount * 0.5);
shieldFX._alpha = 100;
if (health <= 0) {
destroy(true);
}
}
function destroy() {
_parent.attachMovie("explo", "part_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y, _xscale:80, _yscale:80});
_root.game.sndCTRL.explode.start();
_root.game.hitFX(_x, _y);
_root.game.removeMC(this);
}
var health = 100;
var hStatus = "not needed";
var shotset = {x:0, y:-20, sx:0, sy:-15};
var radius = 12;
var power = 20;
}
Symbol 346 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.6");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 347 MovieClip [__Packages.particle] Frame 0
class particle extends MovieClip
{
var _x, dirx, _y, diry, _xscale, _yscale;
function particle () {
super();
}
function onEnterFrame() {
_x = _x + dirx;
_y = _y + diry;
_xscale = _xscale * 0.95;
diry = diry + 0.1;
_yscale = _xscale;
if ((_x < 35) || (_x > 465)) {
_x = _x - (dirx * 2);
dirx = dirx * -1;
}
if ((_y < 35) || (_y > 465)) {
_y = _y - (diry * 2);
diry = diry * -1;
}
if (_xscale <= 20) {
_root.game.removeMC(this);
}
}
}
Symbol 348 MovieClip [__Packages.eProjectile] Frame 0
class eProjectile extends MovieClip
{
var _x, dirx, _y, diry, gridX, gridY;
function eProjectile () {
super();
_root.game.enemys.push(this);
power = power * _root.game.sModifyer;
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_x = _x + dirx;
_y = _y + diry;
if ((((_x < 25) || (_x > 475)) || (_y < 25)) || (_y > 475)) {
destroy();
}
_root.game.getGridRef(this);
var _local5 = _root.game.pipes.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _root.game.pipes[_local4];
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_local3.hitTest(_x, _y, true)) {
hit(_local3);
}
}
}
_local4++;
}
var _local3 = _root.game.playerA;
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_root.game.checkCollision(this, _local3)) {
hit(_local3);
}
}
}
_local3 = _root.game.playerB;
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_root.game.checkCollision(this, _local3)) {
hit(_local3);
}
}
}
}
}
function hit(enemy) {
if (!bHasHit) {
bHasHit = true;
enemy.takeHit(power);
destroy();
}
}
function takeHit() {
destroy();
}
function destroy() {
_root.game.hitFX(_x, _y);
_root.game.killObject(this);
}
var power = 10;
var bHasHit = false;
var radius = 6;
}
Symbol 349 MovieClip [__Packages.explode] Frame 0
class explode extends MovieClip
{
var _xscale, _yscale, _alpha;
function explode () {
super();
}
function onEnterFrame() {
_xscale = _xscale * 1.2;
_yscale = _xscale;
_alpha = _alpha * 0.85;
if (_alpha <= 5) {
_root.game.removeMC(this);
}
}
}
Symbol 350 MovieClip [__Packages.game] Frame 0
class game extends MovieClip
{
var gameLevel, attachMovie, screenFX, sndCTRL, playerA, playerB, lastHitTime, bumpTimer, togglePause, firePause, deadTimer;
function game () {
super();
playerScore = 0;
gameLevel = attachMovie("Level01", "gameLevel", 1, {_x:0, _y:0});
gameLevel.gotoAndStop(1);
screenFX = attachMovie("scanlines", "fx", 2, {_x:0, _y:0});
sndCTRL = attachMovie("sndCTRL", "sndfx", 3, {_x:0, _y:0});
playerA = gameLevel.attachMovie("ship", "player1", 5, {_x:270, _y:480});
playerB = gameLevel.attachMovie("ship2", "player2", 10, {_x:230, _y:480});
}
function setLastHitTime() {
lastHitTime = getTimer();
}
function checkLastHitTime() {
if (bPaused) {
setLastHitTime();
}
var _local2 = getTimer() - lastHitTime;
return(_local2);
}
function forceAttack() {
var _local5 = enemys.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _root.game.enemys[_local4];
if (_local3 != undefined) {
_local3.aState = "attacking";
_local3.bState = "kill";
if (!_local3.bNoForce) {
_local3.Target = getPlayerTarget();
}
}
_local4++;
}
}
function closestAngle(sta, fin) {
var _local1 = fin - sta;
_local1 = _local1 % 360;
_local1 = _local1 + 540;
_local1 = _local1 % 360;
_local1 = _local1 - 180;
return(_local1);
}
function createLevelEnemies(amount) {
var _local2 = 0;
while (_local2 < amount) {
getNewEnemy();
_local2++;
}
}
function changeDir() {
if (!bTriggered) {
bTriggered = true;
bumpTimer = setInterval(bumpTime, 1000, this);
formDir = formDir * -1;
}
}
function getNewEnemy() {
var _local4 = Math.random();
var _local3 = Math.floor(60 + (Math.random() * 380));
var _local2 = Math.floor(60 + (Math.random() * 380));
if (_local4 > 0.7) {
var _local5 = gameLevel.attachMovie("enemy1", "enemy_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:_local3, _y:_local2});
} else if (_local4 > 0.5) {
var _local5 = gameLevel.attachMovie("enemy2", "enemy_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:_local3, _y:_local2});
} else if (_local4 > 0.4) {
var _local5 = gameLevel.attachMovie("enemy3", "enemy_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:_local3, _y:_local2});
} else {
var _local5 = gameLevel.attachMovie("enemy4", "enemy_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:_local3, _y:_local2});
}
levelEnemies = levelEnemies + 1;
_local5._alpha = 0;
enemys.push(_local5);
}
function getEnemyTarget(enemy) {
var _local2;
var _local5 = pipes.length;
var _local4 = 0;
while (_local2 == undefined) {
_local4++;
var _local3 = Math.floor(Math.random() * _local5);
_local2 = pipes[_local3];
if (_local2.hStatus == "destroyed") {
_local2 = undefined;
}
if (_local4 >= 100) {
_local2 = getPlayerTarget();
}
}
return(_local2);
}
function getPlayerTarget() {
var _local2;
if (Math.random() < 0.5) {
_local2 = playerA;
if (playerA == undefined) {
_local2 = playerB;
}
} else {
_local2 = playerB;
if (playerB == undefined) {
_local2 = playerA;
}
}
return(_local2);
}
function hitFX(xpos, ypos) {
sndCTRL.hitA.start();
var _local3 = 0;
while (_local3 < 5) {
var _local2 = gameLevel.attachMovie("part", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2.dirx = -5 + (Math.random() * 10);
_local2.diry = -5 + (Math.random() * 10);
_local3++;
}
}
function sparkFX(xpos, ypos) {
sndCTRL.hitA.start();
var _local3 = 0;
while (_local3 < 3) {
var _local2 = gameLevel.attachMovie("spark", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2.dirx = -5 + (Math.random() * 10);
_local2.diry = -5 + (Math.random() * 10);
_local3++;
}
}
function healFX(actor) {
var _local7 = actor._x;
var _local6 = actor._y;
var _local3 = 0;
while (_local3 < 3) {
var _local2 = gameLevel.attachMovie("crossFX", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:_local7, _y:_local6});
_local2.dirx = -5 + (Math.random() * 10);
_local2.diry = -5 + (Math.random() * 10);
_local3++;
}
}
function addHealth(xpos, ypos, actorB) {
var _local2 = gameLevel.attachMovie("healthPUP", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2.Target = actorB;
}
function addPower(xpos, ypos, actorB) {
var _local2 = gameLevel.attachMovie("powerPUP", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2.Target = actorB;
}
function criticalHit(xpos, ypos) {
attachMovie("x2dam", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos, _xscale:50, _yscale:50});
sndCTRL.hitB.start();
var _local3 = 0;
while (_local3 < 5) {
var _local2 = gameLevel.attachMovie("part", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2.dirx = -5 + (Math.random() * 10);
_local2.diry = -5 + (Math.random() * 10);
_local3++;
}
}
function explode(xpos, ypos, ang) {
var _local2 = gameLevel.attachMovie("muzzle", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local2._rotation = ang._rotation;
}
function cleanLevel() {
for (var _local3 in enemys) {
var _local2 = enemys[_local3];
if (_local2 != undefined) {
_local2.destroy(false);
}
}
levelEnemies = 0;
}
function endLevel() {
var _local5 = 0;
var _local4 = 0;
for (var _local6 in enemys) {
var _local3 = enemys[_local6];
if (_local3 != undefined) {
_local3.destroy(false);
}
}
for (var _local6 in pipes) {
var _local2 = enemys[_local6];
if (_local2 != undefined) {
if ((_local2.hStatus = "good")) {
_local5 = _local5 + 10;
} else if ((_local2.hStatus = "damaged")) {
_local4 = _local4 + 10;
} else {
_local4 = _local4 + 20;
}
}
}
showEndLevel(_local4, _local5, playerScore);
}
function fixPipes() {
var _local4 = pipes.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = pipes[_local3];
if (_local2 != undefined) {
if (_local2.hStatus == "damaged") {
_local2.health = 100;
_local2.hStatus = "good";
} else if (_local2.hStatus == "destroyed") {
_local2.health = 49;
_local2.hStatus = "damaged";
}
_local2.updateStatus();
healFX(_local2);
}
_local3++;
}
}
function showEndLevel(cost, bonus, score) {
}
function kill(actor) {
for (var _local8 in enemys) {
var _local3 = enemys[_local8];
if (_local3 == actor) {
gameLevel.attachMovie("explo", "part_" + gameLevel.getNextHighestDepth(), gameLevel.getNextHighestDepth(), {_x:actor._x, _y:actor._y, _xscale:50, _yscale:50});
levelEnemies = levelEnemies - 1;
enemys.splice(_local8, 1);
sndCTRL.explode.start();
}
}
removeMC(actor);
}
function killObject(actor) {
for (var _local4 in enemys) {
var _local2 = enemys[_local4];
if (_local2 == actor) {
enemys.splice(_local4, 1);
}
}
removeMC(actor);
}
function removeMC(mc) {
var _local2 = _root.game.getInstanceAtDepth(0);
mc.swapDepths(0);
mc.removeMovieClip();
if (_local2 != undefined) {
_local2.swapDepths(0);
}
}
function onEnterFrame() {
if (!_root.game.bPaused) {
testCount++;
formX = formX + formDir;
if (formX >= 50) {
formDir = -sModifyer;
} else if (formX <= -50) {
formDir = sModifyer;
}
if (_root.bMuted && (!bMuted)) {
bMuted = true;
sndCTRL.shot.setVolume(0);
} else if ((!_root.bMuted) && (bMuted)) {
bMuted = false;
sndCTRL.shot.setVolume(100);
}
if (playerA._xscale > 100) {
playerA._xscale--;
playerA._yscale = playerA._xscale;
}
if (playerB._xscale > 100) {
playerB._xscale--;
playerB._yscale = playerB._xscale;
}
if ((testCount >= 10) && (bInGame)) {
testCount = 0;
checkPipes();
checkPlayer();
if (levelEnemies <= 0) {
bInGame = false;
gameLevel.nextFrame();
cleanLevel();
sModifyer = sModifyer + 0.03;
hModifyer = hModifyer + 0.1;
}
if (checkLastHitTime() > 10000) {
forceAttack();
}
}
if (Key.isDown(37)) {
playerA.Move("left");
playerB.Move("left");
} else if (Key.isDown(39)) {
playerA.Move("right");
playerB.Move("right");
}
if ((Key.isDown(38) && (bToggle)) || (Key.isDown(40) && (bToggle))) {
sndCTRL.clicker.start();
bToggle = false;
playerA.Toggle(speedB);
playerB.Toggle(speedB);
speedB = speedB * -1;
togglePause = setInterval(toggleTimer, 1000, this);
}
if (Key.isDown(32) && (bCanFire)) {
bCanFire = false;
sndCTRL.shot.start();
playerA.fire();
playerB.fire();
firePause = setInterval(fireTimer, shotSpeed, this);
}
}
if (Key.isDown(80) && (bCanPause)) {
bCanPause = false;
if (bPaused) {
bPaused = false;
} else {
bPaused = true;
}
}
if ((!Key.isDown(80)) && (!bCanPause)) {
bCanPause = true;
}
}
function checkPipes() {
var _local3 = 0;
for (var _local4 in pipes) {
var _local2 = pipes[_local4];
if (_local2 != undefined) {
if (_local2.hStatus == "good") {
_local3++;
} else if (_local2.hStatus == "damaged") {
_local3++;
}
}
}
if (_local3 <= 0) {
bInGame = false;
endGame();
}
}
function checkPlayer() {
if (bInGame) {
if ((playerA.health <= 0) && (playerB.health <= 0)) {
bInGame = false;
deadTimer = setInterval(endGame, 2000, this);
} else if ((playerA.health == undefined) && (playerB.health == undefined)) {
bInGame = false;
deadTimer = setInterval(endGame, 2000, this);
}
}
}
function endGame(actor) {
bInGame = false;
clearInterval(actor.deadTimer);
removeMC(screenFX);
actor.removeMC(actor.gameLevel);
actor.showEndGame(playerScore);
}
function showEndGame(score) {
_root.gotoAndStop(16);
}
function getGridRef(actor) {
actor.gridX = Math.floor(actor._x * 0.05);
actor.gridY = Math.floor(actor._y * 0.05);
}
function checkCollision(actorA, actorB) {
var _local4 = false;
var _local2 = actorA._x - actorB._x;
var _local1 = actorA._y - actorB._y;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (_local3 < (actorA.radius + actorB.radius)) {
_local4 = true;
}
return(_local4);
}
function fireTimer(actor) {
actor.bCanFire = true;
clearInterval(actor.firePause);
}
function toggleTimer(actor) {
actor.bToggle = true;
clearInterval(actor.togglePause);
}
function bumpTime(actor) {
actor.bTriggered = false;
clearInterval(actor.bumpTimer);
}
var playerScore = 0;
var enemyCount = 0;
var killCount = 0;
var levelEnemies = 0;
var bMuted = false;
var bPaused = false;
var bCanPause = true;
var speedA = 5;
var speedB = 5;
var levelNumber = 1;
var enemys = new Array();
var pipes = new Array();
var hModifyer = 1;
var sModifyer = 1;
var repairCost = 0;
var testCount = 0;
var bInGame = false;
var bCanFire = true;
var bResetFire = false;
var bToggle = true;
var bTriggered = false;
var formDir = 1;
var formX = 0;
var formY = 0;
var shotSpeed = 450;
}
Symbol 351 MovieClip [__Packages.pipeSection] Frame 0
class pipeSection extends MovieClip
{
var hStatus, health, gotoAndStop, hitTest, _x, _y;
function pipeSection () {
super();
hStatus = "good";
health = 100;
_root.game.pipes.push(this);
gotoAndStop(1);
_root.game.getGridRef(this);
}
function takeHit(amount) {
health = health - amount;
if (health >= 75) {
hStatus = "good";
}
if (health <= 0) {
hStatus = "destroyed";
} else if (health <= 50) {
hStatus = "damaged";
}
updateStatus();
}
function updateStatus() {
if (hStatus == "damaged") {
gotoAndStop(2);
} else if (hStatus == "destroyed") {
gotoAndStop(3);
} else {
gotoAndStop(1);
}
}
function onEnterFrame() {
if (hStatus == "destroyed") {
var _local4 = 0;
var _local3 = 0;
if (hitTest(_root.game.playerA._x, _root.game.playerA._y, true)) {
if ((_root.game.playerA._rotation == 0) || (_root.game.playerA._rotation == 180)) {
_local4 = (_root.game.playerA._x - _x) * 0.4;
_local3 = 0;
} else {
_local3 = (_root.game.playerA._y - _y) * 0.4;
_local4 = 0;
}
_root.game.playerA.takeHit(0.2);
_root.game.playerA._x = _root.game.playerA._x + _local4;
_root.game.playerA._y = _root.game.playerA._y + _local3;
}
if (hitTest(_root.game.playerB._x, _root.game.playerB._y, true)) {
if ((_root.game.playerB._rotation == 0) || (_root.game.playerB._rotation == 180)) {
_local4 = (_root.game.playerB._x - _x) * 0.4;
_local3 = 0;
} else {
_local3 = (_root.game.playerB._y - _y) * 0.4;
_local4 = 0;
}
_root.game.playerB.takeHit(0.2);
_root.game.playerB._x = _root.game.playerB._x + _local4;
_root.game.playerB._y = _root.game.playerB._y + _local3;
}
}
}
var radius = 20;
}
Symbol 352 MovieClip [__Packages.enemyA] Frame 0
class enemyA extends MovieClip
{
var diry, dirx, baseX, _x, baseY, _y, aiTicker, shieldFX, attachMovie, _alpha, _rotation, Target, gotoAndStop, fireTimer, _parent;
function enemyA () {
super();
diry = 0;
dirx = 0;
health = health * _root.game.hModifyer;
speed = speed * _root.game.sModifyer;
baseX = _x;
baseY = _y;
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
aiTicker = setInterval(aiTick, 1000 + (Math.random() * 2000), this);
_x = 250;
_y = 250;
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
aState = "returning";
_alpha = 0;
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.criticalHit(_x, _y);
_root.game.playerScore = _root.game.playerScore + 10;
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
lastImpactTime = _local4;
lastImpactAngle = _local3;
_root.game.playerScore = _root.game.playerScore + 10;
health = health - amount;
if (health <= 0) {
destroy(true);
}
if (aState == "attacking") {
aState = "returning";
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 50;
}
_root.game.kill(this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_root.game.getGridRef(this);
if (_alpha > 99) {
_x = _x + dirx;
_y = _y + diry;
if (_rotation != desiredAngle) {
_rotation = _rotation + turnAmount;
}
if (aState != "forming") {
dirx = Math.cos((_rotation / 180) * Math.PI) * speed;
diry = Math.sin((_rotation / 180) * Math.PI) * speed;
}
if (aState == "returning") {
if (Math.abs(_x - (baseX + _root.game.formX)) <= 10) {
if (Math.abs(_y - baseY) <= 10) {
_y = baseY;
_x = baseX + _root.game.formX;
_rotation = 0;
aState = "forming";
}
}
}
if (aState == "forming") {
_x = baseX + _root.game.formX;
_y = baseY;
if (_root.game.playerA._rotation != undefined) {
desiredAngle = _root.game.playerA._rotation + 90;
} else {
desiredAngle = _root.game.playerB._rotation + 90;
}
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.1;
}
aiTimer++;
if ((Target.hStatus == "destroyed") || (Target.hStatus == undefined)) {
getNewTarget();
}
if (_x < 35) {
_x = 37;
dirx = dirx * -2;
turnAmount = turnAmount * 2;
} else if (_x > 465) {
_x = 463;
dirx = dirx * -2;
turnAmount = turnAmount * 2;
} else if (_y < 35) {
_y = 37;
diry = diry * -2;
turnAmount = turnAmount * 2;
} else if (_y > 465) {
_y = 463;
diry = diry * -2;
turnAmount = turnAmount * 2;
}
if (aiTimer >= 10) {
aiTimer = 0;
if (aState == "attacking") {
gotoAndStop(2);
if (Target != undefined) {
var _local3 = Target._x - _x;
var _local5 = Target._y - _y;
}
var _local4 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local4;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.08;
if (bCanFire) {
if (Math.abs(_rotation - desiredAngle) < 3) {
bCanFire = false;
fireTimer = setInterval(fireTime, 2000, this);
fire();
}
}
} else if (aState == "returning") {
gotoAndStop(1);
var _local3 = (baseX + _root.game.formX) - _x;
var _local5 = baseY - _y;
var _local4 = (Math.atan2(_local5, _local3) * 180) / Math.PI;
desiredAngle = _local4;
turnAmount = _root.game.closestAngle(_rotation, desiredAngle) * 0.06;
}
}
} else {
_alpha = _alpha + 2;
}
}
}
function fire() {
_root.game.sndCTRL.shot2.start();
var _local3 = _parent.attachMovie("ePulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + (dirx * 3), _y:_y + (diry * 3)});
_local3._rotation = _rotation;
_local3.dirx = dirx * 2;
_local3.diry = diry * 2;
}
function getNewTarget() {
if (_root.game.levelEnemies > 5) {
Target = _root.game.getEnemyTarget(this);
} else {
Target = _root.game.getPlayerTarget(this);
}
}
function aiTick(actor) {
clearInterval(actor, aiTicker);
if (_root.game.levelEnemies > 5) {
if (actor.aState == "attacking") {
actor.aState = "returning";
actor.aiTicker = actor.setInterval(aiTick, 4000, actor);
} else {
if (Math.random() > 0.9) {
actor.aState = "attacking";
}
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
} else {
actor.aState = "attacking";
actor.getNewTarget();
actor.aiTicker = actor.setInterval(aiTick, 3000, actor);
}
}
function fireTime(actor) {
actor.bCanFire = true;
clearInterval(actor.fireTimer);
}
var health = 25;
var radius = 10;
var aiTimer = 60;
var desiredAngle = 0;
var turnAmount = 0;
var bAttacking = false;
var bCanFire = true;
var aState = "forming";
var lastImpactTime = 0;
var lastImpactAngle = 0;
var speed = 2;
}
Symbol 353 MovieClip [__Packages.mFlash] Frame 0
class mFlash extends MovieClip
{
var _xscale, _yscale, _alpha;
function mFlash () {
super();
}
function onEnterFrame() {
_xscale = _xscale * 0.95;
_yscale = _yscale * 1.3;
_alpha = _alpha * 0.8;
if (_alpha <= 5) {
_root.game.removeMC(this);
}
}
}
Symbol 354 MovieClip [__Packages.projectile] Frame 0
class projectile extends MovieClip
{
var _x, _y, dirx, diry, gridX, gridY;
function projectile () {
super();
_root.game.explode(_x, _y, this);
}
function onEnterFrame() {
if (!_root.game.bPaused) {
_x = _x + dirx;
_y = _y + diry;
if ((((_x < 35) || (_x > 465)) || (_y < 35)) || (_y > 465)) {
destroy();
}
_root.game.getGridRef(this);
var _local5 = _root.game.enemys.length;
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _root.game.enemys[_local4];
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
if (_root.game.checkCollision(this, _local3)) {
hit(_local3);
}
}
}
_local4++;
}
}
}
function hit(enemy) {
if (!bHasHit) {
bHasHit = true;
enemy.takeHit(power, this);
_root.game.setLastHitTime();
destroy();
}
}
function destroy() {
_root.game.hitFX(_x, _y);
_root.game.removeMC(this);
}
var power = 20;
var bHasHit = false;
var radius = 6;
}
Symbol 355 MovieClip [__Packages.playerA] Frame 0
class playerA extends MovieClip
{
var shieldFX, attachMovie, stop, gotoAndStop, _parent, _rotation, _y, _x, angle, gridX, gridY;
function playerA () {
super();
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0, _rotation:-90});
stop();
}
function Toggle(num) {
if (num < 0) {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
}
function fire() {
var _local2 = _parent.attachMovie("pulse", "shot_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x + shotset.x, _y:_y + shotset.y, _rotation:_rotation, _xscale:90 + power, _yscale:90 + power});
_local2.power = power;
_local2.dirx = shotset.sx;
_local2.diry = shotset.sy;
_local2.playerOwner = this;
}
function Move(dir) {
var _local5 = _x - 250;
var _local4 = _y - 250;
angle = (Math.atan2(_local4, _local5) * 180) / Math.PI;
if (_x < 20) {
_x = 20;
}
if (_x > 480) {
_x = 480;
}
if (_y < 20) {
_y = 20;
}
if (_y > 480) {
_y = 480;
}
if ((angle <= 45) && (angle >= -45)) {
_rotation = -90;
if (dir == "left") {
_y = _y + _root.game.speedA;
} else {
_y = _y - _root.game.speedA;
}
shotset = {x:-20, y:0, sx:-15, sy:0};
} else if ((angle <= -45) && (angle >= -135)) {
_rotation = 180;
if (dir == "left") {
_x = _x + _root.game.speedA;
} else {
_x = _x - _root.game.speedA;
}
shotset = {x:0, y:20, sx:0, sy:15};
} else if ((angle >= 45) && (angle <= 135)) {
_rotation = 0;
if (dir == "left") {
_x = _x - _root.game.speedA;
} else {
_x = _x + _root.game.speedA;
}
shotset = {x:0, y:-20, sx:0, sy:-15};
} else {
_rotation = 90;
if (dir == "left") {
_y = _y - _root.game.speedA;
} else {
_y = _y + _root.game.speedA;
}
shotset = {x:20, y:0, sx:15, sy:0};
}
_root.game.getGridRef(this);
}
function checkPlayerCollide(xpos, ypos) {
var _local3 = _root.game.playerB;
var _local4 = false;
if (_local3._rotation == _rotation) {
if (((gridX - 1) <= _local3.gridX) && ((gridX + 1) >= _local3.gridX)) {
if (((gridY - 1) <= _local3.gridY) && ((gridY + 1) >= _local3.gridY)) {
var _local6 = _local3._x - xpos;
var _local5 = _local3._y - ypos;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (_local7 < 20) {
_local4 = true;
}
}
}
}
return(_local4);
}
function takeHit(amount) {
health = health - (amount * 0.5);
shieldFX._alpha = 100;
if (health <= 0) {
destroy(true);
}
}
function destroy() {
_root.game.playerB.destroy();
_parent.attachMovie("explo", "part_" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y, _xscale:80, _yscale:80});
_root.game.sndCTRL.explode.start();
_root.game.hitFX(_x, _y);
_root.game.removeMC(this);
}
var health = 100;
var hStatus = "not needed";
var shotset = {x:0, y:-20, sx:0, sy:-15};
var radius = 12;
var power = 10;
}
Symbol 356 MovieClip [__Packages.criticalHitFX] Frame 0
class criticalHitFX extends MovieClip
{
var _alpha, _yscale, _y;
function criticalHitFX () {
super();
}
function onEnterFrame() {
_alpha = _alpha * 0.95;
_yscale = _yscale + 3;
_y = _y - 1;
if (_alpha <= 5) {
_root.game.removeMC(this);
}
}
}
Symbol 357 MovieClip [__Packages.bsGen] Frame 0
class bsGen extends MovieClip
{
var shieldFX, attachMovie, _x, _y, _rotation;
function bsGen () {
super();
_root.game.enemys.push(this);
_root.game.levelEnemies = _root.game.levelEnemies + 1;
shieldFX = attachMovie("sFX", "sfx", 10, {_x:0, _y:0});
}
function takeHit(amount, actor) {
var _local4 = getTimer();
var _local3 = (Math.atan2(actor.diry, -actor.dirx) * 180) / Math.PI;
if ((_local4 - lastImpactTime) < 800) {
if (_local3 != lastImpactAngle) {
amount = amount * 2;
_root.game.playerScore = _root.game.playerScore + 10;
_root.game.criticalHit(_x, _y);
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
} else {
shieldFX._rotation = (-_local3) - _rotation;
shieldFX._alpha = 100;
}
_root.game.playerScore = _root.game.playerScore + 10;
lastImpactTime = _local4;
lastImpactAngle = _local3;
health = health - amount;
if (health <= 0) {
destroy(true);
}
}
function destroy(ind) {
if (ind) {
_root.game.playerScore = _root.game.playerScore + 100;
}
_root.game.kill(this);
}
function onEnterFrame() {
_root.game.getGridRef(this);
}
var health = 300;
var radius = 10;
var lastImpactTime = 0;
var lastImpactAngle = 0;
}
Symbol 73 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 74 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 75 MovieClip [__Packages.Splash] Frame 0
class Splash extends mx.core.UIComponent
{
var useHandCursor, boundingBox_mc, invalidate;
function Splash () {
super();
}
function init() {
super.init();
useHandCursor = false;
boundingBox_mc._visible = false;
}
function createChildren() {
size();
}
function size() {
super.size();
invalidate();
}
function draw() {
super.draw();
if (_global.isLivePreview) {
boundingBox_mc._visible = true;
} else {
boundingBox_mc._visible = false;
}
}
function getFrameAfterCompletion() {
return(frameAfterCompletion);
}
function setFrameAfterCompletion(frameAfterCompletion) {
this.frameAfterCompletion = frameAfterCompletion;
}
static var symbolName = "Splash";
static var symbolOwner = Splash;
var className = "Splash";
var frameAfterCompletion = 0;
}
Symbol 97 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 98 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 99 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 100 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 287 MovieClip [__Packages.HiScores] Frame 0
class HiScores extends mx.core.UIComponent
{
var _visible, g5User, g5UserExists, gameId, levelId, gameCode, lowIsBest, score, msg1, msg2, movEntryScreen, movAutoEntryScreen, movInfoScreen, invalidate, getURL;
function HiScores () {
super();
_visible = false;
}
function setDetails(gameId, levelId, gameCode, lowIsBest, score, msg1, msg2) {
g5User = flash.external.ExternalInterface.call("getG5User");
g5UserExists = ((g5User == null) ? false : (!isNaN(g5User[0])));
this.gameId = gameId;
this.levelId = levelId;
this.gameCode = gameCode;
this.lowIsBest = lowIsBest;
this.score = score;
this.msg1 = msg1;
this.msg2 = msg2;
entryScreen = movEntryScreen;
autoEntryScreen = movAutoEntryScreen;
infoScreen = movInfoScreen;
entryScreen._visible = false;
autoEntryScreen._visible = false;
infoScreen._visible = false;
if (g5UserExists) {
showAutoEntryScreen();
} else {
showEntryScreen();
}
_visible = true;
}
function createChildren() {
size();
}
function size() {
super.size();
invalidate();
}
function secCodeLoad() {
var _local2 = new MovieClipLoader();
_local2.loadClip((HS_SERVLET_URL + "?type=genCode&cachebuster=") + new Date().getTime(), entryScreen.movCode);
}
function back() {
entryScreen._visible = true;
infoScreen._visible = false;
}
function viewScore() {
if (g5UserExists) {
getURL((((((((HI_SCORE_URL + gameCode) + "_hs") + "&userId=") + g5User[0]) + "&levelId=") + levelId) + "&cachebuster=") + new Date().getTime(), "_blank");
} else {
getURL((((((((HI_SCORE_URL + gameCode) + "_hs") + "&name=") + entryScreen.txtName.text) + "&levelId=") + levelId) + "&cachebuster=") + new Date().getTime(), "_blank");
}
}
function showEntryScreen() {
entryScreen.txtMsg1.text = msg1;
entryScreen.txtMsg2.text = msg2;
entryScreen.txtName.text = "";
entryScreen.txtCode.text = "";
entryScreen._visible = true;
secCodeLoad();
}
function showAutoEntryScreen() {
autoEntryScreen.txtMsg1.text = msg1;
autoEntryScreen.txtMsg2.text = msg2;
autoEntryScreen.txtName.text = g5User[1];
autoEntryScreen._visible = true;
}
function showInfoMessage(msg, error) {
infoScreen.txtInfo.text = msg;
infoScreen.btnBack._visible = error;
infoScreen.btnView._visible = !error;
}
function submitScore() {
entryScreen._visible = false;
autoEntryScreen._visible = false;
infoScreen._visible = true;
var _local8 = true;
if ((!g5UserExists) && (entryScreen.txtName.text.length == 0)) {
showInfoMessage("Please enter your name.", true);
} else if ((!g5UserExists) && (entryScreen.txtCode.text.length != 5)) {
showInfoMessage("Please enter all 5 letters of the security code.", true);
} else {
showInfoMessage("Submitting hi-score details to the server, please wait.", true);
infoScreen.btnBack._visible = false;
_local8 = false;
}
if (!_local8) {
var _local4 = "save|";
if (g5UserExists) {
_local4 = _local4 + ((((((("----------|-----|" + score) + "|") + gameId) + "|") + levelId) + "|") + g5User[0]);
} else {
_local4 = _local4 + (((((((((entryScreen.txtName.text + "|") + entryScreen.txtCode.text) + "|") + score) + "|") + gameId) + "|") + levelId) + "|-----");
}
var _local5 = "";
var _local3 = 0;
var _local2 = 0;
while (_local3 < _local4.length) {
if (_local2 >= KEY.length) {
_local2 = 0;
}
_local5 = _local5 + String.fromCharCode((_local4.charCodeAt(_local3) ^ KEY.charCodeAt(_local2)) + 1);
_local3++;
_local2++;
}
var self = this;
var _local6 = new LoadVars();
_local6.ffdata = _local5;
_local6.lowIsBest = lowIsBest;
_local6.sendAndLoad(HS_SERVLET_URL, _local6, "POST");
_local6.onLoad = function (success) {
var _local2 = parseInt(this.res);
if (!success) {
self.showInfoMessage("A serious problem was encountered with the server, please try again in a few minutes.", true);
} else if (_local2 == -1) {
self.showInfoMessage("Could not store hi-score details. Click on back, generate a new security code and re-submit.", true);
} else if (_local2 == 0) {
self.showInfoMessage("Sorry, a better score already exists with that name.", false);
} else if (_local2 == 1) {
self.showInfoMessage("Congratulations! You made it into the\nhi-score table.", false);
}
};
}
}
function enterAnotherName() {
g5UserExists = false;
autoEntryScreen._visible = false;
showEntryScreen();
}
static var symbolName = "HiScores";
static var symbolOwner = HiScores;
var className = "HiScores";
static var SERVER_URL = "http://www.gimme5games.com";
static var HS_SERVLET_URL = SERVER_URL + "/servlet/hiServlet";
static var HI_SCORE_URL = SERVER_URL + "/index.jsp?id=";
var KEY = "rocket";
var entryScreen = null;
var autoEntryScreen = null;
var infoScreen = null;
}
Symbol 85 Button
on (release) {
getURL ("http://www.gimme5games.com", "_blank");
}
Symbol 96 MovieClip [Splash] Frame 1
#initclip 56
Object.registerClass("Splash", Splash);
#endinitclip
Symbol 96 MovieClip [Splash] Frame 91
_root.gotoAndPlay(this.getFrameAfterCompletion());
Symbol 104 MovieClip [bossShieldGen] Frame 1
#initclip 70
Object.registerClass("bossShieldGen", bsGen);
#endinitclip
Symbol 107 MovieClip [crossFX] Frame 1
#initclip 57
Object.registerClass("crossFX", particle);
#endinitclip
Symbol 108 MovieClip [ePulse] Frame 1
#initclip 58
Object.registerClass("ePulse", eProjectile);
#endinitclip
Symbol 111 MovieClip [explo] Frame 1
#initclip 59
Object.registerClass("explo", explode);
#endinitclip
Symbol 142 MovieClip [explosion1] Frame 1
function onEnterFrame() {
if (this._currentframe > 50) {
_root.game.removeMC(this);
}
}
Symbol 144 MovieClip [Game] Frame 1
#initclip 60
Object.registerClass("Game", game);
#endinitclip
Symbol 157 MovieClip [pipe_part] Frame 1
#initclip 61
Object.registerClass("pipe_part", pipeSection);
#endinitclip
Symbol 173 MovieClip [enemy1] Frame 1
#initclip 62
Object.registerClass("enemy1", enemyA);
#endinitclip
Symbol 209 MovieClip [Level01] Frame 2
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 3
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 4
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 5
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 6
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 7
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 8
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 9
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 10
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 11
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 12
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 13
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 14
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 15
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 16
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 100) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 17
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 120) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 18
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 19
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 20
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 21
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 22
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 23
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 24
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 25
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 26
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 27
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 28
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 29
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 30
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 31
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
_root.game.cleanLevel();
_root.game.levelEnemies = 0;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 32
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 100) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 33
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 34
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 35
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 36
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 37
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 38
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 39
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 40
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 41
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 42
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 43
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 44
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 45
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 46
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 47
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 48
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 49
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 100) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 50
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 120) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 51
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 52
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 53
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 54
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 55
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 56
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 57
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 58
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 59
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 60
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 61
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 62
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 63
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 64
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
_root.game.cleanLevel();
_root.game.levelEnemies = 0;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 65
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 100) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 66
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 67
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 68
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 69
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 70
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 71
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 72
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 73
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 74
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 75
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 76
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 77
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 78
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 79
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 80
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 81
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 82
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
_root.game.cleanLevel();
_root.game.levelEnemies = 0;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 100) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 83
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 120) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 84
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 85
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 86
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 87
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 88
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 89
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 90
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 91
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 92
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 93
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 94
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 95
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 60) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 96
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 97
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
_root.game.cleanLevel();
_root.game.levelEnemies = 0;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 98
function onEnterFrame() {
if (!this.started) {
this.lvlText.text = "LEVEL " + _root.game.levelNumber;
this.started = true;
this.counter = 0;
this.counting = false;
}
this.counter++;
if (this.counter >= 100) {
_root.game.bInGame = true;
this.nextFrame();
}
}
Symbol 209 MovieClip [Level01] Frame 99
function onEnterFrame() {
if (!this.init) {
this.init = true;
}
}
Symbol 209 MovieClip [Level01] Frame 100
function onEnterFrame() {
if (!counting) {
_root.game.levelNumber = _root.game.levelNumber + 1;
counting = true;
this.started = false;
this.init = false;
timecount = 0;
}
timecount++;
if (timecount >= 60) {
this.gotoAndStop(68);
}
}
Symbol 213 MovieClip [lvlmcCTRL] Frame 1
function onRelease() {
if (!this.bMuted) {
this.bMuted = true;
this.lvlMusic.setVolume(0);
this.lvlMusic.stop();
this.lvl2Music.setVolume(0);
this.lvl2Music.stop();
} else if (!this.bTotalMute) {
this.bTotalMute = true;
_root.bMuted = true;
} else {
this.bMuted = false;
_root.bMuted = false;
this.bTotalMute = false;
this.lvlMusic.stop();
this.lvl2Music.stop();
if ((_root._currentframe < 10) || (_root._currentframe > 14)) {
this.lvlMusic.setVolume(100);
this.lvlMusic.start();
} else {
this.lvl2Music.setVolume(100);
this.lvl2Music.start();
}
}
}
function onEnterFrame() {
if (!this.bsetup) {
this.bsetup = true;
this.lvlMusic = new Sound(this);
this.lvlMusic.attachSound("bgm2");
this.lvlMusic.start();
this.lvlMusic.onSoundComplete = function () {
this.start();
};
this.lvl2Music = new Sound(this);
this.lvl2Music.attachSound("bgm1");
this.lvl2Music.onSoundComplete = function () {
this.start();
};
}
if (this.bTotalMute) {
this.gotoAndStop(3);
} else if (this.bMuted) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Symbol 216 MovieClip [mscCTRL] Frame 1
function onRelease() {
if (!this.bMuted) {
this.bMuted = true;
this.lvlMusic.setVolume(0);
this.lvlMusic.stop();
} else {
this.bMuted = false;
this.lvlMusic.setVolume(100);
this.lvlMusic.start();
}
}
function onEnterFrame() {
if (!this.bsetup) {
this.bsetup = true;
this.lvlMusic = new Sound(this);
this.lvlMusic.attachSound("bgm2");
this.lvlMusic.start();
this.lvlMusic.onSoundComplete = function () {
this.start();
};
}
if (this.bMuted) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Symbol 219 MovieClip [muzzle] Frame 1
#initclip 63
Object.registerClass("muzzle", mFlash);
#endinitclip
Symbol 220 MovieClip [part] Frame 1
#initclip 64
Object.registerClass("part", particle);
#endinitclip
Symbol 223 MovieClip [pulse] Frame 1
#initclip 65
Object.registerClass("pulse", projectile);
#endinitclip
Symbol 230 MovieClip [sFX] Frame 1
function onEnterFrame() {
if (this._alpha > 5) {
this._alpha = this._alpha * 0.95;
}
}
Symbol 231 MovieClip [ship] Frame 1
#initclip 66
Object.registerClass("ship", playerA);
#endinitclip
Symbol 232 MovieClip [spark] Frame 1
#initclip 67
Object.registerClass("spark", particle);
#endinitclip
Symbol 233 MovieClip [spinPulse] Frame 1
#initclip 68
Object.registerClass("spinPulse", eProjectile);
#endinitclip
Symbol 235 MovieClip [trail] Frame 15
function onEnterFrame() {
_root.game.removeMC(this);
}
Symbol 237 MovieClip [x2dam] Frame 1
#initclip 69
Object.registerClass("x2dam", criticalHitFX);
#endinitclip
Symbol 263 MovieClip Frame 1
function onEnterFrame() {
this.counter.text = _root.game.playerScore;
}
Symbol 268 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.playerA.health != undefined) {
this.hBar._xscale = _root.game.playerA.power;
} else {
this.hBar._alpha = 0;
}
}
Symbol 270 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.playerA.health != undefined) {
if (_root.game.playerA.health > 0) {
this.hBar._xscale = _root.game.playerA.health;
} else {
this.hBar._xscale = 1;
this.hBar._alpha = 0;
}
} else {
this.hBar._alpha = 0;
}
}
Symbol 305 Button
on (release) {
_parent.submitScore();
}
Symbol 307 Button
on (release) {
_parent.secCodeLoad();
}
Symbol 318 Button
on (release) {
_parent.enterAnotherName();
}
Symbol 322 Button
on (release) {
_parent.back();
}
Symbol 325 Button
on (release) {
_parent.viewScore();
}
Symbol 328 MovieClip [HiScores] Frame 1
#initclip 71
Object.registerClass("HiScores", HiScores);
#endinitclip