Frame 3
ifFrameLoaded (10) {
gotoAndPlay (5);
}
Frame 4
gotoAndPlay (1);
Frame 5
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
_quality = "HIGH";
_root.smokemax = 20;
_root.silent = false;
_root.autocannonsound = new Sound();
_root.autocannonsound.attachsound("autocannon");
_root.blipsound = new Sound();
_root.blipsound.attachsound("blip");
_root.alienriflesound = new Sound();
_root.alienriflesound.attachsound("alien rifle");
_root.gunsound = new Sound();
_root.gunsound.attachsound("gun");
_root.teleportsound = new Sound();
_root.teleportsound.attachsound("teleport");
_root.lasersound = new Sound();
_root.lasersound.attachsound("laser");
_root.lowexplodesound = new Sound();
_root.lowexplodesound.attachsound("low explode");
_root.explodesound = new Sound();
_root.explodesound.attachsound("explode");
_root.rocketsound = new Sound();
_root.rocketsound.attachsound("rocket");
_root.score = 0;
_root.identify = 0;
_root.alienrifleaccuracy = 1;
_root.alienrifledamage = 1;
_root.rifleaccuracy = 1;
_root.riflelevel = 3;
_root.rifledamage = 1;
_root.riflereloadtime = 100;
_root.smokefx = true;
_root.alienboarded = 0;
_root.nebulafx = false;
_root.totalenemy = 0;
_root.cheatcode = 0;
_root.customtorpfuel = 1;
_root.customtorpdamage = 1;
_root.customtorpspeed = 4;
_root.customtorpfuse = 1;
_root.cash = 1000;
_root.life = 100;
_root.repaircost = 50;
_root.lifemax = 100;
_root.level = 0;
_root.kills = 0;
_root.killgoal = 0;
_root.stationrocketreloadtime = 5;
_root.rockettype = 1;
_root.launcherupcost = 300;
_root.targetupcost = 200;
_root.armorupcost = 300;
_root.launchertype = 1;
_root.armortype = 1;
_root.torpoutmax = 1;
_root.debugmode = false;
_root.cannonreloadtime = 20;
_root.cannondamage = 4;
_root.bulletcost = 1;
_root.bulletnumber = 3;
_root.bulletspeed = 20;
_root.cannontype = 1;
_root.cannonupcost = 400;
_root.cannoninaccuracy = 3;
_root.platformcost = 1000;
_root.platformaammo = 0;
_root.platformaammomax = 200;
_root.platforma = 0;
_root.platformalife = 0;
_root.platformalifemax = 20;
_root.platformbammo = 0;
_root.platformb = 0;
_root.platformblife = 0;
_root.platformblifemax = 25;
_root.platformbammomax = 200;
stop();
Instance of Symbol 132 MovieClip "options" in Frame 5
onClipEvent (load) {
_root.options._visible = false;
}
Frame 6
_quality = "HIGH";
_root.level++;
_root.alienboarded = 0;
_root.killgoal = _root.killgoal + Math.round((_root.level * 10) / 2);
_root.platformalife = _root.platformalifemax;
_root.platformblife = _root.platformblifemax;
stop();
Instance of Symbol 166 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.rocketupcost = (_root.rockettype + 1) * 400;
}
Instance of Symbol 46 MovieClip "bar" in Frame 6
onClipEvent (load) {
if (_root.cheatcode == 1234) {
debug.enabled = true;
} else {
debug.enabled = false;
}
}
Frame 7
_quality = "LOW";
_root.enemyout = 0;
_root.enemynumber = 0;
_root.station.torpout = 0;
_root.station.torpnumber = 0;
_root.redlaserout = 0;
_root.redlasernumber = 0;
_root.smokenumber = 0;
Instance of Symbol 258 MovieClip "nebula" in Frame 7
onClipEvent (load) {
_y = (random(100) + 100);
_x = random(400);
_rotation = (_random(360) + 1);
xspeed = 0.25;
origscalex = _xscale;
origscaley = _yscale;
_root.nebula._visible = false;
_root.nebula.main = true;
if ((main == true) and (_root.nebulafx == true)) {
duplicateMovieClip ("_root.nebula", "nebula1", 4000);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
if (main != true) {
if (_root.nebulafx == true) {
_visible = true;
} else {
_visible = false;
}
_x = (_x + xspeed);
if (_x > 700) {
_xscale = (origscalex * ((random(100) + 100) / 100));
_yscale = _xscale;
_rotation = _random(360);
_y = (random(100) + 100);
_x = -200;
xspeed = (random(10) + 1) / 10;
}
}
}
Instance of Symbol 260 MovieClip "nebula2" in Frame 7
onClipEvent (load) {
_y = (random(100) + 100);
_x = random(400);
_rotation = (_random(360) + 1);
xspeed = 0.3;
origscalex = _xscale;
origscaley = _yscale;
_root.nebula2._visible = false;
_root.nebula2.main = true;
if ((main == true) and (_root.nebulafx == true)) {
duplicateMovieClip ("_root.nebula2", "nebula3", 4001);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
if (main != true) {
if (_root.nebulafx == true) {
_visible = true;
} else {
_visible = false;
}
_x = (_x + xspeed);
if (_x > 550) {
_xscale = (origscalex * ((random(100) + 100) / 100));
_yscale = _xscale;
_rotation = _random(360);
_y = (random(100) + 100);
_x = -100;
xspeed = (random(10) + 1) / 10;
}
}
}
Instance of Symbol 296 MovieClip "station" in Frame 7
onClipEvent (load) {
torpnumber = 0;
torpoutmax = _root.torpoutmax;
rocketfuel = 80;
rocketreloadtime = _root.stationrocketreloadtime;
_root.mode = "CANNON";
}
onClipEvent (enterFrame) {
if (rocketreload > 0) {
rocketreload--;
}
}
Instance of Symbol 299 MovieClip in Frame 7
onClipEvent (load) {
cannoncycle = _root.cannonreloadtime;
_root.maintorp._y = _root.station._y;
_root.maintorp._x = _root.station._x;
_root.bullet._y = _root.station._y;
_root.bullet._x = _root.station._x;
_visible = false;
}
onClipEvent (mouseDown) {
_root.targetx = _root._xmouse;
_root.targety = _root._ymouse;
if ((((_root._ymouse < 250) and (_root._ymouse > 25)) and (_root.cash > -100)) and (_root.optionlock != true)) {
if (_root.mode == "CANNON") {
cannoncycleon = true;
}
if (((_root.mode == "ROCKET") and (_root.station.rocketreload <= 0)) and (_root.station.torpout < _root.station.torpoutmax)) {
if (_root.silent != true) {
_root.rocketsound.start();
}
duplicateMovieClip (_root.maintorp, "torp" + _root.station.torpnumber, _root.station.torpnumber);
_root.cash = _root.cash - _root.rocketcost;
_root.station.torpnumber++;
_root.station.rocketreload = _root.station.rocketreloadtime;
if (_root.station.torpnumber >= (_root.station.torpoutmax + 10)) {
_root.station.torpnumber = 1;
}
}
}
}
onClipEvent (enterFrame) {
if (cannoncycleon == true) {
cannoncycle--;
}
if (cannoncycle <= 0) {
_root.targetx = _root._xmouse;
_root.targety = _root._ymouse;
delta_y = _root.bullet._y - _root.targety;
delta_x = _root.bullet._x - _root.targetx;
cannoncycle = _root.cannonreloadtime;
_root.bullet._y = _root.station._y;
_root.bullet._x = _root.station._x;
_root.bullet._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
duplicateMovieClip (_root.bullet, "bullet" + _root.bulletnumber, _root.bulletnumber + 20);
_root.cash = _root.cash - _root.bulletcost;
_root.bulletnumber++;
if (_root.bulletnumber >= 20) {
_root.bulletnumber = 3;
}
}
}
onClipEvent (mouseUp) {
cannoncycle = _root.cannonreloadtime;
cannonfire = false;
cannoncycleon = false;
}
onClipEvent (mouseMove) {
_root.targetx = _root._xmouse;
_root.targety = _root._ymouse;
}
Instance of Symbol 313 MovieClip "maintorp" in Frame 7
onClipEvent (load) {
fuse = _root.station.rocketfuse;
_root.maintorp.maintorp = true;
_root.station.torpout++;
fuel = _root.station.rocketfuel;
_root.maintorp._visible = false;
delta_y = _y - _root.targety;
delta_x = _x - _root.targetx;
if (maintorp != true) {
id = _root.station.torpnumber;
}
torpedotargetRotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
xspeed = _root.station.torpspeed * Math.sin(torpedotargetRotation * (Math.PI/180));
yspeed = _root.station.torpspeed * Math.cos(torpedotargetRotation * (Math.PI/180));
heading = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
_rotation = (heading - 180);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
smokeemit++;
if (((maintorp != true) and (smokeemit >= 1)) and (_root.smokefx == true)) {
smokeemit = 0;
_root.smoke._x = _x;
_root.smoke._y = _y;
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
fuel--;
if (((fuel <= 0) and (maintorp != true)) and (_currentframe == 1)) {
fuse = 0;
}
}
onClipEvent (enterFrame) {
if ((((_x < 0) or (_x > 500)) or (_y > 300)) or (_y < 0)) {
if (_currentframe < 2) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (2);
}
}
if (_currentframe < 2) {
_x = (_x + xspeed);
_y = (_y - yspeed);
}
}
onClipEvent (enterFrame) {
if ((fuse <= 0) and (_currentframe < 2)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (2);
}
while (hitscan <= (_root.enemyoutmax + 1)) {
if (this.hittest("_root.enemy" + hitscan)) {
fuse--;
tellTarget ("_root.enemy" + hitscan) {
if (shield != true) {
life = life - _root.station.torpdamage;
}
};
}
hitscan++;
}
hitscan = -1;
}
Instance of Symbol 315 MovieClip in Frame 7
onClipEvent (load) {
_visible = false;
spawntime = 200;
spawnrate = Math.round(4 + (_root.level / 2));
if (spawnrate > 50) {
spawnrate = 50;
}
_root.enemynumber = 0;
_root.enemyoutmax = 5 + Math.round(_root.level / 2);
if (_root.enemyoutmax > 10) {
_root.enemyoutmax = 10;
}
}
onClipEvent (enterFrame) {
spawn = spawn + random(spawnrate);
if (((_root.enemyout < _root.enemyoutmax) and (spawn >= spawntime)) and (_root.totalenemy < _root.killgoal)) {
spawnrate = Math.round(4 + (_root.level / 2));
if (spawnrate > 8) {
spawnrate = 8;
}
_root.enemynumber++;
scan = 0;
spawn = 0;
while (scan < 2) {
if (_root.enemy1.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy2.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy3.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy4.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy5.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy6.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy7.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy8.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy9.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy10.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy11.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy12.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy13.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy14.id == _root.enemynumber) {
_root.enemynumber++;
}
if (_root.enemy15.id == _root.enemynumber) {
_root.enemynumber++;
}
scan++;
if (_root.enemynumber > _root.enemyoutmax) {
_root.enemynumber = 1;
}
}
shiptype = random((_root.level * 50) + 200);
if (shiptype > 550) {
shiptype = 550;
}
if ((shiptype > 0) and (shiptype <= 100)) {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 3;
_root.enemyout++;
} else if ((shiptype > 100) and (shiptype <= 300)) {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 1;
_root.enemyout++;
_root.totalenemy++;
} else if ((shiptype > 300) and (shiptype <= 400)) {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 2;
_root.enemyout = _root.enemyout + 2;
_root.totalenemy = _root.totalenemy + 2;
} else if ((shiptype > 400) and (shiptype <= 500)) {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 4;
_root.enemyout = _root.enemyout + 2;
_root.totalenemy = _root.totalenemy + 2;
} else if ((shiptype > 500) and (shiptype <= 550)) {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 5;
_root.enemyout = _root.enemyout + 4;
_root.totalenemy = _root.totalenemy + 4;
} else {
duplicateMovieClip (_root.enemy, "enemy" + _root.enemynumber, _root.enemynumber + 200);
_root.enemytype = 1;
_root.enemyout++;
_root.totalenemy++;
}
}
}
Instance of Symbol 318 MovieClip "smoke" in Frame 7
onClipEvent (load) {
_root.smoke.main = true;
_root.smoke._visible = false;
_rotation = random(360);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
}
Instance of Symbol 322 MovieClip "redlaser" in Frame 7
onClipEvent (load) {
_alpha = 100;
inaccuracy = 150 - (_root.level * 10);
if (inaccuracy < 100) {
inaccuracy = 100;
}
range = 100;
_root.redlaseroutmax = 30;
_root.redlaser.main = true;
_root.redlaser._visible = false;
delta_y = _y - _root.station._y;
delta_x = _x - _root.station._x;
delta_y = delta_y + (random(inaccuracy) - (inaccuracy / 2));
delta_x = delta_x + (random(inaccuracy) - (inaccuracy / 2));
targetRotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
xspeed = 8 * Math.sin(targetRotation * (Math.PI/180));
yspeed = 8 * Math.cos(targetRotation * (Math.PI/180));
heading = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
_rotation = (heading - 180);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
range--;
if ((_currentframe < 2) and (main != true)) {
if (range <= 0) {
removeMovieClip(this);
}
_x = (_x + xspeed);
_y = (_y - yspeed);
if (this.hittest(_root.platforma)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
_alpha = 50;
_root.platformalife--;
gotoAndPlay (2);
}
if (this.hittest(_root.platformb)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
_alpha = 50;
_root.platformblife--;
gotoAndPlay (2);
}
if (this.hittest(_root.station)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
_alpha = 50;
_root.life--;
gotoAndPlay (2);
}
}
}
Instance of Symbol 324 MovieClip in Frame 7
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.alienboarded > (_root.lifemax - _root.life)) {
_root.alienboarded = _root.lifemax - _root.life;
}
if (_root.life <= 0) {
with (_root) {
gotoAndStop(10);
}
}
if ((_root.kills >= _root.killgoal) and (_root.levelclear._currentframe < 2)) {
with (_root.levelclear) {
_root.cash = _root.cash + (_root.level * 100);
_visible = true;
gotoAndPlay(2);
}
}
}
Instance of Symbol 326 MovieClip in Frame 7
onClipEvent (enterFrame) {
if (_root.debugmode == true) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 441 MovieClip "enemy" in Frame 7
onClipEvent (load) {
_y = (random(210) + 40);
gotoAndStop(_root.enemytype);
unique = _root.totalenemy;
_x = -30;
_root.enemy._x = -300;
_root.enemy.main = true;
_root.enemy._visible = false;
if (main != true) {
id = _root.enemynumber;
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
}
Instance of Symbol 455 MovieClip in Frame 7
onClipEvent (enterFrame) {
if (_root.debugmode == true) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 46 MovieClip "bar" in Frame 7
onClipEvent (load) {
if (_root.cheatcode == 1234) {
debug.enabled = true;
} else {
debug.enabled = false;
this.swapDepths(10000);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != 7) {
removeMovieClip(this);
}
}
Instance of Symbol 457 MovieClip in Frame 7
onClipEvent (enterFrame) {
if ((_root.life <= 30) and (_root.levelclear._currentframe < 2)) {
_visible = true;
play();
} else {
_visible = false;
}
}
Instance of Symbol 463 MovieClip "levelclear" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 470 MovieClip "boardwarning" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 472 MovieClip "bullet1" in Frame 7
onClipEvent (load) {
_root.bullet1.main = true;
_root.bullet1._visible = false;
if (main != true) {
if (_root.silent != true) {
_root.autocannonsound.start();
}
_rotation = (_rotation + (random(_root.cannoninaccuracy) - (_root.cannoninaccuracy / 2)));
xspeed = _root.bulletspeed * Math.sin(_rotation * (Math.PI/180));
yspeed = _root.bulletspeed * Math.cos(_rotation * (Math.PI/180));
}
}
onClipEvent (enterFrame) {
if ((main != true) and (_currentframe == 1)) {
_x = (_x + xspeed);
_y = (_y - yspeed);
if ((((_x < 0) or (_x > 500)) or (_y < 0)) or (_y > 300)) {
removeMovieClip(this);
}
while (hitscan <= (_root.enemyoutmax + 1)) {
if (this.hittest("_root.enemy" + hitscan)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (2);
tellTarget ("_root.enemy" + hitscan) {
life = life - _root.cannondamage;
};
}
hitscan++;
}
hitscan = -1;
}
}
Instance of Symbol 497 MovieClip "platforma" in Frame 7
onClipEvent (load) {
if (_root.platforma > 1) {
shootrange = 400;
range = 500;
_visible = true;
} else {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (((_visible == true) and (_root.platformaammo > 0)) and (_currentframe < 20)) {
if (_root.platformalife <= 0) {
gotoAndPlay (20);
_root.platforma = 0;
}
shortestrange = 400;
scan = -1;
while (scan < (_root.enemyoutmax + 1)) {
scan++;
if (getProperty("_root.enemy" + scan, _alpha) == 100) {
rangex = _x - getProperty("_root.enemy" + scan, _x);
rangey = _y - getProperty("_root.enemy" + scan, _y);
range = Math.sqrt((rangex * rangex) + (rangey * rangey));
if (range < shortestrange) {
shortestrange = range;
target = scan;
}
}
}
if (getProperty("_root.enemy" + target, _alpha) == 100) {
select = true;
} else {
select = false;
}
targetx = getProperty("_root.enemy" + target, _x);
targety = getProperty("_root.enemy" + target, _y);
delta_y = _y - targety;
delta_x = _x - targetx;
_rotation = ((-Math.atan2(delta_x, delta_y)) / (Math.PI/180));
firetime++;
if ((((firetime > (_root.cannonreloadtime * 2)) and (shortestrange < shootrange)) and (select == true)) and (_root.platformaammo > 0)) {
_root.platformaammo--;
firetime = 0;
_root.bullet1._y = _y;
_root.bullet1._x = _x;
_root.bullet1._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
duplicateMovieClip (_root.bullet1, "bullet" + _root.bulletnumber, _root.bulletnumber + 20);
_root.bulletnumber++;
if (_root.bulletnumber >= 20) {
_root.bulletnumber = 3;
}
}
}
}
Instance of Symbol 472 MovieClip "bullet" in Frame 7
onClipEvent (load) {
_root.bullet.main = true;
_root.bullet._visible = false;
if (main != true) {
if (_root.silent != true) {
_root.autocannonsound.start();
}
_rotation = (_rotation + (random(_root.cannoninaccuracy) - (_root.cannoninaccuracy / 2)));
xspeed = _root.bulletspeed * Math.sin(_rotation * (Math.PI/180));
yspeed = _root.bulletspeed * Math.cos(_rotation * (Math.PI/180));
heading = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
}
}
onClipEvent (enterFrame) {
if ((main != true) and (_currentframe == 1)) {
_x = (_x + xspeed);
_y = (_y - yspeed);
if ((((_x < 0) or (_x > 500)) or (_y < 0)) or (_y > 300)) {
removeMovieClip(this);
}
while (hitscan <= (_root.enemyoutmax + 1)) {
if (this.hittest("_root.enemy" + hitscan)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (2);
tellTarget ("_root.enemy" + hitscan) {
life = life - _root.cannondamage;
};
}
hitscan++;
}
hitscan = -1;
}
}
Instance of Symbol 472 MovieClip "bullet2" in Frame 7
onClipEvent (load) {
_root.bullet2.main = true;
_root.bullet2._visible = false;
if (main != true) {
if (_root.silent != true) {
_root.autocannonsound.start();
}
_rotation = (_rotation + (random(_root.cannoninaccuracy) - (_root.cannoninaccuracy / 2)));
xspeed = _root.bulletspeed * Math.sin(_rotation * (Math.PI/180));
yspeed = _root.bulletspeed * Math.cos(_rotation * (Math.PI/180));
heading = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
}
}
onClipEvent (enterFrame) {
if ((main != true) and (_currentframe == 1)) {
_x = (_x + xspeed);
_y = (_y - yspeed);
if ((((_x < 0) or (_x > 500)) or (_y < 0)) or (_y > 300)) {
removeMovieClip(this);
}
while (hitscan <= (_root.enemyoutmax + 1)) {
if (this.hittest("_root.enemy" + hitscan)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (2);
tellTarget ("_root.enemy" + hitscan) {
life = life - _root.cannondamage;
};
}
hitscan++;
}
hitscan = -1;
}
}
Instance of Symbol 497 MovieClip "platforma" in Frame 7
onClipEvent (load) {
if (_root.platformb > 1) {
shootrange = 400;
range = 500;
_visible = true;
} else {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (((_visible == true) and (_root.platformbammo > 0)) and (_currentframe < 20)) {
if (_root.platformblife <= 0) {
gotoAndPlay (20);
_root.platformb = 0;
}
shortestrange = 400;
scan = -1;
while (scan < (_root.enemyoutmax + 1)) {
scan++;
if (getProperty("_root.enemy" + scan, _alpha) == 100) {
rangex = _x - getProperty("_root.enemy" + scan, _x);
rangey = _y - getProperty("_root.enemy" + scan, _y);
range = Math.sqrt((rangex * rangex) + (rangey * rangey));
if (range < shortestrange) {
shortestrange = range;
target = scan;
}
}
}
if (getProperty("_root.enemy" + target, _alpha) == 100) {
select = true;
} else {
select = false;
}
targetx = getProperty("_root.enemy" + target, _x);
targety = getProperty("_root.enemy" + target, _y);
delta_y = _y - targety;
delta_x = _x - targetx;
_rotation = ((-Math.atan2(delta_x, delta_y)) / (Math.PI/180));
firetime++;
if ((((firetime > (_root.cannonreloadtime * 2)) and (shortestrange < shootrange)) and (select == true)) and (_root.platformbammo > 0)) {
firetime = 0;
_root.platformbammo--;
_root.bullet2._y = _y;
_root.bullet2._x = _x;
_root.bullet2._rotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
duplicateMovieClip (_root.bullet2, "bullet" + _root.bulletnumber, _root.bulletnumber + 20);
_root.bulletnumber++;
if (_root.bulletnumber >= 20) {
_root.bulletnumber = 3;
}
}
}
}
Frame 9
_quality = "HIGH";
_root.humanshots = 0;
_root.alienshots = 0;
stop();
Instance of Symbol 512 MovieClip "human" in Frame 9
onClipEvent (load) {
firerate = random(_root.riflelevel) + 1;
if (main != true) {
id = _root.humannumber;
}
_y = (_root.humanplacing - random(_root.distribution));
_root.human._visible = false;
_root.human.main = true;
_x = (random(200) + 300);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 9) {
removeMovieClip(this);
}
if (((main != true) and (_root.pause == false)) and (_root.alienboarded > 0)) {
fire = fire + firerate;
if ((fire >= _root.riflereloadtime) and (_currentframe == 1)) {
_root.humanshots++;
firerate = random(_root.riflelevel) + 1;
if (random(_root.rifleaccuracy + 1) > 0) {
_root.alienboarded = _root.alienboarded - _root.rifledamage;
}
gotoAndPlay (2);
fire = 0;
}
if ((_root.life < (id * 10)) and (_currentframe < 10)) {
gotoAndPlay (10);
}
}
}
Instance of Symbol 514 MovieClip in Frame 9
onClipEvent (load) {
_root.start.enabled = false;
_root.distribution = 175 / (Math.round(_root.life / 10) + 1);
_root.humanplacing = 75;
_root.humannumber = Math.round(_root.life / 10);
if (_root.humannumber < 1) {
_root.humannumber = 1;
}
_root.humanout = 0;
_root.aliendistribution = 175 / Math.round((_root.alienboarded / 10) + 1);
_root.alienplacing = 75;
_root.aliennumber = Math.round(_root.alienboarded / 10);
if (_root.aliennumber < 1) {
_root.aliennumber = 1;
}
_root.alienout = 0;
}
onClipEvent (enterFrame) {
if (_root.humannumber > 0) {
_root.pause = true;
_root.humanplacing = _root.humanplacing + _root.distribution;
duplicateMovieClip ("_root.human", "person" + _root.personnumber, _root.personnumber);
_root.humanout++;
_root.personnumber++;
_root.humannumber--;
}
if (_root.aliennumber > 0) {
_root.pause = true;
_root.alienplacing = _root.alienplacing + _root.aliendistribution;
duplicateMovieClip ("_root.alien", "person" + _root.personnumber, _root.personnumber);
_root.alienout++;
_root.personnumber++;
_root.aliennumber--;
}
if ((_root.aliennumber <= 0) and (_root.humannumber <= 0)) {
_root.start.enabled = true;
_root.placer._visible = false;
}
}
Instance of Symbol 324 MovieClip in Frame 9
onClipEvent (load) {
origalien = _root.alienboarded;
orighuman = _root.life;
_visible = false;
}
onClipEvent (enterFrame) {
_root.aliencasualties = origalien - _root.alienboarded;
_root.humancasualties = orighuman - _root.life;
if (_root.life <= 0) {
with (_root) {
gotoAndStop(10);
}
}
if ((_root.alienboarded <= 0) and (_root.levelclear1._currentframe < 2)) {
with (_root.levelclear1) {
_visible = true;
gotoAndPlay(2);
}
}
}
Instance of Symbol 463 MovieClip "levelclear" in Frame 9
onClipEvent (load) {
_visible = false;
_root.levelclear.main = true;
if (main == true) {
duplicateMovieClip ("_root.levelclear", "levelclear1", 4000);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != 9) {
removeMovieClip(this);
}
}
Instance of Symbol 534 MovieClip "alien" in Frame 9
onClipEvent (load) {
_root.alienrifleaccuracy = Math.round(_root.level / 2) + 1;
firerate = (random(_root.level + 1) / 10) + 1;
if (main != true) {
id = _root.aliennumber;
}
_y = (_root.alienplacing - random(_root.aliendistribution));
_root.alien._visible = false;
_root.alien.main = true;
_x = random(200);
}
onClipEvent (enterFrame) {
if (_root._currentframe != 9) {
removeMovieClip(this);
}
if (((main != true) and (_root.pause == false)) and (_root.life > 0)) {
fire = fire + firerate;
if ((fire >= 100) and (_currentframe == 1)) {
_root.alienshots++;
firerate = (random(_root.level + 1) / 10) + 1;
if (random(_root.alienrifleaccuracy + 1) > 0) {
_root.life = _root.life - _root.alienrifledamage;
}
gotoAndPlay (2);
fire = 0;
}
if ((_root.alienboarded <= (id * 10)) and (_currentframe < 10)) {
gotoAndPlay (10);
}
}
}
Frame 10
_quality = "HIGH";
Symbol 30 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.cheatcode == 4321) {
_root.cash = 100000 /* 0x0186A0 */;
if (_root.levelcheat > 0) {
_root.level = _root.levelcheat;
}
}
nextFrame();
}
Symbol 45 Button
on (press) {
duplicateMovieClip (_root.options, "_root.options1", 6000);
_root.optionlock = true;
if (_root.silent != true) {
_root.blipsound.start();
}
}
Symbol 51 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = true;
with (_root.options) {
gotoAndStop(1);
}
}
Symbol 55 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = true;
with (_root.options) {
gotoAndStop(2);
}
}
Symbol 59 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = true;
with (_root.options) {
gotoAndStop(3);
}
}
Symbol 66 MovieClip Frame 1
stop();
Symbol 73 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_visible = false;
_root.optionlock = false;
removeMovieClip(this);
}
Symbol 78 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_visible = false;
_root.optionlock = false;
removeMovieClip(this);
with (_root) {
gotoAndPlay(1);
}
}
Symbol 95 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
prevFrame();
}
Symbol 96 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
nextFrame();
}
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 3
stop();
Symbol 111 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = false;
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Instance of Symbol 66 MovieClip in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.smokefx == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.smokefx == true) {
_root.smokefx = false;
} else {
_root.smokefx = true;
}
}
Instance of Symbol 66 MovieClip in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nebulafx == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.nebulafx == true) {
_root.nebulafx = false;
} else {
_root.nebulafx = true;
}
}
Instance of Symbol 66 MovieClip in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.silent != true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.silent == true) {
_root.silent = false;
} else {
_root.silent = true;
}
}
Symbol 135 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = false;
nextFrame();
}
Symbol 148 Button
on (press) {
if (_root.customtorpspeed < 10) {
_root.customtorpspeed++;
}
}
Symbol 149 Button
on (press) {
if (_root.customtorpspeed > 5) {
_root.customtorpspeed--;
}
}
Symbol 151 Button
on (press) {
if (_root.customtorpdamage < 10) {
_root.customtorpdamage++;
}
}
Symbol 152 Button
on (press) {
if (_root.customtorpdamage > 2) {
_root.customtorpdamage--;
}
}
Symbol 158 Button
on (press) {
if (_root.customtorpfuel < 10) {
_root.customtorpfuel++;
}
}
Symbol 159 Button
on (press) {
if (_root.customtorpfuel > 2) {
_root.customtorpfuel--;
}
}
Symbol 162 Button
on (press) {
if (_root.customtorpfuse < 3) {
_root.customtorpfuse++;
}
}
Symbol 163 Button
on (press) {
if (_root.customtorpfuse > 1) {
_root.customtorpfuse--;
}
}
Symbol 166 MovieClip Frame 1
_root.rocketcost = 2;
Instance of Symbol 142 MovieClip in Symbol 166 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
with (_parent) {
gotoAndStop(_root.rockettype);
}
}
Symbol 166 MovieClip Frame 2
_root.rocketcost = 3;
Symbol 166 MovieClip Frame 3
_root.rocketcost = 3;
Instance of Symbol 155 MovieClip in Symbol 166 MovieClip Frame 4
onClipEvent (enterFrame) {
_root.rocketcost = Math.round(((_root.customtorpfuel + _root.customtorpspeed) + _root.customtorpdamage) / 3) * 2;
}
Symbol 168 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.rockettype > 1) {
_root.rockettype--;
}
}
Symbol 169 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if (_root.rockettype < 4) {
_root.rockettype++;
}
}
Symbol 172 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.options._visible = true;
}
Symbol 180 MovieClip Frame 1
stop();
Symbol 190 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.cash >= _root.launcherupcost) and (launcher._currentframe < 7)) {
_root.torpoutmax++;
_root.launchertype++;
_root.cash = _root.cash - _root.launcherupcost;
_root.launcherupcost = _root.launcherupcost + 200;
}
with (launcher) {
gotoAndStop(_root.launchertype);
}
}
Symbol 195 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.cash >= _root.armorupcost) and (_root.lifemax < 500)) {
_root.lifemax = _root.lifemax + 50;
_root.life = _root.life + 50;
_root.armortype++;
_root.cash = _root.cash - _root.armorupcost;
_root.armorupcost = _root.armorupcost + 200;
}
with (armorpic) {
gotoAndStop(_root.armortype);
}
}
Symbol 206 MovieClip Frame 1
stop();
Symbol 211 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.life < _root.lifemax) and (_root.cash >= _root.repaircost)) {
_root.cash = _root.cash - 50;
_root.life = _root.life + 10;
}
if (_root.life > _root.lifemax) {
_root.life = _root.lifemax;
}
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 222 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.cash >= _root.cannonupcost) and (cannon._currentframe < 4)) {
_root.cannonreloadtime = _root.cannonreloadtime / 2;
_root.cannontype++;
_root.cash = _root.cash - _root.cannonupcost;
_root.cannonupcost = _root.cannonupcost + 300;
}
with (cannon) {
gotoAndStop(_root.cannontype);
}
}
Symbol 228 Button
on (press) {
prevFrame();
}
Symbol 229 Button
on (press) {
nextFrame();
}
Symbol 239 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.cash >= _root.platformcost) and (_root.platformb < 2)) {
_root.platformbammo = 200;
_root.platformb = 2;
_root.platformblife = _root.platformblifemax;
_root.cash = _root.cash - _root.platformcost;
}
}
Symbol 241 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
if ((_root.cash >= _root.platformcost) and (_root.platforma < 2)) {
_root.platforma = 2;
_root.platformaammo = 200;
_root.platformalife = _root.platformalifemax;
_root.cash = _root.cash - _root.platformcost;
}
}
Symbol 248 Button
on (press) {
if (((_root.cash >= (_root.platformbammomax - _root.platformbammo)) and (_root.platformbammo != _root.platformbammomax)) and (_root.platformb > 1)) {
_root.cash = _root.cash - (_root.platformbammomax - _root.platformbammo);
_root.platformbammo = _root.platformbammomax;
}
}
Symbol 249 Button
on (press) {
if (((_root.cash >= (_root.platformaammomax - _root.platformaammo)) and (_root.platformaammo != platformaammomax)) and (_root.platforma > 1)) {
_root.cash = _root.cash - (_root.platformaammomax - _root.platformaammo);
_root.platformaammo = _root.platformaammomax;
}
}
Symbol 255 MovieClip Frame 1
stop();
Instance of Symbol 180 MovieClip "launcher" in Symbol 255 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.launchertype);
}
Instance of Symbol 215 MovieClip in Symbol 255 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.damage = _root.lifemax - _root.life;
}
Instance of Symbol 221 MovieClip "cannon" in Symbol 255 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.cannontype);
}
Instance of Symbol 243 MovieClip in Symbol 255 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.platforma > 1) {
_visible = true;
_parent.reloadtexta.text = _root.platformaammomax - _root.platformaammo;
}
}
Instance of Symbol 243 MovieClip in Symbol 255 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.platformb > 1) {
_visible = true;
_parent.reloadtextb.text = _root.platformbammomax - _root.platformbammo;
}
}
Symbol 304 MovieClip Frame 1
_root.station.torpspeed = 6;
_root.station.torpdamage = 3;
_root.station.rocketfuse = 1;
_root.station.rocketfuel = 80;
stop();
Instance of Symbol 142 MovieClip in Symbol 304 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
with (_parent) {
gotoAndStop(_root.rockettype);
}
}
Symbol 304 MovieClip Frame 2
_root.station.torpspeed = 4;
_root.station.torpdamage = 5;
_root.station.rocketfuse = 2;
_root.station.rocketfuel = 70;
Symbol 304 MovieClip Frame 3
_root.station.torpspeed = 8;
_root.station.torpdamage = 2;
_root.station.rocketfuse = 3;
_root.station.rocketfuel = 70;
Symbol 304 MovieClip Frame 4
_root.station.torpspeed = _root.customtorpspeed;
_root.station.torpdamage = _root.customtorpdamage;
_root.station.rocketfuse = _root.customtorpfuse;
_root.station.rocketfuel = _root.customtorpfuel * 10;
Symbol 313 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 13
_root.station.torpout--;
removeMovieClip(this);
Symbol 318 MovieClip Frame 20
removeMovieClip(this);
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 6
removeMovieClip(this);
stop();
Symbol 331 MovieClip Frame 14
stop();
Symbol 346 MovieClip Frame 1
stop();
Instance of Symbol 331 MovieClip "teleporter" in Symbol 346 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 346 MovieClip Frame 32
_root.cash = _root.cash + (random(20) + 20);
_root.score = _root.score + 20;
_root.enemyout--;
_root.kills++;
removeMovieClip(_parent);
Symbol 371 MovieClip Frame 1
stop();
Instance of Symbol 331 MovieClip "teleporter" in Symbol 371 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 371 MovieClip Frame 45
_root.cash = _root.cash + (random(40) + 40);
_root.score = _root.score + 40;
_root.enemyout = _root.enemyout - 2;
_root.kills = _root.kills + 2;
removeMovieClip(_parent);
Symbol 397 MovieClip Frame 19
gotoAndPlay (1);
Symbol 397 MovieClip Frame 32
_root.enemyout = _root.enemyout - 1;
_root.cash = _root.cash + (random(10) + 10);
removeMovieClip(_parent);
Symbol 409 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 35
_root.cash = _root.cash + (random(60) + 60);
_root.score = _root.score + 60;
_root.enemyout = _root.enemyout - 2;
_root.kills = _root.kills + 2;
removeMovieClip(_parent);
Symbol 440 MovieClip Frame 1
stop();
Instance of Symbol 331 MovieClip "teleporter" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 440 MovieClip Frame 110
_root.cash = _root.cash + (random(60) + 60);
_root.score = _root.score + 60;
_root.enemyout = _root.enemyout - 4;
_root.kills = _root.kills + 4;
removeMovieClip(_parent);
Symbol 441 MovieClip Frame 1
stop();
Instance of Symbol 346 MovieClip in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
crew = 5;
teleportarea = 300;
teleportrate = Math.round(_root.level / 10) + 1;
destinationy = random(225) + 25;
destinationx = teleportarea + random(100);
firingrate = 1 + (_root.level / 5);
if (firingrate > 2) {
firingrate = 2;
}
firerange = 300 - (_root.level * 10);
if (firerange < 100) {
firerange = 100;
}
speed = 1 + ((random(_root.level) + 1) / 10);
if (speed > 2) {
speed = 2;
}
yspeed = (speed / 5) + (random(10) / 10);
_parent.life = 20;
}
onClipEvent (enterFrame) {
_root.enemy._x = -30;
if (_parent._x > firerange) {
lasercharge = lasercharge + firingrate;
if ((lasercharge >= 50) and (_currentframe < 20)) {
_root.redlaser._x = _parent._x;
_root.redlaser._y = _parent._y;
lasercharge = 0;
duplicateMovieClip (_root.redlaser, "redlaser" + _root.redlasernumber, _root.redlasernumber + 300);
if (_root.silent != true) {
_root.lasersound.start();
}
_root.redlasernumber++;
if (_root.redlasernumber >= _root.redlaseroutmax) {
_root.redlasernumber = 0;
}
}
}
if (_parent._x >= teleportarea) {
teleportcharge = teleportcharge + teleportrate;
if ((((teleportcharge > (_root.station._x - _parent._x)) and (_currentframe < 20)) and (_root.life < _root.lifemax)) and (_parent.life > crew)) {
if (_root.silent != true) {
_root.teleportsound.start();
}
teleportcharge = 0;
awayteam = _parent.life - crew;
_root.alienboarded = _root.alienboarded + awayteam;
_parent.life = _parent.life - awayteam;
if (_root.boardwarning._currentframe == 1) {
_root.boardwarning._visible = true;
with (_root.boardwarning) {
gotoAndPlay(2);
}
}
with (teleporter) {
if (_currentframe != 1) {
_visible = true;
gotoAndPlay(1);
}
}
}
if (_parent._x >= destinationx) {
booster._visible = false;
}
}
if ((_parent._x < destinationx) and (_currentframe < 20)) {
_parent._x = _parent._x + speed;
if (_parent._y < destinationy) {
_parent._y = _parent._y + yspeed;
if (_parent._y >= destinationy) {
destinationy = random(210) + 40;
}
}
if (_parent._y > destinationy) {
_parent._y = _parent._y - yspeed;
if (_parent._y <= destinationy) {
destinationy = random(210) + 40;
}
}
}
if ((_parent.life <= 0) and (main != true)) {
if (_currentframe < 20) {
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (20);
}
if (_root.smokefx == true) {
_root.smoke._x = _parent._x + (random(40) - 20);
_root.smoke._y = _parent._y + (random(40) - 20);
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
}
}
Instance of Symbol 371 MovieClip "enemymother" in Symbol 441 MovieClip Frame 2
onClipEvent (load) {
crew = 10;
teleportarea = 200;
teleportrate = Math.round(_root.level / 10) + 1;
destinationy = random(225) + 25;
destinationx = teleportarea + random(100);
firingrate = 2 + (_root.level / 5);
if (firingrate > 3) {
firingrate = 3;
}
firerange = 200 - (_root.level * 10);
if (firerange < 100) {
firerange = 100;
}
speed = 0.2 + ((random(_root.level) + 1) / 10);
if (speed > 1) {
speed = 1;
}
yspeed = speed / 5;
_parent.life = 80;
}
onClipEvent (enterFrame) {
_root.enemy._x = -30;
if (_parent._x > firerange) {
lasercharge = lasercharge + firingrate;
if ((lasercharge >= 50) and (_currentframe < 20)) {
_root.redlaser._x = _parent._x;
_root.redlaser._y = _parent._y;
lasercharge = 0;
duplicateMovieClip (_root.redlaser, "redlaser" + _root.redlasernumber, _root.redlasernumber + 300);
if (_root.silent != true) {
_root.lasersound.start();
}
_root.redlasernumber++;
if (_root.redlasernumber >= _root.redlaseroutmax) {
_root.redlasernumber = 0;
}
}
}
if (_parent._x >= teleportarea) {
teleportcharge = teleportcharge + teleportrate;
if ((((teleportcharge > (_root.station._x - _parent._x)) and (_currentframe < 20)) and (_root.life < _root.lifemax)) and (_parent.life > crew)) {
teleportcharge = 0;
awayteam = _parent.life - crew;
_root.alienboarded = _root.alienboarded + awayteam;
_parent.life = _parent.life - awayteam;
if (_root.silent != true) {
_root.teleportsound.start();
}
if (_root.boardwarning._currentframe == 1) {
_root.boardwarning._visible = true;
with (_root.boardwarning) {
gotoAndPlay(2);
}
}
with (teleporter) {
if (_currentframe != 1) {
_visible = true;
gotoAndPlay(1);
}
}
}
if (_parent._x >= destinationx) {
booster._visible = false;
booster2._visible = false;
booster3._visible = false;
}
}
if ((_parent._x < destinationx) and (_currentframe < 2)) {
_parent._x = _parent._x + speed;
if (_parent._y < destinationy) {
_parent._y = _parent._y + yspeed;
if (_parent._y >= destinationy) {
destinationy = random(210) + 40;
}
}
if (_parent._y > destinationy) {
_parent._y = _parent._y - yspeed;
if (_parent._y <= destinationy) {
destinationy = random(210) + 40;
}
}
}
if ((_parent.life <= 0) and (main != true)) {
if (_currentframe < 2) {
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (2);
}
if (_root.smokefx == true) {
_root.smoke._x = _parent._x + (random(40) - 20);
_root.smoke._y = _parent._y + (random(40) - 20);
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
}
hitscan = -1;
}
Instance of Symbol 397 MovieClip "meteor" in Symbol 441 MovieClip Frame 3
onClipEvent (load) {
if (_parent.main != true) {
origscalex = _xscale;
origscaley = _yscale;
_xscale = (origscalex * ((random(50) + 50) / 100));
_yscale = _xscale;
}
destinationy = random(225) + 25;
destinationx = 300 + random(100);
speed = 3 + ((random(_root.level) + 1) / 10);
if (speed > 5) {
speed = 5;
}
damage = Math.round((speed * _width) / 10);
yspeed = (speed / 5) + (random(10) / 10);
_parent.life = 10;
}
onClipEvent (enterFrame) {
if (_currentframe < 20) {
_parent._x = _parent._x + speed;
}
if (this.hittest(_root.platforma)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
_alpha = 50;
_root.platformalife--;
gotoAndPlay (2);
}
if (this.hittest(_root.platformb)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
_alpha = 50;
_root.platformblife--;
gotoAndPlay (2);
}
if (this.hittest(_root.station) and (_currentframe < 20)) {
_root.life = _root.life - damage;
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (20);
}
if ((_parent._x > 500) and (_currentframe < 20)) {
if (_root.silent != true) {
_root.lowexplodesound.start();
}
gotoAndPlay (20);
}
_root.enemy._x = -30;
if (_root._currentframe != 7) {
removeMovieClip(this);
}
if ((_parent.life <= 0) and (main != true)) {
if (_currentframe < 20) {
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (20);
}
if (_root.smokefx == true) {
_root.smoke._x = _parent._x + (random(20) - 10);
_root.smoke._y = _parent._y + (random(20) - 10);
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
}
hitscan = -1;
}
Instance of Symbol 409 MovieClip in Symbol 441 MovieClip Frame 4
onClipEvent (load) {
destinationy = _root.station._y;
destinationx = _root.station._x;
speed = 3 + ((random(_root.level) + 1) / 10);
delta_y = _parent._y - destinationy;
delta_x = _parent._x - destinationx;
if (speed > 6) {
speed = 6;
}
targetRotation = (-Math.atan2(delta_x, delta_y)) / (Math.PI/180);
xspeed = speed * Math.sin(targetRotation * (Math.PI/180));
yspeed = speed * Math.cos(targetRotation * (Math.PI/180));
_parent.life = 50;
}
onClipEvent (enterFrame) {
_root.enemy._x = -30;
if (_currentframe < 20) {
_parent._y = _parent._y - yspeed;
_parent._x = _parent._x + xspeed;
}
if (this.hittest(_root.station) and (_currentframe < 20)) {
gotoAndPlay (20);
_root.life = _root.life - 20;
_root.alienboarded = _root.alienboarded + _parent.life;
if (_root.silent != true) {
_root.explodesound.start();
}
if (_root.silent != true) {
_root.teleportsound.start();
}
if (_root.boardwarning._currentframe == 1) {
_root.boardwarning._visible = true;
with (_root.boardwarning) {
gotoAndPlay(2);
}
}
booster._visible = false;
}
if ((_parent.life <= 0) and (main != true)) {
if (_currentframe < 20) {
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (20);
}
if (_root.smokefx == true) {
_root.smoke._x = _parent._x + (random(40) - 20);
_root.smoke._y = _parent._y + (random(40) - 20);
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
}
hitscan = -1;
}
Instance of Symbol 440 MovieClip in Symbol 441 MovieClip Frame 5
onClipEvent (load) {
crew = 20;
teleportarea = 200;
teleportrate = Math.round(_root.level / 10) + 1;
destinationy = random(225) + 25;
destinationx = teleportarea + random(100);
firingrate = 3 + (_root.level / 5);
if (firingrate > 5) {
firingrate = 5;
}
firerange = 200 - (_root.level * 10);
if (firerange < 100) {
firerange = 100;
}
speed = 0.1 + ((random(_root.level) + 1) / 10);
if (speed > 0.8) {
speed = 0.8;
}
yspeed = speed / 5;
_parent.life = 160;
}
onClipEvent (enterFrame) {
_root.enemy._x = -30;
if (_parent._x > firerange) {
lasercharge = lasercharge + firingrate;
if ((lasercharge >= 50) and (_currentframe < 20)) {
_root.redlaser._x = _parent._x;
_root.redlaser._y = _parent._y;
lasercharge = 0;
duplicateMovieClip (_root.redlaser, "redlaser" + _root.redlasernumber, _root.redlasernumber + 300);
if (_root.silent != true) {
_root.lasersound.start();
}
_root.redlasernumber++;
if (_root.redlasernumber >= _root.redlaseroutmax) {
_root.redlasernumber = 0;
}
}
}
if (_parent._x >= teleportarea) {
teleportcharge = teleportcharge + teleportrate;
if ((((teleportcharge > (_root.station._x - _parent._x)) and (_currentframe < 20)) and (_root.life < _root.lifemax)) and (_parent.life > crew)) {
teleportcharge = 0;
awayteam = _parent.life - crew;
_root.alienboarded = _root.alienboarded + awayteam;
_parent.life = _parent.life - awayteam;
if (_root.silent != true) {
_root.teleportsound.start();
}
if (_root.boardwarning._currentframe == 1) {
_root.boardwarning._visible = true;
with (_root.boardwarning) {
gotoAndPlay(2);
}
}
with (teleporter) {
if (_currentframe != 1) {
_visible = true;
gotoAndPlay(1);
}
}
}
if (_parent._x >= destinationx) {
booster._visible = false;
booster2._visible = false;
booster3._visible = false;
}
}
if ((_parent._x < destinationx) and (_currentframe < 2)) {
_parent._x = _parent._x + speed;
if (_parent._y < destinationy) {
_parent._y = _parent._y + yspeed;
if (_parent._y >= destinationy) {
destinationy = random(210) + 40;
}
}
if (_parent._y > destinationy) {
_parent._y = _parent._y - yspeed;
if (_parent._y <= destinationy) {
destinationy = random(210) + 40;
}
}
}
if ((_parent.life <= 0) and (main != true)) {
if (_currentframe < 2) {
if (_root.silent != true) {
_root.explodesound.start();
}
gotoAndPlay (2);
}
if ((_root.smokefx == true) and (_currentframe > 90)) {
_root.smoke._x = _parent._x + (random(60) - 30);
_root.smoke._y = _parent._y + (random(60) - 30);
duplicateMovieClip (_root.smoke, "smokepart" + _root.smokenumber, _root.smokenumber + 1000);
_root.smokenumber++;
if (_root.smokenumber > _root.smokemax) {
_root.smokenumber = 0;
}
}
}
hitscan = -1;
}
Symbol 457 MovieClip Frame 1
stop();
Symbol 462 Button
on (press) {
if (_root._currentframe == 7) {
with (_root) {
if (_root.alienboarded <= 0) {
gotoAndStop(6);
} else {
gotoAndPlay(8);
}
}
}
if (_root._currentframe == 9) {
with (_root) {
if (_root.alienboarded <= 0) {
gotoAndStop(6);
}
}
}
}
Symbol 463 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 90
stop();
Symbol 470 MovieClip Frame 60
_visible = false;
gotoAndStop (1);
Symbol 472 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 13
removeMovieClip(this);
Symbol 475 MovieClip Frame 1
_root.mode = "ROCKET";
stop();
Symbol 475 MovieClip Frame 2
_root.mode = "CANNON";
stop();
Symbol 476 Button
on (press) {
with (weapontype) {
prevFrame();
}
}
Symbol 477 Button
on (press) {
with (weapontype) {
nextFrame();
}
}
Symbol 497 MovieClip Frame 19
gotoAndPlay (1);
Symbol 497 MovieClip Frame 33
_visible = false;
Symbol 512 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 3
if (_root.silent != true) {
_root.gunsound.start();
}
Symbol 512 MovieClip Frame 5
if (_root.silent != true) {
_root.gunsound.start();
}
Symbol 512 MovieClip Frame 7
gotoAndStop (1);
if (_root.silent != true) {
_root.gunsound.start();
}
Symbol 512 MovieClip Frame 16
_root.humanout--;
stop();
Symbol 534 MovieClip Frame 1
stop();
Symbol 534 MovieClip Frame 3
if (_root.silent != true) {
_root.alienriflesound.start();
}
Symbol 534 MovieClip Frame 5
if (_root.silent != true) {
_root.alienriflesound.start();
}
Symbol 534 MovieClip Frame 7
gotoAndStop (1);
if (_root.silent != true) {
_root.alienriflesound.start();
}
Symbol 534 MovieClip Frame 16
_root.alienout--;
stop();
Symbol 535 Button
on (press) {
if (_root.silent != true) {
_root.blipsound.start();
}
_root.pause = false;
if (_root.alert._currentframe < 2) {
with (_root.alert) {
gotoAndPlay(2);
}
}
}
Symbol 537 MovieClip Frame 1
stop();
Symbol 537 MovieClip Frame 10
_visible = false;
_root.start._visible = false;
stop();
Symbol 555 Button
on (press) {
gotoAndPlay (1);
}