Frame 1
function deadClick() {
}
function gotoMySite() {
getURL ("http://www33.brinkster.com/jewgioh", "_blank");
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightNotice = new ContextMenuItem("\u00A9 2008 ViolentAJ", deadClick);
var mySiteLink = new ContextMenuItem("My Site", gotoMySite);
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, myStuffLink, copyrightNotice);
_root.menu = myMenu;
MochiAd.showPreGameAd({id:"746c5375895fb132", res:"550x500"});
Frame 2
var musicPlaying;
var missions = 1;
stop();
briefing = new Sound(this);
briefing.attachSound("menu-briefing");
if (!musicPlaying) {
musicPlaying = true;
briefing.start(0, 999);
}
var savefile = SharedObject.getLocal("arianStarfighter");
if (savefile.data.missions == undefined) {
savefile.data.missions = 1;
}
if (savefile.data.missions > missions) {
missions = savefile.data.missions;
}
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
_root.attachMovie("playerShip", "playerShip", 800);
_root.playerShip._x = 250;
_root.playerShip._y = 250;
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 130;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
instructorCheckFire = new Sound(holder);
instructorCheckFire.attachSound("instruHey");
soundArray.push(instructorCheckFire);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
Frame 7
stop();
Frame 8
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
_root.attachMovie("playerShip", "playerShip", 800, {_x:1357, _y:1483, _rotation:-45});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 9
stop();
Frame 10
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
_root.attachMovie("playerShip", "playerShip", 800, {_x:-400, _y:990, _rotation:90});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 11
stop();
Frame 12
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
_root.attachMovie("playerShip", "playerShip", 800, {_x:250, _y:2317, _rotation:0});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 13
stop();
Frame 14
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
profileFemaleHelp = new Sound(holder);
profileFemaleHelp.attachSound("femHelp");
soundArray.push(profileThreeHelp);
profileFemaleMissile = new Sound(holder);
profileFemaleMissile.attachSound("femMis");
soundArray.push(profileThreeMissile);
profileFemaleCheckFire = new Sound(holder);
profileFemaleCheckFire.attachSound("femCare");
soundArray.push(profileThreeCheckFire);
profileFemaleDying = new Sound(holder);
profileFemaleDying.attachSound("femDie");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
bulwarkDying = new Sound(holder);
bulwarkDying.attachSound("bulwarkDeath");
_root.attachMovie("playerShip", "playerShip", 800, {_x:250, _y:2317, _rotation:0});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 15
stop();
Frame 16
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
profileFemaleHelp = new Sound(holder);
profileFemaleHelp.attachSound("femHelp");
soundArray.push(profileThreeHelp);
profileFemaleMissile = new Sound(holder);
profileFemaleMissile.attachSound("femMis");
soundArray.push(profileThreeMissile);
profileFemaleCheckFire = new Sound(holder);
profileFemaleCheckFire.attachSound("femCare");
soundArray.push(profileThreeCheckFire);
profileFemaleDying = new Sound(holder);
profileFemaleDying.attachSound("femDie");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
bulwarkDying = new Sound(holder);
bulwarkDying.attachSound("bulwarkDeath");
_root.attachMovie("playerShip", "playerShip", 800, {_x:-1500, _y:-1680, _rotation:180});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 17
stop();
Frame 18
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
profileFemaleHelp = new Sound(holder);
profileFemaleHelp.attachSound("femHelp");
soundArray.push(profileThreeHelp);
profileFemaleMissile = new Sound(holder);
profileFemaleMissile.attachSound("femMis");
soundArray.push(profileThreeMissile);
profileFemaleCheckFire = new Sound(holder);
profileFemaleCheckFire.attachSound("femCare");
soundArray.push(profileThreeCheckFire);
profileFemaleDying = new Sound(holder);
profileFemaleDying.attachSound("femDie");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
bulwarkDying = new Sound(holder);
bulwarkDying.attachSound("bulwarkDeath");
_root.attachMovie("playerShip", "playerShip", 800, {_x:-900, _y:-520, _rotation:90});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 19
stop();
Frame 20
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
profileFemaleHelp = new Sound(holder);
profileFemaleHelp.attachSound("femHelp");
soundArray.push(profileThreeHelp);
profileFemaleMissile = new Sound(holder);
profileFemaleMissile.attachSound("femMis");
soundArray.push(profileThreeMissile);
profileFemaleCheckFire = new Sound(holder);
profileFemaleCheckFire.attachSound("femCare");
soundArray.push(profileThreeCheckFire);
profileFemaleDying = new Sound(holder);
profileFemaleDying.attachSound("femDie");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
bulwarkDying = new Sound(holder);
bulwarkDying.attachSound("bulwarkDeath");
_root.attachMovie("playerShip", "playerShip", 800, {_x:-416, _y:1400, _rotation:0});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 21
stop();
Frame 22
function clearStage() {
var _local4 = 0;
while (_local4 < liveEnemy.length) {
liveEnemy[_local4].removeMovieClip();
_local4++;
}
var _local3 = 0;
while (_local3 < liveAlly.length) {
liveAlly[_local3].removeMovieClip();
_local3++;
}
var _local2 = 50;
while (_local2 < 95) {
_root["torpedo" + _local2].removeMovieClip();
_local2++;
}
var _local7 = 1000;
while (_local7 <= 1500) {
_root["bullet" + _local7].removeMovieClip();
_local7++;
}
var _local6 = 1;
while (_local6 <= 40) {
_root["missile" + _local6].removeMovieClip();
_local6++;
}
var _local5 = 140;
while (_local5 <= 170) {
_root["chaff" + _local5].removeMovieClip();
_local5++;
}
hud.removeMovieClip();
}
stop();
var shotCount = 1000;
var missileCount = 1;
var enemyNumber = 600;
var allyNumber = 500;
var torpedoNumber = 50;
var bigNumber = 100;
var counterMeasures = 140;
var importantBroadcast = false;
var liveEnemy = new Array();
var liveAlly = new Array();
var activeTorps = new Array();
this.onEnterFrame = function () {
if (this.globalChatter > 0) {
this.globalChatter--;
}
if (this.shotCount >= 1500) {
this.shotCount = 1000;
}
if (this.missileCount >= 40) {
this.missileCount = 1;
}
if (this.torpedoNumber >= 95) {
this.torpedoNumber = 50;
}
if (this.enemyNumber >= 650) {
this.enemyNumber = 600;
}
if (this.allyNumber >= 520) {
this.allyNumber = 500;
}
if (this.bigNumber >= 130) {
this.bigNumber = 100;
}
if (this.counterMeasures >= 170) {
this.counterMeasures = 140;
}
var _local4 = liveEnemy.length - 1;
while (_local4 >= 0) {
if (liveEnemy[_local4].dead) {
liveEnemy.splice(_local4, 1);
}
_local4--;
}
var _local3 = liveAlly.length - 1;
while (_local3 >= 0) {
if (liveAlly[_local3].dead) {
liveAlly.splice(_local3, 1);
}
_local3--;
}
var _local2 = activeTorps.length - 1;
while (_local2 >= 0) {
if (activeTorps[_local2]._currentframe >= 2) {
activeTorps.splice(_local2, 1);
}
_local2--;
}
if (this.importantBroadcast) {
var _local6 = 0;
while (_local6 < soundArray.length) {
soundArray[_local6].setVolume(30);
_local6++;
}
} else {
var _local5 = 0;
while (_local5 < soundArray.length) {
soundArray[_local5].setVolume(100);
_local5++;
}
}
};
var soundArray = new Array();
var importantBroadcast = false;
var globalChatter = 0;
this.createEmptyMovieClip("holder", 10000);
profileOneHelp = new Sound(holder);
profileOneHelp.attachSound("profileOneHelp");
soundArray.push(profileOneHelp);
profileOneMissile = new Sound(holder);
profileOneMissile.attachSound("profileOneMissile");
soundArray.push(profileOneMissile);
profileOneCheckFire = new Sound(holder);
profileOneCheckFire.attachSound("profileOneCheckFire");
soundArray.push(profileOneCheckFire);
profileOneDying = new Sound(holder);
profileOneDying.attachSound("profileOneDying");
soundArray.push(profileOneDying);
profileTwoHelp = new Sound(holder);
profileTwoHelp.attachSound("profileTwoHelp");
soundArray.push(profileTwoHelp);
profileTwoMissile = new Sound(holder);
profileTwoMissile.attachSound("profileTwoMissile");
soundArray.push(profiletwoMissile);
profileTwoCheckFire = new Sound(holder);
profileTwoCheckFire.attachSound("profileTwoCheckFire");
soundArray.push(profileTwoCheckFire);
profileTwoDying = new Sound(holder);
profileTwoDying.attachSound("profileTwoDying");
soundArray.push(profileTwoDying);
profileThreeHelp = new Sound(holder);
profileThreeHelp.attachSound("profileThreeHelp");
soundArray.push(profileThreeHelp);
profileThreeMissile = new Sound(holder);
profileThreeMissile.attachSound("profileThreeMissile");
soundArray.push(profileThreeMissile);
profileThreeCheckFire = new Sound(holder);
profileThreeCheckFire.attachSound("profileThreeCheckFire");
soundArray.push(profileThreeCheckFire);
profileThreeDying = new Sound(holder);
profileThreeDying.attachSound("profileThreeDying");
soundArray.push(profileThreeDying);
profileFemaleHelp = new Sound(holder);
profileFemaleHelp.attachSound("femHelp");
soundArray.push(profileThreeHelp);
profileFemaleMissile = new Sound(holder);
profileFemaleMissile.attachSound("femMis");
soundArray.push(profileThreeMissile);
profileFemaleCheckFire = new Sound(holder);
profileFemaleCheckFire.attachSound("femCare");
soundArray.push(profileThreeCheckFire);
profileFemaleDying = new Sound(holder);
profileFemaleDying.attachSound("femDie");
soundArray.push(profileThreeDying);
pilotBravoLeaderHelp = new Sound(holder);
pilotBravoLeaderHelp.attachSound("Help");
soundArray.push(pilotBravoLeaderHelp);
pilotBravoLeaderMissile = new Sound(holder);
pilotBravoLeaderMissile.attachSound("Eatthis");
soundArray.push(pilotBravoLeaderMissile);
pilotBravoLeaderCheckFire = new Sound(holder);
pilotBravoLeaderCheckFire.attachSound("Hey");
soundArray.push(pilotBravoLeaderCheckFire);
pilotBravoLeaderDying = new Sound(holder);
pilotBravoLeaderDying.attachSound("Imout");
soundArray.push(pilotBravoLeaderDying);
launchWarning = new Sound(holder);
launchWarning.attachSound("launchWarning");
soundArray.push(launchWarning);
plasmaImpact = new Sound(holder);
plasmaImpact.attachSound("plasmaImpact");
soundArray.push(plasmaImpact);
plasmaFireArian = new Sound(holder);
plasmaFireArian.attachSound("plasmaFireArian");
soundArray.push(plasmaFireArian);
arianTorpSound = new Sound(holder);
arianTorpSound.attachSound("arianTorpSound");
soundArray.push(arianTorpSound);
twentyImpact = new Sound(holder);
twentyImpact.attachSound("bulletImpact");
soundArray.push(twentyImpact);
twentyFire = new Sound(holder);
twentyFire.attachSound("twentyFire");
soundArray.push(twentyFire);
flakLaunch = new Sound(holder);
flakLaunch.attachSound("FlakLaunch");
soundArray.push(flakLaunch);
missileFire = new Sound(holder);
missileFire.attachSound("missileFire");
soundArray.push(missileFire);
explosion1 = new Sound(holder);
explosion1.attachSound("explosion1");
soundArray.push(explosion1);
boomOne = new Sound(holder);
boomOne.attachSound("airExplosion");
soundArray.push(boomOne);
boomTwo = new Sound(holder);
boomTwo.attachSound("boom_2SHORT");
soundArray.push(boomTwo);
boomFour = new Sound(holder);
boomFour.attachSound("boom_4");
soundArray.push(boomFour);
bulwarkDying = new Sound(holder);
bulwarkDying.attachSound("bulwarkDeath");
_root.attachMovie("playerShip", "playerShip", 800, {_x:1450, _y:2200, _rotation:0});
_root.attachMovie("hud", "hud", 20000, {_x:_root.playerShip._x, _y:_root.playerShip._y});
Frame 23
stop();
sadEnding = new Sound(this);
sadEnding.attachSound("sadEnding");
sadEnding.start(0, 0);
Frame 24
stop();
sadEnding.stop();
Symbol 115 MovieClip Frame 1
myBitmap = new flash.display.BitmapData(90, 90, false, 0);
myBitmap.myRect = new flash.geom.Rectangle(0, 0, 90, 90);
this.attachBitmap(myBitmap, 1);
this.onEnterFrame = function () {
myBitmap.fillRect(myBitmap.myRect, 0);
var _local8 = 0;
while (_local8 < _root.liveEnemy.length) {
var _local4 = ((_root.liveEnemy[_local8]._x - _root.bg._x) / _root.bg._width) * this._width;
var _local3 = ((_root.liveEnemy[_local8]._y - _root.bg._y) / _root.bg._height) * this._height;
myBitmap.setPixel(_local4, _local3, 16724736);
myBitmap.setPixel(_local4 + 0.3, _local3, 16724736);
myBitmap.setPixel(_local4, _local3 + 0.3, 16724736);
myBitmap.setPixel(_local4, _local3 - 0.3, 16724736);
myBitmap.setPixel(_local4 - 0.3, _local3, 16724736);
_local8++;
}
var _local7 = 0;
while (_local7 < _root.liveAlly.length) {
var _local6 = ((_root.liveAlly[_local7]._x - _root.bg._x) / _root.bg._width) * this._width;
var _local5 = ((_root.liveAlly[_local7]._y - _root.bg._y) / _root.bg._height) * this._height;
myBitmap.setPixel(_local6, _local5, 65331);
myBitmap.setPixel(_local6 + 0.3, _local5, 65331);
myBitmap.setPixel(_local6 - 0.3, _local5, 65331);
myBitmap.setPixel(_local6, _local5 + 0.3, 65331);
myBitmap.setPixel(_local6, _local5 - 0.3, 65331);
_local7++;
}
var _local10 = ((_root.playerShip._x - _root.bg._x) / _root.bg._width) * this._width;
var _local9 = ((_root.playerShip._y - _root.bg._y) / _root.bg._height) * this._height;
myBitmap.setPixel(_local10, _local9, 16777215);
myBitmap.setPixel(_local10 + 0.3, _local9, 16777215);
myBitmap.setPixel(_local10 - 0.3, _local9, 16777215);
myBitmap.setPixel(_local10, _local9 + 0.3, 16777215);
myBitmap.setPixel(_local10, _local9 - 0.3, 16777215);
};
Symbol 122 MovieClip Frame 1
this.stop();
this.onEnterFrame = function () {
if (!_root.playerShip.linked) {
if (_root.playerShip.shot == "left") {
this.gotoAndStop(1);
} else if (_root.playerShip.shot == "right") {
this.gotoAndStop(2);
}
} else {
this.gotoAndStop(3);
}
};
Symbol 129 MovieClip Frame 1
this.stop();
this.onEnterFrame = function () {
if ((_root.playerShip.missileTimer > 0) || (_root.playerShip.missiles == 0)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
Symbol 132 MovieClip Frame 1
this.stop();
this.onEnterFrame = function () {
if (_root.playerShip.health > 65) {
this.gotoAndStop(1);
} else if (_root.playerShip.health > 30) {
this.gotoAndStop(2);
} else if (_root.playerShip.health > 0) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(4);
}
};
Symbol 135 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.playerShip.health > 0) {
this._yscale = _root.playerShip.health;
} else {
this._yscale = 0;
}
};
Symbol 137 MovieClip [hud] Frame 1
function followPlayer() {
this._x = _root.playerShip._x;
this._y = _root.playerShip._y;
}
function camControl() {
rp.x = _x;
rp.y = _y;
var _local5 = camH * (_yscale * 0.01);
var _local6 = camW * (_xscale * 0.01);
var _local3 = sH / _local5;
var _local4 = sW / _local6;
_x2 = (_local6 / 2) * _local4;
_y2 = (_local5 / 2) * _local3;
_xscale2 = _local4 * 100;
_yscale2 = _local3 * 100;
_rotation2 = -_rotation;
_parent.filters = this.filters;
_parent.transform.colorTransform = this.transform.colorTransform;
}
function reset() {
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
_parent._rotation = 0;
_parent._visible = true;
}
function set_x2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._x = _parent._x + (value - _local2.x);
}
function get_x2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.x);
}
function set_y2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._y = _parent._y + (value - _local2.y);
}
function get_y2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.y);
}
function get_xscale2() {
return(_parent._xscale);
}
function set_xscale2(value) {
setProperty2("_xscale", value);
}
function get_yscale2() {
return(_parent._yscale);
}
function set_yscale2(value) {
setProperty2("_yscale", value);
}
function get_rotation2() {
return(parent.rotation);
}
function set_rotation2(value) {
setProperty2("_rotation", value);
}
function setProperty2(prop, n) {
var _local3 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local3);
_parent[prop] = n;
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._x = _parent._x - (_local2.x - _local3.x);
_parent._y = _parent._y - (_local2.y - _local3.y);
}
addProperty("_x2", get_x2, set_x2);
addProperty("_y2", get_y2, set_y2);
addProperty("_xscale2", get_xscale2, set_xscale2);
addProperty("_yscale2", get_yscale2, set_yscale2);
addProperty("_rotation2", get_rotation2, set_rotation2);
var oldScaleMode = stage.scaleMode;
stage.scaleMode = "exactFit";
var sW = Stage.width;
var sH = Stage.height;
stage.scaleMode = oldScaleMode;
var bounds_obj = this.getBounds(this);
var camH = Math.abs(bounds_obj.yMax - bounds_obj.yMin);
var camW = Math.abs(bounds_obj.xMax - bounds_obj.xMin);
var rp = {x:this._x, y:this._y};
onEnterFrame = function () {
camControl();
};
setInterval(function () {
followPlayer();
}, 1);
this.onUnload = reset;
Symbol 139 MovieClip [vCam] Frame 1
function camControl() {
rp.x = _x;
rp.y = _y;
var _local5 = camH * (_yscale * 0.01);
var _local6 = camW * (_xscale * 0.01);
var _local3 = sH / _local5;
var _local4 = sW / _local6;
_x2 = (_local6 / 2) * _local4;
_y2 = (_local5 / 2) * _local3;
_xscale2 = _local4 * 100;
_yscale2 = _local3 * 100;
_rotation2 = -_rotation;
_parent.filters = this.filters;
_parent.transform.colorTransform = this.transform.colorTransform;
}
function reset() {
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
_parent._rotation = 0;
_parent._visible = true;
}
function set_x2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._x = _parent._x + (value - _local2.x);
}
function get_x2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.x);
}
function set_y2(value) {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._y = _parent._y + (value - _local2.y);
}
function get_y2() {
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
return(_local2.y);
}
function get_xscale2() {
return(_parent._xscale);
}
function set_xscale2(value) {
setProperty2("_xscale", value);
}
function get_yscale2() {
return(_parent._yscale);
}
function set_yscale2(value) {
setProperty2("_yscale", value);
}
function get_rotation2() {
return(parent.rotation);
}
function set_rotation2(value) {
setProperty2("_rotation", value);
}
function setProperty2(prop, n) {
var _local3 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local3);
_parent[prop] = n;
var _local2 = {x:rp.x, y:rp.y};
_parent.localToGlobal(_local2);
_parent._x = _parent._x - (_local2.x - _local3.x);
_parent._y = _parent._y - (_local2.y - _local3.y);
}
_visible = false;
addProperty("_x2", get_x2, set_x2);
addProperty("_y2", get_y2, set_y2);
addProperty("_xscale2", get_xscale2, set_xscale2);
addProperty("_yscale2", get_yscale2, set_yscale2);
addProperty("_rotation2", get_rotation2, set_rotation2);
var oldScaleMode = stage.scaleMode;
stage.scaleMode = "exactFit";
var sW = Stage.width;
var sH = Stage.height;
stage.scaleMode = oldScaleMode;
var bounds_obj = this.getBounds(this);
var camH = Math.abs(bounds_obj.yMax - bounds_obj.yMin);
var camW = Math.abs(bounds_obj.xMax - bounds_obj.xMin);
var rp = {x:this._x, y:this._y};
onEnterFrame = function () {
camControl();
};
this.onUnload = reset;
Symbol 149 MovieClip Frame 1
if (((this._parent._x <= (_root.hud._x + 250)) && (this._parent._x >= (_root.hud._x - 250))) && ((this._parent._y <= (_root.hud._y + 250)) && (this._parent._y >= (_root.hud._y - 250)))) {
_root.boomOne.start(0, 0);
}
Symbol 149 MovieClip Frame 16
stop();
this.removeMovieClip();
Symbol 150 MovieClip [alliedFighterAlpha] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireTwenty() {
if (this.twentyTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("twentyMM", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = this._x - (33 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount]._y = this._y - (33 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = (-6 + this._rotation) + (Math.random() * 12);
this.twentyAmmo--;
this.twentyTimer = 5;
_root.shotCount++;
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("bloodHoundMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
if (((this.cutChatter < 500) && (_root.globalChatter < 200)) && (!_root.imporantBroadcast)) {
_root[this.profile + "Missile"].start(0, 0);
_root.globalChatter = _root.globalChatter + 250;
}
}
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if (((this.pursuitTimer > 200) && (this.pursuitTimer < 360)) && (this.twentyAmmo > 0)) {
this.fireTwenty();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
if (this.distance < 400) {
if ((this.pursuitTimer == 350) && (this.missiles > 0)) {
this.fireMissile();
}
}
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var twentyAmmo = 150;
var twentyTimer = 0;
var missiles = 4;
var missileTimer = 0;
var counterMeasureTimer = 0;
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile;
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.twentyTimer > 0) {
this.twentyTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 150 MovieClip [alliedFighterAlpha] Frame 18
stop();
this.removeMovieClip();
Symbol 152 MovieClip [alliedFighterBravoLeader] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireTwenty() {
if (this.twentyTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("twentyMM", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = this._x - (33 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount]._y = this._y - (33 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = (-6 + this._rotation) + (Math.random() * 12);
this.twentyAmmo--;
this.twentyTimer = 5;
_root.shotCount++;
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("bloodHoundMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
if (((this.cutChatter < 500) && (_root.globalChatter < 200)) && (!_root.imporantBroadcast)) {
_root[this.profile + "Missile"].start(0, 0);
_root.globalChatter = _root.globalChatter + 250;
}
}
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if (((this.pursuitTimer > 200) && (this.pursuitTimer < 360)) && (this.twentyAmmo > 0)) {
this.fireTwenty();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
if (this.distance < 400) {
if ((this.pursuitTimer == 350) && (this.missiles > 0)) {
this.fireMissile();
}
}
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var twentyAmmo = 150;
var twentyTimer = 0;
var missiles = 4;
var missileTimer = 0;
var counterMeasureTimer = 0;
var health = 200;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile = "pilotBravoLeader";
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.twentyTimer > 0) {
this.twentyTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 152 MovieClip [alliedFighterBravoLeader] Frame 18
stop();
this.removeMovieClip();
Symbol 154 MovieClip [alliedFighterCharlie] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireTwenty() {
if (this.twentyTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("twentyMM", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = this._x - (33 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount]._y = this._y - (33 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = (-6 + this._rotation) + (Math.random() * 12);
this.twentyAmmo--;
this.twentyTimer = 5;
_root.shotCount++;
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("bloodHoundMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
if (((this.cutChatter < 500) && (_root.globalChatter < 200)) && (!_root.imporantBroadcast)) {
_root[this.profile + "Missile"].start(0, 0);
_root.globalChatter = _root.globalChatter + 250;
}
}
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if (((this.pursuitTimer > 200) && (this.pursuitTimer < 360)) && (this.twentyAmmo > 0)) {
this.fireTwenty();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
if (this.distance < 400) {
if ((this.pursuitTimer == 350) && (this.missiles > 0)) {
this.fireMissile();
}
}
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var twentyAmmo = 150;
var twentyTimer = 0;
var missiles = 4;
var missileTimer = 0;
var counterMeasureTimer = 0;
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile;
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.twentyTimer > 0) {
this.twentyTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 154 MovieClip [alliedFighterCharlie] Frame 18
stop();
this.removeMovieClip();
Symbol 156 MovieClip [alliedFighterInstructor] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile = "instructor";
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 156 MovieClip [alliedFighterInstructor] Frame 18
stop();
this.removeMovieClip();
Symbol 158 MovieClip [alliedFighterBravo] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireTwenty() {
if (this.twentyTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("twentyMM", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = this._x - (33 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount]._y = this._y - (33 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = (-6 + this._rotation) + (Math.random() * 12);
this.twentyAmmo--;
this.twentyTimer = 5;
_root.shotCount++;
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("bloodHoundMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
if (((this.cutChatter < 500) && (_root.globalChatter < 200)) && (!_root.imporantBroadcast)) {
_root[this.profile + "Missile"].start(0, 0);
_root.globalChatter = _root.globalChatter + 250;
}
}
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if (((this.pursuitTimer > 200) && (this.pursuitTimer < 360)) && (this.twentyAmmo > 0)) {
this.fireTwenty();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
if (this.distance < 400) {
if ((this.pursuitTimer == 350) && (this.missiles > 0)) {
this.fireMissile();
}
}
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var twentyAmmo = 150;
var twentyTimer = 0;
var missiles = 4;
var missileTimer = 0;
var counterMeasureTimer = 0;
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile;
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.twentyTimer > 0) {
this.twentyTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 158 MovieClip [alliedFighterBravo] Frame 18
stop();
this.removeMovieClip();
Symbol 160 MovieClip [playerShip] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-14.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-14.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireTwenty() {
if (this.twentyTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("twentyMM", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = this._x - (33 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount]._y = this._y - (33 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = (-6 + this._rotation) + (Math.random() * 12);
this.twentyAmmo--;
this.twentyTimer = 5;
_root.shotCount++;
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("bloodHoundMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
}
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 7.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var twentyAmmo = 150;
var twentyTimer = 0;
var missiles = 4;
var missileTimer = 0;
var counterMeasureTimer = 0;
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var a = false;
var through = false;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (Key.isDown(37)) {
this.turnCCW();
}
if (Key.isDown(39)) {
this.turnCW();
}
if (Key.isDown(38)) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (Key.isDown(65)) {
if (!this.a) {
this.toggleLinked();
this.a = true;
}
} else {
this.a = false;
}
if (Key.isDown(90)) {
this.fireGuns();
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (Key.isDown(88) && (this.twentyAmmo > 0)) {
this.fireTwenty();
}
if (this.twentyTimer > 0) {
this.twentyTimer--;
}
if (Key.isDown(67) && (this.missiles > 0)) {
this.fireMissile();
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (Key.isDown(40)) {
this.deployCM();
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
}
};
Symbol 160 MovieClip [playerShip] Frame 18
stop();
this.removeMovieClip();
Symbol 167 MovieClip [japPlasma] Frame 1
stop();
var moveSpeed = 16;
var timer = 0;
var shooter;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.plasmaFireArian.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentFrame == 1) {
var _local5 = (this._rotation / 180) * Math.PI;
var _local6 = Math.sin(this.rot);
var _local7 = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.moveSpeed);
this._y = this._y - (this.yMov * this.moveSpeed);
var _local4 = 0;
while (_local4 < _root.liveAlly.length) {
if (this.hitTest(_root.liveAlly[_local4].hitBox1)) {
this.play();
_root.liveAlly[_local4].health = _root.liveAlly[_local4].health - 5;
} else if (this.hitTest(_root.liveAlly[_local4].hitBox2)) {
this.play();
_root.liveAlly[_local4].health = _root.liveAlly[_local4].health - 5;
}
_local4++;
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if ((this.hitTest(_root.liveEnemy[_local3].hitBox1) && (this.shooter != _root.liveEnemy[_local3])) && (!_root.liveEnemy[_local4].bigShip)) {
this.play();
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 2.5;
} else if ((this.hitTest(_root.liveEnemy[_local3].hitBox2) && (this.shooter != _root.liveEnemy[_local3])) && (!_root.liveEnemy[_local4].bigShip)) {
this.play();
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 2.5;
}
_local3++;
}
this.timer++;
if (this.timer >= 22) {
this.removeMovieClip();
}
}
};
Symbol 167 MovieClip [japPlasma] Frame 2
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.plasmaImpact.start(0, 0);
}
Symbol 167 MovieClip [japPlasma] Frame 12
stop();
this.removeMovieClip();
Symbol 173 MovieClip [arianPlasma] Frame 1
stop();
var moveSpeed = 16;
var timer = 0;
var shooter;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.plasmaFireArian.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentFrame == 1) {
var _local6 = (this._rotation / 180) * Math.PI;
var _local7 = Math.sin(this.rot);
var _local8 = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.moveSpeed);
this._y = this._y - (this.yMov * this.moveSpeed);
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if ((this.hitTest(_root.liveAlly[_local3].hitBox1) && (this.shooter != _root.liveAlly[_local3])) && (!_root.liveAlly[_local3].bigShip)) {
this.play();
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - 0.5;
if ((_root.liveAlly[_local3].cutChatter < 150) && (_root.globalChatter < 150)) {
_root[_root.liveAlly[_local3].profile + "CheckFire"].start(0, 0);
_root.globalChatter = _root.globalChatter + 100;
_root.liveAlly[_local3].cutChatter = _root.liveAlly[_local3].cutChatter + 300;
}
} else if ((this.hitTest(_root.liveAlly[_local3].hitBox2) && (this.shooter != _root.liveAlly[_local3])) && (!_root.liveAlly[_local3].bigShip)) {
this.play();
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - 0.5;
if ((_root.liveAlly[_local3].cutChatter < 150) && (_root.globalChatter < 150)) {
_root[_root.liveAlly[_local3].profile + "CheckFire"].start(0, 0);
_root.globalChatter = _root.globalChatter + 100;
_root.liveAlly[_local3].cutChatter = _root.liveAlly[_local3].cutChatter + 300;
}
}
_local3++;
}
var _local4 = 0;
while (_local4 < _root.liveEnemy.length) {
if (this.hitTest(_root.liveEnemy[_local4].hitBox1)) {
this.play();
_root.liveEnemy[_local4].health = _root.liveEnemy[_local4].health - 5;
} else if (this.hitTest(_root.liveEnemy[_local4].hitBox2)) {
this.play();
_root.liveEnemy[_local4].health = _root.liveEnemy[_local4].health - 5;
}
_local4++;
}
var _local5 = 0;
while (_local5 < _root.activeTorps.length) {
if (this.hitTest(_root.activeTorps[_local5])) {
this.play();
_root.activeTorps[_local5].play();
}
_local5++;
}
this.timer++;
if (this.timer >= 22) {
this.removeMovieClip();
}
}
};
Symbol 173 MovieClip [arianPlasma] Frame 2
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.plasmaImpact.start(0, 0);
}
Symbol 173 MovieClip [arianPlasma] Frame 12
stop();
this.removeMovieClip();
Symbol 177 MovieClip [twentyMM] Frame 1
stop();
var shooter;
var moveSpeed = (this.shooter.inertia + 18);
var timer = 0;
var damage = (moveSpeed * 0.588235294117647);
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.twentyFire.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentFrame == 1) {
var _local6 = (this._rotation / 180) * Math.PI;
var _local7 = Math.sin(this.rot);
var _local8 = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.moveSpeed);
this._y = this._y - (this.yMov * this.moveSpeed);
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if ((this.hitTest(_root.liveAlly[_local3].hitBox1) && (this.shooter != _root.liveAlly[_local3])) && (!_root.liveAlly[_local3].bigShip)) {
this.play();
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - (this.damage / 10);
if ((_root.liveAlly[_local3].cutChatter < 150) && (_root.globalChatter < 150)) {
_root[_root.liveAlly[_local3].profile + "CheckFire"].start(0, 0);
_root.globalChatter = _root.globalChatter + 100;
_root.liveAlly[_local3].cutChatter = _root.liveAlly[_local3].cutChatter + 300;
}
} else if ((this.hitTest(_root.liveAlly[_local3].hitBox2) && (this.shooter != _root.liveAlly[_local3])) && (!_root.liveAlly[_local3].bigShip)) {
this.play();
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - (this.damage / 10);
if ((_root.liveAlly[_local3].cutChatter < 150) && (_root.globalChatter < 150)) {
_root[_root.liveAlly[_local3].profile + "CheckFire"].start(0, 0);
_root.globalChatter = _root.globalChatter + 100;
_root.liveAlly[_local3].cutChatter = _root.liveAlly[_local3].cutChatter + 300;
}
}
_local3++;
}
var _local4 = 0;
while (_local4 < _root.liveEnemy.length) {
if (this.hitTest(_root.liveEnemy[_local4].hitBox1)) {
this.play();
_root.liveEnemy[_local4].health = _root.liveEnemy[_local4].health - this.damage;
} else if (this.hitTest(_root.liveEnemy[_local4].hitBox2)) {
this.play();
_root.liveEnemy[_local4].health = _root.liveEnemy[_local4].health - this.damage;
}
_local4++;
}
var _local5 = 0;
while (_local5 < _root.activeTorps.length) {
if (this.hitTest(_root.activeTorps[_local5])) {
this.play();
_root.activeTorps[_local5].play();
}
_local5++;
}
this.timer++;
if (this.timer >= 10) {
this.removeMovieClip();
}
}
};
Symbol 177 MovieClip [twentyMM] Frame 2
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.twentyImpact.start(0, 0);
}
Symbol 177 MovieClip [twentyMM] Frame 4
stop();
this.removeMovieClip();
Symbol 185 MovieClip Frame 1
if (((this._parent._x <= (_root.hud._x + 250)) && (this._parent._x >= (_root.hud._x - 250))) && ((this._parent._y <= (_root.hud._y + 250)) && (this._parent._y >= (_root.hud._y - 250)))) {
_root.boomTwo.start(0, 0);
}
Symbol 185 MovieClip Frame 7
this.stop();
Symbol 186 MovieClip [bloodHoundMissile] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
this.minObject = _root.liveEnemy[0];
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < 0) {
this.turnCCW();
} else if (this.rotationDifference > 0) {
this.turnCW();
}
}
stop();
var rotationRate = 11;
var speed = 10;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
var timer = 0;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.missileFire.start(0, 0);
}
this.chooseTarget();
this.onEnterFrame = function () {
if (this._currentframe == 1) {
this.rot = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rot);
this.yMov = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
if (this.targetLocked.dead) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
this.timer++;
if (this.timer >= 180) {
this.play();
}
if (this.hitTest(this.targetLocked.hitBox1)) {
this.targetLocked.health = this.targetLocked.health - 50;
this.play();
} else if (this.hitTest(this.targetLocked.hitBox2)) {
this.targetLocked.health = this.targetLocked.health - 50;
this.play();
}
}
};
Symbol 186 MovieClip [bloodHoundMissile] Frame 9
stop();
this.removeMovieClip();
Symbol 188 MovieClip [japMediumFighter] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-1.6 * Math.cos(this.shotAngle))) - (-18.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-18.9 * Math.cos(this.shotAngle))) + (-1.6 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (1.6 * Math.cos(this.shotAngle))) - (-18.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-18.9 * Math.cos(this.shotAngle))) + (1.6 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("japMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
_root["missile" + _root.missileCount].targetLocked = this.targetLocked;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
}
}
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if ((this.pursuitTimer == 500) && (this.missiles > 0)) {
this.fireMissile();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
}
stop();
_root.liveEnemy.push(this);
var speed = 7.5;
var rotationRate = 5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var missiles = 2;
var missileTimer = 0;
var health = 75;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveAlly[_local3]._x) * (this._x - _root.liveAlly[_local3]._x)) + ((this._y - _root.liveAlly[_local3]._y) * (this._y - _root.liveAlly[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
}
};
Symbol 188 MovieClip [japMediumFighter] Frame 18
stop();
this.removeMovieClip();
Symbol 190 MovieClip [japMissile] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < 0) {
this.turnCCW();
} else if (this.rotationDifference > 0) {
this.turnCW();
}
}
stop();
var rotationRate = 8.5;
var speed = 9;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
var timer = 0;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.missileFire.start(0, 0);
}
if (this.targetLocked == _root.playerShip) {
_root.launchWarning.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentframe == 1) {
this.rot = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rot);
this.yMov = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
if (this.targetLocked.dead) {
this.play();
} else {
this.pursueTarget();
}
this.timer++;
if (this.timer >= 110) {
this.play();
}
if (this.hitTest(this.targetLocked.hitBox1)) {
this.targetLocked.health = this.targetLocked.health - 30;
this.play();
} else if (this.hitTest(this.targetLocked.hitBox2)) {
this.targetLocked.health = this.targetLocked.health - 30;
this.play();
}
var _local3 = 140;
while (_local3 <= 170) {
if (((_local3 % 2) == 0) && (this.hitTest(_root["chaff" + _local3]))) {
this.play();
}
_local3++;
}
if (this.targetLocked != _root.playerShip) {
this.targetLocked.deployCM();
}
}
};
Symbol 190 MovieClip [japMissile] Frame 9
stop();
this.removeMovieClip();
Symbol 195 MovieClip [japLightFighter] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-2 * Math.cos(this.shotAngle))) - (-15.3 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-15.3 * Math.cos(this.shotAngle))) + (-2 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (2 * Math.cos(this.shotAngle))) - (-15.3 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-15.3 * Math.cos(this.shotAngle))) + (2 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
}
stop();
_root.liveEnemy.push(this);
var speed = 8;
var rotationRate = 4;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var health = 50;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveAlly[_local3]._x) * (this._x - _root.liveAlly[_local3]._x)) + ((this._y - _root.liveAlly[_local3]._y) * (this._y - _root.liveAlly[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
}
};
Symbol 195 MovieClip [japLightFighter] Frame 18
stop();
this.removeMovieClip();
Symbol 197 MovieClip [japChrysanthemumFighter] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.4 * Math.cos(this.shotAngle))) - (-28.3 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-28.3 * Math.cos(this.shotAngle))) + (-8.4 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.4 * Math.cos(this.shotAngle))) - (-28.3 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-28.3 * Math.cos(this.shotAngle))) + (8.4 * Math.sin(this.shotAngle));
this.startLeftXX = (this._x + (-2.5 * Math.cos(this.shotAngle))) - (-45.1 * Math.sin(this.shotAngle));
this.startLeftYY = (this._y + (-45.1 * Math.cos(this.shotAngle))) + (-2.5 * Math.sin(this.shotAngle));
this.startRightXX = (this._x + (2.5 * Math.cos(this.shotAngle))) - (-45.1 * Math.sin(this.shotAngle));
this.startRightYY = (this._y + (-45.1 * Math.cos(this.shotAngle))) + (2.5 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftXX;
_root["bullet" + _root.shotCount]._y = startLeftYY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightXX;
_root["bullet" + _root.shotCount]._y = startRightYY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftXX;
_root["bullet" + _root.shotCount]._y = startLeftYY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightXX;
_root["bullet" + _root.shotCount]._y = startRightYY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("japMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
_root["missile" + _root.missileCount].targetLocked = this.targetLocked;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
}
}
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if ((this.pursuitTimer == 500) && (this.missiles > 0)) {
this.fireMissile();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
}
stop();
_root.liveEnemy.push(this);
var speed = 6.5;
var rotationRate = 4.5;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var missiles = 2;
var missileTimer = 0;
var health = 100;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveAlly[_local3]._x) * (this._x - _root.liveAlly[_local3]._x)) + ((this._y - _root.liveAlly[_local3]._y) * (this._y - _root.liveAlly[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
}
};
Symbol 197 MovieClip [japChrysanthemumFighter] Frame 18
stop();
this.removeMovieClip();
Symbol 205 MovieClip Frame 1
if (((this._parent._x <= (_root.hud._x + 250)) && (this._parent._x >= (_root.hud._x - 250))) && ((this._parent._y <= (_root.hud._y + 250)) && (this._parent._y >= (_root.hud._y - 250)))) {
_root.boomFour.start(0, 0);
}
Symbol 205 MovieClip Frame 7
stop();
Symbol 206 MovieClip [japTorpedo] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < 0) {
this.turnCCW();
} else if (this.rotationDifference > 0) {
this.turnCW();
}
}
stop();
_root.activeTorps.push(this);
var rotationRate = 2;
var speed = 8;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
var timer = 0;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.missileFire.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentframe == 1) {
this.rot = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rot);
this.yMov = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
if (this.targetLocked.dead) {
this.play();
} else {
this.pursueTarget();
}
this.timer++;
if (this.timer >= 110) {
this.play();
}
if (this.hitTest(this.targetLocked.hitBox1)) {
this.targetLocked.health = this.targetLocked.health - 100;
this.play();
} else if (this.hitTest(this.targetLocked.hitBox2)) {
this.targetLocked.health = this.targetLocked.health - 100;
this.play();
}
}
};
Symbol 206 MovieClip [japTorpedo] Frame 8
stop();
this.removeMovieClip();
Symbol 208 MovieClip [japScoutFighter] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireGuns() {
if (this.shotTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-8.3 * Math.cos(this.shotAngle))) - (-12.9 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-12.9 * Math.cos(this.shotAngle))) + (-8.3 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (8.3 * Math.cos(this.shotAngle))) - (-12.9 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-12.9 * Math.cos(this.shotAngle))) + (8.3 * Math.sin(this.shotAngle));
if (this.linked) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 15;
} else {
if ((this.shot == "left") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "right";
}
if ((this.shot == "right") && (this.shotTimer == 0)) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation;
_root.shotCount++;
this.shotTimer = 10;
this.shot = "left";
}
}
}
}
function fireMissile() {
if (this.missiles > 0) {
if (this.missileTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("japMissile", "missile" + _root.missileCount, _root.missileCount);
_root["missile" + _root.missileCount]._x = this._x - (9 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._y = this._y - (9 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["missile" + _root.missileCount]._rotation = this._rotation;
_root["missile" + _root.missileCount].targetLocked = this.targetLocked;
this.missiles--;
_root.missileCount++;
this.missileTimer = this.missileTimer + 90;
}
}
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
if ((this.pursuitTimer == 500) && (this.missiles > 0)) {
this.fireMissile();
}
}
this.pursuitTimer++;
if (this.pursuitTimer >= 501) {
this.toggleLinked();
this.pursuitTimer = 0;
}
}
stop();
_root.liveEnemy.push(this);
var speed = 6;
var rotationRate = 3.6;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var linked = false;
var shot = "left";
var shotTimer = 0;
var missiles = 1;
var missileTimer = 0;
var health = 60;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.missileTimer > 0) {
this.missileTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveAlly[_local3]._x) * (this._x - _root.liveAlly[_local3]._x)) + ((this._y - _root.liveAlly[_local3]._y) * (this._y - _root.liveAlly[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 500)) {
this.secondPass = false;
this.chooseTarget();
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
}
};
Symbol 208 MovieClip [japScoutFighter] Frame 18
stop();
this.removeMovieClip();
Symbol 212 MovieClip Frame 1
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((aX - _root.liveAlly[i]._x) * (aX - _root.liveAlly[i]._x)) + ((aY - _root.liveAlly[i]._y) * (aY - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((aX - _root.liveAlly[i]._x) * (aX - _root.liveAlly[i]._x)) + ((aY - _root.liveAlly[i]._y) * (aY - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
}
function fireGuns() {
if (this.shotTimer == 0) {
_root.attachMovie("japPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = eX;
_root["bullet" + _root.shotCount]._y = eY;
_root["bullet" + _root.shotCount].shooter = _parent;
_root["bullet" + _root.shotCount]._rotation = (this.theta * 180) / Math.PI;
_root.shotCount++;
this.shotTimer = 30;
}
}
function trackTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this.aX;
this.targetY = this.targetLocked._y - this.aY;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - ((this.theta * 180) / Math.PI);
this.distance = Math.sqrt(((aX - this.targetLocked._x) * (aX - this.targetLocked._x)) + ((aY - this.targetLocked._y) * (aY - this.targetLocked._y)));
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < -7) {
this._rotation = this._rotation - 7;
} else if (this.rotationDifference > 7) {
this._rotation = this._rotation + 7;
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
}
}
var targetX;
var targetY;
var targetAngle;
var startX;
var startY;
var aX;
var aY;
var dY;
var dX;
var eX;
var eY;
var turretLength = 13.8;
var theta1;
var theta2;
var theta;
var shotTimer = 0;
var targetLocked;
var fixation = 0;
this.onEnterFrame = function () {
this.theta1 = (_parent._rotation * Math.PI) / 180;
this.theta2 = (this._rotation * Math.PI) / 180;
this.theta = theta1 + theta2;
this.dX = this._x + (turretLength * Math.sin(theta2));
this.dY = this._y - (turretLength * Math.cos(theta2));
this.eX = (_parent._x + (dX * Math.cos(theta1))) - (dY * Math.sin(theta1));
this.eY = (_parent._y + (dX * Math.sin(theta1))) + (dY * Math.cos(theta1));
this.aX = this._x + _parent._x;
this.aY = this._y + _parent._y;
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.fixation >= 900) {
this.fixation = 0;
this.chooseTarget();
}
if ((this.targetLocked.dead || (this.targetLocked == undefined)) || (this.distance > 300)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.trackTarget();
}
};
Symbol 213 MovieClip [japBomber] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function fireTorpedo() {
if (this.torps > 0) {
if (this.torpTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
_root.attachMovie("japTorpedo", "torpedo" + _root.torpedoNumber, _root.torpedoNumber);
_root["torpedo" + _root.torpedoNumber]._x = this._x - (23 * Math.cos(this.shotAngle + (Math.PI/2)));
_root["torpedo" + _root.torpedoNumber]._y = this._y - (23 * Math.sin(this.shotAngle + (Math.PI/2)));
_root["torpedo" + _root.torpedoNumber]._rotation = this._rotation;
_root["torpedo" + _root.torpedoNumber].targetLocked = this.targetLocked;
this.torps--;
_root.torpedoNumber++;
this.torpTimer = this.torpTimer + 180;
}
}
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
this.pursuitTimer = 0;
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 500) && ((((this.rotationDifference >= -30) && (this.rotationDifference <= 30)) && (this.targetLocked.bigShip)) && (this.pursuitTimer > 5))) {
this.fireTorpedo();
}
this.pursuitTimer++;
}
stop();
_root.liveEnemy.push(this);
var speed = 5.5;
var rotationRate = 3;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var torps = 8;
var torpTimer = 0;
var health = 120;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked = _root.Bulwark;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.torpTimer > 0) {
this.torpTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveAlly[_local3]._x) * (this._x - _root.liveAlly[_local3]._x)) + ((this._y - _root.liveAlly[_local3]._y) * (this._y - _root.liveAlly[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 600)) {
this.secondPass = false;
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
}
};
Symbol 213 MovieClip [japBomber] Frame 18
this.stop();
this.removeMovieClip();
Symbol 215 MovieClip [alliedBomberBaker] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireTorps() {
if (this.torpTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-38.5 * Math.cos(this.shotAngle))) - (-1.8 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-1.8 * Math.cos(this.shotAngle))) + (-38.5 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (38.5 * Math.cos(this.shotAngle))) - (-1.8 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-1.8 * Math.cos(this.shotAngle))) + (38.5 * Math.sin(this.shotAngle));
_root.attachMovie("arianTorp", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation + 2.5;
_root.shotCount++;
_root.attachMovie("arianTorp", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation - 2.5;
_root.shotCount++;
this.torpTimer = 60;
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
this.pursuitTimer = 0;
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 400) && (((this.rotationDifference >= -15) && (this.rotationDifference <= 15)) && (this.pursuitTimer > 10))) {
this.fireTorps();
}
this.pursuitTimer++;
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 6;
var rotationRate = 4;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var torpTimer = 0;
var counterMeasureTimer = 0;
var health = 150;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile;
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.torpTimer > 0) {
this.torpTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 600)) {
this.secondPass = false;
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 215 MovieClip [alliedBomberBaker] Frame 18
stop();
this.removeMovieClip();
Symbol 217 MovieClip [alliedBomberAble] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function toggleLinked() {
if (this.linked) {
this.linked = false;
} else {
this.linked = true;
}
}
function fireTorps() {
if (this.torpTimer == 0) {
this.shotAngle = this._rotation * (Math.PI/180);
this.startLeftX = (this._x + (-38.5 * Math.cos(this.shotAngle))) - (-1.8 * Math.sin(this.shotAngle));
this.startLeftY = (this._y + (-1.8 * Math.cos(this.shotAngle))) + (-38.5 * Math.sin(this.shotAngle));
this.startRightX = (this._x + (38.5 * Math.cos(this.shotAngle))) - (-1.8 * Math.sin(this.shotAngle));
this.startRightY = (this._y + (-1.8 * Math.cos(this.shotAngle))) + (38.5 * Math.sin(this.shotAngle));
_root.attachMovie("arianTorp", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startLeftX;
_root["bullet" + _root.shotCount]._y = startLeftY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation + 2.5;
_root.shotCount++;
_root.attachMovie("arianTorp", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = startRightX;
_root["bullet" + _root.shotCount]._y = startRightY;
_root["bullet" + _root.shotCount].shooter = this;
_root["bullet" + _root.shotCount]._rotation = this._rotation - 2.5;
_root.shotCount++;
this.torpTimer = 60;
}
}
function selfRepair() {
this.health = this.health + 0.02;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.followWaypoint();
this.aggressive = false;
}
this.pursuitTimer = 0;
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
if ((this.distance < 400) && (((this.rotationDifference >= -15) && (this.rotationDifference <= 15)) && (this.pursuitTimer > 10))) {
this.fireTorps();
}
this.pursuitTimer++;
}
function deployCM() {
if (this.counterMeasureTimer == 0) {
_root.attachMovie("chaff", "chaff" + _root.counterMeasures, _root.counterMeasures);
_root["chaff" + _root.counterMeasures]._x = this._x;
_root["chaff" + _root.counterMeasures]._y = this._y;
_root.counterMeasures++;
this.counterMeasureTimer = this.counterMeasureTimer + 40;
}
}
stop();
_root.liveAlly.push(this);
var speed = 6;
var rotationRate = 4;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var torpTimer = 0;
var counterMeasureTimer = 0;
var health = 150;
var dead = false;
var shotAngle = (this._rotation * (Math.PI/180));
var startLeftX;
var startLeftY;
var startRightX;
var startRightY;
var through = false;
var inMotion = false;
var chaseTimer = 0;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
var profile;
var cutChatter = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
if (this.health < 50) {
this.selfRepair();
}
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
if (this.torpTimer > 0) {
this.torpTimer--;
}
if (this.counterMeasureTimer > 0) {
this.counterMeasureTimer--;
}
if (this.aggressive) {
if (this.targetLocked.dead || (this.targetLocked == undefined)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.pursueTarget();
}
} else if (!this.aggressive) {
this.followWaypoint();
}
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (this.forceAggression || (Math.sqrt(((this._x - _root.liveEnemy[_local3]._x) * (this._x - _root.liveEnemy[_local3]._x)) + ((this._y - _root.liveEnemy[_local3]._y) * (this._y - _root.liveEnemy[_local3]._y))) < 1000)) {
this.aggressive = true;
break;
}
this.aggressive = false;
_local3++;
}
if (this.hitTest(this.targetLocked)) {
this.secondPass = true;
}
if (this.secondPass) {
if (this.targetLocked.bigShip && (this.distance > 600)) {
this.secondPass = false;
} else if ((!this.targetLocked.bigShip) && (this.distance > 100)) {
this.secondPass = false;
}
}
if (this.cutChatter > 0) {
this.cutChatter--;
}
if ((((((_root.globalChatter == 0) && (!_root.importantBroadcast)) && (this.cutChatter == 0)) && (this.health <= 50)) && (this.distance < 150)) && (this.targetLocked != null)) {
_root[this.profile + "Help"].start(0, 0);
this.cutChatter = 3000;
_root.globalChatter = _root.globalChatter + 100;
}
if (this.dead && (_root.globalChatter < 300)) {
_root[this.profile + "Dying"].start(0, 0);
_root.globalChatter = _root.globalChatter + 150;
}
}
};
Symbol 217 MovieClip [alliedBomberAble] Frame 18
stop();
this.removeMovieClip();
Symbol 224 MovieClip [arianTorp] Frame 1
stop();
var moveSpeed = 12;
var timer = 0;
var shooter;
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.arianTorpSound.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentFrame == 1) {
var _local5 = (this._rotation / 180) * Math.PI;
var _local6 = Math.sin(this.rot);
var _local7 = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.moveSpeed);
this._y = this._y - (this.yMov * this.moveSpeed);
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
if (_root.liveEnemy[_local3].bigShip) {
if (this.hitTest(_root.liveEnemy[_local3].hitBox1)) {
this.play();
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 25;
} else if (this.hitTest(_root.liveEnemy[_local3].hitBox2)) {
this.play();
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 25;
}
} else if (this.hitTest(_root.liveEnemy[_local3].hitBox1)) {
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 1;
} else if (this.hitTest(_root.liveEnemy[_local3].hitBox2)) {
_root.liveEnemy[_local3].health = _root.liveEnemy[_local3].health - 1;
}
_local3++;
}
var _local4 = 0;
while (_local4 < _root.activeTorps.length) {
if (this.hitTest(_root.activeTorps[_local4])) {
_root.activeTorps[_local4].play();
}
_local4++;
}
this.timer++;
if (this.shooter == _root.Bulwark) {
if (this.timer >= 60) {
this.removeMovieClip();
}
} else if (this.timer >= 40) {
this.removeMovieClip();
}
}
};
Symbol 224 MovieClip [arianTorp] Frame 2
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.explosion1.start(0, 0);
}
Symbol 224 MovieClip [arianTorp] Frame 11
stop();
this.removeMovieClip();
Symbol 227 MovieClip [japTransport] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveEnemy.push(this);
var bigShip = true;
var speed = 1;
var rotationRate = 1;
var drag = 0.05;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 300;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 227 MovieClip [japTransport] Frame 35
stop();
this.removeMovieClip();
Symbol 231 MovieClip Frame 1
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((aX - _root.liveEnemy[i]._x) * (aX - _root.liveEnemy[i]._x)) + ((aY - _root.liveEnemy[i]._y) * (aY - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((aX - _root.liveEnemy[i]._x) * (aX - _root.liveEnemy[i]._x)) + ((aY - _root.liveEnemy[i]._y) * (aY - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
}
function fireGuns() {
if (this.shotTimer == 0) {
_root.attachMovie("arianPlasma", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = eX;
_root["bullet" + _root.shotCount]._y = eY;
_root["bullet" + _root.shotCount].shooter = _parent;
_root["bullet" + _root.shotCount]._rotation = (this.theta * 180) / Math.PI;
_root.shotCount++;
this.shotTimer = 30;
}
}
function trackTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this.aX;
this.targetY = this.targetLocked._y - this.aY;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - ((this.theta * 180) / Math.PI);
this.distance = Math.sqrt(((aX - this.targetLocked._x) * (aX - this.targetLocked._x)) + ((aY - this.targetLocked._y) * (aY - this.targetLocked._y)));
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < -7) {
this._rotation = this._rotation - 7;
} else if (this.rotationDifference > 7) {
this._rotation = this._rotation + 7;
}
if ((this.distance < 300) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
}
}
var targetX;
var targetY;
var targetAngle;
var startX;
var startY;
var aX;
var aY;
var dY;
var dX;
var eX;
var eY;
var turretLength = 13.8;
var theta1;
var theta2;
var theta;
var shotTimer = 0;
var targetLocked;
var fixation = 0;
this.onEnterFrame = function () {
this.theta1 = (_parent._rotation * Math.PI) / 180;
this.theta2 = (this._rotation * Math.PI) / 180;
this.theta = theta1 + theta2;
this.dX = this._x + (turretLength * Math.sin(theta2));
this.dY = this._y - (turretLength * Math.cos(theta2));
this.eX = (_parent._x + (dX * Math.cos(theta1))) - (dY * Math.sin(theta1));
this.eY = (_parent._y + (dX * Math.sin(theta1))) + (dY * Math.cos(theta1));
this.aX = this._x + _parent._x;
this.aY = this._y + _parent._y;
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.fixation >= 900) {
this.fixation = 0;
this.chooseTarget();
}
if ((this.targetLocked.dead || (this.targetLocked == undefined)) || (this.distance > 300)) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
this.minObject = _root.liveEnemy[0];
this.chooseTarget();
} else {
this.trackTarget();
}
};
Symbol 232 MovieClip [arianTransport] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveAlly.push(this);
var bigShip = true;
var profile = "arianTransport";
var cutChatter = 0;
var speed = 0.5;
var rotationRate = 1;
var drag = 0.05;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 300;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 232 MovieClip [arianTransport] Frame 42
stop();
this.removeMovieClip();
Symbol 238 MovieClip Frame 1
function fireGuns() {
_root.attachMovie("arianTorp", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = eX;
_root["bullet" + _root.shotCount]._y = eY;
_root["bullet" + _root.shotCount].shooter = _parent;
_root["bullet" + _root.shotCount]._rotation = (this.theta * 180) / Math.PI;
_root.shotCount++;
}
function trackTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this.aX;
this.targetY = this.targetLocked._y - this.aY;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - ((this.theta * 180) / Math.PI);
this.distance = Math.sqrt(((aX - this.targetLocked._x) * (aX - this.targetLocked._x)) + ((aY - this.targetLocked._y) * (aY - this.targetLocked._y)));
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < -7) {
this._rotation = this._rotation - 7;
} else if (this.rotationDifference > 7) {
this._rotation = this._rotation + 7;
}
if (((this.shotTimer == 0) && (this.distance < 800)) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.play();
this.shotTimer = 300;
}
}
stop();
var targetX;
var targetY;
var targetAngle;
var startX;
var startY;
var aX;
var aY;
var dY;
var dX;
var eX;
var eY;
var turretLength = 48;
var theta1;
var theta2;
var theta;
var shotTimer = 0;
var targetLocked;
this.onEnterFrame = function () {
this.theta1 = (_parent._rotation * Math.PI) / 180;
this.theta2 = (this._rotation * Math.PI) / 180;
this.theta = theta1 + theta2;
this.dX = this._x + (turretLength * Math.sin(theta2));
this.dY = this._y - (turretLength * Math.cos(theta2));
this.eX = (_parent._x + (dX * Math.cos(theta1))) - (dY * Math.sin(theta1));
this.eY = (_parent._y + (dX * Math.sin(theta1))) + (dY * Math.cos(theta1));
this.aX = this._x + _parent._x;
this.aY = this._y + _parent._y;
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.targetLocked != null) {
this.trackTarget();
}
this.targetLocked = _parent.targetLocked;
};
Symbol 238 MovieClip Frame 3
this.fireGuns();
Symbol 238 MovieClip Frame 15
this.fireGuns();
Symbol 238 MovieClip Frame 27
this.fireGuns();
Symbol 238 MovieClip Frame 38
this.gotoAndStop(2);
Symbol 242 MovieClip [arianBulwark] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
this.main1.targetLocked = this.targetLocked;
this.main2.targetLocked = this.targetLocked;
}
function chooseTarget() {
i = 0;
while (i < _root.liveEnemy.length) {
if (Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveEnemy[i]._x) * (this._x - _root.liveEnemy[i]._x)) + ((this._y - _root.liveEnemy[i]._y) * (this._y - _root.liveEnemy[i]._y)));
this.minObject = _root.liveEnemy[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveEnemy[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveAlly.push(this);
var bigShip = true;
var profile = "bulwark";
var cutChatter = 0;
var speed = 1.8;
var rotationRate = 0.75;
var drag = 0.05;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 1800;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveEnemy[0]._x) * (this._x - _root.liveEnemy[0]._x)) + ((this._y - _root.liveEnemy[0]._y) * (this._y - _root.liveEnemy[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
_root.bulwarkDying.start(0, 0);
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 242 MovieClip [arianBulwark] Frame 63
stop();
this.removeMovieClip();
Symbol 246 MovieClip Frame 1
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((aX - _root.liveAlly[i]._x) * (aX - _root.liveAlly[i]._x)) + ((aY - _root.liveAlly[i]._y) * (aY - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((aX - _root.liveAlly[i]._x) * (aX - _root.liveAlly[i]._x)) + ((aY - _root.liveAlly[i]._y) * (aY - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
}
function fireGuns() {
if (this.shotTimer == 0) {
_root.attachMovie("japFlak", "bullet" + _root.shotCount, _root.shotCount);
_root["bullet" + _root.shotCount]._x = eX;
_root["bullet" + _root.shotCount]._y = eY;
_root["bullet" + _root.shotCount].shooter = _parent;
_root["bullet" + _root.shotCount]._rotation = (this.theta * 180) / Math.PI;
_root["bullet" + _root.shotCount].targetLocked = this.targetLocked;
_root.shotCount++;
this.shotTimer = 50 + Math.floor(Math.random() * 20);
}
}
function trackTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this.aX;
this.targetY = this.targetLocked._y - this.aY;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - ((this.theta * 180) / Math.PI);
this.distance = Math.sqrt(((aX - this.targetLocked._x) * (aX - this.targetLocked._x)) + ((aY - this.targetLocked._y) * (aY - this.targetLocked._y)));
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if (this.rotationDifference < -7) {
this._rotation = this._rotation - 7;
} else if (this.rotationDifference > 7) {
this._rotation = this._rotation + 7;
}
if (((this.pursuitTimer > 0) && (this.distance < 300)) && ((this.rotationDifference >= -30) && (this.rotationDifference <= 30))) {
this.fireGuns();
}
this.pursuitTimer++;
}
var targetX;
var targetY;
var targetAngle;
var startX;
var startY;
var aX;
var aY;
var dY;
var dX;
var eX;
var eY;
var turretLength = 4.7;
var theta1;
var theta2;
var theta;
var pursuitTimer = 0;
var shotTimer = 0;
var targetLocked;
var fixation = 0;
this.onEnterFrame = function () {
this.theta1 = (_parent._rotation * Math.PI) / 180;
this.theta2 = (this._rotation * Math.PI) / 180;
this.theta = theta1 + theta2;
this.dX = this._x + (turretLength * Math.sin(theta2));
this.dY = this._y - (turretLength * Math.cos(theta2));
this.eX = (_parent._x + (dX * Math.cos(theta1))) - (dY * Math.sin(theta1));
this.eY = (_parent._y + (dX * Math.sin(theta1))) + (dY * Math.cos(theta1));
this.aX = this._x + _parent._x;
this.aY = this._y + _parent._y;
if (this.shotTimer > 0) {
this.shotTimer--;
}
if (this.fixation >= 900) {
this.fixation = 0;
this.chooseTarget();
}
if ((this.targetLocked.dead || (this.targetLocked == undefined)) || (this.distance > 300)) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
this.minObject = _root.liveAlly[0];
this.chooseTarget();
} else {
this.trackTarget();
}
};
Symbol 248 MovieClip [japFrigate] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveEnemy.push(this);
var bigShip = true;
var speed = 0.65;
var rotationRate = 0.8;
var drag = 0.05;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 1000;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 248 MovieClip [japFrigate] Frame 53
stop();
this.removeMovieClip();
Symbol 250 MovieClip [japFlak] Frame 1
stop();
var moveSpeed = (6 + (Math.random() * 6));
var timer = 0;
var shooter;
var targetLocked;
var distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
var rot = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rot);
var yMov = Math.cos(this.rot);
if (((this._x <= (_root.hud._x + 250)) && (this._x >= (_root.hud._x - 250))) && ((this._y <= (_root.hud._y + 250)) && (this._y >= (_root.hud._y - 250)))) {
_root.flakLaunch.start(0, 0);
}
this.onEnterFrame = function () {
if (this._currentFrame == 1) {
var _local4 = (this._rotation / 180) * Math.PI;
var _local5 = Math.sin(this.rot);
var _local6 = Math.cos(this.rot);
this._x = this._x + (this.xMov * this.moveSpeed);
this._y = this._y - (this.yMov * this.moveSpeed);
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.timer++;
if ((this.timer >= 40) || ((this.distance <= 70) && (this.timer > 5))) {
this.play();
}
}
if (this._currentFrame > 1) {
this._x = this._x + (this.xMov * 3);
this._y = this._y - (this.yMov * 3);
var _local3 = 0;
while (_local3 < _root.liveAlly.length) {
if (this.hitTest(_root.liveAlly[_local3].hitBox1)) {
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - 1;
} else if (this.hitTest(_root.liveAlly[_local3].hitBox2)) {
_root.liveAlly[_local3].health = _root.liveAlly[_local3].health - 1;
}
_local3++;
}
}
};
Symbol 250 MovieClip [japFlak] Frame 8
stop();
this.removeMovieClip();
Symbol 252 MovieClip [targetDrone] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveEnemy.push(this);
var speed = 6;
var rotationRate = 3.6;
var drag = 0.2;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 50;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 252 MovieClip [targetDrone] Frame 18
stop();
this.removeMovieClip();
Symbol 254 MovieClip [japGunship] Frame 1
function turnCW() {
this._rotation = this._rotation + this.rotationRate;
this.leftEngine._visible = true;
}
function turnCCW() {
this._rotation = this._rotation - this.rotationRate;
this.rightEngine._visible = true;
}
function movement() {
this._x = this._x + (this.xMov * this.speed);
this._y = this._y - (this.yMov * this.speed);
this.inertia = this.speed;
this.xMovIn = Math.sin(this.rotRadians);
this.yMovIn = Math.cos(this.rotRadians);
this.engines._visible = true;
}
function followWaypoint() {
var _local4 = this.waypointX - this._x;
var _local3 = this.waypointY - this._y;
var _local7 = Math.atan2(_local3, _local4) + (Math.PI/2);
var _local5 = _local7 * 57.2957795130823;
var _local2 = _local5 - this._rotation;
var _local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local6 > 75) {
this.inMotion = true;
this.atWaypoint = false;
} else {
this.holdPosition();
this.atWaypoint = true;
}
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 < 0) && (!this.atWaypoint)) {
this.turnCCW();
} else if ((_local2 > 0) && (!this.atWaypoint)) {
this.turnCW();
}
}
function setWaypoint(xCoord, yCoord) {
this.waypointX = xCoord;
this.waypointY = yCoord;
}
function holdPosition() {
this.inMotion = false;
}
function acquireTarget(newEnemy) {
this.targetLocked = newEnemy;
}
function chooseTarget() {
i = 0;
while (i < _root.liveAlly.length) {
if (Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y))) < this.distance) {
this.distance = Math.sqrt(((this._x - _root.liveAlly[i]._x) * (this._x - _root.liveAlly[i]._x)) + ((this._y - _root.liveAlly[i]._y) * (this._y - _root.liveAlly[i]._y)));
this.minObject = _root.liveAlly[i];
}
i++;
}
this.acquireTarget(this.minObject);
if (_root.liveAlly[0] == null) {
this.holdPosition();
}
}
function pursueTarget() {
var _local2 = Math.atan2(targetY, targetX) + (Math.PI/2);
this.targetX = this.targetLocked._x - this._x;
this.targetY = this.targetLocked._y - this._y;
this.targetAngle = _local2 * 57.2957795130823;
this.rotationDifference = this.targetAngle - this._rotation;
this.distance = Math.sqrt(((this._x - this.targetLocked._x) * (this._x - this.targetLocked._x)) + ((this._y - this.targetLocked._y) * (this._y - this.targetLocked._y)));
this.inMotion = true;
if (this.rotationDifference > 180) {
this.rotationDifference = this.rotationDifference - 360;
}
if (this.rotationDifference < -180) {
this.rotationDifference = this.rotationDifference + 360;
}
if ((this.rotationDifference < -5) && (!this.secondPass)) {
this.turnCCW();
} else if ((this.rotationDifference > 5) && (!this.secondPass)) {
this.turnCW();
}
}
stop();
_root.liveEnemy.push(this);
var bigShip = true;
var speed = 2;
var rotationRate = 1.2;
var drag = 0.05;
var inertia = 0;
var rotRadians = ((this._rotation / 180) * Math.PI);
var xMov = Math.sin(this.rotRadians);
var yMov = Math.cos(this.rotRadians);
var xMovIn = Math.sin(this.rotRadians);
var yMovIn = Math.cos(this.rotRadians);
var health = 300;
var dead = false;
var through = false;
var inMotion = false;
var aggressive;
var forceAggression;
var secondPass = false;
var waypointX;
var waypointY;
var atWaypoint = false;
var targetLocked;
var distance = Math.sqrt(((this._x - _root.liveAlly[0]._x) * (this._x - _root.liveAlly[0]._x)) + ((this._y - _root.liveAlly[0]._y) * (this._y - _root.liveAlly[0]._y)));
var targetX;
var targetY;
var targetAngle;
var rotationDifference;
var minObject;
var pursuitTimer = 0;
this.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.health <= 0) {
this.dead = true;
this.play();
}
this.leftEngine._visible = false;
this.rightEngine._visible = false;
this.rotRadians = (this._rotation / 180) * Math.PI;
this.xMov = Math.sin(this.rotRadians);
this.yMov = Math.cos(this.rotRadians);
if (this.inMotion) {
this.movement();
} else {
this.engines._visible = false;
this._x = this._x + (this.xMovIn * this.inertia);
this._y = this._y - (this.yMovIn * this.inertia);
if (this.inertia > 0) {
this.inertia = this.inertia - this.drag;
} else {
this.inertia = 0;
}
}
this.followWaypoint();
}
};
Symbol 254 MovieClip [japGunship] Frame 18
stop();
_root.spawner.gunD++;
this.removeMovieClip();
Symbol 258 MovieClip [chaff] Frame 1
var timer = 0;
this.onEnterFrame = function () {
this._rotation = this._rotation + 10;
this.timer++;
if (this.timer >= 30) {
this.removeMovieClip();
}
};
Symbol 266 Button
on (release) {
_root.clearStage();
stopAllSounds();
_root.nextFrame();
_root.aMC.removeMovieClip();
}
Symbol 267 MovieClip [aMC] Frame 1
function follow() {
this._x = _root.hud._x;
this._y = _root.hud._y;
}
winMission = new Sound(this);
winMission.attachSound("LadyArsenic_winMission");
winMission.start(0, 0);
winMission.setVolume(150);
setInterval(function () {
follow();
}, 1);
Symbol 272 Button
on (release) {
_root.clearStage();
stopAllSounds();
_root.gotoAndPlay("mainMenu");
_root.fMC.removeMovieClip();
}
Symbol 276 Button
on (release) {
_root.clearStage();
stopAllSounds();
_root.prevFrame();
_root.fMC.removeMovieClip();
}
Symbol 277 MovieClip [fMC] Frame 1
function follow() {
this._x = _root.hud._x;
this._y = _root.hud._y;
}
loseMission = new Sound(this);
loseMission.attachSound("LadyArsenic_loseMission");
loseMission.start(0, 0);
loseMission.setVolume(150);
setInterval(function () {
follow();
}, 1);
Symbol 283 MovieClip [moonGeminiII] Frame 1
var storedFilters = new Array();
var blurred = (new flash.filters.BlurFilter(11, 11, 3));
this.storedFilters.push(blurred);
this.filters = this.storedFilters;
Symbol 285 MovieClip [planetAria] Frame 1
var storedFilters = new Array();
var blurred = (new flash.filters.BlurFilter(11, 11, 3));
this.storedFilters.push(blurred);
this.filters = this.storedFilters;
Symbol 572 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 287 MovieClip Frame 1
var stars = 500;
var maxSpeed = 18;
var minSpeed = 9;
var i = 1;
while (i < stars) {
var star = this.attachMovie("star", "star" + i, i + 20);
star._x = random(this._width);
star._y = random(this._height);
var size = (random(2) + (0.6 * random(4)));
star._width = size;
star._height = size;
i++;
}
this.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < stars) {
var _local2 = this["star" + _local3];
if (_local2._x > 0) {
_local2._x = _local2._x - (random(maxSpeed - minSpeed) + minSpeed);
} else {
_local2._x = Stage.width;
}
_local3++;
}
};
Symbol 291 Button
on (release) {
_root.gotoAndPlay("credits");
}
Symbol 304 Button
on (release) {
gotoAndPlay ("instructions");
}
Symbol 308 Button
on (release) {
gotoAndPlay ("firstBriefing");
}
Symbol 314 Button
on (release) {
gotoAndPlay ("missionSelect");
}
Symbol 315 Button
on (release) {
_root.gotoAndPlay("mainMenu");
}
Symbol 319 Button
on (release) {
nextFrame();
}
Symbol 340 Button
on (release) {
prevFrame();
}
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Symbol 349 Button
on (release) {
_root.gotoAndPlay("firstBriefing");
}
Symbol 353 Button
on (release) {
_root.gotoAndPlay("secondBriefing");
}
Symbol 357 Button
on (release) {
_root.gotoAndPlay("thirdBriefing");
}
Symbol 361 Button
on (release) {
_root.gotoAndPlay("fourthBriefing");
}
Symbol 365 Button
on (release) {
_root.gotoAndPlay("fifthBriefing");
}
Symbol 369 Button
on (release) {
_root.gotoAndPlay("sixthBriefing");
}
Symbol 373 Button
on (release) {
_root.gotoAndPlay("seventhBriefing");
}
Symbol 377 Button
on (release) {
_root.gotoAndPlay("eighthBriefing");
}
Symbol 381 Button
on (release) {
_root.gotoAndPlay("ninthBriefing");
}
Symbol 382 MovieClip Frame 1
stop();
if (_root.missions == 10) {
this.gotoAndStop(9);
} else {
this.gotoAndStop(_root.missions);
}
Symbol 382 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 3
stop();
Symbol 382 MovieClip Frame 4
stop();
Symbol 382 MovieClip Frame 5
stop();
Symbol 382 MovieClip Frame 6
stop();
Symbol 382 MovieClip Frame 7
stop();
Symbol 382 MovieClip Frame 8
stop();
Symbol 382 MovieClip Frame 9
stop();
Symbol 391 Button
on (release) {
nextFrame();
A.stop();
}
Symbol 396 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 401 Button
on (release) {
stopAllSounds();
_root.nextFrame();
}
Symbol 403 Button
on (release) {
nextFrame();
B.stop();
}
Symbol 404 Button
on (release) {
prevFrame();
B.stop();
}
Symbol 405 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 407 Button
on (release) {
C.stop();
nextFrame();
}
Symbol 408 Button
on (release) {
C.stop();
prevFrame();
}
Symbol 410 Button
on (release) {
prevFrame();
}
Symbol 412 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
A.attachSound("firstBriefingA");
B.attachSound("firstBriefingB");
C.attachSound("firstBriefingC");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 412 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 412 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 412 MovieClip Frame 4
stop();
Symbol 415 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.playerShip._y < (this._y + _parent._y)) {
_root.playerShip._y = _root.playerShip._y + _root.playerShip.speed;
_root.playerShip.inertia = 0;
}
};
Symbol 417 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.playerShip._x > (this._x + _parent._x)) {
_root.playerShip._x = _root.playerShip._x - _root.playerShip.speed;
_root.playerShip.inertia = 0;
}
};
Symbol 419 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.playerShip._x < (this._x + _parent._x)) {
_root.playerShip._x = _root.playerShip._x + _root.playerShip.speed;
_root.playerShip.inertia = 0;
}
};
Symbol 421 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.playerShip._y > (this._y + _parent._y)) {
_root.playerShip._y = _root.playerShip._y - _root.playerShip.speed;
_root.playerShip.inertia = 0;
}
};
Symbol 422 MovieClip Frame 1
var stars = 1000;
var i = 1;
while (i < stars) {
var star = this.attachMovie("star", "star" + i, i + 20);
star._x = random(this._width);
star._y = random(this._height);
var size = (random(2) + (0.6 * random(4)));
star._width = size;
star._height = size;
i++;
}
Symbol 424 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = false;
var timer = 0;
var prompt = false;
var doAble1 = false;
var doAble2 = false;
var doAble3 = false;
var distress = false;
var obj1 = false;
var obj2 = false;
var obj4 = false;
var obj5 = false;
var obj6 = false;
var obj7 = false;
var obj8 = false;
var accomplished = false;
spawnAlly("alliedFighterInstructor", "instructor", 150, 150, 30);
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if ((!accomplished) && (_root.instructor.dead)) {
failed = true;
}
if (doAble1) {
if ((!obj1) && (Key.isDown(37) || (Key.isDown(39)))) {
obj1 = true;
_root.importantBroadcast = true;
if (!failed) {
d3.start(0, 0);
}
}
}
if (doAble2) {
if ((!obj2) && (Key.isDown(38) || (Key.isDown(40)))) {
obj2 = true;
_root.importantBroadcast = true;
if (!failed) {
d5.start(0, 0);
}
}
}
if ((_root.instructor.atWaypoint && (!doAble3)) && (_root.instructor.waypointX == 855)) {
doAble3 = true;
_root.importantBroadcast = true;
if (!failed) {
d6.start(0, 0);
}
}
if ((!obj4) && (_root.drone1.dead)) {
obj4 = true;
_root.importantBroadcast = true;
if (!failed) {
d7.stop();
d8.start(0, 0);
}
}
if ((!obj5) && (_root.drone2.dead)) {
obj5 = true;
_root.importantBroadcast = true;
if (!failed) {
d10.start(0, 0);
}
}
if (_root.drone3.dead) {
obj6 = true;
}
if (_root.drone4.dead) {
obj7 = true;
}
if (_root.drone4.atWaypoint) {
if (_root.drone4.waypointY == 500) {
_root.drone4.waypointY = 0;
} else {
_root.drone4.waypointY = 500;
}
}
if (_root.drone5.dead) {
obj8 = true;
}
if ((((((((!distress) && (obj1)) && (obj2)) && (obj4)) && (obj5)) && (obj6)) && (obj7)) && (obj8)) {
distress = true;
_root.importantBroadcast = true;
d11.stop();
dCall.start(0, 0);
if (_root.savefile.data.missions < 2) {
_root.missions = 2;
_root.savefile.data.missions = 2;
_root.savefile.flush();
}
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("A01");
this.createEmptyMovieClip("b", 2);
d2 = new Sound(b);
d2.attachSound("A02");
this.createEmptyMovieClip("c", 3);
d3 = new Sound(c);
d3.attachSound("A03");
this.createEmptyMovieClip("d", 4);
d4 = new Sound(d);
d4.attachSound("A04");
this.createEmptyMovieClip("e", 5);
d5 = new Sound(e);
d5.attachSound("A05");
this.createEmptyMovieClip("f", 6);
d6 = new Sound(f);
d6.attachSound("A06");
this.createEmptyMovieClip("g", 7);
d7 = new Sound(g);
d7.attachSound("A07");
this.createEmptyMovieClip("h", 8);
d8 = new Sound(h);
d8.attachSound("A09");
this.createEmptyMovieClip("i", 9);
d9 = new Sound(i);
d9.attachSound("A10");
this.createEmptyMovieClip("j", 10);
d10 = new Sound(j);
d10.attachSound("A11");
this.createEmptyMovieClip("k", 11);
d11 = new Sound(k);
d11.attachSound("A12");
this.createEmptyMovieClip("L", 12);
d12 = new Sound(L);
d12.attachSound("A13");
this.createEmptyMovieClip("m", 13);
dCall = new Sound(l);
dCall.attachSound("maydayCall");
dCall.setVolume(75);
d1.start(0, 0);
_root.importantBroadcast = true;
d1.onSoundComplete = function () {
if (!failed) {
d2.start(0, 0);
}
};
d2.onSoundComplete = function () {
doAble1 = true;
_root.importantBroadcast = false;
};
d3.onSoundComplete = function () {
if (!failed) {
d4.start(0, 0);
}
};
d4.onSoundComplete = function () {
doAble2 = true;
_root.importantBroadcast = false;
};
d5.onSoundComplete = function () {
_root.importantBroadcast = false;
_root.instructor.setWaypoint(855, -419.4);
};
d6.onSoundComplete = function () {
if (!failed) {
d7.start(0, 0);
}
spawnEnemy("targetDrone", "drone1", 1250, -800, 0);
_root.drone1.waypointX = 750;
_root.drone1.waypointY = 700;
};
d7.onSoundComplete = function () {
_root.importantBroadcast = false;
};
d8.onSoundComplete = function () {
if (!failed) {
d9.start(0, 0);
}
spawnEnemy("targetDrone", "drone2", 1100, -800, 0);
_root.drone2.waypointX = 400;
_root.drone2.waypointY = 500;
};
d9.onSoundComplete = function () {
_root.importantBroadcast = false;
};
d10.onSoundComplete = function () {
if (!failed) {
d11.start(0, 0);
}
spawnEnemy("targetDrone", "drone3", -1250, 1250, 0);
_root.drone3.waypointX = 400;
_root.drone3.waypointY = 500;
spawnEnemy("targetDrone", "drone4", 1250, -800, 0);
_root.drone4.waypointX = 800;
_root.drone4.waypointY = 500;
spawnEnemy("targetDrone", "drone5", 1100, -800, 0);
_root.drone5.waypointX = -300;
_root.drone5.waypointY = -300;
};
d11.onSoundComplete = function () {
_root.importantBroadcast = false;
};
dCall.onSoundComplete = function () {
if (!failed) {
d12.start(0, 0);
}
};
d12.onSoundComplete = function () {
_root.importantBroadcast = false;
accomplished = true;
};
Symbol 425 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 427 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 430 Button
on (release) {
D.stop();
nextFrame();
}
Symbol 431 Button
on (release) {
D.stop();
prevFrame();
}
Symbol 432 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 435 Button
on (release) {
E.stop();
nextFrame();
}
Symbol 436 Button
on (release) {
E.stop();
prevFrame();
}
Symbol 439 Button
on (release) {
F.stop();
nextFrame();
}
Symbol 440 Button
on (release) {
F.stop();
prevFrame();
}
Symbol 443 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
E = new Sound(this);
F = new Sound(this);
A.attachSound("secondBriefingA");
B.attachSound("secondBriefingB");
C.attachSound("secondBriefingC");
D.attachSound("secondBriefingD");
E.attachSound("secondBriefingE");
F.attachSound("secondBriefingF");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 443 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 443 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 443 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 443 MovieClip Frame 5
stop();
E.start(0, 0);
E.onSoundComplete = function () {
nextFrame();
};
Symbol 443 MovieClip Frame 6
stop();
F.start(0, 0);
F.onSoundComplete = function () {
nextFrame();
};
Symbol 443 MovieClip Frame 7
stop();
Symbol 445 MovieClip Frame 1
var stars = 1000;
var i = 1;
while (i < stars) {
var star = this.attachMovie("star", "star" + i, i + 20);
star._x = random(this._width);
star._y = random(this._height);
var size = (random(2) + (0.6 * random(4)));
star._width = size;
star._height = size;
i++;
}
Symbol 446 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = false;
var timer = 0;
var prompt = false;
var obj1 = false;
var obj2 = false;
var obj3 = false;
var accomplished = false;
var failed = false;
spawnCAP("japTransport", "transport1", -1000, -1078, 135);
_root.transport1.waypointX = 1923;
_root.transport1.waypointY = 1874;
spawnCAP("japTransport", "transport2", -800, -1178, 135);
_root.transport2.waypointX = 2123;
_root.transport2.waypointY = 1874;
spawnCAP("japTransport", "transport3", -1200, -1278, 135);
_root.transport3.waypointX = 1823;
_root.transport3.waypointY = 1974;
spawnEnemy("japScoutFighter", "jap1", 0, 0, 135);
_root.jap1.forceAggression = true;
spawnEnemy("japScoutFighter", "jap2", -50, 50, 135);
_root.jap2.forceAggression = true;
spawnEnemy("japScoutFighter", "jap3", -50, -50, 135);
_root.jap3.forceAggression = true;
spawnEnemy("japScoutFighter", "jap4", -1200, -1200, 135);
spawnEnemy("japScoutFighter", "jap5", -1000, -1000, 135);
spawnAlly("alliedFighterBravoLeader", "bravo1", 1157, 1400, -45);
_root.bravo1.forceAggression = true;
spawnAlly("alliedFighterBravo", "bravo3", 1257, 1500, -45);
_root.bravo3.profile = "profileThree";
_root.bravo3.forceAggression = true;
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
_root.jap4.setWaypoint(_root.transport1._x, _root.transport1._y);
_root.jap5.setWaypoint(_root.transport2._x, _root.transport2._x);
if (!obj1) {
if (_root.transport1._x > 1750) {
failed = true;
}
}
if (!obj2) {
if (_root.transport2._x > 1750) {
failed = true;
}
}
if (!obj3) {
if (_root.transport3._x > 1750) {
failed = true;
}
}
if (_root.transport1.dead) {
obj1 = true;
}
if (_root.transport2.dead) {
obj2 = true;
}
if (_root.transport3.dead) {
obj3 = true;
}
if ((obj1 && (obj2)) && (obj3)) {
accomplished = true;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 3) {
_root.missions = 3;
_root.savefile.data.missions = 3;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("Timetoavengefallen");
d1.setVolume(150);
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 447 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 449 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 453 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 455 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
A.attachSound("thirdBriefingA");
B.attachSound("thirdBriefingB");
C.attachSound("thirdBriefingC");
D.attachSound("thirdBriefingD");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 455 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 455 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 455 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 455 MovieClip Frame 5
stop();
Symbol 457 MovieClip Frame 1
var storedFilters = new Array();
var blurred = (new flash.filters.BlurFilter(11, 11, 3));
this.storedFilters.push(blurred);
this.filters = this.storedFilters;
Symbol 458 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = false;
var timer = 0;
var prompt = false;
var obj1 = false;
var obj2 = false;
var obj3 = false;
var objCount = 0;
var foo1 = false;
var foo2 = false;
var foo3 = false;
var fooCount = 0;
var accomplished = false;
var failed = false;
spawnCAP("arianTransport", "transport1", 948, 1009, -45);
_root.transport1.waypointX = -723;
_root.transport1.waypointY = -750;
spawnCAP("arianTransport", "transport2", 748, 1109, -45);
_root.transport2.waypointX = -750;
_root.transport2.waypointY = -800;
spawnCAP("arianTransport", "transport3", 848, 1278, -45);
_root.transport3.waypointX = -700;
_root.transport3.waypointY = -800;
spawnAlly("alliedFighterBravoLeader", "bravo1", -325, 990, 90);
spawnAlly("alliedFighterBravo", "bravo3", -450, 960, 90);
_root.bravo3.profile = "profileOne";
this.onEnterFrame = function () {
if (_root.bravo3.hitTest(_root.bravo1)) {
_root.bravo3.turnCW();
}
if (this.runTimer) {
this.timer++;
if (timer == 100) {
_root.importantBroadcast = true;
d2.start(0, 0);
spawnEnemy("japScoutFighter", "jap" + _root.enemyNumber, 1015, -700, 225);
spawnEnemy("japScoutFighter", "jap" + _root.enemyNumber, 1015, -577, 225);
spawnEnemy("japScoutFighter", "nip" + _root.enemyNumber, 1115, -577, 225);
}
if (!accomplished) {
var _local3 = 0;
while (_local3 < _root.liveEnemy.length) {
_root.liveEnemy[_local3].forceAggression = true;
_local3++;
}
if (timer > 100) {
if ((timer % 750) == 0) {
spawnEnemy("japScoutFighter", "jap" + _root.enemyNumber, 1015, -700, 225);
spawnEnemy("japScoutFighter", "jap" + _root.enemyNumber, 1015, -577, 225);
spawnEnemy("japScoutFighter", "nip" + _root.enemyNumber, 1115, -577, 225);
}
if ((timer % 500) == 0) {
spawnEnemy("japMediumFighter", "jap" + _root.enemyNumber, -1015, -700, 135);
spawnEnemy("japMediumFighter", "nip" + _root.enemyNumber, -1015, -577, 135);
}
}
}
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if (!foo1) {
_root.bravo1.setWaypoint(_root.transport1._x - 30, _root.transport1._y);
_root.bravo3.setWaypoint(_root.transport1._x, _root.transport1._y + 30);
var _local4 = 600;
while (_local4 <= 650) {
_root["jap" + _local4].targetLocked = _root.transport1;
_local4++;
}
} else if (!foo2) {
_root.bravo1.setWaypoint(_root.transport2._x - 30, _root.transport2._y);
_root.bravo3.setWaypoint(_root.transport2._x, _root.transport2._y + 30);
var _local4 = 600;
while (_local4 <= 650) {
_root["jap" + _local4].targetLocked = _root.transport2;
_local4++;
}
} else if (!foo3) {
_root.bravo1.setWaypoint(_root.transport3._x - 30, _root.transport3._y);
_root.bravo3.setWaypoint(_root.transport3._x, _root.transport3._y + 30);
var _local4 = 600;
while (_local4 <= 650) {
_root["jap" + _local4].targetLocked = _root.transport3;
_local4++;
}
}
if (_root.transport1._x <= -650) {
if (!obj1) {
objCount++;
}
obj1 = true;
}
if (_root.transport2._x <= -650) {
if (!obj2) {
objCount++;
}
obj2 = true;
}
if (_root.transport3._x <= -650) {
if (!obj3) {
objCount++;
}
obj3 = true;
}
if (_root.transport1.dead) {
if (!foo1) {
fooCount++;
}
foo1 = true;
}
if (_root.transport2.dead) {
if (!foo2) {
fooCount++;
}
foo2 = true;
}
if (_root.transport3.dead) {
if (!foo3) {
fooCount++;
}
foo3 = true;
}
if (objCount >= 2) {
accomplished = true;
} else if (fooCount >= 2) {
failed = true;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 4) {
_root.missions = 4;
_root.savefile.data.missions = 4;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("Allsclear");
d1.setVolume(150);
this.createEmptyMovieClip("b", 2);
d2 = new Sound(b);
d2.attachSound("xtermin8r13_line03-1Enemies Inbound");
d2.setVolume(150);
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
runTimer = true;
};
d2.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 459 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 461 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 464 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 466 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
A.attachSound("fourthBriefingA");
B.attachSound("fourthBriefingB");
C.attachSound("fourthBriefingC");
D.attachSound("fourthBriefingD");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 466 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 466 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 466 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 466 MovieClip Frame 5
stop();
Symbol 468 MovieClip Frame 1
var stars = 1000;
var i = 1;
while (i < stars) {
var star = this.attachMovie("star", "star" + i, i + 20);
star._x = random(this._width);
star._y = random(this._height);
var size = (random(2) + (0.6 * random(4)));
star._width = size;
star._height = size;
i++;
}
Symbol 469 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var obj1 = false;
var foo1 = false;
var foo2 = false;
var foo3 = false;
var fooTimer = 0;
var goo1 = false;
var goo2 = false;
var gooTimer = 0;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", 200, 2217, 0);
spawnAlly("alliedFighterBravo", "bravo3", 150, 2317, 0);
_root.bravo1.waypointX = 1500;
_root.bravo1.waypointY = 2100;
_root.bravo3.profile = "profileTwo";
spawnAlly("alliedFighterAlpha", "alpha1", 300, 2500, 0);
_root.alpha1.waypointX = 0;
_root.alpha1.waypointY = 500;
spawnAlly("alliedFighterAlpha", "alpha2", 200, 2550, 0);
spawnAlly("alliedFighterAlpha", "alpha3", 250, 2600, 0);
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if ((!failed) && (_root.frigate.dead)) {
accomplished = true;
}
if ((!obj1) && (_root.alpha1.dead)) {
failed = true;
}
if ((!obj1) && (_root.alpha1._y < -2890)) {
obj1 = true;
_root.alpha3.removeMovieClip();
_root.alpha2.removeMovieClip();
_root.alpha1.removeMovieClip();
_root.importantBroadcast = true;
d3.start(0, 0);
}
if (_root.bravo1.hitTest(_root.bravo3) && (_root.bravo1.targetLocked == _root.bravo3.targetLocked)) {
_root.bravo3.acquireTarget(_root.frigate);
if (_root.bravo1.targetLocked == _root.frigate) {
_root.bravo1.chooseTarget();
}
}
if (timer == 300) {
_root.importantBroadcast = true;
d1.start(0, 0);
_root.alpha1.waypointX = 250;
_root.alpha1.waypointY = -3000;
runTimer = false;
timer = 301;
}
if (timer == 400) {
_root.importantBroadcast = true;
d4.start(0, 0);
}
_root.alpha2.setWaypoint(_root.alpha1.waypointX + 50, _root.alpha1.waypointY + 50);
_root.alpha3.setWaypoint(_root.alpha1.waypointX - 50, _root.alpha1.waypointY + 50);
_root.bravo3.setWaypoint(_root.bravo1.waypointX - 50, _root.bravo1.waypointY + 50);
if (_root.bravo1.atWaypoint && (_root.bravo1._x >= 1500)) {
_root.bravo1.waypointX = -1500;
}
if (_root.bravo1.atWaypoint && (_root.bravo1._x <= -1500)) {
_root.bravo1.waypointX = 1500;
}
if (fooTimer == 19) {
spawnEnemy("japLightFighter", "fool1", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japLightFighter", "fool2", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japLightFighter", "fool3", -2240, -2000 + (Math.random() * 4000), 90);
foo1 = true;
foo2 = true;
foo3 = true;
var _local4 = 1;
while (_local4 <= 3) {
_root["fool" + _local4].forceAggression = true;
_local4++;
}
fooTimer = 0;
}
if (gooTimer == 19) {
spawnEnemy("japMediumFighter", "goon1", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japMediumFighter", "goon2", 2800, -2000 + (Math.random() * 4000), -90);
goo1 = true;
goo2 = true;
var _local3 = 1;
while (_local3 <= 2) {
_root["goon" + _local3].forceAggression = true;
_local3++;
}
gooTimer = 0;
}
if ((((!goo1) && (!goo2)) && (!accomplished)) && (timer > 400)) {
gooTimer++;
}
if (((((!foo1) && (!foo2)) && (!foo3)) && (!accomplished)) && (timer > 400)) {
fooTimer++;
}
if (_root.fool1.dead) {
foo1 = false;
}
if (_root.fool2.dead) {
foo2 = false;
}
if (_root.fool3.dead) {
foo3 = false;
}
if (_root.goon1.dead) {
goo1 = false;
}
if (_root.goon2.dead) {
goo2 = false;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 5) {
_root.missions = 5;
_root.savefile.data.missions = 5;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("rLBlip");
d1.setVolume(150);
this.createEmptyMovieClip("b", 2);
d2 = new Sound(b);
d2.attachSound("RogerthatB");
d2.setVolume(150);
this.createEmptyMovieClip("c", 3);
d3 = new Sound(c);
d3.attachSound("thatsEnemyFrig");
d3.setVolume(150);
this.createEmptyMovieClip("d", 4);
d4 = new Sound(d);
d4.attachSound("nMO");
d1.onSoundComplete = function () {
d2.start(0, 0);
};
d2.onSoundComplete = function () {
_root.importantBroadcast = false;
};
d3.onSoundComplete = function () {
_root.importantBroadcast = false;
spawnCAP("japFrigate", "frigate", 250, _root.bg._y - 50, 180);
_root.frigate.waypointX = 250;
_root.frigate.waypointY = 250;
runTimer = true;
};
d4.onSoundComplete = function () {
_root.importantBroadcast = false;
spawnAlly("alliedBomberAble", "able1", 200, 2217, 0);
_root.able1.targetLocked = _root.frigate;
_root.able1.forceAggression = true;
spawnAlly("alliedBomberAble", "able2", 150, 2317, 0);
_root.able2.targetLocked = _root.frigate;
_root.able2.forceAggression = true;
_root.bravo1.forceAggression = true;
_root.bravo3.forceAggression = true;
};
Symbol 470 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 472 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 475 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 478 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
E = new Sound(this);
A.attachSound("fifthBriefingA");
B.attachSound("fifthBriefingB");
C.attachSound("fifthBriefingC");
D.attachSound("fifthBriefingD");
E.attachSound("fifthBriefingE");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 478 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 478 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 478 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 478 MovieClip Frame 5
stop();
E.start(0, 0);
E.onSoundComplete = function () {
nextFrame();
};
Symbol 478 MovieClip Frame 6
stop();
Symbol 479 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var obj1 = false;
var obj2 = false;
var obj3 = false;
var foo1 = false;
var foo2 = false;
var foo3 = false;
var fooTimer = 0;
var goo1 = false;
var goo2 = false;
var goo3 = false;
var goo4 = false;
var gooTimer = 0;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", 200, 2217, 0);
spawnAlly("alliedFighterBravo", "bravo3", 150, 2317, 0);
_root.bravo3.profile = "profileFemale";
spawnCAP("japFrigate", "frigate2", 0, 0, 180);
spawnCAP("japFrigate", "frigate1", 200, 105, 180);
spawnCAP("japFrigate", "frigate3", -150, -170, 180);
spawnCAP("arianBulwark", "Bulwark", 840, 2700, 0);
_root.Bulwark.waypointX = 840;
_root.Bulwark.waypointY = -600;
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if (_root.Bulwark._y < -550) {
_root.Bulwark.setWaypoint(50, -600);
}
if (!obj1) {
_root.Bulwark.acquireTarget(_root.frigate1);
} else if (!obj2) {
_root.Bulwark.acquireTarget(_root.frigate2);
} else {
_root.Bulwark.acquireTarget(_root.frigate3);
}
_root.bravo1.setWaypoint(_root.Bulwark._x - 50, _root.Bulwark._y + 50);
_root.bravo3.setWaypoint(_root.Bulwark._x + 50, _root.Bulwark._y + 50);
if (((_root.bravo1.targetLocked == _root.frigate1) || (_root.bravo1.targetLocked == _root.frigate2)) || (_root.bravo1.targetLocked == _root.frigate3)) {
_root.bravo1.followWaypoint();
}
if (((_root.bravo3.targetLocked == _root.frigate1) || (_root.bravo3.targetLocked == _root.frigate2)) || (_root.bravo3.targetLocked == _root.frigate3)) {
_root.bravo3.followWaypoint();
}
if (_root.bravo3.targetLocked == _root.bravo1.targetLocked) {
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if (_root.Bulwark.dead && (!accomplished)) {
failed = true;
}
if ((((!failed) && (obj1)) && (obj2)) && (obj3)) {
accomplished = true;
}
if (_root.frigate1.dead) {
obj1 = true;
}
if (_root.frigate2.dead) {
obj2 = true;
}
if (_root.frigate3.dead) {
obj3 = true;
}
if (fooTimer == 400) {
spawnEnemy("japMediumFighter", "fool1", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japMediumFighter", "fool2", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japMediumFighter", "fool3", -2240, -2000 + (Math.random() * 4000), 90);
foo1 = true;
foo2 = true;
foo3 = true;
var _local4 = 1;
while (_local4 <= 3) {
_root["fool" + _local4].forceAggression = true;
_local4++;
}
fooTimer = 0;
}
if (gooTimer == 500) {
spawnEnemy("japBomber", "goon1", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japBomber", "goon2", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japBomber", "goon3", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japBomber", "goon4", 2800, -2000 + (Math.random() * 4000), -90);
goo1 = true;
goo2 = true;
goo3 = true;
goo4 = true;
var _local3 = 1;
while (_local3 <= 4) {
_root["goon" + _local3].forceAggression = true;
_root["goon" + _local3].targetLocked = _root.Bulwark;
_local3++;
}
gooTimer = 0;
}
if ((((((!goo1) && (!goo2)) && (!goo3)) && (!goo4)) && (!accomplished)) && (timer >= 600)) {
gooTimer++;
}
if (((((!foo1) && (!foo2)) && (!foo3)) && (!accomplished)) && (timer >= 300)) {
fooTimer++;
}
if (_root.fool1.dead) {
foo1 = false;
}
if (_root.fool2.dead) {
foo2 = false;
}
if (_root.fool3.dead) {
foo3 = false;
}
if (_root.goon1.dead) {
goo1 = false;
}
if (_root.goon2.dead) {
goo2 = false;
}
if (_root.goon3.dead) {
goo3 = false;
}
if (_root.goon4.dead) {
goo4 = false;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 6) {
_root.missions = 6;
_root.savefile.data.missions = 6;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("bulTargSighted");
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 480 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 482 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 485 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 489 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
E = new Sound(this);
F = new Sound(this);
A.attachSound("sixthBriefingA");
B.attachSound("sixthBriefingB");
C.attachSound("sixthBriefingC");
D.attachSound("sixthBriefingD");
E.attachSound("sixthBriefingE");
F.attachSound("sixthBriefingF");
A.setVolume(150);
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 489 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 489 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 489 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 489 MovieClip Frame 5
stop();
E.start(0, 0);
E.onSoundComplete = function () {
nextFrame();
};
Symbol 489 MovieClip Frame 6
stop();
F.start(0, 0);
F.onSoundComplete = function () {
nextFrame();
};
Symbol 489 MovieClip Frame 7
stop();
Symbol 490 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var obj1 = false;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", -1430, -1610, 180);
spawnAlly("alliedFighterBravo", "bravo3", -1570, -1750, 180);
_root.bravo3.profile = "profileOne";
_root.bravo1.forceAggression = true;
_root.bravo3.forceAggression = true;
spawnCAP("japGunship", "gunship", 2670, 2000, 270);
_root.gunship.waypointX = -2800;
_root.gunship.waypointY = 1700;
spawnEnemy("japChrysanthemumFighter", "escort1", 2650, 2000, 270);
spawnEnemy("japChrysanthemumFighter", "escort2", 2650, 2000, 270);
spawnEnemy("japChrysanthemumFighter", "escort3", 2650, 2000, 270);
spawnEnemy("japChrysanthemumFighter", "escort4", 2650, 2000, 270);
spawnEnemy("japChrysanthemumFighter", "jap1", -1209, -20, 10);
spawnEnemy("japChrysanthemumFighter", "jap2", -1150, 20, 10);
spawnEnemy("japChrysanthemumFighter", "jap3", 1158, 2300, 300);
spawnEnemy("japChrysanthemumFighter", "jap4", 1210, 2370, 270);
var i = 1;
while (i <= 4) {
_root["jap" + i].forceAggression = true;
i++;
}
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if ((!failed) && (_root.gunship.dead)) {
accomplished = true;
}
if (_root.gunship._x < -2300) {
failed = true;
}
_root.escort1.setWaypoint(_root.gunship._x + 100, _root.gunship._y + 100);
_root.escort2.setWaypoint(_root.gunship._x - 100, _root.gunship._y + 100);
_root.escort3.setWaypoint(_root.gunship._x + 100, _root.gunship._y - 100);
_root.escort4.setWaypoint(_root.gunship._x - 100, _root.gunship._y - 100);
if ((_root.bravo3.targetLocked == _root.bravo1.targetLocked) && (Math.abs(_root.bravo3._rotation - _root.bravo1._rotation) < 30)) {
_root.bravo3.setWaypoint(_root.playerShip._x - 70, _root.playerShip._y + 70);
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 7) {
_root.missions = 7;
_root.savefile.data.missions = 7;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("Jackpot");
d1.setVolume(200);
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 491 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 493 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 496 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 498 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
A.attachSound("seventhBriefingA");
B.attachSound("seventhBriefingB");
C.attachSound("seventhBriefingC");
D.attachSound("seventhBriefingD");
A.setVolume(200);
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 498 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 498 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 498 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 498 MovieClip Frame 5
stop();
Symbol 499 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var gunN = 0;
var gunD = 0;
var foo1 = true;
var foo2 = true;
var fooTimer = 0;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", -850, -520, 90);
spawnAlly("alliedFighterBravo", "bravo3", -950, -520, 90);
_root.bravo3.profile = "profileOne";
_root.bravo1.forceAggression = true;
_root.bravo3.forceAggression = true;
spawnAlly("alliedFighterCharlie", "charlie1", -950, -270, 90);
_root.charlie1.profile = "profileFemale";
spawnAlly("alliedFighterCharlie", "charlie2", -950, -320, 90);
_root.charlie2.profile = "profileTwo";
spawnEnemy("japChrysanthemumFighter", "fool1", 1760, -700 + (Math.random() * 1400), 270);
spawnEnemy("japChrysanthemumFighter", "fool2", 1760, -700 + (Math.random() * 1400), 270);
_root.fool1.forceAggression = true;
_root.fool2.forceAggression = true;
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
_root.charlie1.setWaypoint(_root.playerShip._x - 70, _root.playerShip._y + 70);
_root.charlie2.setWaypoint(_root.playerShip._x - 140, _root.playerShip._y + 140);
if ((!failed) && (gunD >= 10)) {
accomplished = true;
}
var _local3 = 0;
while (_local3 < 10) {
if (_root["gunship" + _local3]._x < -1100) {
failed = true;
}
_local3++;
}
if ((gunN < 10) && ((timer % 1200) == 0)) {
spawnCAP("japGunship", "gunship" + gunN, 1760, -700 + (Math.random() * 1400), 270);
_root["gunship" + gunN].waypointY = _root["gunship" + gunN]._y;
_root["gunship" + gunN].waypointX = -1300;
spawnEnemy("japChrysanthemumFighter", "escort" + (gunN * 2), 1760, _root["gunship" + gunN]._y + 50, 270);
_root["escort" + (gunN * 2)].waypointY = _root["escort" + (gunN * 2)]._y;
_root["escort" + (gunN * 2)].waypointX = -1300;
spawnEnemy("japChrysanthemumFighter", "escort" + ((gunN * 2) + 1), 1760, _root["gunship" + gunN]._y - 50, 270);
_root["escort" + ((gunN * 2) + 1)].waypointY = _root["escort" + ((gunN * 2) + 1)]._y;
_root["escort" + ((gunN * 2) + 1)].waypointX = -1300;
gunN++;
}
if ((!foo1) && (!foo2)) {
fooTimer++;
}
if ((fooTimer == 300) && (!accomplished)) {
spawnEnemy("japChrysanthemumFighter", "fool1", 1760, -700 + (Math.random() * 1400), 270);
spawnEnemy("japChrysanthemumFighter", "fool2", 1760, -700 + (Math.random() * 1400), 270);
_root.fool1.forceAggression = true;
_root.fool2.forceAggression = true;
foo1 = true;
foo2 = true;
fooTimer = 0;
}
if ((_root.fool1._currentframe = _root.fool1._totalframes)) {
foo1 = false;
}
if ((_root.fool2._currentframe = _root.fool2._totalframes)) {
foo2 = false;
}
if ((_root.bravo3.targetLocked == _root.bravo1.targetLocked) && (Math.abs(_root.bravo3._rotation - _root.bravo1._rotation) < 30)) {
_root.bravo3.setWaypoint(_root.playerShip._x - 70, _root.playerShip._y + 70);
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 8) {
_root.missions = 8;
_root.savefile.data.missions = 8;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
Symbol 500 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 502 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 505 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 507 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
A.attachSound("eighthBriefingA");
B.attachSound("eighthBriefingB");
C.attachSound("eighthBriefingC");
D.attachSound("eighthBriefingD");
A.setVolume(200);
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 507 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 507 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 507 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 507 MovieClip Frame 5
stop();
Symbol 508 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var randomTimer = 0;
foo1 = true;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", -516, 1300, 0);
spawnAlly("alliedFighterBravo", "bravo3", -616, 1400, 0);
_root.bravo3.profile = "profileThree";
spawnAlly("alliedFighterCharlie", "charlie1", 227, -1270, 190);
_root.charlie1.profile = "profileFemale";
spawnCAP("arianBulwark", "Bulwark", 227, -1203, 180);
_root.Bulwark.waypointX = 260;
_root.Bulwark.waypointY = 1755;
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
if (timer == 1) {
_root.Bulwark.speed = _root.Bulwark.speed / 5;
_root.Bulwark.health = 500;
}
_root.bravo1.setWaypoint(_root.Bulwark._x + 70, _root.Bulwark._y + 70);
_root.bravo3.setWaypoint(_root.Bulwark._x + 70, _root.Bulwark._y - 70);
_root.charlie1.setWaypoint(_root.Bulwark._x - 70, _root.Bulwark._y + 70);
if ((!failed) && (_root.Bulwark._y >= 1670)) {
accomplished = true;
}
if ((!accomplished) && (_root.Bulwark.dead)) {
failed = true;
}
if ((_root.bravo3.targetLocked == _root.bravo1.targetLocked) && (Math.abs(_root.bravo3._rotation - _root.bravo1._rotation) < 30)) {
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if ((!accomplished) && ((timer % 1800) == 0)) {
spawnEnemy("japBomber", "jap" + _root.enemyNumber, 1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japBomber", "jap" + _root.enemyNumber, 1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japBomber", "jap" + _root.enemyNumber, 1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japLightFighter", "jap" + _root.enemyNumber, 1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japLightFighter", "jap" + _root.enemyNumber, 1785, -1000 + (Math.random() * 2000), 270);
var _local3 = 600;
while (_local3 <= 650) {
_root["jap" + _local3].forceAggression = true;
_local3++;
}
}
if ((((!accomplished) && ((timer % 900) == randomTimer)) && (timer > 1800)) && (foo1)) {
spawnEnemy("japBomber", "jap" + _root.enemyNumber, -1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japBomber", "jap" + _root.enemyNumber, -1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japMediumFighter", "jap" + _root.enemyNumber, -1785, -1000 + (Math.random() * 2000), 270);
spawnEnemy("japMediumFighter", "jap" + _root.enemyNumber, -1785, -1000 + (Math.random() * 2000), 270);
var _local3 = 600;
while (_local3 <= 650) {
_root["jap" + _local3].forceAggression = true;
_local3++;
}
foo1 = false;
randomTimer = 600 + Math.floor(Math.random() * 300);
}
if ((timer % 900) == 0) {
foo1 = true;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 9) {
_root.missions = 9;
_root.savefile.data.missions = 9;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("reunion");
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 509 Button
on (release) {
A.stop();
A.start(0, 0);
gotoAndStop (1);
}
Symbol 511 Button
on (release) {
A.stop();
B.stop();
C.stop();
gotoAndStop (1);
}
Symbol 514 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
gotoAndStop (1);
}
Symbol 518 Button
on (release) {
G.stop();
nextFrame();
}
Symbol 519 Button
on (release) {
G.stop();
prevFrame();
}
Symbol 520 Button
on (release) {
A.stop();
B.stop();
C.stop();
D.stop();
E.stop();
F.stop();
G.stop();
gotoAndStop (1);
}
Symbol 522 MovieClip Frame 1
stop();
var musicPlaying;
A = new Sound(this);
B = new Sound(this);
C = new Sound(this);
D = new Sound(this);
E = new Sound(this);
F = new Sound(this);
G = new Sound(this);
A.attachSound("ninthBriefingA");
B.attachSound("ninthBriefingB");
C.attachSound("ninthBriefingC");
D.attachSound("ninthBriefingD");
E.attachSound("ninthBriefingE");
F.attachSound("ninthBriefingF");
G.attachSound("ninthBriefingG");
A.start(0, 0);
A.onSoundComplete = function () {
nextFrame();
};
if (!musicPlaying) {
musicPlaying = true;
_root.briefing.stop();
_root.briefing.start(0, 999);
}
Symbol 522 MovieClip Frame 2
stop();
B.start(0, 0);
B.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 3
stop();
C.start(0, 0);
C.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 4
stop();
D.start(0, 0);
D.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 5
stop();
E.start(0, 0);
E.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 6
stop();
F.start(0, 0);
F.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 7
stop();
G.start(0, 0);
G.onSoundComplete = function () {
nextFrame();
};
Symbol 522 MovieClip Frame 8
stop();
Symbol 523 MovieClip Frame 1
function spawnEnemy(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.enemyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.enemyNumber++;
}
function spawnCAP(unitType, onamae, xCoord, yCoord, rot) {
_root.attachMovie(unitType, onamae, _root.bigNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.bigNumber++;
}
function spawnAlly(unitType, designation, xCoord, yCoord, rot) {
_root.attachMovie(unitType, designation, _root.allyNumber, {_x:xCoord, _y:yCoord, _rotation:rot});
_root.allyNumber++;
}
var runTimer = true;
var timer = 0;
var prompt = false;
var transportArray = new Array();
var obj1 = false;
var obj2 = false;
var obj3 = false;
var foo1 = false;
var foo2 = false;
var foo3 = false;
var fooTimer = 0;
var goo1 = true;
var goo2 = true;
var goo3 = true;
var gooTimer = 0;
var accomplished = false;
var failed = false;
spawnAlly("alliedFighterBravoLeader", "bravo1", 1350, 2100, 0);
spawnAlly("alliedFighterBravo", "bravo3", 1550, 2300, 0);
_root.bravo3.profile = "profileFemale";
spawnAlly("alliedBomberAble", "able1", 1000, 2000, 0);
spawnAlly("alliedBomberAble", "able2", 1200, 2000, 0);
spawnAlly("alliedBomberBaker", "baker1", 1700, 2400, 0);
spawnAlly("alliedBomberBaker", "baker2", 1700, 2550, 0);
_root.able1.forceAggression = true;
_root.able2.forceAggression = true;
_root.baker1.forceAggression = true;
_root.baker2.forceAggression = true;
spawnEnemy("japLightFighter", "goon1", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japLightFighter", "goon2", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japLightFighter", "goon3", 2800, -2000 + (Math.random() * 4000), -90);
_root.goon1.forceAggression = true;
_root.goon2.forceAggression = true;
_root.goon3.forceAggression = true;
spawnCAP("japFrigate", "frigate2", -979, -370, 180);
spawnCAP("japFrigate", "frigate1", 1940, 100, 180);
spawnCAP("japFrigate", "frigate3", -1450, -370, 180);
this.onEnterFrame = function () {
if (this.runTimer) {
this.timer++;
}
if (!obj1) {
_root.able1.acquireTarget(_root.frigate1);
_root.baker1.acquireTarget(_root.frigate1);
_root.able2.acquireTarget(_root.frigate1);
_root.baker2.acquireTarget(_root.frigate1);
} else if (!obj2) {
_root.able1.acquireTarget(_root.frigate2);
_root.baker1.acquireTarget(_root.frigate2);
_root.able2.acquireTarget(_root.frigate2);
_root.baker2.acquireTarget(_root.frigate2);
} else {
_root.able1.acquireTarget(_root.frigate3);
_root.baker1.acquireTarget(_root.frigate3);
_root.able2.acquireTarget(_root.frigate3);
_root.baker2.acquireTarget(_root.frigate3);
}
_root.bravo1.setWaypoint(_root.playerShip._x - 50, _root.playerShip._y + 50);
_root.bravo3.setWaypoint(_root.playerShip._x + 50, _root.playerShip._y + 50);
if (((_root.bravo1.targetLocked == _root.frigate1) || (_root.bravo1.targetLocked == _root.frigate2)) || (_root.bravo1.targetLocked == _root.frigate3)) {
_root.bravo1.followWaypoint();
_root.bravo1.chooseTarget();
}
if (((_root.bravo3.targetLocked == _root.frigate1) || (_root.bravo3.targetLocked == _root.frigate2)) || (_root.bravo3.targetLocked == _root.frigate3)) {
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if (_root.bravo3.targetLocked == _root.bravo1.targetLocked) {
_root.bravo3.followWaypoint();
_root.bravo3.chooseTarget();
}
if ((!accomplished) && (_root.playerShip.dead)) {
failed = true;
}
var _local3 = 0;
while (_local3 < transportArray.length) {
transportArray[_local3].setWaypoint(1310, 2600);
if (transportArray[_local3]._y >= 2500) {
failed = true;
}
_local3++;
}
var _local4 = transportArray.length - 1;
while (_local4 >= 0) {
if (transportArray[_local4].dead) {
transportArray.splice(_local4, 1);
}
_local4--;
}
if ((!((obj1 && (obj2)) && (obj3))) && ((timer % 1000) == 0)) {
spawnEnemy("japTransport", "transport" + _root.enemyNumber, -900 + (Math.random() * 1800), -2400, 180);
transportArray.push(_root["transport" + (_root.enemyNumber - 1)]);
}
if (((((!failed) && (obj1)) && (obj2)) && (obj3)) && (transportArray.length == 0)) {
accomplished = true;
}
if (_root.frigate1.dead) {
obj1 = true;
}
if (_root.frigate2.dead) {
obj2 = true;
}
if (_root.frigate3.dead) {
obj3 = true;
}
if (fooTimer == 400) {
spawnEnemy("japMediumFighter", "fool1", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japMediumFighter", "fool2", -2240, -2000 + (Math.random() * 4000), 90);
spawnEnemy("japMediumFighter", "fool3", -2240, -2000 + (Math.random() * 4000), 90);
foo1 = true;
foo2 = true;
foo3 = true;
var _local6 = 1;
while (_local6 <= 3) {
_root["fool" + _local6].forceAggression = true;
_local6++;
}
fooTimer = 0;
}
if (gooTimer == 500) {
spawnEnemy("japLightFighter", "goon1", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japLightFighter", "goon2", 2800, -2000 + (Math.random() * 4000), -90);
spawnEnemy("japLightFighter", "goon3", 2800, -2000 + (Math.random() * 4000), -90);
goo1 = true;
goo2 = true;
goo3 = true;
var _local5 = 1;
while (_local5 <= 3) {
_root["goon" + _local5].forceAggression = true;
_local5++;
}
gooTimer = 0;
}
if ((((((!goo1) && (!goo2)) && (!goo3)) && (!goo4)) && (!accomplished)) && (timer >= 600)) {
gooTimer++;
}
if (((((!foo1) && (!foo2)) && (!foo3)) && (!accomplished)) && (timer >= 300)) {
fooTimer++;
}
if (_root.fool1.dead) {
foo1 = false;
}
if (_root.fool2.dead) {
foo2 = false;
}
if (_root.fool3.dead) {
foo3 = false;
}
if (_root.goon1.dead) {
goo1 = false;
}
if (_root.goon2.dead) {
goo2 = false;
}
if (_root.goon3.dead) {
goo3 = false;
}
if (failed && (!prompt)) {
_root.attachMovie("fMC", "fMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
} else if (accomplished && (!prompt)) {
_root.attachMovie("aMC", "aMC", 30000, {_x:_root.hud._x, _y:_root.hud._y});
prompt = true;
if (_root.savefile.data.missions < 10) {
_root.missions = 10;
_root.savefile.data.missions = 10;
_root.savefile.flush();
}
}
if (_root.importantBroadcast) {
currentSong.setVolume(25);
} else {
currentSong.setVolume(55);
}
};
var songArray = new Array();
songArray.push("music1");
songArray.push("music2");
songArray.push("music3");
songArray.push("music4");
var randomSong = Math.floor(Math.random() * 4);
var justPlayed = randomSong;
this.createEmptyMovieClip("musics", 100);
currentSong = new Sound(musics);
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
currentSong.onSoundComplete = function () {
while (randomSong == justPlayed) {
randomSong = Math.floor(Math.random() * 4);
}
justPlayed = randomSong;
currentSong.attachSound(songArray[randomSong]);
currentSong.start(0, 0);
};
this.createEmptyMovieClip("a", 1);
d1 = new Sound(a);
d1.attachSound("ddT");
_root.importantBroadcast = true;
d1.start(0, 0);
d1.onSoundComplete = function () {
_root.importantBroadcast = false;
};
Symbol 525 MovieClip Frame 1
this.onEnterFrame = function () {
if (this._y > 180) {
this._y = this._y - 1;
}
};
Symbol 526 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("mainMenu");
}
Symbol 527 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("credits");
}
Symbol 552 Button
on (release) {
getURL ("http://www.youtube.com/user/pieceofpiesoftware", "_blank");
}
Symbol 554 Button
on (release) {
getURL ("http://shurikenx.newgrounds.com/", "_blank");
}
Symbol 556 Button
on (release) {
getURL ("http://mikemetroid5565.newgrounds.com/", "_blank");
}
Symbol 558 Button
on (release) {
getURL ("http://smukeeg.newgrounds.com/", "_blank");
}
Symbol 560 Button
on (release) {
getURL ("http://xtermin8r13.newgrounds.com/", "_blank");
}
Symbol 562 Button
on (release) {
getURL ("http://thedeadman69.newgrounds.com/", "_blank");
}
Symbol 564 Button
on (release) {
getURL ("http://nevercroft.newgrounds.com/", "_blank");
}
Symbol 566 Button
on (release) {
getURL ("ladyarsenic.newgrounds.com/", "_blank");
}
Symbol 571 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 2
stop();
Symbol 571 MovieClip Frame 3
stop();
Symbol 571 MovieClip Frame 4
stop();