Frame 1
_root.loop1 = new Sound(loop1);
_root.loop1.attachSound("loop1");
_root.loop2 = new Sound(loop2);
_root.loop2.attachSound("loop2");
_root.loop3 = new Sound(loop3);
_root.loop3.attachSound("loop3");
_root.loop4 = new Sound(loop4);
_root.loop4.attachSound("loop4");
_root.boss1loop = new Sound(boss1loop);
_root.boss1loop.attachSound("boss1loop");
_root.boss2loop = new Sound(boss2loop);
_root.boss2loop.attachSound("boss2loop");
_root.boss3loop = new Sound(boss3loop);
_root.boss3loop.attachSound("boss3loop");
_root.survivalloop = new Sound(survivalloop);
_root.survivalloop.attachSound("survivalloop");
_root.creditsloop = new Sound(creditsloop);
_root.creditsloop.attachSound("creditsloop");
_root.healthpowersound = new Sound(healthpower);
_root.healthpowersound.attachSound("healthpower");
_root.weaponpowersound = new Sound(weaponpower);
_root.weaponpowersound.attachSound("weaponpower");
_root.missilepowersound = new Sound(missilepower);
_root.missilepowersound.attachSound("missilepower");
_root.bombpowersound = new Sound(bombpower);
_root.bombpowersound.attachSound("bombpower");
_root.protectorpowersound = new Sound(protectorpower);
_root.protectorpowersound.attachSound("protectorpower");
_root.redsound = new Sound(red);
_root.redsound.attachSound("red");
_root.bluesound = new Sound(blue);
_root.bluesound.attachSound("blue");
_root.greensound = new Sound(green);
_root.greensound.attachSound("green");
_root.mhexplosion = new Sound(mhexplode);
_root.mhexplosion.attachSound("mhexplode");
_root.lasersound = new Sound(laser);
_root.lasersound.attachSound("laser");
_root.bombexplodesound = new Sound(bombexplode);
_root.bombexplodesound.attachSound("bombexplode");
_root.bombexplodesound.onSoundComplete = function () {
_root.bombexplode = false;
_root.bombfire = false;
_root.bombsound = false;
};
_root.enemyexplodesound = new Sound(enemyexplodesound);
_root.enemyexplodesound.attachSound("enemyexplode");
_root.airblast = new Sound(airblast);
_root.airblast.attachSound("airblast");
_root.boss1canonsound = new Sound(boss1canon);
_root.boss1canonsound.attachSound("boss1canon");
_root.boss1electricsound = new Sound(boss1electric);
_root.boss1electricsound.attachSound("boss1electric");
_root.boss2lasersound = new Sound(boss2laser);
_root.boss2lasersound.attachSound("boss2laser");
_root.boss2lasersound2 = new Sound(boss2laser2);
_root.boss2lasersound2.attachSound("boss2laser2");
_root.boss2big = new Sound(boss2big);
_root.boss2big.attachSound("boss2big");
stop();
_quality = "high";
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_root.customcontrols = false;
_root.reset = true;
_root.levelnumber = 1;
_root.playbtn._visible = false;
Instance of Symbol 92 MovieClip in Frame 1
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = percent - ((percent - ((loading / total) * 100)) * 0.25);
per = int(percent);
percentage = per + "%";
loadBar._width = per;
if (percent > 99) {
_root.playbtn._visible = true;
}
}
Frame 2
function createStarField() {
var depthOffset = 15;
var i = depthOffset;
var gutter = 0;
var layer1PlayHead = 1;
var layer2PlayHead = 9;
var layer3PlayHead = 17;
while (--i) {
playField.attachMovie("stars", "starsLayer3" + i, _root.depth);
_root.depth++;
tellTarget (playField["starsLayer3" + i]) {
_x = Math.floor(Math.random() * 700);
_y = gutter;
gotoAndPlay(layer3PlayHead);
};
if ((++layer3PlayHead) == 23) {
layer3PlayHead = 17;
}
gutter = gutter + 11;
playField.attachMovie("stars", "starsLayer2" + i, _root.depth);
_root.depth++;
tellTarget (playField["starsLayer2" + i]) {
_x = Math.floor(Math.random() * 700);
_y = gutter;
gotoAndPlay(layer2PlayHead);
};
if ((++layer2PlayHead) == 16) {
layer2PlayHead = 9;
}
gutter = gutter + 11;
playField.attachMovie("stars", "starsLayer1" + i, _root.depth);
_root.depth++;
tellTarget (playField["starsLayer1" + i]) {
_x = Math.floor(Math.random() * 700);
_y = gutter;
gotoAndPlay(layer1PlayHead);
};
if ((++layer1PlayHead) == 8) {
layer1PlayHead = 0;
}
gutter = gutter + 11;
}
_root.ship.swapDepths(31);
}
function init() {
var t = this.createEmptyMovieClip("playField", _root.depth);
_root.depth++;
t._x = 0;
t._y = 16;
createStarField();
}
_root.depth = 2;
_root.gamestart = false;
_root.gametimer = false;
_root.youaredead = false;
_root.time = 0;
_root.totalscore = 0;
_root.totalscore2 = 0;
_root.shipshieldtotal = (_root.shipshield = 50);
_root.sheight = getProperty(_root.ship.shiptype, _height);
_root.swidth = getProperty(_root.ship.shiptype, _width);
_root.bombfire = false;
_root.numberofbombs = 3;
_root.bombsound = false;
_root.havelaser = false;
_root.mhshotting = false;
_root.targetenemy = 0;
_root.targeted = true;
_root.mhlevel = 0;
_root.autorotate = false;
_root.protectorlevel = 0;
_root.protector1health = (_root.protector2health = 15);
_root.weapontype = "red";
_root.weaponnumber = 1;
_root.hitshipcounter = 0;
_root.powerupspeed = -2;
_root.explosionxsize = 53;
_root.bulletspeed = 39;
_root.interval = 5;
_root.x20 = _root.bulletspeed * 0.939692620785908;
_root.y20 = _root.bulletspeed * 0.342020143325669;
_root.enemyfiretime = 20;
_root.bluedepth = 10010;
_root.sgreenfunction = false;
_root.sgreentimer = 0;
_root.health = 2;
_root.e = 0;
_root.enemyticker = -25;
_root.enemy1speed = 12;
_root.enemy1bulletspeed = 17;
_root.boss1speed = 5;
_root.e1w1pos = (_root.e2w1pos = (_root.e3w1pos = (_root.e4w1pos = (_root.e4w2pos = (_root.e5w1pos = (_root.e6w1pos = (_root.e7w1pos = (_root.boss3counter = 0))))))));
_root.boss3x = 600;
_root.boss3y = 100;
_root.boss3s = 5;
_root.boss3turndelay = 5;
_root.boss3totalhealth = (_root.boss3health = 299 * _root.health);
_root.bossdeadspeed = -2.5;
_root.loopvolume = 100;
_root.fade = "in";
_root.paused = false;
_root.globalmusiccontrol = "play";
_root.difficulty = "easy";
_root.gcompletetimer = 0;
_root.mode = "mission";
_root.previewcredits = false;
_root.enemyarray = new Array();
_root.enemy1wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health);
_root["enemy" + _root.e].enemytypevar = "enemy1";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 825;
_root["enemy" + _root.e]._y = random(500);
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health);
_root["enemy" + _root.e].enemytypevar = "enemy1";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 900;
_root["enemy" + _root.e]._y = random(500);
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health);
_root["enemy" + _root.e].enemytypevar = "enemy1";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 975;
_root["enemy" + _root.e]._y = random(500);
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy2wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy2");
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 1.33333333333333);
_root["enemy" + _root.e].enemytypevar = "enemy2";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e]._y = random(400) + 50;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy3wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy3");
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 4);
_root["enemy" + _root.e].enemytypevar = "enemy3";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e]._y = random(400) + 50;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy4wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy4");
_root["enemy" + _root.e].desty = random(400) + 50;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 6);
_root["enemy" + _root.e].enemytypevar = "enemy4";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
torb = random(2) + 1;
if (torb == 1) {
_root["enemy" + _root.e]._y = -50;
} else if (torb == 2) {
_root["enemy" + _root.e]._y = 550;
}
};
_root.enemy4wave2 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy4");
_root["enemy" + _root.e].e4arrive = true;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 6);
_root["enemy" + _root.e].enemytypevar = "enemy4wave2";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].e4arrive = true;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy5wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy5");
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 5);
_root["enemy" + _root.e].enemytypevar = "enemy5";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e]._y = random(400) + 50;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy6wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy6");
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 6);
_root["enemy" + _root.e].enemytypevar = "enemy6";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e]._y = random(400) + 50;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy7wave1 = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("enemy7");
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = _root.health * 9);
_root["enemy" + _root.e].enemytypevar = "enemy7";
_root["enemy" + _root.e].healthbar._y = (_root["enemy" + _root.e].enemytype._height / 2) + 5;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e]._x = 750;
_root["enemy" + _root.e]._y = random(400) + 50;
_root["enemy" + _root.e].enemyfiretime = random(20) + 30;
};
_root.enemy1wavetimer = new Array(50, 150, 250, 380, 450, 520, 600, 730, 840, 900, 940, 980, 1050, 1130, 1210, 1260, 1300, 1350, 1440, 1500, 1600, 1770, 1980, 2050, 2160, 2290, 2460, 2640, 2670, 2800, 2830, 2880, 3090, 3160, 3290, 3460, 3500, 3580);
_root.enemy2wavetimer = new Array(300, 320, 420, 460, 580, 650, 790, 870, 940, 1040, 1060, 1100, 1160, 1200, 1250, 1350, 1410, 1480, 1580, 1620, 1730, 1850, 1940, 1990, 2050, 2150, 2200, 2279, 2350, 2370, 2590, 2620, 2790, 2890, 2910, 3060, 3120, 3290, 3480, 3550);
_root.enemy3wavetimer = new Array(1000, 1280, 1450, 1560, 1600, 1650, 1720, 1830, 1920, 2050, 2110, 2480, 2600, 2840, 2960, 3060, 3270, 3480);
_root.enemy4wavetimer = new Array(2340, 2400, 2540, 2600, 2700, 2790, 2840, 2930, 3000, 3150, 3220, 3350, 3400, 3450);
_root.enemy4wave2timer = new Array(2760, 2840, 2030, 3000, 3150, 3220, 3570);
_root.enemy1wavetimer2 = new Array(100, 200, 300, 350, 450, 540, 600, 700, 800, 920, 1200, 1350, 1530, 1700, 1800, 1840, 1900, 2010, 2200, 2400, 2500, 2580, 2800, 2980, 3010, 3100, 3200, 3360, 3500, 3620);
_root.enemy2wavetimer2 = new Array(50, 80, 170, 250, 350, 400, 570, 620, 660, 730, 780, 890, 950, 1300, 1380, 1430, 1600, 1690, 1760, 1900, 2050, 2100, 2231, 2340, 2500, 2600, 2730, 2850, 2930, 3100, 3150, 3200, 3260, 3400, 3480, 3530, 3560);
_root.enemy3wavetimer2 = new Array(100, 500, 750, 850, 1000, 1200, 1600, 2120, 2450, 2520, 2600, 2860, 2920, 3250, 3350, 3320, 3450);
_root.enemy4wavetimer2 = new Array(450, 1450, 1800, 2500, 2800);
_root.enemy4wave2timer2 = new Array(900, 1100, 1350, 1650, 1900, 2000, 2300, 2900, 3120, 3200, 3350, 3500);
_root.enemy5wave1timer2 = new Array(850, 1020, 1500, 1800, 2220, 2620, 3250, 3400, 3560);
_root.enemy6wave1timer2 = new Array(1700, 1950, 2200, 2300, 2450, 2630, 2860, 3050, 3200, 3400, 3480, 3550);
_root.enemy1wavetimer3 = new Array(100, 250, 500, 600, 750, 900, 1050, 1120, 1220, 1300, 1350, 1420, 1650, 1730, 1800, 1900, 2020, 2120, 2250, 2320, 2400, 2650, 2750, 2820, 2950, 3050, 3200, 3300, 3400, 3460, 3500, 3550);
_root.enemy2wavetimer3 = new Array(20, 80, 200, 400, 550, 620, 810, 950, 1100, 1230, 1280, 1400, 1480, 1610, 1850, 2000, 2150, 2280, 2400, 2560, 2660, 2800, 2920, 3010, 3200, 3250, 3400, 3500);
_root.enemy3wavetimer3 = new Array(60, 160, 360, 690, 830, 1300, 1650, 1820, 2000, 2150, 2350, 2590, 2700, 2820, 3000, 3180, 3250, 3300, 3450);
_root.enemy4wavetimer3 = new Array(150, 350, 1200, 1620, 1820, 2300, 2830, 3460);
_root.enemy4wave2timer3 = new Array(860, 1030, 1450, 2030, 2550, 3120, 3250, 3360, 3480);
_root.enemy5wave1timer3 = new Array(510, 1120, 1380, 1680, 1950, 2200, 2460, 2600, 2750, 2990, 3150, 3300.342);
_root.enemy6wave1timer3 = new Array(300, 790, 980, 1480, 1600, 1920, 2060, 2230, 2620, 2790, 2900, 3150, 3250, 3390, 3450);
_root.enemy7wave1timer3 = new Array(1330, 1560, 1750, 2200, 2360, 2520, 2750, 2870, 3000, 3250, 3320, 3500);
_root.enemy1wavetimer4 = new Array(20, 80, 160, 200, 260, 320, 420, 500, 560, 650, 730);
_root.enemy2wavetimer4 = new Array(50, 100, 150, 200, 250, 300, 380, 440, 520, 580, 620, 700);
_root.enemy3wavetimer4 = new Array(70, 180, 290, 400, 540, 670, 750);
_root.enemy4wavetimer4 = new Array(30, 120, 160, 250, 380, 460, 600, 660);
_root.enemy4wave2timer4 = new Array(80, 130, 290, 520);
_root.enemy5wave1timer4 = new Array(10, 160, 290, 410, 590, 690);
_root.enemy6wave1timer4 = new Array(40, 150, 260, 340, 490, 620, 710);
_root.enemy7wave1timer4 = new Array(90, 210, 350, 430, 550, 600);
_root.enemy1wavetimer5 = 25;
_root.enemy2wavetimer5 = 200;
_root.enemy3wavetimer5 = 400;
_root.enemy4wavetimer5 = 600;
_root.enemy4wave2timer5 = 800;
_root.enemy5wave1timer5 = 1000;
_root.enemy6wave1timer5 = 1200;
_root.enemy7wave1timer5 = 1400;
_root.enemy1delay = 25;
_root.enemy2delay = 25;
_root.enemy3delay = 50;
_root.enemy4delay = 75;
_root.enemy4delay2 = 75;
_root.enemy5delay = 100;
_root.enemy6delay = 125;
_root.enemy7delay = 125;
_root.boss1function = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 35);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss1");
_root["enemy" + _root.e]._x = 1400;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 250 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss1";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root.boss1electric = (_root.boss1canon = -70);
_root.boss1arrive = true;
};
_root.boss2function = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 35);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss2");
_root["enemy" + _root.e]._x = 1200;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 300 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss2";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root.boss2arrive = true;
};
_root.boss3function = function () {
_root.boss3xarray = new Array(600, 200, 500, 350, 600, 200, 50, 500, 600, 350, 600, 100, 600, 600, 300, 500, 100, 500, 200, 689, 100, 300, 475, 256, 600, 140, 458, 100, 280, 670, 500, 150);
_root.boss3yarray = new Array(100, 450, 400, 200, 100, 450, 300, 450, 100, 200, 400, 100, 300, 360, 250, 168, 470, 100, 480, 186, 357, 100, 480, 355, 100, 50, 466, 266, 100, 236, 480, 300);
_root.boss3sarray = new Array(15, 10, 10, 10, 5, 10, 15, 10, 14, 10, 15, 10, 8, 12, 5, 10, 5, 15, 10, 8, 6, 8, 15, 6, 10, 8, 5, 14, 8, 5, 13, 7);
_root.boss3turndelayarray = new Array(5, 8, 5, 5, 5, 5, 10, 8, 6, 5, 10, 5, 10, 5, 6, 4, 10, 6, 7, 10, 5, 5, 10, 20, 7, 5, 8, 5, 5, 8, 10, 7);
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 35);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss3head");
_root["enemy" + _root.e]._x = 600;
_root["enemy" + _root.e]._y = 1200;
_root["enemy" + _root.e]._rotation = -90;
_root.boss3totalhealth = (_root.boss3health = 450 * _root.health);
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 550 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss3head";
_root["enemy" + _root.e].healthbar.gotoAndStop("blank");
_root["enemy" + _root.e].border.gotoAndStop("blank");
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 36);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss3body");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 1)]._x + _root["enemy" + (_root.e - 1)].enemytype._x) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 1)]._y + _root["enemy" + (_root.e - 1)].enemytype._y) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._y;
_root["enemy" + _root.e]._rotation = -90;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 450 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss3body";
_root["enemy" + _root.e].healthbar.gotoAndStop("blank");
_root["enemy" + _root.e].border.gotoAndStop("blank");
_root["enemy" + _root.e].boss3counter = 0;
_root["enemy" + _root.e].fire = random(75) + 75;
_root["enemy" + _root.e].swapDepths(_root["enemy" + (_root.e - 1)]);
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 37);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss3body");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 1)]._x + _root["enemy" + (_root.e - 1)].enemytype._x) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 1)]._y + _root["enemy" + (_root.e - 1)].enemytype._y) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._y;
_root["enemy" + _root.e]._rotation = -90;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 450 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss3body";
_root["enemy" + _root.e].healthbar.gotoAndStop("blank");
_root["enemy" + _root.e].border.gotoAndStop("blank");
_root["enemy" + _root.e].boss3counter = 0;
_root["enemy" + _root.e].fire = random(75) + 75;
_root["enemy" + _root.e].swapDepths(_root["enemy" + (_root.e - 1)]);
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 38);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss3body");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 1)]._x + _root["enemy" + (_root.e - 1)].enemytype._x) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 1)]._y + _root["enemy" + (_root.e - 1)].enemytype._y) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._y;
_root["enemy" + _root.e]._rotation = -90;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 450 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss3body";
_root["enemy" + _root.e].healthbar.gotoAndStop("blank");
_root["enemy" + _root.e].border.gotoAndStop("blank");
_root["enemy" + _root.e].boss3counter = 0;
_root["enemy" + _root.e].fire = random(75) + 75;
_root["enemy" + _root.e].swapDepths(_root["enemy" + (_root.e - 1)]);
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 39);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("boss3tail");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 1)]._x + _root["enemy" + (_root.e - 1)].enemytype._x) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 1)]._y + _root["enemy" + (_root.e - 1)].enemytype._y) + _root["enemy" + (_root.e - 1)].enemytype.attachpoint._y;
_root["enemy" + _root.e]._rotation = -90;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 450 * _root.health);
_root["enemy" + _root.e].enemytypevar = "boss3tail";
_root["enemy" + _root.e].healthbar._rotation = -90;
_root["enemy" + _root.e].healthbar._x = -110;
_root["enemy" + _root.e].border._rotation = -90;
_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x;
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].swapDepths(_root["enemy" + (_root.e - 1)]);
};
_root.fbossfunction = function () {
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 39);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("fboss");
_root["enemy" + _root.e]._x = 1500;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 575 * _root.health);
_root["enemy" + _root.e].enemytypevar = "fboss";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 10);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].healthbar._x = (_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x + 30);
_root.fbossarrive = true;
_root["enemy" + _root.e].fire = random(75) + 75;
_root["enemy" + _root.e].fire2 = random(100) + 100;
_root["enemy" + _root.e].guncounter = 0;
_root["enemy" + _root.e].lasercounter = 0;
_root.fbossrest = false;
_root.fbossrestcounter = 0;
_root.fbosswave = 0;
_root.fbossrestcounter = 0;
_root.fbossresttime = 300;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 35);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("launcher");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 1)]._x + _root["enemy" + (_root.e - 1)].enemytype._x) + _root["enemy" + (_root.e - 1)].enemytype.missile._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 1)]._y + _root["enemy" + (_root.e - 1)].enemytype._y) + _root["enemy" + (_root.e - 1)].enemytype.missile._y;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 200 * _root.health);
_root["enemy" + _root.e].enemytypevar = "launcher1";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].healthbar._x = (_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x - 30);
_root["enemy" + _root.e].enemytype._rotation = 70;
_root["enemy" + _root.e].fire = random(200) + 150;
_root["enemy" + _root.e].counter = 0;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 36);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("launcher");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 2)]._x + _root["enemy" + (_root.e - 2)].enemytype._x) + _root["enemy" + (_root.e - 2)].enemytype.missile2._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 2)]._y + _root["enemy" + (_root.e - 2)].enemytype._y) + _root["enemy" + (_root.e - 2)].enemytype.missile2._y;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 200 * _root.health);
_root["enemy" + _root.e].enemytypevar = "launcher2";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 30);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].healthbar._x = (_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x - 10);
_root["enemy" + _root.e]._yscale = -100;
_root["enemy" + _root.e].fire = random(200) + 150;
_root["enemy" + _root.e].counter = 0;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 37);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("launcher");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 3)]._x + _root["enemy" + (_root.e - 3)].enemytype._x) + _root["enemy" + (_root.e - 3)].enemytype.missile3._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 3)]._y + _root["enemy" + (_root.e - 3)].enemytype._y) + _root["enemy" + (_root.e - 3)].enemytype.missile3._y;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 200 * _root.health);
_root["enemy" + _root.e].enemytypevar = "launcher3";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 30);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].healthbar._x = (_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x - 10);
_root["enemy" + _root.e].fire = random(200) + 150;
_root["enemy" + _root.e].counter = 0;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, 38);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("launcher");
_root["enemy" + _root.e]._x = (_root["enemy" + (_root.e - 4)]._x + _root["enemy" + (_root.e - 4)].enemytype._x) + _root["enemy" + (_root.e - 4)].enemytype.missile4._x;
_root["enemy" + _root.e]._y = (_root["enemy" + (_root.e - 4)]._y + _root["enemy" + (_root.e - 4)].enemytype._y) + _root["enemy" + (_root.e - 4)].enemytype.missile4._y;
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 200 * _root.health);
_root["enemy" + _root.e].enemytypevar = "launcher4";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root["enemy" + _root.e].healthbar._x = (_root["enemy" + _root.e].border._x = _root["enemy" + _root.e].healthbar._x - 30);
_root["enemy" + _root.e]._yscale = -100;
_root["enemy" + _root.e].enemytype._rotation = 70;
_root["enemy" + _root.e].fire = random(200) + 150;
_root["enemy" + _root.e].counter = 0;
};
_root.enemymove = function () {
var ec = (_root.enemyarray.length - 1);
while (ec >= 0) {
if (_root.paused == false) {
_root.enemyarray[ec].enemywidth = getProperty(_root.enemyarray[ec].enemytype, _width);
if (_root.enemyarray[ec].hitTest(_root.ship.shipmc)) {
_root.hitship = true;
_root.checkhealth = true;
_root.shieldfadein = true;
_root.enemyarray[ec].gotoAndPlay("hit");
if (((_root.enemyarray[ec].enemytypevar == "boss3head") or (_root.enemyarray[ec].enemytypevar == "boss3body")) or (_root.enemyarray[ec].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 3;
_root.shipshield = _root.shipshield - 2;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
} else {
_root.shipshield = _root.shipshield - 6;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.enemyarray[ec].health = _root.enemyarray[ec].health - 6;
}
}
if (_root.enemyarray[ec].hitTest(_root.ship.protector.sphere)) {
_root.enemyarray[ec].gotoAndPlay("hit");
_root.enemyarray[ec].health = _root.enemyarray[ec].health - 1;
_root.protector1health = _root.protector1health - 1;
if ((_root.protector1health < 7) and (_root.protector1health > 2)) {
_root.ship.protector.sphere.gotoAndStop("half");
} else if ((_root.protector1health <= 2) and (_root.protector1health >= 0)) {
_root.ship.protector.sphere.gotoAndStop("critical");
} else if (_root.protector1health < 0) {
trace("Protector1 Gone");
if (_root.protectorlevel > 2) {
_root.protectorframe = _root.ship.protector2._currentframe - 19;
if (_root.protectorframe < 3) {
_root.protectorframe = 41 + _root.protectorframe;
}
_root.protectorlevel = 2;
if (_root.autorotate == true) {
_root.ship.protector.gotoAndPlay(_root.protectorframe);
} else {
_root.ship.protector.gotoAndStop(_root.protectorframe);
}
_root.protector1health = _root.protector2health;
if ((_root.protector1health < 7) and (_root.protector1health > 2)) {
_root.ship.protector.sphere.gotoAndStop("half");
} else if ((_root.protector1health <= 2) and (_root.protector1health >= 0)) {
_root.ship.protector.sphere.gotoAndStop("critical");
}
} else {
_root.protectorlevel = 0;
}
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = (_root.ship._x + _root.ship.protector._x) + _root.ship.protector.sphere._x;
_root["shipexplosion" + _root.depth]._y = (_root.ship._y + _root.ship.protector._y) + _root.ship.protector.sphere._y;
_root["shipexplosion" + _root.depth]._xscale = (_root["shipexplosion" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
}
if (_root.enemyarray[ec].hitTest(_root.ship.protector2.sphere)) {
_root.protector2health = _root.protector2health - 1;
_root.enemyarray[ec].gotoAndPlay("hit");
_root.enemyarray[ec].health = _root.enemyarray[ec].health - 1;
if ((_root.protector2health < 7) and (_root.protector2health > 2)) {
_root.ship.protector2.sphere.gotoAndStop("half");
} else if ((_root.protector2health <= 2) and (_root.protector2health >= 0)) {
_root.ship.protector2.sphere.gotoAndStop("critical");
} else if (_root.protector2health < 0) {
trace("Protector2 Gone");
_root.protectorlevel = 2;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = (_root.ship._x + _root.ship.protector2._x) + _root.ship.protector2.sphere._x;
_root["shipexplosion" + _root.depth]._y = (_root.ship._y + _root.ship.protector2._y) + _root.ship.protector2.sphere._y;
_root["shipexplosion" + _root.depth]._xscale = (_root["shipexplosion" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
}
_root.enemyarray[ec].healthbar._xscale = (_root.enemyarray[ec].health / _root.enemyarray[ec].totalhealth) * 100;
if (((_root.enemyarray[ec].enemytypevar == "boss3head") or (_root.enemyarray[ec].enemytypevar == "boss3body")) or (_root.enemyarray[ec].enemytypevar == "boss3tail")) {
_root.enemyarray[_root.enemyarray.length - 1].healthbar._xscale = (_root.boss3health / _root.boss3totalhealth) * 100;
}
if ((_root.enemyarray[ec].health <= 0) or (_root.boss3health <= 0)) {
if (_root.mode == "mission") {
if (_root.difficulty == "easy") {
_root.totalscore = _root.totalscore + int(Number((_root.enemyarray[ec].totalhealth / _root.health) * 3));
} else if (_root.difficulty == "expert") {
_root.totalscore = _root.totalscore + int(Number((_root.enemyarray[ec].totalhealth / _root.health) * 5));
}
_root.status.score = int(_root.totalscore);
} else if (_root.mode == "survival") {
if (_root.difficulty == "easy") {
_root.totalscore2 = _root.totalscore2 + int(Number((_root.enemyarray[ec].totalhealth / _root.health) * 3));
} else if (_root.difficulty == "expert") {
_root.totalscore2 = _root.totalscore2 + int(Number((_root.enemyarray[ec].totalhealth / _root.health) * 5));
}
_root.status.score = int(_root.totalscore2);
}
if (_root.enemiesdestroyed < _root.enemiesrequired) {
_root.enemiesdestroyed++;
} else {
_root.enemiesdestroyed = 0;
if (_root.mode == "mission") {
if (_root.levelnumber < 3) {
tocreateornot = random(4) + 1;
} else {
tocreateornot = random(5) + 1;
}
if (tocreateornot == 1) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.weaponpowerupfunction();
}
if (tocreateornot == 2) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.missilepowerupfunction();
}
if (tocreateornot == 3) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.bombpowerupfunction();
}
if (tocreateornot == 4) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.minihealthpowerupfunction();
}
if (tocreateornot == 5) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.protectorpowerupfunction();
}
} else {
tocreateornot = random(4) + 1;
if (tocreateornot == 1) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.weaponpowerupfunction();
}
if (tocreateornot == 2) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.missilepowerupfunction();
}
if (tocreateornot == 3) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.bombpowerupfunction();
}
if (tocreateornot == 4) {
_root.assignx = _root.enemyarray[ec]._x;
_root.assigny = _root.enemyarray[ec]._y;
_root.protectorpowerupfunction();
}
}
}
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = _root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x;
_root["shipexplosion" + _root.depth]._y = _root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y;
_root["shipexplosion" + _root.depth]._xscale = 100 * (_root.enemyarray[ec].enemywidth / _root.explosionxsize);
_root["shipexplosion" + _root.depth]._yscale = _root["shipexplosion" + _root.depth]._xscale;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
if (((_root.enemyarray[ec].enemytypevar == "boss1") or (_root.enemyarray[ec].enemytypevar == "boss2")) or (_root.enemyarray[ec].enemytypevar == "boss3head")) {
_root.display.gotoAndPlay("missioncomplete");
_root.gametimer = false;
_root.bosskilled = true;
} else if (_root.enemyarray[ec].enemytypevar == "fboss") {
i = _root.enemyarray.length;
while (i >= 0) {
_root.enemyarray[i].health = 0;
i--;
}
_root.enemyarray[ec].enemytype.explode.gotoAndPlay("explode");
_root.fbossrest = false;
_root.fbossrestcounter = 0;
_root.fbosswave = 0;
_root.gametimer = false;
_root.bosskilled = true;
_root.enemyarray.splice(ec, 1);
_root.fade = "out";
}
if (_root.enemyarray[ec].enemytypevar != "fboss") {
_root.enemyarray[ec].removeMovieClip();
_root.enemyarray.splice(ec, 1);
}
}
if ((((_root.enemyarray[ec]._x < (-5 - _root.enemyarray[ec]._width)) and (_root.enemyarray[ec].enemytypevar != "boss3head")) and (_root.enemyarray[ec].enemytypevar != "boss3body")) and (_root.enemyarray[ec].enemytypevar != "boss3tail")) {
_root.enemyarray[ec].removeMovieClip();
_root.enemyarray.splice(ec, 1);
}
if (_root.enemyarray[ec].enemytypevar == "boss1") {
if (_root.boss1electric < 95) {
_root.boss1electric++;
}
_root.boss1canon++;
if (_root.boss1electric == 75) {
_root.boss1electricsound.stop;
_root.boss1electricsound.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss1electric");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss1electric";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].xvalue = -20 * Math.cos(_root["enemybullet" + _root.depth].angle);
_root["enemybullet" + _root.depth].yvalue = -20 * Math.sin(_root["enemybullet" + _root.depth].angle);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
if (_root.boss1electric == 85) {
_root.boss1electricsound.stop;
_root.boss1electricsound.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun2._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss1electric");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss1electric";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].xvalue = -20 * Math.cos(_root["enemybullet" + _root.depth].angle);
_root["enemybullet" + _root.depth].yvalue = -20 * Math.sin(_root["enemybullet" + _root.depth].angle);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
if (_root.boss1electric == 95) {
_root.boss1electric = 0;
_root.boss1electricsound.stop;
_root.boss1electricsound.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun3._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun3._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss1electric");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss1electric";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].xvalue = -20 * Math.cos(_root["enemybullet" + _root.depth].angle);
_root["enemybullet" + _root.depth].yvalue = -20 * Math.sin(_root["enemybullet" + _root.depth].angle);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
if ((Math.abs((_root.ship._y + _root.ship.shipmc._y) - _root.enemyarray[ec]._y) < 100) and (_root.boss1canon > 60)) {
_root.boss1canon = 0;
_root.boss1canonsound.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.canon._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.canon._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss1canon");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss1canon";
_root["enemybullet" + _root.depth].xvalue = -17;
_root["enemybullet" + _root.depth].yvalue = 0;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
} else if ((_root.enemyarray[ec].enemytypevar == "boss2") and (_root.bossready == true)) {
_root.boss2laser++;
_root.boss2gun++;
if (_root.boss2laser == 210) {
_root.boss2big.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.biggun1._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.biggun1._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2big";
_root["enemybullet" + _root.depth].gotoAndStop("boss2big");
_root["enemybullet" + _root.depth].xvalue = 2 * (-_root.enemy1bulletspeed);
_root["enemybullet" + _root.depth].yvalue = 0;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.biggun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.biggun2._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2big";
_root["enemybullet" + _root.depth].gotoAndStop("boss2big");
_root["enemybullet" + _root.depth].xvalue = 2 * (-_root.enemy1bulletspeed);
_root["enemybullet" + _root.depth].yvalue = 0;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.boss2laser = 0;
}
if (_root.boss2gun == 75) {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun1._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun1._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = 0;
_root["enemybullet" + _root.depth].yvalue = 0.8 * (-_root.enemy1bulletspeed);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun2._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * _root.enemy1bulletspeed) * 0.866025403784439;
_root["enemybullet" + _root.depth].yvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.5;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun3._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun3._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * _root.enemy1bulletspeed) * 0.5;
_root["enemybullet" + _root.depth].yvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.866025403784439;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun4._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun4._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = 0.8 * _root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].yvalue = 0;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun5._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun5._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * _root.enemy1bulletspeed) * 0.866025403784439;
_root["enemybullet" + _root.depth].yvalue = (0.8 * _root.enemy1bulletspeed) * 0.5;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun6._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun6._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * _root.enemy1bulletspeed) * 0.5;
_root["enemybullet" + _root.depth].yvalue = (0.8 * _root.enemy1bulletspeed) * 0.866025403784439;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun7._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun7._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = 0;
_root["enemybullet" + _root.depth].yvalue = 0.8 * _root.enemy1bulletspeed;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun8._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun8._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.5;
_root["enemybullet" + _root.depth].yvalue = (0.8 * _root.enemy1bulletspeed) * 0.866025403784439;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun9._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun9._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.866025403784439;
_root["enemybullet" + _root.depth].yvalue = (0.8 * _root.enemy1bulletspeed) * 0.5;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun10._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun10._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = 0.8 * (-_root.enemy1bulletspeed);
_root["enemybullet" + _root.depth].yvalue = 0;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun11._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun11._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.866025403784439;
_root["enemybullet" + _root.depth].yvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.5;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun12._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun12._y;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2gun";
_root["enemybullet" + _root.depth].xvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.5;
_root["enemybullet" + _root.depth].yvalue = (0.8 * (-_root.enemy1bulletspeed)) * 0.866025403784439;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.boss2gun = 0;
}
if (_root.boss2laser == 200) {
_root.boss2stoplaser = true;
} else if (_root.boss2laser == 60) {
_root.boss2lasersound.start(0, 0);
_root.enemyarray[ec].enemytype.lasercharge.gotoAndPlay(2);
} else if (_root.boss2laser == 100) {
_root.boss2lasersound.stop();
_root.boss2lasersound2.start(0, 0);
_root.enemyarray[ec].enemytype.lasercharge.gotoAndStop(1);
_root.boss2stoplaser = false;
_root.boss2firelaser = true;
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.lasergun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.lasergun._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss2laser");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2laser1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.lasergun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.lasergun2._y;
_root["enemybullet" + _root.depth].gotoAndStop("boss2laser");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss2laser2";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
} else if (_root.enemyarray[ec].enemytypevar == "boss3body") {
_root.enemyarray[ec].boss3counter++;
if (_root.enemyarray[ec].boss3counter == _root.enemyarray[ec].fire) {
_root.enemyarray[ec].fire = random(100) + 100;
_root.enemyarray[ec].enemytype.hatch.gotoAndPlay("open");
_root.enemyarray[ec].boss3counter = 0;
}
} else if (_root.enemyarray[ec].enemytypevar == "fboss") {
if (_root.fbossrest == false) {
_root.enemyarray[ec].guncounter++;
_root.enemyarray[ec].lasercounter++;
if (_root.enemyarray[ec].guncounter == _root.enemyarray[ec].fire) {
_root.enemyarray[ec].fire = random(75) + 50;
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].starty = _root["enemybullet" + _root.depth]._y;
_root["enemybullet" + _root.depth].desty = _root["enemybullet" + _root.depth].starty + 50;
_root["enemybullet" + _root.depth].xvalue = -_root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].gotoAndStop("fbossgun");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "fbossgun";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemyarray[ec].guncounter = 0;
}
if (_root.enemyarray[ec].lasercounter == _root.enemyarray[ec].fire2) {
_root.boss2lasersound.stop();
_root.boss2lasersound.start(0, 0);
_root.enemyarray[ec].enemytype.charge.gotoAndPlay("charge");
_root.enemyarray[ec].fire2 = random(100) + 100;
_root.enemyarray[ec].lasercounter = 0;
}
}
} else if ((((_root.enemyarray[ec].enemytypevar == "launcher1") or (_root.enemyarray[ec].enemytypevar == "launcher2")) or (_root.enemyarray[ec].enemytypevar == "launcher3")) or (_root.enemyarray[ec].enemytypevar == "launcher4")) {
_root.enemyarray[ec].counter++;
if (_root.enemyarray[ec].counter == _root.enemyarray[ec].fire) {
_root.enemyarray[ec].fire = random(200) + 150;
_root.e++;
_root.enemy.duplicateMovieClip("enemy" + _root.e, _root.depth);
_root.enemyarray[_root.enemyarray.length] = _root["enemy" + _root.e];
_root["enemy" + _root.e].enemytype.gotoAndStop("rocket");
_root["enemy" + _root.e]._x = _root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x;
_root["enemy" + _root.e]._y = _root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y;
_root["enemy" + _root.e].megahomingturndelay = 3;
_root["enemy" + _root.e].deploy = true;
_root["enemy" + _root.e].deploycounter = 0;
_root["enemy" + _root.e].speedx = 8;
_root["enemy" + _root.e].speedy = 8;
if (_root.enemyarray[ec].enemytypevar == "launcher1") {
_root["enemy" + _root.e].angle = -2.79252680319093;
} else if (_root.enemyarray[ec].enemytypevar == "launcher2") {
_root["enemy" + _root.e].angle = -2.44346095279206;
_root["enemy" + _root.e]._x = _root["enemy" + _root.e]._x + 10;
} else if (_root.enemyarray[ec].enemytypevar == "launcher3") {
_root["enemy" + _root.e].angle = 2.0943951023932;
_root["enemy" + _root.e]._x = _root["enemy" + _root.e]._x + 5;
} else if (_root.enemyarray[ec].enemytypevar == "launcher4") {
_root["enemy" + _root.e].angle = 2.79252680319093;
}
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root["enemy" + _root.e].totalhealth = (_root["enemy" + _root.e].health = 3 * _root.health);
_root["enemy" + _root.e].enemytypevar = "rocket";
_root["enemy" + _root.e].healthbar._y = int((_root["enemy" + _root.e].enemytype._height / 2) + 5);
_root["enemy" + _root.e].border._y = _root["enemy" + _root.e].healthbar._y;
_root.enemyarray[ec].counter = 0;
}
}
_root.enemyarray[ec].enemyfiretimer++;
if (_root.enemyarray[ec].enemyfiretimer == _root.enemyarray[ec].enemyfiretime) {
_root.enemyarray[ec].enemyfiretime = random(25) + 30;
_root.enemyarray[ec].enemyfiretimer = 0;
if ((_root.enemyarray[ec].enemytypevar == "enemy1") or (_root.enemyarray[ec].enemytypevar == "enemy4")) {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].xvalue = -_root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].yvalue = 0;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy2") {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].xvalue = -_root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].yvalue = 0;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun2._y;
_root["enemybullet" + _root.depth].xvalue = -_root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].yvalue = 0;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy3") {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].xvalue = (-_root.enemy1bulletspeed) * 0.965925826289068;
_root["enemybullet" + _root.depth].yvalue = (-_root.enemy1bulletspeed) * 0.258819045102521;
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root["enemybullet" + _root.depth].shottype = "enemy";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun2._y;
_root["enemybullet" + _root.depth].xvalue = -_root.enemy1bulletspeed;
_root["enemybullet" + _root.depth].yvalue = 0;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun3._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun3._y;
_root["enemybullet" + _root.depth].xvalue = (-_root.enemy1bulletspeed) * 0.965925826289068;
_root["enemybullet" + _root.depth].yvalue = _root.enemy1bulletspeed * 0.258819045102521;
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy6") {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].gotoAndStop("enemymissile");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "enemymissilet";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = (_root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y)) - 15;
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].angle2 = _root["enemybullet" + _root.depth].angle * 57.2957795130823;
_root["enemybullet" + _root.depth].deployrate = 10;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun2._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun2._y;
_root["enemybullet" + _root.depth].gotoAndStop("enemymissile");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "enemymissileb";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = (_root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y)) + 15;
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].angle2 = _root["enemybullet" + _root.depth].angle * 57.2957795130823;
_root["enemybullet" + _root.depth].deployrate = 10;
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy7") {
_root.boss1electricsound.stop;
_root.boss1electricsound.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].gotoAndStop("enemy7");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "enemy7";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].xvalue = -20 * Math.cos(_root["enemybullet" + _root.depth].angle);
_root["enemybullet" + _root.depth].yvalue = -20 * Math.sin(_root["enemybullet" + _root.depth].angle);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
}
if (_root.enemyarray[ec].enemytypevar == "enemy5") {
if (_root.enemyarray[ec].enemy5fire < 2) {
_root.enemyarray[ec].enemy5fire++;
} else {
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth]._x = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.gun._x;
_root["enemybullet" + _root.depth]._y = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.gun._y;
_root["enemybullet" + _root.depth].xvalue = _root.enemy1bulletspeed * Math.cos(_root.enemyarray[ec].enemytype._rotation * (Math.PI/180));
_root["enemybullet" + _root.depth].yvalue = _root.enemy1bulletspeed * Math.sin(_root.enemyarray[ec].enemytype._rotation * (Math.PI/180));
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "shot1";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.enemyarray[ec].enemy5fire = 0;
}
}
}
ec--;
}
};
_root.enemymove2 = function () {
var ec = (_root.enemyarray.length - 1);
while (ec >= 0) {
if (_root.enemyarray[ec].enemytypevar == "boss1") {
if ((_root.enemyarray[ec]._x == _root.enemyarray[ec].destx) and (_root.enemyarray[ec]._y == _root.enemyarray[ec].desty)) {
_root.boss1arrive = true;
}
if (_root.boss1arrive == true) {
_root.enemyarray[ec].destx = random(300) + 300;
_root.enemyarray[ec].desty = random(300) + 100;
_root.boss1arrive = false;
}
if (Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > _root.boss1speed) {
if (_root.enemyarray[ec]._x < _root.enemyarray[ec].destx) {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + _root.boss1speed;
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - _root.boss1speed;
}
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
}
if (Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > _root.boss1speed) {
if (_root.enemyarray[ec]._y < _root.enemyarray[ec].desty) {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + _root.boss1speed;
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y - _root.boss1speed;
}
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
}
} else if (_root.enemyarray[ec].enemytypevar == "boss2") {
if (_root.enemyarray[ec]._x < 700) {
_root.bossready = true;
}
if ((_root.enemyarray[ec]._x == _root.enemyarray[ec].destx) and (_root.enemyarray[ec]._y == _root.enemyarray[ec].desty)) {
_root.boss2arrive = true;
}
if (_root.boss2arrive == true) {
_root.enemyarray[ec].destx = random(300) + 300;
_root.enemyarray[ec].desty = random(300) + 100;
_root.boss2arrive = false;
}
if (Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > (0.6 * _root.boss1speed)) {
if (_root.enemyarray[ec]._x < _root.enemyarray[ec].destx) {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + (0.6 * _root.boss1speed);
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (0.6 * _root.boss1speed);
}
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
}
if (Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > (0.6 * _root.boss1speed)) {
if (_root.enemyarray[ec]._y < _root.enemyarray[ec].desty) {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + (0.6 * _root.boss1speed);
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y - (0.6 * _root.boss1speed);
}
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
}
} else if (_root.enemyarray[ec].enemytypevar == "boss3head") {
_root.enemyarray[ec].diffx = int(_root.boss3x - _root.enemyarray[ec]._x);
_root.enemyarray[ec].diffy = int(_root.boss3y - _root.enemyarray[ec]._y);
if ((_root.enemyarray[ec].diffx > 0) && (_root.enemyarray[ec].diffy > 0)) {
_root.enemyarray[ec].quad = Number(4);
}
if ((_root.enemyarray[ec].diffx < 0) && (_root.enemyarray[ec].diffy > 0)) {
_root.enemyarray[ec].quad = Number(1);
}
if ((_root.enemyarray[ec].diffx < 0) && (_root.enemyarray[ec].diffy < 0)) {
_root.enemyarray[ec].quad = Number(2);
}
if ((_root.enemyarray[ec].diffx > 0) && (_root.enemyarray[ec].diffy < 0)) {
_root.enemyarray[ec].quad = Number(3);
}
_root.enemyarray[ec].abs_x = Math.abs(_root.enemyarray[ec].diffx);
_root.enemyarray[ec].abs_y = Math.abs(_root.enemyarray[ec].diffy);
_root.enemyarray[ec].tg = _root.enemyarray[ec].abs_y / _root.enemyarray[ec].abs_x;
_root.enemyarray[ec].maths = (Math.atan(_root.enemyarray[ec].tg) * Number(180)) / Math.PI;
_root.enemyarray[ec].distance = Math.sqrt(((_root.enemyarray[ec]._x - _root.boss3x) ^ (2 + (_root.enemyarray[ec]._y - _root.boss3y))) ^ 2);
if (_root.enemyarray[ec].quad == 1) {
_root.enemyarray[ec].angle = Number(180) - Number(_root.enemyarray[ec].maths);
}
if (_root.enemyarray[ec].quad == 2) {
_root.enemyarray[ec].angle = Number(180) + Number(_root.enemyarray[ec].maths);
}
if (_root.enemyarray[ec].quad == 3) {
_root.enemyarray[ec].angle = Number(360) - Number(_root.enemyarray[ec].maths);
}
if (_root.enemyarray[ec].quad == 4) {
_root.enemyarray[ec].angle = Number(_root.enemyarray[ec].maths);
}
if (_root.enemyarray[ec].angle <= 180) {
if ((_root.enemyarray[ec]._rotation + 180) >= _root.enemyarray[ec].angle) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay);
} else if (_root.enemyarray[ec].angle >= _root.enemyarray[ec]._rotation) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay);
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.boss3turndelay);
}
} else if (_root.enemyarray[ec].angle > 180) {
if ((_root.enemyarray[ec].angle - 180) < _root.enemyarray[ec]._rotation) {
if (_root.enemyarray[ec]._rotation < _root.enemyarray[ec].angle) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay);
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.boss3turndelay);
}
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((360 - (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation)) / _root.boss3turndelay);
}
}
_root.enemyarray[ec].xmove = _root.boss3s * Math.cos((Math.PI/180) * _root.enemyarray[ec]._rotation);
_root.enemyarray[ec].ymove = _root.boss3s * Math.sin((Math.PI/180) * _root.enemyarray[ec]._rotation);
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + _root.enemyarray[ec].xmove;
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + _root.enemyarray[ec].ymove;
if (_root.enemyarray[ec].distance < 5) {
if (_root.difficulty == "easy") {
if (_root.boss3counter < (_root.boss3xarray.length - 1)) {
_root.boss3counter++;
} else {
_root.boss3counter = 0;
}
_root.boss3x = _root.boss3xarray[_root.boss3counter];
_root.boss3y = _root.boss3yarray[_root.boss3counter];
_root.boss3s = _root.boss3sarray[_root.boss3counter];
_root.boss3turndelay = _root.boss3turndelayarray[_root.boss3counter];
} else if (_root.difficulty == "expert") {
_root.boss3x = random(699) + 1;
_root.boss3y = random(499) + 1;
_root.boss3s = random(11) + 5;
_root.boss3turndelay = random(7) + 4;
}
}
} else if ((_root.enemyarray[ec].enemytypevar == "boss3body") or (_root.enemyarray[ec].enemytypevar == "boss3tail")) {
_root.enemyarray[ec].offx = _root.enemyarray[ec - 1].enemytype.attachpoint._x * Math.cos((_root.enemyarray[ec - 1]._rotation * Math.PI) / 180);
_root.enemyarray[ec].offy = _root.enemyarray[ec - 1].enemytype.attachpoint._x * Math.sin(((-_root.enemyarray[ec - 1]._rotation) * Math.PI) / 180);
_root.enemyarray[ec]._x = (_root.enemyarray[ec - 1]._x + _root.enemyarray[ec - 1].enemytype._x) + _root.enemyarray[ec].offx;
_root.enemyarray[ec]._y = (_root.enemyarray[ec - 1]._y + _root.enemyarray[ec - 1].enemytype._y) - _root.enemyarray[ec].offy;
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec - 1]._rotation - _root.enemyarray[ec]._rotation) / 7);
} else if (_root.enemyarray[ec].enemytypevar == "fboss") {
if (_root.fbossrest == false) {
if ((_root.enemyarray[ec]._x == _root.enemyarray[ec].destx) and (_root.enemyarray[ec]._y == _root.enemyarray[ec].desty)) {
_root.fbossarrive = true;
}
if (_root.fbossarrive == true) {
_root.enemyarray[ec].destx = random(300) + 300;
_root.enemyarray[ec].desty = random(300) + 100;
_root.fbossarrive = false;
}
if (Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > (0.6 * _root.boss1speed)) {
if (_root.enemyarray[ec]._x < _root.enemyarray[ec].destx) {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + (0.6 * _root.boss1speed);
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (0.6 * _root.boss1speed);
}
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
}
if (Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > (0.6 * _root.boss1speed)) {
if (_root.enemyarray[ec]._y < _root.enemyarray[ec].desty) {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + (0.6 * _root.boss1speed);
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y - (0.6 * _root.boss1speed);
}
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
}
_root.fbossrestcounter++;
if (_root.fbossrestcounter == _root.fbossresttime) {
_root.fbossrestcounter = 0;
_root.fbossticker = 0;
_root.e1w1pos = (_root.e2w1pos = (_root.e3w1pos = (_root.e4w1pos = (_root.e4w2pos = (_root.e5w1pos = (_root.e6w1pos = (_root.e7w1pos = 0)))))));
if (_root.enemyarray[ec].health > (450 * _root.health)) {
_root.fbosswave = 1;
} else if (_root.enemyarray[ec].health > (350 * _root.health)) {
_root.fbosswave = 2;
_root.assignx = 800;
_root.assigny = random(300) + 100;
_root.healthpowerupfunction();
} else if (_root.enemyarray[ec].health > 0) {
_root.fbosswave = 3;
}
_root.changeframes = true;
_root.assignx = 900;
_root.assigny = 250;
_root.minihealthpowerupfunction();
_root.fbossrest = true;
}
} else {
if (_root.enemyarray[ec]._x < 1500) {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + (0.6 * _root.boss1speed);
}
if (_root.changeframes == true) {
if (_root.enemyarray[ec]._x > (750 + _root.enemyarray[ec]._width)) {
_root.enemyarray[ec].enemytype.gotoAndStop("blank");
_root.changeframes = false;
}
}
_root.fbossrestcounter++;
if (_root.fbossrestcounter == 500) {
_root.enemyarray[ec].enemytype.gotoAndStop("fboss");
_root.fbossrest = false;
_root.fbossresttime = 625;
_root.changeframes = true;
_root.fbossrestcounter = 0;
_root.fbossarrive = true;
_root.fbosswave = 0;
}
}
_root.fbossnumber = ec;
} else if (_root.enemyarray[ec].enemytypevar == "launcher1") {
_root.enemyarray[ec]._x = (_root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x) + _root.enemyarray[_root.fbossnumber].enemytype.missile._x;
_root.enemyarray[ec]._y = (_root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y) + _root.enemyarray[_root.fbossnumber].enemytype.missile._y;
if (_root.changeframes == true) {
if (_root.fbossrest == true) {
if (_root.enemyarray[ec]._x > (700 + _root.enemyarray[ec]._width)) {
_root.enemyarray[ec].enemytype.gotoAndStop("blank");
}
} else {
_root.enemyarray[ec].enemytype.gotoAndStop("launcher");
if (ec == 1) {
_root.changeframes = false;
}
}
}
} else if (_root.enemyarray[ec].enemytypevar == "launcher2") {
_root.enemyarray[ec]._x = (_root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x) + _root.enemyarray[_root.fbossnumber].enemytype.missile2._x;
_root.enemyarray[ec]._y = (_root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y) + _root.enemyarray[_root.fbossnumber].enemytype.missile2._y;
if (_root.changeframes == true) {
if (_root.fbossrest == true) {
if (_root.enemyarray[ec]._x > (700 + _root.enemyarray[ec]._width)) {
_root.enemyarray[ec].enemytype.gotoAndStop("blank");
}
} else {
_root.enemyarray[ec].enemytype.gotoAndStop("launcher");
if (ec == 1) {
_root.changeframes = false;
}
}
}
} else if (_root.enemyarray[ec].enemytypevar == "launcher3") {
_root.enemyarray[ec]._x = (_root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x) + _root.enemyarray[_root.fbossnumber].enemytype.missile3._x;
_root.enemyarray[ec]._y = (_root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y) + _root.enemyarray[_root.fbossnumber].enemytype.missile3._y;
if (_root.changeframes == true) {
if (_root.fbossrest == true) {
if (_root.enemyarray[ec]._x > (700 + _root.enemyarray[ec]._width)) {
_root.enemyarray[ec].enemytype.gotoAndStop("blank");
}
} else {
_root.enemyarray[ec].enemytype.gotoAndStop("launcher");
if (ec == 1) {
_root.changeframes = false;
}
}
}
} else if (_root.enemyarray[ec].enemytypevar == "launcher4") {
_root.enemyarray[ec]._x = (_root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x) + _root.enemyarray[_root.fbossnumber].enemytype.missile4._x;
_root.enemyarray[ec]._y = (_root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y) + _root.enemyarray[_root.fbossnumber].enemytype.missile4._y;
if (_root.changeframes == true) {
if (_root.fbossrest == true) {
if (_root.enemyarray[ec]._x > (700 + _root.enemyarray[ec]._width)) {
_root.enemyarray[ec].enemytype.gotoAndStop("blank");
}
} else {
_root.enemyarray[ec].enemytype.gotoAndStop("launcher");
if (ec == 1) {
_root.changeframes = false;
}
}
}
} else if (_root.enemyarray[ec].enemytypevar == "rocket") {
if ((_root.enemyarray[ec]._x > 730) or (_root.enemyarray[ec]._x < -30)) {
_root.enemyarray[ec].removeMovieClip();
_root.enemyarray.splice(ec, 1);
}
if (_root.enemyarray[ec].deploy == true) {
_root.enemyarray[ec]._rotation = (_root.enemyarray[ec].angle * 180) / Math.PI;
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + (_root.enemyarray[ec].speedx * Math.cos(_root.enemyarray[ec].angle));
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + (_root.enemyarray[ec].speedy * Math.sin(_root.enemyarray[ec].angle));
_root.enemyarray[ec].deploytimer++;
if (_root.enemyarray[ec].deploytimer == 15) {
_root.enemyarray[ec].deploy = false;
}
} else if (_root.enemyarray[ec].deploy == false) {
_root.enemyarray[ec].diffx = int((_root.ship._x + _root.ship.shipmc._x) - _root.enemyarray[ec]._x);
_root.enemyarray[ec].diffy = int((_root.ship._y + _root.ship.shipmc._y) - _root.enemyarray[ec]._y);
if ((_root.enemyarray[ec].diffx > 0) && (_root.enemyarray[ec].diffy > 0)) {
_root.enemyarray[ec].quad = Number(4);
}
if ((_root.enemyarray[ec].diffx < 0) && (_root.enemyarray[ec].diffy > 0)) {
_root.enemyarray[ec].quad = Number(1);
}
if ((_root.enemyarray[ec].diffx < 0) && (_root.enemyarray[ec].diffy < 0)) {
_root.enemyarray[ec].quad = Number(2);
}
if ((_root.enemyarray[ec].diffx > 0) && (_root.enemyarray[ec].diffy < 0)) {
_root.enemyarray[ec].quad = Number(3);
}
_root.enemyarray[ec].abs_x = Math.abs(_root.enemyarray[ec].diffx);
_root.enemyarray[ec].abs_y = Math.abs(_root.enemyarray[ec].diffy);
_root.enemyarray[ec].tg = _root.enemyarray[ec].abs_y / _root.enemyarray[ec].abs_x;
_root.enemyarray[ec].maths = (Math.atan(_root.enemyarray[ec].tg) * Number(180)) / Math.PI;
_root.enemyarray[ec].distance = Math.sqrt(((_root.enemyarray[ec]._x - (_root.ship._x + _root.ship.shipmc._x)) ^ (2 + (_root.enemyarray[ec]._y - (_root.ship._y + _root.ship.shipmc._y)))) ^ 2);
if (_root.enemyarray[ec].quad == 1) {
_root.enemyarray[ec].angle = Number(180) - Number(_root.enemyarray[ec].maths);
} else if (_root.enemyarray[ec].quad == 2) {
_root.enemyarray[ec].angle = Number(180) + Number(_root.enemyarray[ec].maths);
} else if (_root.enemyarray[ec].quad == 3) {
_root.enemyarray[ec].angle = Number(360) - Number(_root.enemyarray[ec].maths);
} else if (_root.enemyarray[ec].quad == 4) {
_root.enemyarray[ec].angle = Number(_root.enemyarray[ec].maths);
}
_root.enemyarray[ec].xmove = _root.enemyarray[ec].speedx * Math.cos((Math.PI/180) * _root.enemyarray[ec].angle);
_root.enemyarray[ec].ymove = _root.enemyarray[ec].speedy * Math.sin((Math.PI/180) * _root.enemyarray[ec].angle);
if (_root.enemyarray[ec].angle <= 180) {
if ((_root.enemyarray[ec]._rotation + 180) >= _root.enemyarray[ec].angle) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay);
} else if (_root.enemyarray[ec].angle >= _root.enemyarray[ec]._rotation) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay);
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.enemyarray[ec].megahomingturndelay);
}
} else if (_root.enemyarray[ec].angle > 180) {
if ((_root.enemyarray[ec].angle - 180) < _root.enemyarray[ec]._rotation) {
if (_root.enemyarray[ec]._rotation < _root.enemyarray[ec].angle) {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation + ((_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay);
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.enemyarray[ec].megahomingturndelay);
}
} else {
_root.enemyarray[ec]._rotation = _root.enemyarray[ec]._rotation - ((360 - (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation)) / _root.enemyarray[ec].megahomingturndelay);
}
}
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + _root.enemyarray[ec].xmove;
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + _root.enemyarray[ec].ymove;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy1") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - _root.enemy1speed;
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + ((_root.ship._y - (_root.enemyarray[ec]._y - _root.enemyarray[ec].enemytype._height)) / 25);
} else if (_root.enemyarray[ec].enemytypevar == "enemy2") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed * 0.666666666666667);
if (_root.enemyarray[ec].e2arrive != false) {
_root.enemyarray[ec].nextpos = 500 - _root.enemyarray[ec]._y;
_root.enemyarray[ec].e2arrive = false;
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + (((_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y) / Math.abs(_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y)) * (_root.enemy1speed / 2));
if (Math.abs(_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y) < 5) {
_root.enemyarray[ec].e2arrive = true;
}
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy3") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed * 0.4);
} else if (_root.enemyarray[ec].enemytypevar == "enemy4") {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + ((_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) / 10);
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed / 2);
} else if (_root.enemyarray[ec].enemytypevar == "enemy4wave2") {
if ((_root.enemyarray[ec]._x == _root.enemyarray[ec].destx) and (_root.enemyarray[ec]._y == _root.enemyarray[ec].desty)) {
_root.enemyarray[ec].e4arrive = true;
}
if (_root.enemyarray[ec].e4arrive == true) {
_root.enemyarray[ec].destx = random(300) + 300;
_root.enemyarray[ec].desty = random(300) + 100;
_root.enemyarray[ec].e4arrive = false;
}
if (Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > _root.boss1speed) {
if (_root.enemyarray[ec]._x < _root.enemyarray[ec].destx) {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x + _root.boss1speed;
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - _root.boss1speed;
}
} else {
_root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
}
if (Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > _root.boss1speed) {
if (_root.enemyarray[ec]._y < _root.enemyarray[ec].desty) {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y + _root.boss1speed;
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec]._y - _root.boss1speed;
}
} else {
_root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
}
} else if (_root.enemyarray[ec].enemytypevar == "enemy5") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed / 4);
_root.enemyarray[ec].enemytype._rotation = _root.enemyarray[ec].enemytype._rotation + 8;
} else if (_root.enemyarray[ec].enemytypevar == "enemy6") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed / 3);
} else if (_root.enemyarray[ec].enemytypevar == "enemy7") {
_root.enemyarray[ec]._x = _root.enemyarray[ec]._x - (_root.enemy1speed / 3.5);
}
ec--;
}
};
_root.bulletarray = new Array();
_root.red1 = function () {
_root.interval = 5;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].shottype = "red1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.red2 = function () {
_root.interval = 5;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("red2");
_root["bullet" + _root.depth].shottype = "red2";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.red3 = function () {
_root.interval = 5;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("red3");
_root["bullet" + _root.depth].shottype = "red3";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.red4 = function () {
_root.interval = 6;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.x20;
_root["bullet" + _root.depth].yvalue = _root.y20;
_root["bullet" + _root.depth]._rotation = 20;
_root["bullet" + _root.depth].gotoAndStop("red2");
_root["bullet" + _root.depth].shottype = "red4";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("red2");
_root["bullet" + _root.depth].shottype = "red4";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
_root["bullet" + _root.depth].xvalue = _root.x20;
_root["bullet" + _root.depth].yvalue = -_root.y20;
_root["bullet" + _root.depth]._rotation = -20;
_root["bullet" + _root.depth].gotoAndStop("red2");
_root["bullet" + _root.depth].shottype = "red4";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.sred = function () {
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.sredx;
_root["bullet" + _root.depth]._y = _root.sredy;
_root["bullet" + _root.depth].destx = 100;
_root["bullet" + _root.depth].desty = 100;
_root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
_root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
_root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy, _root["bullet" + _root.depth].diffx);
_root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].gotoAndStop("bomb");
_root["bullet" + _root.depth].shottype = "sred";
_root["bullet" + _root.depth].exploding = false;
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.sredx;
_root["bullet" + _root.depth]._y = _root.sredy;
_root["bullet" + _root.depth].destx = 600;
_root["bullet" + _root.depth].desty = 100;
_root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
_root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
_root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy, _root["bullet" + _root.depth].diffx);
_root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].gotoAndStop("bomb");
_root["bullet" + _root.depth].shottype = "sred";
_root["bullet" + _root.depth].exploding = false;
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.sredx;
_root["bullet" + _root.depth]._y = _root.sredy;
_root["bullet" + _root.depth].destx = 100;
_root["bullet" + _root.depth].desty = 400;
_root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
_root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
_root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy, _root["bullet" + _root.depth].diffx);
_root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].gotoAndStop("bomb");
_root["bullet" + _root.depth].shottype = "sred";
_root["bullet" + _root.depth].exploding = false;
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.sredx;
_root["bullet" + _root.depth]._y = _root.sredy;
_root["bullet" + _root.depth].destx = 600;
_root["bullet" + _root.depth].desty = 400;
_root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
_root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
_root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy, _root["bullet" + _root.depth].diffx);
_root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
_root["bullet" + _root.depth].gotoAndStop("bomb");
_root["bullet" + _root.depth].shottype = "sred";
_root["bullet" + _root.depth].exploding = false;
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.blue1 = function () {
_root.interval = 10;
_root.shot.duplicateMovieClip("bullet" + _root.bluedepth, _root.bluedepth);
_root["bullet" + _root.bluedepth]._x = _root.ship._x;
_root["bullet" + _root.bluedepth]._y = _root.ship._y;
_root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
_root["bullet" + _root.bluedepth].yvalue = 0;
_root["bullet" + _root.bluedepth].gotoAndStop("blue1");
_root["bullet" + _root.bluedepth].shottype = "blue1";
_root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
_root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
_root.blueready = false;
_root["bullet" + _root.bluedepth].explodedelay = 0;
};
_root.blue2 = function () {
_root.interval = 11;
_root.shot.duplicateMovieClip("bullet" + _root.bluedepth, _root.bluedepth);
_root["bullet" + _root.bluedepth]._x = _root.ship._x;
_root["bullet" + _root.bluedepth]._y = _root.ship._y;
_root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
_root["bullet" + _root.bluedepth].yvalue = 0;
_root["bullet" + _root.bluedepth].gotoAndStop("blue2");
_root["bullet" + _root.bluedepth].shottype = "blue2";
_root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
_root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
_root["bullet" + _root.bluedepth].explodedelay = 0;
};
_root.blue3 = function () {
_root.interval = 11;
_root.shot.duplicateMovieClip("bullet" + _root.bluedepth, _root.bluedepth);
_root["bullet" + _root.bluedepth]._x = _root.ship._x;
_root["bullet" + _root.bluedepth]._y = _root.ship._y;
_root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
_root["bullet" + _root.bluedepth].yvalue = 0;
_root["bullet" + _root.bluedepth].gotoAndStop("blue3");
_root["bullet" + _root.bluedepth].shottype = "blue3";
_root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
_root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
_root["bullet" + _root.bluedepth].explodedelay = 0;
};
_root.blue4 = function () {
_root.interval = 12;
_root.shot.duplicateMovieClip("bullet" + _root.bluedepth, _root.bluedepth);
_root["bullet" + _root.bluedepth]._x = _root.ship._x;
_root["bullet" + _root.bluedepth]._y = _root.ship._y;
_root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
_root["bullet" + _root.bluedepth].yvalue = 0;
_root["bullet" + _root.bluedepth].gotoAndStop("blue4");
_root["bullet" + _root.bluedepth].shottype = "blue4";
_root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
_root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
_root["bullet" + _root.bluedepth].explodedelay = 0;
};
_root.sblue = function () {
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.sbluex;
_root["bullet" + _root.depth]._y = _root.sbluey;
_root["bullet" + _root.depth].xvalue = _root.powerupspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("sblue");
_root["bullet" + _root.depth].shottype = "sblue";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.green1 = function () {
_root.interval = 6;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
_root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green1");
_root["bullet" + _root.depth].shottype = "green1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.green2 = function () {
_root.interval = 5;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
_root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green2");
_root["bullet" + _root.depth].shottype = "green2";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.green3 = function () {
_root.interval = 5;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
_root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green3");
_root["bullet" + _root.depth].shottype = "green3";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.green4 = function () {
_root.interval = 4;
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
_root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green4");
_root["bullet" + _root.depth].shottype = "green4";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.firelaser = function () {
if (_root.status.mask.laser._xscale == 100) {
_root.lasersound.start(0, 0);
_root.shot.duplicateMovieClip("bullet" + _root.bluedepth, _root.bluedepth);
_root["bullet" + _root.bluedepth].gotoAndStop("laser");
_root["bullet" + _root.bluedepth]._x = _root.ship._x + _root.ship.laser._x;
_root["bullet" + _root.bluedepth]._y = _root.ship._y + _root.ship.laser._y;
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
_root["bullet" + _root.bluedepth].xvalue = 40;
_root["bullet" + _root.bluedepth].yvalue = 0;
_root.status.mask.laser._xscale = 0;
_root["bullet" + _root.bluedepth].shottype = "laser";
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
}
};
_root.firehmfunction = function () {
_root.megahoming.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.missile._x;
_root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.missile._y;
if (_root.enemyarray.length >= 1) {
_root["bullet" + _root.depth].enemynumber = Number(_root.targetenemy);
_root["bullet" + _root.depth].targetname = _root.enemyarray[_root.targetenemy]._name;
_root["bullet" + _root.depth].targetname._visible = true;
} else {
_root["bullet" + _root.depth].targetname._visible = false;
}
_root["bullet" + _root.depth].megahomingacceleratex = 2;
_root["bullet" + _root.depth].megahomingacceleratey = 2;
_root["bullet" + _root.depth].megahomingturndelay = 3;
_root["bullet" + _root.depth].deploy = true;
_root["bullet" + _root.depth].deployrate = 5;
_root["bullet" + _root.depth].speedx = 0;
_root["bullet" + _root.depth].speedy = 0;
_root["bullet" + _root.depth].shottype = "homingmissile";
_root.bulletarray.push(_root["bullet" + _root.depth]);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.firebomb = function () {
if (_root.numberofbombs >= 0) {
if (_root.bombfire == true) {
if (_root.bombsound == false) {
_root.bombexplodesound.start(0, 0);
_root.bombsound = true;
}
_root.bomb1.bomb.gotoAndStop(2);
_root.bombexplode = true;
}
if (_root.numberofbombs > 0) {
if (_root.bombfire == false) {
_root.shot.duplicateMovieClip("bomb1", _root.bluedepth);
_root.bomb1.gotoAndStop("bomb");
_root.bomb1._x = _root.ship._x + _root.ship.bomb._x;
_root.bomb1._y = _root.ship._y + _root.ship.bomb._y;
_root.bomb1.xvalue = 20;
_root.bomb1.shottype = "bomb";
_root.bombfire = true;
_root.numberofbombs--;
_root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
_root.bulletarray[_root.bulletarray.length] = _root.bomb1;
if (_root.bluedepth < 100040) {
_root.bluedepth++;
} else {
_root.bluedepth = 100010 /* 0x0186AA */;
}
}
}
}
};
_root.bulletmovement = function () {
if (_root.bulletarray.length > 0) {
var bc = (_root.bulletarray.length - 1);
while (bc >= 0) {
if (_root.bulletarray[bc]._name eq "") {
_root.bulletarray.splice(bc, 1);
}
if (_root.bulletarray[bc].enemyshottype == "fbossgun") {
if (Math.abs(_root.bulletarray[bc]._y - _root.bulletarray[bc].desty) > 5) {
if (_root.bulletarray[bc]._y > _root.bulletarray[bc].desty) {
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y - 10;
} else {
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y + 10;
}
} else {
_root.bulletarray[bc].desty = _root.bulletarray[bc].starty + (_root.bulletarray[bc].starty - _root.bulletarray[bc].desty);
}
}
if ((((((_root.bulletarray[bc].enemyshottype != "boss2laser1") and (_root.bulletarray[bc].enemyshottype != "boss2laser2")) and (_root.bulletarray[bc].enemyshottype != "enemymissilet")) and (_root.bulletarray[bc].enemyshottype != "enemymissileb")) and (_root.bulletarray[bc].shottype != "homingmissile")) and (_root.bulletarray[bc].shottype != "bomb")) {
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x + _root.bulletarray[bc].xvalue;
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y + _root.bulletarray[bc].yvalue;
if (_root.bulletarray[bc].shottype == "sred") {
if ((Math.abs(_root.bulletarray[bc]._x - _root.bulletarray[bc].destx) < 15) and (Math.abs(_root.bulletarray[bc]._y - _root.bulletarray[bc].desty) < 15)) {
if (_root.bulletarray[bc].exploding == false) {
_root.bulletarray[bc].bomb.gotoAndStop(2);
_root.bombexplodesound.stop();
_root.bombexplodesound.start(0, 0);
_root.bulletarray[bc].xvalue = 0;
_root.bulletarray[bc].yvalue = 0;
_root.bulletarray[bc].exploding = true;
}
}
}
} else if (_root.bulletarray[bc].enemyshottype == "boss2laser1") {
_root.bulletarray[bc]._x = (_root.enemyarray[_root.enemyarray.length - 1]._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype._x) + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun._x;
_root.bulletarray[bc]._y = (_root.enemyarray[_root.enemyarray.length - 1]._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype._y) + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun._y;
} else if (_root.bulletarray[bc].enemyshottype == "boss2laser2") {
_root.bulletarray[bc]._x = (_root.enemyarray[_root.enemyarray.length - 1]._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype._x) + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun2._x;
_root.bulletarray[bc]._y = (_root.enemyarray[_root.enemyarray.length - 1]._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype._y) + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun2._y;
} else if (_root.bulletarray[bc].shottype == "homingmissile") {
if ((_root.bulletarray[bc]._x > 730) or (_root.bulletarray[bc]._x < -30)) {
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
}
if (_root.bulletarray[bc].deploy == true) {
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y + _root.bulletarray[bc].deployrate;
_root.bulletarray[bc].deployrate = _root.bulletarray[bc].deployrate - 0.5;
if (_root.bulletarray[bc].deployrate <= 0) {
_root.bulletarray[bc].deployrate = false;
}
}
if (_root.bulletarray[bc].deployrate <= 3) {
_root.bulletarray[bc].gotoAndStop("boost");
if (_root[_root.bulletarray[bc].targetname]._visible == true) {
diffx = int((_root[_root.bulletarray[bc].targetname]._x + _root[_root.bulletarray[bc].targetname].enemytype._x) - _root.bulletarray[bc]._x);
diffy = int((_root[_root.bulletarray[bc].targetname]._y + _root[_root.bulletarray[bc].targetname].enemytype._y) - _root.bulletarray[bc]._y);
if ((diffx > 0) && (diffy > 0)) {
quad = Number(4);
}
if ((diffx < 0) && (diffy > 0)) {
quad = Number(1);
}
if ((diffx < 0) && (diffy < 0)) {
quad = Number(2);
}
if ((diffx > 0) && (diffy < 0)) {
quad = Number(3);
}
abs_x = Math.abs(diffx);
abs_y = Math.abs(diffy);
tg = abs_y / abs_x;
_root.maths = (Math.atan(tg) * Number(180)) / Math.PI;
distance = Math.sqrt(((_root.bulletarray[bc]._x - _root.bulletarray[bc].targetx) ^ (2 + (_root.bulletarray[bc]._y - _root.bulletarray[bc].targety))) ^ 2);
if (quad == 1) {
angle = Number(180) - Number(_root.maths);
}
if (quad == 2) {
angle = Number(180) + Number(_root.maths);
}
if (quad == 3) {
angle = Number(360) - Number(_root.maths);
}
if (quad == 4) {
angle = Number(_root.maths);
}
xmove = _root.bulletarray[bc].speedx * Math.cos((Math.PI/180) * angle);
ymove = _root.bulletarray[bc].speedy * Math.sin((Math.PI/180) * angle);
_root.bulletarray[bc].speedx = _root.bulletarray[bc].speedx + 2;
_root.bulletarray[bc].speedy = _root.bulletarray[bc].speedy + 2;
if (angle <= 180) {
if ((_root.bulletarray[bc]._rotation + 180) >= angle) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation + ((angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay);
} else if (angle >= _root.bulletarray[bc]._rotation) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation + ((angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay);
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - ((_root.bulletarray[bc]._rotation - angle) / _root.bulletarray[bc].megahomingturndelay);
}
} else if (angle > 180) {
if ((angle - 180) < _root.bulletarray[bc]._rotation) {
if (_root.bulletarray[bc]._rotation < angle) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation + ((angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay);
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - ((_root.bulletarray[bc]._rotation - angle) / _root.bulletarray[bc].megahomingturndelay);
}
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - ((360 - (angle - _root.bulletarray[bc]._rotation)) / _root.bulletarray[bc].megahomingturndelay);
}
}
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x + xmove;
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y + ymove;
} else {
if (_root.bulletarray[bc]._rotation != 0) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - (_root.bulletarray[bc]._rotation / megahomingturndelay);
}
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x + _root.bulletarray[bc].megahomingacceleratex;
_root.bulletarray[bc].megahomingacceleratex = _root.bulletarray[bc].megahomingacceleratex + 2;
}
}
} else if (_root.bulletarray[bc].shottype == "bomb") {
if (_root.bombexplode != true) {
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x + _root.bulletarray[bc].xvalue;
}
} else if (_root.bulletarray[bc].enemyshottype == "enemymissilet") {
if (_root.bulletarray[bc].deploy != false) {
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y - _root.bulletarray[bc].deployrate;
_root.bulletarray[bc].deployrate--;
if (_root.bulletarray[bc].angle2 > _root.bulletarray[bc]._rotation) {
if ((_root.bulletarray[bc].angle2 - _root.bulletarray[bc]._rotation) > 20) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation + 20;
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2;
}
} else if ((_root.bulletarray[bc]._rotation - _root.bulletarray[bc].angle2) > 50) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - 50;
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2;
}
if (_root.bulletarray[bc].deployrate <= 0) {
_root.bulletarray[bc].speed = 5;
_root.bulletarray[bc].xvalue = Math.cos(_root.bulletarray[bc].angle);
_root.bulletarray[bc].yvalue = Math.sin(_root.bulletarray[bc].angle);
_root.bulletarray[bc].deploy = false;
}
} else {
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x - (_root.bulletarray[bc].speed * _root.bulletarray[bc].xvalue);
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y - (_root.bulletarray[bc].speed * _root.bulletarray[bc].yvalue);
_root.bulletarray[bc].speed = _root.bulletarray[bc].speed + 2;
}
} else if (_root.bulletarray[bc].enemyshottype == "enemymissileb") {
if (_root.bulletarray[bc].deploy != false) {
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y + _root.bulletarray[bc].deployrate;
_root.bulletarray[bc].deployrate--;
if (_root.bulletarray[bc].angle2 > _root.bulletarray[bc]._rotation) {
if ((_root.bulletarray[bc].angle2 - _root.bulletarray[bc]._rotation) > 50) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation + 50;
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2;
}
} else if ((_root.bulletarray[bc]._rotation - _root.bulletarray[bc].angle2) > 50) {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc]._rotation - 50;
} else {
_root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2;
}
if (_root.bulletarray[bc].deployrate <= 0) {
_root.bulletarray[bc].speed = 5;
_root.bulletarray[bc].xvalue = Math.cos(_root.bulletarray[bc].angle);
_root.bulletarray[bc].yvalue = Math.sin(_root.bulletarray[bc].angle);
_root.bulletarray[bc].deploy = false;
}
} else {
_root.bulletarray[bc]._x = _root.bulletarray[bc]._x - (_root.bulletarray[bc].speed * _root.bulletarray[bc].xvalue);
_root.bulletarray[bc]._y = _root.bulletarray[bc]._y - (_root.bulletarray[bc].speed * _root.bulletarray[bc].yvalue);
_root.bulletarray[bc].speed = _root.bulletarray[bc].speed + 2;
}
}
if (_root.bulletarray[bc].enemyshottype == "boss3") {
if (_root.bulletarray[bc].follow < 25) {
_root.bulletarray[bc].follow++;
_root.bulletarray[bc].diffx = _root.bulletarray[bc]._x - (_root.ship._x + _root.ship.shipmc._x);
_root.bulletarray[bc].diffy = _root.bulletarray[bc]._y - (_root.ship._y + _root.ship.shipmc._y);
_root.bulletarray[bc].angle = Math.atan2(_root.bulletarray[bc].diffy, _root.bulletarray[bc].diffx);
_root.bulletarray[bc].xvalue = -7 * Math.cos(_root.bulletarray[bc].angle);
_root.bulletarray[bc].yvalue = -7 * Math.sin(_root.bulletarray[bc].angle);
}
}
if (_root.bulletarray[bc].shottype == "enemy") {
if ((_root.bulletarray[bc].hitTest(_root.ship.protector.sphere) or _root.bulletarray[bc].hitTest(_root.ship.protector2.sphere)) or _root.bulletarray[bc].hitTest(_root.bomb1)) {
if (((_root.bulletarray[bc].enemyshottype != "boss2laser1") and (_root.bulletarray[bc].enemyshottype != "boss2laser2")) and (_root.bulletarray[bc].enemyshottype != "fbosslaser")) {
if (_root.bulletarray[bc].hitTest(_root.ship.protector.sphere)) {
_root.protector1health = _root.protector1health - 1;
if ((_root.protector1health < 7) and (_root.protector1health > 2)) {
_root.ship.protector.sphere.gotoAndStop("half");
} else if ((_root.protector1health <= 2) and (_root.protector1health >= 0)) {
_root.ship.protector.sphere.gotoAndStop("critical");
} else if (_root.protector1health < 0) {
trace("Protector1 Gone");
if (_root.protectorlevel > 2) {
_root.protectorframe = _root.ship.protector2._currentframe - 19;
if (_root.protectorframe < 3) {
_root.protectorframe = 41 + _root.protectorframe;
}
_root.protectorlevel = 2;
if (_root.autorotate == true) {
_root.ship.protector.gotoAndPlay(_root.protectorframe);
} else {
_root.ship.protector.gotoAndStop(_root.protectorframe);
}
_root.protector1health = _root.protector2health;
if ((_root.protector1health < 7) and (_root.protector1health > 2)) {
_root.ship.protector.sphere.gotoAndStop("half");
} else if ((_root.protector1health <= 2) and (_root.protector1health >= 0)) {
_root.ship.protector.sphere.gotoAndStop("critical");
}
} else {
_root.protectorlevel = 0;
}
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = (_root.ship._x + _root.ship.protector._x) + _root.ship.protector.sphere._x;
_root["shipexplosion" + _root.depth]._y = (_root.ship._y + _root.ship.protector._y) + _root.ship.protector.sphere._y;
_root["shipexplosion" + _root.depth]._xscale = (_root["shipexplosion" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
}
if (_root.bulletarray[bc].hitTest(_root.ship.protector2.sphere)) {
_root.protector2health = _root.protector2health - 1;
if ((_root.protector2health < 7) and (_root.protector2health > 2)) {
_root.ship.protector2.sphere.gotoAndStop("half");
} else if ((_root.protector2health <= 2) and (_root.protector2health >= 0)) {
_root.ship.protector2.sphere.gotoAndStop("critical");
} else if (_root.protector2health < 0) {
trace("Protector2 Gone");
_root.protectorlevel = 2;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = (_root.ship._x + _root.ship.protector2._x) + _root.ship.protector2.sphere._x;
_root["shipexplosion" + _root.depth]._y = (_root.ship._y + _root.ship.protector2._y) + _root.ship.protector2.sphere._y;
_root["shipexplosion" + _root.depth]._xscale = (_root["shipexplosion" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
}
}
if (_root.boss2stoplaser == true) {
if ((_root.bulletarray[bc].enemyshottype == "boss2laser1") or (_root.bulletarray[bc].enemyshottype == "boss2laser2")) {
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
}
}
if (_root.bulletarray[bc].hitTest(_root.ship.shipmc)) {
_root.hitship = true;
_root.shieldfadein = true;
_root.checkhealth = true;
if (_root.difficulty == "expert") {
_root.hitshipcounter++;
if (_root.hitshipcounter == 6) {
if (_root.weaponnumber > 1) {
_root.weaponnumber--;
}
_root.hitshipcounter = 0;
}
}
if (_root.bulletarray[bc].enemyshottype == "shot1") {
_root.shipshield = _root.shipshield - 5;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if ((_root.bulletarray[bc].enemyshottype == "enemymissilet") or (_root.bulletarray[bc].enemyshottype == "enemymissileb")) {
_root.shipshield = _root.shipshield - 7;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "enemy7") {
_root.shipshield = _root.shipshield - 8;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "boss1electric") {
_root.shipshield = _root.shipshield - 8;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "boss1canon") {
_root.mhexplosion.stop();
_root.mhexplosion.start(0, 0);
_root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth, _root.depth);
_root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x;
_root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y;
_root["mhexplode" + _root.depth]._xscale = (_root["mhexplode" + _root.depth]._yscale = 300);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.shipshield = _root.shipshield - 15;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if ((_root.bulletarray[bc].enemyshottype == "boss2laser1") or (_root.bulletarray[bc].enemyshottype == "boss2laser2")) {
_root.shipshield = _root.shipshield - 2;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
} else if (_root.bulletarray[bc].enemyshottype == "boss2gun") {
_root.shipshield = _root.shipshield - 6;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "boss2big") {
_root.shipshield = _root.shipshield - 10;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "boss3") {
_root.shipshield = _root.shipshield - 4;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].enemyshottype == "fbossgun") {
_root.shipshield = _root.shipshield - 6;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if ((_root.bulletarray[bc].enemyshottype == "fbosslaser") or (_root.bulletarray[bc].enemyshottype == "boss2laser2")) {
_root.shipshield = _root.shipshield - 1;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
}
}
} else if (_root.bulletarray[bc].shottype != "enemy") {
if ((_root.bulletarray[bc].shottype == "airmine") and _root.bulletarray[bc].hitTest(_root.ship.shipmc)) {
_root.shipshield = _root.shipshield - 0.3;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
}
i = 0;
while (i < _root.enemyarray.length) {
if (_root.bulletarray[bc].hitTest(_root.enemyarray[i].enemytype)) {
_root.hitenemy = _root.enemyarray[i]._name;
if ((((((((_root.bulletarray[bc].shottype != "blue1") and (_root.bulletarray[bc].shottype != "blue4")) and (_root.bulletarray[bc].shottype != "blue3")) and (_root.bulletarray[bc].shottype != "blue2")) and (_root.bulletarray[bc].shottype != "sblue")) and (_root.bulletarray[bc].shottype != "bomb")) and (_root.bulletarray[bc].shottype != "sred")) and (_root.bulletarray[bc].shottype != "sgreen")) {
if (_root.bulletarray[bc].xvalue >= 0) {
_root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth, _root.depth);
_root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x + 20;
_root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y;
_root["mhexplode" + _root.depth]._xscale = (_root["mhexplode" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else {
_root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth, _root.depth);
_root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x - 20;
_root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y;
_root["mhexplode" + _root.depth]._xscale = (_root["mhexplode" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
} else if ((((_root.bulletarray[bc].shottype != "sblue") and (_root.bulletarray[bc].shottype != "bomb")) and (_root.bulletarray[bc].shottype != "sred")) and (_root.bulletarray[bc].shottype != "sgreen")) {
_root.bulletarray[bc].explodedelay++;
if (_root.bulletarray[bc].explodedelay == 3) {
_root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth, _root.depth);
_root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x + 30;
_root["mhexplode" + _root.depth]._y = (_root.enemyarray[i]._y + _root.enemyarray[i].enemytype._y) + (random(30) - 15);
_root["mhexplode" + _root.depth]._xscale = (_root["mhexplode" + _root.depth]._yscale = 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.bulletarray[bc].explodedelay = 0;
}
}
if (_root.bulletarray[bc].shottype == "homingmissile") {
_root.mhexplosion.stop();
_root.mhexplosion.start(0, 0);
_root.enemyarray[i].health = _root.enemyarray[i].health - 2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "red1") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 1.5;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 1.5;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "red2") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 1.9;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 1.9;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "red3") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2.3;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2.3;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "red4") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2.7;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2.7;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "sred") {
if (_root.bulletarray[bc].exploding == true) {
_root.enemyarray[i].health = _root.enemyarray[i].health - 1;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.2;
}
}
} else if (_root.bulletarray[bc].shottype == "blue1") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 0.3;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.3;
}
} else if (_root.bulletarray[bc].shottype == "blue2") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 0.34;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.36;
}
} else if (_root.bulletarray[bc].shottype == "blue3") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 0.48;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.42;
}
} else if (_root.bulletarray[bc].shottype == "blue4") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 0.42;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.47;
}
} else if (_root.bulletarray[bc].shottype == "sblue") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.4;
}
} else if (_root.bulletarray[bc].shottype == "green1") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 1.8;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 1.8;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "green2") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "green3") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2.2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2.4;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "green4") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2.5;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 2.5;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
} else if (_root.bulletarray[bc].shottype == "sgreen") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.4;
}
} else if (_root.bulletarray[bc].shottype == "laser") {
_root.enemyarray[i].health = _root.enemyarray[i].health - 3.5;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 1.17;
}
} else if (_root.bulletarray[bc].shottype == "bomb") {
if (_root.bombexplode == true) {
_root.enemyarray[i].health = _root.enemyarray[i].health - 2;
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.boss3health = _root.boss3health - 0.4;
}
}
}
_root.enemyarray[i].gotoAndPlay("hit");
if (((_root.enemyarray[i].enemytypevar == "boss3head") or (_root.enemyarray[i].enemytypevar == "boss3body")) or (_root.enemyarray[i].enemytypevar == "boss3tail")) {
_root.enemyarray[_root.enemyarray.length - 1].gotoAndPlay("hit");
_root.enemyarray[_root.enemyarray.length - 2].gotoAndPlay("hit");
_root.enemyarray[_root.enemyarray.length - 3].gotoAndPlay("hit");
_root.enemyarray[_root.enemyarray.length - 4].gotoAndPlay("hit");
_root.enemyarray[_root.enemyarray.length - 5].gotoAndPlay("hit");
}
}
i++;
}
}
if (_root.bulletarray[bc].xvalue > 0) {
if (((_root.bulletarray[bc]._x > 730) or (_root.bulletarray[bc]._y < -50)) or (_root.bulletarray[bc]._y > 550)) {
if (_root.bulletarray[bc].shottype == "bomb") {
_root.bombfire = false;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
}
} else if (_root.bulletarray[bc].xvalue < 0) {
if (((_root.bulletarray[bc]._x < -30) or (_root.bulletarray[bc]._y < -50)) or (_root.bulletarray[bc]._y > 550)) {
if (_root.bulletarray[bc].shottype == "bomb") {
_root.bombfire = false;
}
_root.bulletarray[bc].removeMovieClip();
_root.bulletarray.splice(bc, 1);
}
}
bc--;
}
}
};
_root.powerupmove = function () {
var pu = (_root.poweruparray.length - 1);
while (pu >= 0) {
_root.poweruparray[pu]._x = _root.poweruparray[pu]._x + _root.powerupspeed;
if (_root.poweruparray[pu]._x < -50) {
_root.poweruparray[pu].removeMovieClip();
}
if (_root.poweruparray[pu].poweruptype == "weapon") {
if (_root.poweruparray[pu].needchange == true) {
if (_root.poweruparray[pu].ticks2 < 20) {
_root.poweruparray[pu].ticks2++;
} else {
_root.poweruparray[pu].ticks2 = 0;
_root.poweruparray[pu].needchange = false;
_root.poweruparray[pu].play();
}
}
}
if (_root.poweruparray[pu].hitTest(_root.ship.shipmc)) {
if (_root.poweruparray[pu].poweruptype == "weapon") {
_root.weaponpowersound.stop();
_root.weaponpowersound.start(0, 0);
if (_root.weapontype == _root.poweruparray[pu].weaponpowercolor) {
if (_root.levelnumber == 1) {
if (_root.weaponnumber < 2) {
_root.weaponnumber++;
} else if (_root.poweruparray[pu].weaponpowercolor == "red") {
_root.sredx = _root.poweruparray[pu]._x;
_root.sredy = _root.poweruparray[pu]._y;
_root.sred();
} else if (_root.poweruparray[pu].weaponpowercolor == "blue") {
_root.sbluex = _root.poweruparray[pu]._x;
_root.sbluey = _root.poweruparray[pu]._y;
_root.sblue();
} else if (_root.poweruparray[pu].weaponpowercolor == "green") {
_root.sgreenfunction = true;
_root.sgreentimer = 0;
}
} else if (_root.levelnumber == 2) {
if (_root.weaponnumber < 3) {
_root.weaponnumber++;
} else if (_root.poweruparray[pu].weaponpowercolor == "red") {
_root.sredx = _root.poweruparray[pu]._x;
_root.sredy = _root.poweruparray[pu]._y;
_root.sred();
} else if (_root.poweruparray[pu].weaponpowercolor == "blue") {
_root.sbluex = _root.poweruparray[pu]._x;
_root.sbluey = _root.poweruparray[pu]._y;
_root.sblue();
} else if (_root.poweruparray[pu].weaponpowercolor == "green") {
_root.sgreenfunction = true;
_root.sgreentimer = 0;
}
} else if (_root.levelnumber >= 3) {
if (_root.weaponnumber < 4) {
_root.weaponnumber++;
} else if (_root.poweruparray[pu].weaponpowercolor == "red") {
_root.sredx = _root.poweruparray[pu]._x;
_root.sredy = _root.poweruparray[pu]._y;
_root.sred();
} else if (_root.poweruparray[pu].weaponpowercolor == "blue") {
_root.sbluex = _root.poweruparray[pu]._x;
_root.sbluey = _root.poweruparray[pu]._y;
_root.sblue();
} else if (_root.poweruparray[pu].weaponpowercolor == "green") {
_root.sgreenfunction = true;
_root.sgreentimer = 0;
}
}
} else {
_root.transform = true;
}
_root.weapontype = _root.poweruparray[pu].weaponpowercolor;
_root.poweruparray[pu].removeMovieClip();
} else if (_root.poweruparray[pu].poweruptype == "missile") {
_root.missilepowersound.stop();
_root.missilepowersound.start(0, 0);
if (_root.mhlevel < 5) {
_root.mhlevel++;
_root.whichmissileframe = "level" + _root.mhlevel;
_root.status.mask.missile.gotoAndStop(_root.whichmissileframe);
} else if (_root.mode == "mission") {
_root.totalscore = _root.totalscore + 10;
_root.status.score = int(_root.totalscore);
} else if (_root.mode == "survival") {
_root.totalscore2 = _root.totalscore2 + 10;
_root.status.score = int(_root.totalscore2);
}
} else if (_root.poweruparray[pu].poweruptype == "bomb") {
_root.bombpowersound.stop();
_root.bombpowersound.start(0, 0);
if (_root.numberofbombs < 15) {
_root.numberofbombs++;
_root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
} else if (_root.mode == "stage") {
_root.totalscore = _root.totalscore + 10;
_root.status.score = int(_root.totalscore);
} else if (_root.mode == "survival") {
_root.totalscore2 = _root.totalscore2 + 10;
_root.status.score = int(_root.totalscore2);
}
} else if (_root.poweruparray[pu].poweruptype == "health") {
_root.healthpowersound.stop();
_root.healthpowersound.start(0, 0);
if (_root.shipshield > 35) {
_root.shipshield = 50;
} else {
_root.shipshield = _root.shipshield + 15;
}
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
} else if (_root.poweruparray[pu].poweruptype == "minihealth") {
_root.healthpowersound.stop();
_root.healthpowersound.start(0, 0);
if (_root.shipshield > 45) {
_root.shipshield = 50;
} else {
_root.shipshield = _root.shipshield + 5;
}
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
} else if (_root.poweruparray[pu].poweruptype == "protector") {
_root.protectorpowersound.stop();
_root.protectorpowersound.start(0, 0);
_root.protector1health = (_root.protector2health = 15);
_root.ship.protector.sphere.gotoAndStop("full");
_root.ship.protector2.sphere.gotoAndStop("full");
if (_root.protectorlevel < 4) {
_root.protectorlevel++;
if (_root.protectorlevel > 2) {
_root.ship.protector2.gotoAndStop("protector");
} else if (_root.protectorlevel == 1) {
_root.ship.protector.gotoAndStop("protector");
}
} else if (_root.mode == "stage") {
_root.totalscore = _root.totalscore + 10;
_root.status.score = int(_root.totalscore);
} else if (_root.mode == "survival") {
_root.totalscore2 = _root.totalscore2 + 10;
_root.status.score = int(_root.totalscore2);
}
}
_root.poweruparray[pu].removeMovieClip();
_root.poweruparray.splice(pu, 1);
}
pu--;
}
};
_root.getkey = function () {
var k = Key.isDown;
kleft = k(_root.leftkey);
kright = k(_root.rightkey);
kup = k(_root.upkey);
kdown = k(_root.downkey);
kspace = k(_root.firekey);
if (kup) {
_root.ship._y = _root.ship._y - _root.speed;
if (_root.ship._y < _root.top_border) {
_root.ship._y = _root.top_border;
}
}
if (kdown) {
_root.ship._y = _root.ship._y + _root.speed;
if (_root.ship._y > _root.bottom_border) {
_root.ship._y = _root.bottom_border;
}
}
if (kright) {
_root.ship._x = _root.ship._x + _root.speed;
if (_root.ship._x > _root.right_border) {
_root.ship._x = _root.right_border;
}
}
if (kleft) {
_root.ship._x = _root.ship._x - _root.speed;
if (_root.ship._x < _root.left_border) {
_root.ship._x = _root.left_border;
}
}
_root.firetimer++;
if (kspace && (_root.firetimer >= _root.interval)) {
if (_root.weapontype == "red") {
_root.redsound.stop();
_root.redsound.start(0, 0);
} else if (_root.weapontype == "blue") {
_root.bluesound.stop();
_root.bluesound.start(0, 0);
} else if (_root.weapontype == "green") {
_root.greensound.stop();
_root.greensound.start(0, 0);
}
_root[_root.weapontype + _root.weaponnumber]();
_root.firetimer = 0;
}
};
function clean() {
_root.status._visible = false;
_root.ship._x = -200;
_root.ship._y = -200;
_root.target._x = 1200;
_root.target._y = 100;
_root.time = (_root.bosscoming = (_root.boss1electric = (_root.boss1canon = (_root.boss2laser = (_root.boss2gun = (_root.hitshipcounter = 0))))));
_root.boss = false;
_root.enemyticker = -25;
_root.boss2firelaser = false;
_root.fbosswave == 0;
_root.fbossrest = false;
_root.fbossrestcounter = 0;
_root.boss3totalhealth = (_root.boss3health = 299 * _root.health);
_root.e1w1pos = (_root.e2w1pos = (_root.e3w1pos = (_root.e4w1pos = (_root.e4w2pos = (_root.e5w1pos = (_root.e6w1pos = (_root.e7w1pos = (_root.boss3counter = 0))))))));
_root.enemy1wavetimer5 = 100;
_root.enemy2wavetimer5 = 500;
_root.enemy3wavetimer5 = 800;
_root.enemy4wavetimer5 = 900;
_root.enemy4wave2timer5 = 1200;
_root.enemy5wave1timer5 = 1500;
_root.enemy6wave1timer5 = 1800;
_root.enemy7wave1timer5 = 2100;
_root.playField.removeMovieClip();
_root.bg.gotoAndStop("blank");
i = _root.enemyarray.length - 1;
while (i >= 0) {
_root.enemyarray[i].removeMovieClip();
_root.enemyarray.pop();
i--;
}
j = _root.bulletarray.length - 1;
while (j >= 0) {
_root.bulletarray[j].removeMovieClip();
_root.bulletarray.pop;
j--;
}
k = _root.poweruparray.length - 1;
while (k >= 0) {
_root.poweruparray[k].removeMovieClip();
_root.poweruparray.pop;
k--;
}
}
_root.newlevel = function () {
_root.e1w1pos = (_root.e2w1pos = (_root.e3w1pos = (_root.e4w1pos = (_root.e4w2pos = (_root.e5w1pos = (_root.e6w1pos = (_root.e7w1pos = (_root.boss3counter = 0))))))));
};
_root.boss2lasersound.onSoundComplete = function () {
if ((_root.levelnumber == 4) and (_root.gamestart == true)) {
_root.boss2lasersound2.stop();
_root.boss2lasersound2.start(0, 0);
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
ec = 0;
while (ec < _root.enemyarray.length) {
if (_root.enemyarray[ec].enemytypevar == "fboss") {
_root.fbosslaserx = (_root.enemyarray[ec]._x + _root.enemyarray[ec].enemytype._x) + _root.enemyarray[ec].enemytype.laser._x;
_root.fbosslasery = (_root.enemyarray[ec]._y + _root.enemyarray[ec].enemytype._y) + _root.enemyarray[ec].enemytype.laser._y;
_root.enemyarray[ec].enemytype.charge.gotoAndStop("blank");
}
ec++;
}
_root["enemybullet" + _root.depth]._x = _root.fbosslaserx;
_root["enemybullet" + _root.depth]._y = _root.fbosslasery;
_root["enemybullet" + _root.depth].xvalue = 2 * (-_root.enemy1bulletspeed);
_root["enemybullet" + _root.depth].gotoAndStop("fbosslaser");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "fbosslaser";
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
};
_root.poweruparray = new Array();
_root.weaponpowerupfunction = function () {
_root.weaponPower.duplicateMovieClip("weaponpower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["weaponpower" + _root.depth];
_root["weaponpower" + _root.depth].poweruptype = "weapon";
whichcolor = random(3) + 1;
if (whichcolor == 1) {
_root["weaponpower" + _root.depth].gotoAndStop("red");
}
if (whichcolor == 2) {
_root["weaponpower" + _root.depth].gotoAndStop("blue");
}
if (whichcolor == 3) {
_root["weaponpower" + _root.depth].gotoAndStop("green");
}
_root["weaponpower" + _root.depth]._x = _root.assignx;
_root["weaponpower" + _root.depth]._y = _root.assigny;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.healthpowerupfunction = function () {
_root.healthpower.duplicateMovieClip("healthpower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["healthpower" + _root.depth];
_root["healthpower" + _root.depth].poweruptype = "health";
_root["healthpower" + _root.depth]._y = random(300) + 100;
_root["healthpower" + _root.depth]._x = 720;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.minihealthpowerupfunction = function () {
_root.healthpower.duplicateMovieClip("healthpower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["healthpower" + _root.depth];
_root["healthpower" + _root.depth].poweruptype = "minihealth";
_root["healthpower" + _root.depth]._x = _root.assignx;
_root["healthpower" + _root.depth]._y = _root.assigny;
_root["healthpower" + _root.depth]._xscale = (_root["healthpower" + _root.depth]._yscale = 60);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.missilepowerupfunction = function () {
trace(_root.depth);
_root.missilepower.duplicateMovieClip("missilepower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["missilepower" + _root.depth];
_root["missilepower" + _root.depth].poweruptype = "missile";
_root["missilepower" + _root.depth]._x = _root.assignx;
_root["missilepower" + _root.depth]._y = _root.assigny;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.bombpowerupfunction = function () {
_root.bombpower.duplicateMovieClip("bombpower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["bombpower" + _root.depth];
_root["bombpower" + _root.depth].poweruptype = "bomb";
_root["bombpower" + _root.depth]._x = _root.assignx;
_root["bombpower" + _root.depth]._y = _root.assigny;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.protectorpowerupfunction = function () {
_root.protectorpower.duplicateMovieClip("protectorpower" + _root.depth, _root.depth);
_root.poweruparray[_root.poweruparray.length] = _root["protectorpower" + _root.depth];
_root["protectorpower" + _root.depth].poweruptype = "protector";
_root["protectorpower" + _root.depth]._x = _root.assignx;
_root["protectorpower" + _root.depth]._y = _root.assigny;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
};
_root.targetenemyfunction = function () {
if (_root.enemyarray.length >= 1) {
_root.targeted = true;
if (_root.targetdir == "forward") {
if (_root.targetenemy >= (_root.enemyarray.length - 1)) {
_root.targetenemy = 0;
} else {
_root.targetenemy++;
}
trace(_root.targetenemy);
trace(_root.enemyarray.length);
} else if (_root.targetdir == "backward") {
if (_root.targetenemy == 0) {
_root.targetenemy = _root.enemyarray.length - 1;
} else {
_root.targetenemy--;
}
}
_root.target._x = _root.enemyarray[_root.targetenemy]._x + _root.enemyarray[_root.targetenemy].enemytype._x;
_root.target._y = _root.enemyarray[_root.targetenemy]._y + _root.enemyarray[_root.targetenemy].enemytype._y;
}
};
_root.autorotatefunction = function () {
if (_root.autorotate == false) {
_root.autorotate = true;
_root.ship.protector.play();
_root.ship.protector2.play();
} else {
_root.autorotate = false;
_root.ship.protector.stop();
_root.ship.protector2.stop();
}
};
if (_root.customcontrols == false) {
_root.upkey = 38;
_root.downkey = 40;
_root.leftkey = 37;
_root.rightkey = 39;
_root.firekey = 32;
_root.bombkey = 90;
_root.missilekey = 32;
_root.laserkey = 67;
_root.targetkey = 68;
_root.targetkey2 = 83;
_root.autokey = 65;
_root.pausekey = 80;
}
if (_root.reset == true) {
_root.maindisplay.gotoAndStop("title");
}
_root.countdowntimer = 240;
_root.status._visible = false;
_root.transition._visible = false;
_root.enemy.gotoAndStop("blank");
_root.shipexplosion.gotoAndStop("blank");
_root.mhexplosionmc.gotoAndStop("blank");
_root.healthpower.gotoAndStop("blank");
_root.protectorpower.gotoAndStop("blank");
_root.weaponpower.gotoAndStop("blank");
_root.missilepower.gotoAndStop("blank");
_root.bombpower.gotoAndStop("blank");
_root.megahoming.gotoAndStop("blank");
_root.shot.gotoAndStop("blank");
_root.enemybullet.gotoAndStop("blank");
Instance of Symbol 286 MovieClip "target" in Frame 2
onClipEvent (load) {
_root.target.swapDepths(100049);
}
Instance of Symbol 362 MovieClip "status" in Frame 2
onClipEvent (load) {
this.swapDepths(100050);
}
Instance of Symbol 476 MovieClip "display" in Frame 2
onClipEvent (load) {
_root.display.swapDepths(100053);
}
Instance of Symbol 511 MovieClip "pausedisplay" in Frame 2
onClipEvent (load) {
_root.pausedisplay.swapDepths(100055);
_root.pausedisplay._visible = false;
}
Instance of Symbol 590 MovieClip "controls" in Frame 2
onClipEvent (load) {
_root.controls.swapDepths(100060);
_root.controls._visible = false;
}
Instance of Symbol 44 MovieClip [transition] "transition" in Frame 2
onClipEvent (load) {
_root.transition.swapDepths(100062);
}
Instance of Symbol 93 MovieClip in Frame 2
onClipEvent (load) {
_root.speed = 10;
_root.top_border = 40;
_root.left_border = (t = 1);
_root.bottom_border = 500 - _root.sheight;
_root.right_border = 700 - _root.swidth;
var maxenemy = 4;
var MegaHomingFiredTimer = 0;
var MegaHomingFiredTimer2 = 0;
done = false;
done2 = false;
}
onClipEvent (keyDown) {
if ((_root.gamestart == true) and (_root.bosskilled == false)) {
if (Key.isDown(_root.pausekey)) {
if (_root.paused == false) {
_root.bomb1.bomb.explode.stop();
bc = _root.bulletarray.length - 1;
while (bc >= 0) {
if (_root.bulletarray[bc].shottype == "sred") {
_root.bulletarray[bc].bomb.explode.stop();
}
bc--;
}
_root.musicplaying = false;
_root.pausedisplay._visible = true;
if (_root.globalmusiccontrol == "play") {
_root.fade = "out";
_root.status.mask.box._x = 245;
}
_root.gametimer = false;
_root.paused = true;
_root.display.lasertxt.stop();
_quality = "high";
} else {
_root.bomb1.bomb.explode.play();
bc = _root.bulletarray.length - 1;
while (bc >= 0) {
if (_root.bulletarray[bc].shottype == "sred") {
_root.bulletarray[bc].bomb.explode.play();
}
bc--;
}
_root.musicplaying = true;
if (_root.globalmusiccontrol == "play") {
_root.fade = "in";
_root.status.mask.box._x = 212.3;
}
_root.paused = false;
_root.pausedisplay._visible = false;
_root.gametimer = true;
_quality = "low";
if (_root.displaytextplaying) {
_root.display.lasertxt.play();
}
}
}
}
}
onClipEvent (enterFrame) {
if (_root.changemusic == true) {
if (_root.loopvolume > 0) {
_root.loopvolume = _root.loopvolume - 5;
_root[_root.currentloop].setVolume(_root.loopvolume);
} else if (_root.loopvolume <= 0) {
_root[_root.currentloop].stop();
_root.currentloop = _root.newloop;
_root[_root.currentloop].start(0, 99999);
_root.loopvolume = 100;
_root[_root.currentloop].setVolume(_root.loopvolume);
if (_root.globalmusiccontrol == "play") {
_root.fade = "in";
}
_root.changemusic = false;
}
}
if (_root.fade == "in") {
if (_root.mode == "mission") {
if (_root.loopvolume < 100) {
_root.loopvolume = _root.loopvolume + 8;
_root[_root.currentloop].setVolume(_root.loopvolume);
} else if (_root.loopvolume > 100) {
_root.loopvolume = 100;
_root[_root.currentloop].setVolume(_root.loopvolume);
}
} else if (_root.mode == "survival") {
if (_root.loopvolume < 300) {
_root.loopvolume = _root.loopvolume + 8;
_root[_root.currentloop].setVolume(_root.loopvolume);
} else if (_root.loopvolume > 300) {
_root.loopvolume = 300;
_root[_root.currentloop].setVolume(_root.loopvolume);
}
}
} else if (_root.fade == "out") {
if (_root.loopvolume > 0) {
_root.loopvolume = _root.loopvolume - 20;
_root[_root.currentloop].setVolume(_root.loopvolume);
} else if (_root.loopvolume < 0) {
_root.loopvolume = 0;
_root[_root.currentloop].setVolume(_root.loopvolume);
}
}
if (_root.gamestart == true) {
_root.test = _root.enemyticker;
if (_root.youaredead == true) {
if (_root.bosskilled == true) {
_root.youaredead = false;
_root.ship._visible = true;
}
_root.deathdelay++;
if (_root.deathdelay == 75) {
_root.deathdelay = 0;
_root.transition._visible = true;
_root.transition.gotoAndPlay("Close");
}
}
if (_root.paused == false) {
if (_root.gametimer == true) {
_root.time = _root.time + 0.05;
_root.status.timer = int(_root.time);
}
if (_root.transform == true) {
if (_root.weapontype == "blue") {
if (_root.ship.greenpower._currentframe > 1) {
_root.ship.greenpower.prevFrame();
}
if (_root.ship.blue._currentframe < _root.ship.blue._totalframes) {
_root.ship.blue.nextFrame();
}
if ((_root.ship.greenpower._currentframe == 1) and (_root.ship.blue._currentframe == _root.ship.blue._totalframes)) {
_root.transform = false;
}
} else if (_root.weapontype == "green") {
if (_root.ship.blue._currentframe > 1) {
_root.ship.blue.prevFrame();
}
if (_root.ship.greenpower._currentframe < _root.ship.greenpower._totalframes) {
_root.ship.greenpower.nextFrame();
}
if ((_root.ship.blue._currentframe == 1) and (_root.ship.greenpower._currentframe == _root.ship.greenpower._totalframes)) {
_root.transform = false;
}
} else if (_root.weapontype == "red") {
if (_root.ship.greenpower._currentframe > 1) {
_root.ship.greenpower.prevFrame();
}
if (_root.ship.blue._currentframe > 1) {
_root.ship.blue.prevFrame();
}
if ((_root.ship.greenpower._currentframe == 1) and (_root.ship.blue._currentframe == 1)) {
_root.transform = false;
}
}
}
if (_root.boss != true) {
_root.bosscoming++;
if ((_root.levelnumber != 4) and (_root.levelnumber != "survival")) {
if (_root.bosscoming == 3600) {
_root.bosscoming = 0;
_root.boss = true;
_root.createboss = true;
if (_root.globalmusiccontrol == "play") {
_root.changemusic = true;
_root.newloop = ("boss" + _root.levelnumber) + "loop";
}
}
} else if (_root.levelnumber == 4) {
if (_root.bosscoming == 100) {
_root.boss = true;
_root.createboss = true;
_root.bosscoming = 0;
}
} else if (_root.levelnumber == "survival") {
_root.boss = true;
}
_root.enemyticker++;
if (_root.levelnumber == 1) {
if (((_root.enemyticker == 1000) or (_root.enemyticker == 2000)) or (_root.enemyticker == 3500)) {
_root.healthpowerupfunction();
}
if (_root.enemyticker == _root.enemy1wavetimer[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.enemyticker == _root.enemy2wavetimer[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.enemyticker == _root.enemy3wavetimer[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
if (_root.enemyticker == _root.enemy4wavetimer[_root.e4w1pos]) {
_root.enemy4wave1();
_root.e4w1pos++;
}
if (_root.enemyticker == _root.enemy4wave2timer[_root.e4w2pos]) {
_root.enemy4wave2();
_root.e4w2pos++;
}
} else if (_root.levelnumber == 2) {
if (((_root.enemyticker == 1000) or (_root.enemyticker == 2000)) or (_root.enemyticker == 3500)) {
_root.healthpowerupfunction();
}
if (_root.enemyticker == _root.enemy1wavetimer2[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.enemyticker == _root.enemy2wavetimer2[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.enemyticker == _root.enemy3wavetimer2[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
if (_root.enemyticker == _root.enemy4wavetimer2[_root.e4w1pos]) {
_root.enemy4wave1();
_root.e4w1pos++;
}
if (_root.enemyticker == _root.enemy4wave2timer2[_root.e4w2pos]) {
_root.enemy4wave2();
_root.e4w2pos++;
}
if (_root.enemyticker == _root.enemy5wave1timer2[_root.e5w1pos]) {
_root.enemy5wave1();
_root.e5w1pos++;
}
if (_root.enemyticker == _root.enemy6wave1timer2[_root.e6w1pos]) {
_root.enemy6wave1();
_root.e6w1pos++;
}
} else if (_root.levelnumber == 3) {
if (((_root.enemyticker == 1000) or (_root.enemyticker == 2000)) or (_root.enemyticker == 3500)) {
_root.healthpowerupfunction();
}
if (_root.enemyticker == _root.enemy1wavetimer3[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.enemyticker == _root.enemy2wavetimer3[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.enemyticker == _root.enemy3wavetimer3[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
if (_root.enemyticker == _root.enemy4wavetimer3[_root.e4w1pos]) {
_root.enemy4wave1();
_root.e4w1pos++;
}
if (_root.enemyticker == _root.enemy4wave2timer3[_root.e4w2pos]) {
_root.enemy4wave2();
_root.e4w2pos++;
}
if (_root.enemyticker == _root.enemy5wave1timer3[_root.e5w1pos]) {
_root.enemy5wave1();
_root.e5w1pos++;
}
if (_root.enemyticker == _root.enemy6wave1timer3[_root.e6w1pos]) {
_root.enemy6wave1();
_root.e6w1pos++;
}
if (_root.enemyticker == _root.enemy7wave1timer3[_root.e7w1pos]) {
_root.enemy7wave1();
_root.e7w1pos++;
}
}
} else {
if (_root.createboss == true) {
if (_root.levelnumber != 4) {
_root.whichboss = _root.levelnumber;
_root[("boss" + _root.whichboss) + "function"]();
_root.fade = "hold";
} else {
_root.fbossfunction();
}
_root.createboss = false;
}
if (_root.levelnumber == 4) {
_root.enemyticker++;
if (_root.fbosswave == 1) {
_root.fbossticker++;
if (_root.fbossticker == _root.enemy1wavetimer4[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.fbossticker == _root.enemy2wavetimer4[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.fbossticker == _root.enemy3wavetimer4[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
} else if (_root.fbosswave == 2) {
_root.fbossticker++;
if (_root.fbossticker == _root.enemy1wavetimer4[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.fbossticker == _root.enemy2wavetimer4[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.fbossticker == _root.enemy3wavetimer4[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
if (_root.fbossticker == _root.enemy4wavetimer4[_root.e4w1pos]) {
_root.enemy4wave1();
_root.e4w1pos++;
}
if (_root.fbossticker == _root.enemy4wave2timer4[_root.e4w2pos]) {
_root.enemy4wave2();
_root.e4w2pos++;
}
if (_root.fbossticker == _root.enemy5wave1timer4[_root.e5w1pos]) {
_root.enemy5wave1();
_root.e5w1pos++;
}
} else if (_root.fbosswave == 3) {
_root.fbossticker++;
if (_root.fbossticker == _root.enemy1wavetimer4[_root.e1w1pos]) {
_root.enemy1wave1();
_root.e1w1pos++;
}
if (_root.fbossticker == _root.enemy2wavetimer4[_root.e2w1pos]) {
_root.enemy2wave1();
_root.e2w1pos++;
}
if (_root.fbossticker == _root.enemy3wavetimer4[_root.e3w1pos]) {
_root.enemy3wave1();
_root.e3w1pos++;
}
if (_root.fbossticker == _root.enemy4wavetimer4[_root.e4w1pos]) {
_root.enemy4wave1();
_root.e4w1pos++;
}
if (_root.fbossticker == _root.enemy4wave2timer4[_root.e4w2pos]) {
_root.enemy4wave2();
_root.e4w2pos++;
}
if (_root.fbossticker == _root.enemy5wave1timer4[_root.e5w1pos]) {
_root.enemy5wave1();
_root.e5w1pos++;
}
if (_root.fbossticker == _root.enemy6wave1timer4[_root.e6w1pos]) {
_root.enemy6wave1();
_root.e6w1pos++;
}
if (_root.fbossticker == _root.enemy7wave1timer4[_root.e7w1pos]) {
_root.enemy7wave1();
_root.e7w1pos++;
}
}
} else if (_root.levelnumber == "survival") {
_root.enemyticker++;
if (_root.enemyticker == 900) {
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
_root.ship.powerup.gotoAndPlay("laser");
}
if (_root.enemyticker >= 2500) {
if (((((((_root.enemyticker == 2500) or (_root.enemyticker == 3100)) or (_root.enemyticker == 3700)) or (_root.enemyticker == 4300)) or (_root.enemyticker == 4900)) or (_root.enemyticker == 5500)) or (_root.enemyticker == 6100)) {
_root.enemy1delay = _root.enemy1delay - 12;
_root.enemy2delay = _root.enemy2delay - 12;
_root.enemy3delay = _root.enemy3delay - 12;
_root.enemy4delay = _root.enemy4delay - 12;
_root.enemy4delay2 = _root.enemy4delay2 - 12;
_root.enemy5delay = _root.enemy5delay - 12;
_root.enemy6delay = _root.enemy6delay - 12;
_root.enemy7delay = _root.enemy7delay - 12;
if (_root.enemy1delay < 0) {
_root.enemy1delay = 0;
}
if (_root.enemy2delay < 0) {
_root.enemy2delay = 0;
}
if (_root.enemy3delay < 0) {
_root.enemy3delay = 0;
}
if (_root.enemy4delay < 0) {
_root.enemy4delay = 0;
}
if (_root.enemy4delay2 < 0) {
_root.enemy4delay2 = 0;
}
if (_root.enemy5delay < 0) {
_root.enemy5delay = 0;
}
if (_root.enemy6delay < 0) {
_root.enemy6delay = 0;
}
if (_root.enemy7delay < 0) {
_root.enemy7delay = 0;
}
}
}
if (_root.enemyticker == _root.enemy1wavetimer5) {
_root.enemy1wave1();
_root.enemy1wavetimer5 = _root.enemy1wavetimer5 + (random(125) + _root.enemy1delay);
}
if (_root.enemyticker == _root.enemy2wavetimer5) {
_root.enemy2wave1();
_root.enemy2wavetimer5 = _root.enemy2wavetimer5 + (random(125) + _root.enemy2delay);
}
if (_root.enemyticker == _root.enemy3wavetimer5) {
_root.enemy3wave1();
_root.enemy3wavetimer5 = _root.enemy3wavetimer5 + (random(125) + _root.enemy3delay);
}
if (_root.enemyticker == _root.enemy4wavetimer5) {
_root.enemy4wave1();
_root.enemy4wavetimer5 = _root.enemy4wavetimer5 + (random(125) + _root.enemy4delay);
}
if (_root.enemyticker == _root.enemy4wave2timer5) {
_root.enemy4wave2();
_root.enemy4wave2timer5 = _root.enemy4wave2timer5 + (random(125) + _root.enemy4delay2);
}
if (_root.enemyticker == _root.enemy5wave1timer5) {
_root.enemy5wave1();
_root.enemy5wave1timer5 = _root.enemy5wave1timer5 + (random(150) + _root.enemy5delay);
_root.enemy3wavetimer5 = 0;
}
if (_root.enemyticker == _root.enemy6wave1timer5) {
_root.enemy6wave1();
_root.enemy6wave1timer5 = _root.enemy6wave1timer5 + (random(175) + _root.enemy6delay);
_root.enemy4wave2timer5 = 0;
}
if (_root.enemyticker == _root.enemy7wave1timer5) {
_root.enemy7wave1();
_root.enemy7wave1timer5 = _root.enemy7wave1timer5 + (random(175) + _root.enemy7delay);
}
}
}
if (_root.enemyarray.length > 0) {
_root.enemymove();
_root.enemymove2();
}
if (_root.youaredead == false) {
_root.getkey();
if (Key.isDown(65) && (getTimer() > (rotatetimer + 300))) {
_root.autorotatefunction();
rotatetimer = getTimer();
}
if (_root.protectorlevel <= 2) {
_root.ship.protector2.gotoAndStop("blank");
if (_root.protectorlevel == 0) {
_root.ship.protector.gotoAndStop("blank");
}
}
if (_root.protectorlevel >= 1) {
if (Key.isDown(_root.firekey) && (getTimer() > (ProtectorFiredTimer + 300))) {
_root.redsound.stop();
_root.redsound.start(0, 0);
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = ((_root.ship._x + _root.ship.protector._x) + _root.ship.protector.sphere._x) + _root.ship.protector.sphere.gun._x;
_root["bullet" + _root.depth]._y = ((_root.ship._y + _root.ship.protector._y) + _root.ship.protector.sphere._y) + _root.ship.protector.sphere.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].shottype = "red1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
if (_root.protectorlevel >= 2) {
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = ((_root.ship._x + _root.ship.protector._x) + _root.ship.protector.sphere._x) + _root.ship.protector.sphere.gun2._x;
_root["bullet" + _root.depth]._y = ((_root.ship._y + _root.ship.protector._y) + _root.ship.protector.sphere._y) + _root.ship.protector.sphere.gun2._y;
_root["bullet" + _root.depth].xvalue = -_root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].shottype = "red1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
if (_root.protectorlevel >= 3) {
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = ((_root.ship._x + _root.ship.protector2._x) + _root.ship.protector2.sphere._x) + _root.ship.protector2.sphere.gun._x;
_root["bullet" + _root.depth]._y = ((_root.ship._y + _root.ship.protector2._y) + _root.ship.protector2.sphere._y) + _root.ship.protector2.sphere.gun._y;
_root["bullet" + _root.depth].xvalue = _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].shottype = "red1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
if (_root.protectorlevel == 4) {
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = ((_root.ship._x + _root.ship.protector2._x) + _root.ship.protector2.sphere._x) + _root.ship.protector2.sphere.gun2._x;
_root["bullet" + _root.depth]._y = ((_root.ship._y + _root.ship.protector2._y) + _root.ship.protector2.sphere._y) + _root.ship.protector2.sphere.gun2._y;
_root["bullet" + _root.depth].xvalue = -_root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].shottype = "red1";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
}
ProtectorFiredTimer = getTimer();
}
if (_root.autorotate == false) {
if (Key.isDown(_root.upkey)) {
if (Key.isDown(_root.rightkey)) {
if ((_root.ship.protector._currentframe <= 27) and (_root.ship.protector._currentframe > 7)) {
_root.ship.protector.prevFrame();
} else if ((_root.ship.protector._currentframe > 27) or (_root.ship.protector._currentframe < 7)) {
_root.ship.protector.nextFrame();
}
} else if (Key.isDown(_root.leftkey)) {
if ((_root.ship.protector._currentframe >= 37) or (_root.ship.protector._currentframe < 17)) {
_root.ship.protector.nextFrame();
} else if ((_root.ship.protector._currentframe < 37) and (_root.ship.protector._currentframe > 17)) {
_root.ship.protector.prevFrame();
}
} else if ((_root.ship.protector._currentframe > 32) or (_root.ship.protector._currentframe < 12)) {
_root.ship.protector.nextFrame();
} else if ((_root.ship.protector._currentframe <= 32) and (_root.ship.protector._currentframe > 12)) {
_root.ship.protector.prevFrame();
}
}
if (Key.isDown(_root.downkey)) {
if (Key.isDown(_root.rightkey)) {
if ((_root.ship.protector._currentframe <= 17) or (_root.ship.protector._currentframe > 37)) {
_root.ship.protector.prevFrame();
} else if ((_root.ship.protector._currentframe > 17) and (_root.ship.protector._currentframe < 37)) {
_root.ship.protector.nextFrame();
}
} else if (Key.isDown(_root.leftkey)) {
if ((_root.ship.protector._currentframe <= 7) or (_root.ship.protector._currentframe > 27)) {
_root.ship.protector.prevFrame();
} else if ((_root.ship.protector._currentframe > 7) and (_root.ship.protector._currentframe < 27)) {
_root.ship.protector.nextFrame();
}
} else if ((_root.ship.protector._currentframe <= 12) or (_root.ship.protector._currentframe > 32)) {
_root.ship.protector.prevFrame();
} else if ((_root.ship.protector._currentframe < 32) and (_root.ship.protector._currentframe > 12)) {
_root.ship.protector.nextFrame();
}
}
if (Key.isDown(_root.rightkey)) {
if (Key.isDown(_root.upkey)) {
} else if (Key.isDown(_root.downkey)) {
} else if ((_root.ship.protector._currentframe <= 22) and (_root.ship.protector._currentframe > 3)) {
_root.ship.protector.prevFrame();
} else if (_root.ship.protector._currentframe > 22) {
_root.ship.protector.nextFrame();
}
}
if (Key.isDown(_root.leftkey)) {
if (Key.isDown(_root.upkey)) {
} else if (Key.isDown(_root.downkey)) {
} else if ((_root.ship.protector._currentframe > 3) and (_root.ship.protector._currentframe < 22)) {
_root.ship.protector.nextFrame();
} else if ((_root.ship.protector._currentframe > 22) or (_root.ship.protector._currentframe == 3)) {
_root.ship.protector.prevFrame();
}
}
}
}
if (_root.protectorlevel >= 3) {
if (_root.autorotate == false) {
if (Key.isDown(_root.upkey)) {
if (Key.isDown(_root.rightkey)) {
if ((_root.ship.protector2._currentframe <= 27) and (_root.ship.protector2._currentframe > 7)) {
_root.ship.protector2.prevFrame();
} else if ((_root.ship.protector2._currentframe > 27) or (_root.ship.protector2._currentframe < 7)) {
_root.ship.protector2.nextFrame();
}
} else if (Key.isDown(_root.leftkey)) {
if ((_root.ship.protector2._currentframe >= 37) or (_root.ship.protector2._currentframe < 17)) {
_root.ship.protector2.nextFrame();
} else if ((_root.ship.protector2._currentframe < 37) and (_root.ship.protector2._currentframe > 17)) {
_root.ship.protector2.prevFrame();
}
} else if ((_root.ship.protector2._currentframe > 32) or (_root.ship.protector2._currentframe < 12)) {
_root.ship.protector2.nextFrame();
} else if ((_root.ship.protector2._currentframe <= 32) and (_root.ship.protector2._currentframe > 12)) {
_root.ship.protector2.prevFrame();
}
}
if (Key.isDown(_root.downkey)) {
if (Key.isDown(_root.rightkey)) {
if ((_root.ship.protector2._currentframe <= 17) or (_root.ship.protector2._currentframe > 37)) {
_root.ship.protector2.prevFrame();
} else if ((_root.ship.protector2._currentframe > 17) and (_root.ship.protector2._currentframe < 37)) {
_root.ship.protector2.nextFrame();
}
} else if (Key.isDown(_root.leftkey)) {
if ((_root.ship.protector2._currentframe <= 7) or (_root.ship.protector2._currentframe > 27)) {
_root.ship.protector2.prevFrame();
} else if ((_root.ship.protector2._currentframe > 7) and (_root.ship.protector2._currentframe < 27)) {
_root.ship.protector2.nextFrame();
}
} else if ((_root.ship.protector2._currentframe <= 12) or (_root.ship.protector2._currentframe > 32)) {
_root.ship.protector2.prevFrame();
} else if ((_root.ship.protector2._currentframe < 32) and (_root.ship.protector2._currentframe > 12)) {
_root.ship.protector2.nextFrame();
}
}
if (Key.isDown(_root.rightkey)) {
if (Key.isDown(_root.upkey)) {
} else if (Key.isDown(_root.downkey)) {
} else if ((_root.ship.protector2._currentframe <= 22) and (_root.ship.protector2._currentframe > 3)) {
_root.ship.protector2.prevFrame();
} else if (_root.ship.protector2._currentframe > 22) {
_root.ship.protector2.nextFrame();
}
}
if (Key.isDown(_root.leftkey)) {
if (Key.isDown(_root.upkey)) {
} else if (Key.isDown(_root.downkey)) {
} else if ((_root.ship.protector2._currentframe > 3) and (_root.ship.protector2._currentframe < 22)) {
_root.ship.protector2.nextFrame();
} else if ((_root.ship.protector2._currentframe > 22) or (_root.ship.protector2._currentframe == 3)) {
_root.ship.protector2.prevFrame();
}
}
}
}
if (Key.isDown(_root.bombkey) && (getTimer() > (BombFiredTimer + 150))) {
_root.firebomb();
BombFiredTimer = getTimer();
}
if (_root.havelaser == true) {
if (Key.isDown(_root.laserkey)) {
_root.firelaser();
}
}
if (_root.havelaser == true) {
if (_root.status.mask.laser._xscale < 100) {
_root.status.mask.laser._xscale = _root.status.mask.laser._xscale + 0.7;
} else {
_root.status.mask.laser._xscale = 100;
}
}
if ((_root.mhlevel == 1) or (_root.mhlevel == 2)) {
mhtimer = 36;
} else if (_root.mhlevel == 3) {
mhtimer = 53;
} else if (_root.mhlevel == 4) {
mhtimer = 60;
} else if (_root.mhlevel == 5) {
mhtimer = 67;
}
if (MegaHomingFiredTimer < 68) {
MegaHomingFiredTimer++;
}
if (MegaHomingFiredTimer2 < 6) {
MegaHomingFiredTimer2++;
}
if (Key.isDown(_root.missilekey) && (MegaHomingFiredTimer >= mhtimer)) {
if (_root.mhlevel != 0) {
_root.firemh = true;
MegaHomingFiredTimer = 0;
mhticks = 1;
}
}
if (((_root.firemh == true) && (MegaHomingFiredTimer2 >= 5)) && (mhticks <= _root.mhlevel)) {
if (mhticks == _root.mhlevel) {
_root.firemh = false;
}
mhticks++;
_root.firehmfunction();
MegaHomingFiredTimer2 = 0;
}
if (Key.isDown(_root.targetkey) && (getTimer() > (TargetTimer + 150))) {
_root.targetdir = "forward";
_root.targetenemyfunction();
TargetTimer = getTimer();
} else if (Key.isDown(_root.targetkey2) && (getTimer() > (TargetTimer + 150))) {
_root.targetdir = "backward";
_root.targetenemyfunction();
TargetTimer = getTimer();
}
}
if (_root.targetenemy >= _root.enemyarray.length) {
_root.targetenemy = 0;
}
if (_root.enemyarray.length < 1) {
_root.target._x = 900;
_root.target._y = 175;
} else if (_root.targeted == true) {
if (_root.fbossrest == true) {
if (_root.targetdir == "forward") {
if ((((((_root.enemyarray[_root.targetenemy].enemytypevar == "launcher1") or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher2")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher3")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher4")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher5")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "fboss")) {
_root.targetenemy++;
}
} else if (_root.targetdir == "backward") {
if ((((((_root.enemyarray[_root.targetenemy].enemytypevar == "launcher1") or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher2")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher3")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher4")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "launcher5")) or (_root.enemyarray[_root.targetenemy].enemytypevar == "fboss")) {
_root.targetenemy = _root.enemyarray.length - 1;
}
}
}
_root.target._x = _root.enemyarray[_root.targetenemy]._x + _root.enemyarray[_root.targetenemy].enemytype._x;
_root.target._y = _root.enemyarray[_root.targetenemy]._y + _root.enemyarray[_root.targetenemy].enemytype._y;
_root.target.tl._x = -(_root.enemyarray[_root.targetenemy]._width / 2);
_root.target.tl._y = -(_root.enemyarray[_root.targetenemy]._height / 2);
_root.target.tr._x = _root.enemyarray[_root.targetenemy]._width / 2;
_root.target.tr._y = -(_root.enemyarray[_root.targetenemy]._height / 2);
_root.target.bl._x = -(_root.enemyarray[_root.targetenemy]._width / 2);
_root.target.bl._y = _root.enemyarray[_root.targetenemy]._height / 2;
_root.target.br._x = _root.enemyarray[_root.targetenemy]._width / 2;
_root.target.br._y = _root.enemyarray[_root.targetenemy]._height / 2;
}
if (_root.poweruparray.length > 0) {
_root.powerupmove();
}
_root.bulletmovement();
if (_root.changelevels == true) {
_root.levelchangedelay++;
if (_root.levelchangedelay == 100) {
_root.levelchangedelay = 0;
_root.levelnumber++;
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
_root.display.gotoAndStop(1);
_root.startgame = true;
_root.changelevels = false;
_root[_root.currentloop].stop();
}
}
if (_root.sgreenfunction == true) {
_root.sgreentimer++;
if (_root.sgreentimer == 3) {
_root.greensound.stop();
_root.greensound.start(0, 0);
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = -100;
_root["bullet" + _root.depth]._y = 150;
_root["bullet" + _root.depth].xvalue = 2 * _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green4");
_root["bullet" + _root.depth].shottype = "sgreen";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
_root["bullet" + _root.depth]._xscale = (_root["bullet" + _root.depth]._yscale = 500);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.sgreentimer == 7) {
_root.greensound.stop();
_root.greensound.start(0, 0);
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = -100;
_root["bullet" + _root.depth]._y = 400;
_root["bullet" + _root.depth].xvalue = 2 * _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green4");
_root["bullet" + _root.depth].shottype = "sgreen";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
_root["bullet" + _root.depth]._xscale = (_root["bullet" + _root.depth]._yscale = 500);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
} else if (_root.sgreentimer == 12) {
_root.greensound.stop();
_root.greensound.start(0, 0);
_root.shot.duplicateMovieClip("bullet" + _root.depth, _root.depth);
_root["bullet" + _root.depth]._x = -100;
_root["bullet" + _root.depth]._y = 250;
_root["bullet" + _root.depth].xvalue = 2 * _root.bulletspeed;
_root["bullet" + _root.depth].yvalue = 0;
_root["bullet" + _root.depth].gotoAndStop("green4");
_root["bullet" + _root.depth].shottype = "sgreen";
_root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
_root["bullet" + _root.depth]._xscale = (_root["bullet" + _root.depth]._yscale = 500);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.sgreenfunction = false;
_root.sgreentimer = 0;
}
}
if (_root.hitship == true) {
if (_root.checkhealth == true) {
if (_root.shipshield < 0) {
if (_root.bosskilled == false) {
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
duplicateMovieClip (_root.shipexplosion, "shipexplosion" + _root.depth, _root.depth);
_root["shipexplosion" + _root.depth]._x = _root.ship._x + _root.ship.shipmc._x;
_root["shipexplosion" + _root.depth]._y = _root.ship._y + _root.ship.shipmc._y;
_root["shipexplosion" + _root.depth]._xscale = 200;
_root["shipexplosion" + _root.depth]._yscale = _root["shipexplosion" + _root.depth]._xscale;
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
_root.ship._visible = false;
_root.ship._x = -1500;
_root.ship._y = 250;
_root.shipshield = 1;
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.youaredead = true;
_root.checkhealth = false;
} else {
_root.ship._y = 250;
_root.shipshield = 1;
}
}
}
if (_root.shieldfadein == true) {
if (_root.ship.shield._alpha < (_root.status.mask.shield._xscale + 40)) {
_root.ship.shield._visible = true;
_root.ship.shield._alpha = _root.ship.shield._alpha + ((_root.status.mask.shield._xscale + 40) / 2);
}
if (_root.ship.shield._alpha >= (_root.status.mask.shield._xscale + 40)) {
_root.ship.shield._alpha = _root.status.mask.shield._xscale + 40;
_root.shieldfadein = false;
}
} else if (_root.shieldfadein == false) {
if (_root.ship.shield._alpha > 0) {
_root.ship.shield._alpha = _root.ship.shield._alpha - ((_root.status.mask.shield._xscale + 40) / 6.67);
}
if (_root.ship.shield._alpha <= 0) {
_root.ship.shield._alpha = 0;
_root.ship.shield._visible = false;
_root.hitship = false;
}
}
}
if (_root.levelnumber == 1) {
if ((_root.bg.nebula1._x < -800) or (_root.bg.nebula1._x > 600)) {
_root.bg.nebula1.gotoAndStop("blank");
} else {
_root.bg.nebula1.gotoAndStop("graphic");
}
if ((_root.bg.nebula2._x < -800) or (_root.bg.nebula2._x > 600)) {
_root.bg.nebula2.gotoAndStop("blank");
} else {
_root.bg.nebula2.gotoAndStop("graphic");
}
if ((_root.bg.nebula3._x < -800) or (_root.bg.nebula3._x > 600)) {
_root.bg.nebula3.gotoAndStop("blank");
} else {
_root.bg.nebula3.gotoAndStop("graphic");
}
if ((_root.enemyticker > 1000) and (_root.enemyticker < 3200)) {
_root.bg.nebula1._x = _root.bg.nebula1._x - 0.8;
_root.bg.nebula2._x = _root.bg.nebula1._x + _root.bg.nebula1._width;
_root.bg.nebula3._x = _root.bg.nebula2._x + _root.bg.nebula2._width;
}
} else if (_root.levelnumber == 2) {
if ((_root.bg.planet1._x < -600) or (_root.bg.planet1._x > 600)) {
_root.bg.planet1.gotoAndStop("blank");
} else {
_root.bg.planet1.gotoAndStop("graphic");
}
if ((_root.bg.planet2._x < -550) or (_root.bg.planet2._x > 600)) {
_root.bg.planet2.gotoAndStop("blank");
} else {
_root.bg.planet2.gotoAndStop("graphic");
}
if ((_root.enemyticker > 1500) and (_root.enemyticker < 2100)) {
_root.bg.planet1._x = _root.bg.planet1._x - 3;
}
if ((_root.enemyticker > 2000) and (_root.enemyticker < 2550)) {
_root.bg.planet2._x = _root.bg.planet2._x - 2.5;
}
} else if (_root.levelnumber == 3) {
if ((_root.bg.galaxy._x < -800) or (_root.bg.galaxy._x > 600)) {
_root.bg.galaxy.gotoAndStop("blank");
} else {
_root.bg.galaxy.gotoAndStop("graphic");
}
if ((_root.enemyticker > 1000) and (_root.enemyticker < 2400)) {
_root.bg.galaxy._x = _root.bg.galaxy._x - 1;
}
} else if (_root.levelnumber == 4) {
if ((_root.bg.asteroids._x < -800) or (_root.bg.asteroids._x > 700)) {
_root.bg.asteroids.gotoAndStop("blank");
} else {
_root.bg.asteroids.gotoAndStop("graphic");
}
if ((_root.enemyticker > 1000) and (_root.enemyticker < 2400)) {
_root.bg.asteroids._x = _root.bg.asteroids._x - 1.5;
}
}
}
}
}
Symbol 31 MovieClip [stars] Frame 7
_x = (_x - 10);
if (_x < 0) {
_x = 700;
}
gotoAndPlay (1);
Symbol 31 MovieClip [stars] Frame 15
_x = (_x - 5);
if (_x < 0) {
_x = 700;
}
gotoAndPlay (9);
Symbol 31 MovieClip [stars] Frame 23
_x = (_x - 3);
if (_x < 0) {
_x = 700;
}
gotoAndPlay (17);
Symbol 34 MovieClip [spark2] Frame 15
this.removeMovieClip();
Symbol 37 MovieClip [spark1] Frame 15
this.removeMovieClip();
Symbol 44 MovieClip [transition] Frame 1
stop();
Symbol 44 MovieClip [transition] Frame 2
_root.fade = "out";
_root.airblast.start();
Symbol 44 MovieClip [transition] Frame 23
if (_root.youaredead == true) {
_root.paused = false;
_quality = "high";
_root.reset = false;
_root.controls._visible = false;
_root.gamestart = false;
_root.gametimer = false;
_root.shipshieldtotal = (_root.shipshield = 50);
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.numberofbombs = 3;
_root.targetenemy = 0;
_root.mhlevel = 0;
_root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
_root.status.mask.missile.gotoAndStop(_root.whichmissileframe);
_root.protectorlevel = 0;
_root.weapontype = "red";
_root.weaponnumber = 1;
_root.sgreenfunction = false;
_root.sgreentimer = 0;
_root.ship._visible = true;
_root.youaredead = false;
if (_root.mode == "mission") {
_root.maindisplay.gotoAndStop("continue");
} else if (_root.mode == "survival") {
_root.maindisplay.gotoAndStop("title");
}
_root.fade = "out";
_root.clean();
_root.ship.protector.gotoAndStop("blank");
_root.ship.protector.gotoAndStop("blank");
if (_root.mode == "survival") {
_root.abortmission = true;
}
}
Symbol 44 MovieClip [transition] Frame 24
if (_root.fade == "out") {
_root[_root.currentloop].stop();
}
if (_root.startgame == true) {
_root.maindisplay.gotoAndStop("blank");
_root.clean();
_root.depth = 2;
_root.init();
_root.status._visible = true;
if (_root.levelnumber == 1) {
_root.ship.shiptype.gotoAndStop("nolaser");
_root.havelaser = false;
_root.status.mask.laser._xscale = 0;
_root.protectorlevel = 0;
_root.weaponnumber = 1;
_root.passtext1 = "neeL";
_root.display.gotoAndPlay("mission");
} else if (_root.levelnumber == 2) {
_root.protectorlevel = 0;
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
if (_root.weaponnumber > 2) {
_root.weaponnumber = 1;
}
_root.passtext1 = "eGdl";
_root.display.gotoAndPlay("mission");
} else if (_root.levelnumber == 3) {
if (_root.difficulty == "easy") {
_root.protectorlevel = 2;
_root.ship.protector.gotoAndStop("protector");
} else if (_root.difficulty == "expert") {
_root.protectorlevel = 1;
_root.ship.protector.gotoAndStop("protector");
}
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
if (_root.weaponnumber > 3) {
_root.weaponnumber = 1;
}
_root.passtext1 = "top8";
_root.display.gotoAndPlay("mission");
} else if (_root.levelnumber == 4) {
_root.display.gotoAndPlay("fmission");
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
_root.passtext1 = "lylS";
_root.assignx = 900;
_root.assigny = 100;
_root.missilepowerupfunction();
_root.assignx = 900;
_root.assigny = 200;
_root.weaponpowerupfunction();
_root.assignx = 900;
_root.assigny = 300;
_root.missilepowerupfunction();
_root.assignx = 900;
_root.assigny = 400;
_root.protectorpowerupfunction();
}
if (_root.mode == "survival") {
_root.shipshield = 1;
_root.assignx = 710;
_root.assigny = 250;
_root.weaponpowerupfunction();
_root.havelaser = false;
_root.ship.shiptype.gotoAndStop("nolaser");
_root.status.mask.laser._xscale = 0;
_root.status.score = int(_root.totalscore2);
} else if (_root.mode == "mission") {
if (_root.difficulty == "easy") {
_root.shipshield = 50;
} else if (_root.difficulty == "expert") {
if (_root.shipshield > 45) {
_root.shipshield = 50;
} else {
_root.shipshield = _root.shipshield + 5;
}
}
_root.status.score = int(_root.totalscore);
}
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
if (_root.difficulty == "easy") {
_root.enemiesrequired = 10;
} else if (_root.difficulty == "expert") {
_root.enemiesrequired = 13;
}
_quality = "low";
_root.bluedepth = 10010;
_root.ship._x = 100;
_root.ship._y = 200;
_root.whichmissileframe = "level" + _root.mhlevel;
_root.status.mask.missile.gotoAndStop(_root.whichmissileframe);
_root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
_root.enemyticker = -25;
_root.firetimer = 0;
_root.sgreenfunction = false;
_root.sgreentimer = 0;
_root.bosskilled = false;
_root.gamestart = true;
_root.gametimer = true;
_root.timing = true;
_root.time = 0;
_root.boss = false;
_root.bosscoming = 0;
_root.bossready = false;
_root.targetenemy = 0;
_root.maindisplay.gotoAndStop("blank");
_root.pausedisplay._visible = false;
_root.bg.gotoAndStop("level" + _root.levelnumber);
_root.currentscore = _root.totalscore;
if (_root.globalmusiccontrol == "play") {
_root.musicplaying = true;
_root.fade = "in";
_root.loopvolume = 100;
if (_root.mode == "mission") {
_root.currentloop = "loop" + _root.levelnumber;
_root[_root.currentloop].start(0, 20);
_root[_root.currentloop].setVolume(100);
_root.status.mask.box._x = 212.3;
} else if (_root.mode == "survival") {
_root.currentloop = "survivalloop";
_root[_root.currentloop].start(0, 9999999);
_root[_root.currentloop].setVolume(300);
}
_root.status.mask.box._x = 212.3;
} else {
_root.status.mask.box._x = 245;
}
_root.status._visible = true;
_root.transform = true;
_root.startgame = false;
if (_root.numberofbombs == 0) {
_root.passtext2 = "16Eg";
} else if (_root.numberofbombs == 1) {
_root.passtext2 = "Gecl";
} else if (_root.numberofbombs == 2) {
_root.passtext2 = "bvWi";
} else if (_root.numberofbombs == 3) {
_root.passtext2 = "Sidk";
} else if (_root.numberofbombs == 4) {
_root.passtext2 = "57Fd";
} else if (_root.numberofbombs == 5) {
_root.passtext2 = "Wwpa";
} else if (_root.numberofbombs == 6) {
_root.passtext2 = "3dEp";
} else if (_root.numberofbombs == 7) {
_root.passtext2 = "rtms";
} else if (_root.numberofbombs == 8) {
_root.passtext2 = "RFdY";
} else if (_root.numberofbombs == 9) {
_root.passtext2 = "DFSc";
} else if (_root.numberofbombs == 10) {
_root.passtext2 = "qwt7";
} else if (_root.numberofbombs == 11) {
_root.passtext2 = "mzx6";
} else if (_root.numberofbombs == 12) {
_root.passtext2 = "ukdf";
} else if (_root.numberofbombs == 13) {
_root.passtext2 = "Elmb";
} else if (_root.numberofbombs == 14) {
_root.passtext2 = "1l1l";
} else if (_root.numberofbombs == 15) {
_root.passtext2 = "ghtc";
}
if (_root.mhlevel == 0) {
_root.passtext3 = "addd";
} else if (_root.mhlevel == 1) {
_root.passtext3 = "ALfj";
} else if (_root.mhlevel == 2) {
_root.passtext3 = "ruGk";
} else if (_root.mhlevel == 3) {
_root.passtext3 = "ryNh";
} else if (_root.mhlevel == 4) {
_root.passtext3 = "6kjs";
} else if (_root.mhlevel == 5) {
_root.passtext3 = "142H";
}
if (_root.weaponnumber == 1) {
_root.passtext4 = "h8vb";
} else if (_root.weaponnumber == 2) {
_root.passtext4 = "eaaP";
} else if (_root.weaponnumber == 3) {
_root.passtext4 = "rty4";
} else if (_root.weaponnumber == 4) {
_root.passtext4 = "7gf7";
}
if (_root.weapontype == "red") {
_root.passtext5 = "alsk";
} else if (_root.weapontype == "blue") {
_root.passtext5 = "KAKA";
} else if (_root.weapontype == "green") {
_root.passtext5 = "99Kl";
}
}
if (_root.abortmission == true) {
_root[_root.currentloop].stop();
_root.pausedisplay.gotoAndStop("pause");
_root.pausedisplay._visible = false;
_root.paused = false;
_quality = "high";
_root.levelnumber = 1;
_root.reset = true;
_root.controls._visible = false;
_root.gamestart = false;
_root.abortmission = false;
_root.maindisplay.gotoAndStop("title");
_root.clean();
_root.gamestart = false;
_root.youaredead = false;
_root.time = 0;
_root.bombsound = false;
_root.havelaser = false;
_root.mhshotting = false;
_root.sgreenfunction = false;
_root.sgreentimer = 0;
_root.autorotate = false;
_root.protectorlevel = 0;
_root.hitshipcounter = 0;
_root.shipshieldtotal = (_root.shipshield = 50);
_root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal);
_root.gametimer = false;
_root.numberofbombs = 3;
_root.targetenemy = 0;
_root.mhlevel = 0;
_root.whichmissileframe = "level" + _root.mhlevel;
_root.status.mask.missile.gotoAndStop(_root.whichmissileframe);
_root.protectorlevel = 0;
_root.weapontype = "red";
_root.weaponnumber = 1;
_root.boss3x = 600;
_root.boss3y = 100;
_root.boss3s = 5;
_root.boss3turndelay = 5;
_root.boss3totalhealth = (_root.boss3health = 299 * _root.health);
_root.maindisplay.givepass.gotoAndStop("blank");
}
Symbol 44 MovieClip [transition] Frame 51
_root.transition._visible = false;
Symbol 61 Button
on (release) {
this.nextFrame();
}
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 67 Button
on (release) {
this.prevFrame();
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 3
stop();
Symbol 82 MovieClip Frame 4
stop();
Symbol 82 MovieClip Frame 5
stop();
Symbol 82 MovieClip Frame 6
stop();
Symbol 87 Button
on (release) {
_root.gotoAndStop("main");
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 2
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 2
stop();
Symbol 108 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 2
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 2
stop();
Symbol 121 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 2
stop();
_root.bg.swapDepths(1);
Symbol 121 MovieClip Frame 3
stop();
_root.bg.swapDepths(17);
Symbol 121 MovieClip Frame 4
stop();
_root.bg.swapDepths(1);
Symbol 121 MovieClip Frame 5
stop();
_root.bg.swapDepths(17);
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 4
this.gotoAndPlay(2);
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 10
_root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth, _root.depth);
_root["enemybullet" + _root.depth].offx = _parent.gun._x * Math.cos((_parent._parent._rotation * Math.PI) / 180);
_root["enemybullet" + _root.depth].offy = _parent.gun._x * Math.sin(((-_parent._parent._rotation) * Math.PI) / 180);
_root["enemybullet" + _root.depth]._x = (_parent._parent._x + _parent._x) + _root["enemybullet" + _root.depth].offx;
_root["enemybullet" + _root.depth]._y = (_parent._parent._y + _parent._y) - _root["enemybullet" + _root.depth].offy;
_root["enemybullet" + _root.depth].gotoAndStop("boss3");
_root["enemybullet" + _root.depth].shottype = "enemy";
_root["enemybullet" + _root.depth].enemyshottype = "boss3";
_root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
_root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
_root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy, _root["enemybullet" + _root.depth].diffx);
_root["enemybullet" + _root.depth].xvalue = -8 * Math.cos(_root["enemybullet" + _root.depth].angle);
_root["enemybullet" + _root.depth].yvalue = -8 * Math.sin(_root["enemybullet" + _root.depth].angle);
_root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
_root["enemybullet" + _root.depth].follow = 0;
if (_root.depth < 10000) {
_root.depth++;
} else {
_root.depth = 33;
}
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 5
gotoAndPlay (2);
Symbol 180 MovieClip Frame 1
if (this._name == "shipexplosion") {
this.stop();
}
Symbol 180 MovieClip Frame 17
this.removeMovieClip();
Symbol 180 MovieClip Frame 18
stop();
Symbol 183 MovieClip Frame 1
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
stop();
Symbol 183 MovieClip Frame 2
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 3
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 4
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 5
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 6
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 7
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 8
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 9
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 10
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 11
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 12
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 13
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 14
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 15
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 16
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 17
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 18
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 19
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 20
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 21
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 22
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 23
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 24
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 25
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 26
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 27
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 28
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 29
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 30
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 31
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 32
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 33
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 34
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 35
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 36
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 37
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 38
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 39
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 40
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 41
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 42
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 43
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 44
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 45
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 46
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 47
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 48
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 49
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 50
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 51
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 52
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 53
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 54
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 55
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 56
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 57
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 58
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 59
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 60
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 61
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 62
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 63
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 64
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 65
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 66
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 67
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 68
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 69
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 70
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 71
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 72
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 73
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 74
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 75
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 76
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 77
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 78
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 79
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 80
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 81
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 82
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 83
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 84
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 85
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 86
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 87
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 88
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 89
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 90
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 91
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 92
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 93
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 94
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 95
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 96
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 97
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 98
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 99
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 100
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 101
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 102
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 103
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 104
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 105
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 106
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 107
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 108
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 109
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 110
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 111
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 112
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 113
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 114
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 115
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 116
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 117
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 118
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 119
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 120
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.enemyexplodesound.stop();
_root.enemyexplodesound.start(0, 0);
Symbol 183 MovieClip Frame 121
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 122
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 123
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 124
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
Symbol 183 MovieClip Frame 125
_parent._parent._x = _parent._parent._x + _root.bossdeadspeed;
_root.gamecomplete = true;
_root.credits.gotoAndPlay("start");
_parent._parent.removeMovieClip();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 2
stop();
Symbol 195 MovieClip Frame 3
stop();
Symbol 195 MovieClip Frame 4
stop();
Symbol 195 MovieClip Frame 5
stop();
Symbol 195 MovieClip Frame 6
stop();
Symbol 195 MovieClip Frame 7
stop();
Symbol 195 MovieClip Frame 8
stop();
Instance of Symbol 152 MovieClip in Symbol 195 MovieClip Frame 8
onClipEvent (load) {
randomframe = random(5) + 1;
this.gotoAndPlay(randomframe);
}
Instance of Symbol 152 MovieClip in Symbol 195 MovieClip Frame 8
onClipEvent (load) {
randomframe = random(5) + 1;
this.gotoAndPlay(randomframe);
}
Instance of Symbol 152 MovieClip in Symbol 195 MovieClip Frame 8
onClipEvent (load) {
randomframe = random(5) + 1;
this.gotoAndPlay(randomframe);
}
Symbol 195 MovieClip Frame 9
stop();
Symbol 195 MovieClip Frame 10
stop();
Symbol 195 MovieClip Frame 11
stop();
Symbol 195 MovieClip Frame 12
stop();
Symbol 195 MovieClip Frame 13
stop();
Symbol 195 MovieClip Frame 14
stop();
Symbol 195 MovieClip Frame 15
stop();
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 2
stop();
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 1
stop();
this.healthbar._visible = false;
this.border._visible = false;
Instance of Symbol 198 MovieClip "healthbar" in Symbol 202 MovieClip Frame 1
/* no clip actions */
Symbol 202 MovieClip Frame 2
this.healthbar._visible = true;
this.border._visible = true;
Symbol 202 MovieClip Frame 13
this.gotoAndStop("enemy");
Symbol 202 MovieClip Frame 14
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 2
stop();
Symbol 242 MovieClip Frame 3
stop();
Symbol 242 MovieClip Frame 4
stop();
Symbol 242 MovieClip Frame 5
stop();
Symbol 242 MovieClip Frame 6
stop();
Symbol 242 MovieClip Frame 7
stop();
Symbol 242 MovieClip Frame 8
stop();
Symbol 242 MovieClip Frame 9
stop();
Symbol 242 MovieClip Frame 10
stop();
Symbol 242 MovieClip Frame 11
stop();
Symbol 246 MovieClip Frame 3
gotoAndPlay (1);
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 2
stop();
Symbol 260 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 9
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 9
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 2
gotoAndStop (41);
Symbol 274 MovieClip Frame 42
if (_root.autorotate == false) {
gotoAndStop (3);
} else {
gotoAndPlay (3);
}
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 2
gotoAndStop (41);
Symbol 275 MovieClip Frame 42
if (_root.autorotate == false) {
gotoAndStop (3);
} else {
gotoAndPlay (3);
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 20
_parent.powerup.gotoAndStop("blank");
Symbol 280 MovieClip Frame 1
stop();
_root.ship.shipmc._visible = false;
Symbol 282 MovieClip Frame 1
if (this._name == "mhexplosionmc") {
stop();
}
Symbol 282 MovieClip Frame 14
this.removeMovieClip();
Symbol 282 MovieClip Frame 15
stop();
Symbol 315 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 330 MovieClip Frame 27
stop();
_parent._parent.removeMovieClip();
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 2
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 2
stop();
Symbol 332 MovieClip Frame 3
stop();
Symbol 332 MovieClip Frame 4
stop();
Symbol 332 MovieClip Frame 5
stop();
Symbol 332 MovieClip Frame 6
stop();
Symbol 332 MovieClip Frame 7
stop();
Symbol 332 MovieClip Frame 8
stop();
Symbol 332 MovieClip Frame 9
stop();
Symbol 332 MovieClip Frame 10
stop();
Symbol 332 MovieClip Frame 11
stop();
Symbol 332 MovieClip Frame 12
stop();
Symbol 332 MovieClip Frame 13
stop();
this.shottype = "laser";
Symbol 332 MovieClip Frame 14
stop();
Symbol 332 MovieClip Frame 15
stop();
Symbol 333 MovieClip Frame 1
this.weaponpowercolor = "red";
this.needchange = true;
stop();
Symbol 333 MovieClip Frame 5
this.weaponpowercolor = "blue";
this.needchange = true;
stop();
Symbol 333 MovieClip Frame 9
this.weaponpowercolor = "green";
this.needchange = true;
stop();
Symbol 333 MovieClip Frame 13
gotoAndStop (1);
Symbol 333 MovieClip Frame 14
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 2
stop();
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 2
stop();
Symbol 339 MovieClip Frame 3
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 3
stop();
Symbol 349 MovieClip Frame 4
stop();
Symbol 349 MovieClip Frame 5
stop();
Symbol 349 MovieClip Frame 6
stop();
Instance of Symbol 344 MovieClip "laser" in Symbol 351 MovieClip Frame 1
onClipEvent (load) {
this._xscale = 0;
}
Symbol 357 Button
on (release) {
if (_root.paused == false) {
if (_root.musicplaying == false) {
_root.musicplaying = true;
_root.status.mask.box._x = 212.3;
_root.fade = "in";
_root.globalmusiccontrol = "play";
}
}
}
Symbol 358 Button
on (release) {
if (_root.paused == false) {
if (_root.musicplaying == true) {
_root.musicplaying = false;
_root.status.mask.box._x = 245;
_root.fade = "out";
_root.globalmusiccontrol = "stop";
}
}
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 2
stop();
Symbol 361 MovieClip Frame 3
stop();
Symbol 361 MovieClip Frame 4
stop();
Symbol 361 MovieClip Frame 5
stop();
Symbol 361 MovieClip Frame 6
stop();
Symbol 361 MovieClip Frame 7
stop();
Symbol 361 MovieClip Frame 8
stop();
Symbol 361 MovieClip Frame 9
stop();
Symbol 361 MovieClip Frame 10
stop();
Symbol 361 MovieClip Frame 11
stop();
Symbol 361 MovieClip Frame 12
stop();
Symbol 361 MovieClip Frame 13
stop();
Symbol 361 MovieClip Frame 14
stop();
Symbol 361 MovieClip Frame 15
stop();
Symbol 361 MovieClip Frame 16
stop();
Symbol 362 MovieClip Frame 1
stop();
_root.status.score = _root.totalscore;
Instance of Symbol 361 MovieClip "bomb" in Symbol 362 MovieClip Frame 1
onClipEvent (load) {
_root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
}
Symbol 369 Button
on (release) {
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
_root.totalscore2 = 0;
_root.startgame = true;
_root.mode = "survival";
_root.levelnumber = "survival";
_root.maindisplay.playbtn.enabled = false;
_root.maindisplay.instructionsbtn.enabled = false;
_root.maindisplay.optionsbtn.enabled = false;
}
Symbol 374 Button
on (release) {
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
_root.mode = "mission";
_root.totalscore = 0;
_root.startgame = true;
_root.maindisplay.playbtn.enabled = false;
_root.maindisplay.instructionsbtn.enabled = false;
_root.maindisplay.optionsbtn.enabled = false;
}
Symbol 379 Button
on (release) {
_root.maindisplay.gotoAndStop("options");
if (_root.difficulty == "easy") {
_root.maindisplay.beginner._visible = true;
_root.maindisplay.expert._visible = false;
}
if (_root.difficulty == "expert") {
_root.maindisplay.beginner._visible = false;
_root.maindisplay.expert._visible = true;
}
}
Symbol 384 Button
on (release) {
_root.maindisplay.gotoAndStop("instructions");
}
Symbol 389 Button
on (release) {
_root.credits.gotoAndPlay("preview");
_root.maindisplay.gotoAndStop("blank");
}
Symbol 393 Button
on (release) {
getURL ("http://www.tyrino.com/dragonforce.html", "_blank");
}
Symbol 397 Button
on (release) {
getURL ("http://www.tyrino.com/", "_blank");
}
Symbol 404 Button
on (release) {
_root.controls._visible = true;
_root.maindisplay._visible = false;
}
Symbol 409 Button
on (release) {
_root.passwordmc.gotoAndPlay("open");
_root.maindisplay.controlsbtn.enabled = false;
_root.maindisplay.passwordbtn.enabled = false;
_root.maindisplay.beginnerbtn.enabled = false;
_root.maindisplay.expertbtn.enabled = false;
}
Symbol 414 Button
on (release) {
_root.difficulty = "easy";
_root.maindisplay.beginner._visible = true;
_root.maindisplay.expert._visible = false;
}
Symbol 419 Button
on (release) {
_root.difficulty = "expert";
_root.maindisplay.beginner._visible = false;
_root.maindisplay.expert._visible = true;
}
Symbol 424 Button
on (release) {
_root.maindisplay.gotoAndStop("title");
_root.passwordmc.gotoAndStop("blank");
_root.maindisplay.playbtn.enabled = true;
_root.maindisplay.controlsbtn.enabled = true;
_root.maindisplay.passwordbtn.enabled = true;
}
Symbol 428 Button
on (release) {
_root.maindisplay.gotoAndStop("title");
}
Symbol 432 Button
on (release) {
_root.totalscore = _root.currentscore - 100;
if (_root.totalscore < 0) {
_root.totalscore = 0;
}
_root.status.score = int(_root.totalscore);
score = _root.totalscore;
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
_root.startgame = true;
_root.pausedisplay._visible = false;
_root.yesbtn.enabled = false;
_root.nobtn.enabled = false;
}
Symbol 434 Button
on (release) {
_root.maindisplay.givepass.gotoAndStop("pass");
}
Symbol 448 Button
on (release) {
_root.maindisplay.yesbtn.enabled = false;
_root.maindisplay.nobtn.enabled = false;
_root.maindisplay.givepass.menu.enabled = false;
_root.abortmission = true;
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
}
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 2
stop();
_root.maindisplay.givepass.passwordtext1 = _root.passtext1;
_root.maindisplay.givepass.passwordtext2 = _root.passtext2;
_root.maindisplay.givepass.passwordtext3 = _root.passtext3;
_root.maindisplay.givepass.passwordtext4 = _root.passtext4;
_root.maindisplay.givepass.passwordtext5 = _root.passtext5;
_root.maindisplay.givepass.menu.enabled = true;
Symbol 450 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 2
stop();
_root.maindisplay.playbtn.enabled = true;
_root.maindisplay.instructionsbtn.enabled = true;
_root.maindisplay.optionsbtn.enabled = true;
Symbol 450 MovieClip Frame 3
stop();
Symbol 450 MovieClip Frame 4
stop();
Symbol 450 MovieClip Frame 5
stop();
_root.countdowntimer = 240;
score = _root.totalscore;
_root.maindisplay.yesbtn.enabled = true;
_root.maindisplay.nobtn.enabled = true;
Instance of Symbol 93 MovieClip in Symbol 450 MovieClip Frame 5
onClipEvent (enterFrame) {
if (_root.countdowntimer > 0) {
_root.countdowntimer--;
_root.maindisplay.countdown = int(_root.countdowntimer / 24);
} else {
_root.maindisplay.givepass.gotoAndStop("pass");
}
}
Symbol 455 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 2
stop();
Symbol 455 MovieClip Frame 3
stop();
Symbol 455 MovieClip Frame 4
stop();
Symbol 455 MovieClip Frame 5
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 50
_root.display.play();
_root.display.lasertext.gotoAndStop("blank");
_root.displaytextplaying = false;
Symbol 464 MovieClip Frame 99
_root.display.play();
_root.display.laseretxt.gotoAndStop("blank");
_root.displaytextplaying = false;
Symbol 476 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 2
_root.display.mission.gotoAndStop(_root.levelnumber);
Symbol 476 MovieClip Frame 31
_root.display.gotoAndStop("blank");
Symbol 476 MovieClip Frame 32
_root.fade = "out";
Symbol 476 MovieClip Frame 74
_root.display.gotoAndPlay("sumscore");
Symbol 476 MovieClip Frame 115
_root.display.gotoAndStop("blank");
Symbol 476 MovieClip Frame 117
if (_root.levelnumber == 1) {
stop();
_root.havelaser = true;
_root.ship.powerup.gotoAndPlay("laser");
_root.display.lasertext.gotoAndPlay("laser");
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
_root.displaytextplaying = true;
} else if (_root.levelnumber == 2) {
stop();
if (_root.difficulty == "easy") {
_root.protectorlevel = 2;
_root.ship.protector.gotoAndStop("protector");
} else if (_root.difficulty == "expert") {
_root.protectorlevel = 1;
_root.ship.protector.gotoAndStop("protector");
}
_root.havelaser = true;
_root.ship.shiptype.gotoAndStop("yeslaser");
_root.display.lasertext.gotoAndPlay("protector");
_root.ship.powerup.gotoAndPlay("laser");
_root.displaytextplaying = true;
}
Symbol 476 MovieClip Frame 140
stop();
_quality = "high";
if (_root.difficulty == "easy") {
_root.display.bombs = _root.numberofbombs * 3;
_root.display.time = int(1000 / _root.time) * 3;
_root.display.health = ("+" + (_root.shipshield * 3)) + " Shield Bonus";
_root.totalscore = _root.totalscore + int(((_root.numberofbombs * 3) + (int(1000 / _root.time) * 3)) + (_root.shipshield * 3));
}
if (_root.difficulty == "expert") {
_root.display.bombs = _root.numberofbombs * 5;
_root.display.time = int(1000 / _root.time) * 5;
_root.display.health = ("+" + (_root.shipshield * 5)) + " Shield Bonus";
_root.totalscore = _root.totalscore + int(((_root.numberofbombs * 5) + (int(1000 / _root.time) * 5)) + (_root.shipshield * 5));
}
_root.display.totalscore = int(_root.totalscore);
_root.status.score = int(_root.totalscore);
_root.changelevels = true;
Symbol 481 Button
on (release) {
if (_root.passwordmc.passwordtext1 == "neeL") {
_root.levelnumber = 1;
_root.text1 = "accept";
} else if (_root.passwordmc.passwordtext1 == "eGdl") {
_root.levelnumber = 2;
_root.text1 = "accept";
} else if (_root.passwordmc.passwordtext1 == "top8") {
_root.levelnumber = 3;
_root.text1 = "accept";
} else if (_root.passwordmc.passwordtext1 == "lylS") {
_root.levelnumber = 4;
_root.text1 = "accept";
}
if (_root.passwordmc.passwordtext2 == "16Eg") {
_root.numberofbombs = 0;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "Gecl") {
_root.numberofbombs = 1;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "bvWi") {
_root.numberofbombs = 2;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "Sidk") {
_root.numberofbombs = 3;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "57Fd") {
_root.numberofbombs = 4;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "Qwpa") {
_root.numberofbombs = 5;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "3dEp") {
_root.numberofbombs = 6;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "rtms") {
_root.numberofbombs = 7;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "RFdY") {
_root.numberofbombs = 8;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "DFSc") {
_root.numberofbombs = 9;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "qwt7") {
_root.numberofbombs = 10;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "mzx6") {
_root.numberofbombs = 11;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "ukdf") {
_root.numberofbombs = 12;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "Elmb") {
_root.numberofbombs = 13;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "1l1l") {
_root.numberofbombs = 14;
_root.text2 = "accept";
} else if (_root.passwordmc.passwordtext2 == "ghtc") {
_root.numberofbombs = 15;
_root.text2 = "accept";
}
if (_root.passwordmc.passwordtext3 == "addd") {
_root.mhlevel = 0;
_root.text3 = "accept";
} else if (_root.passwordmc.passwordtext3 == "ALfj") {
_root.mhlevel = 1;
_root.text3 = "accept";
} else if (_root.passwordmc.passwordtext3 == "ruGk") {
_root.mhlevel = 2;
_root.text3 = "accept";
} else if (_root.passwordmc.passwordtext3 == "ryNh") {
_root.mhlevel = 3;
_root.text3 = "accept";
} else if (_root.passwordmc.passwordtext3 == "6kjs") {
_root.mhlevel = 4;
_root.text3 = "accept";
} else if (_root.passwordmc.passwordtext3 == "142H") {
_root.mhlevel = 5;
_root.text3 = "accept";
}
if (_root.passwordmc.passwordtext4 == "h8vb") {
_root.weaponnumber = "1";
_root.text4 = "accept";
} else if (_root.passwordmc.passwordtext4 == "eaaP") {
_root.weaponnumber = "2";
_root.text4 = "accept";
} else if (_root.passwordmc.passwordtext4 == "rty4") {
_root.weaponnumber = "3";
_root.text4 = "accept";
} else if (_root.passwordmc.passwordtext4 == "7gf7") {
_root.weaponnumber = "4";
_root.text4 = "accept";
}
if (_root.passwordmc.passwordtext5 == "alsk") {
_root.weapontype = "red";
_root.text5 = "accept";
} else if (_root.passwordmc.passwordtext5 == "KAKA") {
_root.weapontype = "blue";
_root.text5 = "accept";
} else if (_root.passwordmc.passwordtext5 == "99Kl") {
_root.weapontype = "green";
_root.text5 = "accept";
}
if (((((_root.text1 == "accept") and (_root.text2 == "accept")) and (_root.text3 == "accept")) and (_root.text4 == "accept")) and (_root.text5 == "accept")) {
_root.passwordmc.display = "Password Accepted";
_root.passwordmc.passwordtext1 = (_root.passwordmc.passwordtext2 = (_root.passwordmc.passwordtext3 = (_root.passwordmc.passwordtext4 = (_root.passwordmc.passwordtext5 = ""))));
} else {
_root.passwordmc.display = "Invalid Password";
_root.levelnumber = 1;
_root.numberofbombs = 3;
_root.mhlevel = 0;
_root.weaponnumber = "1";
_root.weapontype = "red";
}
_root.text1 = (_root.text2 = (_root.text3 = (_root.text4 = (_root.text5 = "Notaccept"))));
}
Symbol 483 Button
on (release) {
_root.passwordmc.display = "";
_root.passwordmc.gotoAndStop("blank");
_root.maindisplay.playbtn.enabled = true;
_root.maindisplay.controlsbtn.enabled = true;
_root.maindisplay.passwordbtn.enabled = true;
_root.maindisplay.beginnerbtn.enabled = true;
_root.maindisplay.expertbtn.enabled = true;
}
Symbol 490 MovieClip Frame 1
stop();
Symbol 490 MovieClip Frame 2
stop();
Symbol 495 Button
on (release) {
_root.pausedisplay._visible = false;
_root.musicplaying = true;
_root.status.mask.box._x = 212.3;
_root.fade = "in";
_root.paused = false;
_root.gametimer = true;
_quality = "low";
}
Symbol 498 Button
on (release) {
if (_root.mode == "mission") {
_root.pausedisplay.gotoAndPlay("pass");
} else {
_root.abortmission = true;
_root.display.gotoAndStop(1);
_root.pausedisplay.am.enabled = false;
_root.pausedisplay.backbtn.enabled = false;
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
}
}
Symbol 501 Button
on (release) {
_root.controls._visible = true;
_root.maindisplay._visible = false;
}
Symbol 509 Button
on (release) {
_root.abortmission = true;
_root.display.gotoAndStop(1);
_root.pausedisplay.am.enabled = false;
_root.pausedisplay.backbtn.enabled = false;
_root.transition._visible = true;
_root.transition.gotoAndPlay("close");
}
Symbol 510 Button
on (release) {
_root.pausedisplay.gotoAndStop("pause");
}
Symbol 511 MovieClip Frame 1
stop();
Symbol 511 MovieClip Frame 2
stop();
_root.pausedisplay.passwordtext1 = _root.passtext1;
_root.pausedisplay.passwordtext2 = _root.passtext2;
_root.pausedisplay.passwordtext3 = _root.passtext3;
_root.pausedisplay.passwordtext4 = _root.passtext4;
_root.pausedisplay.passwordtext5 = _root.passtext5;
_root.pausedisplay.am.enabled = true;
_root.pausedisplay.backbtn.enabled = true;
Symbol 519 Button
on (release) {
_root.maindisplay.gotoAndStop("title");
_root.creditsloop.stop();
_root.credits.gotoAndStop("blank");
}
Symbol 532 MovieClip Frame 1
stop();
Symbol 532 MovieClip Frame 2
stop();
Symbol 545 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Techno-Dance/_Wa-Veniogen-7479/index.php", "_blank");
}
Symbol 546 Button
on (release) {
getURL ("http://calpomatt.lavista.org/", "_blank");
}
Symbol 547 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Techno-Dance/Club/A_Night_-Lee_I_G-2522/index.php?chk=no", "_blank");
}
Symbol 548 Button
on (release) {
getURL ("http://www.soundclick.com/bands/3/osnoff.htm", "_blank");
}
Symbol 549 Button
on (release) {
getURL ("http://www.flashgrooves.com/", "_blank");
}
Symbol 550 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Alternative/Alternative/Mozone_3-Eric_Joh-5592/index.php", "_blank");
}
Symbol 551 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Alternative/Industrial/masu_no_-Netsu-4052/index.php?chk=no", "_blank");
}
Symbol 552 Button
on (release) {
getURL ("http://flashkit.com/loops/", "_blank");
}
Symbol 553 Button
on (release) {
getURL ("http://www.flashkit.com/loops/Pop-Rock/Rock/Proson1-Prosonic-93/index.php", "_blank");
}
Symbol 554 Button
on (release) {
getURL ("http://smeric.sakarya.edu.tr/", "_blank");
}
Symbol 557 Button
on (release) {
if (_root.previewcredits == false) {
_root.maindisplay.gotoAndStop("submit");
} else if (_root.previewcredits == true) {
_root.maindisplay.gotoAndStop("title");
}
_root.creditsloop.stop();
_root.credits.gotoAndStop("blank");
}
Symbol 558 MovieClip Frame 1
stop();
Symbol 558 MovieClip Frame 2
_root.gamestart = false;
_root.clean();
_root[_root.currentloop].stop();
Symbol 558 MovieClip Frame 10
_quality = "high";
_root.currentloop.stop();
_root.fade = "in";
_root.creditsloop.start(0, 100);
_root.loopvolume2 = 100;
_root.creditsloop.setVolume(_root.loopvolume2);
i = 0;
while (i < 15) {
_root.credits.attachMovie("spark1", "spark" + _root.depth, _root.depth);
_root.credits["spark" + _root.depth]._x = 0;
_root.credits["spark" + _root.depth]._y = 0;
_root.credits["spark" + _root.depth]._rotation = random(360);
_root.credits["spark" + _root.depth]._xscale = (_root.credits["spark" + _root.depth]._yscale = random(50) + 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
i++;
}
i = 0;
while (i < 15) {
_root.credits.attachMovie("spark2", "spark" + _root.depth, _root.depth);
_root.credits["spark" + _root.depth]._x = 0;
_root.credits["spark" + _root.depth]._y = 0;
_root.credits["spark" + _root.depth]._rotation = random(360);
_root.credits["spark" + _root.depth]._xscale = (_root.credits["spark" + _root.depth]._yscale = random(50) + 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
i++;
}
Symbol 558 MovieClip Frame 71
i = 0;
while (i < 15) {
_root.credits.attachMovie("spark1", "spark" + _root.depth, _root.depth);
_root.credits["spark" + _root.depth]._x = 0;
_root.credits["spark" + _root.depth]._y = 0;
_root.credits["spark" + _root.depth]._rotation = random(360);
_root.credits["spark" + _root.depth]._xscale = (_root.credits["spark" + _root.depth]._yscale = random(50) + 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
i++;
}
i = 0;
while (i < 15) {
_root.credits.attachMovie("spark2", "spark" + _root.depth, _root.depth);
_root.credits["spark" + _root.depth]._x = 0;
_root.credits["spark" + _root.depth]._y = 0;
_root.credits["spark" + _root.depth]._rotation = random(360);
_root.credits["spark" + _root.depth]._xscale = (_root.credits["spark" + _root.depth]._yscale = random(50) + 50);
if (_root.depth < 100000) {
_root.depth++;
} else {
_root.depth = 100;
}
i++;
}
Symbol 558 MovieClip Frame 136
if (_root.previewcredits == false) {
_root.credits.staytuned.gotoAndStop("graphic");
} else {
_root.credits.staytuned.gotoAndStop("blank");
_root.creditsloop.start(0, 100);
_root.loopvolume2 = 100;
_root.creditsloop.setVolume(_root.loopvolume2);
}
Symbol 558 MovieClip Frame 679
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 680
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 681
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 682
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 683
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 684
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 685
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 686
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 687
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 688
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 689
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 690
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 691
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 692
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 693
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 694
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 695
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 696
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 697
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 698
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 699
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 700
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 701
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 702
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 703
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 704
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 705
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 706
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 707
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 708
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 709
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 710
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 711
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 712
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 713
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 714
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 715
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 716
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 717
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 718
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 719
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 720
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 721
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 722
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 723
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 724
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 725
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 726
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 727
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 728
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
Symbol 558 MovieClip Frame 729
_root.loopvolume2 = _root.loopvolume2 - 2;
_root.creditsloop.setVolume(_root.loopvolume2);
_root.creditsloop.stop();
Symbol 558 MovieClip Frame 730
_root.maindisplay.gotoAndStop("title");
Symbol 558 MovieClip Frame 740
_root.credits.gotoAndStop("blank");
Symbol 580 Button
on (release) {
if (_root.selectkey == true) {
_root.selectkey = false;
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.controls._visible = false;
if (_root.gamestart == true) {
_root.pausedisplay._visible = true;
_root.maindisplay._visible = true;
} else {
_root.maindisplay._visible = true;
}
}
Symbol 581 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "fire";
_root.controls.firekey = "";
}
Symbol 582 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "bomb";
_root.controls.bombkey = "";
}
Symbol 583 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "laser";
_root.controls.laserkey = "";
}
Symbol 584 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "pause";
_root.controls.pausekey = "";
}
Symbol 585 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "auto";
_root.controls.autokey = "";
}
Symbol 586 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controls.laserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "missile";
_root.controls.missilekey = "";
}
Symbol 587 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controlslaserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "target";
_root.controls.targetkey = "";
}
Symbol 588 Button
on (release) {
if (_root.selectkey == true) {
if (_root.controls[_root.whichkey + "key"] == _root.controls.bombkey) {
_root.controls.bombkey = "Z";
_root.bombkey = 90;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.firekey) {
_root.controls.firekey = "Space";
_root.firekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.missilekey) {
_root.controls.missilekey = "Space";
_root.missilekey = 32;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.laserkey) {
_root.controlslaserkey = "C";
_root.missilekey = 67;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey) {
_root.controls.targetkey = "D";
_root.targetkey = 68;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.targetkey2) {
_root.controls.target2key = "S";
_root.targetkey = 83;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.autokey) {
_root.controls.autokey = "A";
_root.autokey = 65;
}
if (_root.controls[_root.whichkey + "key"] == _root.controls.pausekey) {
_root.controls.pausekey = "P";
_root.pausekey = 80;
}
}
_root.selectkey = true;
_root.whichkey = "target2";
_root.controls.target2key = "";
}
Instance of Symbol 93 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
letterkeys = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
numberkeys = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
numpadkeys = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "+", "Enter", "-", ".", "/");
functionkeys = new Array("F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12");
otherkeys = new Array("Space", "Page Up", "Page Down", "End", "Home", "Left", "Up", "Right", "Down");
}
onClipEvent (keyDown) {
if (_root.selectkey == true) {
_root.selectkey = false;
_root.customcontrols = true;
pressed = Key.getCode();
_root[_root.whichkey + "key"] = pressed;
if ((pressed >= 65) and (pressed <= 90)) {
_root.controls[_root.whichkey + "key"] = letterkeys[pressed - 65];
}
if ((pressed >= 48) and (pressed <= 57)) {
_root.controls[_root.whichkey + "key"] = numberkeys[pressed - 48];
}
if ((pressed >= 96) and (pressed <= 111)) {
_root.controls[_root.whichkey + "key"] = numpadkeys[pressed - 96];
}
if ((pressed >= 112) and (pressed <= 123)) {
_root.controls[_root.whichkey + "key"] = functionkeys[pressed - 112];
}
if ((pressed >= 32) and (pressed <= 40)) {
_root.controls[_root.whichkey + "key"] = otherkeys[pressed - 32];
}
if (pressed == 8) {
_root.controls[_root.whichkey + "key"] = "BackSpace";
}
if (pressed == 9) {
_root.controls[_root.whichkey + "key"] = "Tab";
}
if (pressed == 12) {
_root.controls[_root.whichkey + "key"] = "Clear";
}
if (pressed == 13) {
_root.controls[_root.whichkey + "key"] = "Enter";
}
if (pressed == 16) {
_root.controls[_root.whichkey + "key"] = "Shift";
}
if (pressed == 17) {
_root.controls[_root.whichkey + "key"] = "Control";
}
if (pressed == 18) {
_root.controls[_root.whichkey + "key"] = "Alt";
}
if (pressed == 20) {
_root.controls[_root.whichkey + "key"] = "Caps Lock";
}
if (pressed == 27) {
_root.controls[_root.whichkey + "key"] = "Esc";
}
if (pressed == 45) {
_root.controls[_root.whichkey + "key"] = "Insert";
}
if (pressed == 46) {
_root.controls[_root.whichkey + "key"] = "Delete";
}
if (pressed == 47) {
_root.controls[_root.whichkey + "key"] = "help";
}
if (pressed == 144) {
_root.controls[_root.whichkey + "key"] = "Num Lock";
}
if (pressed == 186) {
_root.controls[_root.whichkey + "key"] = ";:";
}
if (pressed == 187) {
_root.controls[_root.whichkey + "key"] = "=+";
}
if (pressed == 189) {
_root.controls[_root.whichkey + "key"] = "-_";
}
if (pressed == 191) {
_root.controls[_root.whichkey + "key"] = "/?";
}
if (pressed == 192) {
_root.controls[_root.whichkey + "key"] = "'@";
}
if (pressed == 219) {
_root.controls[_root.whichkey + "key"] = "[{";
}
if (pressed == 220) {
_root.controls[_root.whichkey + "key"] = "\\|";
}
if (pressed == 221) {
_root.controls[_root.whichkey + "key"] = "]}";
}
}
}