Frame 1
function fade(frame) {
fader.play();
fader.frame = frame;
}
sound = true;
music = true;
menu = new ContextMenu();
menu.hideBuiltInItems();
stop();
Instance of Symbol 71 MovieClip "loadBar" in Frame 1
onClipEvent (load) {
timer = 0;
_xscale = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
}
onClipEvent (enterFrame) {
_xscale = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
ifFrameLoaded (2) {
_root.fade("intro");
}
timer++;
}
Frame 3
function newGame() {
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
ammo = new Object();
ammo[1] = 50;
ammo[2] = 10;
ammo[3] = 100;
ammo[4] = 100;
ammo[5] = 5;
weapon = new Object();
weapon[1] = true;
weapon[2] = false;
weapon[3] = false;
weapon[4] = false;
weapon[5] = false;
upgrade = new Object();
upgrade[1] = 1;
upgrade[2] = 1;
upgrade[3] = 1;
upgrade[4] = 1;
upgrade[5] = 1;
activeWeapon = 1;
saves = 0;
health = 100;
armor = 0;
speed = 10;
level = 1;
money = 0;
gameSaveSo.clear();
fade("start");
}
function loadGame() {
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
level = gameSaveSo.data.level;
upgrade = new Object();
upgrade[1] = gameSaveSo.data.upgrade[1];
upgrade[2] = gameSaveSo.data.upgrade[2];
upgrade[3] = gameSaveSo.data.upgrade[3];
upgrade[4] = gameSaveSo.data.upgrade[4];
upgrade[5] = gameSaveSo.data.upgrade[5];
weapon = new Object();
weapon[1] = gameSaveSo.data.weapon[1];
weapon[2] = gameSaveSo.data.weapon[2];
weapon[3] = gameSaveSo.data.weapon[3];
weapon[4] = gameSaveSo.data.weapon[4];
weapon[5] = gameSaveSo.data.weapon[5];
ammo = new Object();
ammo[1] = gameSaveSo.data.ammo[1];
ammo[2] = gameSaveSo.data.ammo[2];
ammo[3] = gameSaveSo.data.ammo[3];
ammo[4] = gameSaveSo.data.ammo[4];
ammo[5] = gameSaveSo.data.ammo[5];
activeWeapon = gameSaveSo.data.activeWeapon;
health = gameSaveSo.data.health;
armor = gameSaveSo.data.armor;
speed = gameSaveSo.data.speed;
money = gameSaveSo.data.money;
saves = gameSaveSo.data.saves;
fade("shop");
}
stop();
gameSaveSo = SharedObject.getLocal("savedGame");
unlockSo = SharedObject.getLocal("unlocks");
if (!unlockSo.data.survivalUnlocks) {
unlockSo.data.survivalUnlocks = 1;
}
Instance of Symbol 155 MovieClip in Frame 3
onClipEvent (load) {
function reset() {
_x = (-_width);
gotoAndStop(Math.round((Math.random() * 2) + 1));
}
reset();
}
onClipEvent (enterFrame) {
_x = (_x + 5);
if (_x > 650) {
reset();
}
}
Instance of Symbol 155 MovieClip in Frame 3
onClipEvent (load) {
function reset() {
_x = (-_width);
gotoAndStop(Math.round((Math.random() * 2) + 1));
}
reset();
}
onClipEvent (enterFrame) {
_x = (_x + 3);
if (_x > 650) {
reset();
}
}
Instance of Symbol 160 MovieClip in Frame 3
on (release) {
_root.newGame();
}
onClipEvent (load) {
if (_root.gameSaveSo.data.level) {
display = "Start Again";
} else {
display = "Play";
}
}
on (rollOver) {
if (_root.gameSaveSo.data.level) {
_root.mouse.displayText = "Start a new game; this will delete previous game data!";
} else {
_root.mouse.displayText = "Start a new game";
}
gotoAndStop (2);
}
on (releaseOutside, rollOut) {
_root.mouse.displayText = "";
gotoAndStop (1);
}
onClipEvent (load) {
stop();
}
Instance of Symbol 163 MovieClip in Frame 3
on (rollOver) {
if (_root.gameSaveSo.data.level) {
gotoAndStop (2);
_root.mouse.displayText = "Load previous game data that was saved last time you played";
}
}
on (releaseOutside, rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
onClipEvent (load) {
if (_root.gameSaveSo.data.level) {
_alpha = 100;
display = "Continue";
} else {
_alpha = 20;
display = "Load Game";
}
stop();
}
on (release) {
if (_root.gameSaveSo.data.level) {
_root.loadGame();
}
}
Instance of Symbol 181 MovieClip "mouse" in Frame 3
onClipEvent (load) {
_visible = false;
displayText = "";
}
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
if (displayText != "") {
_visible = true;
} else {
_visible = false;
}
}
Frame 4
switch (level) {
case 1 :
enemyDamage = 4;
enemySpeed = 0.75;
enemyHealth = 8;
enemyReward = 5;
requiredKills = 5;
maxEnemies = 2;
break;
case 2 :
enemyDamage = 4;
enemySpeed = 0.75;
enemyHealth = 10;
enemyReward = 6;
requiredKills = 5;
maxEnemies = 2;
break;
case 3 :
enemyDamage = 4;
enemySpeed = 0.75;
enemyHealth = 12;
enemyReward = 7;
requiredKills = 6;
maxEnemies = 3;
break;
case 4 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
break;
case 5 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
gotoAndStop ("boss1");
break;
case 6 :
enemyDamage = 6;
enemySpeed = 0.75;
enemyHealth = 16;
enemyReward = 9;
requiredKills = 7;
maxEnemies = 4;
break;
case 7 :
enemyDamage = 6;
enemySpeed = 0.75;
enemyHealth = 18;
enemyReward = 10;
requiredKills = 7;
maxEnemies = 4;
break;
case 8 :
enemyDamage = 6;
enemySpeed = 0.75;
enemyHealth = 20;
enemyReward = 11;
requiredKills = 8;
maxEnemies = 5;
break;
case 9 :
enemyDamage = 7;
enemySpeed = 0.75;
enemyHealth = 23;
enemyReward = 12;
requiredKills = 8;
maxEnemies = 5;
break;
case 10 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
gotoAndStop ("boss2");
break;
case 11 :
enemyDamage = 8;
enemySpeed = 1.25;
enemyHealth = 26;
enemyReward = 13;
requiredKills = 9;
maxEnemies = 6;
break;
case 12 :
enemyDamage = 8;
enemySpeed = 1.25;
enemyHealth = 29;
enemyReward = 14;
requiredKills = 9;
maxEnemies = 6;
break;
case 13 :
enemyDamage = 8;
enemySpeed = 1.25;
enemyHealth = 32;
enemyReward = 15;
requiredKills = 10;
maxEnemies = 7;
break;
case 14 :
enemyDamage = 9;
enemySpeed = 1.25;
enemyHealth = 36;
enemyReward = 16;
requiredKills = 10;
maxEnemies = 7;
break;
case 15 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
gotoAndStop ("boss3");
break;
case 16 :
enemyDamage = 10;
enemySpeed = 1.25;
enemyHealth = 40;
enemyReward = 17;
requiredKills = 12;
maxEnemies = 8;
break;
case 17 :
enemyDamage = 10;
enemySpeed = 1.25;
enemyHealth = 45;
enemyReward = 18;
requiredKills = 12;
maxEnemies = 8;
break;
case 18 :
enemyDamage = 10;
enemySpeed = 1.25;
enemyHealth = 50;
enemyReward = 19;
requiredKills = 13;
maxEnemies = 9;
break;
case 19 :
enemyDamage = 11;
enemySpeed = 1.25;
enemyHealth = 58;
enemyReward = 20;
requiredKills = 14;
maxEnemies = 9;
break;
case 20 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
gotoAndStop ("boss4");
break;
case 21 :
enemyDamage = 12;
enemySpeed = 1.25;
enemyHealth = 60;
enemyReward = 22;
requiredKills = 16;
maxEnemies = 6;
break;
case 22 :
enemyDamage = 12;
enemySpeed = 1.25;
enemyHealth = 64;
enemyReward = 24;
requiredKills = 18;
maxEnemies = 6;
break;
case 23 :
enemyDamage = 12;
enemySpeed = 1.525;
enemyHealth = 66;
enemyReward = 26;
requiredKills = 20;
maxEnemies = 7;
break;
case 24 :
enemyDamage = 13;
enemySpeed = 1.25;
enemyHealth = 68;
enemyReward = 30;
requiredKills = 15;
maxEnemies = 8;
break;
case 25 :
enemyDamage = 5;
enemySpeed = 0.75;
enemyHealth = 14;
enemyReward = 8;
requiredKills = 6;
maxEnemies = 3;
gotoAndStop ("boss5");
}
killCount = 0;
enemyHealthBar1.mark = 1;
i = 2;
while (i <= maxEnemies) {
duplicateMovieClip (enemy1, "enemy" + i, _root.getNextHighestDepth());
duplicateMovieClip (enemyHealthBar1, "enemyHealthBar" + i, _root.getNextHighestDepth());
_root["enemyHealthBar" + i].mark = i;
i++;
}
Instance of Symbol 192 MovieClip in Frame 4
onClipEvent (load) {
if (_root.level < 5) {
gotoAndStop (1);
} else if (_root.level < 10) {
gotoAndStop (2);
} else if (_root.level < 15) {
gotoAndStop (3);
} else if (_root.level < 20) {
gotoAndStop (4);
} else if (_root.level < 25) {
gotoAndStop (5);
}
}
Instance of Symbol 211 MovieClip "guy" in Frame 4
onClipEvent (load) {
_rotation = -90;
i = 0;
cooldown = 0;
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
advanceFix = true;
e = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(80) && (!_root.gamePaused)) {
_root.gamePaused = true;
_root.pauseScreen._visible = true;
_root.pauseScreen.swapDepths(_root.getNextHighestDepth());
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
}
if (_root.armor < 1) {
clothes.gotoAndStop(1);
} else if (_root.armor < 3) {
clothes.gotoAndStop(2);
} else if (_root.armor < 5) {
clothes.gotoAndStop(3);
} else {
clothes.gotoAndStop(4);
}
if (!_root.gamePaused) {
if (Key.isDown(27)) {
_root.fade("menu");
}
if (Key.isDown(37)) {
_rotation = (_rotation - _root.speed);
} else if (Key.isDown(39)) {
_rotation = (_rotation + _root.speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * _root.speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * _root.speed));
} else if (Key.isDown(40) || (Key.isDown(83))) {
_x = (_x - ((Math.cos((_rotation * Math.PI) / 180) * _root.speed) / 2));
_y = (_y - ((Math.sin((_rotation * Math.PI) / 180) * _root.speed) / 2));
}
if (Key.isDown(65)) {
_x = (_x + ((Math.cos(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
} else if (Key.isDown(68)) {
_x = (_x + ((Math.cos(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
}
if (_x > 750) {
_x = -100;
}
if (_x < -100) {
_x = 750;
}
if (_y < -100) {
_y = 600;
}
if (_y > 600) {
_y = -100;
}
if (Key.isDown(49) && (_root.weapon[1])) {
_root.activeWeapon = 1;
} else if (Key.isDown(50) && (_root.weapon[2])) {
_root.activeWeapon = 2;
} else if (Key.isDown(51) && (_root.weapon[3])) {
_root.activeWeapon = 3;
} else if (Key.isDown(52) && (_root.weapon[4])) {
_root.activeWeapon = 4;
} else if (Key.isDown(53) && (_root.weapon[5])) {
_root.activeWeapon = 5;
}
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if ((_root.killCount >= _root.requiredKills) && (advanceFix)) {
advanceFix = false;
_root.level++;
_root.gamePaused = true;
_root.fade("end");
}
if (_root.health <= 0) {
_root.gamePaused = true;
_root.fade("over");
}
if (Key.isDown(32)) {
switch (_root.activeWeapon) {
case 1 :
if ((_root.ammo[1] >= 1) && (cooldown <= 0)) {
_root.ammo[1] = _root.ammo[1] - 1;
if (_root.sound) {
pistolSound = new Sound();
pistolSound.attachSound("pistol");
pistolSound.start();
}
cooldown = 22 - (_root.upgrade[1] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w1u" + _root.upgrade[1]);
_root[newName].knockBack = Math.random() * 1;
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 110);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 110);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 4.5;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 9;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 2 :
if ((_root.ammo[2] >= 1) && (cooldown <= 0)) {
_root.ammo[2] = _root.ammo[2] - 1;
if (_root.sound) {
shotgunSound = new Sound();
shotgunSound.attachSound("shotgun");
shotgunSound.start();
}
cooldown = 42 - (_root.upgrade[2] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w2u" + _root.upgrade[2]);
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 175);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 175);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 12;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 18;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 36;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 3 :
if ((_root.ammo[3] >= 1) && (cooldown <= 0)) {
_root.ammo[3] = _root.ammo[3] - 1;
cooldown = 0;
i++;
if (_root.sound) {
if (!playingMachineGunSound) {
machineGunSound = new Sound();
machineGunSound.attachSound("machineGun");
machineGunSound.start();
playingMachineGunSound = true;
}
machineGunSound.onSoundComplete = function () {
playingMachineGunSound = false;
};
}
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w3u" + _root.upgrade[3]);
_root[newName].randomMod = Math.random() * 2;
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = (_x + (Math.cos((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._y = (_y + (Math.sin((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 20;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 20;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 2;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 6;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 4 :
if ((_root.ammo[4] >= 1) && (cooldown <= 0)) {
_root.ammo[4] = _root.ammo[4] - 1;
if (_root.sound) {
if (!playingFlamethrowerSound) {
flamethrowerSound = new Sound();
flamethrowerSound.attachSound("flamethrower");
flamethrowerSound.start();
playingFlamethrowerSound = true;
}
flamethrowerSound.onSoundComplete = function () {
playingFlamethrowerSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w4u" + _root.upgrade[4]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 120);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 120);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 12;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 12;
_root[newName]._rotation = Math.random() * 360;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._rotation = Math.random() * 360;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 4.5;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 9;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 5 :
if (!((_root.ammo[5] >= 1) && (cooldown <= 0))) {
break;
}
_root.ammo[5] = _root.ammo[5] - 1;
if (_root.sound) {
rocketLauncherSound = new Sound();
rocketLauncherSound.attachSound("rocketLauncher");
rocketLauncherSound.start();
}
cooldown = 72 - (_root.upgrade[5] * 3);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName].gotoAndStop("w5u" + _root.upgrade[5]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 137);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 137);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName].xMod = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].yMod = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed + this.xMod;
this.ySpeed = this.ySpeed + this.yMod;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
e++;
_root.attachMovie("explosion", "explosion" + e, _root.getNextHighestDepth());
_root["explosion" + e]._x = this._x;
_root["explosion" + e]._y = this._y;
this.removeMovieClip();
if (_root.sound) {
rocketLauncherExplosionSound = new Sound();
rocketLauncherExplosionSound.attachSound("rocketLauncherExplosion");
rocketLauncherExplosionSound.start();
}
}
o++;
}
};
}
}
cooldown--;
}
}
Instance of Symbol 146 MovieClip "enemy1" in Frame 4
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
function reset() {
soundFix = false;
if (_root.level < 6) {
enemy = 2;
} else if (_root.level < 12) {
enemy = rand(1, 2);
} else if (_root.level < 20) {
enemy = rand(1, 3);
} else {
enemy = rand(1, 4);
while (enemy == 2) {
enemy = rand(1, 4);
}
}
type = rand(1, 3);
gotoAndStop((("e" + enemy) + "t") + type);
entrySide = rand(1, 4);
switch (entrySide) {
case 1 :
_x = (-25 - (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
break;
case 2 :
_x = (675 + (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
break;
case 3 :
_x = rand(_width / 2, 650 - (_width / 2));
_y = (-25 - (_height / 2));
break;
case 4 :
_x = rand(_width / 2, 650 - (_width / 2));
_y = (535 + (_height / 2));
}
switch (enemy) {
case 1 :
damage = _root.enemyDamage * 1;
speed = _root.enemySpeed * 2;
health = _root.enemyHealth * 1.25;
reward = _root.enemyReward * 1.25;
break;
case 2 :
damage = _root.enemyDamage * 1;
speed = _root.enemySpeed * 1.5;
health = _root.enemyHealth * 1.5;
reward = _root.enemyReward * 1;
break;
case 3 :
damage = _root.enemyDamage * 2;
speed = _root.enemySpeed * 1;
health = _root.enemyHealth * 3.5;
reward = _root.enemyReward * 1.5;
break;
case 4 :
damage = _root.enemyDamage * 3;
speed = _root.enemySpeed * 0.75;
health = _root.enemyHealth * 5;
reward = _root.enemyReward * 2;
}
timer = 0;
cooldown = 0;
newName = "ring" + _root.getNextHighestDepth();
_root.attachMovie("ring", newName, _root.getNextHighestDepth());
_root[newName]._x = _x;
_root[newName]._y = _y;
_alpha = 100;
maxHealth = health;
}
reset();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer++;
cooldown--;
if (timer > 50) {
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop(((("e" + enemy) + "t") + type) + "a");
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop((("e" + enemy) + "t") + type);
}
} else {
gotoAndStop((("e" + enemy) + "t") + type);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
}
if (health <= 0) {
timer = 0;
_alpha = (_alpha - 10);
if (!soundFix) {
dieSound = new Sound();
dieSound.attachSound("die" + enemy);
if (_root.sound) {
dieSound.start();
}
soundFix = true;
}
if (_alpha <= 0) {
reset();
_root.killCount++;
_root.money = _root.money + reward;
}
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 214 MovieClip "enemyHealthBar1" in Frame 4
onClipEvent (enterFrame) {
_x = _root["enemy" + mark]._x;
_y = _root["enemy" + mark]._y;
_alpha = _root["enemy" + mark]._alpha;
bar._xscale = bar._xscale - ((bar._xscale - ((_root["enemy" + mark].health / _root["enemy" + mark].maxHealth) * 100)) / 10);
if (bar._xscale < 0) {
bar._xscale = 0;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 233 MovieClip "pauseScreen" in Frame 4
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 264 MovieClip in Frame 4
onClipEvent (load) {
depthCooldown = 0;
healthBar._xscale = _root.health;
}
onClipEvent (enterFrame) {
if (((((_root.level == 5) || (_root.level == 10)) || (_root.level == 15)) || (_root.level == 20)) || (_root.level == 25)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
levelDisplay = "Level " + _root.level;
armorDisplay = _root.armor;
healthBar._xscale = healthBar._xscale - ((healthBar._xscale - _root.health) / 10);
weaponIcon.gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if (healthBar._xscale < 0) {
healthBar._xscale = 0;
}
ammoDisplay = _root.ammo[_root.activeWeapon];
upgradeDisplay = "Lvl. " + _root.upgrade[_root.activeWeapon];
killsDisplay = _root.requiredKills - _root.killCount;
if ((_root.requiredKills - _root.killCount) == 1) {
killsFooter = "Kill Remaining";
} else {
killsFooter = "Kills Remaining";
}
switch (_root.activeWeapon) {
case 1 :
weaponDisplay = "Browning HP";
break;
case 2 :
weaponDisplay = "Remington 870";
break;
case 3 :
weaponDisplay = "Beretta M12";
break;
case 4 :
weaponDisplay = "M2A1-7";
break;
case 5 :
weaponDisplay = "FIM-92 Stinger";
}
if (!_root.gamePaused) {
if (depthCooldown <= 0) {
depthCooldown = 10;
this.swapDepths(_root.getNextHighestDepth());
}
depthCooldown--;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
}
}
Instance of Symbol 273 MovieClip in Frame 4
onClipEvent (load) {
if (((((_root.level == 5) || (_root.level == 10)) || (_root.level == 15)) || (_root.level == 20)) || (_root.level == 25)) {
gotoAndStop("l" + _root.level);
} else {
stop();
}
display = _root.level;
timer = 0;
_root.gamePaused = true;
pauseFix = true;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 30) {
_alpha = (_alpha - 5);
}
if (_alpha <= 0) {
_visible = false;
}
if ((_alpha < 100) && (pauseFix)) {
_root.gamePaused = false;
pauseFix = false;
}
}
Instance of Symbol 277 MovieClip "boss" in Frame 5
onClipEvent (load) {
cooldown = 0;
damage = 10;
speed = 1;
health = 450;
maxHealth = 450;
advanceFix = true;
timer = 0;
a = 0;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
stop();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer++;
if (timer >= 300) {
ring++;
timer = 0;
_root.attachMovie("orangeRing", "ring" + a, _root.getNextHighestDepth());
if (_root.sound) {
sound = new Sound();
sound.attachSound("fireball");
sound.start();
}
_root["ring" + a]._x = _x;
_root["ring" + a]._y = _y;
_root["ring" + a].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 25;
this._yscale = this._yscale + 25;
this._alpha = this._alpha - 5;
if (this.hitTest(_root.guy.hit)) {
_root.health = _root.health - 1;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop (2);
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
cooldown--;
}
if (health <= 0) {
_alpha = (_alpha - 5);
_xscale = (_xscale + 10);
_yscale = (_yscale + 10);
_root.gamePaused = true;
if ((_alpha <= 0) && (advanceFix)) {
_root.level++;
_root.money = _root.money + 85;
_root.fade("end");
advanceFix = false;
}
}
}
Instance of Symbol 211 MovieClip "guy" in Frame 5
onClipEvent (load) {
_rotation = -90;
i = 0;
cooldown = 0;
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
e = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(80) && (!_root.gamePaused)) {
_root.gamePaused = true;
_root.pauseScreen._visible = true;
_root.pauseScreen.swapDepths(_root.getNextHighestDepth());
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
}
if (_root.armor < 1) {
clothes.gotoAndStop(1);
} else if (_root.armor < 3) {
clothes.gotoAndStop(2);
} else if (_root.armor < 5) {
clothes.gotoAndStop(3);
} else {
clothes.gotoAndStop(4);
}
if (!_root.gamePaused) {
if (Key.isDown(27)) {
_root.fade("menu");
}
if (Key.isDown(37)) {
_rotation = (_rotation - _root.speed);
} else if (Key.isDown(39)) {
_rotation = (_rotation + _root.speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * _root.speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * _root.speed));
} else if (Key.isDown(40) || (Key.isDown(83))) {
_x = (_x - ((Math.cos((_rotation * Math.PI) / 180) * _root.speed) / 2));
_y = (_y - ((Math.sin((_rotation * Math.PI) / 180) * _root.speed) / 2));
}
if (Key.isDown(65)) {
_x = (_x + ((Math.cos(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
} else if (Key.isDown(68)) {
_x = (_x + ((Math.cos(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
}
if (_x > 750) {
_x = -100;
}
if (_x < -100) {
_x = 750;
}
if (_y < -100) {
_y = 600;
}
if (_y > 600) {
_y = -100;
}
if (Key.isDown(49) && (_root.weapon[1])) {
_root.activeWeapon = 1;
} else if (Key.isDown(50) && (_root.weapon[2])) {
_root.activeWeapon = 2;
} else if (Key.isDown(51) && (_root.weapon[3])) {
_root.activeWeapon = 3;
} else if (Key.isDown(52) && (_root.weapon[4])) {
_root.activeWeapon = 4;
} else if (Key.isDown(53) && (_root.weapon[5])) {
_root.activeWeapon = 5;
}
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if (_root.health <= 0) {
_root.gamePaused = true;
_root.fade("over");
}
if (Key.isDown(32)) {
switch (_root.activeWeapon) {
case 1 :
if ((_root.ammo[1] >= 1) && (cooldown <= 0)) {
_root.ammo[1] = _root.ammo[1] - 1;
if (_root.sound) {
pistolSound = new Sound();
pistolSound.attachSound("pistol");
pistolSound.start();
}
cooldown = 22 - (_root.upgrade[1] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w1u" + _root.upgrade[1]);
_root[newName].knockBack = Math.random() * 1;
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 110);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 110);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 3;
break;
case 2 :
_root.boss.health = _root.boss.health - 4.5;
break;
case 3 :
_root.boss.health = _root.boss.health - 9;
}
this.removeMovieClip();
}
};
}
break;
case 2 :
if ((_root.ammo[2] >= 1) && (cooldown <= 0)) {
_root.ammo[2] = _root.ammo[2] - 1;
if (_root.sound) {
shotgunSound = new Sound();
shotgunSound.attachSound("shotgun");
shotgunSound.start();
}
cooldown = 42 - (_root.upgrade[2] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w2u" + _root.upgrade[2]);
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 175);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 175);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 12;
break;
case 2 :
_root.boss.health = _root.boss.health - 18;
break;
case 3 :
_root.boss.health = _root.boss.health - 36;
}
this.removeMovieClip();
}
};
}
break;
case 3 :
if ((_root.ammo[3] >= 1) && (cooldown <= 0)) {
_root.ammo[3] = _root.ammo[3] - 1;
if (_root.sound) {
if (!playingMachineGunSound) {
machineGunSound = new Sound();
machineGunSound.attachSound("machineGun");
machineGunSound.start();
playingMachineGunSound = true;
}
machineGunSound.onSoundComplete = function () {
playingMachineGunSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w3u" + _root.upgrade[3]);
_root[newName].randomMod = Math.random() * 2;
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = (_x + (Math.cos((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._y = (_y + (Math.sin((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 20;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 20;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 2;
break;
case 2 :
_root.boss.health = _root.boss.health - 3;
break;
case 3 :
_root.boss.health = _root.boss.health - 6;
}
this.removeMovieClip();
}
};
}
break;
case 4 :
if ((_root.ammo[4] >= 1) && (cooldown <= 0)) {
_root.ammo[4] = _root.ammo[4] - 1;
if (_root.sound) {
if (!playingFlamethrowerSound) {
flamethrowerSound = new Sound();
flamethrowerSound.attachSound("flamethrower");
flamethrowerSound.start();
playingFlamethrowerSound = true;
}
flamethrowerSound.onSoundComplete = function () {
playingFlamethrowerSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w4u" + _root.upgrade[4]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 120);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 120);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 12;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 12;
_root[newName]._rotation = Math.random() * 360;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._rotation = Math.random() * 360;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 3;
break;
case 2 :
_root.boss.health = _root.boss.health - 4.5;
break;
case 3 :
_root.boss.health = _root.boss.health - 9;
}
this.removeMovieClip();
}
};
}
break;
case 5 :
if (!((_root.ammo[5] >= 1) && (cooldown <= 0))) {
break;
}
_root.ammo[5] = _root.ammo[5] - 1;
if (_root.sound) {
rocketLauncherSound = new Sound();
rocketLauncherSound.attachSound("rocketLauncher");
rocketLauncherSound.start();
}
cooldown = 72 - (_root.upgrade[5] * 3);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName].gotoAndStop("w5u" + _root.upgrade[5]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 137);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 137);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName].xMod = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].yMod = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed + this.xMod;
this.ySpeed = this.ySpeed + this.yMod;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
e++;
_root.attachMovie("explosion", "explosion" + e, _root.getNextHighestDepth());
_root["explosion" + e]._x = this._x;
_root["explosion" + e]._y = this._y;
this.removeMovieClip();
if (_root.sound) {
rocketLauncherExplosionSound = new Sound();
rocketLauncherExplosionSound.attachSound("rocketLauncherExplosion");
rocketLauncherExplosionSound.start();
}
}
};
}
}
cooldown--;
}
}
Instance of Symbol 214 MovieClip in Frame 5
onClipEvent (enterFrame) {
_x = _root.boss._x;
_y = (_root.boss._y - 50);
_alpha = _root.boss._alpha;
bar._xscale = bar._xscale - ((bar._xscale - ((_root.boss.health / _root.boss.maxHealth) * 100)) / 10);
if (bar._xscale < 0) {
bar._xscale = 0;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 273 MovieClip in Frame 5
onClipEvent (load) {
if (((((_root.level == 5) || (_root.level == 10)) || (_root.level == 15)) || (_root.level == 20)) || (_root.level == 25)) {
gotoAndStop("l" + _root.level);
} else {
stop();
}
display = _root.level;
timer = 0;
_root.gamePaused = true;
pauseFix = true;
}
onClipEvent (enterFrame) {
timer++;
if (timer > 30) {
_alpha = (_alpha - 5);
}
if ((_alpha < 100) && (pauseFix)) {
_root.gamePaused = false;
pauseFix = false;
}
}
Instance of Symbol 280 MovieClip "boss" in Frame 6
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
cooldown = 0;
damage = 14;
speed = 1.5;
health = 500;
oldhealth = health;
maxHealth = 500;
advanceFix = true;
timer = 0;
a = 0;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
stop();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer++;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop (2);
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
cooldown--;
if (health != oldhealth) {
_x = rand(_width / 2, 650 - (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
ring++;
a++;
if (_root.sound) {
sound = new Sound();
sound.attachSound("thing");
sound.start();
}
_root.attachMovie("redRing", "ring" + a, _root.getNextHighestDepth());
_root["ring" + a]._x = _x;
_root["ring" + a]._y = _y;
_root["ring" + a].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
this._alpha = this._alpha - 5;
if (this.hitTest(_root.guy.hit)) {
_root.health = _root.health - 2;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
oldhealth = health;
}
if (health <= 0) {
_alpha = (_alpha - 5);
_xscale = (_xscale + 10);
_yscale = (_yscale + 10);
_rotation = (_rotation + 20);
_root.gamePaused = true;
if ((_alpha <= 0) && (advanceFix)) {
_root.level++;
_root.money = _root.money + 160;
_root.fade("end");
advanceFix = false;
}
}
}
Instance of Symbol 214 MovieClip in Frame 6
onClipEvent (enterFrame) {
_x = _root.boss._x;
_y = (_root.boss._y - 10);
_alpha = _root.boss._alpha;
bar._xscale = bar._xscale - ((bar._xscale - ((_root.boss.health / _root.boss.maxHealth) * 100)) / 10);
if (bar._xscale < 0) {
bar._xscale = 0;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 283 MovieClip "boss" in Frame 7
onClipEvent (load) {
cooldown = 0;
damage = 16;
speed = 2;
health = 1400;
maxHealth = 1400;
advanceFix = true;
timer = 0;
timer2 = 0;
a = 0;
b = 0;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
stop();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer++;
if (timer >= 90) {
ring++;
timer = 0;
if (_root.sound) {
sound = new Sound();
sound.attachSound("nova");
sound.start();
}
_root.attachMovie("darkRing", "ring" + a, _root.getNextHighestDepth());
_root["ring" + a]._x = _x;
_root["ring" + a]._y = _y;
_root["ring" + a].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 27;
this._yscale = this._yscale + 27;
this._alpha = this._alpha - 5;
if (this.hitTest(_root.guy.hit)) {
_root.health = _root.health - 3;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
timer2++;
if (timer2 >= 150) {
ring2++;
timer2 = 0;
b++;
if (_root.sound) {
sound = new Sound();
sound.attachSound("demiSound");
sound.start();
}
_root.attachMovie("demi", "demi" + b, _root.getNextHighestDepth());
_root["demi" + b]._x = _root.guy._x;
_root["demi" + b]._y = _root.guy._y;
_root.health = _root.health * 0.75;
_root["demi" + b].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 12;
this._yscale = this._yscale + 12;
this._x = _root.guy._x;
this._y = _root.guy._y;
this._alpha = this._alpha - 3;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop (2);
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
cooldown--;
}
if (health <= 0) {
_alpha = (_alpha - 5);
_xscale = (_xscale + 10);
_yscale = (_yscale + 10);
_rotation = (_rotation + _alpha);
_root.gamePaused = true;
if ((_alpha <= 0) && (advanceFix)) {
_root.level++;
_root.money = _root.money + 320;
_root.fade("end");
advanceFix = false;
}
}
}
Instance of Symbol 211 MovieClip "guy" in Frame 8
onClipEvent (load) {
_rotation = -90;
i = 0;
cooldown = 0;
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
e = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(80) && (!_root.gamePaused)) {
_root.gamePaused = true;
_root.pauseScreen._visible = true;
_root.pauseScreen.swapDepths(_root.getNextHighestDepth());
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
}
if (_root.armor < 1) {
clothes.gotoAndStop(1);
} else if (_root.armor < 3) {
clothes.gotoAndStop(2);
} else if (_root.armor < 5) {
clothes.gotoAndStop(3);
} else {
clothes.gotoAndStop(4);
}
if (!_root.gamePaused) {
if (Key.isDown(27)) {
_root.fade("menu");
}
if (Key.isDown(37)) {
_rotation = (_rotation - _root.speed);
} else if (Key.isDown(39)) {
_rotation = (_rotation + _root.speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * _root.speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * _root.speed));
} else if (Key.isDown(40) || (Key.isDown(83))) {
_x = (_x - ((Math.cos((_rotation * Math.PI) / 180) * _root.speed) / 2));
_y = (_y - ((Math.sin((_rotation * Math.PI) / 180) * _root.speed) / 2));
}
if (Key.isDown(65)) {
_x = (_x + ((Math.cos(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
} else if (Key.isDown(68)) {
_x = (_x + ((Math.cos(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
}
if (_x > 750) {
_x = -100;
}
if (_x < -100) {
_x = 750;
}
if (_y < -100) {
_y = 600;
}
if (_y > 600) {
_y = -100;
}
if (Key.isDown(49) && (_root.weapon[1])) {
_root.activeWeapon = 1;
} else if (Key.isDown(50) && (_root.weapon[2])) {
_root.activeWeapon = 2;
} else if (Key.isDown(51) && (_root.weapon[3])) {
_root.activeWeapon = 3;
} else if (Key.isDown(52) && (_root.weapon[4])) {
_root.activeWeapon = 4;
} else if (Key.isDown(53) && (_root.weapon[5])) {
_root.activeWeapon = 5;
}
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if (_root.health <= 0) {
_root.gamePaused = true;
_root.fade("over");
}
if (Key.isDown(32)) {
switch (_root.activeWeapon) {
case 1 :
if ((_root.ammo[1] >= 1) && (cooldown <= 0)) {
_root.ammo[1] = _root.ammo[1] - 1;
if (_root.sound) {
pistolSound = new Sound();
pistolSound.attachSound("pistol");
pistolSound.start();
}
cooldown = 22 - (_root.upgrade[1] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w1u" + _root.upgrade[1]);
_root[newName].knockBack = Math.random() * 1;
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 110);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 110);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 3;
break;
case 2 :
_root.boss.health = _root.boss.health - 4.5;
break;
case 3 :
_root.boss.health = _root.boss.health - 9;
}
this.removeMovieClip();
}
};
}
break;
case 2 :
if ((_root.ammo[2] >= 1) && (cooldown <= 0)) {
_root.ammo[2] = _root.ammo[2] - 1;
if (_root.sound) {
shotgunSound = new Sound();
shotgunSound.attachSound("shotgun");
shotgunSound.start();
}
cooldown = 42 - (_root.upgrade[2] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w2u" + _root.upgrade[2]);
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 175);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 175);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 12;
break;
case 2 :
_root.boss.health = _root.boss.health - 18;
break;
case 3 :
_root.boss.health = _root.boss.health - 36;
}
this.removeMovieClip();
}
};
}
break;
case 3 :
if ((_root.ammo[3] >= 1) && (cooldown <= 0)) {
_root.ammo[3] = _root.ammo[3] - 1;
if (_root.sound) {
if (!playingMachineGunSound) {
machineGunSound = new Sound();
machineGunSound.attachSound("machineGun");
machineGunSound.start();
playingMachineGunSound = true;
}
machineGunSound.onSoundComplete = function () {
playingMachineGunSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w3u" + _root.upgrade[3]);
_root[newName].randomMod = Math.random() * 2;
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = (_x + (Math.cos((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._y = (_y + (Math.sin((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 20;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 20;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 2;
break;
case 2 :
_root.boss.health = _root.boss.health - 3;
break;
case 3 :
_root.boss.health = _root.boss.health - 6;
}
this.removeMovieClip();
}
};
}
break;
case 4 :
if ((_root.ammo[4] >= 1) && (cooldown <= 0)) {
_root.ammo[4] = _root.ammo[4] - 1;
if (_root.sound) {
if (!playingFlamethrowerSound) {
flamethrowerSound = new Sound();
flamethrowerSound.attachSound("flamethrower");
flamethrowerSound.start();
playingFlamethrowerSound = true;
}
flamethrowerSound.onSoundComplete = function () {
playingFlamethrowerSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w4u" + _root.upgrade[4]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 120);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 120);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 12;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 12;
_root[newName]._rotation = Math.random() * 360;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._rotation = Math.random() * 360;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root.boss.health = _root.boss.health - 1.5;
break;
case 2 :
_root.boss.health = _root.boss.health - 2.25;
break;
case 3 :
_root.boss.health = _root.boss.health - 4.5;
}
this.removeMovieClip();
}
};
}
break;
case 5 :
if (!((_root.ammo[5] >= 1) && (cooldown <= 0))) {
break;
}
_root.ammo[5] = _root.ammo[5] - 1;
if (_root.sound) {
rocketLauncherSound = new Sound();
rocketLauncherSound.attachSound("rocketLauncher");
rocketLauncherSound.start();
}
cooldown = 72 - (_root.upgrade[5] * 3);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName].gotoAndStop("w5u" + _root.upgrade[5]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 137);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 137);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName].xMod = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].yMod = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed + this.xMod;
this.ySpeed = this.ySpeed + this.yMod;
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
if (this.hitTest(_root.boss.hit)) {
e++;
_root.attachMovie("explosion", "explosion" + e, _root.getNextHighestDepth());
_root["explosion" + e]._x = this._x;
_root["explosion" + e]._y = this._y;
this.removeMovieClip();
if (_root.sound) {
rocketLauncherExplosionSound = new Sound();
rocketLauncherExplosionSound.attachSound("rocketLauncherExplosion");
rocketLauncherExplosionSound.start();
}
}
};
}
}
cooldown--;
}
}
Instance of Symbol 287 MovieClip "boss" in Frame 8
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
cooldown = 0;
damage = 24;
speed = 1;
health = 1800;
maxHealth = 1800;
advanceFix = true;
timer = 0;
timer2 = 0;
timer3 = 0;
a = 0;
f = 0;
g = 0;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
stop();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer3++;
if (timer3 >= 180) {
g++;
timer3 = 0;
newName = "bFireball" + g;
if (_root.sound) {
sound = new Sound();
sound.attachSound("fireball");
sound.start();
}
_root.attachMovie("blueFireball", newName, _root.getNextHighestDepth());
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 175);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 175);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 10;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 10;
_root[newName]._rotation = _rotation;
_root[newName]._alpha = 0;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._alpha = this._alpha + 20;
if (this.hitTest(_root.guy.hit)) {
this.removeMovieClip();
_root.health = _root.health - 10;
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
};
}
timer2++;
if (timer2 >= 60) {
f++;
timer2 = 0;
_root.attachMovie("orangeFireball", "oFireball" + f, _root.getNextHighestDepth());
_root["oFireball" + f].side = rand(1, 4);
_root["oFireball" + f]._alpha = 0;
switch (_root["oFireball" + f].side) {
case 1 :
_root["oFireball" + f]._y = rand(10, 490);
_root["oFireball" + f]._x = -30;
_root["oFireball" + f]._rotation = 0;
break;
case 2 :
_root["oFireball" + f]._y = rand(10, 490);
_root["oFireball" + f]._x = 680;
_root["oFireball" + f]._rotation = 180;
break;
case 3 :
_root["oFireball" + f]._y = -30;
_root["oFireball" + f]._x = rand(10, 640);
_root["oFireball" + f]._rotation = 90;
break;
case 4 :
_root["oFireball" + f]._y = 530;
_root["oFireball" + f]._x = rand(10, 640);
_root["oFireball" + f]._rotation = -90;
}
_root["oFireball" + f].onEnterFrame = function () {
if (!_root.gamePaused) {
this.play();
switch (this.side) {
case 1 :
this._x = this._x + 4;
break;
case 2 :
this._x = this._x - 4;
break;
case 3 :
this._y = this._y + 4;
break;
case 4 :
this._y = this._y - 4;
}
this._alpha = this._alpha + 5;
if (this.hitTest(_root.guy.hit)) {
this.removeMovieClip();
_root.health = _root.health - 10;
}
if ((((this._x > 690) || (this._x < -30)) || (this._y > 530)) || (this._y < -30)) {
this.removeMovieClip();
}
} else {
this.stop();
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
_visible = false;
this.removeMovieClip();
}
};
}
timer++;
if (timer < 300) {
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop (2);
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
cooldown--;
} else if (timer < 450) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * (speed * 10)));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * (speed * 10)));
if (attackHit.hitTest(_root.guy) && (cooldown2 <= 0)) {
_root.health = _root.health - 18;
cooldown2 = 15;
}
cooldown2--;
if ((((_x > 650) || (_x < 0)) || (_y < 0)) || (_y > 500)) {
timer = 0;
}
} else {
timer = 0;
}
}
if (health <= 0) {
_alpha = (_alpha - 5);
_xscale = (_xscale + 7);
_yscale = (_yscale + 7);
_rotation = rand(0, 360);
_root.gamePaused = true;
if ((_alpha <= 0) && (advanceFix)) {
_root.level++;
_root.money = _root.money + 460;
_root.fade("end");
advanceFix = false;
}
}
}
Instance of Symbol 290 MovieClip "boss" in Frame 9
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
cooldown = 0;
damage = 26;
speed = 1.5;
health = 3000;
maxHealth = 3000;
advanceFix = true;
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
timer = 0;
a = 0;
timer2 = 0;
b = 0;
stop();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer2++;
if (timer2 >= 30) {
timer2 = 0;
b++;
if (_root.sound) {
sound = new Sound();
sound.attachSound("fireball");
sound.start();
}
_root.attachMovie("blackRing", "bRing" + b, _root.getNextHighestDepth());
_root["bRing" + b]._x = rand(0, 650);
_root["bRing" + b]._y = rand(0, 500);
_root["bRing" + b].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.removeMovieClip();
}
if (this.hitTest(_root.guy.hit)) {
_root.health = _root.health - 1;
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
timer++;
if (timer >= 243) {
timer = 0;
} else if (timer >= 240) {
_x = rand(_width / 2, 650 - (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
a++;
if (_root.sound) {
sound = new Sound();
sound.attachSound("thing");
sound.start();
}
_root.attachMovie("greenRing", "gRing" + a, _root.getNextHighestDepth());
_root["gRing" + a]._x = _x;
_root["gRing" + a]._y = _y;
_root["gRing" + a].onEnterFrame = function () {
if (!_root.gamePaused) {
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
this._alpha = this._alpha - 5;
if (this.hitTest(_root.guy.hit)) {
_root.health = _root.health - 2;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
this._visible = false;
this.removeMovieClip();
}
};
}
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop (2);
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
cooldown--;
}
if (health <= 0) {
_alpha = (_alpha - 1);
_xscale = (_xscale + 5);
_yscale = (_yscale + 5);
_rotation = (_rotation + (100 - _alpha));
_root.gamePaused = true;
if ((_alpha <= 0) && (advanceFix)) {
_root.level++;
_root.money = _root.money + 85;
_root.fade("clear");
advanceFix = false;
}
}
}
Frame 10
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
if ((((level == 6) || (level == 11)) || (level == 16)) || (level == 21)) {
switch (level) {
case 6 :
stage.gotoAndStop(1);
messageContent = "You have fought the zombies past your front yard, into the depths of the dry and barren street that you chose to live in.";
break;
case 11 :
stage.gotoAndStop(2);
messageContent = "Fighting your way through the herds of zombies, you travel down the long road to the council chamber.";
if (unlockSo.data.survivalUnlocks < 2) {
unlockSo.data.survivalUnlocks = unlockSo.data.survivalUnlocks + 1;
unlockDisplay = "Unlocked Remington 870 for Survival Mode";
}
break;
case 16 :
stage.gotoAndStop(3);
messageContent = "Entering the council chambers is not as easy as you thought. It appears as if the zombies are coming from within the dark chambers.";
if (unlockSo.data.survivalUnlocks < 3) {
unlockDisplay = "Unlocked Beretta M12 for Survival Mode";
unlockSo.data.survivalUnlocks = unlockSo.data.survivalUnlocks + 1;
}
break;
case 21 :
stage.gotoAndStop(4);
messageContent = "After a long and fearful journey, smashing zombie after zombie, you find yourself, at last, at the mayor's office...";
if (unlockSo.data.survivalUnlocks >= 4) {
break;
}
unlockDisplay = "Unlocked M281-7 for Survival Mode";
unlockSo.data.survivalUnlocks = unlockSo.data.survivalUnlocks + 1;
}
} else {
gotoAndStop ("shop");
}
Frame 11
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
Instance of Symbol 313 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.weapon[1]) {
_visible = true;
display = "Lvl. " + _root.upgrade[1];
} else {
_visible = false;
}
if (_root.upgrade[1] == 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.displayText = (("Browning HP<br />Level: " + _root.upgrade[1]) + "<br />Ammo: ") + _root.ammo[1];
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 317 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.weapon[3]) {
_visible = true;
display = "Lvl. " + _root.upgrade[3];
} else {
_visible = false;
}
if (_root.upgrade[3] == 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.displayText = (("Beretta M12<br />Level: " + _root.upgrade[3]) + "<br />Ammo: ") + _root.ammo[3];
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 321 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.weapon[2]) {
_visible = true;
display = "Lvl. " + _root.upgrade[2];
} else {
_visible = false;
}
if (_root.upgrade[2] == 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.displayText = (("Remington 870<br />Level: " + _root.upgrade[2]) + "<br />Ammo: ") + _root.ammo[2];
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 325 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.weapon[4]) {
_visible = true;
display = "Lvl. " + _root.upgrade[4];
} else {
_visible = false;
}
if (_root.upgrade[4] == 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.displayText = (("M2A1-7<br />Level: " + _root.upgrade[4]) + "<br />Ammo: ") + _root.ammo[4];
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 329 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (_root.weapon[5]) {
_visible = true;
display = "Lvl. " + _root.upgrade[5];
} else {
_visible = false;
}
if (_root.upgrade[5] == 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.displayText = (("FIM-92 Stinger<br />Level: " + _root.upgrade[5]) + "<br />Ammo: ") + _root.ammo[5];
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 334 MovieClip in Frame 11
onClipEvent (enterFrame) {
display = ((("Armor: " + _root.armor) + "<br />Health: ") + Math.floor(_root.health)) + "/100";
}
Instance of Symbol 336 MovieClip in Frame 11
onClipEvent (load) {
weapon = 2;
stop();
}
onClipEvent (enterFrame) {
cost = 45 + (15 * _root.upgrade[weapon]);
if (((_root.money >= cost) && (_root.upgrade[weapon] < 3)) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade to Lvl. " + (_root.upgrade[weapon] + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.upgrade[weapon]++;
_root.money = _root.money - cost;
}
Instance of Symbol 338 MovieClip in Frame 11
onClipEvent (load) {
weapon = 2;
stop();
}
onClipEvent (enterFrame) {
increase = 12;
cost = 9;
if ((_root.money >= cost) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Purchase " + increase) + " ammo for this gun<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.ammo[weapon] = _root.ammo[weapon] + increase;
_root.money = _root.money - cost;
}
Instance of Symbol 340 MovieClip in Frame 11
onClipEvent (load) {
weapon = 2;
stop();
}
onClipEvent (enterFrame) {
cost = 50;
if ((_root.money >= cost) && (!_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = "Purchase this weapon<br />$" + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.weapon[weapon] = true;
_root.money = _root.money - cost;
}
Instance of Symbol 336 MovieClip in Frame 11
onClipEvent (load) {
weapon = 1;
stop();
}
onClipEvent (enterFrame) {
cost = 30 + (10 * _root.upgrade[weapon]);
if (((_root.money >= cost) && (_root.upgrade[weapon] < 3)) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade to Lvl. " + (_root.upgrade[weapon] + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.upgrade[weapon]++;
_root.money = _root.money - cost;
}
Instance of Symbol 338 MovieClip in Frame 11
onClipEvent (load) {
weapon = 1;
stop();
}
onClipEvent (enterFrame) {
increase = 15;
cost = 4;
if ((_root.money >= cost) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Purchase " + increase) + " ammo for this gun<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.ammo[weapon] = _root.ammo[weapon] + increase;
_root.money = _root.money - cost;
}
Instance of Symbol 344 MovieClip in Frame 11
onClipEvent (load) {
_root.money = Math.ceil(_root.money);
}
onClipEvent (enterFrame) {
moneyDisplay = _root.money;
}
Instance of Symbol 336 MovieClip in Frame 11
onClipEvent (load) {
weapon = 3;
stop();
}
onClipEvent (enterFrame) {
cost = 60 + (20 * _root.upgrade[weapon]);
if (((_root.money >= cost) && (_root.upgrade[weapon] < 3)) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade to Lvl. " + (_root.upgrade[weapon] + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.upgrade[weapon]++;
_root.money = _root.money - cost;
}
Instance of Symbol 338 MovieClip in Frame 11
onClipEvent (load) {
weapon = 3;
stop();
}
onClipEvent (enterFrame) {
increase = 84;
cost = 12;
if ((_root.money >= cost) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Purchase " + increase) + " ammo for this gun<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.ammo[weapon] = _root.ammo[weapon] + increase;
_root.money = _root.money - cost;
}
Instance of Symbol 340 MovieClip in Frame 11
onClipEvent (load) {
weapon = 3;
stop();
}
onClipEvent (enterFrame) {
cost = 70;
if ((_root.money >= cost) && (!_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = "Purchase this weapon<br />$" + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.weapon[weapon] = true;
_root.money = _root.money - cost;
}
Instance of Symbol 336 MovieClip in Frame 11
onClipEvent (load) {
weapon = 4;
stop();
}
onClipEvent (enterFrame) {
cost = 85 + (30 * _root.upgrade[weapon]);
if (((_root.money >= cost) && (_root.upgrade[weapon] < 3)) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade to Lvl. " + (_root.upgrade[weapon] + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.upgrade[weapon]++;
_root.money = _root.money - cost;
}
Instance of Symbol 338 MovieClip in Frame 11
onClipEvent (load) {
weapon = 4;
stop();
}
onClipEvent (enterFrame) {
increase = 42;
cost = 12;
if ((_root.money >= cost) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Purchase " + increase) + " ammo for this gun<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.ammo[weapon] = _root.ammo[weapon] + increase;
_root.money = _root.money - cost;
}
Instance of Symbol 340 MovieClip in Frame 11
onClipEvent (load) {
weapon = 4;
stop();
}
onClipEvent (enterFrame) {
cost = 90;
if ((_root.money >= cost) && (!_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = "Purchase this weapon<br />$" + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.weapon[weapon] = true;
_root.money = _root.money - cost;
}
Instance of Symbol 336 MovieClip in Frame 11
onClipEvent (load) {
weapon = 5;
stop();
}
onClipEvent (enterFrame) {
cost = 105 + (45 * _root.upgrade[weapon]);
if (((_root.money >= cost) && (_root.upgrade[weapon] < 3)) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade to Lvl. " + (_root.upgrade[weapon] + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.upgrade[weapon]++;
_root.money = _root.money - cost;
}
Instance of Symbol 338 MovieClip in Frame 11
onClipEvent (load) {
weapon = 5;
stop();
}
onClipEvent (enterFrame) {
increase = 2;
cost = 24;
if ((_root.money >= cost) && (_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Purchase " + increase) + " ammo for this gun<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.ammo[weapon] = _root.ammo[weapon] + increase;
_root.money = _root.money - cost;
}
Instance of Symbol 340 MovieClip in Frame 11
onClipEvent (load) {
weapon = 5;
stop();
}
onClipEvent (enterFrame) {
cost = 130;
if ((_root.money >= cost) && (!_root.weapon[weapon])) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = "Purchase this weapon<br />$" + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.weapon[weapon] = true;
_root.money = _root.money - cost;
}
Instance of Symbol 347 MovieClip in Frame 11
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
cost = 20;
if (((_root.money >= cost) && (_root.armor < 100)) && (_root.health < 100)) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = "Heal 10 points of your health<br />$" + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.health = _root.health + 10;
if (_root.health > 100) {
_root.health = 100;
}
_root.money = _root.money - cost;
}
Instance of Symbol 351 MovieClip in Frame 11
onClipEvent (load) {
stop();
}
onClipEvent (enterFrame) {
cost = 30 + (5 * _root.armor);
if ((_root.money >= cost) && (_root.armor < 6)) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.displayText = (("Upgrade armor to level " + (_root.armor + 1)) + "<br />$") + cost;
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.displayText = "";
}
on (release) {
_root.armor++;
_root.money = _root.money - cost;
}
Instance of Symbol 313 MovieClip in Frame 11
onClipEvent (enterFrame) {
if ((_root.upgrade[1] + 1) >= 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
display = "";
}
on (rollOver) {
if ((_root.upgrade[1] + 1) <= 3) {
_root.mouse.displayText = "Browning HP<br />Pistol<br />Next Upgrade: $" + (30 + (10 * (_root.upgrade[1] + 1)));
} else {
_root.mouse.displayText = "Browning HP<br />Pistol";
}
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 321 MovieClip in Frame 11
onClipEvent (enterFrame) {
if ((_root.upgrade[2] + 1) >= 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
display = "";
}
on (rollOver) {
if (_root.weapon[2]) {
if ((_root.upgrade[2] + 1) <= 3) {
_root.mouse.displayText = "Remington 870<br />Shotgun<br />Next Upgrade: $" + (45 + (15 * (_root.upgrade[2] + 1)));
} else {
_root.mouse.displayText = "Remington 870<br />Shotgun";
}
} else {
_root.mouse.displayText = "Remington 870<br />Shotgun<br />$50";
}
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 317 MovieClip in Frame 11
onClipEvent (enterFrame) {
if ((_root.upgrade[3] + 1) >= 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
display = "";
}
on (rollOver) {
if (_root.weapon[3]) {
if ((_root.upgrade[3] + 1) <= 3) {
_root.mouse.displayText = "Beretta M12<br />Machine Gun<br />Next Upgrade: $" + (60 + (20 * (_root.upgrade[3] + 1)));
} else {
_root.mouse.displayText = "Beretta M12<br />Machine Gun";
}
} else {
_root.mouse.displayText = "Beretta M12<br />Machine Gun<br />$70";
}
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 325 MovieClip in Frame 11
onClipEvent (enterFrame) {
if ((_root.upgrade[4] + 1) >= 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
display = "";
}
on (rollOver) {
if (_root.weapon[4]) {
if ((_root.upgrade[4] + 1) <= 3) {
_root.mouse.displayText = "M281-7<br />Flamethrower<br />Next Upgrade: $" + (85 + (30 * (_root.upgrade[4] + 1)));
} else {
_root.mouse.displayText = "M281-7<br />Flamethrower";
}
} else {
_root.mouse.displayText = "M281-7<br />Flamethrower<br />$90";
}
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 329 MovieClip in Frame 11
onClipEvent (enterFrame) {
if ((_root.upgrade[5] + 1) >= 3) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
display = "";
}
on (rollOver) {
if (_root.weapon[5]) {
if ((_root.upgrade[5] + 1) <= 3) {
_root.mouse.displayText = "FIM-92 Stinger<br />Rocket Launcher<br />Next Upgrade: $" + (105 + (45 * (_root.upgrade[5] + 1)));
} else {
_root.mouse.displayText = "FIM-92 Stinger<br />Rocket Launcher";
}
} else {
_root.mouse.displayText = "FIM-92 Stinger<br />Rocket Launcher<br />$130";
}
}
on (rollOut) {
_root.mouse.displayText = "";
}
Instance of Symbol 354 MovieClip in Frame 11
onClipEvent (load) {
stop();
saved = false;
}
onClipEvent (enterFrame) {
cost = 20 + (_root.saves * 5);
if ((_root.money >= cost) && (!saved)) {
_visible = true;
} else {
_visible = false;
}
}
on (rollOver) {
_root.mouse.displayText = "Save your game progress<br />$" + cost;
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.displayText = "";
gotoAndStop (1);
}
on (release) {
saved = true;
_root.saves++;
_root.money = _root.money - cost;
_root.gameSaveSo.data.level = _root.level;
_root.gameSaveSo.data.upgrade = new Object();
_root.gameSaveSo.data.upgrade[1] = _root.upgrade[1];
_root.gameSaveSo.data.upgrade[2] = _root.upgrade[2];
_root.gameSaveSo.data.upgrade[3] = _root.upgrade[3];
_root.gameSaveSo.data.upgrade[4] = _root.upgrade[4];
_root.gameSaveSo.data.upgrade[5] = _root.upgrade[5];
_root.gameSaveSo.data.weapon = new Object();
_root.gameSaveSo.data.weapon[1] = _root.weapon[1];
_root.gameSaveSo.data.weapon[2] = _root.weapon[2];
_root.gameSaveSo.data.weapon[3] = _root.weapon[3];
_root.gameSaveSo.data.weapon[4] = _root.weapon[4];
_root.gameSaveSo.data.weapon[5] = _root.weapon[5];
_root.gameSaveSo.data.ammo = new Object();
_root.gameSaveSo.data.ammo[1] = _root.ammo[1];
_root.gameSaveSo.data.ammo[2] = _root.ammo[2];
_root.gameSaveSo.data.ammo[3] = _root.ammo[3];
_root.gameSaveSo.data.ammo[4] = _root.ammo[4];
_root.gameSaveSo.data.ammo[5] = _root.ammo[5];
_root.gameSaveSo.data.activeWeapon = _root.activeWeapon;
_root.gameSaveSo.data.health = _root.health;
_root.gameSaveSo.data.armor = _root.armor;
_root.gameSaveSo.data.speed = _root.speed;
_root.gameSaveSo.data.money = _root.money;
_root.gameSaveSo.data.sound = _root.sound;
_root.gameSaveSo.data.saves = _root.saves;
_root.gameSaveSo.data.quality = _root._quality;
}
Instance of Symbol 181 MovieClip "mouse" in Frame 11
onClipEvent (load) {
_visible = false;
displayText = "";
}
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
if (displayText != "") {
_visible = true;
} else {
_visible = false;
}
}
Frame 12
unlockDisplay = "";
if (unlockSo.data.survivalUnlocks < 5) {
unlockDisplay = unlockDisplay + "Unlocked FIM-92 Stinger for Survival Mode";
unlockSo.data.survivalUnlocks = unlockSo.data.survivalUnlocks + 1;
}
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
Frame 13
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
Instance of Symbol 369 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.gameSaveSo.data.level) {
_alpha = 100;
} else {
_alpha = 50;
}
}
on (release) {
if (_root.gameSaveSo.data.level) {
_root.loadGame();
}
}
on (rollOver) {
if (_root.gameSaveSo.data.level) {
gotoAndStop (2);
}
}
on (rollOut) {
gotoAndStop (1);
}
onClipEvent (load) {
stop();
}
Frame 14
i = 2;
while (i <= maxEnemies) {
duplicateMovieClip (enemy1, "enemy" + i, _root.getNextHighestDepth());
duplicateMovieClip (enemyHealthBar1, "enemyHealthBar" + i, _root.getNextHighestDepth());
_root["enemyHealthBar" + i].mark = i;
i++;
}
enemyHealthBar1.mark = 1;
Instance of Symbol 211 MovieClip "guy" in Frame 14
onClipEvent (load) {
_rotation = -90;
i = 0;
cooldown = 0;
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
advanceFix = true;
e = 0;
enemyHealthTimer = 0;
enemyDamageTimer = 0;
maxEnemiesTimer = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(80) && (!_root.gamePaused)) {
_root.gamePaused = true;
_root.pauseScreen._visible = true;
_root.pauseScreen.swapDepths(_root.getNextHighestDepth());
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
}
if (_root.armor < 1) {
clothes.gotoAndStop(1);
} else if (_root.armor < 3) {
clothes.gotoAndStop(2);
} else if (_root.armor < 5) {
clothes.gotoAndStop(3);
} else {
clothes.gotoAndStop(4);
}
if (!_root.gamePaused) {
enemyHealthTimer++;
enemyDamageTimer++;
maxEnemiesTimer++;
if (enemyHealthTimer >= 300) {
_root.enemyHealth = _root.enemyHealth + 0.05;
enemyHealthTimer = 0;
}
if (enemyDamageTimer >= 300) {
_root.enemyDamage = _root.enemyDamage + 0.1;
enemyDamageTimer = 0;
}
if (maxEnemiesTimer >= 600) {
_root.maxEnemies++;
maxEnemiesTimer = 0;
duplicateMovieClip (_root.enemy1, "enemy" + _root.maxEnemies, _root.getNextHighestDepth());
duplicateMovieClip (_root.enemyHealthBar1, "enemyHealthBar" + _root.maxEnemies, _root.getNextHighestDepth());
_root["enemyHealthBar" + _root.maxEnemies].mark = _root.maxEnemies;
}
if (Key.isDown(27)) {
_root.fade("menu");
}
if (Key.isDown(37)) {
_rotation = (_rotation - _root.speed);
} else if (Key.isDown(39)) {
_rotation = (_rotation + _root.speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * _root.speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * _root.speed));
} else if (Key.isDown(40) || (Key.isDown(83))) {
_x = (_x - ((Math.cos((_rotation * Math.PI) / 180) * _root.speed) / 2));
_y = (_y - ((Math.sin((_rotation * Math.PI) / 180) * _root.speed) / 2));
}
if (Key.isDown(65)) {
_x = (_x + ((Math.cos(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation - 90) * Math.PI) / 180) * _root.speed) / 2));
} else if (Key.isDown(68)) {
_x = (_x + ((Math.cos(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
_y = (_y + ((Math.sin(((_rotation + 90) * Math.PI) / 180) * _root.speed) / 2));
}
if (_x > 750) {
_x = -100;
}
if (_x < -100) {
_x = 750;
}
if (_y < -100) {
_y = 600;
}
if (_y > 600) {
_y = -100;
}
if (Key.isDown(49) && (_root.weapon[1])) {
_root.activeWeapon = 1;
} else if (Key.isDown(50) && (_root.weapon[2])) {
_root.activeWeapon = 2;
} else if (Key.isDown(51) && (_root.weapon[3])) {
_root.activeWeapon = 3;
} else if (Key.isDown(52) && (_root.weapon[4])) {
_root.activeWeapon = 4;
} else if (Key.isDown(53) && (_root.weapon[5])) {
_root.activeWeapon = 5;
}
gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if (_root.health <= 0) {
_root.gamePaused = true;
_root.fade("survivalOver");
}
if (Key.isDown(32)) {
switch (_root.activeWeapon) {
case 1 :
if (cooldown <= 0) {
if (_root.sound) {
pistolSound = new Sound();
pistolSound.attachSound("pistol");
pistolSound.start();
}
cooldown = 22 - (_root.upgrade[1] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w1u" + _root.upgrade[1]);
_root[newName].knockBack = Math.random() * 1;
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 110);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 110);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 5.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (_root._currentframe != 14) {
this._visible = false;
this.removeMovieClip();
}
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 4.5;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 9;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 2 :
if (cooldown <= 0) {
if (_root.sound) {
shotgunSound = new Sound();
shotgunSound.attachSound("shotgun");
shotgunSound.start();
}
cooldown = 42 - (_root.upgrade[2] * 2);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w2u" + _root.upgrade[2]);
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 175);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 175);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 75;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 75;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if (_root._currentframe != 14) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 12;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 18;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 36;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 3 :
if (cooldown <= 0) {
cooldown = 0;
i++;
if (_root.sound) {
if (!playingMachineGunSound) {
machineGunSound = new Sound();
machineGunSound.attachSound("machineGun");
machineGunSound.start();
playingMachineGunSound = true;
}
machineGunSound.onSoundComplete = function () {
playingMachineGunSound = false;
};
}
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w3u" + _root.upgrade[3]);
_root[newName].randomMod = Math.random() * 2;
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName]._x = (_x + (Math.cos((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._y = (_y + (Math.sin((_rotation * Math.PI) / 180) * 110)) + _root[newName].randomMod;
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 20;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 20;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
}
if (_root._currentframe != 14) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 2;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 6;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 4 :
if (cooldown <= 0) {
if (_root.sound) {
if (!playingFlamethrowerSound) {
flamethrowerSound = new Sound();
flamethrowerSound.attachSound("flamethrower");
flamethrowerSound.start();
playingFlamethrowerSound = true;
}
flamethrowerSound.onSoundComplete = function () {
playingFlamethrowerSound = false;
};
}
cooldown = 0;
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].gotoAndStop("w4u" + _root.upgrade[4]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 120);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 120);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 12;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 12;
_root[newName]._rotation = Math.random() * 360;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._rotation = Math.random() * 360;
this._alpha = this._alpha - 5;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
if (_root._currentframe != 14) {
this._visible = false;
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
switch (_root.upgrade[_root.activeWeapon]) {
case 1 :
_root["enemy" + o].health = _root["enemy" + o].health - 3;
break;
case 2 :
_root["enemy" + o].health = _root["enemy" + o].health - 4.5;
break;
case 3 :
_root["enemy" + o].health = _root["enemy" + o].health - 9;
}
this.removeMovieClip();
}
o++;
}
};
}
break;
case 5 :
if (cooldown > 0) {
break;
}
if (_root.sound) {
rocketLauncherSound = new Sound();
rocketLauncherSound.attachSound("rocketLauncher");
rocketLauncherSound.start();
}
cooldown = 72 - (_root.upgrade[5] * 3);
i++;
newName = "bullet" + i;
_root.attachMovie("bullet", newName, _root.getNextHighestDepth());
_root[newName].knockBack = Math.random() * 5;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * _root[newName].knockBack));
_rotation = (_rotation + ((Math.random() * 2) - 1));
_root[newName].gotoAndStop("w5u" + _root.upgrade[5]);
_root[newName]._x = _x + (Math.cos((_rotation * Math.PI) / 180) * 137);
_root[newName]._y = _y + (Math.sin((_rotation * Math.PI) / 180) * 137);
_root[newName]._x = _root[newName]._x + (Math.cos(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName]._y = _root[newName]._y + (Math.sin(((_rotation - 90) * Math.PI) / 180) * 6.5);
_root[newName].xSpeed = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].ySpeed = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName].xMod = Math.cos((_rotation * Math.PI) / 180) * 1;
_root[newName].yMod = Math.sin((_rotation * Math.PI) / 180) * 1;
_root[newName]._rotation = _rotation;
_root[newName].onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed + this.xMod;
this.ySpeed = this.ySpeed + this.yMod;
}
if (_root._currentframe != 14) {
this._visible = false;
this.removeMovieClip();
}
if ((((this._x < -100) || (this._x > 750)) || (this._y < -100)) || (this._y > 600)) {
this.removeMovieClip();
}
o = 1;
while (o <= _root.maxEnemies) {
if (this.hitTest(_root["enemy" + o].hit)) {
e++;
_root.attachMovie("explosion", "explosion" + e, _root.getNextHighestDepth());
_root["explosion" + e]._x = this._x;
_root["explosion" + e]._y = this._y;
this.removeMovieClip();
if (_root.sound) {
rocketLauncherExplosionSound = new Sound();
rocketLauncherExplosionSound.attachSound("rocketLauncherExplosion");
rocketLauncherExplosionSound.start();
}
}
o++;
}
};
}
}
cooldown--;
}
}
Instance of Symbol 146 MovieClip "enemy1" in Frame 14
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
function reset() {
soundFix = false;
enemyChoose = rand(1, 100);
if (enemyChoose < 30) {
enemy = 1;
} else if (enemyChoose < 70) {
enemy = 2;
} else if (enemyChoose < 90) {
enemy = 3;
} else {
enemy = 4;
}
type = rand(1, 3);
gotoAndStop((("e" + enemy) + "t") + type);
entrySide = rand(1, 4);
switch (entrySide) {
case 1 :
_x = (-25 - (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
break;
case 2 :
_x = (675 + (_width / 2));
_y = rand(_height / 2, 500 - (_height / 2));
break;
case 3 :
_x = rand(_width / 2, 650 - (_width / 2));
_y = (-25 - (_height / 2));
break;
case 4 :
_x = rand(_width / 2, 650 - (_width / 2));
_y = (535 + (_height / 2));
}
switch (enemy) {
case 1 :
damage = _root.enemyDamage * 1;
speed = _root.enemySpeed * 2;
health = _root.enemyHealth * 1.25;
reward = _root.enemyReward * 1.25;
break;
case 2 :
damage = _root.enemyDamage * 1;
speed = _root.enemySpeed * 1.5;
health = _root.enemyHealth * 1.5;
reward = _root.enemyReward * 1;
break;
case 3 :
damage = _root.enemyDamage * 2;
speed = _root.enemySpeed * 1;
health = _root.enemyHealth * 3.5;
reward = _root.enemyReward * 1.5;
break;
case 4 :
damage = _root.enemyDamage * 3;
speed = _root.enemySpeed * 0.75;
health = _root.enemyHealth * 5;
reward = _root.enemyReward * 2;
}
timer = 0;
cooldown = 0;
newName = "ring" + _root.getNextHighestDepth();
_root.attachMovie("ring", newName, _root.getNextHighestDepth());
_root[newName]._x = _x;
_root[newName]._y = _y;
_alpha = 100;
maxHealth = health;
}
reset();
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
timer++;
cooldown--;
if (timer > 50) {
_rotation = ((Math.atan2(_root.guy._y - _y, _root.guy._x - _x) * 180) / Math.PI);
if (attackHit.hitTest(_root.guy.hit)) {
if (cooldown <= 0) {
cooldown = 15;
gotoAndStop(((("e" + enemy) + "t") + type) + "a");
if ((damage - (_root.armor * 1.5)) < 1) {
_root.health = _root.health - 1;
} else {
_root.health = _root.health - (damage - (_root.armor * 1.5));
}
} else {
gotoAndStop((("e" + enemy) + "t") + type);
}
} else {
gotoAndStop((("e" + enemy) + "t") + type);
_x = (_x + (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y + (Math.sin((_rotation * Math.PI) / 180) * speed));
}
}
if (health <= 0) {
timer = 0;
_alpha = (_alpha - 10);
if (!soundFix) {
dieSound = new Sound();
dieSound.attachSound("die" + enemy);
if (_root.sound) {
dieSound.start();
}
soundFix = true;
}
if (_alpha <= 0) {
reset();
_root.killCount++;
_root.money = _root.money + reward;
}
}
}
if (_root._currentframe != 14) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 214 MovieClip "enemyHealthBar1" in Frame 14
onClipEvent (enterFrame) {
_x = _root["enemy" + mark]._x;
_y = _root["enemy" + mark]._y;
_alpha = _root["enemy" + mark]._alpha;
bar._xscale = bar._xscale - ((bar._xscale - ((_root["enemy" + mark].health / _root["enemy" + mark].maxHealth) * 100)) / 10);
if (bar._xscale < 0) {
bar._xscale = 0;
}
if (_root._currentframe != 14) {
_visible = false;
this.removeMovieClip();
}
}
Instance of Symbol 233 MovieClip "pauseScreen" in Frame 14
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 264 MovieClip in Frame 14
onClipEvent (load) {
depthCooldown = 10;
healthBar._xscale = _root.health;
gotoAndStop (3);
}
onClipEvent (enterFrame) {
healthBar._xscale = healthBar._xscale - ((healthBar._xscale - _root.health) / 10);
weaponIcon.gotoAndStop((("w" + _root.activeWeapon) + "u") + _root.upgrade[_root.activeWeapon]);
if (healthBar._xscale < 0) {
healthBar._xscale = 0;
}
switch (_root.activeWeapon) {
case 1 :
weaponDisplay = "Browning HP";
break;
case 2 :
weaponDisplay = "Remington 870";
break;
case 3 :
weaponDisplay = "Beretta M12";
break;
case 4 :
weaponDisplay = "M2A1-7";
break;
case 5 :
weaponDisplay = "FIM-92 Stinger";
}
if (!_root.gamePaused) {
if (depthCooldown <= 0) {
depthCooldown = 10;
this.swapDepths(_root.getNextHighestDepth());
}
depthCooldown--;
}
if (_root._currentframe != 14) {
_visible = false;
}
}
Instance of Symbol 416 MovieClip in Frame 16
onClipEvent (enterFrame) {
if (Key.isDown(27)) {
_root.fade("menu");
}
}
Instance of Symbol 192 MovieClip in Frame 18
onClipEvent (load) {
gotoAndStop(Math.round((Math.random() * 4) + 1));
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
function rand(min, max) {
return(Math.round((Math.random() * (max - min)) + min));
}
gotoAndStop((("e" + rand(1, 3)) + "t") + rand(1, 3));
_x = rand(0, 650);
_y = rand(0, 500);
_rotation = rand(0, 360);
}
Instance of Symbol 220 MovieClip in Frame 18
onClipEvent (load) {
switch (_root._quality) {
case "LOW" :
quality = 0;
break;
case "MEDIUM" :
quality = 1;
break;
default :
quality = 2;
break;
case "BEST" :
quality = 3;
}
}
on (release) {
quality++;
}
onClipEvent (enterFrame) {
switch (quality) {
case 0 :
_root._quality = "LOW";
display = "Low";
break;
case 1 :
_root._quality = "MEDIUM";
display = "Medium";
break;
case 2 :
_root._quality = "HIGH";
display = "High";
break;
case 3 :
_root._quality = "BEST";
display = "Best";
}
if (quality > 3) {
quality = 0;
}
}
Instance of Symbol 220 MovieClip in Frame 18
on (release) {
_root.sound = !_root.sound;
}
onClipEvent (enterFrame) {
if (_root.sound) {
display = "On";
} else {
display = "Off";
}
}
Instance of Symbol 220 MovieClip in Frame 18
on (release) {
_root.music = !_root.music;
if (_root.music) {
_root.backgroundMusic.setVolume(100);
} else {
_root.backgroundMusic.setVolume(0);
}
}
onClipEvent (enterFrame) {
if (_root.music) {
display = "On";
} else {
display = "Off";
}
}
Frame 19
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
weapon = new Object();
switch (unlockSo.data.survivalUnlocks) {
case 1 :
weapon[1] = true;
weapon[2] = false;
weapon[3] = false;
weapon[4] = false;
weapon[5] = false;
break;
case 2 :
weapon[1] = true;
weapon[2] = true;
weapon[3] = false;
weapon[4] = false;
weapon[5] = false;
break;
case 3 :
weapon[1] = true;
weapon[2] = true;
weapon[3] = true;
weapon[4] = false;
weapon[5] = false;
break;
case 4 :
weapon[1] = true;
weapon[2] = true;
weapon[3] = true;
weapon[4] = true;
weapon[5] = false;
break;
case 5 :
weapon[1] = true;
weapon[2] = true;
weapon[3] = true;
weapon[4] = true;
weapon[5] = true;
}
upgrade = new Object();
upgrade[1] = 3;
upgrade[2] = 3;
upgrade[3] = 3;
upgrade[4] = 3;
upgrade[5] = 3;
activeWeapon = 1;
health = 100;
armor = 6;
speed = 10;
maxEnemies = 5;
enemyHealth = 48;
enemyDamage = 8;
enemySpeed = 0.75;
gamePaused = false;
killCount = 0;
Instance of Symbol 313 MovieClip in Frame 19
onClipEvent (load) {
gotoAndStop (2);
if (_root.unlockSo.data.survivalUnlocks >= 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 317 MovieClip in Frame 19
onClipEvent (load) {
gotoAndStop (2);
if (_root.unlockSo.data.survivalUnlocks >= 3) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 321 MovieClip in Frame 19
onClipEvent (load) {
gotoAndStop (2);
if (_root.unlockSo.data.survivalUnlocks >= 2) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 325 MovieClip in Frame 19
onClipEvent (load) {
gotoAndStop (2);
if (_root.unlockSo.data.survivalUnlocks >= 4) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 329 MovieClip in Frame 19
onClipEvent (load) {
gotoAndStop (2);
if (_root.unlockSo.data.survivalUnlocks >= 5) {
_visible = true;
} else {
_visible = false;
}
}
Frame 20
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
Symbol 28 MovieClip [explosion] Frame 1
onEnterFrame = function () {
_rotation = (Math.random() * 360);
_alpha = (_alpha - 5.26315789473684);
_xscale = (_xscale + 5);
_yscale = (_yscale + 5);
u = 1;
while (u <= _root.maxEnemies) {
if (hitTest(_root["enemy" + u].hit)) {
switch (_root.upgrade[5]) {
case 1 :
_root["enemy" + u].health = _root["enemy" + u].health - 3.78947368421053;
break;
case 2 :
_root["enemy" + u].health = _root["enemy" + u].health - 5.68421052631579;
break;
case 3 :
_root["enemy" + u].health = _root["enemy" + u].health - 11.3684210526316;
}
}
u++;
}
};
Symbol 28 MovieClip [explosion] Frame 19
this.removeMovieClip();
Symbol 49 MovieClip [ring] Frame 1
onEnterFrame = function () {
if ((_root._currentframe < 4) || (_root._currentframe > 9)) {
if (_root._currentframe != 14) {
_visible = false;
this.removeMovieClip();
}
}
if (_root.gamePaused) {
stop();
} else {
play();
}
};
Symbol 49 MovieClip [ring] Frame 55
this.removeMovieClip();
Symbol 66 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 82 MovieClip Frame 1
stop();
_visible = false;
onEnterFrame = function () {
if (_visible) {
this.swapDepths(_root.getNextHighestDepth());
}
};
Symbol 82 MovieClip Frame 2
_visible = true;
Symbol 82 MovieClip Frame 11
_root.gotoAndStop(frame);
Symbol 84 MovieClip Frame 1
stop();
Symbol 88 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 95 MovieClip Frame 81
_parent.play();
_parent.play();
Symbol 122 MovieClip Frame 1
_visible = false;
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 86
_root.createEmptyMovieClip("musicContainer", _root.getNextHighestDepth());
_root.backgroundMusic = new Sound(_root.musicContainer);
_root.backgroundMusic.attachSound("music1");
_root.prevMusic = 1;
_root.backgroundMusic.start();
_root.backgroundMusic.onSoundComplete = function () {
_root.songNumber = Math.round((Math.random() * 4) + 1);
while (_root.songNumber == _root.prevMusic) {
_root.songNumber = Math.round((Math.random() * 4) + 1);
}
if (_root.songNumber != _root.prevMusic) {
_root.prevMusic = _root.songNumber;
_root.backgroundMusic.attachSound("music" + _root.songNumber);
_root.backgroundMusic.start();
}
};
Instance of Symbol 104 MovieClip in Symbol 148 MovieClip Frame 87
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_visible = true;
} else {
_visible = false;
}
}
on (release) {
_root.fade("menu");
}
onClipEvent (load) {
stop();
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Instance of Symbol 146 MovieClip in Symbol 148 MovieClip Frame 237
onClipEvent (load) {
function reset() {
gotoAndStop(Math.round((Math.random() * 11) + 1));
speed = (Math.random() * 3) + 4;
_x = -200;
}
reset();
wait = Math.random() * 50;
}
onClipEvent (enterFrame) {
wait--;
if (wait <= 0) {
_x = (_x + speed);
if (_x > 800) {
reset();
}
}
}
Symbol 148 MovieClip Frame 327
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
stop();
_root.fade("menu");
}
Symbol 148 MovieClip Frame 328
stop();
Instance of Symbol 71 MovieClip "loadBar" in Symbol 148 MovieClip Frame 328
onClipEvent (load) {
_xscale = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
}
onClipEvent (enterFrame) {
_xscale = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.fade("menu");
}
}
Symbol 152 Button
on (rollOver) {
_root.mouse.displayText = "Yes, this is a zombie's much loved eye.";
}
on (rollOut) {
_root.mouse.displayText = "";
}
Symbol 166 Button
on (release) {
fade("survivalStart");
if (_root.music) {
_root.backgroundMusic.setVolume(50);
}
}
on (rollOver) {
_root.mouse.displayText = "Play 'survival' mode - an alternate version of the game";
}
on (rollOut) {
_root.mouse.displayText = "";
}
Symbol 169 Button
on (release) {
fade("instructions");
}
Symbol 172 Button
on (release) {
fade("settings");
}
Symbol 175 Button
on (release) {
fade("credits");
}
Symbol 178 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 186 MovieClip Frame 1
stop();
Symbol 226 Button
on (release) {
_root.gamePaused = false;
_visible = false;
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 231 Button
on (release) {
_root.fade("menu");
_visible = false;
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Instance of Symbol 220 MovieClip in Symbol 233 MovieClip Frame 1
onClipEvent (load) {
switch (_root._quality) {
case "LOW" :
quality = 0;
break;
case "MEDIUM" :
quality = 1;
break;
default :
quality = 2;
break;
case "BEST" :
quality = 3;
}
}
on (release) {
quality++;
}
onClipEvent (enterFrame) {
switch (quality) {
case 0 :
_root._quality = "LOW";
display = "Low";
break;
case 1 :
_root._quality = "MEDIUM";
display = "Medium";
break;
case 2 :
_root._quality = "HIGH";
display = "High";
break;
case 3 :
_root._quality = "BEST";
display = "Best";
}
if (quality > 3) {
quality = 0;
}
}
Instance of Symbol 220 MovieClip in Symbol 233 MovieClip Frame 1
on (release) {
_root.sound = !_root.sound;
}
onClipEvent (enterFrame) {
if (_root.sound) {
display = "On";
} else {
display = "Off";
}
}
Instance of Symbol 220 MovieClip in Symbol 233 MovieClip Frame 1
on (release) {
_root.music = !_root.music;
if (_root.music) {
_root.backgroundMusic.setVolume(50);
} else {
_root.backgroundMusic.setVolume(0);
}
}
onClipEvent (enterFrame) {
if (_root.music) {
display = "On";
} else {
display = "Off";
}
}
Symbol 296 Button
on (release) {
fade("shop");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 332 Button
on (release) {
fade("game");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
on (rollOver) {
_root.mouse.displayText = "Continue to level " + _root.level;
}
on (rollOut) {
_root.mouse.displayText = "";
}
Symbol 359 Button
on (release) {
fade("menu");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 363 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 366 Button
on (release) {
fade("menu");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 371 Button
on (release) {
_root.fade("menu");
}
Symbol 373 MovieClip Frame 830
stop();
Symbol 382 Button
on (release) {
nextFrame();
}
Symbol 395 Button
on (release) {
prevFrame();
}
Symbol 416 MovieClip Frame 1
stop();
Symbol 417 Button
on (release) {
fade("game");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 429 Button
on (release) {
gameSaveSo.clear();
unlockSo.clear();
stopAllSounds();
gotoAndPlay (1);
}
Symbol 434 Button
on (release) {
fade("survival");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 437 Button
on (release) {
fade("survivalStart");
if (_root.music) {
_root.backgroundMusic.setVolume(100);
}
}
Symbol 442 Button
on (release) {
getURL ("http://www.tastylamp.tehelite.org/daz2/submitScore.php", "_blank", "POST");
_visible = false;
}
Symbol 445 MovieClip Frame 1
score = _root.killCount * 10;
verify = 42108;