Instance of Symbol 107 MovieClip in Frame 1
onClipEvent (load) {
myMic = Microphone.get();
this.attachAudio(myMic);
}
Frame 25
stop();
Frame 41
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.particleDepth = 1;
_root.playerNum = 0;
_root.systemVolume = 0;
_root.micControl = false;
_root.dynamicCamera = true;
_root.gamePaused = false;
_root.menuPage = 1;
var saveFile = SharedObject.getLocal("Sumo");
if (saveFile.data.pBlood == undefined) {
_root.SFXVolume = 50;
_root.musicVolume = 50;
_root.micVolume = 50;
_root.pShell = true;
_root.pBlood = true;
_root.pSpark = true;
_root.pBoom = 1;
} else {
_root.pBlood = saveFile.data.pBlood;
_root.pSpark = saveFile.data.pSpark;
_root.pShell = saveFile.data.pShell;
_root.pBoom = saveFile.data.pBoom;
_root._quality = saveFile.data._quality;
_root.SFXVolume = saveFile.data.SFXVolume;
_root.musicVolume = saveFile.data.musicVolume;
_root.micVolume = saveFile.data.micVolume;
}
saveFile.flush();
_root.maps.gotoAndStop(Math.floor(Math.random() * 8) + 1);
stop();
Instance of Symbol 250 MovieClip in Frame 41
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 41
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((((((_root.player1._x > leftBound) && (_root.player2._x > leftBound)) && (_root.player1._x < rightBound)) && (_root.player2._x < rightBound)) && (_root.player1._y < bottomBound)) && (_root.player2._y < bottomBound)) && (_root.player1._y > topBound)) && (_root.player2._y > topBound)) {
destX = -(((_root.player1._x + _root.player2._x) / 2) - (screenWidth / 2));
destY = -(((_root.player1._y + _root.player2._y) / 2) - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else if ((((_root.player2._x > leftBound) && (_root.player2._x < rightBound)) && (_root.player2._y > topBound)) && (_root.player2._y < bottomBound)) {
destX = -(_root.player2._x - (screenWidth / 2));
destY = -(_root.player2._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.menuFade._x = _root.menuFade.origX - _root._x;
_root.menuFade._y = _root.menuFade.origY - _root._y;
_root.mainButtons._x = _root.mainButtons.currX - _root._x;
_root.mainButtons._y = _root.mainButtons.currY - _root._y;
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 41
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 256 MovieClip in Frame 41
onClipEvent (load) {
duplicateMovieClip (_root.menuFade0, "menuFade", 5000);
duplicateMovieClip (_root.mainButtons0, "mainButtons", 5001);
_root.createEmptyMovieClip("blank", _root.menuFade0.getDepth());
_root.createEmptyMovieClip("blank", _root.mainButtons0.getDepth());
}
Instance of Symbol 258 MovieClip in Frame 41
onClipEvent (load) {
stopAllSounds();
ninevehShort = new Sound(this);
ninevehShort.attachSound("ninevehShort");
ninevehShort.setVolume(_root.musicVolume);
ninevehShort.start(0, 9999999);
}
onClipEvent (enterFrame) {
ninevehShort.setVolume(_root.musicVolume);
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 41
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
if (_root.menuPage == -1) {
impactPlayer.start(0, 1);
}
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 2) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
if (_root.menuPage == -1) {
impactPlayer.start(0, 1);
}
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 2) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
if (_root.menuPage == -1) {
impactWall.start(0, 1);
}
if (_root.pSpark) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c = 0;
while (c < 2) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 266 MovieClip "shell0" in Frame 41
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 41
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 41
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 41
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 41
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 41
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 41
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 41
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
c = 0;
while (c < (3 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (5 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 288 MovieClip "pistolClip0" in Frame 41
onClipEvent (load) {
xVel = 0;
yVel = 0;
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pistolClip0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "pellet0" in Frame 41
onClipEvent (load) {
trail._visible = false;
_rotation = ((Math.random() * 20) - 10);
hit = false;
speed = 30;
xLength = -15;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pellet0") {
return(undefined);
}
xLength = xLength + 5;
if (xLength < 0) {
_visible = false;
} else {
_visible = true;
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume / 5);
if (hit) {
_visible = false;
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
if (Math.floor(Math.random() * 2) == 0) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
if (Math.floor(Math.random() * 2) == 0) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
}
break;
}
_x = (_x + ((xDirection * 10) * Math.cos((_rotation * Math.PI) / 180)));
_y = (_y + ((xDirection * 10) * Math.sin((_rotation * Math.PI) / 180)));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 41
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 41
onClipEvent (load) {
do {
letter1 = chr(Math.floor(Math.random() * 26) + 65);
} while (((((letter1 == "A") || (letter1 == "E")) || (letter1 == "I")) || (letter1 == "O")) || (letter1 == "U"));
rndl = Math.floor(Math.random() * 5);
if (rndl == 0) {
letter2 = "a";
} else if (rndl == 1) {
letter2 = "e";
} else if (rndl == 2) {
letter2 = "i";
} else if (rndl == 3) {
letter2 = "o";
} else {
letter2 = "u";
}
letter3 = chr(Math.floor(Math.random() * 26) + 97);
pName = (("" + letter1) + letter2) + letter3;
red = Math.random() * 255;
green = Math.random() * 255;
blue = Math.random() * 255;
eyeRed = Math.random() * 255;
eyeGreen = Math.random() * 255;
eyeBlue = Math.random() * 255;
eyeType = Math.floor(Math.random() * 10) + 1;
eyes.fill.gotoAndStop(eyeType);
bloodRed = Math.random() * 255;
bloodGreen = Math.random() * 255;
bloodBlue = Math.random() * 255;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
_y = (_root.maps.topBound - 400);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(87)) {
kup = true;
}
if (Key.isDown(83)) {
kdown = true;
}
if (Key.isDown(65)) {
kleft = true;
}
if (Key.isDown(68)) {
kright = true;
}
if (Key.isDown(72)) {
kgrenade = true;
}
if (!Key.isDown(87)) {
kup = false;
}
if (!Key.isDown(83)) {
kdown = false;
}
if (!Key.isDown(65)) {
kleft = false;
}
if (!Key.isDown(68)) {
kright = false;
}
if (!Key.isDown(72)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(71)) {
kshoot = true;
}
if (!Key.isDown(71)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
kdown = true;
} else {
kdown = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
clipSize--;
xVel = xVel - (xDirection * recoil);
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (xDirection * 20);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if ((!gibbed) && (_y > (_root.maps.bottomBound + 1000))) {
gibbed = true;
gib.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 2500)) {
gibbed = false;
_root.player2.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
sidearm = Math.floor(Math.random() * 5) + 3;
gun.guns.gotoAndStop(sidearm);
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 350 MovieClip "player2" in Frame 41
onClipEvent (load) {
do {
letter1 = chr(Math.floor(Math.random() * 26) + 65);
} while (((((letter1 == "A") || (letter1 == "E")) || (letter1 == "I")) || (letter1 == "O")) || (letter1 == "U"));
rndl = Math.floor(Math.random() * 5);
if (rndl == 0) {
letter2 = "a";
} else if (rndl == 1) {
letter2 = "e";
} else if (rndl == 2) {
letter2 = "i";
} else if (rndl == 3) {
letter2 = "o";
} else {
letter2 = "u";
}
letter3 = chr(Math.floor(Math.random() * 26) + 97);
pName = (("" + letter1) + letter2) + letter3;
red = Math.random() * 255;
green = Math.random() * 255;
blue = Math.random() * 255;
eyeRed = Math.random() * 255;
eyeGreen = Math.random() * 255;
eyeBlue = Math.random() * 255;
eyeType = Math.floor(Math.random() * 10) + 1;
eyes.fill.gotoAndStop(eyeType);
bloodRed = Math.random() * 255;
bloodGreen = Math.random() * 255;
bloodBlue = Math.random() * 255;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
groundY = 350;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
recoil = 1;
power = 20;
holsterCount = 0;
playerSound = new Sound(this);
pistol1 = new Sound(this);
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
_y = (_root.maps.topBound - 400);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
shootCountAI = (prevVel = (jumpCountAI = 0));
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum == 2) {
if (Key.isDown(38)) {
kup = true;
}
if (Key.isDown(40)) {
kdown = true;
}
if (Key.isDown(37)) {
kleft = true;
}
if (Key.isDown(39)) {
kright = true;
}
if (Key.isDown(100)) {
kshoot = true;
}
if (Key.isDown(101)) {
kgrenade = true;
}
if (!Key.isDown(38)) {
kup = false;
}
if (!Key.isDown(40)) {
kdown = false;
}
if (!Key.isDown(37)) {
kleft = false;
}
if (!Key.isDown(39)) {
kright = false;
}
if (!Key.isDown(100)) {
kshoot = false;
}
if (!Key.isDown(101)) {
kgrenade = false;
}
} else if (_root.playerNum <= 1) {
if (homein) {
if (_root.player1._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player1._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 100)) || ((_root.player1._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player1._x < _x)) || (((_root.player1._x + 200) < _x) && (_root.player1.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 100)) || ((_root.player1._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player1._x > _x)) || (((_root.player1._x - 200) > _x) && (_root.player1.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player1._y - _y) < -50) && ((_root.player1._y > 50) || (_root.player1.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player1._y > _y) && (_root.player1.yVel <= 0)) && (ground)) {
kdown = true;
} else {
kdown = false;
}
if (((Math.abs(_root.player1._y - _y) < (Math.random() * 100)) && (_root.player1._y > 50)) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player1._x > _x) {
kright = true;
kleft = false;
}
if (_root.player1._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if (kshoot && (shootCount == shootSpeed)) {
xVel = xVel - (xDirection * recoil);
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
clipSize--;
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 2;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
xVel = (-xVel) / 2;
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if ((!gibbed) && (_y > (_root.maps.bottomBound + 1000))) {
gibbed = true;
gib.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 2500)) {
gibbed = false;
_root.player1.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
sidearm = Math.floor(Math.random() * 5) + 3;
gun.guns.gotoAndStop(sidearm);
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 357 MovieClip "arrowIndicator1" in Frame 41
onClipEvent (load) {
pName = _root.player1.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player1._x - _x;
yD = _root.player1._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if (pDist < 400) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player1.red, _root.player1.green, _root.player1.blue, 100);
}
Instance of Symbol 357 MovieClip "arrowIndicator2" in Frame 41
onClipEvent (load) {
pName = _root.player2.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player2._x - _x;
yD = _root.player2._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if (pDist < 400) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player2.red, _root.player2.green, _root.player2.blue, 100);
}
Instance of Symbol 360 MovieClip "menuFade0" in Frame 41
onClipEvent (load) {
origX = _x;
origY = _y;
if (_name == "menuFade0") {
_visible = false;
}
}
Instance of Symbol 470 MovieClip "mainButtons0" in Frame 41
onClipEvent (load) {
if (_name == "mainButtons0") {
_visible = false;
}
destX = (currX = (origX = _x));
destY = (currY = (origY = _y));
reset = false;
newPlayer = false;
var saveFile = SharedObject.getLocal("Sumo");
if (saveFile.data.currentPlayer != undefined) {
currentPlayer = saveFile.data.currentPlayer;
} else {
currentPlayer = 1;
}
if (saveFile.data.currentPlayer2 != undefined) {
currentPlayer2 = saveFile.data.currentPlayer2;
} else {
currentPlayer2 = 1;
}
saveFile.flush();
var saveFile = SharedObject.getLocal("Default");
saveFile.data.deleted = false;
saveFile.flush();
var saveFile = SharedObject.getLocal("sumoPlayers");
if (saveFile.data.playerNum == undefined) {
saveFile.data.playerNum = 3;
}
saveFile.data.player1 = "Default";
saveFile.data.player2 = "Smith";
saveFile.data.player3 = "SamFish";
saveFile.flush();
var saveFile = SharedObject.getLocal("Default");
saveFile.data.eyeType = 1;
saveFile.data.eyeRed = 0;
saveFile.data.eyeGreen = 0;
saveFile.data.eyeBlue = 0;
saveFile.data.red = 153;
saveFile.data.green = 153;
saveFile.data.blue = 153;
saveFile.data.bloodRed = 150;
saveFile.data.bloodGreen = 0;
saveFile.data.bloodBlue = 0;
saveFile.data.leftSideUpCode = 87;
saveFile.data.leftSideDownCode = 83;
saveFile.data.leftSideLeftCode = 65;
saveFile.data.leftSideRightCode = 68;
saveFile.data.leftSideShootCode = 71;
saveFile.data.leftSideGrenadeCode = 72;
saveFile.data.rightSideUpCode = 38;
saveFile.data.rightSideDownCode = 40;
saveFile.data.rightSideLeftCode = 37;
saveFile.data.rightSideRightCode = 39;
saveFile.data.rightSideShootCode = 100;
saveFile.data.rightSideGrenadeCode = 101;
saveFile.flush();
var saveFile = SharedObject.getLocal("Smith");
if (saveFile.data.eyeType == undefined) {
saveFile.data.eyeType = 3;
saveFile.data.eyeRed = 0;
saveFile.data.eyeGreen = 0;
saveFile.data.eyeBlue = 0;
saveFile.data.red = 200;
saveFile.data.green = 200;
saveFile.data.blue = 150;
saveFile.data.bloodRed = 0;
saveFile.data.bloodGreen = 255;
saveFile.data.bloodBlue = 0;
saveFile.data.leftSideUpCode = 87;
saveFile.data.leftSideDownCode = 83;
saveFile.data.leftSideLeftCode = 65;
saveFile.data.leftSideRightCode = 68;
saveFile.data.leftSideShootCode = 71;
saveFile.data.leftSideGrenadeCode = 72;
saveFile.data.rightSideUpCode = 38;
saveFile.data.rightSideDownCode = 40;
saveFile.data.rightSideLeftCode = 37;
saveFile.data.rightSideRightCode = 39;
saveFile.data.rightSideShootCode = 100;
saveFile.data.rightSideGrenadeCode = 101;
}
saveFile.flush();
var saveFile = SharedObject.getLocal("SamFish");
if (saveFile.data.eyeType == undefined) {
saveFile.data.eyeType = 10;
saveFile.data.eyeRed = 0;
saveFile.data.eyeGreen = 255;
saveFile.data.eyeBlue = 0;
saveFile.data.red = 50;
saveFile.data.green = 50;
saveFile.data.blue = 50;
saveFile.data.bloodRed = 150;
saveFile.data.bloodGreen = 0;
saveFile.data.bloodBlue = 0;
saveFile.data.leftSideUpCode = 87;
saveFile.data.leftSideDownCode = 83;
saveFile.data.leftSideLeftCode = 65;
saveFile.data.leftSideRightCode = 68;
saveFile.data.leftSideShootCode = 71;
saveFile.data.leftSideGrenadeCode = 72;
saveFile.data.rightSideUpCode = 38;
saveFile.data.rightSideDownCode = 40;
saveFile.data.rightSideLeftCode = 37;
saveFile.data.rightSideRightCode = 39;
saveFile.data.rightSideShootCode = 100;
saveFile.data.rightSideGrenadeCode = 101;
}
saveFile.flush();
menuSelection = "loaded";
}
onClipEvent (enterFrame) {
if (_name == "mainButtons0") {
return(undefined);
}
if ((_root.destX != 0) && (_root.destX != undefined)) {
destX = (currX = _root.destX);
destY = (currY = _root.destY);
_root.destX = (_root.destY = 0);
}
if (menuRollOver == "TRAINING MISSIONS") {
menuDescription = "Training missions to make a deadlier fighter! Get a rating of 'C' or better in each catagory to unlock Microphone Mode! Don't forget to submit your score online!";
}
if (menuRollOver == "GAUNTLET") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
score = saveFile.data.maxCoins;
if (score == undefined) {
score = 0;
}
saveFile.flush();
menuDescription = ("HIGH SCORE: " + score) + "\n\nGet to the level exit on the randomly generated map while collecting coins which can be used to unlock weapons!";
}
if (menuRollOver == "SURVIVAL") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
score = saveFile.data.survivalScore;
if (score == undefined) {
score = 0;
}
saveFile.flush();
menuDescription = ("TIME SURVIVED: " + score) + "\n\nSurvive for as long as you can against the onslaught of enemies, then submit your score online!";
}
if (menuRollOver == "SKIRMISH") {
menuDescription = "Play a quick game against a computer controlled opponent.";
}
if (menuRollOver == "TWO PLAYER") {
menuDescription = "Play against a friend, if you even HAVE one...";
}
if (menuRollOver == "MICROPHONE MODE") {
menuDescription = "Use your microphone to shoot! Complete Training Missions with a rating of 'C' or greater to unlock. One player only.";
}
if (menuRollOver == "WEAPONS SHOP") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
score = saveFile.data.totalCoins;
if (score == undefined) {
score = 0;
}
saveFile.flush();
menuDescription = ("COINS: " + score) + "\n\nBuy weapons and powerups with coins collected from The Gauntlet!";
}
if (menuRollOver == "BASIC TRAINING") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
rank = saveFile.data.basicTraining;
score = saveFile.data.basicTrainingScore;
if (rank == undefined) {
rank = "NONE";
score = 0;
}
saveFile.flush();
menuDescription = ((("RANK: " + rank) + "\nTIMES DIED: ") + score) + "\n\nLearn the basics of the game, such as movement and attacking.";
}
if (menuRollOver == "SNIPER TRAINING") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
rank = saveFile.data.sniperTraining;
score = saveFile.data.sniperTrainingScore;
if (rank == undefined) {
rank = "NONE";
score = 0;
}
saveFile.flush();
menuDescription = ((("RANK: " + rank) + "\nTARGETS DESTROYED: ") + score) + "\n\nTry to hit as many targets as you can within the time limit! Hitting targets adds to time, missisng them subtracts time.";
}
if (menuRollOver == "AGILITY TRAINING") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
rank = saveFile.data.agilityTraining;
score = saveFile.data.agilityTrainingScore;
if (rank == undefined) {
rank = "NONE";
score = 0;
}
saveFile.flush();
menuDescription = ((("RANK: " + rank) + "\nTIME SURVIVED: ") + score) + "\n\nDodge the incomming shots for as long as you can!";
}
if (menuRollOver == "GRENADE TRAINING") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
rank = saveFile.data.grenadeTraining;
score = saveFile.data.grenadeTrainingScore;
if (rank == undefined) {
rank = "NONE";
score = 0;
}
saveFile.flush();
menuDescription = ((("RANK: " + rank) + "\nTARGETS DESTROYED: ") + score) + "\n\nDestroy as many targets as you can with grenades within the time limit! Destroying targets adds to time.";
}
if (menuRollOver == "MICROPHONE TRAINING") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
rank = saveFile.data.microphoneTraining;
score = saveFile.data.microphoneTrainingScore;
if (rank == undefined) {
rank = "NONE";
score = 0;
}
saveFile.flush();
menuDescription = ((("RANK: " + rank) + "\nTARGETS DESTROYED: ") + score) + "\n\nLearn how to use your microphone to shoot, then destroy targets! Get a 'C' rating in the other training missions to unlock.";
}
if (menuRollOver == "NEW GAME") {
menuDescription = "Play training missions, against the computer, or with a friend!";
}
if (menuRollOver == "PROFILES") {
menuDescription = "Create a new or edit an existing profile to save your character's appearance and key configs!";
}
if (menuRollOver == "LEVEL EDITOR") {
menuDescription = "Create or edit maps to play on!";
}
if (menuRollOver == "SETTINGS") {
menuDescription = "Change your graphical and audio settings.";
}
if (menuRollOver == "HELP") {
menuDescription = "Quick instructions on how to play the game.";
}
if (menuRollOver == "DEMO") {
menuDescription = "Watch a demonstration of the game!";
}
if (menuRollOver == "CREDITS") {
menuDescription = "Most things made by Fungus Shark.";
}
if (menuRollOver == "PLAY MORE GAMES") {
menuDescription = "Play other games at ArmorGames.com.";
}
if (menuRollOver == "FUNGUS SHARK") {
menuDescription = "Visit Fungus Shark's website!";
}
if (menuRollOver == "") {
menuDescription = "";
}
if (menuSelection == "BACK TO MAIN") {
var saveFile = SharedObject.getLocal("Sumo");
saveFile.data.pBlood = _root.pBlood;
saveFile.data.pSpark = _root.pSpark;
saveFile.data.pShell = _root.pShell;
saveFile.data.pBoom = _root.pBoom;
saveFile.data._quality = _root._quality;
saveFile.data.musicVolume = _root.musicVolume;
saveFile.data.SFXVolume = _root.SFXVolume;
saveFile.data.micVolume = _root.micVolume;
saveFile.flush();
}
if ((menuSelection == "MAIN MENU") || (menuSelection == "BACK TO MAIN")) {
destX = origX;
destY = origY;
_root.menuPage = 0;
var saveFile = SharedObject.getLocal("Sumo");
saveFile.data.currentPlayer = currentPlayer;
saveFile.data.currentPlayer2 = currentPlayer2;
saveFile.flush();
}
if (menuSelection == "HIGH SCORES") {
getURL ("http://fungus408.cogia.net/smoscores.html", "_blank");
}
if ((menuSelection == "NEW GAME") || (menuSelection == "GAME MENU")) {
destX = -800;
destY = origY;
_root.menuPage = 1;
}
if (menuSelection == "CREDITS") {
destX = origX;
destY = -600;
_root.menuPage = 7;
}
if (menuSelection == "HELP") {
destX = origX;
destY = -1200;
_root.menuPage = -2;
}
if (menuSelection == "SETTINGS") {
destX = origX;
destY = 600;
_root.menuPage = 3;
}
if ((menuSelection == "DELETE PROFILE") && (currentPlayer != 1)) {
var saveFile = SharedObject.getLocal(playerView.playerModel.pName);
saveFile.data.deleted = true;
saveFile.flush();
}
if (menuSelection == "LEFT2") {
do {
var saveFile = SharedObject.getLocal("sumoPlayers");
maxPlayers = saveFile.data.playerNum;
currentPlayer2--;
if (currentPlayer2 < 1) {
currentPlayer2 = maxPlayers;
}
currentName2 = saveFile.data["player" + currentPlayer2];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName2);
currentDeleted2 = saveFile.data.deleted;
saveFile.flush();
} while (currentDeleted2 && (maxPlayers > 1));
}
if (menuSelection == "RIGHT2") {
do {
var saveFile = SharedObject.getLocal("sumoPlayers");
maxPlayers = saveFile.data.playerNum;
currentPlayer2++;
if (currentPlayer2 > maxPlayers) {
currentPlayer2 = 1;
}
currentName2 = saveFile.data["player" + currentPlayer2];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName2);
currentDeleted2 = saveFile.data.deleted;
saveFile.flush();
} while (currentDeleted2 && (maxPlayers > 1));
}
if (menuSelection == "RIGHT") {
do {
var saveFile = SharedObject.getLocal("sumoPlayers");
maxPlayers = saveFile.data.playerNum;
currentPlayer++;
if (currentPlayer > maxPlayers) {
currentPlayer = 1;
}
currentName = saveFile.data["player" + currentPlayer];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName);
currentDeleted = saveFile.data.deleted;
saveFile.flush();
} while (currentDeleted && (maxPlayers > 1));
}
if ((menuSelection == "LEFT") || ((menuSelection == "DELETE PROFILE") && (currentPlayer != 1))) {
do {
var saveFile = SharedObject.getLocal("sumoPlayers");
maxPlayers = saveFile.data.playerNum;
currentPlayer--;
if (currentPlayer < 1) {
currentPlayer = maxPlayers;
}
currentName = saveFile.data["player" + currentPlayer];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName);
currentDeleted = saveFile.data.deleted;
saveFile.flush();
} while (currentDeleted && (maxPlayers > 1));
}
if (menuSelection == "SAVE") {
if (newPlayer) {
var saveFile = SharedObject.getLocal(playerView.playerModel.pName);
if (((saveFile.data.eyeType != undefined) && (!saveFile.data.deleted)) || (playerView.playerModel.pName.length == 0)) {
errorMessage._alpha = 100;
menuSelection = "";
return(undefined);
}
if (saveFile.data.deleted) {
overwriting = true;
} else {
overwriting = false;
}
saveFile.data.deleted = false;
saveFile.flush();
var saveFile = SharedObject.getLocal("sumoPlayers");
if (!overwriting) {
saveFile.data.playerNum++;
saveFile.data["player" + saveFile.data.playerNum] = playerView.playerModel.pName;
if (newPlayer2) {
currentPlayer2 = saveFile.data.playerNum;
} else {
currentPlayer = saveFile.data.playerNum;
}
}
saveFile.flush();
}
var saveFile = SharedObject.getLocal(playerView.playerModel.pName);
if (saveFile.data.pIndex == undefined) {
saveFile.data.pIndex = currentPlayer;
} else if (newPlayer2) {
currentPlayer2 = saveFile.data.pIndex;
} else {
currentPlayer = saveFile.data.pIndex;
}
saveFile.data.eyeType = playerView.playerModel.eyeType;
saveFile.data.eyeRed = playerView.playerModel.eyeRed;
saveFile.data.eyeGreen = playerView.playerModel.eyeGreen;
saveFile.data.eyeBlue = playerView.playerModel.eyeBlue;
saveFile.data.red = playerView.playerModel.red;
saveFile.data.green = playerView.playerModel.green;
saveFile.data.blue = playerView.playerModel.blue;
saveFile.data.bloodRed = playerView.playerModel.bloodRed;
saveFile.data.bloodGreen = playerView.playerModel.bloodGreen;
saveFile.data.bloodBlue = playerView.playerModel.bloodBlue;
saveFile.data.leftSideUpCode = playerView.playerModel.leftSideUpCode;
saveFile.data.leftSideDownCode = playerView.playerModel.leftSideDownCode;
saveFile.data.leftSideLeftCode = playerView.playerModel.leftSideLeftCode;
saveFile.data.leftSideRightCode = playerView.playerModel.leftSideRightCode;
saveFile.data.leftSideShootCode = playerView.playerModel.leftSideShootCode;
saveFile.data.leftSideGrenadeCode = playerView.playerModel.leftSideGrenadeCode;
saveFile.data.rightSideUpCode = playerView.playerModel.rightSideUpCode;
saveFile.data.rightSideDownCode = playerView.playerModel.rightSideDownCode;
saveFile.data.rightSideLeftCode = playerView.playerModel.rightSideLeftCode;
saveFile.data.rightSideRightCode = playerView.playerModel.rightSideRightCode;
saveFile.data.rightSideShootCode = playerView.playerModel.rightSideShootCode;
saveFile.data.rightSideGrenadeCode = playerView.playerModel.rightSideGrenadeCode;
if (playerView.playerModel.pName == "Fungus") {
saveFile.data.spas12 = true;
saveFile.data.super90 = true;
saveFile.data.mk23 = true;
saveFile.data.p226 = true;
saveFile.data.m1911 = true;
saveFile.data.ragingbull = true;
saveFile.data.deserteagle = true;
saveFile.data.glock18 = true;
saveFile.data.tmp = true;
saveFile.data.mac11 = true;
saveFile.data.mp5 = true;
saveFile.data.mp7 = true;
saveFile.data.p90 = true;
saveFile.data.ak74 = true;
saveFile.data.lr300 = true;
saveFile.data.m24 = true;
saveFile.data.psg1 = true;
saveFile.data.rpg7 = true;
saveFile.data.m61 = true;
saveFile.data.m14 = true;
}
saveFile.flush();
}
if (((((menuSelection == "loaded") || (menuSelection == "SAVE")) || (menuSelection == "NEW GAME")) || (menuSelection == "RIGHT2")) || (menuSelection == "LEFT2")) {
var saveFile = SharedObject.getLocal("Sumo");
saveFile.data.currentPlayer2 = currentPlayer2;
saveFile.flush();
var saveFile = SharedObject.getLocal("sumoPlayers");
currentName2 = saveFile.data["player" + currentPlayer2];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName2);
playerView3.playerModel.pName = currentName2;
playerView3.playerModel.eyeType = saveFile.data.eyeType;
playerView3.playerModel.eyeRed = saveFile.data.eyeRed;
playerView3.playerModel.eyeGreen = saveFile.data.eyeGreen;
playerView3.playerModel.eyeBlue = saveFile.data.eyeBlue;
playerView3.playerModel.red = saveFile.data.red;
playerView3.playerModel.green = saveFile.data.green;
playerView3.playerModel.blue = saveFile.data.blue;
playerView3.playerModel.bloodRed = saveFile.data.bloodRed;
playerView3.playerModel.bloodGreen = saveFile.data.bloodGreen;
playerView3.playerModel.bloodBlue = saveFile.data.bloodBlue;
playerView3.playerModel.leftSideUpCode = saveFile.data.leftSideUpCode;
playerView3.playerModel.leftSideDownCode = saveFile.data.leftSideDownCode;
playerView3.playerModel.leftSideLeftCode = saveFile.data.leftSideLeftCode;
playerView3.playerModel.leftSideRightCode = saveFile.data.leftSideRightCode;
playerView3.playerModel.leftSideShootCode = saveFile.data.leftSideShootCode;
playerView3.playerModel.leftSideGrenadeCode = saveFile.data.leftSideGrenadeCode;
playerView3.playerModel.rightSideUpCode = saveFile.data.rightSideUpCode;
playerView3.playerModel.rightSideDownCode = saveFile.data.rightSideDownCode;
playerView3.playerModel.rightSideLeftCode = saveFile.data.rightSideLeftCode;
playerView3.playerModel.rightSideRightCode = saveFile.data.rightSideRightCode;
playerView3.playerModel.rightSideShootCode = saveFile.data.rightSideShootCode;
playerView3.playerModel.rightSideGrenadeCode = saveFile.data.rightSideGrenadeCode;
saveFile.flush();
}
if (((((menuSelection == "loaded") || (menuSelection == "SAVE")) || (menuSelection == "NEW GAME")) || (menuSelection == "RIGHT")) || (menuSelection == "LEFT")) {
var saveFile = SharedObject.getLocal("Sumo");
saveFile.data.currentPlayer = currentPlayer;
saveFile.flush();
var saveFile = SharedObject.getLocal("sumoPlayers");
currentName = saveFile.data["player" + currentPlayer];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName);
playerView2.playerModel.pName = currentName;
playerView2.playerModel.eyeType = saveFile.data.eyeType;
playerView2.playerModel.eyeRed = saveFile.data.eyeRed;
playerView2.playerModel.eyeGreen = saveFile.data.eyeGreen;
playerView2.playerModel.eyeBlue = saveFile.data.eyeBlue;
playerView2.playerModel.red = saveFile.data.red;
playerView2.playerModel.green = saveFile.data.green;
playerView2.playerModel.blue = saveFile.data.blue;
playerView2.playerModel.bloodRed = saveFile.data.bloodRed;
playerView2.playerModel.bloodGreen = saveFile.data.bloodGreen;
playerView2.playerModel.bloodBlue = saveFile.data.bloodBlue;
playerView2.playerModel.leftSideUpCode = saveFile.data.leftSideUpCode;
playerView2.playerModel.leftSideDownCode = saveFile.data.leftSideDownCode;
playerView2.playerModel.leftSideLeftCode = saveFile.data.leftSideLeftCode;
playerView2.playerModel.leftSideRightCode = saveFile.data.leftSideRightCode;
playerView2.playerModel.leftSideShootCode = saveFile.data.leftSideShootCode;
playerView2.playerModel.leftSideGrenadeCode = saveFile.data.leftSideGrenadeCode;
playerView2.playerModel.rightSideUpCode = saveFile.data.rightSideUpCode;
playerView2.playerModel.rightSideDownCode = saveFile.data.rightSideDownCode;
playerView2.playerModel.rightSideLeftCode = saveFile.data.rightSideLeftCode;
playerView2.playerModel.rightSideRightCode = saveFile.data.rightSideRightCode;
playerView2.playerModel.rightSideShootCode = saveFile.data.rightSideShootCode;
playerView2.playerModel.rightSideGrenadeCode = saveFile.data.rightSideGrenadeCode;
saveFile.flush();
}
if ((((((menuSelection == "loaded") || (menuSelection == "RIGHT")) || (menuSelection == "LEFT")) || (menuSelection == "CANCEL")) || (menuSelection == "PROFILES")) || (menuSelection == "DELETE PROFILE")) {
var saveFile = SharedObject.getLocal("sumoPlayers");
currentName = saveFile.data["player" + currentPlayer];
saveFile.flush();
var saveFile = SharedObject.getLocal(currentName);
playerView.playerModel.pName = currentName;
playerView.playerModel.eyeType = saveFile.data.eyeType;
playerView.playerModel.eyeRed = saveFile.data.eyeRed;
playerView.playerModel.eyeGreen = saveFile.data.eyeGreen;
playerView.playerModel.eyeBlue = saveFile.data.eyeBlue;
playerView.playerModel.red = saveFile.data.red;
playerView.playerModel.green = saveFile.data.green;
playerView.playerModel.blue = saveFile.data.blue;
playerView.playerModel.bloodRed = saveFile.data.bloodRed;
playerView.playerModel.bloodGreen = saveFile.data.bloodGreen;
playerView.playerModel.bloodBlue = saveFile.data.bloodBlue;
playerView.playerModel.leftSideUpCode = saveFile.data.leftSideUpCode;
playerView.playerModel.leftSideDownCode = saveFile.data.leftSideDownCode;
playerView.playerModel.leftSideLeftCode = saveFile.data.leftSideLeftCode;
playerView.playerModel.leftSideRightCode = saveFile.data.leftSideRightCode;
playerView.playerModel.leftSideShootCode = saveFile.data.leftSideShootCode;
playerView.playerModel.leftSideGrenadeCode = saveFile.data.leftSideGrenadeCode;
playerView.playerModel.rightSideUpCode = saveFile.data.rightSideUpCode;
playerView.playerModel.rightSideDownCode = saveFile.data.rightSideDownCode;
playerView.playerModel.rightSideLeftCode = saveFile.data.rightSideLeftCode;
playerView.playerModel.rightSideRightCode = saveFile.data.rightSideRightCode;
playerView.playerModel.rightSideShootCode = saveFile.data.rightSideShootCode;
playerView.playerModel.rightSideGrenadeCode = saveFile.data.rightSideGrenadeCode;
saveFile.flush();
}
if (((menuSelection == "NEW PROFILE") || (menuSelection == "CREATE NEW")) || (menuSelection == "CREATE NEW.")) {
newPlayer = true;
}
if (menuSelection == "EDIT PROFILE") {
newPlayer = false;
}
if (!newPlayer) {
var saveFile = SharedObject.getLocal("sumoPlayers");
playerView.playerModel.pName = saveFile.data["player" + currentPlayer];
saveFile.flush();
}
playerView.playerModel.pName = _root.validName(playerView.playerModel.pName);
playerView2.playerModel.pName = _root.validName(playerView2.playerModel.pName);
playerView3.playerModel.pName = _root.validName(playerView3.playerModel.pName);
if ((((menuSelection == "PROFILES") || (menuSelection == "SAVE")) || (menuSelection == "CANCEL")) || (menuSelection == "BACK")) {
if ((newGame && (menuSelection != "PROFILES")) && (menuSelection != "BACK")) {
destX = -800;
destY = origY;
_root.menuPage = 1;
} else {
destX = 800;
destY = origY;
_root.menuPage = 4;
}
}
if (((((menuSelection == "EDIT PROFILE") || (menuSelection == "NEW PROFILE")) || (menuSelection == "EDIT APPEARANCE >>")) || (menuSelection == "CREATE NEW")) || (menuSelection == "CREATE NEW.")) {
destX = 800;
destY = 600;
_root.menuPage = 5;
if ((menuSelection == "CREATE NEW") || (menuSelection == "CREATE NEW.")) {
newGame = true;
} else {
newGame = false;
}
if (menuSelection == "CREATE NEW.") {
newPlayer2 = true;
} else {
newPlayer2 = false;
}
}
if (menuSelection == "<< EDIT KEY CONFIG") {
if (newPlayer) {
var saveFile = SharedObject.getLocal(playerView.playerModel.pName);
if (((saveFile.data.eyeType != undefined) && (!saveFile.data.deleted)) || (playerView.playerModel.pName.length == 0)) {
errorMessage._alpha = 100;
menuSelection = "";
return(undefined);
}
}
destX = 1600;
destY = 600;
_root.menuPage = 12;
}
if (menuSelection == "VIEW STATS") {
destX = 1600;
destY = 0;
_root.menuPage = 11;
}
if (menuSelection == "RANDOM") {
playerView2.playerModel.eyeRed = Math.floor(Math.random() * 255);
playerView2.playerModel.eyeGreen = Math.floor(Math.random() * 255);
playerView2.playerModel.eyeBlue = Math.floor(Math.random() * 255);
playerView2.playerModel.eyeType = Math.floor(Math.random() * 10) + 1;
playerView2.playerModel.eyes.fill.gotoAndStop(eyeType);
playerView2.playerModel.red = Math.floor(Math.random() * 255);
playerView2.playerModel.green = Math.floor(Math.random() * 255);
playerView2.playerModel.blue = Math.floor(Math.random() * 255);
playerView2.playerModel.bloodRed = Math.floor(Math.random() * 255);
playerView2.playerModel.bloodGreen = Math.floor(Math.random() * 255);
playerView2.playerModel.bloodBlue = Math.floor(Math.random() * 255);
}
if (menuSelection == "RANDOM.") {
playerView3.playerModel.eyeRed = Math.floor(Math.random() * 255);
playerView3.playerModel.eyeGreen = Math.floor(Math.random() * 255);
playerView3.playerModel.eyeBlue = Math.floor(Math.random() * 255);
playerView3.playerModel.eyeType = Math.floor(Math.random() * 10) + 1;
playerView3.playerModel.eyes.fill.gotoAndStop(eyeType);
playerView3.playerModel.red = Math.floor(Math.random() * 255);
playerView3.playerModel.green = Math.floor(Math.random() * 255);
playerView3.playerModel.blue = Math.floor(Math.random() * 255);
playerView3.playerModel.bloodRed = Math.floor(Math.random() * 255);
playerView3.playerModel.bloodGreen = Math.floor(Math.random() * 255);
playerView3.playerModel.bloodBlue = Math.floor(Math.random() * 255);
}
if (((menuSelection == "NEW PROFILE") || (menuSelection == "CREATE NEW")) || (menuSelection == "CREATE NEW.")) {
playerView.playerModel.pName = "Default";
playerView.playerModel.red = 153;
playerView.playerModel.green = 153;
playerView.playerModel.blue = 153;
playerView.playerModel.eyeRed = 0;
playerView.playerModel.eyeGreen = 0;
playerView.playerModel.eyeBlue = 0;
playerView.playerModel.eyeType = 1;
playerView.playerModel.eyes.fill.gotoAndStop(eyeType);
playerView.playerModel.bloodRed = 150;
playerView.playerModel.bloodGreen = 0;
playerView.playerModel.bloodBlue = 0;
playerView.playerModel.leftSideUpCode = 87;
playerView.playerModel.leftSideDownCode = 83;
playerView.playerModel.leftSideLeftCode = 65;
playerView.playerModel.leftSideRightCode = 68;
playerView.playerModel.leftSideShootCode = 71;
playerView.playerModel.leftSideGrenadeCode = 72;
playerView.playerModel.rightSideUpCode = 38;
playerView.playerModel.rightSideDownCode = 40;
playerView.playerModel.rightSideLeftCode = 37;
playerView.playerModel.rightSideRightCode = 39;
playerView.playerModel.rightSideShootCode = 100;
playerView.playerModel.rightSideGrenadeCode = 101;
}
if ((menuSelection == "Random Eyes") || (menuSelection == "Random All")) {
playerView.playerModel.eyeRed = Math.floor(Math.random() * 255);
playerView.playerModel.eyeGreen = Math.floor(Math.random() * 255);
playerView.playerModel.eyeBlue = Math.floor(Math.random() * 255);
playerView.playerModel.eyeType = Math.floor(Math.random() * 10) + 1;
playerView.playerModel.eyes.fill.gotoAndStop(eyeType);
}
if ((menuSelection == "Random Body") || (menuSelection == "Random All")) {
playerView.playerModel.red = Math.floor(Math.random() * 255);
playerView.playerModel.green = Math.floor(Math.random() * 255);
playerView.playerModel.blue = Math.floor(Math.random() * 255);
}
if ((menuSelection == "Random Blood") || (menuSelection == "Random All")) {
playerView.playerModel.bloodRed = Math.floor(Math.random() * 255);
playerView.playerModel.bloodGreen = Math.floor(Math.random() * 255);
playerView.playerModel.bloodBlue = Math.floor(Math.random() * 255);
}
if (menuSelection == "Default Graphics") {
_root.pShell = true;
_root.pBlood = true;
_root.pSpark = true;
_root.pBoom = 1;
_root._quality = "HIGH";
}
if (menuSelection == "Default Keys") {
playerView.playerModel.leftSideUpCode = 87;
playerView.playerModel.leftSideDownCode = 83;
playerView.playerModel.leftSideLeftCode = 65;
playerView.playerModel.leftSideRightCode = 68;
playerView.playerModel.leftSideShootCode = 71;
playerView.playerModel.leftSideGrenadeCode = 72;
playerView.playerModel.rightSideUpCode = 38;
playerView.playerModel.rightSideDownCode = 40;
playerView.playerModel.rightSideLeftCode = 37;
playerView.playerModel.rightSideRightCode = 39;
playerView.playerModel.rightSideShootCode = 100;
playerView.playerModel.rightSideGrenadeCode = 101;
}
if ((menuSelection == "Default Eyes") || (menuSelection == "Default All")) {
playerView.playerModel.eyeRed = 0;
playerView.playerModel.eyeGreen = 0;
playerView.playerModel.eyeBlue = 0;
playerView.playerModel.eyeType = 1;
playerView.playerModel.eyes.fill.gotoAndStop(eyeType);
}
if ((menuSelection == "Default Body") || (menuSelection == "Default All")) {
playerView.playerModel.red = 153;
playerView.playerModel.green = 153;
playerView.playerModel.blue = 153;
}
if ((menuSelection == "Default Blood") || (menuSelection == "Default All")) {
playerView.playerModel.bloodRed = 150;
playerView.playerModel.bloodGreen = 0;
playerView.playerModel.bloodBlue = 0;
}
if (menuSelection == "PLAY MORE GAMES") {
getURL ("http://www.armorgames.com", "_blank");
}
if (menuSelection == "FUNGUS SHARK") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
if (saveFile.data.visitFungus != true) {
if (saveFile.data.totalCoins == undefined) {
saveFile.data.totalCoins = 20;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins + 20;
}
saveFile.data.visitFungus = true;
getURL ("http://fungus408.cogia.net/Coins.html", "_blank");
} else {
getURL ("http://fungus408.cogia.net", "_blank");
}
saveFile.flush();
}
if (menuSelection == "TRAINING MISSIONS") {
destX = -800;
destY = 600;
_root.menuPage = 15;
}
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
if (((((((((menuSelection == "MICROPHONE TRAINING") && (saveFile.data.sniperTrainingScore >= 7)) && (saveFile.data.agilityTrainingScore >= 20)) && (saveFile.data.grenadeTrainingScore >= 5)) && (saveFile.data.basicTrainingScore <= 2)) && (saveFile.data.sniperTrainingScore != undefined)) && (saveFile.data.agilityTrainingScore != undefined)) && (saveFile.data.grenadeTrainingScore != undefined)) && (saveFile.data.basicTrainingScore != undefined)) {
micUnlock = true;
} else {
micUnlock = false;
}
if (((menuSelection == "MICROPHONE MODE") && (saveFile.data.microphoneTrainingScore >= 5)) && (saveFile.data.microphoneTrainingScore != undefined)) {
micUnlock2 = true;
} else {
micUnlock2 = false;
}
if (playerView2.playerModel.pName == "Fungus") {
micUnlock = (micUnlock2 = true);
}
if ((menuSelection == "MICROPHONE TRAINING") && (!micUnlock)) {
modeLocked._alpha = 100;
}
if ((menuSelection == "MICROPHONE MODE") && (!micUnlock2)) {
modeLocked2._alpha = 100;
}
if ((((((((((((menuSelection == "LEVEL EDITOR") || (menuSelection == "WEAPONS SHOP")) || (menuSelection == "SURVIVAL")) || ((menuSelection == "MICROPHONE MODE") && (micUnlock2))) || (menuSelection == "GAUNTLET")) || ((menuSelection == "MICROPHONE TRAINING") && (micUnlock))) || (menuSelection == "GRENADE TRAINING")) || (menuSelection == "SNIPER TRAINING")) || (menuSelection == "AGILITY TRAINING")) || (menuSelection == "SKIRMISH")) || (menuSelection == "TWO PLAYER")) || (menuSelection == "BASIC TRAINING")) {
_root.leftName = playerView2.playerModel.pName;
_root.leftEyeType = playerView2.playerModel.eyeType;
_root.leftEyeRed = playerView2.playerModel.eyeRed;
_root.leftEyeGreen = playerView2.playerModel.eyeGreen;
_root.leftEyeBlue = playerView2.playerModel.eyeBlue;
_root.leftRed = playerView2.playerModel.red;
_root.leftGreen = playerView2.playerModel.green;
_root.leftBlue = playerView2.playerModel.blue;
_root.leftBloodRed = playerView2.playerModel.bloodRed;
_root.leftBloodGreen = playerView2.playerModel.bloodGreen;
_root.leftBloodBlue = playerView2.playerModel.bloodBlue;
_root.leftSideUpCode = playerView2.playerModel.leftSideUpCode;
_root.leftSideDownCode = playerView2.playerModel.leftSideDownCode;
_root.leftSideLeftCode = playerView2.playerModel.leftSideLeftCode;
_root.leftSideRightCode = playerView2.playerModel.leftSideRightCode;
_root.leftSideShootCode = playerView2.playerModel.leftSideShootCode;
_root.leftSideGrenadeCode = playerView2.playerModel.leftSideGrenadeCode;
_root.rightName = playerView3.playerModel.pName;
_root.rightEyeType = playerView3.playerModel.eyeType;
_root.rightEyeRed = playerView3.playerModel.eyeRed;
_root.rightEyeGreen = playerView3.playerModel.eyeGreen;
_root.rightEyeBlue = playerView3.playerModel.eyeBlue;
_root.rightRed = playerView3.playerModel.red;
_root.rightGreen = playerView3.playerModel.green;
_root.rightBlue = playerView3.playerModel.blue;
_root.rightBloodRed = playerView3.playerModel.bloodRed;
_root.rightBloodGreen = playerView3.playerModel.bloodGreen;
_root.rightBloodBlue = playerView3.playerModel.bloodBlue;
_root.rightSideUpCode = playerView3.playerModel.rightSideUpCode;
_root.rightSideDownCode = playerView3.playerModel.rightSideDownCode;
_root.rightSideLeftCode = playerView3.playerModel.rightSideLeftCode;
_root.rightSideRightCode = playerView3.playerModel.rightSideRightCode;
_root.rightSideShootCode = playerView3.playerModel.rightSideShootCode;
_root.rightSideGrenadeCode = playerView3.playerModel.rightSideGrenadeCode;
stopAllSounds();
removeMovieClip(_root.menuFade);
_visible = false;
_root._x = (_root._y = 0);
_root.playerNum = 1;
if (menuSelection == "TWO PLAYER") {
_root.playerNum = 2;
}
_root.systemVolume = _root.SFXVolume;
if (menuSelection == "MICROPHONE MODE") {
_root.micControl = true;
}
if (((menuSelection == "SKIRMISH") || (menuSelection == "TWO PLAYER")) || (menuSelection == "MICROPHONE MODE")) {
_root.gotoAndStop("Skirmish");
}
if (menuSelection == "BASIC TRAINING") {
_root.gotoAndStop("BasicTraining");
}
if (menuSelection == "AGILITY TRAINING") {
_root.gotoAndStop("AgilityTraining");
}
if (menuSelection == "SNIPER TRAINING") {
_root.gotoAndStop("SniperTraining");
}
if (menuSelection == "GRENADE TRAINING") {
_root.gotoAndStop("GrenadeTraining");
}
if (menuSelection == "MICROPHONE TRAINING") {
_root.gotoAndStop("MicrophoneTraining");
}
if (menuSelection == "SURVIVAL") {
_root.gotoAndStop("Survival");
}
if (menuSelection == "GAUNTLET") {
var saveFile = SharedObject.getLocal(playerView2.playerModel.pName);
if (saveFile.data.totalCoins == undefined) {
_root.totalCoins = (saveFile.data.totalCoins = 0);
} else {
_root.totalCoins = saveFile.data.totalCoins;
}
saveFile.flush();
_root.gotoAndStop("Gauntlet");
}
if (menuSelection == "WEAPONS SHOP") {
_root.gotoAndStop("WeaponsShop");
}
if (menuSelection == "LEVEL EDITOR") {
_root.gotoAndStop("MapEditor");
}
removeMovieClip(this);
}
if (_root.menuPage == -1) {
if (_root.menuFade._alpha > 0) {
_root.menuFade._alpha = _root.menuFade._alpha - 5;
}
if (_root.systemVolume < _root.SFXVolume) {
_root.systemVolume++;
}
} else {
if (_root.menuFade._alpha < 100) {
_root.menuFade._alpha = _root.menuFade._alpha + 5;
}
if (_root.systemVolume > 0) {
_root.systemVolume--;
}
}
currX = currX + ((destX - currX) / 10);
currY = currY + ((destY - currY) / 10);
if (currY >= 0) {
playerView.playerModel._y = 80 - currY;
} else {
playerView.playerModel._y = 80;
}
if (currX >= 800) {
playerView.playerModel._x = (21 - currX) + 800;
} else {
playerView.playerModel._x = 21;
}
eyeTypeBar.slideBar._x = (255 * (playerView.playerModel.eyeType - 1)) / 10;
eyeRedBar.slideBar._x = playerView.playerModel.eyeRed;
eyeGreenBar.slideBar._x = playerView.playerModel.eyeGreen;
eyeBlueBar.slideBar._x = playerView.playerModel.eyeBlue;
bodyRedBar.slideBar._x = playerView.playerModel.red;
bodyGreenBar.slideBar._x = playerView.playerModel.green;
bodyBlueBar.slideBar._x = playerView.playerModel.blue;
bloodRedBar.slideBar._x = playerView.playerModel.bloodRed;
bloodGreenBar.slideBar._x = playerView.playerModel.bloodGreen;
bloodBlueBar.slideBar._x = playerView.playerModel.bloodBlue;
menuSelection = "";
}
Frame 42
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 42
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 42
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((((((_root.player1._x > leftBound) && (_root.player2._x > leftBound)) && (_root.player1._x < rightBound)) && (_root.player2._x < rightBound)) && (_root.player1._y < bottomBound)) && (_root.player2._y < bottomBound)) && (_root.player1._y > topBound)) && (_root.player2._y > topBound)) {
destX = -(((_root.player1._x + _root.player2._x) / 2) - (screenWidth / 2));
destY = -(((_root.player1._y + _root.player2._y) / 2) - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else if ((((_root.player2._x > leftBound) && (_root.player2._x < rightBound)) && (_root.player2._y > topBound)) && (_root.player2._y < bottomBound)) {
destX = -(_root.player2._x - (screenWidth / 2));
destY = -(_root.player2._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.optionPane._x = _root.optionPane.origX - _root._x;
_root.optionPane._y = _root.optionPane.origY - _root._y;
_root.winControl._x = _root.winControl.origX - _root._x;
_root.winControl._y = _root.winControl.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 42
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 258 MovieClip in Frame 42
onClipEvent (load) {
stopAllSounds();
pompeiiShort = new Sound(this);
pompeiiShort.attachSound("pompeiiShort");
pompeiiShort.setVolume(_root.musicVolume);
pompeiiShort.start(0, 9999999);
}
onClipEvent (enterFrame) {
pompeiiShort.setVolume(_root.musicVolume);
}
Instance of Symbol 266 MovieClip "shell0" in Frame 42
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 42
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 42
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 42
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 42
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 42
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 42
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 42
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 42
onClipEvent (load) {
if (longWeapon) {
xLength = -15;
} else if (longWeapon) {
xLength = -15;
} else {
xLength = 0;
}
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
if (shootSpeed < 10) {
c = 3;
}
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
if (shootSpeed < 10) {
c = 3;
}
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
if (shootSpeed < 5) {
break;
}
if (shootSpeed < 10) {
c = 1;
}
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
if (shootSpeed < 10) {
c = 2;
}
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 477 MovieClip "rocket0" in Frame 42
onClipEvent (load) {
range = 250;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
xLength = 0;
smoke._xscale = 10;
hit = false;
speed = 1;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
rocketFire = new Sound(this);
rocketFire.attachSound("rocketFire");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "rocket0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (speed == 1) {
rocketFire.start(0, 1);
}
speed = speed + 2;
if (speed > 25) {
speed = 25;
}
if (hit) {
head._visible = false;
flame._visible = false;
_alpha = (_alpha - 10);
if (((_alpha <= 0) && (rocketFire.position == rocketFire.duration)) && (explodeSound.position == explodeSound.duration)) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 300) {
xLength = xLength + 15;
}
if (xLength > 0) {
smoke._xscale = xLength;
} else {
smoke._xscale = 0;
}
_xscale = (100 * xDirection);
if (owner == 1) {
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (p2d < 50) {
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
hit = true;
}
}
if (owner == 2) {
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (p1d < 50) {
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if ((_x > (_root.maps.rightBound + 400)) && (rocketFire.position == rocketFire.duration)) {
removeMovieClip(this);
}
if ((_x < (_root.maps.leftBound - 400)) && (rocketFire.position == rocketFire.duration)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "pellet0" in Frame 42
onClipEvent (load) {
trail._visible = false;
_rotation = ((Math.random() * 20) - 10);
hit = false;
speed = 30;
xLength = -15;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pellet0") {
return(undefined);
}
xLength = xLength + 5;
if (xLength < 0) {
_visible = false;
} else {
_visible = true;
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume / 2);
if (hit) {
_visible = false;
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
if (Math.floor(Math.random() * 2) == 0) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
if (Math.floor(Math.random() * 2) == 0) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
}
break;
}
_x = (_x + ((xDirection * 10) * Math.cos((_rotation * Math.PI) / 180)));
_y = (_y + ((xDirection * 10) * Math.sin((_rotation * Math.PI) / 180)));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 288 MovieClip "pistolClip0" in Frame 42
onClipEvent (load) {
xVel = 0;
yVel = 0;
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pistolClip0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 484 MovieClip "grenadePowerup0" in Frame 42
onClipEvent (load) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.spas12 == undefined) {
saveFile.data.spas12 = false;
}
if (saveFile.data.super90 == undefined) {
saveFile.data.super90 = false;
}
if (saveFile.data.mk23 == undefined) {
saveFile.data.mk23 = false;
}
if (saveFile.data.p226 == undefined) {
saveFile.data.p226 = false;
}
if (saveFile.data.m1911 == undefined) {
saveFile.data.m1911 = false;
}
if (saveFile.data.ragingbull == undefined) {
saveFile.data.ragingbull = false;
}
if (saveFile.data.deserteagle == undefined) {
saveFile.data.deserteagle = false;
}
if (saveFile.data.glock18 == undefined) {
saveFile.data.glock18 = false;
}
if (saveFile.data.tmp == undefined) {
saveFile.data.tmp = false;
}
if (saveFile.data.mac11 == undefined) {
saveFile.data.mac11 = false;
}
if (saveFile.data.mp5 == undefined) {
saveFile.data.mp5 = false;
}
if (saveFile.data.mp7 == undefined) {
saveFile.data.mp7 = false;
}
if (saveFile.data.p90 == undefined) {
saveFile.data.p90 = false;
}
if (saveFile.data.ak74 == undefined) {
saveFile.data.ak74 = false;
}
if (saveFile.data.lr300 == undefined) {
saveFile.data.lr300 = false;
}
if (saveFile.data.m24 == undefined) {
saveFile.data.m24 = false;
}
if (saveFile.data.psg1 == undefined) {
saveFile.data.psg1 = false;
}
if (saveFile.data.rpg7 == undefined) {
saveFile.data.rpg7 = false;
}
if (saveFile.data.m61 == undefined) {
saveFile.data.m61 = false;
}
if (saveFile.data.m14 == undefined) {
saveFile.data.m14 = false;
}
saveFile.flush();
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.spas12 == undefined) {
saveFile.data.spas12 = false;
}
if (saveFile.data.super90 == undefined) {
saveFile.data.super90 = false;
}
if (saveFile.data.mk23 == undefined) {
saveFile.data.mk23 = false;
}
if (saveFile.data.p226 == undefined) {
saveFile.data.p226 = false;
}
if (saveFile.data.m1911 == undefined) {
saveFile.data.m1911 = false;
}
if (saveFile.data.ragingbull == undefined) {
saveFile.data.ragingbull = false;
}
if (saveFile.data.deserteagle == undefined) {
saveFile.data.deserteagle = false;
}
if (saveFile.data.glock18 == undefined) {
saveFile.data.glock18 = false;
}
if (saveFile.data.tmp == undefined) {
saveFile.data.tmp = false;
}
if (saveFile.data.mac11 == undefined) {
saveFile.data.mac11 = false;
}
if (saveFile.data.mp5 == undefined) {
saveFile.data.mp5 = false;
}
if (saveFile.data.mp7 == undefined) {
saveFile.data.mp7 = false;
}
if (saveFile.data.p90 == undefined) {
saveFile.data.p90 = false;
}
if (saveFile.data.ak74 == undefined) {
saveFile.data.ak74 = false;
}
if (saveFile.data.lr300 == undefined) {
saveFile.data.lr300 = false;
}
if (saveFile.data.m24 == undefined) {
saveFile.data.m24 = false;
}
if (saveFile.data.psg1 == undefined) {
saveFile.data.psg1 = false;
}
if (saveFile.data.rpg7 == undefined) {
saveFile.data.rpg7 = false;
}
if (saveFile.data.m61 == undefined) {
saveFile.data.m61 = false;
}
if (saveFile.data.m14 == undefined) {
saveFile.data.m14 = false;
}
saveFile.flush();
}
onClipEvent (load) {
xVel = 0;
yVel = 0;
pickup = new Sound(this);
pickup.attachSound("pickup");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("cardboardImpact");
grenadeSound = new Sound(this);
if (Math.floor(Math.random() * 2) == 0) {
_rotation = 25;
} else {
_rotation = -25;
}
}
onClipEvent (enterFrame) {
if ((_root.gamePaused || (!_root.HUD.startTimer)) || (!_root.supplyDrop)) {
return(undefined);
}
if (_name == "grenadePowerup0") {
if (Math.floor(Math.random() * 500) == 0) {
_root.grenadePowerup0.duplicateMovieClip("grenadePowerup" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenadePowerup" + _root.particleDepth]._x = (Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound;
_root["grenadePowerup" + _root.particleDepth]._y = _root.maps.topBound - 500;
do {
_root["grenadePowerup" + _root.particleDepth].rndg = Math.floor((Math.random() * 21) + 1);
} while ((_root["grenadePowerup" + _root.particleDepth].rndg <= 7) && (_root["grenadePowerup" + _root.particleDepth].rndg >= 3));
var saveFile = SharedObject.getLocal(_root.player1.pName);
var saveFile2 = SharedObject.getLocal(_root.player2.pName);
if (((_root["grenadePowerup" + _root.particleDepth].rndg == 1) && (saveFile.data.spas12 != true)) && (saveFile2.data.spas12 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 2) && (saveFile.data.super90 != true)) && (saveFile2.data.super90 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 8) && (saveFile.data.glock18 != true)) && (saveFile2.data.glock18 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 9) && (saveFile.data.tmp != true)) && (saveFile2.data.tmp != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 10) && (saveFile.data.mac11 != true)) && (saveFile2.data.mac11 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 11) && (saveFile.data.mp5 != true)) && (saveFile2.data.mp5 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 12) && (saveFile.data.mp7 != true)) && (saveFile2.data.mp7 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 13) && (saveFile.data.p90 != true)) && (saveFile2.data.p90 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 14) && (saveFile.data.ak74 != true)) && (saveFile2.data.ak74 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 15) && (saveFile.data.lr300 != true)) && (saveFile2.data.lr300 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 16) && (saveFile.data.m24 != true)) && (saveFile2.data.m24 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 17) && (saveFile.data.psg1 != true)) && (saveFile2.data.psg1 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 18) && (saveFile.data.rpg7 != true)) && (saveFile2.data.rpg7 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 19) && (saveFile.data.m61 != true)) && (saveFile2.data.m61 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else if (((_root["grenadePowerup" + _root.particleDepth].rndg == 20) && (saveFile.data.m14 != true)) && (saveFile2.data.m14 != true)) {
removeMovieClip(_root["grenadePowerup" + _root.particleDepth]);
} else {
_root.particleDepth++;
}
}
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
c = 0;
while (c < Math.abs(yVel)) {
if (_root.maps.hitTest(_x, _y + 1, true)) {
if (yVel > 1) {
playerImpact2.start(0, 1);
}
if (_rotation > 0) {
_rotation = (_rotation - 5);
}
if (_rotation < 0) {
_rotation = (_rotation + 5);
}
yVel = 0;
break;
}
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
yVel++;
pX = _root.player1._x - _x;
pY = _root.player1._y - _y;
pDist = Math.sqrt((pX * pX) + (pY * pY));
pX2 = _root.player2._x - _x;
pY2 = _root.player2._y - _y;
pDist2 = Math.sqrt((pX2 * pX2) + (pY2 * pY2));
if (pDist < 35) {
if ((rndg <= 20) && (rndg != _root.player1.gun.guns._currentframe)) {
_root.player1.gun.guns.gotoAndStop(rndg);
_root.player1.reloading = false;
_root.player1.shootCount = 0;
_root.player1.holsterCount = 50;
} else {
_root.player1.grenadeCount = _root.player1.grenadeCount + 3;
}
pickup.start(0, 1);
removeMovieClip(this);
}
if (pDist2 < 35) {
if ((rndg <= 20) && (rndg != _root.player2.gun.guns._currentframe)) {
_root.player2.gun.guns.gotoAndStop(rndg);
_root.player2.reloading = false;
_root.player2.shootCount = 0;
_root.player2.holsterCount = 50;
} else {
_root.player2.grenadeCount = _root.player2.grenadeCount + 3;
}
pickup.start(0, 1);
removeMovieClip(this);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 42
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 42
onClipEvent (load) {
spawned = false;
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
if (_root.micControl) {
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
} else {
this.attachAudio(false);
attached = false;
}
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (!spawned) {
_y = (_root.maps.topBound - 400);
}
if (_root.gamePaused || (!_root.HUD.startTimer)) {
return(undefined);
}
if (!spawned) {
spawned = true;
_y = (_root.maps.topBound - 400);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused || (!_root.HUD.startTimer)) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount >= 50) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if (((_root.micControl && (kshoot)) && (shootCount >= 0)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
clipSize--;
xVel = xVel - (xDirection * recoil);
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].shootSpeed = shootSpeed;
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 1000)) {
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
}
if (_y > (_root.maps.bottomBound + 2500)) {
gibbed = false;
_root.player2.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
gun.guns.gotoAndStop(3);
sidearm = 3;
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 350 MovieClip "player2" in Frame 42
onClipEvent (load) {
spawned = false;
pName = _root.rightName;
red = _root.rightRed;
green = _root.rightGreen;
blue = _root.rightBlue;
eyeRed = _root.rightEyeRed;
eyeGreen = _root.rightEyeGreen;
eyeBlue = _root.rightEyeBlue;
eyeType = _root.rightEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.rightBloodRed;
bloodGreen = _root.rightBloodGreen;
bloodBlue = _root.rightBloodBlue;
upCode = _root.rightSideUpCode;
downCode = _root.rightSideDownCode;
leftCode = _root.rightSideLeftCode;
rightCode = _root.rightSideRightCode;
shootCode = _root.rightSideShootCode;
grenadeCode = _root.rightSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
groundY = 350;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
recoil = 1;
power = 20;
holsterCount = 0;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
shootCountAI = (prevVel = (jumpCountAI = 0));
}
onClipEvent (enterFrame) {
if (_root.gamePaused || (!_root.HUD.startTimer)) {
return(undefined);
}
if (_root.playerNum == 2) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
} else if (_root.playerNum <= 1) {
if (homein) {
if (_root.player1._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player1._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 100)) || ((_root.player1._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player1._x < _x)) || (((_root.player1._x + 200) < _x) && (_root.player1.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 100)) || ((_root.player1._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player1._x > _x)) || (((_root.player1._x - 200) > _x) && (_root.player1.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player1._y - _y) < -50) && ((_root.player1._y > (_root.maps.topBound - 50)) || (_root.player1.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player1._y > _y) && (_root.player1.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player1._y - _y) < (Math.random() * 100)) && (_root.player1._y > (_root.maps.topBound - 50))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player1._x > _x) {
kright = true;
kleft = false;
}
if (_root.player1._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (!spawned) {
_y = (_root.maps.topBound - 400);
}
if (_root.gamePaused || (!_root.HUD.startTimer)) {
return(undefined);
}
if (!spawned) {
spawned = true;
_y = (_root.maps.topBound - 400);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
}
if (shooting) {
holsterCount++;
if (holsterCount >= 50) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if (kshoot && (shootCount >= shootSpeed)) {
xVel = xVel - (xDirection * recoil);
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
clipSize--;
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 2;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 2;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].shootSpeed = shootSpeed;
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 2;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
xVel = (-xVel) / 2;
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 1000)) {
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
}
if (_y > (_root.maps.bottomBound + 2500)) {
gibbed = false;
_root.player1.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
gun.guns.gotoAndStop(3);
sidearm = 3;
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 357 MovieClip "arrowIndicator1" in Frame 42
onClipEvent (load) {
pName = _root.player1.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player1._x - _x;
yD = _root.player1._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if ((pDist < 400) || (!_root.HUD.startTimer)) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player1.red, _root.player1.green, _root.player1.blue, 100);
}
Instance of Symbol 357 MovieClip "arrowIndicator2" in Frame 42
onClipEvent (load) {
pName = _root.player2.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player2._x - _x;
yD = _root.player2._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if ((pDist < 400) || (!_root.HUD.startTimer)) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player2.red, _root.player2.green, _root.player2.blue, 100);
}
Instance of Symbol 514 MovieClip "HUD" in Frame 42
onClipEvent (load) {
goPlayed = true;
origX = _x;
origY = _y;
bLabel = "MAIN MENU";
startTimer = false;
}
onClipEvent (enterFrame) {
if (!goPlayed) {
goSign.play();
goPlayed = true;
}
}
Instance of Symbol 517 MovieClip "winControl" in Frame 42
onClipEvent (load) {
origX = _x;
origY = _y;
_visible = false;
select = new Sound(this);
select.attachSound("select");
}
onClipEvent (enterFrame) {
if (_root.HUD.startTimer) {
if ((_root.player1.score >= _root.killLimit) && (_root.killLimit > 0)) {
_root.HUD.startTimer = false;
player1 = _root.player1.pName + " Wins";
if (_root.player2.score == 0) {
player1 = player1 + "\nFLAWLESS VICTORY";
}
_visible = true;
select.start(0, 1);
} else if ((_root.player2.score >= _root.killLimit) && (_root.killLimit > 0)) {
_root.HUD.startTimer = false;
player1 = _root.player2.pName + " Wins";
if (_root.player1.score == 0) {
player1 = player1 + "\nFLAWLESS VICTORY";
}
_visible = true;
select.start(0, 1);
}
}
}
Instance of Symbol 105 MovieClip [optionPanel] "optionPane" in Frame 42
onClipEvent (load) {
origX = _x;
origY = _y;
_root.killLimit = 10;
_root.supplyDrop = true;
}
Instance of Symbol 469 MovieClip in Frame 42
onClipEvent (load) {
_root.destX = -800;
_root.destY = 0;
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 43
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(2);
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 43
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 43
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 43
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 43
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 477 MovieClip "rocket0" in Frame 43
onClipEvent (load) {
range = 250;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
xLength = 0;
smoke._xscale = 10;
hit = false;
speed = 1;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
rocketFire = new Sound(this);
rocketFire.attachSound("rocketFire");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "rocket0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (speed == 1) {
rocketFire.start(0, 1);
}
speed = speed + 2;
if (speed > 25) {
speed = 25;
}
if (hit) {
head._visible = false;
flame._visible = false;
_alpha = (_alpha - 10);
if (((_alpha <= 0) && (rocketFire.position == rocketFire.duration)) && (explodeSound.position == explodeSound.duration)) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 300) {
xLength = xLength + 15;
}
if (xLength > 0) {
smoke._xscale = xLength;
} else {
smoke._xscale = 0;
}
_xscale = (100 * xDirection);
if (owner == 1) {
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (p2d < 50) {
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
hit = true;
}
}
if (owner == 2) {
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (p1d < 50) {
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
p1x = _root.player1._x - _x;
p1y = (_root.player1._y - _y) - 20;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = (_root.player2._y - _y) - 20;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 4);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 4);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 4);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 4);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if ((_x > (_root.maps.rightBound + 400)) && (rocketFire.position == rocketFire.duration)) {
removeMovieClip(this);
}
if ((_x < (_root.maps.leftBound - 400)) && (rocketFire.position == rocketFire.duration)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "pellet0" in Frame 43
onClipEvent (load) {
trail._visible = false;
_rotation = ((Math.random() * 20) - 10);
hit = false;
speed = 30;
xLength = -15;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pellet0") {
return(undefined);
}
xLength = xLength + 5;
if (xLength < 0) {
_visible = false;
} else {
_visible = true;
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume / 2);
if (hit) {
_visible = false;
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
if (Math.floor(Math.random() * 2) == 0) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
if (Math.floor(Math.random() * 2) == 0) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
}
break;
}
_x = (_x + ((xDirection * 10) * Math.cos((_rotation * Math.PI) / 180)));
_y = (_y + ((xDirection * 10) * Math.sin((_rotation * Math.PI) / 180)));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 288 MovieClip "pistolClip0" in Frame 43
onClipEvent (load) {
xVel = 0;
yVel = 0;
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pistolClip0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 484 MovieClip "grenadePowerup0" in Frame 43
onClipEvent (load) {
xVel = 0;
yVel = 0;
pickup = new Sound(this);
pickup.attachSound("pickup");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("cardboardImpact");
grenadeSound = new Sound(this);
if (Math.floor(Math.random() * 2) == 0) {
_rotation = 25;
} else {
_rotation = -25;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenadePowerup0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
c = 0;
while (c < Math.abs(yVel)) {
if (_root.maps.hitTest(_x, _y + 1, true)) {
if (yVel > 1) {
playerImpact2.start(0, 1);
}
if (_rotation > 0) {
_rotation = (_rotation - 5);
}
if (_rotation < 0) {
_rotation = (_rotation + 5);
}
yVel = 0;
break;
}
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
yVel++;
pX = _root.player1._x - _x;
pY = _root.player1._y - _y;
pDist = Math.sqrt((pX * pX) + (pY * pY));
if (pDist < 25) {
_root.player1.grenadeCount = _root.player1.grenadeCount + 3;
pickup.start(0, 1);
removeMovieClip(this);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 266 MovieClip "shell0" in Frame 43
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 43
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 43
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 43
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 43
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 43
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 43
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 43
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 43
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 43
onClipEvent (load) {
pName = _root.leftName;
rank = 5;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
if (_root.micControl) {
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
} else {
this.attachAudio(false);
attached = false;
}
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.playerNum >= 1) {
if (Key.isDown(32) && (!spaced)) {
spaced = true;
if (gun.guns._currentframe >= 20) {
gun.guns.gotoAndStop(1);
} else {
gun.guns.nextFrame();
}
}
if (!Key.isDown(32)) {
spaced = false;
}
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (shooting) {
holsterCount++;
if (holsterCount >= 50) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if (((_root.micControl && (kshoot)) && (shootCount >= 0)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
clipSize--;
xVel = xVel - (xDirection * recoil);
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].shootSpeed = shootSpeed;
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 1000)) {
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
}
if (_y > (_root.maps.bottomBound + 2500)) {
gibbed = false;
rank--;
_root.player2.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
gun.guns.gotoAndStop(3);
sidearm = 3;
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 520 MovieClip "HUD" in Frame 43
onClipEvent (load) {
_root.destX = -800;
_root.destY = 600;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
}
Instance of Symbol 357 MovieClip "arrowIndicator1" in Frame 43
onClipEvent (load) {
pName = _root.player1.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player1._x - _x;
yD = _root.player1._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if (pDist < 400) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player1.red, _root.player1.green, _root.player1.blue, 100);
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 43
onClipEvent (load) {
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
bLabel = "SKIP";
tutorialMessage = "Welcome to basic training. Here you will learn how to move and attack.";
}
onClipEvent (enterFrame) {
if (messageNum == 1) {
timeCount++;
if ((timeCount == 100) || (menuSelection == "SKIP")) {
skipButton._visible = false;
_visible = false;
timeCount = 0;
tutorialMessage = ((((((("Press '" + _root.stringCode(_root.leftSideLeftCode)) + "' to move left and '") + _root.stringCode(_root.leftSideRightCode)) + "' to move right. For two player mode, player 2 would press '") + _root.stringCode(_root.rightSideLeftCode)) + "' to move left and '") + _root.stringCode(_root.rightSideRightCode)) + "' to move right. Try it now.";
messageNum++;
}
} else if (timeCount < 60) {
timeCount++;
} else {
_visible = true;
}
if (((messageNum == 7) && (timeCount == 60)) && (_root.grenadePowerup._x == undefined)) {
bLabel = "END MISSION";
skipButton._visible = true;
_visible = false;
timeCount = 0;
messageNum++;
if (_root.player1.rank == 5) {
letterGrade = "A";
} else if (_root.player1.rank == 4) {
letterGrade = "B";
} else if (_root.player1.rank == 3) {
letterGrade = "C";
} else if (_root.player1.rank == 2) {
letterGrade = "D";
} else {
letterGrade = "F";
}
if (letterGrade == "A") {
tutorialMessage = (("Good job, you finished basic training. You get an 'A' for effort.\n\nTIMES DIED: " + (5 - _root.player1.rank)) + "\nYOUR RANK: ") + letterGrade;
} else {
tutorialMessage = (("I can't believe you actually died... You should just stop playing this game. Now.\n\nTIMES DIED: " + (5 - _root.player1.rank)) + "\nYOUR RANK: ") + letterGrade;
}
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.basicTrainingScore > (5 - _root.player1.rank)) || (saveFile.data.basicTrainingScore == undefined)) {
saveFile.data.basicTraining = letterGrade;
saveFile.data.basicTrainingScore = 5 - _root.player1.rank;
}
saveFile.flush();
}
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
}
onClipEvent (keyDown) {
if (((messageNum == 2) && (timeCount == 60)) && ((Key.getCode() == _root.leftSideLeftCode) || (Key.getCode() == _root.leftSideRightCode))) {
_visible = false;
timeCount = 0;
messageNum++;
tutorialMessage = ((("Press '" + _root.stringCode(_root.leftSideUpCode)) + "' to jump. For two player mode, player 2 would press '") + _root.stringCode(_root.rightSideUpCode)) + "'. Jump on to the second platform.";
}
if (((messageNum == 3) && (timeCount == 60)) && (Key.getCode() == _root.leftSideUpCode)) {
_visible = false;
timeCount = 0;
messageNum++;
tutorialMessage = ((("Press '" + _root.stringCode(_root.leftSideDownCode)) + "' to drop down. For two player mode, player 2 would press '") + _root.stringCode(_root.rightSideDownCode)) + "'. Drop back down to the first platform.";
}
if (((messageNum == 4) && (timeCount == 60)) && (Key.getCode() == _root.leftSideDownCode)) {
_visible = false;
timeCount = 0;
messageNum++;
tutorialMessage = ((("Press '" + _root.stringCode(_root.leftSideShootCode)) + "' to shoot. For two player mode, player 2 would press '") + _root.stringCode(_root.rightSideShootCode)) + "'. The starting pistols have infinite ammo. Weapons that are picked up are limited. Try shooting now.";
}
if (((messageNum == 5) && (timeCount == 60)) && (Key.getCode() == _root.leftSideShootCode)) {
_visible = false;
timeCount = 0;
messageNum++;
tutorialMessage = ((((("Hold '" + _root.stringCode(_root.leftSideGrenadeCode)) + "' to prime a grenade, then release to throw. The longer you hold the key, the further it is thrown. For two player mode, player 2 would press '") + _root.stringCode(_root.rightSideGrenadeCode)) + "'. Try throwing a grenade (you have ") + _root.player1.grenadeCount) + " remaining).";
}
if (((messageNum == 6) && (timeCount == 60)) && (Key.getCode() == _root.leftSideGrenadeCode)) {
_root.grenadePowerup0.duplicateMovieClip("grenadePowerup", 500);
_root.grenadePowerup._x = 400;
_root.grenadePowerup._y = -100;
_visible = false;
timeCount = 0;
messageNum++;
tutorialMessage = "You can pick up unlocked powerups such as weapons and grenades by walking over them. Weapon drops only occur in 'Arena' game modes (and occur more frequently the more weapons you have unlocked). Pick up the grenades that have just dropped.";
}
}
Instance of Symbol 469 MovieClip in Frame 43
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
stopAllSounds();
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 44
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(3);
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 44
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 44
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 44
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 266 MovieClip "shell0" in Frame 44
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 44
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 44
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 44
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 44
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 44
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 44
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 44
onClipEvent (load) {
if (longWeapon) {
xLength = -15;
} else {
xLength = 0;
}
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 44
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 44
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 44
onClipEvent (load) {
gun.guns._visible = false;
letterGrade = "";
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 0;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
xVel = xVel - (xDirection * recoil);
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["bullet" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 500)) {
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
if (_root.HUD.currentTime >= 40) {
letterGrade = "A";
} else if (_root.HUD.currentTime >= 30) {
letterGrade = "B";
} else if (_root.HUD.currentTime >= 20) {
letterGrade = "C";
} else if (_root.HUD.currentTime >= 10) {
letterGrade = "D";
} else {
letterGrade = "F";
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Instance of Symbol 531 MovieClip "HUD" in Frame 44
onClipEvent (load) {
_root.destX = -800;
_root.destY = 600;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
timeCount = 0;
currentTime = 0;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol2");
}
onClipEvent (enterFrame) {
if (startTimer) {
timeDisplay = (((currentTime + ".") + Math.floor(timeCount / 3)) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (_root.player1.letterGrade != "") {
return(undefined);
}
if (!startTimer) {
return(undefined);
}
playerSound.setVolume(_root.systemVolume);
if ((currentTime == 0) && (timeCount == 0)) {
rndX = Math.floor(Math.random() * 2);
if (rndX == 0) {
xDirection = 1;
} else {
xDirection = -1;
}
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = 400 - (600 * xDirection);
_root["bullet" + _root.particleDepth]._y = _root.player1._y - 25;
_root["bullet" + _root.particleDepth].xVel = 20;
_root["bullet" + _root.particleDepth].owner = 2;
_root.particleDepth++;
}
timeCount++;
if (timeCount == 30) {
timeCount = 0;
currentTime++;
}
rndT = 60 - currentTime;
if (rndT < 5) {
rndT = 5;
}
if (((currentTime % 10) == 0) && (timeCount == 0)) {
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = (Math.random() * 2) - 1;
_root["grenade" + _root.particleDepth]._x = 400;
_root["grenade" + _root.particleDepth]._y = -200;
_root["grenade" + _root.particleDepth].magnitude = Math.random() * 5;
_root.particleDepth++;
}
if (Math.floor(Math.random() * rndT) == 0) {
rndX = Math.floor(Math.random() * 2);
if (rndX == 0) {
xDirection = 1;
} else {
xDirection = -1;
}
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].longWeapon = longWeapon;
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = 400 - (600 * xDirection);
_root["bullet" + _root.particleDepth]._y = ((_root.player1._y - 25) + (Math.random() * 200)) - 100;
_root["bullet" + _root.particleDepth].xVel = 20;
_root["bullet" + _root.particleDepth].owner = 2;
_root.particleDepth++;
}
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 44
onClipEvent (load) {
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to agility training. You must dodge the incomming shots for as long as you can without falling off the platform.";
}
onClipEvent (enterFrame) {
if (_root.player1.letterGrade != "") {
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
bLabel = "END MISSION";
_visible = true;
tutorialMessage = (("You are dead.\n\nTIME SURVIVED: " + _root.HUD.currentTime) + "\nYOUR RANK: ") + _root.player1.letterGrade;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.agilityTrainingScore < _root.HUD.currentTime) || (saveFile.data.agilityTrainingScore == undefined)) {
saveFile.data.agilityTraining = _root.player1.letterGrade;
saveFile.data.agilityTrainingScore = _root.HUD.currentTime;
}
saveFile.flush();
}
} else if (messageNum == 1) {
timeCount++;
if ((timeCount == 120) || (menuSelection == "SKIP")) {
_visible = false;
_root.HUD.goSign.play();
messageNum++;
}
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.HUD.currentTime;
ab20_09.c = 663;
ab20_09.v = "USVJDD";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=663", "_blank");
_root.gotoAndStop("mainMenu");
}
}
Instance of Symbol 357 MovieClip "arrowIndicator1" in Frame 44
onClipEvent (load) {
pName = _root.player1.pName;
}
onClipEvent (enterFrame) {
_x = (400 - _root._x);
_y = (300 - _root._y);
xD = _root.player1._x - _x;
yD = _root.player1._y - _y;
pAngle = Math.atan2(yD, xD);
pDist = Math.sqrt((xD * xD) + (yD * yD));
pDist2 = Math.round(pDist);
_x = (_x + (350 * Math.cos(pAngle)));
_y = (_y + (250 * Math.sin(pAngle)));
childArrow._rotation = ((pAngle * 180) / Math.PI) + 90;
arrowOutline._rotation = ((pAngle * 180) / Math.PI) + 90;
if ((pDist < 400) || (pDist > 2500)) {
this._visible = false;
} else {
this._visible = true;
}
}
onClipEvent (enterFrame) {
myColor = new Color(childArrow);
myColor.setTint(_root.player1.red, _root.player1.green, _root.player1.blue, 100);
}
Instance of Symbol 469 MovieClip in Frame 44
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
stopAllSounds();
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 45
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(4);
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 45
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 45
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 45
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((((((_root.player1._x > leftBound) && (_root.target0._x > leftBound)) && (_root.player1._x < rightBound)) && (_root.target0._x < rightBound)) && (_root.player1._y < bottomBound)) && (_root.target0._y < bottomBound)) && (_root.player1._y > topBound)) && (_root.target0._y > topBound)) {
destX = -(((_root.player1._x + _root.target0._x) / 2) - (screenWidth / 2));
destY = -(((_root.player1._y + _root.target0._y) / 2) - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else if ((((_root.target0._x > leftBound) && (_root.target0._x < rightBound)) && (_root.target0._y > topBound)) && (_root.target0._y < bottomBound)) {
destX = -(_root.target0._x - (screenWidth / 2));
destY = -(_root.target0._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.targetCounter._x = _root.targetCounter.origX - _root._x;
_root.targetCounter._y = _root.targetCounter.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
}
Instance of Symbol 266 MovieClip "shell0" in Frame 45
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 45
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 45
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 75;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
removeMovieClip(this);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 45
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 45
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 45
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 45
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 45
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 45
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && ((((explodeSound.position == explodeSound.duration) || (impactPlayer.position == impactPlayer.duration)) || (impactWall.position == impactWall.duration)) || (((impactWall.position == 0) && (impactPlayer.position == 0)) && (explodeSound.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.target0.hitBox.hitTest(_x, _y, true)) {
_root.target0.hit = true;
if (_root.HUD.currentTime > 0) {
explodeSound.start(0, 1);
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
_root.HUD.currentTime = _root.HUD.currentTime - Math.round(_root.target0.rank / 2);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
_root.HUD.currentTime = _root.HUD.currentTime - Math.round(_root.target0.rank / 2);
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
_root.HUD.currentTime = _root.HUD.currentTime - Math.round(_root.target0.rank / 2);
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 45
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 535 MovieClip "target0" in Frame 45
onClipEvent (load) {
rank = 0;
timeAdd = 7;
yVel = 0;
grenadeSound = new Sound(this);
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
}
onClipEvent (enterFrame) {
if (_root.HUD.startTimer == false) {
return(undefined);
}
grenadeSound.setVolume(_root.systemVolume);
c = 0;
while (c < Math.abs(yVel)) {
if (_root.maps.hitTest(_x, _y + 1, true)) {
if (Math.abs(yVel) > 2) {
impactShell.start(0, 1);
}
yVel = (-yVel) / 2;
timeAdd--;
if (timeAdd < 1) {
timeAdd = 1;
}
_y = (_y-1);
break;
}
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (!_root.maps.hitTest(_x, _y + 2, true)) {
yVel++;
}
if (Math.abs(yVel) < 1) {
yVel = 0;
}
if (hit && (_root.HUD.currentTime > 0)) {
rank++;
hit = false;
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
_root.HUD.currentTime = _root.HUD.currentTime + timeAdd;
timeAdd = 7;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
yVel = 0;
}
if (_y > 1000) {
yVel = 0;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
timeAdd = 7;
}
}
Instance of Symbol 350 MovieClip "player1" in Frame 45
onClipEvent (load) {
gun.guns.gotoAndStop(17);
rank = 5;
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 0;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 0;
grenadePrime = 0;
holsterCount = 0;
recoil = 0;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("psg1fire");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode) && (_root.HUD.startTimer)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["bullet" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 2000)) {
rank--;
_root.player2.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Instance of Symbol 531 MovieClip "HUD" in Frame 45
onClipEvent (load) {
_root.destX = -800;
_root.destY = 600;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
currentTime = 15;
timeCount = 0;
startTimer = false;
dingSound = new Sound(this);
dingSound.attachSound("dingSound");
}
onClipEvent (enterFrame) {
if (((currentTime <= 3) && (currentTime > 0)) && (timeCount == 0)) {
dingSound.start(0, 1);
}
currentTime = Math.floor(currentTime);
if (startTimer) {
timeDisplay = (((currentTime + ".") + (9 - Math.floor(timeCount / 3.3))) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (currentTime < 0) {
currentTime = 0;
}
if ((!startTimer) || (currentTime == 0)) {
return(undefined);
}
if (timeCount < 30) {
timeCount++;
} else {
currentTime--;
timeCount = 0;
}
}
Instance of Symbol 538 MovieClip "targetCounter" in Frame 45
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 45
onClipEvent (load) {
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to sniper training. Try to destroy as many targets as you can within the time limit. Hitting a target adds to time, while missing them subtracts. More time is added the faster you destroy the target. More time is subtracted for each missed shot the longer you play.";
dingSound = new Sound(this);
dingSound.attachSound("dingSound");
}
onClipEvent (enterFrame) {
if (((currentTime <= 3) && (currentTime > 0)) && (timeCount == 0)) {
dingSound.start(0, 1);
}
if (messageNum == 1) {
submitButton.bLabel = "";
timeCount++;
if ((timeCount == 240) || (menuSelection == "SKIP")) {
_root.HUD.goSign.play();
_visible = false;
timeCount = 0;
messageNum++;
}
} else if (_root.HUD.currentTime == 0) {
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
bLabel = "END MISSION";
_visible = true;
if (_root.target0.rank >= 30) {
letterGrade = "A";
} else if (_root.target0.rank >= 15) {
letterGrade = "B";
} else if (_root.target0.rank >= 7) {
letterGrade = "C";
} else if (_root.target0.rank >= 3) {
letterGrade = "D";
} else {
letterGrade = "F";
}
tutorialMessage = (("Time over.\n\nTARGETS DESTROYED: " + _root.target0.rank) + "\nYOUR RANK: ") + letterGrade;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.sniperTrainingScore < _root.target0.rank) || (saveFile.data.sniperTrainingScore == undefined)) {
saveFile.data.sniperTraining = letterGrade;
saveFile.data.sniperTrainingScore = _root.target0.rank;
}
saveFile.flush();
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.target0.rank;
ab20_09.c = 664;
ab20_09.v = "RJBTBB";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=664", "_blank");
_root.gotoAndStop("mainMenu");
}
}
}
Instance of Symbol 469 MovieClip in Frame 45
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
stopAllSounds();
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 46
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(5);
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 46
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 46
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 46
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((((((_root.player1._x > leftBound) && (_root.target0._x > leftBound)) && (_root.player1._x < rightBound)) && (_root.target0._x < rightBound)) && (_root.player1._y < bottomBound)) && (_root.target0._y < bottomBound)) && (_root.player1._y > topBound)) && (_root.target0._y > topBound)) {
destX = -(((_root.player1._x + _root.target0._x) / 2) - (screenWidth / 2));
destY = -(((_root.player1._y + _root.target0._y) / 2) - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else if ((((_root.target0._x > leftBound) && (_root.target0._x < rightBound)) && (_root.target0._y > topBound)) && (_root.target0._y < bottomBound)) {
destX = -(_root.target0._x - (screenWidth / 2));
destY = -(_root.target0._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.targetCounter._x = _root.targetCounter.origX - _root._x;
_root.targetCounter._y = _root.targetCounter.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
}
Instance of Symbol 266 MovieClip "shell0" in Frame 46
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 46
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 46
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 46
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 46
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 46
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 46
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 46
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.target0.hitBox.hitTest(_x, _y, true)) {
_root.target0.hit = true;
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
_root.HUD.currentTime = _root.HUD.currentTime - 3;
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
_root.HUD.currentTime = _root.HUD.currentTime - 3;
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
_root.HUD.currentTime = _root.HUD.currentTime - 3;
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 46
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
boomed = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.target0._x - _x;
p2y = _root.target0._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if ((range / 2.5) > p2d) {
_root.target0.gDist = p2d;
_root.target0.hit = true;
} else {
_root.HUD.currentTime = _root.HUD.currentTime - Math.round(_root.target0.rank / 2);
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
_root.HUD.currentTime = _root.HUD.currentTime - Math.round(_root.target0.rank / 2);
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 46
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 535 MovieClip "target0" in Frame 46
onClipEvent (load) {
rank = 0;
timeAdd = 0;
yVel = 0;
grenadeSound = new Sound(this);
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
}
onClipEvent (enterFrame) {
if (_root.HUD.startTimer == false) {
return(undefined);
}
grenadeSound.setVolume(_root.systemVolume);
c = 0;
while (c < Math.abs(yVel)) {
if (_root.maps.hitTest(_x, _y + 1, true)) {
if (Math.abs(yVel) > 2) {
impactShell.start(0, 1);
}
yVel = (-yVel) / 2;
_y = (_y-1);
break;
}
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (!_root.maps.hitTest(_x, _y + 2, true)) {
yVel++;
}
if (Math.abs(yVel) < 1) {
yVel = 0;
}
if (hit && (_root.HUD.currentTime > 0)) {
rank++;
hit = false;
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
timeAdd = Math.round(13 - (gDist / 10));
_root.HUD.currentTime = _root.HUD.currentTime + timeAdd;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
yVel = 0;
}
if (_y > 1000) {
yVel = 0;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
}
}
Instance of Symbol 350 MovieClip "player1" in Frame 46
onClipEvent (load) {
gun.guns._visible = false;
rank = 5;
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 0;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
holsterCount = 0;
recoil = 0;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode) && (_root.HUD.startTimer)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
xVel = xVel - (xDirection * recoil);
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["bullet" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 2000)) {
rank--;
_root.player2.score++;
xVel = (yVel = 0);
_y = (_root.maps.topBound - 500);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
grenadeCount = 3;
}
if (_y > 463) {
_y = 463;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Instance of Symbol 531 MovieClip "HUD" in Frame 46
onClipEvent (load) {
gun.guns._visible = false;
_root.destX = -800;
_root.destY = 600;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
currentTime = 20;
timeCount = 0;
startTimer = false;
dingSound = new Sound(this);
dingSound.attachSound("dingSound");
}
onClipEvent (enterFrame) {
if (((currentTime <= 3) && (currentTime > 0)) && (timeCount == 0)) {
dingSound.start(0, 1);
}
currentTime = Math.floor(currentTime);
if (startTimer) {
timeDisplay = (((currentTime + ".") + (9 - Math.floor(timeCount / 3.3))) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (currentTime < 0) {
currentTime = 0;
}
if ((!startTimer) || (currentTime == 0)) {
return(undefined);
}
if (timeCount < 30) {
timeCount++;
} else {
currentTime--;
timeCount = 0;
}
}
Instance of Symbol 538 MovieClip "targetCounter" in Frame 46
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 46
onClipEvent (load) {
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to grenade training. Try to destroy as many targets as you can within the time limit. Destroying a target adds to time, while missing subtracts. The closer your grenade lands to the target the more time is added. More time is subtracted for each missed grenade the longer you play.";
}
onClipEvent (enterFrame) {
if (messageNum == 1) {
timeCount++;
if ((timeCount == 240) || (menuSelection == "SKIP")) {
_root.HUD.goSign.play();
_visible = false;
timeCount = 0;
messageNum++;
}
} else if (_root.HUD.currentTime == 0) {
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
bLabel = "END MISSION";
_visible = true;
if (_root.target0.rank >= 20) {
letterGrade = "A";
} else if (_root.target0.rank >= 10) {
letterGrade = "B";
} else if (_root.target0.rank >= 5) {
letterGrade = "C";
} else if (_root.target0.rank >= 2) {
letterGrade = "D";
} else {
letterGrade = "F";
}
tutorialMessage = (("Time over.\n\nTARGETS DESTROYED: " + _root.target0.rank) + "\nYOUR RANK: ") + letterGrade;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.grenadeTrainingScore < _root.target0.rank) || (saveFile.data.grenadeTrainingScore == undefined)) {
saveFile.data.grenadeTraining = letterGrade;
saveFile.data.grenadeTrainingScore = _root.target0.rank;
}
saveFile.flush();
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.target0.rank;
ab20_09.c = 665;
ab20_09.v = "FXAZOL";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=665", "_blank");
_root.gotoAndStop("mainMenu");
}
}
}
Instance of Symbol 469 MovieClip in Frame 46
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
stopAllSounds();
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 47
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(6);
_root.systemVolume = _root.SFXVolume;
_root.micControl = true;
stop();
Instance of Symbol 250 MovieClip in Frame 47
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 47
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 47
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 250;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((((((_root.player1._x > leftBound) && (_root.target0._x > leftBound)) && (_root.player1._x < rightBound)) && (_root.target0._x < rightBound)) && (_root.player1._y < bottomBound)) && (_root.target0._y < bottomBound)) && (_root.player1._y > topBound)) && (_root.target0._y > topBound)) {
destX = -(((_root.player1._x + _root.target0._x) / 2) - (screenWidth / 2));
destY = -(((_root.player1._y + _root.target0._y) / 2) - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else if ((((_root.target0._x > leftBound) && (_root.target0._x < rightBound)) && (_root.target0._y > topBound)) && (_root.target0._y < bottomBound)) {
destX = -(_root.target0._x - (screenWidth / 2));
destY = -(_root.target0._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.targetCounter._x = _root.targetCounter.origX - _root._x;
_root.targetCounter._y = _root.targetCounter.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
}
Instance of Symbol 266 MovieClip "shell0" in Frame 47
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 47
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 47
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 47
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 47
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 47
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 47
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 47
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && ((((explodeSound.position == explodeSound.duration) || (impactPlayer.position == impactPlayer.duration)) || (impactWall.position == impactWall.duration)) || (((impactWall.position == 0) && (impactPlayer.position == 0)) && (explodeSound.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
if (owner == 1) {
if (_root.target0.hitBox.hitTest(_x, _y, true)) {
_root.target0.hit = true;
if (_root.HUD.startTimer == true) {
explodeSound.start(0, 1);
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 47
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 47
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 535 MovieClip "target0" in Frame 47
onClipEvent (load) {
rank = 0;
timeAdd = 3;
yVel = 0;
grenadeSound = new Sound(this);
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
}
onClipEvent (enterFrame) {
if (_root.HUD.startTimer == false) {
return(undefined);
}
grenadeSound.setVolume(_root.systemVolume);
c = 0;
while (c < Math.abs(yVel)) {
if (_root.maps.hitTest(_x, _y + 1, true)) {
if (Math.abs(yVel) > 2) {
impactShell.start(0, 1);
}
yVel = (-yVel) / 2;
_y = (_y-1);
break;
}
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (!_root.maps.hitTest(_x, _y + 2, true)) {
yVel++;
}
if (Math.abs(yVel) < 1) {
yVel = 0;
}
if (hit && (_root.HUD.currentTime > 0)) {
rank++;
hit = false;
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.HUD.currentTime = _root.HUD.currentTime + timeAdd;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
yVel = 0;
}
if (_y > 1000) {
yVel = 0;
_y = -200;
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
}
}
Instance of Symbol 350 MovieClip "player1" in Frame 47
onClipEvent (load) {
gun.guns.gotoAndStop(3);
bulletsShot = 0;
rank = 5;
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 0;
grenadePrime = 0;
holsterCount = 0;
recoil = 0;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
myMic = Microphone.get();
this.attachAudio(myMic);
attached = true;
lastMic = 0;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode) && (_root.HUD.startTimer)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_x = Math.round(_x);
_y = Math.round(_y);
_xscale = (xDirection * 100);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y+1);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
bulletsShot++;
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
xVel = xVel - (xDirection * recoil);
pistol1.start(0, 1);
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["bullet" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 1, true))) && (!_root.maps.hitTest(_x, _y - 1, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + (xVel / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - (xVel / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + (xVel / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - (xVel / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if ((!gibbed) && (_y > (_root.maps.bottomBound + 1000))) {
gibbed = true;
gib.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 2000)) {
_root.HUD.currentTime = 0;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Instance of Symbol 531 MovieClip "HUD" in Frame 47
onClipEvent (load) {
_root.destX = -800;
_root.destY = 600;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
currentTime = 10;
timeCount = 0;
startTimer = false;
dingSound = new Sound(this);
dingSound.attachSound("dingSound");
}
onClipEvent (enterFrame) {
if (((currentTime <= 3) && (currentTime > 0)) && (timeCount == 0)) {
dingSound.start(0, 1);
}
currentTime = Math.floor(currentTime);
if (startTimer) {
timeDisplay = (((currentTime + ".") + (9 - Math.floor(timeCount / 3.3))) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (currentTime < 0) {
currentTime = 0;
}
if ((!startTimer) || (currentTime == 0)) {
return(undefined);
}
if (timeCount < 30) {
timeCount++;
} else {
currentTime--;
timeCount = 0;
}
}
Instance of Symbol 538 MovieClip "targetCounter" in Frame 47
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 47
onClipEvent (load) {
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to microphone training. Here you will learn to use your microphone to shoot, as used in Microphone Mode. Be sure you have a microphone plugged in and activated!";
}
onClipEvent (enterFrame) {
if (timeCount < 0) {
_visible = false;
} else {
_visible = true;
}
if (_root.HUD.currentTime == 0) {
skipButton._visible = true;
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
bLabel = "END MISSION";
_visible = true;
if (_root.target0.rank >= 20) {
letterGrade = "A";
} else if (_root.target0.rank >= 10) {
letterGrade = "B";
} else if (_root.target0.rank >= 5) {
letterGrade = "C";
} else if (_root.target0.rank >= 2) {
letterGrade = "D";
} else {
letterGrade = "F";
}
tutorialMessage = (("You suck.\n\nTARGETS DESTROYED: " + _root.target0.rank) + "\nYOUR RANK: ") + letterGrade;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.microphoneTrainingScore < _root.target0.rank) || (saveFile.data.microphoneTrainingScore == undefined)) {
saveFile.data.microphoneTraining = letterGrade;
saveFile.data.microphoneTrainingScore = _root.target0.rank;
}
saveFile.flush();
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.target0.rank;
ab20_09.c = 673;
ab20_09.v = "ADUBOQ";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=673", "_blank");
_root.gotoAndStop("mainMenu");
}
} else if (messageNum == 1) {
timeCount++;
if ((timeCount == 200) || (menuSelection == "SKIP")) {
skipButton._visible = false;
_visible = false;
tutorialMessage = "To shoot with your microphone, yell into it. It cannot be a continuous sound and must have pauses between shouts. For example, yell 'BANG'. You may want to tweak your microphone settings to get the right balance. Try shooting 10 times.";
timeCount = -60;
messageNum++;
menuSelection = "";
}
} else if (messageNum == 2) {
timeCount++;
if (_root.player1.bulletsShot >= 10) {
skipButton._visible = true;
_visible = false;
tutorialMessage = "Good. Now lets have a little bit of fun. Destroy as many targets as you can within the time limit, destroying targets adds to time!!!";
timeCount = -60;
messageNum++;
}
} else if (messageNum == 3) {
timeCount++;
if ((timeCount == 200) || (menuSelection == "SKIP")) {
_root.HUD.goSign.play();
_visible = false;
timeCount = -60;
messageNum++;
}
}
}
Instance of Symbol 469 MovieClip in Frame 47
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
stopAllSounds();
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 48
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.systemVolume = _root.SFXVolume;
_root.maps.gotoAndStop(9);
c = 0;
while (c < 10) {
removeMovieClip(_root.maps["platform" + c]);
c++;
}
platNum = Math.floor(Math.random() * 25) + 25;
oldX = (oldY = (oldWidth = 0));
newX = (newY = (newWidth = 0));
c = 0;
while (c < 10) {
oldX = newX;
oldY = newY;
newWidth = Math.floor(Math.random() * 150) + 200;
newX = (oldX + Math.floor(Math.random() * 150)) + 150;
do {
newY = (oldY + Math.floor(Math.random() * 400)) - 150;
} while (Math.abs(newY - oldY) <= 100);
_root.maps.attachMovie("platform", "platform" + c, 1000 + c);
_root.maps["platform" + c]._x = newX;
_root.maps["platform" + c]._y = newY;
_root.maps["platform" + c]._width = newWidth;
_root.maps["platform" + c]._height = 50;
c++;
}
_root.portal._x = (_root.maps._x + newX) + (newWidth / 2);
_root.portal._y = _root.maps._y + newY;
_root.player1._x = (_root.maps.platform0._x + _root.maps._x) + 50;
_root.player1._y = (_root.maps.platform0._y - 3) + _root.maps._y;
_root.coins = 0;
stop();
Instance of Symbol 250 MovieClip in Frame 48
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 48
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 1000;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if (_root.player1.playerFail) {
destX = -(_root.portal._x - (screenWidth / 2));
destY = -(_root.portal._y - (screenHeight / 2));
} else if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(_root.portal._x - (screenWidth / 2));
destY = -(_root.portal._y - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.coinCounter._x = _root.coinCounter.origX - _root._x;
_root.coinCounter._y = _root.coinCounter.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
_root.optionPane._x = _root.optionPane.origX - _root._x;
_root.optionPane._y = _root.optionPane.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 48
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 258 MovieClip in Frame 48
onClipEvent (load) {
stopAllSounds();
pompeiiShort = new Sound(this);
pompeiiShort.attachSound("pompeiiShort");
pompeiiShort.setVolume(_root.musicVolume);
pompeiiShort.start(0, 9999999);
}
onClipEvent (enterFrame) {
pompeiiShort.setVolume(_root.musicVolume);
}
Instance of Symbol 350 MovieClip "monster0" in Frame 48
onClipEvent (load) {
gun.guns._visible = false;
do {
letter1 = chr(Math.floor(Math.random() * 26) + 65);
} while (((((letter1 == "A") || (letter1 == "E")) || (letter1 == "I")) || (letter1 == "O")) || (letter1 == "U"));
rndl = Math.floor(Math.random() * 5);
if (rndl == 0) {
letter2 = "a";
} else if (rndl == 1) {
letter2 = "e";
} else if (rndl == 2) {
letter2 = "i";
} else if (rndl == 3) {
letter2 = "o";
} else {
letter2 = "u";
}
letter3 = chr(Math.floor(Math.random() * 26) + 97);
pName = (("" + letter1) + letter2) + letter3;
red = Math.floor(Math.random() * 255);
green = Math.floor(Math.random() * 255);
blue = Math.floor(Math.random() * 255);
eyeRed = Math.floor(Math.random() * 255);
eyeGreen = Math.floor(Math.random() * 255);
eyeBlue = Math.floor(Math.random() * 255);
eyeType = Math.floor(Math.random() * 10) + 1;
eyes.fill.gotoAndStop(eyeType);
bloodRed = Math.floor(Math.random() * 255);
bloodGreen = Math.floor(Math.random() * 255);
bloodBlue = Math.floor(Math.random() * 255);
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 5;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
groundY = 350;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
recoil = 1;
power = 20;
holsterCount = 0;
playerSound = new Sound(this);
pistol2 = new Sound(this);
pistol2.attachSound("pistol2");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
range = 175;
_y = (_root.maps.topBound - 400);
_x = ((_root.player1._x + Math.floor(Math.random() * 400)) - 200);
shootCountAI = (prevVel = (jumpCountAI = 0));
fuseCount = 0;
}
onClipEvent (enterFrame) {
if (_name == "monster0") {
_visible = false;
}
if (_root.gamePaused || (_name == "monster0")) {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
if (gibby) {
if (gib.position == gib.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
if (_x > _root.player1._x) {
kleft = true;
} else {
kleft = false;
}
if (_x < _root.player1._x) {
kright = true;
} else {
kright = false;
}
if (_y > _root.player1._y) {
kup = true;
} else {
kup = false;
}
kdown = false;
}
onClipEvent (enterFrame) {
if (_root.gamePaused || (_name == "monster0")) {
return(undefined);
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (boomed) {
return(undefined);
}
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
xVel = (-xVel) / 2;
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
fuseCount++;
if (fuseCount >= 150) {
_root.minMonster++;
if (p1d < range) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
explodeSound.start(0, 1);
if (!gibby) {
gib.start(0, 1);
}
gibby = true;
c = 0;
while (c < (2 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (3 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if ((_y > (_root.maps.bottomBound + 1000)) && (!gibby)) {
gib.start(0, 1);
gibby = true;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Instance of Symbol 543 MovieClip "clock0" in Frame 48
onClipEvent (load) {
yVel = 0;
bounced = false;
timeSound = new Sound(this);
timeSound.attachSound("timeSound");
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_name == "clock0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
timeSound.setVolume(_root.systemVolume);
if (_root.player1.hitTest(_x, _y, false)) {
_root.HUD.currentTime = _root.HUD.currentTime + 5;
timeSound.start(0, 1);
removeMovieClip(this);
}
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && ((Math.floor(Math.random() * 4) < 3) || (!bounced))) {
yVel = (-yVel) / 2;
bounced = true;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 266 MovieClip "shell0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 48
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 48
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 48
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
c = _root.minMonster;
while (c < _root.monsterDepth) {
if (_root["monster" + c].entireBody.hitTest(_x, _y, false) && (!_root["monster" + c].boomed)) {
impactPlayer.start(0, 1);
_root["monster" + c].xVel = _root["monster" + c].xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root["monster" + c].ground && (rndv < 0)) {
rndv = 0;
}
_root["monster" + c].yVel = _root["monster" + c].yVel - rndv;
c2 = 0;
while (c2 < 3) {
_root.coin0.duplicateMovieClip("coin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["coin" + _root.particleDepth]._x = _x;
_root["coin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c2++;
}
hit = true;
}
c++;
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 48
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (2 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (3 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 288 MovieClip "pistolClip0" in Frame 48
onClipEvent (load) {
xVel = 0;
yVel = 0;
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pistolClip0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "pellet0" in Frame 48
onClipEvent (load) {
trail._visible = false;
_rotation = ((Math.random() * 20) - 10);
hit = false;
speed = 30;
xLength = -15;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pellet0") {
return(undefined);
}
xLength = xLength + 5;
if (xLength < 0) {
_visible = false;
} else {
_visible = true;
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume / 5);
if (hit) {
_visible = false;
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
if (Math.floor(Math.random() * 2) == 0) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
if (Math.floor(Math.random() * 2) == 0) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
}
break;
}
_x = (_x + ((xDirection * 10) * Math.cos((_rotation * Math.PI) / 180)));
_y = (_y + ((xDirection * 10) * Math.sin((_rotation * Math.PI) / 180)));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 547 MovieClip "coin0" in Frame 48
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
coinSound = new Sound(this);
coinSound.attachSound("coinSound");
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_name == "coin0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
coinSound.setVolume(_root.systemVolume);
if (_root.player1.hitTest(_x, _y, false)) {
_root.coins++;
coinSound.start(0, 1);
removeMovieClip(this);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 3) < 2)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 48
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 48
onClipEvent (load) {
playerFail = false;
gun.guns.gotoAndStop(3);
letterGrade = "";
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 0;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.HUD.startTimer == false) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
xVel = xVel - (xDirection * recoil);
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
clipSize--;
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 500)) {
playerFail = true;
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
gun.guns.gotoAndStop(3);
sidearm = 3;
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 531 MovieClip "HUD" in Frame 48
onClipEvent (load) {
goPlayed = true;
startTimer = false;
dropRate = 3;
_root.destX = -800;
_root.destY = 0;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
timeCount = 0;
currentTime = 15;
currentTime2 = 0;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol2");
_root.monsterDepth = 10;
_root.minMonster = 9;
dingSound = new Sound(this);
dingSound.attachSound("dingSound");
}
onClipEvent (enterFrame) {
if (startTimer) {
timeDisplay = (((currentTime + ".") + (9 - Math.floor(timeCount / 3.3))) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (_root.player1.letterGrade != "") {
return(undefined);
}
if (!startTimer) {
return(undefined);
}
if (((currentTime <= 3) && (currentTime > 0)) && (timeCount == 0)) {
dingSound.start(0, 1);
}
playerSound.setVolume(_root.systemVolume);
if ((timeCount == 0) && ((currentTime2 % Math.ceil(dropRate)) == 0)) {
dropRate = dropRate - 0.25;
if (dropRate < 2) {
dropRate = 2;
}
_root.monster0.duplicateMovieClip("monster" + _root.monsterDepth, 2000 + _root.monsterDepth);
_root.monsterDepth++;
if (_root.monsterDepth > 100) {
_root.monsterDepth = 10;
}
}
timeCount++;
if (timeCount == 30) {
timeCount = 0;
currentTime--;
currentTime2++;
}
if (((currentTime2 % 3) == 0) && (timeCount == 0)) {
_root.clock0.duplicateMovieClip("clock" + _root.particleDepth, 2000 + _root.particleDepth);
_root["clock" + _root.particleDepth]._x = (_root.player1._x + (Math.random() * 200)) + 200;
_root["clock" + _root.particleDepth]._y = _root.player1._y - 500;
_root.particleDepth++;
}
if (currentTime <= 0) {
_root.player1.playerFail = true;
currentTime = 0;
}
rndT = 75 - currentTime;
if (rndT < 5) {
rndT = 5;
}
}
Instance of Symbol 562 MovieClip "coinCounter" in Frame 48
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 48
onClipEvent (load) {
saved = false;
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to The Gauntlet! Randomly generated map fun time! Shoot enemies to collect coins, and get to the level exit within the time limit!";
}
onClipEvent (enterFrame) {
if (_root.HUD.goPlayed) {
return(undefined);
}
if (_root.player1.playerFail || (_root.player1.levelComplete)) {
_root.player1.kup = (_root.player1.kdown = (_root.player1.kleft = (_root.player1.kright = (_root.player1.kshoot = false))));
_root.HUD.startTimer = false;
bLabel = "END MISSION";
_visible = true;
if (_root.player1.playerFail) {
tutorialMessage = "You fail! You must get to the exit portal to keep your coins!";
} else {
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
tutorialMessage = "Level complete!\n\nCoins Collected: " + _root.coins;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.maxCoins == undefined) {
saveFile.data.maxCoins = _root.coins;
} else if (saveFile.data.maxCoins < _root.coins) {
saveFile.data.maxCoins = _root.coins;
}
if ((saveFile.data.eyeType != undefined) && (!saved)) {
if (saveFile.data.totalCoins == undefined) {
saveFile.data.totalCoins = _root.coins;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins + _root.coins;
}
saved = true;
}
saveFile.flush();
}
} else if (messageNum == 1) {
timeCount++;
if ((timeCount == 120) || (menuSelection == "SKIP")) {
_visible = false;
_root.HUD.goSign.play();
messageNum++;
}
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.coins;
ab20_09.c = 900;
ab20_09.v = "SJMHAL";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=900", "_blank");
_root.gotoAndStop("mainMenu");
}
}
Instance of Symbol 565 MovieClip "optionPane" in Frame 48
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 469 MovieClip in Frame 48
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 49
function validName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
function stringCode(keyCode) {
keyString = "";
if ((keyCode >= 65) && (keyCode <= 90)) {
keyString = String.fromCharCode(keyCode);
}
if ((keyCode >= 48) && (keyCode <= 57)) {
keyString = "" + (keyCode - 48);
}
if ((keyCode >= 96) && (keyCode <= 105)) {
keyString = "Numpad " + (keyCode - 96);
}
if (keyCode == 106) {
keyString = "Numpad *";
}
if (keyCode == 13) {
keyString = "Numpad Enter";
}
if (keyCode == 107) {
keyString = "Numpad +";
}
if (keyCode == 109) {
keyString = "Numpad -";
}
if (keyCode == 110) {
keyString = "Numpad .";
}
if (keyCode == 111) {
keyString = "Numpad /";
}
if ((keyCode >= 112) && (keyCode <= 126)) {
keyString = "F" + (keyCode - 111);
}
if (keyCode == 8) {
keyString = "Backspace";
}
if (keyCode == 9) {
keyString = "Tab";
}
if (keyCode == 13) {
keyString = "Enter";
}
if (keyCode == 16) {
keyString = "Shift";
}
if (keyCode == 17) {
keyString = "Control";
}
if (keyCode == 20) {
keyString = "Caps Lock";
}
if (keyCode == 27) {
keyString = "Esc";
}
if (keyCode == 32) {
keyString = "Spacebar";
}
if (keyCode == 33) {
keyString = "Page Up";
}
if (keyCode == 34) {
keyString = "Page Down";
}
if (keyCode == 35) {
keyString = "End";
}
if (keyCode == 36) {
keyString = "Home";
}
if (keyCode == 37) {
keyString = "Left Arrow";
}
if (keyCode == 38) {
keyString = "Up Arrow";
}
if (keyCode == 39) {
keyString = "Right Arrow";
}
if (keyCode == 40) {
keyString = "Down Arrow";
}
if (keyCode == 45) {
keyString = "Insert";
}
if (keyCode == 46) {
keyString = "Delete";
}
if (keyCode == 144) {
keyString = "Num Lock";
}
if (keyCode == 145) {
keyString = "Scroll Lock";
}
if (keyCode == 19) {
keyString = "Pause";
}
if (keyCode == 186) {
keyString = "; or :";
}
if (keyCode == 187) {
keyString = "= or +";
}
if (keyCode == 189) {
keyString = "- or _";
}
if (keyCode == 191) {
keyString = "/ or ?";
}
if (keyCode == 192) {
keyString = "` or ~";
}
if (keyCode == 219) {
keyString = "[ or {";
}
if (keyCode == 220) {
keyString = "\\or |";
}
if (keyCode == 221) {
keyString = "] or }";
}
if (keyCode == 222) {
keyString = "\" or '";
}
if (keyCode == 188) {
keyString = ",";
}
if (keyCode == 190) {
keyString = ".";
}
if (keyCode == 191) {
keyString = "/";
}
return(keyString);
}
Color.prototype.setTint = function (r, g, b, amount) {
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = 100 - amount));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
_root.maps.gotoAndStop(8);
_root.systemVolume = _root.SFXVolume;
stop();
Instance of Symbol 250 MovieClip in Frame 49
onClipEvent (enterFrame) {
if (_root.particleDepth > 1000) {
_root.particleDepth = 1;
}
if (_root.bulletDepth > 1000) {
_root.bulletDepth = 1;
}
if (_root.grenadeDepth > 1000) {
_root.grenadeDepth = 1;
}
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 49
onClipEvent (load) {
leftBound = -200;
rightBound = 1000;
topBound = -150;
bottomBound = 900;
screenWidth = 800;
screenHeight = 600;
destX = (destY = 0);
destZ = 1;
}
onClipEvent (enterFrame) {
leftBound = _root.maps.leftBound - 250;
rightBound = _root.maps.rightBound + 250;
topBound = _root.maps.topBound - 1000;
bottomBound = _root.maps.bottomBound + 250;
midX = (_root.maps.leftBound + _root.maps.rightBound) / 2;
midY = (_root.maps.topBound + _root.maps.bottomBound) / 2;
if (_root.dynamicCamera) {
if ((((_root.player1._x > leftBound) && (_root.player1._x < rightBound)) && (_root.player1._y > topBound)) && (_root.player1._y < bottomBound)) {
destX = -(_root.player1._x - (screenWidth / 2));
destY = -(_root.player1._y - (screenHeight / 2));
zR = 1;
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
} else {
destX = -(midX - (screenWidth / 2));
destY = -(midY - (screenHeight / 2));
}
_root._x = _root._x + ((destX - _root._x) / 10);
_root._y = _root._y + ((destY - _root._y) / 10);
_root._x = Math.round(_root._x);
_root._y = Math.round(_root._y);
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
_root.ammoCounter._x = _root.ammoCounter.origX - _root._x;
_root.ammoCounter._y = _root.ammoCounter.origY - _root._y;
_root.messageBox._x = _root.messageBox.origX - _root._x;
_root.messageBox._y = _root.messageBox.origY - _root._y;
_root.optionPane._x = _root.optionPane.origX - _root._x;
_root.optionPane._y = _root.optionPane.origY - _root._y;
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 49
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 258 MovieClip in Frame 49
onClipEvent (load) {
stopAllSounds();
pompeiiShort = new Sound(this);
pompeiiShort.attachSound("pompeiiShort");
pompeiiShort.setVolume(_root.musicVolume);
pompeiiShort.start(0, 9999999);
}
onClipEvent (enterFrame) {
pompeiiShort.setVolume(_root.musicVolume);
}
Instance of Symbol 266 MovieClip "shell0" in Frame 49
onClipEvent (load) {
xVel = (Math.random() * 14) - 7;
yVel = Math.random() * -10;
_rotation = (_rotation + ((Math.random() * 40) - 20));
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "shell0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + xVel);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 271 MovieClip "blood0" in Frame 49
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 75) + 75);
_xscale = ((Math.random() * 75) + 75);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "blood0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
drop._xscale = velocity * 5;
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 273 MovieClip "whiteExplode0" in Frame 49
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "whiteExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 275 MovieClip "darkExplode0" in Frame 49
onClipEvent (load) {
_yscale = ((Math.random() * 100) + 50);
_xscale = ((Math.random() * 100) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "darkExplode0") {
return(undefined);
}
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
_y = (_y - 5);
if (_xscale <= 0) {
removeMovieClip(this);
}
}
Instance of Symbol 277 MovieClip "concrete0" in Frame 49
onClipEvent (load) {
xVel = (Math.random() * 20) - 10;
yVel = (Math.random() * 20) - 10;
_yscale = ((Math.random() * 75) + 50);
_xscale = ((Math.random() * 75) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "concrete0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 280 MovieClip "spark0" in Frame 49
onClipEvent (load) {
xVel = (Math.random() * 30) - 15;
yVel = Math.random() * -15;
_yscale = ((Math.random() * 50) + 50);
_xscale = ((Math.random() * 50) + 50);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "spark0") {
return(undefined);
}
velocity = Math.sqrt((xVel * xVel) + (yVel * yVel));
_xscale = (velocity * 5);
_rotation = ((Math.atan2(yVel, xVel) * 180) / Math.PI);
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 283 MovieClip "pin0" in Frame 49
onClipEvent (load) {
xVel = (Math.random() * 10) - 5;
yVel = Math.random() * -5;
_rotation = (Math.random() * 360);
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pin0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "bullet0" in Frame 49
onClipEvent (load) {
xLength = 0;
_xscale = 10;
hit = false;
speed = 30;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "bullet0") {
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume);
if (hit) {
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (xLength < 100) {
xLength = xLength + 15;
}
if (xLength > 0) {
_xscale = (xDirection * xLength);
} else {
_xscale = 0;
}
c = 1;
while (c < _root.monsterDepth) {
if (_root["monster" + c].entireBody.hitTest(_x, _y, false) && (!_root["monster" + c].boomed)) {
impactPlayer.start(0, 1);
_root["monster" + c].xVel = _root["monster" + c].xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root["monster" + c].ground && (rndv < 0)) {
rndv = 0;
}
_root["monster" + c].yVel = _root["monster" + c].yVel - rndv;
if (_root.pBlood) {
c2 = 0;
while (c2 < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root["monster" + c].bloodRed, _root["monster" + c].bloodGreen, _root["monster" + c].bloodBlue, 100);
_root.particleDepth++;
c2++;
}
}
hit = true;
}
c++;
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
c = 0;
while (c < 2) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 3) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
break;
}
_x = (_x + (xDirection * 10));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 286 MovieClip "grenade0" in Frame 49
onClipEvent (load) {
if (_root.maps.hitTest(_x, _y, true)) {
inside = true;
}
grenadeSound = new Sound(this);
fuse = 50;
range = 300;
xVel = magnitude * 0.573576436351046;
yVel = magnitude * -0.819152044288992;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
grenadeBounce1 = new Sound(this);
grenadeBounce1.attachSound("grenadeBounce1");
grenadeBounce2 = new Sound(this);
grenadeBounce2.attachSound("grenadeBounce2");
grenadeBounce3 = new Sound(this);
grenadeBounce3.attachSound("grenadeBounce3");
grenadeSound = new Sound(this);
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "grenade0") {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
grenadeSound.setPan(pan);
grenadeSound.setVolume(_root.systemVolume);
_rotation = (_rotation + ((xDirection * xVel) * 2));
if (Math.abs(xVel) >= Math.abs(yVel)) {
highCount = xVel;
} else {
highCount = yVel;
}
xDone = (yDone = false);
if (Math.abs(highCount) < 1) {
_x = (_x + (xDirection * xVel));
_y = (_y + yVel);
xVel = 0;
yVel = 0;
}
if (!_root.maps.hitTest(_x, _y, true)) {
inside = false;
}
c = 0;
while (c < Math.abs(highCount)) {
if ((c <= Math.abs(xVel)) && (!xDone)) {
_x = (_x + xDirection);
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x + xDirection, _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
xVel = xVel / 2;
xDirection = -xDirection;
xDone = true;
}
}
if ((c <= Math.abs(yVel)) && (!yDone)) {
_y = (_y + (yVel / Math.abs(yVel)));
rnds = Math.floor(Math.random() * 3) + 1;
if ((_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
if ((_root.maps.hitTest(_x, _y - 1, true) && (!_root.maps.hitTest(_x, _y + 1, true))) && (!inside)) {
if (rnds == 1) {
grenadeBounce1.start(0, 1);
} else if (rnds == 2) {
grenadeBounce2.start(0, 1);
} else if (rnds == 3) {
grenadeBounce3.start(0, 1);
}
yVel = (-yVel) / 2;
xVel = xVel / 2;
yDone = true;
}
}
c++;
}
if (!(_root.maps.hitTest(_x, _y + 1, true) && (!_root.maps.hitTest(_x, _y - 1, true)))) {
yVel++;
}
if (fuse > 0) {
fuse--;
} else {
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
p2x = _root.player2._x - _x;
p2y = _root.player2._y - _y;
p2d = Math.sqrt((p2x * p2x) + (p2y * p2y));
if (range > p1d) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
}
if (range > p2d) {
p2xv = ((range - p2d) * p2x) / p2d;
p2yv = ((range - p2d) * p2y) / p2d;
_root.player2.xVel = _root.player2.xVel + (p2xv / 6);
if ((!_root.player2.ground) || (p2yv < 0)) {
_root.player2.yVel = _root.player2.yVel + (p2yv / 6);
}
}
explodeSound.start(0, 1);
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root.player2._y = _root.player2._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 288 MovieClip "pistolClip0" in Frame 49
onClipEvent (load) {
xVel = 0;
yVel = 0;
impactShell = new Sound(this);
impactShell.attachSound("impactShell");
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pistolClip0") {
return(undefined);
}
_x = (_x + xVel);
_y = (_y + yVel);
yVel++;
_rotation = (_rotation + (xVel * 2));
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
impactShell.setPan(pan);
impactShell.setVolume(_root.systemVolume);
if ((_root.maps.hitTest(_x, _y + yVel, true) && (!_root.maps.hitTest(_x, _y - 1, true))) && (Math.floor(Math.random() * 4) == 0)) {
yVel = (-yVel) / 2;
xVel = xVel / 2;
impactShell.start(0, 1);
}
if (_y > (_root.maps.bottomBound + 500)) {
removeMovieClip(this);
}
}
Instance of Symbol 263 MovieClip "pellet0" in Frame 49
onClipEvent (load) {
trail._visible = false;
_rotation = ((Math.random() * 20) - 10);
hit = false;
speed = 30;
xLength = -15;
rnds = Math.floor(Math.random() * 3);
bulletSound = new Sound(this);
impactPlayer = new Sound(this);
impactWall = new Sound(this);
if (rnds == 0) {
impactPlayer.attachSound("impactPlayer1");
impactWall.attachSound("impactWall1");
} else if (rnds == 1) {
impactPlayer.attachSound("impactPlayer2");
impactWall.attachSound("impactWall2");
} else {
impactPlayer.attachSound("impactPlayer3");
impactWall.attachSound("impactWall3");
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_name == "pellet0") {
return(undefined);
}
xLength = xLength + 5;
if (xLength < 0) {
_visible = false;
} else {
_visible = true;
}
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
bulletSound.setPan(pan);
bulletSound.setVolume(_root.systemVolume / 5);
if (hit) {
_visible = false;
_alpha = (_alpha - 10);
if ((_alpha <= 0) && (((impactPlayer.position == impactPlayer.duration) || (impactWall.position == impactWall.duration)) || ((impactWall.position == 0) && (impactPlayer.position == 0)))) {
removeMovieClip(this);
}
return(undefined);
}
if (owner == 1) {
if (_root.player2.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player2.xVel = _root.player2.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player2.ground && (rndv < 0)) {
rndv = 0;
}
_root.player2.yVel = _root.player2.yVel - rndv;
if (_root.pBlood) {
if (Math.floor(Math.random() * 2) == 0) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y - 25;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player2.bloodRed, _root.player2.bloodGreen, _root.player2.bloodBlue, 100);
_root.particleDepth++;
}
}
hit = true;
}
}
if (owner == 2) {
if (_root.player1.entireBody.hitTest(_x, _y, false)) {
impactPlayer.start(0, 1);
_root.player1.xVel = _root.player1.xVel + (xDirection * xVel);
rndv = (Math.random() * 10) - 5;
if (_root.player1.ground && (rndv < 0)) {
rndv = 0;
}
_root.player1.yVel = _root.player1.yVel - rndv;
if (_root.pBlood) {
c = 0;
while (c < 4) {
_root.blood0.duplicateMovieClip("blood" + _root.particleDepth, 1000 + _root.particleDepth);
_root["blood" + _root.particleDepth]._x = _x;
_root["blood" + _root.particleDepth]._y = _y;
myColor = new Color(_root["blood" + _root.particleDepth]);
myColor.setTint(_root.player1.bloodRed, _root.player1.bloodGreen, _root.player1.bloodBlue, 100);
_root.particleDepth++;
c++;
}
}
hit = true;
}
}
c = 0;
while (c < speed) {
if (_root.maps.hitTest(_x + (xDirection * 10), _y, true) && (!_root.maps.hitTest(_x - xDirection, _y, true))) {
c2 = 0;
while (c2 < 10) {
if (_root.maps.hitTest(_x + (c2 * xDirection), _y, true)) {
_x = (_x + (c2 * xDirection));
break;
}
c2++;
}
hit = true;
impactWall.start(0, 1);
if (_root.pSpark) {
if (Math.floor(Math.random() * 2) == 0) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
if (Math.floor(Math.random() * 2) == 0) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
}
}
break;
}
_x = (_x + ((xDirection * 10) * Math.cos((_rotation * Math.PI) / 180)));
_y = (_y + ((xDirection * 10) * Math.sin((_rotation * Math.PI) / 180)));
c = c + 10;
}
if (_x > (_root.maps.rightBound + 400)) {
removeMovieClip(this);
}
if (_x < (_root.maps.leftBound - 400)) {
removeMovieClip(this);
}
}
Instance of Symbol 297 MovieClip "maps" in Frame 49
onClipEvent (load) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
onClipEvent (enterFrame) {
mapBounds = this.getBounds(_root);
leftBound = mapBounds.xMin;
rightBound = mapBounds.xMax;
topBound = mapBounds.yMin;
bottomBound = mapBounds.yMax;
mapHeight = bottomBound - topBound;
mapWidth = rightBound - leftBound;
}
Instance of Symbol 350 MovieClip "player1" in Frame 49
onClipEvent (load) {
gun.guns.gotoAndStop(3);
letterGrade = "";
pName = _root.leftName;
red = _root.leftRed;
green = _root.leftGreen;
blue = _root.leftBlue;
eyeRed = _root.leftEyeRed;
eyeGreen = _root.leftEyeGreen;
eyeBlue = _root.leftEyeBlue;
eyeType = _root.leftEyeType;
eyes.fill.gotoAndStop(eyeType);
bloodRed = _root.leftBloodRed;
bloodGreen = _root.leftBloodGreen;
bloodBlue = _root.leftBloodBlue;
upCode = _root.leftSideUpCode;
downCode = _root.leftSideDownCode;
leftCode = _root.leftSideLeftCode;
rightCode = _root.leftSideRightCode;
shootCode = _root.leftSideShootCode;
grenadeCode = _root.leftSideGrenadeCode;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 0;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol1");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
shootCountAI = (prevVel = (jumpCountAI = 0));
animateType = "";
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (_root.playerNum >= 1) {
if (Key.isDown(upCode)) {
kup = true;
}
if (Key.isDown(downCode)) {
kdown = true;
}
if (Key.isDown(leftCode)) {
kleft = true;
}
if (Key.isDown(rightCode)) {
kright = true;
}
if (Key.isDown(grenadeCode)) {
kgrenade = true;
}
if (!Key.isDown(upCode)) {
kup = false;
}
if (!Key.isDown(downCode)) {
kdown = false;
}
if (!Key.isDown(leftCode)) {
kleft = false;
}
if (!Key.isDown(rightCode)) {
kright = false;
}
if (!Key.isDown(grenadeCode)) {
kgrenade = false;
}
if (!_root.micControl) {
this.attachAudio(false);
attached = false;
if (Key.isDown(shootCode)) {
kshoot = true;
}
if (!Key.isDown(shootCode)) {
kshoot = false;
}
}
if (_root.micControl) {
if (!attached) {
attached = true;
this.attachAudio(myMic);
}
if ((myMic.activityLevel >= 75) && (lastMic <= 50)) {
kshoot = true;
} else {
kshoot = false;
}
lastMic = myMic.activityLevel;
}
} else if (_root.playerNum == 0) {
this.attachAudio(false);
_root.micControl = false;
attached = false;
if (homein) {
if (_root.player2._x < _x) {
kleft = true;
} else {
kleft = false;
}
if (_root.player2._x > _x) {
kright = true;
} else {
kright = false;
}
} else {
if ((_x > (_root.maps.rightBound - 150)) || ((_root.player2._x > (_root.maps.leftBound + 100)) && (((xDirection == 1) && (_root.player2._x < _x)) || (((_root.player2._x + 200) < _x) && (_root.player2.yVel <= 0))))) {
kleft = true;
} else if (shootCountAI == 0) {
kleft = false;
}
if ((_x < (_root.maps.leftBound + 150)) || ((_root.player2._x < (_root.maps.rightBound - 100)) && (((xDirection == -1) && (_root.player2._x > _x)) || (((_root.player2._x - 200) > _x) && (_root.player2.yVel <= 0))))) {
kright = true;
} else if (shootCountAI == 0) {
kright = false;
}
}
if (((_root.player2._y - _y) < -50) && ((_root.player2._y > 50) || (_root.player2.kshoot))) {
kup = true;
} else {
kup = false;
}
if (Math.floor(Math.random() * 150) == 0) {
kgrenade = true;
}
if (kgrenade && (Math.floor(Math.random() * 90) == 0)) {
kgrenade = false;
}
if (((_root.player2._y > _y) && (_root.player2.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
} else {
homein = true;
}
} else {
kdown = false;
homein = false;
}
if (((Math.abs(_root.player2._y - _y) < (Math.random() * 100)) && (_root.player2._y > (_root.maps.topBound - 200))) || (shootCountAI >= 4)) {
kshoot = true;
if (shootCount == (shootSpeed - 1)) {
shootCountAI++;
}
} else {
shootCountAI = 0;
kshoot = false;
}
if (shootCountAI >= 3) {
if ((shootCountAI == 4) && (Math.floor(Math.random() * 2) == 0)) {
kup = true;
}
if (shootCountAI >= 3) {
if (_root.player2._x > _x) {
kright = true;
kleft = false;
}
if (_root.player2._x < _x) {
kleft = true;
kright = false;
}
}
if (shootCountAI == 7) {
shootCountAI = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting) {
holsterCount++;
if (holsterCount == 30) {
shooting = false;
holsterCount = 0;
}
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (kgrenade && (grenadeCount > 0)) {
if (grenadePrime == 0) {
if (_root.pShell) {
_root.pin0.duplicateMovieClip("pin" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pin" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["pin" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
grenadePin.start(0, 1);
}
if (grenadePrime < 50) {
grenadePrime++;
}
}
if ((!kgrenade) && (grenadePrime > 0)) {
grenadeCount--;
if (grenadePrime > 20) {
grenadeThrow.start(0, 1);
}
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
if ((_root.micControl && (kshoot)) || (((!_root.micControl) && (kshoot)) && (shootCount >= shootSpeed))) {
shooting = true;
holsterCount = 0;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
xVel = xVel - (xDirection * recoil);
if (gunName != "RPG-7") {
pistol1.start(0, 1);
}
if (gunName == "RPG-7") {
_root.rocket0.duplicateMovieClip("rocket" + _root.particleDepth, 1000 + _root.particleDepth);
_root["rocket" + _root.particleDepth].longWeapon = longWeapon;
_root["rocket" + _root.particleDepth].xDirection = xDirection;
_root["rocket" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["rocket" + _root.particleDepth]._y = _y - 25;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["rocket" + _root.particleDepth]._x = _x;
}
_root["rocket" + _root.particleDepth].xVel = power;
_root["rocket" + _root.particleDepth].owner = 1;
_root.particleDepth++;
} else if ((gunName == "SPAS-12") || (gunName == "Super 90")) {
c = 0;
while (c < 10) {
_root.pellet0.duplicateMovieClip("pellet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pellet" + _root.particleDepth].longWeapon = longWeapon;
_root["pellet" + _root.particleDepth].xDirection = xDirection;
_root["pellet" + _root.particleDepth]._x = _x + (20 * xDirection);
_root["pellet" + _root.particleDepth]._y = _y - 30;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["pellet" + _root.particleDepth]._x = _x;
}
_root["pellet" + _root.particleDepth].xVel = power;
_root["pellet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
c++;
}
} else {
_root.bullet0.duplicateMovieClip("bullet" + _root.particleDepth, 1000 + _root.particleDepth);
_root["bullet" + _root.particleDepth].xDirection = xDirection;
_root["bullet" + _root.particleDepth]._x = _x + (20 * xDirection);
if (longWeapon) {
_root["bullet" + _root.particleDepth]._y = _y - 27;
} else {
_root["bullet" + _root.particleDepth]._y = _y - 30;
}
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (20 * xDirection), _y - 25, true))) {
_root["bullet" + _root.particleDepth]._x = _x;
}
_root["bullet" + _root.particleDepth].xVel = power;
_root["bullet" + _root.particleDepth].owner = 1;
_root.particleDepth++;
if (_root.pShell && (gunName != "Raging Bull")) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
}
}
clipSize--;
shootCount = 0;
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
if (_y > (_root.maps.bottomBound + 500)) {
if (!gibbed) {
gib.start(0, 1);
gibbed = true;
}
if (_root.HUD.currentTime >= 40) {
letterGrade = "A";
} else if (_root.HUD.currentTime >= 30) {
letterGrade = "B";
} else if (_root.HUD.currentTime >= 20) {
letterGrade = "C";
} else if (_root.HUD.currentTime >= 10) {
letterGrade = "D";
} else {
letterGrade = "F";
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
onClipEvent (load) {
gun.guns.gotoAndStop(3);
sidearm = 3;
reload = new Sound(this);
reload.attachSound("reload");
reload2 = new Sound(this);
reload2.attachSound("reload2");
}
onClipEvent (enterFrame) {
if (gunName == "MK23") {
pistol1.attachSound("mk23fire");
}
if (gunName == "P226") {
pistol1.attachSound("p226fire");
}
if (gunName == "M1911") {
pistol1.attachSound("m1911fire");
}
if (gunName == "Raging Bull") {
pistol1.attachSound("ragingbullfire");
}
if (gunName == "Desert Eagle") {
pistol1.attachSound("deserteaglefire");
}
if (gunName == "Glock 18") {
pistol1.attachSound("glock18fire");
}
if (gunName == "TMP") {
pistol1.attachSound("tmpfire");
}
if (gunName == "MAC-11") {
pistol1.attachSound("mac11fire");
}
if (gunName == "MP5") {
pistol1.attachSound("mp5fire");
}
if (gunName == "SPAS-12") {
pistol1.attachSound("spas12fire");
}
if (gunName == "Super 90") {
pistol1.attachSound("super90fire");
}
if (gunName == "MP7") {
pistol1.attachSound("mp7fire");
}
if (gunName == "P90") {
pistol1.attachSound("p90fire");
}
if (gunName == "M24") {
pistol1.attachSound("m24fire");
}
if (gunName == "PSG-1") {
pistol1.attachSound("psg1fire");
}
if (gunName == "M14") {
pistol1.attachSound("m14fire");
}
if (gunName == "LR-300") {
pistol1.attachSound("lr300fire");
}
if (gunName == "M61 Vulcan") {
pistol1.attachSound("m61vulcanfire");
}
if (gunName == "AK-74") {
pistol1.attachSound("ak74fire");
}
}
onClipEvent (enterFrame) {
if (shootCount < 0) {
holsterCount = 0;
}
if ((((((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle")) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -40;
reloading = true;
if (gunName != "Raging Bull") {
_root.pistolClip0.duplicateMovieClip("pistolClip" + _root.particleDepth, 1000 + _root.particleDepth);
_root["pistolClip" + _root.particleDepth]._x = _x + (xDirection * 15);
_root["pistolClip" + _root.particleDepth]._y = _y - 15;
_root["pistolClip" + _root.particleDepth]._xscale = 100 * xDirection;
_root.particleDepth++;
reload.start(0, 1);
}
if (_root.pShell && (gunName == "Raging Bull")) {
c = 0;
while (c < 5) {
_root.shell0.duplicateMovieClip("shell" + _root.particleDepth, 1000 + _root.particleDepth);
_root["shell" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["shell" + _root.particleDepth]._y = _y - 25;
_root.particleDepth++;
c++;
}
reload2.start(0, 1);
}
} else if ((((!(((((gunName == "MK23") || (gunName == "M1911")) || (gunName == "P226")) || (gunName == "Raging Bull")) || (gunName == "Desert Eagle"))) && (clipSize == 0)) && (shootCount == 0)) && (!reloading)) {
shootCount = -20;
shooting = false;
holsterCount = 0;
gun.guns.gotoAndStop(sidearm);
}
if ((shootCount == 0) && (reloading)) {
clipSize = maxClip;
reloading = false;
}
if (_y > (_root.maps.bottomBound + 1000)) {
shootCount = -20;
gun.guns.gotoAndStop(sidearm);
clipSize = maxClip;
reloading = false;
shooting = false;
holsterCount = 0;
if (grenadePrime > 0) {
grenadeCount = 0;
innerHand.moveState = "throw";
innerHand.gotoAndPlay(2);
_root.grenade0.duplicateMovieClip("grenade" + _root.particleDepth, 1000 + _root.particleDepth);
_root["grenade" + _root.particleDepth].xDirection = xDirection;
_root["grenade" + _root.particleDepth]._x = _x + (15 * xDirection);
_root["grenade" + _root.particleDepth]._y = _y - 27;
if (_root.maps.hitTest(_x + (10 * xDirection), _y - 25, true) || (_root.maps.hitTest(_x + (15 * xDirection), _y - 25, true))) {
_root["grenade" + _root.particleDepth]._x = _x;
}
_root["grenade" + _root.particleDepth].magnitude = grenadePrime / 2;
_root.particleDepth++;
grenadePrime = 0;
}
}
}
Instance of Symbol 531 MovieClip "HUD" in Frame 49
onClipEvent (load) {
goPlayed = true;
dropRate = 5;
_root.destX = -800;
_root.destY = 0;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "END MISSION";
timeCount = 0;
currentTime = 0;
playerSound = new Sound(this);
pistol1 = new Sound(this);
pistol1.attachSound("pistol2");
habib = new Sound(this);
habib.attachSound("habib");
_root.monsterDepth = 1;
}
onClipEvent (enterFrame) {
if (startTimer) {
timeDisplay = (((currentTime + ".") + Math.floor(timeCount / 3)) + "") + Math.floor(Math.random() * 10);
} else {
timeDisplay = currentTime + ".00";
}
if (_root.player1.letterGrade != "") {
return(undefined);
}
if (!startTimer) {
return(undefined);
}
playerSound.setVolume(_root.systemVolume);
if ((timeCount == 0) && ((currentTime % Math.ceil(dropRate)) == 0)) {
dropRate = dropRate - 0.25;
if (dropRate < 1) {
dropRate = 1;
}
_root.monster0.duplicateMovieClip("monster" + _root.monsterDepth, 2000 + _root.monsterDepth);
_root.monsterDepth++;
if (_root.monsterDepth > 100) {
_root.monsterDepth = 1;
}
}
timeCount++;
if (timeCount == 30) {
timeCount = 0;
currentTime++;
if ((currentTime % 30) == 0) {
habib.start(0, 1);
}
}
rndT = 75 - currentTime;
if (rndT < 5) {
rndT = 5;
}
}
Instance of Symbol 561 MovieClip "ammoCounter" in Frame 49
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 526 MovieClip "messageBox" in Frame 49
onClipEvent (load) {
bLabel = "SKIP";
origX = _x;
origY = _y;
messageNum = 1;
timeCount = 0;
tutorialMessage = "Welcome to Survival Mode! You must try to stay on the map as long as you can by any means possible.";
}
onClipEvent (enterFrame) {
if (_root.HUD.goPlayed) {
return(undefined);
}
if (_root.player1.letterGrade != "") {
submitButton._visible = true;
submitButton.bLabel = "SUBMIT SCORE";
bLabel = "END MISSION";
_visible = true;
tutorialMessage = "You are dead.\n\nTIME SURVIVED: " + _root.HUD.currentTime;
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.survivalScore < _root.HUD.currentTime) || (saveFile.data.survivalScore == undefined)) {
saveFile.data.survivalScore = _root.HUD.currentTime;
}
saveFile.flush();
}
} else if (messageNum == 1) {
timeCount++;
if ((timeCount == 120) || (menuSelection == "SKIP")) {
_visible = false;
_root.HUD.goSign.play();
messageNum++;
}
}
if (menuSelection == "END MISSION") {
_root.gotoAndStop("mainMenu");
}
if (menuSelection == "SUBMIT SCORE") {
ab20_09 = new LoadVars();
ab20_09.z = _root.player1.pName;
ab20_09.x = _root.HUD.currentTime;
ab20_09.c = 693;
ab20_09.v = "SSPGDV";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=693", "_blank");
_root.gotoAndStop("mainMenu");
}
}
Instance of Symbol 565 MovieClip "optionPane" in Frame 49
onClipEvent (load) {
origX = _x;
origY = _y;
}
Instance of Symbol 469 MovieClip in Frame 49
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Instance of Symbol 350 MovieClip "monster0" in Frame 49
onClipEvent (load) {
gun.guns._visible = false;
do {
letter1 = chr(Math.floor(Math.random() * 26) + 65);
} while (((((letter1 == "A") || (letter1 == "E")) || (letter1 == "I")) || (letter1 == "O")) || (letter1 == "U"));
rndl = Math.floor(Math.random() * 5);
if (rndl == 0) {
letter2 = "a";
} else if (rndl == 1) {
letter2 = "e";
} else if (rndl == 2) {
letter2 = "i";
} else if (rndl == 3) {
letter2 = "o";
} else {
letter2 = "u";
}
letter3 = chr(Math.floor(Math.random() * 26) + 97);
pName = (("" + letter1) + letter2) + letter3;
red = Math.floor(Math.random() * 255);
green = Math.floor(Math.random() * 255);
blue = Math.floor(Math.random() * 255);
eyeRed = Math.floor(Math.random() * 255);
eyeGreen = Math.floor(Math.random() * 255);
eyeBlue = Math.floor(Math.random() * 255);
eyeType = Math.floor(Math.random() * 10) + 1;
eyes.fill.gotoAndStop(eyeType);
bloodRed = Math.floor(Math.random() * 255);
bloodGreen = Math.floor(Math.random() * 255);
bloodBlue = Math.floor(Math.random() * 255);
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 5;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
groundY = 350;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
recoil = 1;
power = 20;
holsterCount = 0;
playerSound = new Sound(this);
pistol2 = new Sound(this);
pistol2.attachSound("pistol2");
grenadeThrow = new Sound(this);
grenadeThrow.attachSound("grenadeThrow");
grenadePin = new Sound(this);
grenadePin.attachSound("grenadePin");
playerImpact1 = new Sound(this);
playerImpact1.attachSound("playerImpact1");
playerImpact2 = new Sound(this);
playerImpact2.attachSound("playerImpact2");
playerImpact3 = new Sound(this);
playerImpact3.attachSound("playerImpact3");
gib = new Sound(this);
gib.attachSound("gib");
gibbed = false;
explodeSound = new Sound(this);
rnde = Math.floor(Math.random() * 3) + 1;
if (rnde == 1) {
explodeSound.attachSound("explode1");
} else if (rnde == 2) {
explodeSound.attachSound("explode2");
} else if (rnde == 3) {
explodeSound.attachSound("explode3");
}
range = 200;
_y = (_root.maps.topBound - 400);
spawnPlats = 0;
while (spawnPlats == 0) {
c = 0;
while (c < _root.maps.mapHeight) {
_x = ((Math.random() * (_root.maps.rightBound - _root.maps.leftBound)) + _root.maps.leftBound);
if (_root.maps.hitTest(_x, _root.maps.topBound + c, true)) {
spawnPlats++;
break;
}
c = c + 10;
}
}
shootCountAI = (prevVel = (jumpCountAI = 0));
}
onClipEvent (enterFrame) {
if (_name == "monster0") {
_visible = false;
}
if ((_root.gamePaused || (!_root.HUD.startTimer)) || (_name == "monster0")) {
return(undefined);
}
if (boomed) {
if (explodeSound.position == explodeSound.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
if (gibby) {
if (gib.position == gib.duration) {
removeMovieClip(this);
}
_visible = false;
return(undefined);
}
if (_x > _root.player1._x) {
kleft = true;
} else {
kleft = false;
}
if (_x < _root.player1._x) {
kright = true;
} else {
kright = false;
}
if (_y > _root.player1._y) {
kup = true;
} else {
kup = false;
}
if (((_root.player1._y > _y) && (_root.player1.yVel <= 0)) && (ground)) {
wallCounts = 0;
c = 0;
while (c < _root.maps.mapWidth) {
if (_root.maps.hitTest(_x, _y + c, true) && (!_root.maps.hitTest(_x, (_y + c) - 10, true))) {
wallCounts++;
if (wallCounts > 1) {
break;
}
}
c = c + 10;
}
if (wallCounts > 1) {
homein = false;
kdown = true;
}
} else {
kdown = false;
}
}
onClipEvent (enterFrame) {
if ((_root.gamePaused || (!_root.HUD.startTimer)) || (_name == "monster0")) {
return(undefined);
}
_xscale = (xDirection * 100);
_x = Math.round(_x);
_y = Math.round(_y);
pan = ((_x + _root._x) / 4) - 100;
if (pan < -100) {
pan = -100;
}
if (pan > 100) {
pan = 100;
}
playerSound.setPan(pan);
playerSound.setVolume(_root.systemVolume);
if (boomed) {
return(undefined);
}
if (kright) {
xDirection = 1;
}
if (kleft) {
xDirection = -1;
}
if (shootCount < shootSpeed) {
shootCount++;
}
if ((kright && (xVel < maxXVel)) && (ground)) {
xVel = xVel + xAccel;
}
if ((kleft && (xVel > (-maxXVel))) && (ground)) {
xVel = xVel - xAccel;
}
if ((kleft && (xVel > ((-maxXVel) / 2))) && (!ground)) {
xVel = xVel - (xAccel / 2);
}
if ((kright && (xVel < (maxXVel / 2))) && (!ground)) {
xVel = xVel + (xAccel / 2);
}
if (kup && (ground)) {
yVel = -maxYVel;
ground = false;
}
if (kdown) {
ground = false;
_y = (_y + 4);
}
if (!ground) {
yVel = yVel + yAccel;
}
if ((ground && (!kright)) && (!kleft)) {
xVel = xVel - (xVel / 10);
}
c = 0;
while (c <= Math.abs(yVel)) {
if (((yVel >= 0) && (_root.maps.hitTest(_x, _y + 2, true))) && (!_root.maps.hitTest(_x, _y - 2, true))) {
ground = true;
yVel = 0;
break;
}
ground = false;
_y = (_y + (yVel / Math.abs(yVel)));
c++;
}
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
xVel = (-xVel) / 2;
}
if (Math.abs(xVel) >= 1) {
c = 0;
while (c < Math.abs(xVel)) {
if (_root.maps.hitTest(_x + ((2 * xVel) / Math.abs(xVel)), _y, true) && (!_root.maps.hitTest(_x - ((2 * xVel) / Math.abs(xVel)), _y, true))) {
xVel = (-xVel) / 2;
if (Math.abs(xVel) > 15) {
rnds = Math.floor(Math.random() * 3);
if (rnds == 0) {
playerImpact1.start(0, 1);
} else if (rnds == 1) {
playerImpact2.start(0, 1);
} else {
playerImpact3.start(0, 1);
}
}
break;
}
_x = (_x + (xVel / Math.abs(xVel)));
c++;
}
} else {
_x = (_x + xVel);
}
p1x = _root.player1._x - _x;
p1y = _root.player1._y - _y;
p1d = Math.sqrt((p1x * p1x) + (p1y * p1y));
if (p1d < 50) {
p1xv = ((range - p1d) * p1x) / p1d;
p1yv = ((range - p1d) * p1y) / p1d;
_root.player1.xVel = _root.player1.xVel + (p1xv / 6);
if ((!_root.player1.ground) || (p1yv < 0)) {
_root.player1.yVel = _root.player1.yVel + (p1yv / 6);
}
explodeSound.start(0, 1);
if (!gibby) {
gib.start(0, 1);
}
gibby = true;
c = 0;
while (c < (4 / _root.pBoom)) {
_root.whiteExplode0.duplicateMovieClip("whiteExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["whiteExplode" + _root.particleDepth]._x = (_x + (Math.random() * 60)) - 30;
_root["whiteExplode" + _root.particleDepth]._y = (_y + (Math.random() * 60)) - 30;
_root.particleDepth++;
c++;
}
c = 0;
while (c < (6 / _root.pBoom)) {
_root.darkExplode0.duplicateMovieClip("darkExplode" + _root.particleDepth, 1000 + _root.particleDepth);
_root["darkExplode" + _root.particleDepth]._x = (_x + (Math.random() * 100)) - 50;
_root["darkExplode" + _root.particleDepth]._y = (_y + (Math.random() * 100)) - 50;
_root.particleDepth++;
c++;
}
if (_root.pSpark) {
c = 0;
while (c < 4) {
_root.concrete0.duplicateMovieClip("concrete" + _root.particleDepth, 1000 + _root.particleDepth);
_root["concrete" + _root.particleDepth]._x = _x;
_root["concrete" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
c = 0;
while (c < 6) {
_root.spark0.duplicateMovieClip("spark" + _root.particleDepth, 1000 + _root.particleDepth);
_root["spark" + _root.particleDepth]._x = _x;
_root["spark" + _root.particleDepth]._y = _y;
_root.particleDepth++;
c++;
}
}
_root.player1._y = _root.player1._y - 2;
_root._x = _root._x + Math.round((Math.random() * 60) - 30);
_root._y = _root._y + Math.round((Math.random() * 60) - 30);
boomed = true;
}
if ((_y > (_root.maps.bottomBound + 1000)) && (!gibby)) {
gib.start(0, 1);
gibby = true;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (ground && ((animateType == "fall") || (animateType == "jumpfall"))) {
gotoAndPlay ("land");
animateType = "land";
} else if ((((yVel < 0) && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (((yVel >= 0) && (animateType != "jumpfall")) && (animateType == "jump")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if ((yVel > 0) && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
}
Frame 50
_root.systemVolume = _root.SFXVolume;
_root._x = (_root._y = 0);
stop();
Instance of Symbol 520 MovieClip "HUD" in Frame 50
onClipEvent (load) {
_root.destX = -800;
_root.destY = 0;
_root.menuPage = 15;
origX = _x;
origY = _y;
bLabel = "BACK";
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 50
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 258 MovieClip in Frame 50
onClipEvent (load) {
stopAllSounds();
mall = new Sound(this);
mall.attachSound("mall");
mall.setVolume(_root.musicVolume);
mall.start(0, 9999999);
}
onClipEvent (enterFrame) {
mall.setVolume(_root.musicVolume);
}
Instance of Symbol 665 MovieClip "gunDisplay" in Frame 50
onClipEvent (load) {
gotoAndStop (70);
}
Instance of Symbol 667 MovieClip "noMoney" in Frame 50
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
_root.weaponPurchased._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.noProfile._alpha = 0;
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 669 MovieClip "noProfile" in Frame 50
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
_root.weaponPurchased._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.noMoney._alpha = 0;
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 671 MovieClip "weaponPurchased" in Frame 50
onClipEvent (load) {
_alpha = 0;
money = new Sound(this);
money.attachSound("moneySound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
money.start(0, 1);
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 673 MovieClip "haveWeapon2" in Frame 50
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
_root.haveWeapon._alpha = 0;
_root.weaponPurchased._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 673 MovieClip "haveWeapon" in Frame 50
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
_root.haveWeapon2._alpha = 0;
beep.start(0, 1);
_root.weaponPurchased._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 700 MovieClip "weaponList" in Frame 50
onClipEvent (enterFrame) {
_root.weaponList.gotoAndStop(_root.tabSelection);
}
onClipEvent (load) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.totalCoins == undefined) {
saveFile.data.totalCoins = 0;
}
}
}
Instance of Symbol 703 MovieClip in Frame 50
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.totalCoins == undefined) {
currentCoins = 0;
} else {
currentCoins = saveFile.data.totalCoins;
}
} else {
currentCoins = 0;
}
saveFile.flush();
}
Instance of Symbol 469 MovieClip in Frame 50
onClipEvent (load) {
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Frame 51
function validMapName(tempName) {
if (((((((((((((((((tempName.indexOf(" ") != -1) || (tempName.indexOf("\\") != -1)) || (tempName.indexOf("/") != -1)) || (tempName.indexOf(":") != -1)) || (tempName.indexOf("*") != -1)) || (tempName.indexOf("?") != -1)) || (tempName.indexOf(">") != -1)) || (tempName.indexOf("<") != -1)) || (tempName.indexOf("|") != -1)) || (tempName.indexOf(".") != -1)) || (tempName.indexOf("~") != -1)) || (tempName.indexOf("%") != -1)) || (tempName.indexOf("&") != -1)) || (tempName.indexOf(";") != -1)) || (tempName.indexOf("'") != -1)) || (tempName.indexOf("#") != -1)) || (tempName.indexOf("\"") != -1)) {
return(tempName.substring(0, tempName.length - 1));
}
return(tempName);
}
Instance of Symbol 252 MovieClip "screenControl" in Frame 51
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
_root._y = _root._y + 5;
}
if (Key.isDown(39)) {
_root._x = _root._x - 5;
}
if (Key.isDown(37)) {
_root._x = _root._x + 5;
}
if (Key.isDown(40)) {
_root._y = _root._y - 5;
}
_root.HUD._x = _root.HUD.origX - _root._x;
_root.HUD._y = _root.HUD.origY - _root._y;
}
Instance of Symbol 705 MovieClip "mapBuilder" in Frame 51
onClipEvent (load) {
platformDepth = 0;
platformNum = 0;
mDown = (kshift = false);
ox = (oy = 0);
}
onClipEvent (enterFrame) {
if (Key.isDown(16)) {
kshift = true;
}
if (!Key.isDown(16)) {
kshift = false;
}
}
onClipEvent (mouseDown) {
if (kshift || (noGo)) {
return(undefined);
}
if (!mDown) {
mDown = true;
_root.maps.attachMovie("platform", "platform" + platformDepth, 1000 + platformDepth);
_root.maps["platform" + platformDepth]._x = _root._xmouse - _root.maps._x;
_root.maps["platform" + platformDepth]._y = _root._ymouse - _root.maps._y;
_root.maps["platform" + platformDepth]._width = 10;
_root.maps["platform" + platformDepth]._height = 10;
ox = _root._xmouse;
oy = _root._ymouse;
platformNum++;
}
}
onClipEvent (mouseMove) {
if (mDown) {
boxWidth = _root._xmouse - ox;
boxHeight = _root._ymouse - oy;
if (boxWidth < 0) {
_root.maps["platform" + platformDepth]._x = _root._xmouse - _root.maps._x;
}
if (boxHeight < 0) {
_root.maps["platform" + platformDepth]._y = _root._ymouse - _root.maps._y;
}
_root.maps["platform" + platformDepth]._width = Math.abs(boxWidth);
_root.maps["platform" + platformDepth]._height = Math.abs(boxHeight);
if (_root.maps["platform" + platformDepth]._width < 10) {
_root.maps["platform" + platformDepth]._width = 10;
}
if (_root.maps["platform" + platformDepth]._height < 10) {
_root.maps["platform" + platformDepth]._height = 10;
}
}
}
onClipEvent (mouseUp) {
if (mDown) {
mDown = false;
platformDepth++;
}
}
Instance of Symbol 254 MovieClip "fpsCounter" in Frame 51
onClipEvent (load) {
frameCount = (theTime = (elapsed = 0));
_root.FPS = 0;
}
onClipEvent (enterFrame) {
frameCount++;
theTime = getTimer() - elapsed;
_root.FPS = Math.round((1000 * frameCount) / theTime);
if (frameCount == 33) {
elapsed = getTimer();
frameCount = 0;
}
}
Instance of Symbol 258 MovieClip in Frame 51
onClipEvent (load) {
stopAllSounds();
}
Instance of Symbol 721 MovieClip "HUD" in Frame 51
onClipEvent (load) {
origX = _x;
origY = _y;
var saveFile = SharedObject.getLocal("mapList");
if (saveFile.data.mapNum == undefined) {
defaultNum = 9;
} else {
defaultNum = saveFile.data.mapNum + 1;
}
_root.mapName = "MAP" + defaultNum;
}
onClipEvent (enterFrame) {
_root.mapName = _root.validMapName(_root.mapName);
if (menuSelection == "CANCEL") {
stopAllSounds();
_root.gotoAndStop("MainMenu");
}
if (menuSelection == "SAVE") {
var saveFile = SharedObject.getLocal("mapList");
if (saveFile.data.mapNum == undefined) {
saveFile.data.mapNum = 8;
saveFile.data.map1 = "Arena";
saveFile.data.map2 = "Basic";
saveFile.data.map3 = "Agility";
saveFile.data.map4 = "Sniper";
saveFile.data.map5 = "Grenade";
saveFile.data.map6 = "Microphone";
saveFile.data.map7 = "Line";
saveFile.data.map8 = "Survival";
c = 1;
while (c <= 8) {
saveFile.data["map" + c].platNum = 0;
c++;
}
}
if ((saveFile.data[_root.mapName].platNum != undefined) || (_root.mapName == "")) {
errorMessage._alpha = 100;
menuSelection = "";
return(undefined);
}
if (_root.mapBuilder.platformNum <= 0) {
errorMessage2._alpha = 100;
menuSelection = "";
return(undefined);
}
saveFile.data.mapNum++;
saveFile.data["map" + saveFile.data.mapNum] = _root.mapName;
saveFile.flush();
var saveFile = SharedObject.getLocal(_root.mapName);
saveFile.data.platNum = _root.mapBuilder.platformDepth;
c = 0;
while (c < _root.mapBuilder.platformDepth) {
saveFile.data[("plat" + c) + "X"] = _root.maps["platform" + c]._x;
saveFile.data[("plat" + c) + "Y"] = _root.maps["platform" + c]._y;
saveFile.data[("plat" + c) + "Width"] = _root.maps["platform" + c]._width;
saveFile.data[("plat" + c) + "Height"] = _root.maps["platform" + c]._height;
c++;
}
saveFile.flush();
stopAllSounds();
_root.gotoAndStop("MainMenu");
}
}
Instance of Symbol 469 MovieClip in Frame 51
onClipEvent (load) {
_root.destX = 0;
_root.destY = 0;
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 5);
}
_x = (-_root._x);
_y = (-_root._y);
}
Symbol 57 Button
on (release) {
if (_root.mapBuilder.kshift) {
_root.mapBuilder.platformNum--;
removeMovieClip(this);
}
}
Symbol 72 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.deserteagle) {
_root.player1.sidearm = 7;
_root.player1.gun.guns.gotoAndStop(_root.player1.sidearm);
}
}
}
Symbol 79 Button
on (release) {
var saveFile = SharedObject.getLocal("mapList");
oldName = saveFile.data["map" + currentMap];
saveFile.flush();
if (oldName != undefined) {
var saveFile = SharedObject.getLocal(oldName);
oldPlatNum = saveFile.data.platNum;
saveFile.flush();
} else {
oldPlatNum = 0;
}
mapDraw = false;
currentMap++;
if (currentMap > mapNum) {
currentMap = 1;
}
}
Symbol 80 Button
on (release) {
var saveFile = SharedObject.getLocal("mapList");
oldName = saveFile.data["map" + currentMap];
saveFile.flush();
if (oldName != undefined) {
var saveFile = SharedObject.getLocal(oldName);
oldPlatNum = saveFile.data.platNum;
saveFile.flush();
} else {
oldPlatNum = 0;
}
mapDraw = false;
currentMap--;
if (currentMap < 1) {
currentMap = mapNum;
}
}
Symbol 84 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
_root.player1.sidearm = 3;
_root.player1.gun.guns.gotoAndStop(_root.player1.sidearm);
}
Symbol 85 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.p226) {
_root.player1.sidearm = 4;
_root.player1.gun.guns.gotoAndStop(_root.player1.sidearm);
}
}
}
Symbol 86 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.m1911) {
_root.player1.sidearm = 5;
_root.player1.gun.guns.gotoAndStop(_root.player1.sidearm);
}
}
}
Symbol 87 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.ragingbull) {
_root.player1.sidearm = 6;
_root.player1.gun.guns.gotoAndStop(_root.player1.sidearm);
}
}
}
Symbol 88 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.deserteagle) {
_root.player2.sidearm = 7;
_root.player2.gun.guns.gotoAndStop(_root.player2.sidearm);
}
}
}
Symbol 89 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
_root.player2.sidearm = 3;
_root.player2.gun.guns.gotoAndStop(_root.player2.sidearm);
}
Symbol 90 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.p226) {
_root.player2.sidearm = 4;
_root.player2.gun.guns.gotoAndStop(_root.player2.sidearm);
}
}
}
Symbol 91 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.m1911) {
_root.player2.sidearm = 5;
_root.player2.gun.guns.gotoAndStop(_root.player2.sidearm);
}
}
}
Symbol 92 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.ragingbull) {
_root.player2.sidearm = 6;
_root.player2.gun.guns.gotoAndStop(_root.player2.sidearm);
}
}
}
Symbol 100 Button
on (release) {
_root.HUD.goPlayed = false;
_root.createEmptyMovieClip("blank", getDepth());
}
Symbol 104 Button
on (release) {
_root.supplyDrop = !_root.supplyDrop;
}
Instance of Symbol 82 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (load) {
var saveFile = SharedObject.getLocal("mapList");
if (saveFile.data.mapNum == undefined) {
mapNum = 8;
} else {
mapNum = saveFile.data.mapNum;
}
saveFile.flush();
currentMap = 1;
mapName = "Arena";
mapDraw = false;
}
onClipEvent (enterFrame) {
if ((currentMap > 8) && (mapDraw == false)) {
_root.maps.gotoAndStop(9);
var saveFile = SharedObject.getLocal("mapList");
mapName = saveFile.data["map" + currentMap];
saveFile.flush();
var saveFile = SharedObject.getLocal(mapName);
c = 0;
while (c < oldPlatNum) {
removeMovieClip(_root.maps["platform" + c]);
c++;
}
c = 0;
while (c < saveFile.data.platNum) {
_root.maps.attachMovie("platform", "platform" + c, 1000 + c);
_root.maps["platform" + c]._x = saveFile.data[("plat" + c) + "X"];
_root.maps["platform" + c]._y = saveFile.data[("plat" + c) + "Y"];
_root.maps["platform" + c]._width = saveFile.data[("plat" + c) + "Width"];
_root.maps["platform" + c]._height = saveFile.data[("plat" + c) + "Height"];
if (saveFile.data[("plat" + c) + "X"] == undefined) {
removeMovieClip(_root.maps["platform" + c]);
}
c++;
}
saveFile.flush();
mapDraw = true;
} else if ((currentNum <= 8) && (mapDraw == false)) {
c = 0;
while (c < oldPlatNum) {
removeMovieClip(_root.maps["platform" + c]);
c++;
}
if (currentMap == 1) {
mapName = "Arena";
} else if (currentMap == 2) {
mapName = "Basic";
} else if (currentMap == 3) {
mapName = "Agility";
} else if (currentMap == 4) {
mapName = "Sniper";
} else if (currentMap == 5) {
mapName = "Grenade";
} else if (currentMap == 6) {
mapName = "Microphone";
} else if (currentMap == 7) {
mapName = "Line";
} else if (currentMap == 8) {
mapName = "Survival";
}
_root.maps.gotoAndStop(currentMap);
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 3) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 4) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 5) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 6) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 7) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player2.sidearm == 3) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player2.sidearm == 4) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player2.sidearm == 5) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player2.sidearm == 6) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.player2.sidearm == 7) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.p226) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.m1911) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.ragingbull) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.deserteagle) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.p226) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.m1911) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.ragingbull) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player2.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.deserteagle) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 103 MovieClip in Symbol 105 MovieClip [optionPanel] Frame 1
onClipEvent (enterFrame) {
if (_root.supplyDrop) {
_visible = true;
} else {
_visible = false;
}
}
Symbol 118 Button
on (release) {
_root.play();
}
Symbol 120 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 120 MovieClip Frame 2
gotoAndPlay (1);
Symbol 120 MovieClip Frame 3
Symbol 124 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 126 Button
on (release) {
getURL ("http://www.google.com/cookies.html", "_blank");
}
Symbol 127 Button
on (release) {
getURL ("http://www.macromedia.com/support/documentation/en/flashplayer/help/help09.html", "_blank");
}
Symbol 128 Button
on (release) {
getURL ("http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash", "_blank");
}
Symbol 129 Button
on (release) {
getURL ("http://www.microsoft.com/windows/downloads/ie/getitnow.mspx", "_blank");
}
Symbol 130 Button
on (release) {
getURL ("http://www.intel.com/", "_blank");
}
Symbol 131 Button
on (release) {
getURL ("http://en.wikipedia.org/wiki/Frame_rate", "_blank");
}
Symbol 136 Button
on (release) {
play();
}
Symbol 139 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 146 MovieClip Frame 115
_root.play();
Symbol 148 Button
on (release) {
getURL ("http://fungus408.cogia.net/", "_blank");
}
Symbol 246 MovieClip Frame 1
_root.stop();
Symbol 246 MovieClip Frame 225
_root.play();
Symbol 297 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 10
moveState = "";
gotoAndStop (1);
Symbol 302 MovieClip Frame 20
gotoAndStop (1);
Instance of Symbol 303 MovieClip in Symbol 304 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_parent._parent.kgrenade && (_parent._parent.grenadeCount > 0)) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Symbol 340 MovieClip Frame 1
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 30;
_parent._parent.power = 5;
_parent._parent.recoil = 5;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 8;
_parent._parent.gunName = "SPAS-12";
Symbol 340 MovieClip Frame 2
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 7;
_parent._parent.power = 3;
_parent._parent.recoil = 3;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 7;
_parent._parent.gunName = "Super 90";
Symbol 340 MovieClip Frame 3
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 10;
_parent._parent.power = 20;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 10;
_parent._parent.maxClip = 12;
_parent._parent.clipSize = 12;
_parent._parent.gunName = "MK23";
Symbol 340 MovieClip Frame 4
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 7;
_parent._parent.power = 17;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 10;
_parent._parent.maxClip = 15;
_parent._parent.clipSize = 15;
_parent._parent.gunName = "P226";
Symbol 340 MovieClip Frame 5
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 13;
_parent._parent.power = 25;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 10;
_parent._parent.maxClip = 7;
_parent._parent.clipSize = 7;
_parent._parent.gunName = "M1911";
Symbol 340 MovieClip Frame 6
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 22;
_parent._parent.power = 36;
_parent._parent.recoil = 5;
_parent._parent.maxXVel = 10;
_parent._parent.maxClip = 5;
_parent._parent.clipSize = 5;
_parent._parent.gunName = "Raging Bull";
Symbol 340 MovieClip Frame 7
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 17;
_parent._parent.power = 30;
_parent._parent.recoil = 3;
_parent._parent.maxXVel = 10;
_parent._parent.maxClip = 7;
_parent._parent.clipSize = 7;
_parent._parent.gunName = "Desert Eagle";
Symbol 340 MovieClip Frame 8
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 2;
_parent._parent.power = 10;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 10;
_parent._parent.clipSize = 19;
_parent._parent.gunName = "Glock 18";
Symbol 340 MovieClip Frame 9
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 3;
_parent._parent.power = 14;
_parent._parent.recoil = 0.5;
_parent._parent.maxXVel = 8;
_parent._parent.clipSize = 30;
_parent._parent.gunName = "TMP";
Symbol 340 MovieClip Frame 10
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 4;
_parent._parent.power = 16;
_parent._parent.recoil = 0.75;
_parent._parent.maxXVel = 8;
_parent._parent.clipSize = 32;
_parent._parent.gunName = "MAC-11";
Symbol 340 MovieClip Frame 11
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 3;
_parent._parent.power = 22;
_parent._parent.recoil = 0.25;
_parent._parent.maxXVel = 7;
_parent._parent.clipSize = 30;
_parent._parent.gunName = "MP5";
Symbol 340 MovieClip Frame 12
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 4;
_parent._parent.power = 25;
_parent._parent.recoil = 0.25;
_parent._parent.maxXVel = 7;
_parent._parent.clipSize = 40;
_parent._parent.gunName = "MP7";
Symbol 340 MovieClip Frame 13
_parent._parent.longWeapon = false;
_parent._parent.shootSpeed = 3;
_parent._parent.power = 27;
_parent._parent.recoil = 0.25;
_parent._parent.maxXVel = 5;
_parent._parent.clipSize = 50;
_parent._parent.gunName = "P90";
Symbol 340 MovieClip Frame 14
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 5;
_parent._parent.power = 38;
_parent._parent.recoil = 2;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 30;
_parent._parent.gunName = "AK-74";
Symbol 340 MovieClip Frame 15
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 4;
_parent._parent.power = 36;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 7;
_parent._parent.clipSize = 30;
_parent._parent.gunName = "LR-300";
Symbol 340 MovieClip Frame 16
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 40;
_parent._parent.power = 55;
_parent._parent.recoil = 5;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 5;
_parent._parent.gunName = "M24";
Symbol 340 MovieClip Frame 17
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 10;
_parent._parent.power = 45;
_parent._parent.recoil = 3;
_parent._parent.maxXVel = 5;
_parent._parent.clipSize = 20;
_parent._parent.gunName = "PSG-1";
Symbol 340 MovieClip Frame 18
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 30;
_parent._parent.power = 100;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 5;
_parent._parent.gunName = "RPG-7";
Symbol 340 MovieClip Frame 19
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 2;
_parent._parent.power = 30;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 5;
_parent._parent.clipSize = 100;
_parent._parent.gunName = "M61 Vulcan";
Symbol 340 MovieClip Frame 20
_parent._parent.longWeapon = true;
_parent._parent.shootSpeed = 13;
_parent._parent.power = 40;
_parent._parent.recoil = 1;
_parent._parent.maxXVel = 6;
_parent._parent.clipSize = 20;
_parent._parent.gunName = "M14";
Symbol 340 MovieClip Frame 21
_parent._parent.maxXVel = 10;
Symbol 345 MovieClip Frame 1
gunPosition = "up";
Symbol 345 MovieClip Frame 2
gunPosition = "forward";
Symbol 345 MovieClip Frame 5
stop();
Symbol 345 MovieClip Frame 6
gunPosition = "forward";
Symbol 345 MovieClip Frame 10
stop();
Symbol 345 MovieClip Frame 11
gunPosition = "forward";
Symbol 345 MovieClip Frame 12
_parent.faceFlash._visible = true;
_parent.faceFlash._alpha = (Math.random() * 50) + 50;
Instance of Symbol 344 MovieClip "muzzleFlash1" in Symbol 345 MovieClip Frame 12
onClipEvent (load) {
rndf = Math.floor(Math.random() * 3) + 2;
gotoAndStop(rndf);
}
Symbol 345 MovieClip Frame 14
_parent.faceFlash._visible = false;
Symbol 345 MovieClip Frame 20
stop();
Symbol 345 MovieClip Frame 21
gunPosition = "up";
Symbol 345 MovieClip Frame 25
stop();
Symbol 345 MovieClip Frame 26
gunPosition = "down";
Symbol 345 MovieClip Frame 30
stop();
Symbol 345 MovieClip Frame 31
gunPosition = "up";
Symbol 345 MovieClip Frame 35
stop();
Symbol 345 MovieClip Frame 36
gunPosition = "down";
Symbol 345 MovieClip Frame 40
stop();
Symbol 345 MovieClip Frame 41
gunPosition = "forward";
Symbol 345 MovieClip Frame 42
_parent.faceFlash._visible = true;
_parent.faceFlash._alpha = (Math.random() * 50) + 50;
Instance of Symbol 344 MovieClip "muzzleFlash1" in Symbol 345 MovieClip Frame 42
onClipEvent (load) {
rndf = Math.floor(Math.random() * 3) + 2;
gotoAndStop(rndf);
_y = -5;
if (_parent.guns._currentframe == 11) {
_x = 50;
} else if (_parent.guns._currentframe == 15) {
_x = 71;
} else if (_parent.guns._currentframe == 18) {
_x = 50;
} else if (_parent.guns._currentframe == 19) {
_x = 105;
_y = -10;
} else if (_parent.guns._currentframe == 17) {
_x = 110;
} else if (_parent.guns._currentframe == 16) {
_x = 100;
} else {
_x = 87;
}
}
Symbol 345 MovieClip Frame 44
_parent.faceFlash._visible = false;
Symbol 345 MovieClip Frame 50
stop();
Symbol 350 MovieClip Frame 1
if (gun.gunPosition == "down") {
gun.gotoAndPlay("downup");
} else if (gun.gunPosition == "forward") {
gun.gotoAndPlay("unaimup");
}
Instance of Symbol 304 MovieClip in Symbol 350 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 319 MovieClip "faceFlash" in Symbol 350 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_visible) {
visCount++;
} else {
visCount = 0;
}
if (visCount > 2) {
_visible = false;
}
}
Instance of Symbol 347 MovieClip in Symbol 350 MovieClip Frame 1
onClipEvent (enterFrame) {
_yscale = ((100 * _parent.grenadePrime) / 50);
}
Instance of Symbol 349 MovieClip in Symbol 350 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.xDirection == -1) {
_xscale = -100;
} else {
_xscale = 100;
}
}
Symbol 350 MovieClip Frame 30
gotoAndPlay ("idle");
Symbol 350 MovieClip Frame 31
if (gun.gunPosition == "down") {
gun.gotoAndPlay("downup");
} else if (gun.gunPosition == "forward") {
gun.gotoAndPlay("unaimup");
}
Symbol 350 MovieClip Frame 34
if (((!kleft) && (!kright)) && (ground)) {
gotoAndPlay ("idle");
animateType = "idle";
}
Symbol 350 MovieClip Frame 44
gotoAndPlay ("run");
Symbol 350 MovieClip Frame 51
if (gun.gunPosition == "up") {
gun.gotoAndPlay("updown");
}
Symbol 350 MovieClip Frame 60
stop();
Symbol 350 MovieClip Frame 61
if (gun.gunPosition == "down") {
gun.gotoAndPlay("downup");
} else if (gun.gunPosition == "forward") {
gun.gotoAndPlay("unaimup");
}
Symbol 350 MovieClip Frame 70
stop();
Symbol 350 MovieClip Frame 71
play();
if (gun.gunPosition == "down") {
gun.gotoAndPlay("downup");
} else if (gun.gunPosition == "forward") {
gun.gotoAndPlay("unaimup");
}
Symbol 350 MovieClip Frame 72
play();
Symbol 350 MovieClip Frame 80
animateType = "";
landing = false;
stop();
Symbol 350 MovieClip Frame 81
if (gun.gunPosition == "up") {
gun.gotoAndPlay("aimdown");
} else if (gun.gunPosition == "down") {
gun.gotoAndPlay("aimup");
}
Symbol 350 MovieClip Frame 86
if (ground && (kleft || (kright))) {
gotoAndPlay ("shootrun");
} else {
gotoAndPlay ("aiming");
}
if (!shooting) {
gotoAndPlay ("unshoot");
}
Symbol 350 MovieClip Frame 87
gun.gotoAndPlay("unaimup");
Symbol 350 MovieClip Frame 91
animateType = "";
gotoAndPlay (1);
Symbol 350 MovieClip Frame 92
if (gun.gunPosition == "down") {
gun.gotoAndPlay("downup");
} else if (gun.gunPosition == "forward") {
gun.gotoAndPlay("unaimup");
}
Symbol 350 MovieClip Frame 101
if (jumpfall) {
jumpfall = false;
landing = true;
}
stop();
Symbol 350 MovieClip Frame 102
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
if (((!kleft) && (!kright)) || (!ground)) {
gotoAndPlay ("aiming");
}
if (!shooting) {
gotoAndPlay ("unshoot");
}
if (gun.gunPosition == "up") {
gun.gotoAndPlay("aimdown");
} else if (gun.gunPosition == "down") {
gun.gotoAndPlay("aimup");
}
Symbol 350 MovieClip Frame 115
gotoAndPlay ("shootrun");
Symbol 350 MovieClip Frame 116
animateType = "";
landing = false;
stop();
if (gun.gunPosition == "up") {
gun.gotoAndPlay("aimdown");
} else if (gun.gunPosition == "down") {
gun.gotoAndPlay("aimup");
}
Symbol 350 MovieClip Frame 121
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
gotoAndPlay ("aiming2");
if (!shooting) {
gotoAndPlay ("unshoot2");
}
Symbol 350 MovieClip Frame 122
gun.gotoAndPlay("unaimup");
Symbol 350 MovieClip Frame 126
animateType = "";
gotoAndPlay (1);
Symbol 363 MovieClip Frame 10
stop();
Symbol 364 MovieClip Frame 10
stop();
Symbol 367 Button
on (release) {
_root.mainButtons.menuSelection = bLabel;
}
on (rollOver) {
_root.mainButtons.menuRollOver = bLabel;
}
on (rollOut) {
_root.mainButtons.menuRollOver = "";
}
Symbol 381 Button
on (press) {
dragging = true;
}
on (release, releaseOutside) {
dragging = false;
}
Instance of Symbol 380 MovieClip "slideBar" in Symbol 382 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.dragging) {
_x = _parent._xmouse;
if (_x > 255) {
_x = 255;
}
if (_x < 1) {
_x = 1;
}
}
_parent.sliderValue = (_x / 255) * 100;
}
Instance of Symbol 380 MovieClip "slideBar" in Symbol 384 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.dragging) {
_x = _parent._xmouse;
if (_x > 255) {
_x = 255;
}
if (_x < 1) {
_x = 1;
}
}
_parent.sliderValue = (_x / 255) * 100;
}
Instance of Symbol 380 MovieClip "slideBar" in Symbol 386 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.dragging) {
_x = _parent._xmouse;
if (_x > 255) {
_x = 255;
}
if (_x < 1) {
_x = 1;
}
}
_parent.sliderValue = (_x / 255) * 100;
}
Instance of Symbol 380 MovieClip "slideBar" in Symbol 388 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.dragging) {
_x = _parent._xmouse;
if (_x > 255) {
_x = 255;
}
if (_x < 1) {
_x = 1;
}
}
_parent.sliderValue = (_x / 255) * 100;
}
Symbol 392 Button
on (release) {
_parent.menuSelection = rLabel;
}
Symbol 393 Button
on (release) {
_parent.menuSelection = lLabel;
}
Instance of Symbol 350 MovieClip "playerModel" in Symbol 394 MovieClip Frame 1
onClipEvent (load) {
gun.guns.gotoAndStop(3);
pName = "Default";
red = 153;
green = 153;
blue = 153;
eyeRed = 0;
eyeGreen = 0;
eyeBlue = 0;
eyeType = 1;
eyes.fill.gotoAndStop(eyeType);
bloodRed = 150;
bloodGreen = 0;
bloodBlue = 0;
kup = (kdown = (kleft = (kright = (kshoot = (kgrenade = (shooting = false))))));
xDirection = 1;
ground = false;
xVel = (yVel = 0);
maxXVel = 10;
maxYVel = 20;
xAccel = 1;
yAccel = 1;
shootCount = 0;
shootSpeed = 10;
score = 0;
grenadeCount = 3;
grenadePrime = 0;
holsterCount = 0;
recoil = 1;
power = 20;
animateType = "";
leftSideUpCode = 87;
leftSideDownCode = 83;
leftSideLeftCode = 65;
leftSideRightCode = 68;
leftSideShootCode = 71;
leftSideGrenadeCode = 72;
rightSideUpCode = 38;
rightSideDownCode = 40;
rightSideLeftCode = 37;
rightSideRightCode = 39;
rightSideShootCode = 100;
rightSideGrenadeCode = 101;
}
onClipEvent (enterFrame) {
leftSideUp = _root.stringCode(leftSideUpCode);
leftSideDown = _root.stringCode(leftSideDownCode);
leftSideLeft = _root.stringCode(leftSideLeftCode);
leftSideRight = _root.stringCode(leftSideRightCode);
leftSideShoot = _root.stringCode(leftSideShootCode);
leftSideGrenade = _root.stringCode(leftSideGrenadeCode);
rightSideUp = _root.stringCode(rightSideUpCode);
rightSideDown = _root.stringCode(rightSideDownCode);
rightSideLeft = _root.stringCode(rightSideLeftCode);
rightSideRight = _root.stringCode(rightSideRightCode);
rightSideShoot = _root.stringCode(rightSideShootCode);
rightSideGrenade = _root.stringCode(rightSideGrenadeCode);
}
onClipEvent (enterFrame) {
if (kshoot && (shootCount == shootSpeed)) {
shooting = true;
if (longWeapon) {
gun.gotoAndPlay("fire2");
} else {
gun.gotoAndPlay("fire");
}
if (innerHand.moveState != "throw") {
innerHand.gotoAndPlay(11);
}
outerHand.gotoAndPlay(11);
}
if (shootCount < shootSpeed) {
shootCount++;
} else {
shootCount = 0;
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
if (shooting && (animateType != "shoot")) {
if (longWeapon) {
gotoAndPlay ("shoot2");
} else {
gotoAndPlay ("shoot");
}
animateType = "shoot";
} else {
if (shooting && (animateType == "shoot")) {
return(undefined);
}
if (landing && (animateType != "land")) {
gotoAndPlay ("land");
animateType = "land";
} else if (((jumping && (animateType != "jump")) && (animateType != "fall")) && (animateType != "jumpfall")) {
gotoAndPlay ("jump");
animateType = "jump";
} else if (jumpfall && (animateType != "jumpfall")) {
gotoAndPlay ("jumpfall");
animateType = "jumpfall";
} else {
if (animateType == "land") {
return(undefined);
}
if (animateType == "jumpfall") {
return(undefined);
}
if (falling && (animateType != "fall")) {
gotoAndPlay ("fall");
animateType = "fall";
} else if (((kleft || (kright)) && (animateType != "run")) && (ground)) {
gotoAndPlay ("run");
animateType = "run";
}
}
}
}
onClipEvent (enterFrame) {
if (_root.gamePaused) {
return(undefined);
}
myColor = new Color(outerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(innerHand.entireHand.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(entireBody.body.fill);
myColor.setTint(red, green, blue, 100);
myColor = new Color(eyes.fill);
myColor.setTint(eyeRed, eyeGreen, eyeBlue, 100);
eyes.fill.gotoAndStop(eyeType);
}
Symbol 412 Button
on (rollOver) {
playerView.playerModel.kshoot = true;
}
on (rollOut) {
playerView.playerModel.kshoot = false;
playerView.playerModel.shooting = false;
}
on (release) {
rebind = "leftSideShoot";
}
Symbol 413 Button
on (rollOver) {
playerView.playerModel.kleft = true;
playerView.playerModel.ground = true;
}
on (rollOut) {
playerView.playerModel.kleft = false;
}
on (release) {
rebind = "leftSideLeft";
}
Symbol 414 Button
on (rollOver) {
playerView.playerModel.kright = true;
playerView.playerModel.ground = true;
}
on (rollOut) {
playerView.playerModel.kright = false;
}
on (release) {
rebind = "leftSideRight";
}
Symbol 415 Button
on (rollOver) {
playerView.playerModel.falling = true;
}
on (rollOut) {
playerView.playerModel.falling = false;
playerView.playerModel.animateType = "idle";
playerView.playerModel.gotoAndPlay("idle");
}
on (release) {
rebind = "leftSideDown";
}
Symbol 416 Button
on (rollOver) {
playerView.playerModel.jumping = true;
}
on (rollOut) {
playerView.playerModel.jumping = false;
playerView.playerModel.animateType = "idle";
playerView.playerModel.gotoAndPlay("idle");
}
on (release) {
rebind = "leftSideUp";
}
Symbol 417 Button
on (rollOver) {
playerView.playerModel.innerHand.moveState = "throw";
playerView.playerModel.innerHand.gotoAndPlay(2);
}
on (release) {
rebind = "leftSideGrenade";
}
Symbol 418 Button
on (rollOver) {
playerView.playerModel.kshoot = true;
}
on (rollOut) {
playerView.playerModel.kshoot = false;
playerView.playerModel.shooting = false;
}
on (release) {
rebind = "rightSideShoot";
}
Symbol 419 Button
on (rollOver) {
playerView.playerModel.kleft = true;
playerView.playerModel.ground = true;
}
on (rollOut) {
playerView.playerModel.kleft = false;
}
on (release) {
rebind = "rightSideLeft";
}
Symbol 420 Button
on (rollOver) {
playerView.playerModel.kright = true;
playerView.playerModel.ground = true;
}
on (rollOut) {
playerView.playerModel.kright = false;
}
on (release) {
rebind = "rightSideRight";
}
Symbol 421 Button
on (rollOver) {
playerView.playerModel.falling = true;
}
on (rollOut) {
playerView.playerModel.falling = false;
playerView.playerModel.animateType = "idle";
playerView.playerModel.gotoAndPlay("idle");
}
on (release) {
rebind = "rightSideDown";
}
Symbol 422 Button
on (rollOver) {
playerView.playerModel.jumping = true;
}
on (rollOut) {
playerView.playerModel.jumping = false;
playerView.playerModel.animateType = "idle";
playerView.playerModel.gotoAndPlay("idle");
}
on (release) {
rebind = "rightSideUp";
}
Symbol 423 Button
on (rollOver) {
playerView.playerModel.innerHand.moveState = "throw";
playerView.playerModel.innerHand.gotoAndPlay(2);
}
on (release) {
rebind = "rightSideGrenade";
}
Symbol 443 Button
on (release) {
_root.pShell = !_root.pShell;
}
Symbol 444 Button
on (release) {
_root.pBlood = !_root.pBlood;
}
Symbol 445 Button
on (release) {
_root.pSpark = !_root.pSpark;
}
Symbol 446 Button
on (release) {
_root.pBoom = 2;
}
Symbol 449 Button
on (release) {
_root.pBoom = 1;
}
Symbol 450 Button
on (release) {
_root.pBoom = 3;
}
Symbol 451 Button
on (press, release) {
_root.pBoom = 2;
}
Symbol 452 Button
on (press, release) {
_root.pBoom = 1;
}
Symbol 453 Button
on (release) {
_root._quality = "LOW";
}
Symbol 454 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 455 Button
on (release) {
_root._quality = "HIGH";
}
Instance of Symbol 380 MovieClip "slideBar" in Symbol 457 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.dragging) {
_x = _parent._xmouse;
if (_x > 255) {
_x = 255;
}
if (_x < 1) {
_x = 1;
}
}
_parent.sliderValue = (_x / 255) * 100;
}
Symbol 470 MovieClip Frame 1
stop();
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MAIN MENU";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MAIN MENU";
}
Instance of Symbol 375 MovieClip "bloodModel" in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
red = _parent.playerView.playerModel.bloodRed;
green = _parent.playerView.playerModel.bloodGreen;
blue = _parent.playerView.playerModel.bloodBlue;
myColor = new Color(this);
myColor.setTint(red, green, blue, 100);
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MAIN MENU";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "NEW PROFILE";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "EDIT PROFILE";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "CANCEL";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SAVE";
}
Instance of Symbol 382 MovieClip "eyeRedBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.eyeRed) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.eyeRed = (255 * sliderValue) / 100;
}
}
Instance of Symbol 384 MovieClip "eyeGreenBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.eyeGreen) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.eyeGreen = (255 * sliderValue) / 100;
}
}
Instance of Symbol 386 MovieClip "eyeBlueBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.eyeBlue) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.eyeBlue = (255 * sliderValue) / 100;
}
}
Instance of Symbol 388 MovieClip "eyeTypeBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = _parent.playerView.playerModel.eyeType * 10;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.eyeType = Math.floor(sliderValue / 10) + 1;
}
}
Instance of Symbol 382 MovieClip "bodyRedBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.red) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.red = (255 * sliderValue) / 100;
}
}
Instance of Symbol 384 MovieClip "bodyGreenBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.green) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.green = (255 * sliderValue) / 100;
}
}
Instance of Symbol 386 MovieClip "bodyBlueBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.blue) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.blue = (255 * sliderValue) / 100;
}
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Random Eyes";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Random Body";
}
Instance of Symbol 382 MovieClip "bloodRedBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.bloodRed) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.bloodRed = (255 * sliderValue) / 100;
}
}
Instance of Symbol 384 MovieClip "bloodGreenBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.bloodGreen) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.bloodGreen = (255 * sliderValue) / 100;
}
}
Instance of Symbol 386 MovieClip "bloodBlueBar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = (100 * _parent.playerView.playerModel.bloodBlue) / 255;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_parent.playerView.playerModel.bloodBlue = (255 * sliderValue) / 100;
}
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Random Blood";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Random All";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Default Eyes";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Default Body";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Default Blood";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Default All";
}
Instance of Symbol 394 MovieClip "playerView" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
rLabel = "RIGHT";
lLabel = "LEFT";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "<< EDIT KEY CONFIG";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "EDIT APPEARANCE >>";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "CANCEL";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SAVE";
}
Instance of Symbol 426 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
_parent.rebind = "";
}
onClipEvent (enterFrame) {
if (_parent.rebind == "") {
_visible = false;
} else {
_visible = true;
}
}
onClipEvent (keyDown) {
if (_parent.rebind != "") {
keyCode = Key.getCode();
if (_parent.rebind == "leftSideUp") {
_parent.playerView.playerModel.leftSideUpCode = keyCode;
}
if (_parent.rebind == "leftSideDown") {
_parent.playerView.playerModel.leftSideDownCode = keyCode;
}
if (_parent.rebind == "leftSideLeft") {
_parent.playerView.playerModel.leftSideLeftCode = keyCode;
}
if (_parent.rebind == "leftSideRight") {
_parent.playerView.playerModel.leftSideRightCode = keyCode;
}
if (_parent.rebind == "leftSideShoot") {
_parent.playerView.playerModel.leftSideShootCode = keyCode;
}
if (_parent.rebind == "leftSideGrenade") {
_parent.playerView.playerModel.leftSideGrenadeCode = keyCode;
}
if (_parent.rebind == "rightSideUp") {
_parent.playerView.playerModel.rightSideUpCode = keyCode;
}
if (_parent.rebind == "rightSideDown") {
_parent.playerView.playerModel.rightSideDownCode = keyCode;
}
if (_parent.rebind == "rightSideLeft") {
_parent.playerView.playerModel.rightSideLeftCode = keyCode;
}
if (_parent.rebind == "rightSideRight") {
_parent.playerView.playerModel.rightSideRightCode = keyCode;
}
if (_parent.rebind == "rightSideShoot") {
_parent.playerView.playerModel.rightSideShootCode = keyCode;
}
if (_parent.rebind == "rightSideGrenade") {
_parent.playerView.playerModel.rightSideGrenadeCode = keyCode;
}
_parent.rebind = "";
}
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "Default Keys";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "PROFILES";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "LEVEL EDITOR";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "HELP";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "PLAY MORE GAMES";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "NEW GAME";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SETTINGS";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "FUNGUS SHARK";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "CREDITS";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "BACK TO MAIN";
}
Instance of Symbol 103 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pBlood) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 103 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pSpark) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 103 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pShell) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 448 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pBoom == 1) {
_x = 331;
}
if (_root.pBoom == 2) {
_x = 263;
}
if (_root.pBoom == 3) {
_x = 200;
}
}
Instance of Symbol 448 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root._quality == "HIGH") {
_x = 331;
}
if (_root._quality == "MEDIUM") {
_x = 263;
}
if (_root._quality == "LOW") {
_x = 200;
}
}
Instance of Symbol 457 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = _root.SFXVolume;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_root.SFXVolume = sliderValue;
}
}
Instance of Symbol 457 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = _root.musicVolume;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_root.musicVolume = sliderValue;
}
}
Instance of Symbol 457 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
sliderValue = _root.micVolume;
slideBar._x = (255 * sliderValue) / 100;
origValue = sliderValue;
}
onClipEvent (enterFrame) {
if (sliderValue != origValue) {
_root.micVolume = sliderValue;
}
}
Instance of Symbol 463 MovieClip "errorMessage" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "TRAINING MISSIONS";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "GAUNTLET";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SKIRMISH";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "TWO PLAYER";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MAIN MENU";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MICROPHONE MODE";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "WEAPONS SHOP";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SURVIVAL";
}
Instance of Symbol 394 MovieClip "playerView3" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
rLabel = "RIGHT2";
lLabel = "LEFT2";
}
Instance of Symbol 394 MovieClip "playerView2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
rLabel = "RIGHT";
lLabel = "LEFT";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "BASIC TRAINING";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SNIPER TRAINING";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "GRENADE TRAINING";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "AGILITY TRAINING";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "MICROPHONE TRAINING";
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "GAME MENU";
}
Instance of Symbol 468 MovieClip "modeLocked" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 468 MovieClip "modeLocked2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 368 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
bLabel = "HIGH SCORES";
}
Instance of Symbol 469 MovieClip in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
_alpha = 100;
c = 0;
while (c < 1000) {
_root.createEmptyMovieClip(blank, 1000 + c);
c++;
}
c = 0;
while (c < 100) {
_root.createEmptyMovieClip(blank, 2000 + c);
c++;
}
_root.particleDepth = 1;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 6);
}
}
Instance of Symbol 474 MovieClip "flame" in Symbol 477 MovieClip Frame 1
onClipEvent (enterFrame) {
_yscale = ((Math.random() * 25) + 75);
_xscale = ((Math.random() * 25) + 75);
}
Symbol 497 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("mainMenu");
}
Symbol 507 MovieClip Frame 1
animationState = "";
stop();
Symbol 507 MovieClip Frame 121
animationState = "DONE";
stop();
Instance of Symbol 507 MovieClip "goSign" in Symbol 514 MovieClip Frame 1
onClipEvent (enterFrame) {
if (animationState == "DONE") {
_root.HUD.startTimer = true;
animationState = "DONE2";
}
}
Symbol 517 MovieClip Frame 1
stop();
Symbol 523 Button
on (release) {
menuSelection = bLabel;
}
Symbol 524 Button
on (release) {
_parent.menuSelection = bLabel;
}
Instance of Symbol 525 MovieClip "submitButton" in Symbol 526 MovieClip Frame 1
onClipEvent (load) {
bLabel = "";
_visible = false;
}
Instance of Symbol 507 MovieClip "goSign" in Symbol 531 MovieClip Frame 1
onClipEvent (enterFrame) {
if (animationState == "DONE") {
_root.HUD.startTimer = true;
animationState = "";
}
}
Symbol 551 MovieClip Frame 7
gotoAndPlay (1);
Instance of Symbol 553 MovieClip "lightning0b" in Symbol 556 MovieClip Frame 1
onClipEvent (enterFrame) {
rnd = Math.floor(Math.random() * 2);
if (rnd == 1) {
_xscale = -100;
} else if (rnd == 0) {
_xscale = 100;
}
_alpha = (Math.round(Math.random() * 25) + 75);
_rotation = Math.round(Math.random() * 360);
}
Instance of Symbol 555 MovieClip in Symbol 556 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (Math.random() * 100);
_yscale = (Math.random() * 100);
_xscale = (Math.random() * 100);
}
Instance of Symbol 555 MovieClip in Symbol 556 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (Math.random() * 100);
_yscale = (Math.random() * 100);
_xscale = (Math.random() * 100);
}
Instance of Symbol 555 MovieClip in Symbol 556 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (Math.random() * 100);
_yscale = (Math.random() * 100);
_xscale = (Math.random() * 100);
}
Instance of Symbol 76 MovieClip in Symbol 556 MovieClip Frame 1
onClipEvent (load) {
collected = false;
}
onClipEvent (enterFrame) {
if (((!collected) && (this.hitTest(_root.player1._x, _root.player1._y, false))) && (_root.HUD.currentTime > 0)) {
collected = true;
_root.player1.levelComplete = true;
_root.HUD.currentTime = 0;
_root.player1.xVel = 0;
}
if (collected) {
xD = _root.player1._x - _parent._x;
yD = _root.player1._y - (_parent._y - 50);
_root.player1._x = _root.player1._x - (xD / 10);
_root.player1._y = _root.player1._y - (yD / 10);
_root.player1.yVel = (_root.player1.xVel = 0);
if (_root.player1._alpha > 0) {
_root.player1._alpha--;
}
}
}
Symbol 564 Button
on (release) {
_root.HUD.goPlayed = false;
_root.createEmptyMovieClip("blank", getDepth());
}
Instance of Symbol 94 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 3) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 4) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 5) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 6) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 94 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player1.sidearm == 7) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 97 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.p226) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.m1911) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.ragingbull) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 97 MovieClip in Symbol 565 MovieClip Frame 1
onClipEvent (enterFrame) {
var saveFile = SharedObject.getLocal(_root.player1.pName);
if (saveFile.data.eyeType != undefined) {
if (saveFile.data.deserteagle) {
_visible = false;
} else {
_visible = true;
}
} else {
_visible = true;
}
}
Instance of Symbol 568 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (load) {
_root.tabSelection = 1;
}
onClipEvent (enterFrame) {
if (_root.tabSelection == 1) {
_alpha = 100;
} else {
_alpha = 50;
}
}
Instance of Symbol 568 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.tabSelection == 2) {
_alpha = 100;
} else {
_alpha = 50;
}
}
Instance of Symbol 568 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.tabSelection == 3) {
_alpha = 100;
} else {
_alpha = 50;
}
}
Instance of Symbol 568 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.tabSelection == 4) {
_alpha = 100;
} else {
_alpha = 50;
}
}
Instance of Symbol 568 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.tabSelection == 5) {
_alpha = 100;
} else {
_alpha = 50;
}
}
Symbol 575 Button
on (release) {
_root.tabSelection = 1;
}
Symbol 576 Button
on (release) {
_root.tabSelection = 2;
}
Symbol 577 Button
on (release) {
_root.tabSelection = 3;
}
Symbol 578 Button
on (release) {
_root.tabSelection = 4;
}
Symbol 579 Button
on (release) {
_root.tabSelection = 5;
}
Symbol 676 Button
on (release) {
_root.haveWeapon._alpha = 100;
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.haveWeapon2._alpha = 100;
_root.gunDisplay.gotoAndStop(1);
}
Symbol 677 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.p226 == true) && (saveFile.data.p226 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 5) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 5;
saveFile.data.p226 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(2);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.p226 == true) && (saveFile.data.p226 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 678 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.m1911 == true) && (saveFile.data.m1911 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 6) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 6;
saveFile.data.m1911 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(3);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.m1911 == true) && (saveFile.data.m1911 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 679 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.ragingbull == true) && (saveFile.data.ragingbull != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 7) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 7;
saveFile.data.ragingbull = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(4);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.ragingbull == true) && (saveFile.data.ragingbull != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 680 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.deserteagle == true) && (saveFile.data.deserteagle != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 8) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 8;
saveFile.data.deserteagle = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(5);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.deserteagle == true) && (saveFile.data.deserteagle != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 682 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.super90 == true) && (saveFile.data.super90 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 30) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 30;
saveFile.data.super90 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(7);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.super90 == true) && (saveFile.data.super90 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 683 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.spas12 == true) && (saveFile.data.spas12 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 17) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 17;
saveFile.data.spas12 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(6);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.spas12 == true) && (saveFile.data.spas12 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 685 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.tmp == true) && (saveFile.data.tmp != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 12) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 12;
saveFile.data.tmp = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(9);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.tmp == true) && (saveFile.data.tmp != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 686 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.mac11 == true) && (saveFile.data.mac11 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 13) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 13;
saveFile.data.mac11 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(10);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.mac11 == true) && (saveFile.data.mac11 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 687 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.mp5 == true) && (saveFile.data.mp5 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 15) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 15;
saveFile.data.mp5 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(11);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.mp5 == true) && (saveFile.data.mp5 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 688 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.mp7 == true) && (saveFile.data.mp7 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 20) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 20;
saveFile.data.mp7 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(12);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.mp7 == true) && (saveFile.data.mp7 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 689 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.p90 == true) && (saveFile.data.p90 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 25) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 25;
saveFile.data.p90 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(13);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.p90 == true) && (saveFile.data.p90 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 690 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.glock18 == true) && (saveFile.data.glock18 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 10) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 10;
saveFile.data.glock18 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(8);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.glock18 == true) && (saveFile.data.glock18 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 692 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.ak74 == true) && (saveFile.data.ak74 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 30) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 30;
saveFile.data.ak74 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(15);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.ak74 == true) && (saveFile.data.ak74 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 693 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.lr300 == true) && (saveFile.data.lr300 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 32) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 32;
saveFile.data.lr300 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(16);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.lr300 == true) && (saveFile.data.lr300 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 694 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.m24 == true) && (saveFile.data.m24 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 47) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 47;
saveFile.data.m24 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(17);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.m24 == true) && (saveFile.data.m24 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 695 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.psg1 == true) && (saveFile.data.psg1 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 50) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 50;
saveFile.data.psg1 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(18);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.psg1 == true) && (saveFile.data.psg1 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 696 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.m14 == true) && (saveFile.data.m14 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 27) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 27;
saveFile.data.m14 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(14);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.m14 == true) && (saveFile.data.m14 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 698 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.m61 == true) && (saveFile.data.m61 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 57) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 57;
saveFile.data.m61 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(20);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.m61 == true) && (saveFile.data.m61 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 699 Button
on (release) {
var saveFile = SharedObject.getLocal(_root.leftName);
if (saveFile.data.eyeType != undefined) {
if ((saveFile.data.rpg7 == true) && (saveFile.data.rpg7 != undefined)) {
_root.haveWeapon._alpha = 100;
} else if (saveFile.data.totalCoins < 55) {
_root.noMoney._alpha = 100;
} else {
saveFile.data.totalCoins = saveFile.data.totalCoins - 55;
saveFile.data.rpg7 = true;
_root.weaponPurchased._alpha = 100;
}
} else {
_root.noProfile._alpha = 100;
}
saveFile.flush();
}
on (rollOver) {
_root.weaponPurchased._alpha = 0;
_root.haveWeapon._alpha = 0;
_root.haveWeapon2._alpha = 0;
_root.noProfile._alpha = 0;
_root.noMoney._alpha = 0;
}
on (rollOver) {
_root.gunDisplay.gotoAndStop(19);
var saveFile = SharedObject.getLocal(_root.leftName);
if ((saveFile.data.rpg7 == true) && (saveFile.data.rpg7 != undefined)) {
_root.haveWeapon2._alpha = 100;
}
saveFile.flush();
}
Symbol 712 Button
on (release) {
_parent.menuSelection = bLabel;
}
Instance of Symbol 713 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
bLabel = "SAVE";
}
Instance of Symbol 714 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
bLabel = "CANCEL";
}
Instance of Symbol 463 MovieClip "errorMessage" in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 717 MovieClip "errorMessage2" in Symbol 721 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
beep = new Sound(this);
beep.attachSound("badSound");
}
onClipEvent (enterFrame) {
if (_alpha == 100) {
beep.start(0, 1);
}
if (_alpha > 0) {
_alpha = (_alpha-1);
}
}
Instance of Symbol 720 MovieClip in Symbol 721 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.mapBuilder.noGo = true;
} else {
_root.mapBuilder.noGo = false;
}
}