Frame 1
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 1;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
Frame 2
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_quality = "high";
Frame 3
if (_root.percentLoaded == 100) {
gotoAndStop (4);
} else {
gotoAndPlay (2);
}
Frame 5
stop();
Frame 6
volSwitch = false;
function newData() {
bulletStrength = 1;
railCounter = 0;
bulletSelectionMax = 3;
reloadSpeed = 1;
smartBomb = 0;
health = 5;
money = 0;
mission = 0;
smokeSettings = 0.01;
health = 5;
}
function onEnterFrame() {
t = getTimer();
frameRate = Math.round(1000 / (t - o));
o = t;
}
function newSound(file, vol, fixed, loop) {
soundMCCount++;
SOUND.createEmptyMovieClip("SMC" + soundMCCount, soundMCCount);
SOUND["SMC" + soundMCCount].fixed = fixed;
var _local1 = new Sound(SOUND["SMC" + soundMCCount]);
_local1.attachSound(file);
if (vol == undefined) {
vol = 100;
}
if (SFX == false) {
vol = 0;
}
_local1.setVolume(vol / 10);
_local1.start(0, loop);
if (SOUND["SMC" + (soundMCCount - 30)].fixed != true) {
SOUND["SMC" + (soundMCCount - 30)].removeMovieClip();
}
}
function transistion(destination, soundStop) {
var _local1 = attachMovie("SHUTTER", "SHUTTER", 10);
_local1.destination = destination;
if (soundStop != undefined) {
_local1.soundStop = true;
}
}
function loadData() {
if (savefile.data.dataActive == true) {
_root.mission = savefile.data.mission;
_root.money = savefile.data.money;
_root.reloadSpeed = savefile.data.reloadSpeed;
_root.bulletStrength = savefile.data.bulletStrength;
_root.smartBomb = savefile.data.smartBomb;
_root.health = savefile.data.health;
_root.railCounter = savefile.data.railCounter;
_root.bulletSelectionMax = savefile.data.bulletSelectionMax;
_root.smokeSettings = savefile.data.smokeSettings;
_root.difficulty = savefile.data.difficulty;
saveAllData();
}
}
function onMouseDown() {
if (Key.isDown(32)) {
trace(money);
}
}
function saveAllData() {
savefile.data.dataActive = true;
savefile.data.mission = _root.mission;
savefile.data.money = _root.money;
savefile.data.reloadSpeed = _root.reloadSpeed;
savefile.data.smartBomb = _root.smartBomb;
savefile.data.health = _root.health;
savefile.data.railCounter = _root.railCounter;
savefile.data.bulletSelectionMax = _root.bulletSelectionMax;
savefile.data.smokeSettings = _root.smokeSettings;
savefile.data.difficulty = _root.difficulty;
savefile.data.bulletStrength = _root.bulletStrength;
savefile.flush();
}
function loadMedals() {
if (savefile.data.medalActive == true) {
i = 1;
while (i < 11) {
_root["medalVar" + i] = savefile.data["medalVar" + i];
i++;
}
saveMedals();
}
}
function saveMedals() {
i = 1;
while (i < 11) {
savefile.data["medalVar" + i] = _root["medalVar" + i];
i++;
}
savefile.data.medalActive = true;
savefile.flush();
}
function newMedal(medalID, del) {
if (this["medalVar" + medalID] == false) {
this["medalVar" + medalID] = true;
var _local2 = MEDALS.attachMovie("medalMessage", "medalPrompt" + medalCount, medalCount++);
_local2.sprite.gotoAndStop(medalID);
_local2._y = 240;
_local2._alpha = 0;
_local2.del = del;
saveMedals();
newSound("LEVEL_COMPLETE.WAV", 300, false, 0);
}
}
function soundMute() {
muteSound = new Sound();
muteSound.attachSound("MUTER");
muteSound.setVolume(100);
muteSound.start();
}
function titleMedal() {
if (medalTitle != 0) {
newMedal(medalTitle);
}
}
stop();
_width = 500;
_height = 400;
_quality = "high";
savefile = SharedObject.getLocal("INDESTRUCTOCOPTERMYSPACE");
newData();
loadData();
i = 1;
while (i < 11) {
this["medalVar" + i] = false;
i++;
}
loadMedals();
createEmptyMovieClip("SOUND", 1);
stop();
var soundMCCount = 0;
var soundLimit = 0;
savefile.data.initState = true;
savefile.flush();
createEmptyMovieClip("MEDALS", 20);
var medalCount = 0;
var muteSound;
soundMute();
play();
Frame 7
newSound("TITLEsound", 200, true, 999);
var timeStore = new Date();
trace(timeStore.getTime() / 1000000);
trace(getTimer() / 1000);
play();
Frame 8
stop();
titleMedal();
Frame 10
if (savefile.data.dataActive == true) {
diffArray = new Array(null, null, "HARD", "MEDIUM", "EASY");
contText = (("MISSION " + (savefile.data.mission + 1)) + " ") + diffArray[savefile.data.difficulty];
} else {
contText = "NO DATA";
contButton._alpha = 40;
}
Instance of Symbol 330 MovieClip "tut" in Frame 19
onClipEvent (load) {
if (_root.mission != 99) {
this.swapDepths(666);
this.removeMovieClip();
}
}
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_parent.transistion("TITLELOAD");
}
}
Frame 20
if (_root.mission > 7) {
_root.mission++;
_root.gotoAndStop("STORY");
} else {
newSound("TITLEsound", 200, true, 999);
}
Frame 21
if (_root.difficulty == 5) {
gotoAndStop ("CHALLENGESUBMIT");
}
newSound("GAMEOVER.mp3", 200, false, 0);
Frame 22
newSound("GAMEOVER.mp3", 200, false, 0);
Frame 23
_root.money = Math.round(_root.money);
newSound("GAMEOVER.mp3", 200, false, 0);
Symbol 45 MovieClip Frame 1
stop();
Symbol 59 MovieClip [Boom] Frame 6
stop();
Symbol 71 MovieClip [SHUTTER] Frame 1
function onEnterFrame() {
if (tranSwitch == false) {
if (timer < 20) {
timer++;
shutter_top._y = shutter_top._y - ((shutter_top._y + 100) / 3);
shutter_left._x = shutter_left._x - ((shutter_left._x - 0) / 3);
shutter_right._x = shutter_right._x - ((shutter_right._x - 400) / 3);
} else {
timer = 0;
if (soundStop == undefined) {
stopAllSounds();
}
_parent.gotoAndStop(destination);
tranSwitch = true;
}
} else if (timer < 30) {
timer++;
shutter_top._y = shutter_top._y - ((shutter_top._y + 310) / 5);
shutter_left._x = shutter_left._x - ((shutter_left._x + 310) / 5);
shutter_right._x = shutter_right._x - ((shutter_right._x - 800) / 5);
} else {
this.removeMovieClip();
}
}
shutter_top._y = -300;
shutter_left._x = -300;
shutter_right._x = 800;
timer = 0;
tranSwitch = false;
Symbol 73 MovieClip [Message] Frame 1
function onEnterFrame() {
if (_alpha > 0) {
_y = (_y - 0.5);
_alpha = (_alpha - 8);
} else {
this.removeMovieClip();
}
}
Symbol 106 MovieClip [medalMessage] Frame 1
function onEnterFrame() {
if (timer > 0) {
timer--;
} else {
timerSwitch = true;
}
if (timerSwitch == false) {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
} else {
_alpha = (_alpha - 2);
}
if (_alpha < 0) {
this.removeMovieClip();
}
}
timerSwitch = false;
timer = 100;
Symbol 108 MovieClip [purchaseMessage] Frame 1
function onEnterFrame() {
if (timer > 0) {
timer--;
} else {
timerSwitch = true;
}
if (timerSwitch == false) {
_x = (_x + ((-_x) / 5));
} else {
_alpha = (_alpha - 10);
}
if (_alpha < 0) {
trace("rem");
this.removeMovieClip();
}
}
timerSwitch = false;
timer = 100;
Symbol 139 Button
on (release) {
_root.play();
}
Symbol 151 MovieClip Frame 126
_root.nextFrame();
Symbol 154 Button
on (release) {
transistion("GAMETYPE", false);
}
Symbol 156 Button
on (release) {
newData();
_root.mission = 99;
transistion("GAME");
}
Symbol 158 Button
on (release) {
transistion("MEDALS", false);
}
Symbol 160 Button
on (release) {
if (Key.isDown(20) && (Key.isDown(16))) {
transistion("ENDFILM");
} else {
transistion("CREDITS", false);
}
}
Symbol 165 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 172 Button
on (release) {
if (volSwitch == true) {
muteSound.setVolume(100);
volSwitch = false;
} else {
muteSound.setVolume(0);
volSwitch = true;
}
}
Symbol 175 Button
on (release) {
transistion("DIFFICULTY", false);
}
Symbol 177 Button
on (release) {
transistion("TITLE", false);
}
Symbol 181 Button
on (release) {
newData();
_root.railCounter = 20;
_root.bulletStrength = 2.5;
_root.reloadSpeed = 5;
_root.bulletSelectionMax = 5;
_root.mission = 98;
_root.difficulty = 5;
_root.smartBomb = 3;
transistion("GAME");
}
Symbol 186 MovieClip Frame 1
function onRelease() {
_alpha = 100;
}
if ((_root.medalVar2 == true) || (_root.medalVar3 == true)) {
_x = -1000;
}
Symbol 188 Button
on (release) {
if (contButton._alpha == 100) {
loadData();
transistion("STORY");
}
}
Symbol 191 Button
on (release) {
_root.money = 10000;
_root.difficulty = 4;
transistion("NEWCONT", false);
}
Symbol 193 Button
on (release) {
_root.money = 5000;
_root.difficulty = 3;
transistion("NEWCONT", false);
}
Symbol 195 Button
on (release) {
_root.difficulty = 2;
transistion("NEWCONT", false);
}
Symbol 201 Button
on (release) {
newData();
_root.money = 1000 * _root.difficulty;
transistion("STORY");
}
Symbol 208 Button
on (release) {
_parent.transistion("TITLE", false);
}
Symbol 219 MovieClip Frame 1
i = 1;
while (i < 11) {
if (_root["medalVar" + i] == false) {
this["medal" + i]._alpha = 20;
submitButton._alpha = 40;
}
i++;
}
Symbol 221 Button
on (release) {
newMedal(5);
transistion("TITLE", false);
}
Symbol 228 Button
on (release) {
if (_root.mission != 9) {
_parent.transistion("GAME");
} else {
_parent.transistion("ENDFILM");
}
}
Symbol 231 Button
on (release) {
_parent.transistion("TITLELOAD");
}
Symbol 233 MovieClip Frame 1
function onEnterFrame() {
if (introStartTimer > 0) {
introStartTimer--;
} else {
var _local2 = 0;
while (_local2 < 3) {
if (introCounter < introStore.length) {
_parent.newSound("CLICKSOUND", 100, false, 0);
introText = introText + introStore[introCounter];
introCounter++;
}
_local2++;
}
}
}
_parent.saveAllData();
_parent.newSound("RETROTHEME", 500, true, 999);
var introTextStore0 = "WELCOME TO YOUR FIRST MISSION, ROOKIE. WE'LL START YOU OFF EASY... IT'S YOUR JOB TO PICK OFF THE STRAY ENEMIES THAT THE INDESTRUCTOTANK MISSED, SHOULDN'T BE A PROBLEM IF YOU'VE RECEIVED BASIC TRAINING AND/OR VIEWED THE TUTORIAL. WEATHER CONDITIONS ARE OPTIMAL, SO YOU SHOULDNT EXPERIENCE TOO MUCH TURBULANCE. GOOD LUCK SOLDIER.";
var introTextStore1 = "GREAT WORK, SOLDIER. NOW ONTO SOMETHING A BIT MORE CHALLENGING. SOME ENEMIES HAVE MORE ARMOR THAN OTHERS, AND REQUIRE MORE HITS TO DESTROY. REMEMBER, SHOOTING WITHOUT MISSING EARNS YOU MORE MONEY FOR UPGRADES. ITS SLIGHTLY WINDY OUT THERE SO IT COULD BE A BIT OF A BUMPY RIDE, BUT NOTHING YOU CAN'T HANDLE. GOOD LUCK!";
var introTextStore2 = "NICE ONE SOLDIER. YOU'LL BE RISING THROUGH THE RANKS IN NO TIME AT THIS RATE! WE HAVE SOME NEWS FOR YOU, THE PRESIDENT HAS BEEN KIDNAPPED. THE INDESTRUCTOTANK HAS BEEN DISPATCHED TO RESCUE HIM, BUT THAT MEANS THAT MORE BAD GUYS WILL BE HEADING YOUR WAY, BE CAREFUL!";
var introTextStore3 = "REST EASY SOLDIER, THE PRESIDENT HAS BEEN RESCUED BY THE INDESTRUCTOTANK. HE WAS BEING HELD BY AN EX AGENT OF OURS KNOWN AS JAMES HARDMAN (AKA WHIZKID). HE WAS BEATEN BY THE INDESTRUCTOTANK BUT HAS FLED AND NOW ITS UP TO US TO LOCATE HIM QUICK. HIS PERSONAL FLEET IS FLYING TO HIS RESCUE, AND WE NEED YOU TO TAKE THEM OUT FIRST. A STORM IS BREWING, SON, SO ITS GONNA BE A ROCKY RIDE, HOLD TIGHT!";
var introTextStore4 = "THANK YOU SOLDIER, THANKS TO YOUR EFFORTS WE HAVE CAPTURED WHIZKID AND DETAINED HIM.......BREAKING NEWS, SOLDIER, ONE OF OUR CEO'S KNOWN AS 'THE CHIEF' HAS BEEN CAPTURED BY GENERAL BETTON, LEADER OF THE ENEMY ARMY. WE NEED YOU TO BACKUP INDESTRUCTOTANK PILOT DIRK DANGER AS HE GOES AFTER HER. GOOD LUCK! THERE ARE SOME SLIGHT HEAD WINDS OVER THE MOUNTAINS, BUT NOT AS BAD AS YOU'VE EXPERIENCED.";
var introTextStore5 = "WARNING SOLDIER, WE HAVE BEEN UPGRADED TO A CODE RED SITUATION. GENERAL BETTON HAS ESCAPED DIRK DANGER'S ASSAULT AND FLED BACK TO HIS COUNTRY WITH THE CHIEF. WORST YET, BOTH DIRK AND THE INDESTRUCTOTANK ARE MISSING IN ACTION. TAKE OUT THE ENEMY AIR FORCE WHILE WE INVESTIGATE!";
var introTextStore6 = "GOOD WORK AGAIN, SOLDIER, ALTHOUGH IT MAY BE TOO LATE. BETTON HAS FORTIFIED HIS POSISTION AND RELEASED HIS NEW PROTOTYPE FIGHTER JETS. YOU HAVE TO TAKE THEM OUT BEFORE THEY CAN REACH OUR INFANTRY, THEY WON'T STAND A CHANCE. GOOD LUCK.";
var introTextStore7 = "I HAVE AN UPDATE ON DIRK DANGER'S WHEREABOUTS, SOLDIER. IT APPEARS HE MAY HAVE GONE AWOL AFTER LEARNING THE IDENTITY OF HIS FATHER. SUCH BEHAVIOUR IS UNACCEPTABLE FOR A MAN OF HIS STANDING. THIS LEAVES YOU ON YOUR OWN NOW, IT'S UP TO YOU TO TAKE ON THE MIGHT OF THE ENEMY AIR DEFENCES BY YOURSELF. I'M SORRY. GOD SPEED.";
var introTextStore8 = "YOU WILL BE AWARDED THE HIGHEST HONORS FOR YOUR WORK ON THE BATTLEFIELD TODAY, SOLDIER, BUT THE FIGHT IS NOT OVER YET. WE NEED YOU TO SUPPRESS THE ENEMY WHILE WE ENTER BETTONS BASE TO SAVE THE CHIEF. THIS MAY BE OUR LAST COMMUNICATION BEFORE THE END. IT'S BEEN AN HONOR TO WORK WITH YOU. GOOD LUCK SOLDIER.";
var introTextStore9 = "IT APPEARS WE WERE TOO LATE, SON. WE HAVE RECOVERED THE BODY OF THE CHIEF AFTER THE FIREFIGHT WITH BETTONS TROOPS. WHILE THIS BATTLE RESULTED IN A MINOR LOSS, VICTORY REMAINS OURS, THANKS TO YOU. YOUR HELP HAS KEPT US AFLOAT IN THIS WAR. FROM EVERYONE AT HQ, WE OFFER OUR THANKS. AT EASE SOLDIER... THANKS FOR PLAYING!";
var introStartTimer = 20;
var introText = "";
var introStore = this["introTextStore" + _root.mission].split("");
var introCounter = 0;
Symbol 245 MovieClip Frame 280
gotoAndPlay(random(200));
Symbol 251 MovieClip Frame 1
gotoAndStop(_parent.levelGraphics);
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 4
gotoAndStop(_parent._parent.levelGraphics);
Symbol 268 MovieClip Frame 1
var cursorArray = new Array();
var cursorTrailLength = 10;
while (cursorArray.length < cursorTrailLength) {
cursorArray.push(0);
}
var i = 0;
Symbol 276 MovieClip Frame 1
if ((_root.mission == 99) || (_root.mission == 98)) {
this._visible = false;
}
gotoAndStop(_root.mission + 1);
Symbol 296 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 1
function onEnterFrame() {
if (gameFroze == false) {
pauseManagement();
} else {
gamePaused = false;
}
if ((gamePaused == false) && (gameFroze == false)) {
heliView();
introManagement();
challengeMode();
updateBulletPods();
updateBullets();
updateMissiles();
updateExplosions();
updateRadar();
updateSmoke();
deathManagement();
backgroundManagement();
updateMessages();
enemySpawnControl();
}
FRAME.boomFade._alpha = FRAME.boomFade._alpha / 1.1;
FRAME.hurtFade._alpha = FRAME.hurtFade._alpha / 1.1;
if (introTimer == 0) {
FRAME.radar.mouse._x = cursor._x / 5;
EFFECTS.clear();
cursor._rotation = cursor._rotation + 10;
if (_ymouse < 230) {
cursorPosY = _ymouse;
} else {
cursorPosY = 230;
}
cursorPosX = _xmouse;
cursor._x = cursor._x - ((cursor._x - cursorPosX) / 3);
cursor._y = cursor._y - ((cursor._y - cursorPosY) / 3);
cursorTrail(cursor, EFFECTS);
}
}
function cursorTrail(curs, layer) {
with (curs) {
cursorArray.push(_x);
cursorArray.push(_y);
cursorArray.shift();
cursorArray.shift();
i = 0;
while (i < (cursorArray.length - 2)) {
layer.lineStyle(i / (cursorTrailLength / 10), 16711680, i * 10);
layer.moveTo(cursorArray[i], cursorArray[i + 1]);
i = i + 2;
layer.lineTo(cursorArray[i], cursorArray[i + 1]);
}
}
}
function onMouseDown() {
if (((gameFroze == false) && (gamePaused == false)) && (_root.mission != 99)) {
if (Key.isDown(16)) {
smartBomb();
} else if ((selectBullet() == true) && (introTimer == 0)) {
_parent.newSound("SHOT.wav", 100, false, 0);
_parent.newSound("MISSILEFLY.wav", 100, false, 0);
newBullet(cursor._x, cursor._y, 4, 100, 300);
}
}
}
function newBullet(xPos, yPos, targetLayer, scale, flashScale) {
if (targetLayer > 0) {
var _local3 = this["BULLET_" + targetLayer].attachMovie("BULLET", "B" + bulletCount, bulletCount++);
_local3._x = xPos;
_local3._y = yPos;
_local3._xscale = scale;
_local3._yscale = scale;
_local3.layer = targetLayer;
_local3.scaleVar = scale;
_local3.scaler = scale;
_local3.Flash._xscale = flashScale;
_local3.Flash._yscale = flashScale;
if (_root.railCounter > 0) {
_local3.speed = 8;
if (flashScale > 0) {
_root.railCounter--;
}
} else {
_local3.speed = 2;
}
_local3.flare.gotoAndStop(_root.bulletStrength);
bulletArray.push(_local3);
newRadarBullet(xPos, targetLayer, 1);
} else {
combo = 0;
}
}
function updateBullets() {
var _local1 = 0;
while (_local1 < bulletArray.length) {
if (bulletArray[_local1].destroy == true) {
removeBullet(_local1);
_local1--;
} else {
bulletArray[_local1].flare._alpha = random(20) + 80;
bulletArray[_local1].Flash._xscale = bulletArray[_local1].Flash._xscale / 1.5;
bulletArray[_local1].Flash._yscale = bulletArray[_local1].Flash._xscale;
bulletArray[_local1]._x--;
bulletArray[_local1].scaler = bulletArray[_local1].scaler - bulletArray[_local1].speed;
bulletArray[_local1]._xscale = bulletArray[_local1].scaler;
newSmoke(bulletArray[_local1]._x, bulletArray[_local1]._y, bulletArray[_local1].layer, bulletArray[_local1]._xscale / 2);
bulletArray[_local1]._yscale = bulletArray[_local1]._xscale;
if (bulletArray[_local1].scaler < (bulletArray[_local1].scaleVar - 20)) {
checkCol(bulletArray[_local1]._x, bulletArray[_local1]._y, bulletArray[_local1].layer, _local1);
if ((bulletArray[_local1].destroy != true) && ((bulletArray[_local1]._y < 185) || (bulletArray[_local1].layer > 3))) {
newBullet(bulletArray[_local1]._x, bulletArray[_local1]._y, bulletArray[_local1].layer - 1, bulletArray[_local1].scaler, 0);
} else if ((bulletArray[_local1]._y > 185) && (bulletArray[_local1].layer <= 3)) {
combo = 0;
newExplosion(bulletArray[_local1]._x, bulletArray[_local1]._y, bulletArray[_local1].layer, bulletArray[_local1].layer / 2);
}
bulletArray[_local1].destroy = true;
}
}
_local1++;
}
}
function newMissile(type, yPos, targetLayer) {
var _local2 = this["MISSILE_" + targetLayer].attachMovie("MISSILE" + type, "M" + missileCount, missileCount++);
_local2._x = -_local2._width;
_local2._y = yPos;
_local2._xscale = 20 * targetLayer;
_local2._yscale = _local2._xscale;
_local2.layer = targetLayer;
_local2.box._visible = false;
_local2.drop = 0;
_local2.radar = type;
if (type < 20) {
_local2.speed = 40;
_local2.health = 1 + type;
} else {
_local2.speed = 10;
_local2.health = 2;
}
missileArray.push(_local2);
}
function updateMissiles() {
var _local1 = 0;
while (_local1 < missileArray.length) {
if (missileArray[_local1].health > 1) {
newRadarBullet(missileArray[_local1]._x, missileArray[_local1].layer, missileArray[_local1].radar + 1);
}
if (dead == true) {
missileArray[_local1]._y = missileArray[_local1]._y - (missileArray[_local1]._yscale / 50);
}
missileArray[_local1]._x = missileArray[_local1]._x + (missileArray[_local1]._xscale / missileArray[_local1].speed);
missileArray[_local1]._rotation = missileArray[_local1]._rotation / 1.04;
if (missileArray[_local1].health <= 1) {
missileArray[_local1]._y = missileArray[_local1]._y + missileArray[_local1].drop;
missileArray[_local1].drop = missileArray[_local1].drop + (missileArray[_local1]._xscale / 200);
missileArray[_local1]._rotation = missileArray[_local1]._rotation + 2;
newSmoke(missileArray[_local1]._x, missileArray[_local1]._y, missileArray[_local1].layer, missileArray[_local1]._xscale);
if (missileArray[_local1]._y > (165 + (missileArray[_local1].layer * 22))) {
newExplosion(missileArray[_local1]._x, missileArray[_local1]._y, missileArray[_local1].layer, missileArray[_local1].layer);
changeMoney(50 * missileArray[_local1].radar);
removeMissile(_local1);
_local1--;
}
}
if ((missileArray[_local1]._x > (400 + (missileArray[_local1]._width / 2))) && (missileArray[_local1].health > 1)) {
removeMissile(_local1);
_local1--;
}
_local1++;
}
}
function checkCol(xPos, yPos, targetLayer, caller) {
hitBlock._x = xPos;
hitBlock._y = yPos;
hitBlock._width = bulletArray[caller]._width;
hitBlock._height = hitBlock._width;
var _local2 = 0;
while (_local2 < missileArray.length) {
if (missileArray[_local2].hitTest(hitBlock) && (missileArray[_local2].layer == targetLayer)) {
newExplosion(bulletArray[caller]._x, bulletArray[caller]._y, targetLayer, targetLayer / 2);
newSmoke(bulletArray[caller]._x, bulletArray[caller]._y, bulletArray[caller].layer, bulletArray[caller]._xscale * 2);
FRAME.boomFade._alpha = missileArray[_local2]._xscale;
if (missileArray[_local2].box.hitTest(hitBlock)) {
missileArray[_local2].health = missileArray[_local2].health - _root.bulletStrength;
combo++;
if (missileArray[_local2].health <= 0) {
newExplosion(missileArray[_local2]._x + (targetLayer * 20), missileArray[_local2]._y, targetLayer, targetLayer * 2);
newMessage("BONUS!", missileArray[_local2]._x, missileArray[_local2]._y, 70, 200);
var _local5 = ((20 + missileArray[_local2].radar) * combo) + (100 * missileArray[_local2].radar);
changeMoney(_local5);
newMessage((combo + " HIT COMBO + $") + _local5, 290, 240, 100, 200);
removeMissile(_local2);
_local2--;
} else {
var _local5 = (20 + missileArray[_local2].radar) * combo;
changeMoney(_local5);
newExplosion(missileArray[_local2]._x, missileArray[_local2]._y, targetLayer, targetLayer);
missileArray[_local2]._rotation = -20;
if (combo > 1) {
newMessage((combo + " HIT COMBO + $") + _local5, 290, 240, 100, 200);
} else {
newMessage(" HIT + $" + _local5, 310, 240, 100, 200);
}
}
}
bulletArray[caller].destroy = true;
}
_local2++;
}
}
function removeMissile(ID) {
if (missileArray[ID].radar != 22) {
destroyCount++;
if (missileArray[ID].health <= 1) {
killCount++;
} else {
hurtShip();
if (_root.health == 0) {
dead = true;
}
}
}
missileArray[ID].removeMovieClip();
missileArray.splice(ID, 1);
}
function removeBullet(ID) {
bulletArray[ID].removeMovieClip();
bulletArray.splice(ID, 1);
}
function backgroundManagement() {
var _local2 = 0;
while (_local2 < 6) {
this["BG_" + _local2]._x = this["BG_" + _local2]._x - (10 / (_local2 + 1));
if (this["BG_" + _local2]._x < (-(this["BG_" + _local2]._width / 3))) {
this["BG_" + _local2]._x = this["BG_" + _local2]._x + (this["BG_" + _local2]._width / 3);
}
_local2++;
}
BG_sky._x = BG_sky._x - 2;
if (BG_sky._x < (30 - (BG_sky._width / 2))) {
BG_sky._x = BG_sky._x + (BG_sky._width / 2);
}
}
function heliView() {
_y = liftStore;
_x = (_x - ((_x - heliX) / 10));
_y = (_y - ((_y - heliY) / 10));
heliX = heliX / 1.1;
heliY = heliY / 1.1;
_x = (_x / 1.1);
_y = (_y / 1.1);
FRAME._x = ((-_x) / 1.5) - 60;
FRAME._y = ((-_y) / 1.5) - 70;
if (Math.round(_rotation) == rotateTarget) {
rotateTarget = random(10) - 5;
} else if (_rotation < rotateTarget) {
rotate = rotate + 0.1;
} else if (_rotation > rotateTarget) {
rotate = rotate - 0.1;
}
_rotation = ((rotate * turbulance) / 100);
FRAME._rotation = -_rotation;
liftStore = _y;
_y = (_y + ((lift * turbulance) / 100));
FRAME._y = FRAME._y - ((lift * turbulance) / 100);
if (lift < liftTarget) {
lift = lift + 1;
} else if (lift > liftTarget) {
lift = lift - 1;
} else {
liftTarget = random(liftMax);
}
if (random(1000 / turbulance) == 0) {
heliX = random(turbulance) - (turbulance / 2);
}
if (random(1000 / turbulance) == 0) {
heliY = random(turbulance) - (turbulance / 2);
}
}
function newRadarBullet(xPos, yPos, type) {
var _local1 = FRAME.radar.attachMovie("Radar_Bullet", "RP" + radarPointCount, radarPointCount++);
_local1._x = xPos / 5;
_local1._y = (yPos * 10) + 10;
_local1._xscale = 100;
_local1._yscale = 100;
_local1.gotoAndStop(type);
radarTrackArray.push(_local1);
}
function updateRadar() {
var _local1 = 0;
while (_local1 < radarTrackArray.length) {
if (radarTrackArray[_local1]._xscale > 0) {
radarTrackArray[_local1]._xscale = radarTrackArray[_local1]._xscale - 5;
radarTrackArray[_local1]._alpha = radarTrackArray[_local1]._alpha - 10;
radarTrackArray[_local1]._yscale = radarTrackArray[_local1]._xscale;
} else {
radarTrackArray[_local1].removeMovieClip();
radarTrackArray.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
function newExplosion(xPos, yPos, layer, scale) {
_parent.newSound("EXPLOSION.wav", (layer * 200) / 6, false, 0);
var _local3 = this["EXPLOSIONS_" + layer].attachMovie("Explosion", "EXP" + explosionCount, explosionCount++);
_local3._x = xPos;
_local3._y = yPos;
_local3._xscale = 200 * scale;
_local3._yscale = 200 * scale;
_local3._rotation = random(360);
explosionArray.push(_local3);
if (_local3._x < 150) {
_x = (_x + (scale * 2));
} else if (_local3._x > 250) {
_x = (_x - (scale * 2));
}
_y = (_y - (scale * 2));
}
function updateExplosions() {
var _local1 = 0;
while (_local1 < explosionArray.length) {
if (explosionArray[_local1]._x > 0) {
explosionArray[_local1]._x = explosionArray[_local1]._x - (explosionArray[_local1]._xscale / 40);
} else {
explosionArray[_local1].removeMovieClip();
explosionArray.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
function selectBullet() {
if (((ammo > 0) && (_root._ymouse < 230)) && (introTimer == 0)) {
ammo--;
return(true);
}
}
function updateBulletPods() {
if (_root.money == NaN) {
_root.money = moneySave;
} else {
moneySave = _root.money;
}
if (moneyPot < _root.money) {
moneyPot = moneyPot + ((_root.money - moneyPot) / 10);
} else {
moneyPot = _root.money;
}
FRAME.moneyText = "$" + Math.round(moneyPot);
FRAME.railBar._width = 5 * _root.railCounter;
if (ammo == 0) {
FRAME.AMMOBOX.gotoAndStop(2);
FRAME.AMMOBOX.reloadBar._xscale = (100 / (100 / (_root.reloadSpeed * 2))) * reloadTimer;
if (reloadTimer < (100 / (_root.reloadSpeed * 2))) {
reloadTimer++;
} else {
reloadTimer = 0;
ammo = _root.bulletSelectionMax;
}
} else {
FRAME.AMMOBOX.gotoAndStop(1);
var _local2 = 1;
while (_local2 < 6) {
if (_root.bulletSelectionMax < _local2) {
FRAME.AMMOBOX["bulletPod" + _local2]._alpha = 0;
} else if (ammo < _local2) {
FRAME.AMMOBOX["bulletPod" + _local2]._alpha = 20;
} else {
FRAME.AMMOBOX["bulletPod" + _local2]._alpha = 100;
}
_local2++;
}
}
var _local2 = 1;
while (_local2 < 6) {
if (_root.health < _local2) {
FRAME.HEALTHBOX["bulletPod" + _local2]._alpha = 20;
} else {
FRAME.HEALTHBOX["bulletPod" + _local2]._alpha = 100;
}
_local2++;
}
_local2 = 1;
while (_local2 < 4) {
if (_root.smartBomb < _local2) {
FRAME.BOMBBOX["bulletPod" + _local2]._alpha = 20;
} else {
FRAME.BOMBBOX["bulletPod" + _local2]._alpha = 100;
}
_local2++;
}
}
function newSmoke(xPos, yPos, layer, scale) {
if (smokeArray.length < 200) {
var _local2 = this["SMOKE_" + layer].attachMovie("Smoke", "SMK" + smokeCount, smokeCount++);
_local2._x = xPos;
_local2._y = yPos;
_local2._xscale = scale + random(5);
_local2._yscale = scale + random(5);
_local2._alpha = random(5) + 15;
_local2._rotation = random(360);
smokeArray.push(_local2);
}
}
function updateSmoke() {
var _local2 = 0;
while (_local2 < smokeArray.length) {
if ((smokeArray[_local2]._x > -20) && (smokeArray[_local2]._alpha > 0)) {
smokeArray[_local2]._x = smokeArray[_local2]._x - (smokeArray[_local2]._xscale / 10);
smokeArray[_local2]._alpha = smokeArray[_local2]._alpha - _root.smokeSettings;
} else {
smokeArray[_local2].removeMovieClip();
smokeArray.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function enemySpawnControl() {
if (_root.mission != 99) {
bonusSpawnTimer--;
}
if (bonusSpawnTimer == 0) {
newMissile(22, random(140) + 20, 1);
}
FRAME.waveText = (("" + killCount) + "/") + levelArray[4];
spawnTimer++;
if (dead != true) {
if (((spawnTimer > levelArray[3]) && (introTimer == 0)) && (waveTimer < levelArray[4])) {
spawnTimer = random(40) * -1;
waveTimer++;
newMissile(random(levelArray[1]) + 1, random(140) + 20, 4 - random(levelArray[2]));
} else if ((waveTimer == levelArray[4]) && (destroyCount == levelArray[4])) {
if (endCount == 0) {
newMessage("LEVEL COMPLETE!", 190, 100, 200, 400);
if (killCount == destroyCount) {
newMessage("PERFECT SCORE!", 190, 130, 100, 300);
if (_root.mission == 3) {
if (_root.difficulty == 2) {
_root.newMedal(8);
} else if (_root.difficulty == 3) {
_root.newMedal(7);
} else if (_root.difficulty == 4) {
_root.newMedal(6);
}
}
}
if (combo >= destroyCount) {
newMessage("PERFECT COMBO!", 190, 150, 100, 300);
}
stopAllSounds();
_parent.newSound("LEVEL_COMPLETE.WAV", 400, false, 0);
}
endCount++;
if (endCount == 150) {
_parent.transistion("UPGRADE");
}
}
}
}
function setGraphics(val) {
skyColor.gotoAndStop(val);
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 1;
while (_local2 < 4) {
this["BG_" + _local3]["tile" + _local2].gotoAndStop(val);
_local2++;
}
_local3++;
}
}
function introManagement() {
if (introTimer > 0) {
BARRY._x = BARRY._x - ((BARRY._x - 200) / 30);
if (introTimer < 80) {
BARRY._rotation = BARRY._rotation - 0.45;
}
if (introTimer < 50) {
BARRY._xscale = BARRY._xscale * (1 + barryScaler);
barryScaler = barryScaler + 0.01;
BARRY._yscale = BARRY._xscale;
}
introTimer--;
if (introTimer < 10) {
IntroFrame._alpha = IntroFrame._alpha - 20;
FRAME._alpha = FRAME._alpha + 10;
BARRY._alpha = BARRY._alpha - 20;
}
if (introTimer == 0) {
BARRY.swapDepths(666);
BARRY.removeMovieClip();
IntroFrame.swapDepths(666);
IntroFrame.removeMovieClip();
FRAME._alpha = 100;
cursor._visible = true;
}
IntroFrame._x = (-_x) - 40;
IntroFrame._y = (-_y) + 120;
IntroFrame._rotation = -_rotation;
}
}
function changeMoney(ammount) {
_root.money = _root.money + (ammount * _root.difficulty);
}
function newMessage(mess, xPos, yPos, size, timer) {
var _local1 = MESSAGE.attachMovie("message", "MSG" + messageCount, messageCount++);
_local1.txtBox = mess;
_local1._x = xPos - _x;
_local1._y = yPos - _y;
_local1._rotation = -_rotation;
_local1._xscale = size;
_local1._yscale = size;
_local1._alpha = timer;
}
function deathManagement() {
if (dead == true) {
deathTimer--;
if (deathTimer == 0) {
_parent.transistion("GAMEOVER");
}
if (random(4) == 0) {
if (random(2) == 0) {
newMessage("DAMAGE CRITICAL!", 190, 80, 100, 100);
newMessage("BAIL OUT!", 200, 100, 100, 100);
}
newExplosion(random(400), random(100) + 200, random(4), (random(100) + 50) / 20);
FRAME.boomFade._alpha = 100;
}
}
}
function smartBomb() {
if (_root.smartBomb > 0) {
_root.smartBomb--;
FRAME.boomFade._alpha = 200;
_parent.newSound("EMP", 200, false, 0);
var _local3 = 0;
while (_local3 < missileArray.length) {
missileArray[_local3].health = 0;
_local3++;
}
}
}
function hurtShip() {
_parent.newSound("BANG", 600, false, 0);
FRAME.hurtFade._alpha = 100;
_root.health--;
}
function pauseManagement() {
if (_root.mission != 99) {
if (Key.isDown(80) && (pauseKeySwitch == false)) {
pauseKeySwitch = true;
if (gamePaused == true) {
_parent.pauseMenu._x = -500;
gamePaused = false;
if (_root.volSwitch == false) {
_root.muteSound.setVolume(100);
}
} else {
_parent.pauseMenu._x = pauseXPos;
gamePaused = true;
_root.muteSound.setVolume(0);
}
} else if (Key.isDown(80) == false) {
pauseKeySwitch = false;
}
}
}
function challengeMode() {
if (_root.difficulty == 5) {
challengeDistance++;
if (challengeDistance == 7500) {
trace("medalGot");
_parent.newMedal(9);
}
if (combo == 30) {
trace("comboGot");
_parent.newMedal(10);
}
challengeTimerGraphics--;
if (challengeTimerGraphics == 0) {
challengeTimerGraphics = 500;
setGraphics(random(9) + 1);
FRAME.boomFade._alpha = 100;
}
challengeTimerType--;
if ((challengeTimerType == 0) && (levelArray[1] < 4)) {
challengeTimerType = 1000;
levelArray[1]++;
}
challengeTimerDepth--;
if ((challengeTimerDepth == 0) && (levelArray[2] < 4)) {
challengeTimerDepth = 800;
levelArray[2]++;
}
challengeTimerSpawn--;
if ((challengeTimerSpawn == 0) && (levelArray[3] > 5)) {
challengeTimerSpawn = 600;
trace(levelArray[3]);
levelArray[3] = levelArray[3] - 2.5;
}
}
}
var levelArray_0 = new Array(1, 1, 3, 60, 10, "LEVEL 1 - CITY AREA 1 - TIME 6 A.M.", 20);
var levelArray_1 = new Array(4, 2, 3, 60, 15, "LEVEL 2 - OIL FIELDS 1 - TIME 9 A.M.", 40);
var levelArray_2 = new Array(7, 2, 4, 50, 20, "LEVEL 3 - ROCKY MOUNTAINS 1 - TIME 12 A.M.", 40);
var levelArray_3 = new Array(2, 3, 4, 40, 25, "LEVEL 4 - CITY AREA 2 - TIME 4 P.M.", 120);
var levelArray_4 = new Array(5, 3, 4, 40, 30, "LEVEL 5 - OIL FIELDS 2 - TIME 7 P.M.", 20);
var levelArray_5 = new Array(7, 3, 4, 30, 35, "LEVEL 6 -ROCKY MOUNTAINS 2 - TIME 9 P.M.", 80);
var levelArray_6 = new Array(3, 3, 4, 20, 40, "LEVEL 7 - CITY AREA 3 - TIME 11 P.M.", 80);
var levelArray_7 = new Array(8, 4, 4, 20, 45, "LEVEL 8 - THE WARFIELD - TIME 1 A.M.", 120);
var levelArray_8 = new Array(9, 4, 4, 15, 50, "LEVEL 9 - THE NEW GROUND - TIME 2 A.M.", 120);
var levelArray_98 = new Array(2, 1, 1, 60, 99999, "CHALLENGE MODE - GOOD LUCK!", 60);
var levelArray_99 = new Array(2, 0, 0, 999999, 5, "TUTORIAL PRESS SPACE TO QUIT", 0);
var levelArray = this["levelArray_" + _root.mission];
IntroFrame.txtBox = levelArray[5];
setGraphics(levelArray[0]);
var moneyPot = Math.round(_root.money);
var missileArray = new Array();
var bulletArray = new Array();
var radarTrackArray = new Array();
var explosionArray = new Array();
var smokeArray = new Array();
var messageArray = new Array();
var i;
var layerCount = 0;
var gameFroze = false;
i = 0;
while (i < 19) {
createEmptyMovieClip("MISSILE_" + layerCount, i);
layerCount++;
i = i + 4;
}
layerCount = 0;
i = 1;
while (i < 20) {
createEmptyMovieClip("BULLET_" + layerCount, i);
layerCount++;
i = i + 4;
}
layerCount = 0;
i = 2;
while (i < 21) {
createEmptyMovieClip("EXPLOSIONS_" + layerCount, i);
layerCount++;
i = i + 4;
}
layerCount = 0;
i = 3;
while (i < 22) {
createEmptyMovieClip("SMOKE_" + layerCount, i);
layerCount++;
i = i + 4;
}
hitBlock._visible = false;
createEmptyMovieClip("EFFECTS", 20);
FRAME.swapDepths(23);
cursor.swapDepths(21);
createEmptyMovieClip("MESSAGE", 24);
_parent.newSound("CITY_THEME.WAV", 400, true, 999);
var bulletCount = 0;
var missileCount = 0;
var turbulance = levelArray[6];
var lift = 0;
var liftMax = 35;
var liftTarget = 0;
var liftStore = 0;
var rotate = 0;
var rotateTarget = 0;
var levelGraphics = levelArray[0];
var combo = 0;
var destroyCount = 0;
var killCount = 0;
var endCount = 0;
var radarPointCount = 0;
var explosionCount = 0;
var reloadTimer = 0;
var ammo = _root.bulletSelectionMax;
var moneySave = 0;
var smokeCount = 0;
var waveTimer = 0;
var spawnTimer = 0;
var bonusSpawnTimer = (random(1000) + 100);
var introTimer = 160;
FRAME._alpha = 0;
var barryScaler = -0.1;
cursor._visible;
var messageCount = 0;
var deathTimer = 200;
FRAME.hurtFade._alpha = 0;
var pauseKeySwitch = false;
var gamePaused = false;
var pauseXPos = _parent.pauseMenu._x;
_parent.pauseMenu._x = -1000;
var challengeTimerType = 1000;
var challengeTimerSpawn = 600;
var challengeTimerDepth = 800;
var challengeTimerGraphics = 500;
var challengeDistance = 0;
Symbol 330 MovieClip Frame 483
_parent.GAME.newMissile(1, 150, 4);
Symbol 330 MovieClip Frame 597
function onMouseDown() {
if (cursorPoint.hitTest(_parent.GAME.cursor)) {
play();
_parent.GAME.gameFroze = false;
_parent.newSound("SHOT.wav", 100, false, 0);
_parent.newSound("MISSILEFLY.wav", 100, false, 0);
_parent.GAME.newBullet(_parent.GAME.cursor._x, _parent.GAME.cursor._y, 4, 100, 300);
}
}
_parent.GAME.gameFroze = true;
stop();
Symbol 330 MovieClip Frame 598
_parent.GAME.newMissile(1, 150, 2);
Symbol 330 MovieClip Frame 799
function onMouseDown() {
if (cursorPoint.hitTest(_parent.GAME.cursor)) {
play();
_parent.GAME.gameFroze = false;
_parent.newSound("SHOT.wav", 100, false, 0);
_parent.newSound("MISSILEFLY.wav", 100, false, 0);
_parent.GAME.newBullet(_parent.GAME.cursor._x, _parent.GAME.cursor._y, 4, 100, 300);
}
}
_parent.GAME.gameFroze = true;
stop();
Symbol 330 MovieClip Frame 856
function onMouseDown() {
_root.medalTitle = 4;
_parent.transistion("TITLELOAD");
}
stop();
Symbol 345 Button
on (release) {
gotoAndStop (2);
}
Symbol 348 Button
on (release) {
gotoAndStop (1);
}
Symbol 349 Button
on (release) {
stopAllSounds();
_root.transistion("TITLELOAD");
}
Symbol 352 MovieClip Frame 1
stop();
Instance of Symbol 340 MovieClip in Symbol 353 MovieClip Frame 1
onClipEvent (load) {
if (_root.smokeSettings == 0.01) {
stop();
} else {
nextFrame();
}
}
on (release) {
if (_root.smokeSettings == 0.01) {
gotoAndStop (2);
_root.smokeSettings = 1.5;
_quality = "medium";
} else {
gotoAndStop (1);
_root.smokeSettings = 0.01;
_quality = "high";
}
}
Symbol 355 Button
on (release) {
if (finishSwitch == false) {
_root.mission++;
finishSwitch = true;
_parent.transistion("STORY");
}
}
Symbol 357 Button
on (release) {
if (finishSwitch == false) {
_root.mission++;
finishSwitch = true;
}
_parent.transistion("GAME");
}
Symbol 360 Button
on (release) {
updateCosts();
updateInfoBox(0.5, "bulletStrength", "THE DAMAGE EACH SHOT DOES TO ENEMY SHIPS", _root.bulletStrength, 5, strengthCost);
}
Symbol 361 Button
on (release) {
updateCosts();
updateInfoBox(1, "health", "RECOVER ONE UNIT OF HEALTH", _root.health, 5, healthCost);
}
Symbol 362 Button
on (release) {
updateCosts();
updateInfoBox(1, "smartBomb", "An E.M.P. will destroy all ships on screen. Hold shift and Click to fire an E.M.P.", _root.smartBomb, 3, bombCost);
}
Symbol 363 Button
on (release) {
updateCosts();
updateInfoBox(1, "reloadSpeed", "The ammount of time it takes the copter to reload.", _root.reloadSpeed, 5, reloadCost);
}
Symbol 364 Button
on (release) {
updateCosts();
updateInfoBox(1, "bulletSelectionMax", "THE AMMOUNT OF MISSILES THE COPTER CAN FIRE BEFORE RELOADING.", _root.bulletSelectionMax, 5, magCost);
}
Symbol 365 Button
on (release) {
updateCosts();
updateInfoBox(5, "railCounter", "Purchase an additional 5 railgun shots. Railgun shots travel much faster than standard shots.", _root.railCounter, 20, railCost);
}
Symbol 367 Button
on (release) {
if (_root.money >= strengthCost) {
if (_root.bulletStrength < 5) {
_root.money = _root.money - strengthCost;
_root.bulletStrength = _root.bulletStrength + 0.5;
errorMessage("BULLET POWER INCREASED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("BULLET POWER LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 368 Button
on (release) {
if (_root.money >= healthCost) {
if (_root.health < 5) {
_root.money = _root.money - healthCost;
_root.health = _root.health + 1;
errorMessage("HEALTH RESTORED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("HEALTH LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 369 Button
on (release) {
if (_root.money >= bombCost) {
if (_root.smartBomb < 3) {
_root.money = _root.money - bombCost;
_root.smartBomb = _root.smartBomb + 1;
errorMessage("E.M.P. BOMB PURCHASED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("E.M.P. BOMB LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 370 Button
on (release) {
if (_root.money >= reloadCost) {
if (_root.reloadSpeed < 5) {
_root.money = _root.money - reloadCost;
_root.reloadSpeed = _root.reloadSpeed + 1;
errorMessage("RELOAD SPEED INCREASED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("RELOAD SPEED LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 371 Button
on (release) {
if (_root.money >= magCost) {
if (_root.bulletSelectionMax < 5) {
_root.money = _root.money - magCost;
_root.bulletSelectionMax = _root.bulletSelectionMax + 1;
errorMessage("MAGAZINE INCREASED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("MAGAZINE LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 372 Button
on (release) {
if (_root.money >= railCost) {
if (_root.railCounter < 20) {
_root.money = _root.money - railCost;
_root.railCounter = _root.railCounter + 5;
if (_root.railCounter > 20) {
_root.railCounter = 20;
}
errorMessage("RAILGUN AMMO PURCHASED");
_parent.newSound("UPGRADE.wav", 200, false, 0);
} else {
errorMessage("RAILGUN LIMIT REACHED");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
} else {
errorMessage("NOT ENOUGH FUNDS");
_parent.newSound("UPGRADEFAIL.wav", 200, false, 0);
}
}
Symbol 399 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 1
function onEnterFrame() {
moneyText = "Money: $" + _root.money;
}
function updateInfoBox(inc, varType, desc, current, limit, cost) {
infoBox.play();
incVal = inc;
activeVar = varType;
infoText = desc;
currentText = current;
limitText = limit;
costText = cost;
}
function errorMessage(txtBox) {
var _local1 = attachMovie("purchaseMessage", "PM" + errorCount, errorCount++);
_local1._x = -1000;
_local1._y = 0;
_local1.txtBox = txtBox;
}
var infoText = "CLICK AN INFO BUTTON FOR MORE INFORMATION ON THE UPGRADE";
var currentText;
var limitText;
var costText;
var finishSwitch = false;
var strengthCost;
var reloadCost;
var magCost;
var bombCost;
var healthCost;
var railCost;
var incVal;
strengthCost = 6000;
reloadCost = 3000;
magCost = 3000;
bombCost = 4000;
healthCost = 2000;
railCost = 2000;
var errorCount = 0;
Symbol 404 Button
on (release) {
_root.health = 5;
_root.money = Math.round(_root.money / 2);
transistion("GAME");
}
Symbol 405 Button
on (release) {
_root.health = 5;
_root.score = Math.round(_root.score);
transistion("TITLELOAD");
}
Symbol 417 MovieClip Frame 301
stop();
Symbol 425 MovieClip Frame 814
if (_root.difficulty == 2) {
_root.medalTitle = 3;
} else if (_root.difficulty == 3) {
_root.medalTitle = 2;
} else if (_root.difficulty == 4) {
_root.medalTitle = 1;
}
_parent.transistion("TITLELOAD");
Symbol 426 Button
on (release) {
if (_root.difficulty == 2) {
_root.medalTitle = 3;
} else if (_root.difficulty == 3) {
_root.medalTitle = 2;
} else if (_root.difficulty == 4) {
_root.medalTitle = 1;
}
transistion("TITLELOAD");
}
Symbol 429 Button
on (release) {
stopAllSounds();
transistion("TITLELOAD", false);
}