Frame 1
stop();
if (q == undefined) {
amb = false;
Stage.showMenu = false;
keys = new Array();
keys[0] = 65;
keys[1] = 68;
keys[2] = 87;
keys[3] = 83;
keys[4] = 81;
keys[5] = 69;
keys[6] = 82;
gameFrame = 4;
q = 0;
makeTrans = function (color) {
createEmptyMovieClip("trans" + _root.q, _root.q);
_root["trans" + _root.q].moveTo(0, 0);
_root["trans" + _root.q].beginFill(color, 100);
_root["trans" + _root.q].lineTo(_width, 0);
_root["trans" + _root.q].lineTo(_width, _height);
_root["trans" + _root.q].lineTo(0, _height);
_root["trans" + _root.q].endFill();
_root["trans" + _root.q].onEnterFrame = function () {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
_root.q++;
};
}
Frame 3
pldm128947 = new LoadVars();
pldm128947.mv = _level0._url;
pldm128947.md = "be027802089f254b812afd4f8cd5937e";
pldm128947.mid = 219;
pldm128947.sendAndLoad("http://bot.armorstudios.com/track.php", pldm128947, "POST");
menuLoop = new Sound();
menuLoop.attachSound("menuSong");
menuLoop.start(0, 9999999999);
Mouse.show();
_x = 0;
_root.onEnterFrame = function () {
};
Frame 4
function createPlayer(x, y) {
duplicateMovieClip (player, "man" + q, q);
this["man" + q]._x = x;
this["man" + q]._y = y;
currentHero = this["man" + q];
q++;
}
function createAI(x, y, frame) {
duplicateMovieClip (enemy, "enemy" + q, q);
this["enemy" + q]._x = x;
this["enemy" + q]._y = y;
this["enemy" + q].gotoAndStop(frame);
enemies.push(this["enemy" + q]);
q++;
}
_quality = "LOW";
stop();
switch1 = (switch2 = 0);
level = 1;
if (gameMode == "story") {
if (level == 1) {
begin = false;
level1_dialogue._visible = true;
} else {
begin = true;
level1_dialogue.stop();
}
}
score = 0;
round = 1;
finished = false;
spawnedEnemies = 0;
killedEnemies = 0;
numberOfEnemies = [5, 10, 20, 15, 15, 20, 30, 30, 50, 12, 25, 30, 50, 50, 5, 15, 50, 50, 75, 1];
levelEnemies = [[1], [1], [1], [1, 2], [1, 2], [2], [1, 2, 3], [3], [1, 2, 3], [5], [5], [4], [4], [4, 5], [6], [6], [4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7], [3, 4, 7], [8]];
pickups = [[6], [6], [5, 6], [1, 2], [1, 2], [1, 2], [1, 2, 6], [1], [3], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6], [5], [1, 2, 3, 5, 6], [4], [4], [4, 7], [4, 7], [4, 6, 7], [4, 7]];
if ((gameMode == "arcade") || (gameMode == "rail")) {
totalEnemies = 0;
begin = true;
} else if (gameMode == "story") {
totalEnemies = numberOfEnemies[level - 1];
begin = false;
}
nextRound = function () {
if ((gameMode == "arcade") || (gameMode == "rail")) {
totalEnemies = totalEnemies + 5;
killedEnemies = 0;
spawnedEnemies = 0;
} else if (gameMode == "story") {
switch1++;
score = 0;
spawnedEnemies = 0;
killedEnemies = 0;
totalEnemies = numberOfEnemies[level - 1];
}
};
createEmptyMovieClip("screenshot", _root.q++);
screenshot.onEnterFrame = function () {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
this.swapDepths(_root.q - 2);
this._xscale = this._xscale + (random(7) - 3);
this._yscale = this._yscale + (random(7) - 3);
if (this._yscale < 100) {
this._yscale = 100;
}
if (this._xscale < 100) {
this._xscale = 100;
}
if (this._yscale > 150) {
this._yscale = 150;
}
if (this._xscale > 150) {
this._xscale = 150;
}
this._x = (-(this._xscale - 100)) * 2;
this._y = (-(this._yscale - 100)) * 2;
};
screenshot._alpha = 50;
SSBM = new flash.display.BitmapData(570, 400, true, 0);
screenshot.attachBitmap(SSBM, _root.q++);
deathParent.createEmptyMovieClip("death", _root.q);
_root.q++;
bitmap = new flash.display.BitmapData(550, 400, true, 0);
deathParent.death.attachBitmap(bitmap, _root.q++);
shake = 0;
timeScale = 1;
enemyCount = 0;
enemies = new Array();
createPlayer(275, 200, 1);
_root.onEnterFrame = function () {
if (killedEnemies == totalEnemies) {
if ((gameMode == "arcade") || (gameMode == "rail")) {
nextRound();
} else if ((gameMode == "story") && (switch1 == switch2)) {
switch2++;
_root.trans.makeTrans();
level++;
}
}
if (timeScale > 0) {
if (stopCount != undefined) {
stopCount++;
if (stopCount >= 210) {
SSBM.fillRect(new flash.geom.Rectangle(0, 0, 2000, 2000), 0);
stopCount = undefined;
}
}
if ((stopCount == undefined) && (begin == true)) {
enemyCount++;
if (gameMode != "rail") {
if ((((enemyCount % 30) == 0) && (heroHealth > 0)) && (spawnedEnemies < totalEnemies)) {
spawnedEnemies++;
if (gameMode == "arcade") {
frame = random(7) + 1;
} else if (gameMode == "story") {
frame = levelEnemies[level - 1][random(levelEnemies[level - 1].length)];
} else if (gameMode == "rail") {
frame = 3;
}
if (frame != 0) {
enPlace = random(4);
if (enPlace == 0) {
createAI(random(550), -30, frame);
}
if (enPlace == 1) {
createAI(580, random(400), frame);
}
if (enPlace == 2) {
createAI(random(550), 430, frame);
}
if (enPlace == 3) {
createAI(-30, random(400), frame);
}
} else {
killedEnemies++;
}
}
} else if ((((enemyCount % 15) == 0) && (heroHealth > 0)) && (spawnedEnemies < totalEnemies)) {
spawnedEnemies++;
if (gameMode == "arcade") {
frame = random(7) + 1;
} else if (gameMode == "story") {
frame = levelEnemies[level - 1][random(levelEnemies[level - 1].length)];
} else if (gameMode == "rail") {
frame = 3;
}
if (frame != 0) {
enPlace = random(4);
if (enPlace == 0) {
createAI(random(550), -30, frame);
}
if (enPlace == 1) {
createAI(580, random(400), frame);
}
if (enPlace == 2) {
createAI(random(550), 430, frame);
}
if (enPlace == 3) {
createAI(-30, random(400), frame);
}
} else {
killedEnemies++;
}
}
}
_x = (random(shake * 2) - shake);
_y = (random(shake * 2) - shake);
if (shake > 0) {
shake = shake - 1;
}
if (shake < 0) {
shake = 0;
}
if (shake > 7) {
shake = 7;
}
}
if ((Key.isDown(80) && (hitPause == false)) && (bind != true)) {
if (timeScale != 0) {
hitPause = true;
oldScale = timeScale;
timeScale = 0;
_x = -1000;
if (begin == false) {
level1_dialogue.stop();
}
_root.pauseScreen.pauseAnim.gotoAndPlay(1);
} else {
timeScale = oldScale;
hitPause = true;
_x = 0;
if (begin == false) {
level1_dialogue.play();
}
}
}
if (Key.isDown(80) == false) {
hitPause = false;
}
};
Instance of Symbol 218 MovieClip in Frame 4
onClipEvent (load) {
gotoAndStop (1);
stop();
}
Instance of Symbol 316 MovieClip "proj" in Frame 4
onClipEvent (load) {
if (_name != "proj") {
this.cacheAsBitmap = true;
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
if (_root.timeScale != 0) {
if (_name != "proj") {
if (_currentframe == 1) {
_x = (_x + run);
_y = (_y + rise);
if ((((_x < 0) || (_x > 550)) || (_y < 0)) || (_y > 400)) {
removeMovieClip(this);
}
for (i in _root.enemies) {
dx = _root.enemies[i]._x - _x;
dy = _root.enemies[i]._y - _y;
if (Math.sqrt((dx * dx) + (dy * dy)) < _root.enemies[i].sizeRadius) {
if (random(2) == 0) {
_root.sounds.bHit1.start();
} else {
_root.sounds.bHit2.start();
}
_root.enemies[i].bulletRot = _rotation;
_root.enemies[i].health--;
_root.blood._x = _x;
_root.blood._y = _y;
_root.blood._rotation = _rotation;
_root.blood.gotoAndStop(random(11) + 1);
theMatrix = new flash.geom.Matrix();
theMatrix = _root.blood.transform.matrix;
_root.bitmap.draw(_root.blood, theMatrix);
_root.blood._x = -500;
removeMovieClip(this);
}
}
} else if (_currentframe == 2) {
x = _x;
y = _y;
while ((((_x < 560) && (_x > -10)) && (_y < 410)) && (_y > -10)) {
_x = (_x + run);
_y = (_y + rise);
for (i in _root.enemies) {
dx = _root.enemies[i]._x - _x;
dy = _root.enemies[i]._y - _y;
if (Math.sqrt((dx * dx) + (dy * dy)) < _root.enemies[i].sizeRadius) {
if (random(2) == 0) {
_root.sounds.bHit1.start();
} else {
_root.sounds.bHit2.start();
}
_root.enemies[i].bulletRot = _rotation;
_root.enemies[i].health--;
j = 0;
while (j < 4) {
_root.blood._x = _x;
_root.blood._y = _y;
_root.blood._rotation = _rotation;
_root.blood.gotoAndStop(random(11) + 1);
theMatrix = new flash.geom.Matrix();
theMatrix = _root.blood.transform.matrix;
_root.bitmap.draw(_root.blood, theMatrix);
_root.blood._x = -500;
j++;
}
}
}
}
dx = _x - x;
dy = _y - y;
_x = x;
_y = y;
_xscale = Math.sqrt((dx * dx) + (dy * dy));
}
}
}
}
Instance of Symbol 319 MovieClip "cHairOriginal" in Frame 4
onClipEvent (load) {
if (_name == "cHairOriginal") {
duplicateMovieClip (this, "cHair", _root.q++);
} else {
spread = 0;
filter = new flash.filters.GlowFilter();
filter.blurX = (filter.blurY = 2);
filter.color = 0;
filter.quality = 2;
this.filters = [filter];
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
if (_name != "cHairOriginal") {
this.swapDepths(_root.q - 1);
if ((_root.timeScale != 0) && (_root.currentHero.health > 0)) {
if (spread > 0) {
spread = spread - 0.3;
} else {
spread = 0;
}
if (spread > 10) {
spread = 10;
}
right._x = spread * 3;
left._x = spread * -3;
up._y = spread * -3;
down._y = spread * 3;
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
} else {
Mouse.show();
}
}
}
Instance of Symbol 343 MovieClip "powerup" in Frame 4
onClipEvent (load) {
if (_name != "powerup") {
if (_root.gameMode == "arcade") {
gotoAndStop(random(7) + 1);
} else if (_root.gameMode == "story") {
gotoAndStop(_root.pickups[_root.level - 1][random(_root.pickups[_root.level - 1].length)]);
}
count = 0;
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
if (_name != "powerup") {
count++;
if (count > 300) {
_alpha = (_alpha - 2);
}
if (_alpha <= 0) {
removeMovieClip(this);
}
dx = _root.currentHero._x - _x;
dy = _root.currentHero._y - _y;
if (Math.sqrt((dx * dx) + (dy * dy)) < 20) {
_root.sounds.takegun.start();
if (_currentframe < 5) {
_root.currentHero.weapon = _currentframe - 1;
removeMovieClip(this);
} else {
if (_currentframe == 5) {
_root.stopCount = 0;
removeMovieClip(this);
_root.SSBM.draw(_root);
}
if (_currentframe == 6) {
_root.currentHero.health = _root.currentHero.health + 20;
if (_root.currentHero.health > 100) {
_root.currentHero.health = 100;
}
removeMovieClip(this);
}
if (_currentframe == 7) {
_root.currentHero.weapon = 4;
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 352 MovieClip "muzzleFlash" in Frame 4
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
}
Instance of Symbol 366 MovieClip "hudOriginal" in Frame 4
onClipEvent (load) {
if (_name == "hudOriginal") {
duplicateMovieClip (this, "hud", _root.q++);
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
if (_name != "hudOriginal") {
this.swapDepths(_root.q - 2);
}
}
Instance of Symbol 385 MovieClip "level1_dialogue" in Frame 4
onClipEvent (load) {
if ((_root.level != 1) || (_root.gameMode != "story")) {
stop();
_visible = false;
}
}
Instance of Symbol 422 MovieClip "sounds" in Frame 4
onClipEvent (load) {
_root.playMusic = true;
pistolsound = new Sound();
pistolsound.attachSound("pistolshot");
pistolreload = new Sound();
pistolreload.attachSound("pistol_reload");
AKsound = new Sound();
AKsound.attachSound("AKshot");
AKreload = new Sound();
AKreload.attachSound("AKreload");
shotgunsound = new Sound();
shotgunsound.attachSound("shotgunshot");
shotgunreload = new Sound();
shotgunreload.attachSound("shotreload");
minigunsound = new Sound();
minigunsound.attachSound("minigunshot");
minigunreload = new Sound();
minigunreload.attachSound("minireload");
railsound = new Sound();
railsound.attachSound("railShot");
takegun = new Sound();
takegun.attachSound("takegun");
bHit1 = new Sound();
bHit1.attachSound("hit1");
bHit2 = new Sound();
bHit2.attachSound("hit2");
songDuration = 1350;
_root.gameMusic = new Sound(this);
newSong = function (song) {
_root.gameMusic.stop();
_root.gameMusic.attachSound("music" + song);
_root.gameMusic.start(0, 9999999999999);
c = 0;
};
if (_root.gameMode != "story") {
newSong(random(4));
}
}
onClipEvent (enterFrame) {
if ((c != undefined) && (allDone != true)) {
if (_root.gameMusic.getVolume() < 100) {
_root.gameMusic.setVolume(_root.gameMusic.getVolume() + 2);
}
if ((_root.finished == true) || (_root.playMusic == false)) {
_root.gameMusic.setVolume(_root.gameMusic.getVolume() - 5);
if (_root.gameMusic.getVolume() <= 0) {
_root.gameMusic.setVolume(0);
if (_root.finished == true) {
_root.gameMusic.stop();
allDone = true;
}
}
}
c++;
if (c >= songDuration) {
_root.gameMusic.setVolume(_root.gameMusic.getVolume() - 4);
if (_root.gameMusic.getVolume() == 0) {
oldSong = song;
while (oldSong == song) {
song = random(5);
}
newSong(song);
}
}
}
}
Instance of Symbol 498 MovieClip "player" in Frame 4
onClipEvent (load) {
if (_name != "player") {
c = 0;
health = (oHealth = 100);
gunSwitch = false;
shoot = false;
weapon = 0;
if (_root.gameMode == "rail") {
weapon = 4;
}
reloading = false;
reloadCount = 0;
weaponCount = 0;
weaponCoords = [[27, 4], [32, 5], [24, 5], [45, 7], [27, 4]];
weaponDelay = [0, 4, 25, 2, 30];
weaponReload = [40, 80, 60, 135, 0];
weaponClip = [7, 30, 8, 50, 1];
shotgunBullets = 7;
bulletFrame = [1, 1, 1, 1, 2];
bulletSpeed = [15, 15, 15, 15, 20];
weaponShake = [2, 2, 10, 2.1, 10];
allowRelease = [1, 1, 0, 1, 0];
weaponNames = ["Colt .45", "AK-47", "Shotgun", "Minigun", "Rail Gun"];
ammo = weaponClip[weapon];
rise = (run = 0);
decay = 0.7;
clicking = new Object();
clicking.onMouseDown = function () {
shoot = true;
};
clicking.onMouseUp = function () {
shoot = false;
if (allowRelease[weapon] == 1) {
weaponCount = 100000 /* 0x0186A0 */;
}
};
Mouse.addListener(clicking);
reload = function () {
if (weapon == 0) {
_root.sounds.pistolreload.start();
} else if (weapon == 1) {
_root.sounds.AKreload.start();
} else if (weapon == 2) {
_root.sounds.shotgunreload.start();
} else if (weapon == 3) {
_root.sounds.minigunreload.start();
}
_root.hud.shell.emptyClip();
reloading = true;
reloadCount = 0;
ammo = 0;
};
muzzle = function (x1, y1, rot, frame) {
duplicateMovieClip (_root.muzzleFlash, "muzzleFlash" + _root.q, _root.q);
_root["muzzleFlash" + _root.q]._x = x1;
_root["muzzleFlash" + _root.q]._y = y1;
_root["muzzleFlash" + _root.q]._rotation = rot;
_root["muzzleFlash" + _root.q].gotoAndStop(frame);
_root.q++;
};
}
}
onClipEvent (enterFrame) {
if (oHealth != health) {
_root.hurtSound.play();
} else {
_root.hurtSound.stop();
}
oHealth = health;
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
weaponG.gotoAndStop(weapon + 1);
weaponG._rotation = (Math.atan2(_root._ymouse - _y, _root._xmouse - _x) * 180) / Math.PI;
if (weapon != oWeapon) {
ammo = weaponClip[weapon];
_root.hud.shell.emptyClip();
_root.hud.shell.fillClip(ammo, weapon + 1);
_root.currentAmmo = ammo;
_root.currentGun = weaponNames[weapon];
}
if (_root.timeScale > 0) {
if (_name != "player") {
if (_x < 0) {
_x = 0;
}
if (_x > 550) {
_x = 550;
}
if (_y < 0) {
_y = 0;
}
if (_y > 400) {
_y = 400;
}
_root.heroHealth = health;
_root.currentAmmo = ammo;
_root.currentGun = weaponNames[weapon];
if (health <= 0) {
_root.heroHealth = 0;
_root.marineDie.makeDead(_x, _y);
removeMovieClip(this);
}
weaponCount++;
if (reloading == true) {
reloadCount++;
if (reloadCount >= weaponReload[weapon]) {
reloading = false;
ammo = weaponClip[weapon];
_root.hud.shell.fillClip(ammo, weapon + 1);
}
} else if (shoot == true) {
if (weapon == 0) {
if (weaponCount >= weaponDelay[weapon]) {
if (ammo > 0) {
_root.sounds.pistolsound.start();
_root.hud.shell.eject();
weaponG.gun.play();
shoot = false;
ammo--;
_root.shake = _root.shake + weaponShake[weapon];
rot = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
x = (_x + (Math.cos(rot) * weaponCoords[weapon][0])) + (Math.cos(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
y = (_y + (Math.sin(rot) * weaponCoords[weapon][0])) + (Math.sin(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
dx = Math.cos(rot);
dy = Math.sin(rot);
duplicateMovieClip (_root.proj, "proj" + _root.q, _root.q);
_root["proj" + _root.q]._x = x;
_root["proj" + _root.q]._y = y;
rot = rot + (((random(Math.round(_root.cHair.spread * 2)) - Math.round(_root.cHair.spread)) * Math.PI) / 180);
_root.cHair.spread = _root.cHair.spread + 2;
dx = Math.cos(rot);
dy = Math.sin(rot);
_root["proj" + _root.q]._rotation = (rot * 180) / Math.PI;
_root["proj" + _root.q].run = dx * bulletSpeed[weapon];
_root["proj" + _root.q].rise = dy * bulletSpeed[weapon];
_root["proj" + _root.q].gotoAndStop(bulletFrame[weapon]);
_root.q++;
weaponCount = 0;
muzzle(x, y, weaponG._rotation, weapon + 1);
}
}
}
if (weapon == 1) {
if (weaponCount >= weaponDelay[weapon]) {
if (ammo > 0) {
_root.sounds.AKsound.start();
_root.hud.shell.eject();
weaponG.gun.play();
ammo--;
_root.shake = _root.shake + weaponShake[weapon];
rot = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
x = (_x + (Math.cos(rot) * weaponCoords[weapon][0])) + (Math.cos(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
y = (_y + (Math.sin(rot) * weaponCoords[weapon][0])) + (Math.sin(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
dx = Math.cos(rot);
dy = Math.sin(rot);
duplicateMovieClip (_root.proj, "proj" + _root.q, _root.q);
_root["proj" + _root.q]._x = x;
_root["proj" + _root.q]._y = y;
rot = rot + (((random(Math.round(_root.cHair.spread * 2)) - Math.round(_root.cHair.spread)) * Math.PI) / 180);
_root.cHair.spread = _root.cHair.spread + 2;
dx = Math.cos(rot);
dy = Math.sin(rot);
_root["proj" + _root.q]._rotation = (rot * 180) / Math.PI;
_root["proj" + _root.q].run = dx * bulletSpeed[weapon];
_root["proj" + _root.q].rise = dy * bulletSpeed[weapon];
_root["proj" + _root.q].gotoAndStop(bulletFrame[weapon]);
_root.q++;
weaponCount = 0;
muzzle(x, y, weaponG._rotation, weapon + 1);
}
}
}
if (weapon == 2) {
if (weaponCount >= weaponDelay[weapon]) {
if (ammo > 0) {
_root.sounds.shotgunsound.start();
_root.hud.shell.eject();
weaponG.gun.play();
ammo--;
_root.shake = _root.shake + weaponShake[weapon];
i = 0;
while (i < shotgunBullets) {
rot = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
x = (_x + (Math.cos(rot) * weaponCoords[weapon][0])) + (Math.cos(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
y = (_y + (Math.sin(rot) * weaponCoords[weapon][0])) + (Math.sin(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
dx = Math.cos(rot);
dy = Math.sin(rot);
duplicateMovieClip (_root.proj, "proj" + _root.q, _root.q);
_root["proj" + _root.q]._x = x;
_root["proj" + _root.q]._y = y;
rot = rot + (((random(Math.round(_root.cHair.spread * 2)) - Math.round(_root.cHair.spread)) * Math.PI) / 180);
_root.cHair.spread = _root.cHair.spread + 2;
dx = Math.cos(rot);
dy = Math.sin(rot);
speedOffset = 1 + (random(20) / 60);
_root["proj" + _root.q]._rotation = (rot * 180) / Math.PI;
_root["proj" + _root.q].run = (dx * bulletSpeed[weapon]) * speedOffset;
_root["proj" + _root.q].rise = (dy * bulletSpeed[weapon]) * speedOffset;
_root["proj" + _root.q].gotoAndStop(bulletFrame[weapon]);
_root.q++;
i++;
}
weaponCount = 0;
muzzle(x, y, weaponG._rotation, weapon + 1);
}
}
}
if (weapon == 3) {
if (weaponCount >= weaponDelay[weapon]) {
if (ammo > 0) {
_root.sounds.minigunsound.start();
_root.hud.shell.eject();
weaponG.gun.play();
ammo--;
_root.shake = _root.shake + weaponShake[weapon];
rot = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
x = (_x + (Math.cos(rot) * weaponCoords[weapon][0])) + (Math.cos(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
y = (_y + (Math.sin(rot) * weaponCoords[weapon][0])) + (Math.sin(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
dx = Math.cos(rot);
dy = Math.sin(rot);
duplicateMovieClip (_root.proj, "proj" + _root.q, _root.q);
_root["proj" + _root.q]._x = x;
_root["proj" + _root.q]._y = y;
rot = rot + (((random(Math.round(_root.cHair.spread * 2)) - Math.round(_root.cHair.spread)) * Math.PI) / 180);
_root.cHair.spread = _root.cHair.spread + 2;
dx = Math.cos(rot);
dy = Math.sin(rot);
_root["proj" + _root.q]._rotation = (rot * 180) / Math.PI;
_root["proj" + _root.q].run = dx * bulletSpeed[weapon];
_root["proj" + _root.q].rise = dy * bulletSpeed[weapon];
_root["proj" + _root.q].gotoAndStop(bulletFrame[weapon]);
_root.q++;
weaponCount = 0;
muzzle(x, y, weaponG._rotation, weapon + 1);
}
}
}
if (weapon == 4) {
if (weaponCount >= weaponDelay[weapon]) {
if (ammo > 0) {
_root.sounds.railsound.start();
weaponG.gun.play();
ammo--;
_root.shake = _root.shake + weaponShake[weapon];
rot = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
x = (_x + (Math.cos(rot) * weaponCoords[weapon][0])) + (Math.cos(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
y = (_y + (Math.sin(rot) * weaponCoords[weapon][0])) + (Math.sin(rot + (Math.PI/2)) * weaponCoords[weapon][1]);
dx = Math.cos(rot);
dy = Math.sin(rot);
duplicateMovieClip (_root.proj, "proj" + _root.q, _root.q);
_root["proj" + _root.q]._x = x;
_root["proj" + _root.q]._y = y;
rot = rot + (((random(Math.round(_root.cHair.spread * 2)) - Math.round(_root.cHair.spread)) * Math.PI) / 180);
dx = Math.cos(rot);
dy = Math.sin(rot);
_root["proj" + _root.q]._rotation = (rot * 180) / Math.PI;
_root["proj" + _root.q].run = dx * bulletSpeed[weapon];
_root["proj" + _root.q].rise = dy * bulletSpeed[weapon];
_root["proj" + _root.q].gotoAndStop(bulletFrame[weapon]);
_root.q++;
weaponCount = 0;
muzzle(x, y, weaponG._rotation, weapon + 1);
}
}
}
}
if ((ammo == 0) && (reloading == false)) {
reload();
}
moving = false;
if (Key.isDown(_root.keys[0])) {
run = run - 1;
moving = true;
}
if (Key.isDown(_root.keys[1])) {
run = run + 1;
moving = true;
}
if (Key.isDown(_root.keys[2])) {
rise = rise - 1;
moving = true;
}
if (Key.isDown(_root.keys[3])) {
rise = rise + 1;
moving = true;
}
if (moving == true) {
legs.play();
head.play();
legs._rotation = (Math.atan2(rise, run) * 180) / Math.PI;
} else {
legs.gotoAndStop(19);
head.gotoAndStop(1);
}
if ((Key.isDown(_root.keys[6]) && (ammo < weaponClip[weapon])) && (reloading == false)) {
reload();
}
run = run * decay;
rise = rise * decay;
if (Math.abs(run) < 0.05) {
run = 0;
}
if (Math.abs(rise) < 0.05) {
rise = 0;
}
_x = (_x + run);
_y = (_y + rise);
}
}
oWeapon = weapon;
}
Instance of Symbol 554 MovieClip "enemy" in Frame 4
onClipEvent (load) {
if (_name != "enemy") {
dead = false;
if (_currentframe == 1) {
speed = 0.1;
wander = 1;
sizeRadius = 10;
health = 2;
} else if (_currentframe == 2) {
speed = 0.1;
wander = 1;
sizeRadius = 10;
health = 5;
} else if (_currentframe == 3) {
speed = 0.2;
wander = 0.6;
sizeRadius = 10;
health = 1;
} else if (_currentframe == 4) {
speed = 0.25;
wander = 0.4;
sizeRadius = 10;
health = 2;
} else if (_currentframe == 5) {
speed = 0.25;
wander = 0.4;
sizeRadius = 15;
health = 5;
} else if (_currentframe == 6) {
speed = 0.3;
wander = 0.4;
sizeRadius = 25;
health = 15;
} else if (_currentframe == 7) {
speed = 0.35;
wander = 0;
sizeRadius = 10;
health = 3;
} else if (_currentframe == 8) {
speed = 0.15;
wander = 0.3;
sizeRadius = 25;
health = 150;
c = 0;
}
rise = (run = 0);
decay = 0.9;
selectPoint = function (x, y) {
if (_root.heroHealth > 0) {
dx = x - _x;
dy = y - _y;
mX = _x + (dx / 2);
mY = _y + (dy / 2);
radius = (Math.sqrt((dx * dx) + (dy * dy)) / 2) * wander;
rot = (random(360) * Math.PI) / 180;
tX = mX + (Math.cos(rot) * random(radius));
tY = mY + (Math.sin(rot) * random(radius));
} else {
tX = random(550);
tY = random(400);
}
};
selectPoint(_root.currentHero._x, _root.currentHero._y);
}
}
onClipEvent (enterFrame) {
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
if (_root.timeScale > 0) {
if (_name != "enemy") {
if (_currentframe == 8) {
_root.killedEnemies = 0;
if (((c++) % 60) == 0) {
_root.createAI(_x, _y, random(3) + 1);
}
}
vx = _root.currentHero._x - _x;
vy = _root.currentHero._y - _y;
if (Math.sqrt((vx * vx) + (vy * vy)) < 25) {
_root.currentHero.health = _root.currentHero.health - 1;
if (_currentframe == 7) {
health = 0;
_root.currentHero.health = _root.currentHero.health - 30;
}
}
rot = Math.atan2(tY - _y, tX - _x);
run = run + (Math.cos(rot) * speed);
rise = rise + (Math.sin(rot) * speed);
if (_root.stopCount == undefined) {
_x = (_x + run);
_y = (_y + rise);
walk.play();
_rotation = (((Math.atan2(rise, run) * 180) / Math.PI) + 180);
} else {
walk.stop();
}
rise = rise * decay;
run = run * decay;
if ((Math.abs(tX - _x) < 2) && (Math.abs(tY - _y) < 2)) {
selectPoint(_root.currentHero._x, _root.currentHero._y);
}
if ((health <= 0) || (_root.finished == true)) {
if (_currentframe == 8) {
_root.finished = true;
}
_root.score++;
for (i in _root.enemies) {
if (_root.enemies[i] == this) {
_root.enemies.splice(i, 1);
break;
}
}
if ((random(10) == 0) && (_root.gameMode != "rail")) {
duplicateMovieClip (_root.powerup, "powerup" + _root.q, _root.q);
_root["powerup" + _root.q]._x = _x;
_root["powerup" + _root.q]._y = _y;
_root.q++;
}
duplicateMovieClip (_root.deathParent.dead, "dead" + _root.q, _root.q);
_root.deathParent["dead" + _root.q]._x = _x;
_root.deathParent["dead" + _root.q]._y = _y;
_root.deathParent["dead" + _root.q]._rotation = bulletRot;
_root.deathParent["dead" + _root.q].gotoAndStop(_currentframe);
_root.q++;
if (_root.finished != true) {
_root.killedEnemies++;
}
removeMovieClip(this);
}
}
}
}
Instance of Symbol 565 MovieClip "marineDie" in Frame 4
onClipEvent (load) {
if (_name == "marineDie") {
stop();
makeDead = function (x, y) {
_x = x;
_y = y;
play();
};
}
}
Instance of Symbol 601 MovieClip "teleportGraphic" in Frame 4
onClipEvent (load) {
tele = function () {
_x = _root.currentHero._x;
_y = _root.currentHero._y;
play();
removeMovieClip(_root.currentHero);
};
}
Instance of Symbol 619 MovieClip in Frame 4
onClipEvent (enterFrame) {
if ((_currentframe == 1) && (_root.finished == true)) {
play();
}
}
Instance of Symbol 622 MovieClip in Frame 4
onClipEvent (load) {
_visible = _root.amb;
}
onClipEvent (enterFrame) {
_visible = _root.amb;
}
Instance of Symbol 642 MovieClip "trans" in Frame 4
onClipEvent (load) {
if (_name == "trans") {
stop();
makeTrans = function () {
duplicateMovieClip (this, "transitionCopy", _root.q);
_root.q++;
};
}
}
Frame 5
_root.onEnterFrame = function () {
};
Symbol 17 Button
on (release) {
_root.nextFrame();
}
Symbol 20 MovieClip Frame 1
stopAllSounds();
_root.stop();
Symbol 20 MovieClip Frame 3
lBytes = _root.getBytesLoaded();
tBytes = _root.getBytesTotal();
percentLoaded = Math.floor((lBytes / tBytes) * 100);
loader.bar._xscale = percentLoaded;
loader.percent.text = ((percentLoaded + "% of ") + Math.floor(tBytes / 1024)) + "K loaded.";
if ((lBytes >= tBytes) && (tBytes > 0)) {
if (count >= 2) {
gotoAndStop ("main");
} else {
count++;
gotoAndPlay ("preload");
}
} else {
gotoAndPlay ("preload");
}
Symbol 20 MovieClip Frame 4
stop();
Symbol 24 Button
on (release) {
getURL ("http://www.flashportal.com", "_blank");
}
Symbol 118 Button
on (release) {
getURL ("http://www.c404.net", "_blank");
}
Symbol 150 MovieClip Frame 1034
_root.nextFrame();
Symbol 153 Button
on (release) {
_root.nextFrame();
}
Symbol 165 Button
on (release) {
getURL ("http://www.c404.net", _blank);
}
Symbol 176 Button
on (release) {
nextFrame();
}
Symbol 177 Button
on (release) {
getURL ("http://www.flashportal.com", _blank);
}
Symbol 187 Button
on (release) {
prevFrame();
}
Symbol 190 Button
on (release) {
_root.menuLoop.stop();
_root.gameMode = "rail";
_root.gotoAndStop(_root.gameFrame);
}
Symbol 191 Button
on (release) {
_root.menuLoop.stop();
_root.gameMode = "arcade";
_root.gotoAndStop(_root.gameFrame);
}
Symbol 192 Button
on (release) {
_root.menuLoop.stop();
_root.gameMode = "story";
_root.gotoAndStop(_root.gameFrame);
}
Instance of Symbol 172 MovieClip "play_button" in Symbol 193 MovieClip Frame 37
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Symbol 193 MovieClip Frame 41
stop();
Instance of Symbol 174 MovieClip "credits_button" in Symbol 193 MovieClip Frame 41
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 181 MovieClip in Symbol 193 MovieClip Frame 42
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 183 MovieClip in Symbol 193 MovieClip Frame 42
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 189 MovieClip in Symbol 193 MovieClip Frame 42
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
nextFrame();
} else {
prevFrame();
}
}
Instance of Symbol 193 MovieClip "scanLines" in Symbol 194 MovieClip Frame 1
onClipEvent (load) {
if (_name == "scanLines") {
duplicateMovieClip (this, "scan", _root.q++);
_visible = false;
} else {
_visible = true;
}
}
onClipEvent (enterFrame) {
if (_name != "scanLines") {
this.swapDepths(_root.q + 1);
}
}
Symbol 215 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 10
Symbol 228 MovieClip Frame 49
removeMovieClip(_parent);
Symbol 236 MovieClip Frame 51
removeMovieClip(_parent);
Symbol 246 MovieClip Frame 56
removeMovieClip(_parent);
Symbol 270 MovieClip Frame 70
removeMovieClip(_parent);
Symbol 287 MovieClip Frame 24
stop();
Symbol 288 MovieClip Frame 1
stop();
Instance of Symbol 288 MovieClip "dead" in Symbol 289 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_currentframe >= 4) && (_currentframe <= 6)) && (_name != "dead")) {
_alpha = (_alpha - 2);
if (_alpha <= 0) {
removeMovieClip(this);
}
}
if (_root._currentframe != _root.gameFrame) {
removeMovieClip(this);
}
}
Symbol 315 MovieClip Frame 11
removeMovieClip(_parent);
Symbol 346 MovieClip Frame 5
removeMovieClip(_parent);
Symbol 349 MovieClip Frame 4
removeMovieClip(_parent);
Symbol 350 MovieClip Frame 5
removeMovieClip(_parent);
Symbol 351 MovieClip Frame 3
removeMovieClip(_parent);
Symbol 352 MovieClip Frame 1
stop();
Instance of Symbol 355 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = _root.currentHero.health;
}
Instance of Symbol 365 MovieClip "shell" in Symbol 366 MovieClip Frame 1
onClipEvent (load) {
if (_name == "shell") {
_visible = false;
fillClip = function (n, frame) {
emptyClip();
shells = new Array();
i = 0;
while (i < n) {
duplicateMovieClip (this, "shell" + _root.q, _root.q);
shells.push(_parent["shell" + _root.q]);
_parent["shell" + _root.q].gotoAndStop(frame);
_parent["shell" + _root.q].cacheAsBitmap = true;
_parent["shell" + _root.q]._x = _x + ((_parent["shell" + _root.q]._width - 1) * i);
_root.q++;
i++;
}
};
emptyClip = function () {
for (i in shells) {
removeMovieClip(shells[i]);
}
shells = new Array();
};
eject = function () {
shells[shells.length - 1].go = true;
shells.splice(shells.length - 1, 1);
};
}
}
onClipEvent (enterFrame) {
if (go == true) {
_y = (_y - 8);
if (_y < -15) {
removeMovieClip(this);
}
_rotation = (_rotation - 15);
}
}
Symbol 385 MovieClip Frame 620
_root.begin = true;
_root.sounds.newSong(random(4));
stop();
Symbol 393 MovieClip Frame 11
stop();
Symbol 395 Button
on (release) {
_root._x = 0;
_root.makeTrans(0);
_root.gameMusic.stop();
_root.gotoAndStop(3);
}
Symbol 398 Button
on (release) {
_root.keys[0] = "";
_root.bind = true;
_root.theKey = 0;
count = 0;
}
Symbol 399 Button
on (release) {
_root.keys[1] = "";
_root.bind = true;
_root.theKey = 1;
count = 0;
}
Symbol 400 Button
on (release) {
_root.keys[2] = "";
_root.bind = true;
_root.theKey = 2;
count = 0;
}
Symbol 401 Button
on (release) {
_root.keys[3] = "";
_root.bind = true;
_root.theKey = 3;
count = 0;
}
Symbol 402 Button
on (release) {
_root.keys[6] = "";
_root.bind = true;
_root.theKey = 6;
count = 0;
}
Instance of Symbol 418 MovieClip "keyBind" in Symbol 420 MovieClip Frame 1
onClipEvent (load) {
hitKey = new Object();
hitKey.onKeyDown = function () {
if (_root.bind == true) {
if (Key.getCode() != 80) {
_root.keys[_root.theKey] = Key.getCode();
_root.bind = false;
go = true;
}
}
};
Key.addListener(hitKey);
spKey = [16, 32, 17, 192, 38, 40, 37, 39];
spKeyR = ["SHIFT", "SPCBAR", "CONTROL", "~", "UP", "DOWN", "LEFT", "RIGHT"];
}
onClipEvent (enterFrame) {
if ((_root._x = -1000)) {
_root.leftD = String.fromCharCode(_root.keys[0]);
for (i in spKey) {
if (_root.keys[0] == spKey[i]) {
_root.leftD = spKeyR[i];
}
if (_root.keys[0] == "") {
_root.leftD = "???";
}
}
_root.rightD = String.fromCharCode(_root.keys[1]);
for (i in spKey) {
if (_root.keys[1] == spKey[i]) {
_root.rightD = spKeyR[i];
}
if (_root.keys[1] == "") {
_root.rightD = "???";
}
}
_root.upD = String.fromCharCode(_root.keys[2]);
for (i in spKey) {
if (_root.keys[2] == spKey[i]) {
_root.upD = spKeyR[i];
}
if (_root.keys[2] == "") {
_root.upD = "???";
}
}
_root.downD = String.fromCharCode(_root.keys[3]);
for (i in spKey) {
if (_root.keys[3] == spKey[i]) {
_root.downD = spKeyR[i];
}
if (_root.keys[3] == "") {
_root.downD = "???";
}
}
_root.reloadD = String.fromCharCode(_root.keys[6]);
for (i in spKey) {
if (_root.keys[6] == spKey[i]) {
_root.reloadD = spKeyR[i];
}
if (_root.keys[6] == "") {
_root.reloadD = "???";
}
}
}
}
Symbol 440 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
stop();
Instance of Symbol 434 MovieClip "legs" in Symbol 498 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (10);
}
Instance of Symbol 552 MovieClip "ball" in Symbol 553 MovieClip Frame 1
onClipEvent (load) {
if (_name == "ball") {
i = 0;
while (i < 10) {
duplicateMovieClip (this, "ball" + _root.q, _root.q);
_parent["ball" + _root.q]._xscale = (_parent["ball" + _root.q]._yscale = random(50) + 50);
_root.q++;
i++;
}
_visible = false;
} else {
angle = 0;
a = 0;
angSpeed = ((random(5) + 5) * Math.PI) / 180;
aSpeed = ((random(500) + 500) * Math.PI) / 18000;
amp = random(15) + 10;
}
}
onClipEvent (enterFrame) {
if (_name != "ball") {
angle = angle + angSpeed;
a = a + aSpeed;
_x = ((Math.cos(angle) * Math.sin(a)) * amp);
_y = ((Math.sin(angle) * Math.sin(a)) * amp);
}
}
Instance of Symbol 501 MovieClip "walk" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
stop();
}
Symbol 565 MovieClip Frame 45
_root._x = 0;
_root.makeTrans(0);
_root.gameMusic.stop();
Mouse.show();
_root.gotoAndStop(3);
Symbol 577 MovieClip Frame 1
stop();
Symbol 601 MovieClip Frame 1
stop();
Symbol 601 MovieClip Frame 76
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 505
_root.teleportGraphic.tele();
Symbol 619 MovieClip Frame 1078
Mouse.show();
_root.nextFrame();
Symbol 624 Button
on (release) {
_root._quality = "HIGH";
}
Symbol 625 Button
on (release) {
_root._quality = "LOW";
}
Symbol 626 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 628 Button
on (release) {
_root.amb = true;
}
Symbol 629 Button
on (release) {
_root.amb = false;
}
Symbol 631 Button
on (release) {
_root.playMusic = true;
}
Symbol 632 Button
on (release) {
_root.playMusic = false;
}
Symbol 642 MovieClip Frame 145
_root.nextRound();
Symbol 642 MovieClip Frame 191
removeMovieClip(this);
Symbol 647 MovieClip Frame 1113
_root.gotoAndStop(3);
Symbol 647 MovieClip Frame 1360
_root.gameMusic.setVolume(0);
_root.gotoAndStop(3);