Instance of Symbol 166 MovieClip "mcLoader" in Frame 1
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
i = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
txtPercentLoaded = i;
trace((((i + " getBytesLoaded:") + _root.getBytesLoaded()) + " getBytesTotal:") + _root.getBytesTotal());
if (i >= 100) {
this.gotoAndStop(2);
}
}
Frame 118
function setDefaultKeys() {
keyQualityToggle = 79;
keyMusicOnOff = 77;
keyPauseGame = 80;
trace("setting default keys");
key_pLMoveRight = 68;
key_pLMoveLeft = 65;
key_pLMoveUp = 87;
key_pLNextWeapon = 69;
key_pLPrevWeapon = 81;
}
function displayKeyAssignments() {
arrKeyCodeValue = new Array();
arrKeyCodeValue[8] = "Backspace";
arrKeyCodeValue[9] = "Tab";
arrKeyCodeValue[12] = "Clear";
arrKeyCodeValue[13] = "Enter";
arrKeyCodeValue[16] = "Shift";
arrKeyCodeValue[17] = "Control";
arrKeyCodeValue[18] = "Alt";
arrKeyCodeValue[20] = "Caps Lock";
arrKeyCodeValue[27] = "Esc";
arrKeyCodeValue[32] = "Spacebar";
arrKeyCodeValue[33] = "Page Up";
arrKeyCodeValue[34] = "Page Down";
arrKeyCodeValue[35] = "End";
arrKeyCodeValue[36] = "Home";
arrKeyCodeValue[37] = "Left Arrow";
arrKeyCodeValue[38] = "Up Arrow";
arrKeyCodeValue[39] = "Right Arrow";
arrKeyCodeValue[40] = "Down Arrow";
arrKeyCodeValue[45] = "Insert";
arrKeyCodeValue[46] = "Delete";
arrKeyCodeValue[47] = "Help";
arrKeyCodeValue[48] = "0";
arrKeyCodeValue[49] = "1";
arrKeyCodeValue[50] = "2";
arrKeyCodeValue[51] = "3";
arrKeyCodeValue[52] = "4";
arrKeyCodeValue[53] = "5";
arrKeyCodeValue[54] = "6";
arrKeyCodeValue[55] = "7";
arrKeyCodeValue[56] = "8";
arrKeyCodeValue[57] = "9";
arrKeyCodeValue[65] = "A";
arrKeyCodeValue[66] = "B";
arrKeyCodeValue[67] = "C";
arrKeyCodeValue[68] = "D";
arrKeyCodeValue[69] = "E";
arrKeyCodeValue[70] = "F";
arrKeyCodeValue[71] = "G";
arrKeyCodeValue[72] = "H";
arrKeyCodeValue[73] = "I";
arrKeyCodeValue[74] = "J";
arrKeyCodeValue[75] = "K";
arrKeyCodeValue[76] = "L";
arrKeyCodeValue[77] = "M";
arrKeyCodeValue[78] = "N";
arrKeyCodeValue[79] = "O";
arrKeyCodeValue[80] = "P";
arrKeyCodeValue[81] = "Q";
arrKeyCodeValue[82] = "R";
arrKeyCodeValue[83] = "S";
arrKeyCodeValue[84] = "T";
arrKeyCodeValue[85] = "U";
arrKeyCodeValue[86] = "V";
arrKeyCodeValue[87] = "W";
arrKeyCodeValue[88] = "X";
arrKeyCodeValue[89] = "Y";
arrKeyCodeValue[90] = "Z";
arrKeyCodeValue[96] = "Numpad 0";
arrKeyCodeValue[97] = "Numpad 1";
arrKeyCodeValue[98] = "Numpad 2";
arrKeyCodeValue[99] = "Numpad 3";
arrKeyCodeValue[100] = "Numpad 4";
arrKeyCodeValue[101] = "Numpad 5";
arrKeyCodeValue[102] = "Numpad 6";
arrKeyCodeValue[103] = "Numpad 7";
arrKeyCodeValue[104] = "Numpad 8";
arrKeyCodeValue[105] = "Numbpad 9";
arrKeyCodeValue[106] = "Numpad Multiply";
arrKeyCodeValue[107] = "Numpad Add";
arrKeyCodeValue[108] = "Numpad Enter";
arrKeyCodeValue[109] = "Numpad Subtract";
arrKeyCodeValue[110] = "Numpad Decimal";
arrKeyCodeValue[111] = "Numpad Divide";
arrKeyCodeValue[112] = "F1";
arrKeyCodeValue[113] = "F2";
arrKeyCodeValue[114] = "F3";
arrKeyCodeValue[115] = "F4";
arrKeyCodeValue[116] = "F5";
arrKeyCodeValue[117] = "F6";
arrKeyCodeValue[118] = "F7";
arrKeyCodeValue[119] = "F8";
arrKeyCodeValue[120] = "F9";
arrKeyCodeValue[121] = "F10";
arrKeyCodeValue[122] = "F11";
arrKeyCodeValue[123] = "F12";
arrKeyCodeValue[124] = "F13";
arrKeyCodeValue[125] = "F14";
arrKeyCodeValue[126] = "F15";
arrKeyCodeValue[144] = "Num Lock";
arrKeyCodeValue[186] = ";";
arrKeyCodeValue[187] = "=";
arrKeyCodeValue[189] = "-";
arrKeyCodeValue[191] = "/";
arrKeyCodeValue[192] = "`";
arrKeyCodeValue[219] = "[";
arrKeyCodeValue[220] = "\\";
arrKeyCodeValue[221] = "]";
arrKeyCodeValue[222] = "'";
menuWindowMC.keyRotateLeftMC.txtKey = arrKeyCodeValue[keyRotateLeft];
menuWindowMC.keyRotateRightMC.txtKey = arrKeyCodeValue[keyRotateRight];
menuWindowMC.keyThrustOnMC.txtKey = arrKeyCodeValue[keyThrustOn];
menuWindowMC.keyQualityToggleMC.txtKey = arrKeyCodeValue[keyQualityToggle];
menuWindowMC.keyMusicOnOffMC.txtKey = arrKeyCodeValue[keyMusicOnOff];
trace("displaying key " + arrKeyCodeValue[221]);
trace("displaying key " + arrKeyCodeValue[221]);
}
function displayKeyValue(obj) {
obj.status = "none";
obj.txtKey = _root.arrKeyCodeValue[_root[obj._name]];
}
function setKeyValue(obj) {
if (obj.status == "selected") {
obj.status = "none";
_root[obj._name] = Key.getCode();
obj.txtKey = _root.arrKeyCodeValue[_root[obj._name]];
}
obj.gotoAndStop(1);
}
function highlightKey(obj) {
if (obj.hitTest(_root._xmouse, _root._ymouse, 1)) {
obj.status = "selected";
obj.gotoAndStop(2);
} else {
obj.status = "none";
obj.gotoAndStop(1);
}
}
function getAngle2toAngle1direction(angle1, angle2) {
angleDiff = angle1 - angle2;
if ((angle1 * angle2) < 0) {
if (angle1 < 0) {
angle1 = angle1 + 180;
angleDiff = -(angle1 - angle2);
} else {
angle2 = angle2 + 180;
angleDiff = -(angle1 - angle2);
}
}
if (angleDiff > 0) {
return(1);
}
return(-1);
}
function setCutSceneDialogue() {
trace("dialogueArr");
dialogueArr = [];
switch (g_levelNo) {
case 0 :
addNewDialogueLine("Sp", "Wakey, wakey \u2026 Sam!");
addNewDialogueLine("Sam", "Whoa! Where am I?");
addNewDialogueLine("Sp", "You are about to begin your training.");
addNewDialogueLine("Sam", "What kind of training?");
addNewDialogueLine("Sp", "You'll see soon. ");
addNewDialogueLine("Sp", "All right, you are able to move left, right and jump \n(default: A,D,W). Move the mouse to move the crosshair. ");
break;
case 1 :
addNewDialogueLine("Sam", "I can move myself by pressing keys? Controls page? \nWhat are you talking about?");
addNewDialogueLine("Sp", "Uh, never mind that\u2026 seems like some kind or interference. \nMoving on.");
addNewDialogueLine("Sam", "Okay\u2026");
addNewDialogueLine("Sam", "How come I have a gun in my hand? Can I use it?");
addNewDialogueLine("Sp", "Excellent question. That is the next part of your training. \nSimply destroy the objects.");
break;
case 2 :
addNewDialogueLine("Sam", "That was so cool! Can I go back and have more!?");
addNewDialogueLine("Sp", "Of course. However, you need to improve is your aim. \nSo have a go at this\u2026.");
break;
case 3 :
addNewDialogueLine("Sam", "Sweet!");
addNewDialogueLine("Sp", "You seem to like it.");
addNewDialogueLine("Sam", "Oh yeah!");
addNewDialogueLine("Sp", "Try this mission.");
break;
case 4 :
addNewDialogueLine("Sam", "I have a question. Can the exploding debris hit me? \nIt felt like it did.");
addNewDialogueLine("Sp", "Another great question. The answer is yes");
addNewDialogueLine("Sam", "Hmm. I think you could've mentioned that before\u2026");
addNewDialogueLine("Sp", "You look like a smart one. You would've figured that \nout by yourself");
addNewDialogueLine("Sam", "That's true");
addNewDialogueLine("Sp", "All right then. Perfect practice makes perfect! \nHave a go at this.");
addNewDialogueLine("Sp", "Here is a little extra challenge You have less time \nto finish the mission");
break;
case 5 :
addNewDialogueLine("Sp", "Great job! You're doing great so far");
addNewDialogueLine("Sam", "[smiling]");
addNewDialogueLine("Sp", "One more mission and you're done.");
addNewDialogueLine("Sam", "Cool!");
break;
case 6 :
addNewDialogueLine("Sam", "Wait a minute, I thought you said I'm done.");
addNewDialogueLine("Sp", "Sorry, I meant your basic training is done. The real \nchallenge is yet to come");
addNewDialogueLine("Sam", "Oh, boy!");
addNewDialogueLine("Sp", "There's nothing to worry about. Just do what you did before. \nIf you get stuck, practice until you are able to move forward.");
addNewDialogueLine("Sam", "Ok. I give my best shot!");
addNewDialogueLine("Sp", "That's the attitude! Have fun with this mission.");
break;
case 7 :
addNewDialogueLine("Sam", "Great! That was easy! Oh, I'm just wondering\u2026 \nCan I have other wapons?");
addNewDialogueLine("Sp", "Sure. Here's a better pistol. You deserve it. \nOh, just one note.");
addNewDialogueLine("Sp", "This one has limited ammo. If you run out of ammo, \nuse the basic pistol");
addNewDialogueLine("Sp", "(Default keys for next and previous weapon: E,Q) \nHere's your next mission.");
break;
case 8 :
addNewDialogueLine("Sam", "That pistol was much better. Can I have more ammo?");
addNewDialogueLine("Sp", "Sure, since you asked nicely. Have a go at this mission");
break;
case 9 :
addNewDialogueLine("Sp", "Since you are doing well, it's time for a new weapon. 'The Uzi'");
addNewDialogueLine("Sam", "Sweet! Um, how do I use it?");
addNewDialogueLine("Sp", "Just try it and see.");
break;
case 10 :
addNewDialogueLine("Sp", "Another mission well executed!");
addNewDialogueLine("Sam", "Thanks!");
addNewDialogueLine("Sam", "Fart (show fart cloud)");
addNewDialogueLine("Sp", "What was that?");
addNewDialogueLine("Sam", "Nothing\u2026");
addNewDialogueLine("Sp", "You farted, didn't you?");
addNewDialogueLine("Sam", "Yeah, sorry .. Hehe");
addNewDialogueLine("Sp", "All right 'Windy Boy', here is your next challenge: \n'Divine Wind' ");
addNewDialogueLine("Sam", "What do you mean by that?");
addNewDialogueLine("Sp", "You'll see\u2026 hehehe");
break;
case 11 :
addNewDialogueLine("Sp", "Good job! Now, same thing with a bit more difficulty. ");
break;
case 12 :
addNewDialogueLine("Sp", "It seems like you were having fun. ");
addNewDialogueLine("Sam", "Yeah, right!");
addNewDialogueLine("Sp", "How does a 'Machine gun' sound");
addNewDialogueLine("Sam", "That's more I like it!");
addNewDialogueLine("Sp", "There you go. How about more enemy?");
addNewDialogueLine("Sam", "Bring it on!");
addNewDialogueLine("Sp", "Have fun!");
break;
case 13 :
addNewDialogueLine("Sp", "You seen to be getting the hang of it. One more \n'Windy' level and we move onto something else. ");
addNewDialogueLine("Sp", "Oh, in this mission, your only concern is survival. \nDon't even try to go for not getting hit.");
break;
case 14 :
addNewDialogueLine("Sp", "Nice. How do you like tight-rope jumping?");
addNewDialogueLine("Sam", "What are you thinking\u2026?");
addNewDialogueLine("Sp", "You'll seel");
break;
case 15 :
addNewDialogueLine("Sp", "Great! You're getting better and better. ");
addNewDialogueLine("Sam", "Oh Yeah!");
addNewDialogueLine("Sp", "Now it's time for 'Big Brother' to follow you.");
addNewDialogueLine("Sam", "I just love how you put things in perspective");
addNewDialogueLine("Sp", "Thanks,");
break;
case 16 :
addNewDialogueLine("Sp", "Let's combine a few things now, shall we?");
addNewDialogueLine("Sam", "Why do I have a feeling I can't say 'no' ?");
break;
case 17 :
addNewDialogueLine("Sp", "With that kind of dance I\u2019m sure you\u2019re really popular \nwith the ladies! HAHAHA!");
addNewDialogueLine("Sam", "I'll get you for that one day!");
addNewDialogueLine("Sp", "Of course, you will, hahaha! Here's your next mission.");
break;
case 18 :
addNewDialogueLine("Sp", "HAHAHA! You were jumping like a drunken zombie!");
addNewDialogueLine("Sam", "Trying to make me angry? It's not working.");
addNewDialogueLine("Sp", "Good.");
addNewDialogueLine("Sam", "What?");
addNewDialogueLine("Sp", "Learning to keep your cool has been your first lesson.");
addNewDialogueLine("Sam", "I see.");
addNewDialogueLine("Sp", "Try to keep it cool on this level.");
break;
case 19 :
addNewDialogueLine("Sp", "Excellent! You're ready for some new challenges");
addNewDialogueLine("None", "Grrrr.");
addNewDialogueLine("Sam", "What the hell is that !?!");
addNewDialogueLine("None", ".");
break;
}
testArray = dialogueArr;
arrNo = testArray.length;
while ((arrNo--) > 0) {
trace(((((" tempEnemyArr :: " + arrNo) + " :: ") + testArray[arrNo][0]) + " :: ") + testArray[arrNo][1]);
}
}
function addNewDialogueLine(currSpeaker, currText) {
trace("addNewDialogueLine");
moveToNextFrame = true;
dialogueArr.push([currSpeaker, currText, moveToNextFrame]);
}
function continueDialogue() {
trace(((dialogueArr.length + dialogueArr[0][0]) + " ") + dialogueArr[0][1]);
if (dialogueArr.length == 0) {
_root.game_start();
} else {
menuWindowMC.cutScenesMC.speakerHeadMC.gotoAndStop(dialogueArr[0][0]);
menuWindowMC.cutScenesMC.txtDialogue = dialogueArr[0][1];
if (dialogueArr[0][2]) {
menuWindowMC.cutScenesMC.nextFrame();
}
dialogueArr.splice(0, 1);
}
}
function updateTimer(time) {
temp60s = int(time / 60);
temp10s = int((time - (temp60s * 60)) / 10);
temp1s = int((time - (temp60s * 60)) - (temp10s * 10));
displayDigit(time_60s_MC, temp60s);
displayDigit(time_10s_MC, temp10s);
displayDigit(time_1s_MC, temp1s);
}
function displayDigit(numericDigit, value) {
if (value == 0) {
numericDigit.gotoAndStop(10);
} else {
numericDigit.gotoAndStop(value);
}
}
Abs = Math.abs;
GetTimer = getTimer;
function bgndObj(type, distance, doorSide) {
this.type = type;
this.distance = distance;
this.doorSide = doorSide;
}
function removeAttachedMCs() {
removeMovieClip("game_MC.pL_projectileAttachMC");
removeMovieClip("game_MC.enemyAttachMC");
removeMovieClip("game_MC.ricochetAttachMC");
removeMovieClip("game_MC.smokeTrailAttachMC");
removeMovieClip("game_MC.explosionDebryAttachMC");
}
function checkLevelCode(levelCode) {
levelCodeArrNo = levelCodeArr.length;
trace("levelCode: " + levelCode);
invalidCode = true;
while ((levelCodeArrNo--) >= 0) {
if (levelCode == levelCodeArr[levelCodeArrNo]) {
menuWindowMC.levelCodeMC.gotoAndStop(levelCodeArrNo + 1);
pL_levelCode = levelCode;
menuWindowMC.txtLevelCode = "";
noOfUnlockedLevels = levelCodeArrNo;
invalidCode = false;
}
}
if (invalidCode) {
menuWindowMC.txtLevelCode = "Invalid Code";
} else {
noOfButtonRows = 4;
noOfButtonCols = 5;
buttonNo = 0;
buttonWidth = 60;
buttonHeight = 40;
trace("noOfUnlockedLevels: " + noOfUnlockedLevels);
buttonNoRow = 1;
while (buttonNoRow <= noOfButtonRows) {
buttonY = (buttonHeight * 1.2) * ((buttonNoRow - (noOfButtonRows / 2)) - 1);
buttonNoCol = 1;
while (buttonNoCol <= noOfButtonCols) {
menuWindowMC.pL_missionButtonsMC.attachMovie("missionButton", ("missionButton_" + buttonNo) + "_MC", buttonNo + 2);
buttonMC = eval (("menuWindowMC.pL_missionButtonsMC.missionButton_" + buttonNo) + "_MC");
buttonMC.buttonNo = buttonNo;
buttonMCtxt = eval (("menuWindowMC.pL_missionButtonsMC.missionButton_" + buttonNo) + "_MC.txtMissionNo");
buttonMC.txtMissionNo.text = buttonNo;
textButton.txtMissionNo.text = 12;
if (buttonNo <= noOfUnlockedLevels) {
buttonMC.gotoAndPlay("unlocked");
} else {
buttonMC.gotoAndPlay("locked");
}
trace((("buttonX: " + buttonX) + " :: buttonY: ") + buttonY);
buttonX = (buttonWidth * 1.2) * ((buttonNoCol - (noOfButtonCols / 2)) - 0.5);
buttonMC._x = buttonX;
buttonMC._y = buttonY;
buttonNo++;
buttonNoCol++;
}
buttonNoRow++;
}
}
trace("pL_levelCode: " + pL_levelCode);
}
function game_start() {
g_stat = "play";
_quality = game_quality;
if (playGameMusic) {
musicSndNo = 1;
musicSnd = new Sound();
musicSnd.attachSound("music" + musicSndNo);
musicSnd.start(0, 1000);
}
menuWindowMC.gotoAndStop("game_start");
onEnterFrame = onEnterFrame_game;
onMouseDown = onMouseDown_game;
onMouseUp = onMouseUp_game;
V_legs_MC.swapDepths(10);
V_armR_MC.swapDepths(11);
V_armL_MC.swapDepths(12);
menuWindowMC.swapDepths(1000);
gameCoverMC.swapDepths(1010);
Mouse.hide();
statusWindowMC.pL_heathMC.barMC._xscale = (pL_health = 100);
pL_status = "walk";
pL_currWeaponNo = 0;
pL_projectileArr = [];
explosionDebryArr = [];
pL_noOfProjCreated = 0;
game_MC.createEmptyMovieClip("pL_projectileAttachMC", 100);
noOfEnemyCreated = 0;
game_MC.createEmptyMovieClip("enemyAttachMC", 10);
noOfRicochetCreated = 0;
game_MC.createEmptyMovieClip("ricochetAttachMC", 20);
noOfSmokeTrailCreated = 0;
game_MC.createEmptyMovieClip("smokeTrailAttachMC", 40);
noOfExplosionDebryCreated = 0;
game_MC.createEmptyMovieClip("explosionDebryAttachMC", 50);
switch (g_levelNo) {
case 0 :
levelAllowedTime = 5;
g_missionType = "timeTrial";
pL_setWeaponAmmo([0, 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 1 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 2 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 3 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 4 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 5 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 6 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 0, 0, 0, 0, 0, 0, 0, 0]);
break;
case 7 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 10, 0, 0, 0, 0, 0, 0, 0]);
break;
case 8 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 10, 0, 0, 0, 0, 0, 0, 0]);
break;
case 9 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 20, 15, 0, 0, 0, 0, 0, 0]);
break;
case 10 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 20, 15, 0, 0, 0, 0, 0, 0]);
break;
case 11 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 20, 15, 0, 0, 0, 0, 0, 0]);
break;
case 12 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 20, 15, 10, 0, 0, 0, 0, 0]);
break;
case 13 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 40, 30, 20, 0, 0, 0, 0, 0]);
break;
case 14 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 40, 30, 20, 0, 0, 0, 0, 0]);
break;
case 15 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 40, 30, 20, 0, 0, 0, 0, 0]);
break;
case 16 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 50, 40, 30, 0, 0, 0, 0, 0]);
break;
case 17 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 50, 40, 30, 0, 0, 0, 0, 0]);
break;
case 18 :
levelAllowedTime = 300;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 80, 60, 50, 0, 0, 0, 0, 0]);
break;
case 19 :
levelAllowedTime = 30000;
g_missionType = "destroyEnemies";
pL_setWeaponAmmo(["inf", 40, 30, 20, 0, 0, 0, 0, 0]);
break;
case 20 :
break;
}
enemyArr = [];
tempEnemyArr = [];
pL_y = 200;
pL_x = 50;
trace("ADDING ENEMIES " + g_levelNo);
switch (g_levelNo) {
case 0 :
break;
case 1 :
tempEnemyArr.push(new Enemy(0, "stationary", 1, 180, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 100, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 260, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 320, 150, 4));
break;
case 2 :
tempEnemyArr.push(new Enemy(0, "stationary", 1, 220, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 140, 80, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 140, 220, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 300, 80, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 300, 220, 4));
break;
case 3 :
tempEnemyArr.push(new Enemy(0, "stationary", 1, 220, 160, 5));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 140, 120, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 140, 180, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 300, 120, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 300, 180, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 100, 160, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 340, 160, 4));
break;
case 4 :
tempEnemyArr.push(new Enemy(0, "stationary", 1, 180, 160, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 260, 160, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 220, 140, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 140, 140, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 2, 300, 140, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 3, 100, 120, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 3, 180, 120, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 3, 260, 120, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 3, 320, 120, 4));
break;
case 5 :
i = 0;
while (i <= 5) {
tempEnemyArr.push(new Enemy((2 * i) * FPS, "flying", 1, 320, 20, 5, 40 / FPS, "Path1"));
i++;
}
break;
case 6 :
i = 0;
while (i <= 7) {
tempEnemyArr.push(new Enemy((2.4 * i) * FPS, "flying", 1, 320, 20, 5, 45 / FPS, "Path2"));
i++;
}
break;
case 7 :
i = 0;
while (i <= 7) {
tempEnemyArr.push(new Enemy((2.4 * i) * FPS, "flying", 1, 320, 20, 5, 45 / FPS, "Path3"));
i++;
}
break;
case 8 :
i = 0;
while (i <= 7) {
tempEnemyArr.push(new Enemy((2.4 * i) * FPS, "flying", 1, 320, 20, 5, 60 / FPS, "Path5"));
i++;
}
break;
case 9 :
i = 0;
while (i <= 7) {
tempEnemyArr.push(new Enemy((2.4 * i) * FPS, "flying", 1, 320, 20, 5, 60 / FPS, "Path4"));
i++;
}
break;
case 10 :
i = 0;
while (i <= 10) {
tempEnemyArr.push(new Enemy((2.4 * i) * FPS, "flying", 1, sw / 2, 0, 5, 40 / FPS, "pL_follow"));
i++;
}
break;
case 11 :
i = 0;
while (i <= 10) {
tempEnemyArr.push(new Enemy((2 * i) * FPS, "flying", 1, sw / 2, 0, 5, 50 / FPS, "pL_follow"));
i++;
}
break;
case 12 :
i = 0;
while (i <= 6) {
startSecond = i * 3;
tempEnemyArr.push(new Enemy((2 * startSecond) * FPS, "flying", 1, sw / 2, 0, 5, 40 / FPS, "pL_follow"));
tempEnemyArr.push(new Enemy((2 * (startSecond + 1)) * FPS, "flying", 1, sw * 0.75, 0, 5, 40 / FPS, "pL_follow"));
tempEnemyArr.push(new Enemy((2 * (startSecond + 2)) * FPS, "flying", 1, sw * 0.25, 0, 5, 40 / FPS, "pL_follow"));
i++;
}
break;
case 13 :
tempEnemyArr.push(new Enemy(0, "stationary", 1, 180, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 100, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 260, 150, 4));
tempEnemyArr.push(new Enemy(0, "stationary", 1, 320, 150, 4));
i = 0;
while (i <= 6) {
startSecond = i * 3;
tempEnemyArr.push(new Enemy((2 * startSecond) * FPS, "flying", 1, sw / 2, 0, 5, 40 / FPS, "pL_follow"));
tempEnemyArr.push(new Enemy((2 * (startSecond + 1)) * FPS, "flying", 1, sw * 0.75, 0, 5, 40 / FPS, "pL_follow"));
tempEnemyArr.push(new Enemy((2 * (startSecond + 2)) * FPS, "flying", 1, sw * 0.25, 0, 5, 40 / FPS, "pL_follow"));
i++;
}
break;
case 14 :
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferRight, 260, 50, 0, 0, 177, 0, 1.5 * FPS, 3 * FPS, 0, 5));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferLeft, 260, 50, 0, 0, 1, 0, 3 * FPS, 3 * FPS, 0, 5));
break;
case 15 :
tempEnemyArr.push(new Enemy(0, "turret", 1, 220, screenBufferTop, 70, 0, 0, 90, 1, 1 * FPS, 3 * FPS, 1, 5));
break;
case 16 :
tempEnemyArr.push(new Enemy(0, "turret", 1, 220, screenBufferTop, 70, 0, 0, 90, 1, 1 * FPS, 4 * FPS, 1, 8));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferRight, 260, 50, 0, 0, 177, 0, 4 * FPS, 4 * FPS, 0, 8));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferLeft, 260, 50, 0, 0, 1, 0, 7 * FPS, 4 * FPS, 0, 8));
break;
case 17 :
tempEnemyArr.push(new Enemy(0, "turret", 1, 220, screenBufferTop, 70, 0, 0, 90, 1, 1 * FPS, 4 * FPS, 1, 5));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferRight, sh / 2, 50, 0, 0, 177, 1, 4 * FPS, 4 * FPS, 0, 5));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferLeft, sh / 2, 50, 0, 0, 1, 1, 7 * FPS, 4 * FPS, 0, 5));
break;
case 18 :
tempEnemyArr.push(new Enemy(0, "turret", 1, 220, screenBufferTop, 70, 0, 0, 90, 1, 1 * FPS, 4 * FPS, 1, 5));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferRight, sh / 2, 50, 0, 0, 177, 1, 4 * FPS, 4 * FPS, 0, 5));
tempEnemyArr.push(new Enemy(0, "turret", 1, screenBufferLeft, sh / 2, 50, 0, 0, 1, 1, 7 * FPS, 4 * FPS, 0, 5));
i = 0;
while (i <= 6) {
startSecond = i * 3;
tempEnemyArr.push(new Enemy((2 * startSecond) * FPS, "flying", 1, sw / 2, 0, 5, 40 / FPS, "pL_follow"));
tempEnemyArr.push(new Enemy((2 * (startSecond + 2)) * FPS, "flying", 1, sw * 0.25, 0, 5, 40 / FPS, "pL_follow"));
i++;
}
break;
case 19 :
break;
}
testArray = tempEnemyArr;
arrNo = tempEnemyArr.length;
while ((arrNo--) > 0) {
trace(((((" tempEnemyArr :: " + arrNo) + " :: ") + testArray[arrNo].showUpFr) + " :: ") + testArray[arrNo].attackDamage);
}
game_FrNo = 0;
startTime = getTimer();
levelCompleteCounter = 0;
nextEnemyFrNo = tempEnemyArr[0].showUpFr;
moreEnemyToCome = true;
statusWindowMC.missionMessageMC._visible = false;
statusWindowMC.missionMessageMC.gotoAndStop(1);
pL_changeWeapon(1);
pL_changeWeapon(-1);
trace("=============================================================");
trace("levelAllowedTime " + levelAllowedTime);
trace("g_missionType " + g_missionType);
}
function showCutScenes() {
menuWindowMC.gotoAndStop("cutscenes");
menuWindowMC.cutScenesMC.gotoAndStop("mission_" + g_levelNo);
menuWindowMC.cutScenesMC.txtLevelNo = g_levelNo;
menuWindowMC.cutScenesMC.txtLevelCode = pL_levelCode;
setCutSceneDialogue();
menuWindowMC.cutScenesMC.speakerHeadMC.gotoAndStop(dialogueArr[0][0]);
menuWindowMC.cutScenesMC.txtDialogue = dialogueArr[0][1];
trace((_root.g_levelNo + " :: ") + dialogueArr[0][0]);
["menuWindowMC.pL_missionButtonsMC"].removeMovieClip();
missionButtonsMC = menuWindowMC.pL_missionButtonsMC;
missionButtonsMC.removeMovieClip();
dialogueArr.splice(0, 1);
}
function level_init() {
}
function pL_setWeaponAmmo(ammoArr) {
i = 0;
while (i < pL_weaponsArr.length) {
if ((ammoArr[i] == "inf") || (ammoArr[i] > 0)) {
pL_weaponsArr[i].available = true;
pL_weaponsArr[i].ammo = ammoArr[i];
} else {
pL_weaponsArr[i].available = false;
pL_weaponsArr[i].ammo = 0;
}
pL_weaponsArr[i].currReloadFr = 0;
trace("pL_weaponsArr[i].available: " + pL_weaponsArr[i].available);
trace("pL_weaponsArr[i].ammo: " + pL_weaponsArr[i].ammo);
i++;
}
}
function game_over(status) {
trace("game_over status: " + status);
_quality = "HIGH";
musicSnd.stop("music" + musicSndNo);
pL_weaponSoundStop();
removeAttachedMCs();
menuWindowMC._visible = true;
Mouse.show();
switch (status) {
case "missionComplete" :
g_levelNo++;
showCutScenes();
menuWindowMC.cutScenesMC.txtLevelCode = levelCodeArr[g_levelNo];
tenmpLevelCodeNo = 0;
while (tenmpLevelCodeNo < levelCodeArr.length) {
if (levelCodeArr[tenmpLevelCodeNo] == pL_levelCode) {
if (tenmpLevelCodeNo < g_levelNo) {
pL_levelCode = levelCodeArr[g_levelNo];
}
}
tenmpLevelCodeNo++;
}
trace("pL_levelCode: " + pL_levelCode);
break;
case "pL_dead" :
menuWindowMC._visible = true;
menuWindowMC.gotoAndStop("pL_dies");
break;
case "timeIsUp" :
menuWindowMC.gotoAndStop("cutscenes");
break;
}
delete onEnterFrame;
delete onMouseDown;
delete onMouseUp;
pL_weaponSoundStop();
}
function Weapon(available, type, ammo, reloadFr, attackDamage) {
this.available = available;
this.type = type;
this.ammo = ammo;
this.reloadFr = reloadFr;
this.currReloadFr = 0;
this.attackDamage = attackDamage;
}
function ProjectileObj(targetMC, type, ux, uy, attackDamage) {
this.targetMC = targetMC;
this.type = type;
switch (type) {
case "rocketLauncher" :
velocity = 400 / FPS;
break;
case "flameThrower" :
velocity = 150 / FPS;
this.timer = 1 * FPS;
break;
case "grenade" :
velocity = 10 + ((pL_grenadeThrowVelocity * 10) / FPS);
this.timer = 2 * FPS;
break;
}
this.vx = velocity * ux;
this.vy = velocity * uy;
this.attackDamage = attackDamage;
}
function Enemy(showUpFr, type, typeNo, x, y, health, data1, data2, data3, data4, data5, data6, data7, data8) {
trace("ADDING ENEMIES ++ " + g_levelNo);
this.showUpFr = showUpFr;
this.type = type;
this.typeNo = typeNo;
this.x = x;
this.y = y;
this.fullHealth = (this.health = health);
switch (type) {
case "stationary" :
this.shape = "circle";
switch (typeNo) {
case 1 :
this.rad = 7.5;
break;
case 2 :
this.rad = 5;
break;
case 3 :
this.rad = 3.5;
break;
}
break;
case "turret" :
this.gunAngle = data3;
this.gunRotSpeed = data4;
this.nextAttackFr = data5;
this.nextAttackIntervalFr = data6;
this.attackDurationFr = data7;
this.attackDamage = data8;
this.shape = "circle";
this.rad = 7.5;
break;
case "walker" :
this.v = data1;
this.gunAngle = data3;
this.gunRotSpeed = data4;
this.nextAttackFr = data5;
this.nextAttackIntervalFr = data6;
this.attackDurationFr = data7;
this.attackDamage = data8;
this.shape = "circle";
this.rad = 10;
break;
case "flying" :
this.v = data1;
this.gunAngle = data3;
this.gunRotSpeed = data4;
this.nextAttackFr = data5;
this.nextAttackIntervalFr = data6;
this.attackDurationFr = data7;
this.attackDamage = data8;
reachedCheckPointDist = 10;
this.checkPointArrNo = 0;
if (data2 == "pL_follow") {
this.pathName = "pL_follow";
} else {
this.pathName = data2;
tempPathArr = eval (("checkPoint" + this.pathName) + "_arr");
this.nextCheckPointX = tempPathArr[this.checkPointArrNo][0];
this.nextCheckPointY = tempPathArr[this.checkPointArrNo][1];
}
switch (typeNo) {
case 1 :
this.shape = "circle";
this.rad = 7.5;
break;
case 2 :
this.shape = "circle";
this.rad = 5;
break;
case 3 :
this.shape = "rectangle";
this.registration = "bottomCenter";
this.w = 22;
this.h = 15;
break;
}
break;
}
trace((("typeNo: " + this.typeNo) + " :: this.shape: ") + this.shape);
}
function nextCP(tempEnemyObj) {
tempEnemyObj.checkPointArrNo++;
tempPathArr = eval (("checkPoint" + tempEnemyObj.pathName) + "_arr");
if (tempEnemyObj.checkPointArrNo >= tempPathArr.length) {
tempEnemyObj.checkPointArrNo = 0;
}
tempEnemyObj.nextCheckPointX = tempPathArr[tempEnemyObj.checkPointArrNo][0];
tempEnemyObj.nextCheckPointY = tempPathArr[tempEnemyObj.checkPointArrNo][1];
}
function ExplosionDebry(targetMC, debryType, vx, vy, rotSpeed, startSize, finishSize, durationFr, smokeTrail) {
this.targetMC = targetMC;
this.type = "debry";
this.debryType = debryType;
this.vx = vx;
this.vy = vy;
this.rotSpeed = rotSpeed;
this.durationFr = durationFr;
this.smokeTrail = smokeTrail;
}
function createRicochet(type, typeNo, x, y, angle) {
if ((noOfRicochetCreated++) > 500) {
noOfRicochetCreated = 0;
}
game_MC.ricochetAttachMC.attachMovie(type + typeNo, (((type + typeNo) + "_") + noOfRicochetCreated) + "_MC", noOfRicochetCreated);
ricMC = eval ((((("game_MC.ricochetAttachMC." + type) + typeNo) + "_") + noOfRicochetCreated) + "_MC");
ricMC._x = x;
ricMC._y = y;
ricMC._rotation = angle;
ricMC._xscale = int(25 + (75 * Math.random()));
ricMC._yscale = int(50 + (50 * Math.random()));
if (Math.random() > 0.5) {
ricMC._yscale = ricMC._yscale * -1;
}
}
function createExplosionDebry(debryType, x, y, angleDeg, startSize, finishSize, durationFr, smokeTrail) {
if ((noOfExplosionDebryCreated++) > 500) {
noOfExplosionDebryCreated = 0;
}
game_MC.explosionDebryAttachMC.attachMovie(debryType, ((debryType + "_") + noOfExplosionDebryCreated) + "_MC", noOfExplosionDebryCreated);
targetMC = eval (((("game_MC.explosionDebryAttachMC." + debryType) + "_") + noOfExplosionDebryCreated) + "_MC");
targetMC._x = x;
targetMC._y = y;
targetMC._xscale = (targetMC._yscale = startSize);
targetMC._rotation = angleDeg;
vel = 6 + ((4 * Math.random()) * (startSize / 100));
angleDeg = angleDeg + int(30 * (0.5 - Math.random()));
vx = vel * Math.cos((angleDeg / 180) * PI);
vy = vel * Math.sin((angleDeg / 180) * PI);
rotSpeed = vel;
explosionDebryArr.push(new ExplosionDebry(targetMC, debryType, vx, vy, rotSpeed, startSize, finishSize, durationFr, smokeTrail));
}
function createProjectile(weaponType) {
if ((pL_noOfProjCreated++) > 500) {
pL_noOfProjCreated = 0;
}
game_MC.pL_projectileAttachMC.attachMovie(weaponType, ((weaponType + "_") + pL_noOfProjCreated) + "_MC", pL_noOfProjCreated);
projMC = eval (((("game_MC.pL_projectileAttachMC." + weaponType) + "_") + pL_noOfProjCreated) + "_MC");
nozzleX = game_MC.pL_MC.pL_weapon_MC.nozzle_MC._x;
nozzleY = (game_MC.pL_MC.pL_weapon_MC.nozzle_MC._y * game_MC.pL_MC.pL_weapon_MC._xscale) / 100;
nozzleY = (game_MC.pL_MC.pL_weapon_MC.nozzle_MC._y * game_MC.pL_MC.pL_weapon_MC._xscale) / 100;
projMC._x = (pL_x + (pL_weapon_ux * nozzleX)) - (pL_weapon_uy * nozzleY);
projMC._y = ((pL_y - pL_weaponRotationY) + (pL_weapon_ux * nozzleY)) + (pL_weapon_uy * nozzleX);
switch (weaponType) {
case "rocketLauncher" :
projMC._rotation = angle;
break;
case "flameThrower" :
projMC._rotation = angle;
break;
case "grenade" :
game_MC.pL_MC.pL_weapon_MC.arms_MC.gotoAndPlay("throw");
break;
}
pL_projectileArr.push(new projectileObj(projMC, weaponType, pL_weapon_ux, pL_weapon_uy, pL_weaponsArr[pL_currWeaponNo].attackDamage));
}
function pL_changeWeapon(direction) {
trace(" direction : " + direction);
trace("pL_weaponsArr[i].available: " + pL_weaponsArr[i].available);
trace("pL_weaponsArr[i].ammo: " + pL_weaponsArr[i].ammo);
pL_weaponSoundStop();
tempCurrWeaponNo = pL_currWeaponNo;
i = 0;
while (i < pL_weaponsArr.length) {
tempCurrWeaponNo = tempCurrWeaponNo + direction;
if (tempCurrWeaponNo < 0) {
tempCurrWeaponNo = pL_weaponsArr.length - 1;
} else if (tempCurrWeaponNo >= pL_weaponsArr.length) {
tempCurrWeaponNo = 0;
}
if (pL_weaponsArr[tempCurrWeaponNo].available) {
if ((pL_weaponsArr[tempCurrWeaponNo].ammo == "inf") || (pL_weaponsArr[tempCurrWeaponNo].ammo > 0)) {
pL_oldWeaponNo = pL_currWeaponNo;
pL_currWeaponNo = tempCurrWeaponNo;
with (game_MC.pL_MC.pL_weapon_MC) {
gotoAndStop(pL_weaponsArr[tempCurrWeaponNo].type);
flash_MC._x = (lineOfFire_MC._x = nozzle_MC._x);
flash_MC._y = (lineOfFire_MC._y = nozzle_MC._y);
}
statusWindowMC.pL_weaponDisplayMC.gotoAndStop(pL_weaponsArr[tempCurrWeaponNo].type);
statusWindowMC.txtAmmo = pL_weaponsArr[tempCurrWeaponNo].ammo;
trace((game_FrNo + " pL_oldWeaponNo : ") + pL_weaponsArr[pL_oldWeaponNo].currReloadFr);
pL_weaponsArr[pL_oldWeaponNo].currReloadFr = pL_weaponsArr[pL_oldWeaponNo].currReloadFr + game_FrNo;
trace((game_FrNo + " pL_oldWeaponNo : ") + pL_weaponsArr[pL_oldWeaponNo].currReloadFr);
if (pL_weaponsArr[pL_currWeaponNo].currReloadFr < game_FrNo) {
statusWindowMC.txtReloading = (pL_weaponsArr[pL_currWeaponNo].currReloadFr = 0);
statusWindowMC.pL_ReloadMC.barMC._xscale = 100;
} else {
trace((game_FrNo + " pL_currWeaponNo : ") + pL_weaponsArr[pL_currWeaponNo].currReloadFr);
statusWindowMC.txtReloading = (pL_weaponsArr[pL_currWeaponNo].currReloadFr = pL_weaponsArr[pL_currWeaponNo].currReloadFr - game_FrNo);
statusWindowMC.pL_ReloadMC.barMC._xscale = (100 * (pL_weaponsArr[pL_currWeaponNo].reloadFr - pL_weaponsArr[pL_currWeaponNo].currReloadFr)) / pL_weaponsArr[pL_currWeaponNo].reloadFr;
}
i = pL_weaponsArr.length;
}
}
i++;
}
pL_weaponType = pL_weaponsArr[pL_currWeaponNo].type;
game_MC.pL_MC.pL_weapon_MC.flash_MC.gotoAndStop(1);
game_MC.pL_MC.pL_weapon_MC.lineOfFire_MC.gotoAndStop(1);
game_MC.pL_MC.pL_head_MC.flash_MC.gotoAndStop(1);
game_MC.pL_MC.pL_Body_MC.flash_MC.gotoAndStop(1);
pL_mouseDown = false;
}
function pL_getsHurt(type, damage, temp_x, temp_y, temp_ux, temp_uy) {
if (pL_status != "dies") {
pL_health = pL_health - damage;
if (pL_health < 0) {
pL_health = 0;
pL_status = "dies";
game_MC.pL_MC.gotoAndStop("dies");
startLevelCompleteCountdown("pL_dead");
pL_xSpeed = 0;
pL_ySpeed = 0;
} else {
game_MC.pL_MC.gotoAndStop("getsHurt");
pL_status = "getsHurt";
pL_xSpeed = damage * temp_ux;
pL_ySpeed = damage * temp_uy;
pL_getsHurtCounterFr = FPS / 2;
}
createRicochet("bloodsplatter", 1, temp_x, temp_y, temp_angle);
statusWindowMC.pL_heathMC.barMC._xscale = pL_health;
}
}
function pL_weaponSoundStop() {
pL_weaponFireSnd.stop(pL_weaponType + "_fire");
}
function lineObjectIntersectionDist(line_x, line_y, line_ux, line_uy, object) {
if (object.shape == "rectangle") {
if (object.registration == "bottomCenter") {
object_xmin = object.x - (object.w / 2);
object_xmax = object.x + (object.w / 2);
object_ymin = object.y - object.h;
object_ymax = object.y;
} else if (object.registration == "topLeft") {
object_xmin = object.x;
object_xmax = object.x + object.w;
object_ymin = object.y;
object_ymax = object.y + object.h;
} else if (object.registration == "center") {
object_xmin = object.x - (object.w / 2);
object_xmax = object.x + (object.w / 2);
object_ymin = object.y - (object.h / 2);
object_ymax = object.y + (object.h / 2);
}
dist = Math.sqrt(((object_xmin - line_x) * (object_xmin - line_x)) + ((object_ymin - line_y) * (object_ymin - line_y)));
dist_alongLineToOrigin = (line_uy * (object_ymin - line_y)) + (line_ux * (object_xmin - line_x));
if (dist_alongLineToOrigin > 0) {
dist_LT = (line_ux * (object_ymin - line_y)) - (line_uy * (object_xmin - line_x));
dist_RT = (line_ux * (object_ymin - line_y)) - (line_uy * (object_xmax - line_x));
dist_LB = (line_ux * (object_ymax - line_y)) - (line_uy * (object_xmin - line_x));
dist_RB = (line_ux * (object_ymax - line_y)) - (line_uy * (object_xmax - line_x));
dist_min = dist_LT;
if (dist_RT < dist_min) {
dist_min = dist_RT;
}
if (dist_LB < dist_min) {
dist_min = dist_LB;
}
if (dist_RB < dist_min) {
dist_min = dist_RB;
}
dist_max = dist_LT;
if (dist_RT > dist_max) {
dist_max = dist_RT;
}
if (dist_LB > dist_max) {
dist_max = dist_LB;
}
if (dist_RB > dist_max) {
dist_max = dist_RB;
}
if (dist_min < 0) {
if (dist_max > 0) {
tempX = line_x + (dist_alongLineToOrigin * line_ux);
tempY = line_y + (dist_alongLineToOrigin * line_uy);
hitWall_1 = [];
hitWall_1.name = "";
hitWall_2 = [];
hitWall_2.name = "";
if ((dist_LT * dist_LB) < 0) {
hitWall_1.name = "left";
hitWall_1.hitX = object_xmin;
hitWall_1.hitY = line_y + (((object_xmin - line_x) * line_uy) / line_ux);
}
if ((dist_RB * dist_RT) < 0) {
if (hitWall_1.name != "") {
hitWall_2.name = "rigth";
hitWall_2.hitX = object_xmax;
hitWall_2.hitY = line_y + (((object_xmax - line_x) * line_uy) / line_ux);
} else {
hitWall_1.name = "rigth";
hitWall_1.hitX = object_xmax;
hitWall_1.hitY = line_y + (((object_xmax - line_x) * line_uy) / line_ux);
}
}
if ((dist_LB * dist_RB) < 0) {
if (hitWall_1.name != "") {
hitWall_2.name = "top";
hitWall_2.hitY = object_ymax;
hitWall_2.hitX = line_x + (((object_ymax - line_y) * line_ux) / line_uy);
} else {
hitWall_1.name = "top";
hitWall_1.hitY = object_ymax;
hitWall_1.hitX = line_x + (((object_ymax - line_y) * line_ux) / line_uy);
}
}
if ((dist_LT * dist_RT) < 0) {
hitWall_2.hitY = object_ymin;
hitWall_2.hitX = line_x + (((object_ymin - line_y) * line_ux) / line_uy);
hitWall_2.name = "bottom";
}
tempX = hitWall_2.hitX;
tempY = hitWall_2.hitY;
tempdistancesObj = [];
dist_1 = Math.sqrt(((hitWall_1.hitX - line_x) * (hitWall_1.hitX - line_x)) + ((hitWall_1.hitY - line_y) * (hitWall_1.hitY - line_y)));
dist_2 = Math.sqrt(((hitWall_2.hitX - line_x) * (hitWall_2.hitX - line_x)) + ((hitWall_2.hitY - line_y) * (hitWall_2.hitY - line_y)));
if (dist_1 < dist_2) {
tempdistancesObj.minDist = dist_1;
tempdistancesObj.minX = hitWall_1.hitX;
tempdistancesObj.minY = hitWall_1.hitY;
tempdistancesObj.maxDist = dist_2;
tempdistancesObj.minX = hitWall_2.hitX;
tempdistancesObj.minY = hitWall_2.hitY;
} else {
tempdistancesObj.minDist = dist_2;
tempdistancesObj.minX = hitWall_2.hitX;
tempdistancesObj.minY = hitWall_2.hitY;
tempdistancesObj.maxDist = dist_1;
tempdistancesObj.minX = hitWall_1.hitX;
tempdistancesObj.minY = hitWall_1.hitY;
}
dist_alongLineInBox = Math.sqrt(((tempX - line_x) * (tempX - line_x)) + ((tempY - line_y) * (tempY - line_y)));
return(tempdistancesObj);
}
}
}
} else if (object.shape == "circle") {
object_x = object.x;
object_y = object.y;
dist_perpLineToOrigin = (line_ux * (object_y - line_y)) - (line_uy * (object_x - line_x));
dist_alongLineToOrigin = (line_uy * (object_y - line_y)) + (line_ux * (object_x - line_x));
if (dist_alongLineToOrigin > 0) {
if (Abs(dist_perpLineToOrigin) < object.rad) {
tempdistancesObj = [];
modifierDist = Math.sqrt((object.rad * object.rad) - (dist_perpLineToOrigin * dist_perpLineToOrigin));
tempdistancesObj.minDist = dist_alongLineToOrigin - modifierDist;
tempdistancesObj.maxDist = dist_alongLineToOrigin + modifierDist;
return(tempdistancesObj);
}
}
}
return(0);
}
function lineOfFireHitsWall(tempLine_x, tempLine_y, tempLine_ux, tempLine_uy) {
dist_LT = (tempLine_ux * (screenBufferTop - tempLine_y)) - (tempLine_uy * (screenBufferLeft - tempLine_x));
dist_RT = (tempLine_ux * (screenBufferTop - tempLine_y)) - (tempLine_uy * (screenBufferRight - tempLine_x));
dist_LB = (tempLine_ux * (screenBufferBottom - tempLine_y)) - (tempLine_uy * (screenBufferLeft - tempLine_x));
dist_RB = (tempLine_ux * (screenBufferBottom - tempLine_y)) - (tempLine_uy * (screenBufferRight - tempLine_x));
if ((dist_LT > 0) && (dist_LB < 0)) {
temp_dx = screenBufferLeft - tempLine_x;
temp_dy = (temp_dx * tempLine_uy) / tempLine_ux;
temp_angle = 0;
} else if ((dist_RB > 0) && (dist_RT < 0)) {
temp_dx = screenBufferRight - tempLine_x;
temp_dy = (temp_dx * tempLine_uy) / tempLine_ux;
temp_angle = 180;
} else if ((dist_LB < 0) && (dist_RB > 0)) {
temp_dy = screenBufferTop - tempLine_y;
temp_dx = (temp_dy * tempLine_ux) / tempLine_uy;
temp_angle = 90;
} else if ((dist_LB > 0) && (dist_RB < 0)) {
temp_dy = screenBufferBottom - tempLine_y;
temp_dx = (temp_dy * tempLine_ux) / tempLine_uy;
temp_angle = -90;
}
temp_x = tempLine_x + temp_dx;
temp_y = tempLine_y + temp_dy;
createRicochet("ricochet", 2, temp_x, temp_y, temp_angle);
shortestLineOfFireDist = 1000;
}
function enenmyGetsHurt(tempEnemyNo, attackDamage) {
tempEnemyObj = enemyArr[tempEnemyNo];
tempEnemyObj.health = tempEnemyObj.health - attackDamage;
enemyName = tempEnemyObj.type + tempEnemyObj.typeNo;
statusWindowMC.EnemyStatusMC._visible = true;
statusWindowMC.EnemyStatusMC.gotoAndStop(enemyName);
statusWindowMC.EnemyStatusMC.heathMC.barMC._xscale = (100 * tempEnemyObj.health) / tempEnemyObj.fullHealth;
if (tempEnemyObj.health <= 0) {
tempEnemyObj.health = 0;
statusWindowMC.EnemyStatusMC.heathMC.barMC._xscale = 0;
enemyMC = eval (tempEnemyObj.target);
sgExplodes(tempEnemyObj);
enemyMC.gotoAndPlay("dies");
enemyArr.splice(tempEnemyNo, 1);
switch (tempEnemyObj.shape) {
case "circle" :
enemyArea = (4 * tempEnemyObj.rad) * tempEnemyObj.rad;
break;
case "rectangle" :
enemyArea = tempEnemyObj.w * tempEnemyObj.h;
}
trace("enemyArea: " + enemyArea);
noOfDebry = 2 + (enemyArea / 80);
if ((enemyArea / 3) > 100) {
debrySize = 100;
} else {
debrySize = 30 + ((enemyArea * 70) / 300);
}
startAngle = 360 * Math.random();
i = 1;
while (i < noOfDebry) {
createExplosionDebry("debry1", enemyMC._x, enemyMC._y, startAngle - ((i * 360) / (enemyArea / 50)), debrySize, 0, 0, false);
i++;
}
startAngle = -180 * Math.random();
noOfDebry = 2 + (enemyArea / 80);
i = 1;
while (i < (noOfDebry / 100)) {
createExplosionDebry("debry1", enemyMC._x, enemyMC._y, startAngle + ((i * 360) / (enemyArea / 100)), debrySize, 25, 1.5 * FPS, true);
i++;
}
} else {
noOfEnemyDamageFr = 4;
enemyMC = eval (tempEnemyObj.target);
enemyMC.gotoAndStop(noOfEnemyDamageFr - int(noOfEnemyDamageFr * (tempEnemyObj.health / tempEnemyObj.fullHealth)));
}
enemyStatusDisplayFr = 5 * FPS;
}
function sgExplodes(sgObj) {
switch (sgObj.type) {
case "debry" :
explosionRadius = 50;
explosionDamage = 5;
break;
case "turret" :
case "flying" :
case "walker" :
case "stationary" :
explosionRadius = 40;
explosionDamage = 10;
break;
case "rocketLauncher" :
explosionRadius = 20;
explosionDamage = sgObj.attackDamage;
break;
case "flameThrower" :
break;
case "grenade" :
explosionRadius = 20;
explosionDamage = sgObj.attackDamage;
}
dx = pL_x - sgObj.x;
dy = (pL_y - (pL_height / 2)) - sgObj.y;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist < explosionRadius) {
temp_ux = dx / dist;
temp_uy = dy / dist;
temp_x = pL_x + (temp_ux * dist);
temp_y = (pL_y - (pL_height / 2)) + (temp_uy * dist);
pL_getsHurt(type, explosionDamage, temp_x, temp_y, temp_ux, temp_uy);
}
}
trace((("xtype: " + xtype) + " :: xtype: ") + xtype);
Array.prototype.sortOn = function (p) {
Array.$sortprop = p;
var sortfunc = function (a, b) {
var p = Array.$sortprop;
return(b[p] < a[p]);
};
this.sort(sortfunc);
delete Array.$sortprop;
};
if (firstTimeToLoad == undefined) {
firstTimeToLoad = false;
setDefaultKeys();
FPS = 24;
sw = 440;
sh = 320;
PI = 3.1415;
grav = 24 / FPS;
screenBufferLeft = 5;
screenBufferRight = sw - 5;
screenBufferTop = 40;
screenBufferBottom = sh - 40;
screenBufferLeftObj = new Object();
screenBufferLeftObj.x = 0;
screenBufferLeftObj.y = screenBufferTop - 2;
screenBufferLeftObj.w = screenBufferLeft;
screenBufferLeftObj.h = (sh - screenBufferBottom) + 4;
screenBufferLeftObj.shape = "rectangle";
screenBufferLeftObj.registration = "topLeft";
screenBufferRightObj = new Object();
screenBufferRightObj.x = screenBufferRight;
screenBufferRightObj.y = screenBufferTop - 2;
screenBufferRightObj.w = sw - screenBufferRight;
screenBufferRightObj.h = (sh - screenBufferBottom) + 4;
screenBufferRightObj.shape = "rectangle";
screenBufferRightObj.registration = "topLeft";
screenBufferTopObj = new Object();
screenBufferTopObj.x = 0;
screenBufferTopObj.y = 0;
screenBufferTopObj.w = sw;
screenBufferTopObj.h = screenBufferTop;
screenBufferTopObj.shape = "rectangle";
screenBufferTopObj.registration = "topLeft";
screenBufferBottomObj = new Object();
screenBufferBottomObj.x = 0;
screenBufferBottomObj.y = screenBufferBottom;
screenBufferBottomObj.w = sw;
screenBufferBottomObj.h = sh - screenBufferBottom;
screenBufferBottomObj.shape = "rectangle";
screenBufferBottomObj.registration = "topLeft";
levelCodeArr = [];
levelCodeArr.push("0FASDF");
levelCodeArr.push("1JTG4N");
levelCodeArr.push("2FT4MF");
levelCodeArr.push("3DEHBD");
levelCodeArr.push("4JF18S");
levelCodeArr.push("5MV6RG");
levelCodeArr.push("6IH84H");
levelCodeArr.push("7F6JAQ");
levelCodeArr.push("8TH7KJ");
levelCodeArr.push("9FU74V");
levelCodeArr.push("10DFH3");
levelCodeArr.push("11H87G");
levelCodeArr.push("12EVUT");
levelCodeArr.push("13J95G");
levelCodeArr.push("14B8EG");
levelCodeArr.push("15DFHG");
levelCodeArr.push("16J873");
levelCodeArr.push("178JS6");
levelCodeArr.push("188HJE");
levelCodeArr.push("19GHEU");
pL_levelCode = levelCodeArr[0];
pL_height = 30;
pL_width = 8;
pL_jumpSpeed = 250 / FPS;
pL_walkSpeed = 120 / FPS;
pL_weaponRotationY = 21;
checkPointPath1_arr = [];
currCheckPointPath_arr = checkPointPath1_arr;
currCheckPointPath_arr.push([320, 110]);
currCheckPointPath_arr.push([120, 110]);
checkPointPath2_arr = [];
currCheckPointPath_arr = checkPointPath2_arr;
currCheckPointPath_arr.push([320, 70]);
currCheckPointPath_arr.push([120, 70]);
currCheckPointPath_arr.push([120, 160]);
currCheckPointPath_arr.push([320, 160]);
checkPointPath3_arr = [];
currCheckPointPath_arr = (checkPointPath3_arr = []);
currCheckPointPath_arr.push([220, 50]);
currCheckPointPath_arr.push([140, 100]);
currCheckPointPath_arr.push([220, 150]);
currCheckPointPath_arr.push([300, 100]);
checkPointPath4_arr = [];
currCheckPointPath_arr = checkPointPath4_arr;
currCheckPointPath_arr.push([220, 100]);
currCheckPointPath_arr.push([160, 130]);
currCheckPointPath_arr.push([160, 190]);
currCheckPointPath_arr.push([220, 220]);
currCheckPointPath_arr.push([280, 190]);
currCheckPointPath_arr.push([280, 130]);
checkPointPath5_arr = [];
currCheckPointPath_arr = checkPointPath5_arr;
currCheckPointPath_arr.push([320, 110]);
currCheckPointPath_arr.push([120, 110]);
currCheckPointPath_arr.push([320, 160]);
currCheckPointPath_arr.push([120, 160]);
currCheckPointPath_arr.push([320, 210]);
currCheckPointPath_arr.push([120, 210]);
testArray = checkPointPath1_arr;
arrNo = checkPointPath1_arr.length;
while ((arrNo--) > 0) {
trace(((((" checkPointPath_1_arr :: " + arrNo) + " :: ") + testArray[arrNo][0]) + " :: ") + testArray[arrNo][1]);
}
pL_weaponsArr = [];
pL_weaponsArr.push(new Weapon(true, "pistol", "inf", FPS / 2, 1));
pL_weaponsArr.push(new Weapon(true, "blasterGun", "inf", FPS * 0.66, 2));
pL_weaponsArr.push(new Weapon(true, "uzi", 40, 4, 2));
pL_weaponsArr.push(new Weapon(true, "machineGun", "inf", 4, 3));
pL_weaponsArr.push(new Weapon(true, "miniGun", 50, 3, 1));
pL_weaponsArr.push(new Weapon(true, "laser", "inf", FPS, 4 / FPS, 1));
pL_weaponsArr.push(new Weapon(true, "rocketLauncher", "inf", 0.3 * FPS, 12));
pL_weaponsArr.push(new Weapon(true, "flameThrower", "inf", 2, 1));
pL_weaponsArr.push(new Weapon(true, "grenade", "inf", FPS, 4));
pL_grenadeThrowVelocity = 0;
testArray = pL_weaponsArr;
arrNo = testArray.length;
while ((arrNo--) > 0) {
trace(((((" borderArr :: " + arrNo) + " :: ") + testArray[arrNo].type) + " :: ") + testArray[arrNo].attackDamage);
}
playGameMusic = true;
}
function onEnterFrame_game() {
game_FrNo++;
pL_moveStatus = false;
if (pL_status == "walk") {
if (Key.isDown(key_pLMoveLeft)) {
pL_xSpeed = -pL_walkSpeed;
pL_moveStatus = true;
game_MC.pL_MC.gotoAndStop("walk");
} else if (Key.isDown(key_pLMoveRight)) {
pL_xSpeed = pL_walkSpeed;
pL_moveStatus = true;
game_MC.pL_MC.gotoAndStop("walk");
} else if (!pL_moveStatus) {
pL_xSpeed = 0;
game_MC.pL_MC.gotoAndStop("stand");
}
if (Key.isDown(key_pLMoveUp) && (!pL_jumping)) {
pL_yspeed = pL_yspeed - pL_jumpSpeed;
pL_moveStatus = true;
pL_jumping = true;
}
if (pL_jumping) {
game_MC.pL_MC.gotoAndStop("jump");
}
if (pL_xSpeed > 0) {
game_MC.pL_MC.pL_legs_MC._xscale = 100;
} else {
game_MC.pL_MC.pL_legs_MC._xscale = -100;
}
} else if (pL_status == "getsHurt") {
if ((pL_getsHurtCounterFr--) <= 0) {
pL_status = "walk";
}
}
pL_x = pL_x + pL_xSpeed;
pL_ySpeed = pL_ySpeed + grav;
pL_y = pL_y + pL_ySpeed;
if (pL_y < screenBufferTop) {
pL_y = screenBufferTop;
} else if (pL_y > screenBufferBottom) {
pL_y = screenBufferBottom;
pL_yspeed = 0;
pL_jumping = false;
}
if (pL_x < screenBufferLeft) {
pL_x = screenBufferLeft;
} else if (pL_x > screenBufferRight) {
pL_x = screenBufferRight;
}
dx = _xmouse - pL_x;
dy = _ymouse - (pL_y - pL_weaponRotationY);
dist = Math.sqrt((dx * dx) + (dy * dy));
dx_adjust = dx / Abs(dx);
dy_adjust = dy / Abs(dy);
nozzleY = (game_MC.pL_MC.pL_weapon_MC.nozzle_MC._y * dx_adjust) * dy_adjust;
angleRad = Math.acos(dx / dist) - Math.asin(nozzleY / dist);
angleRad = angleRad * (dy / Abs(dy));
if (dx < 0) {
}
pL_weaponAngleDeg = (angle = 57.2957795130823 * angleRad);
pL_weapon_ux = (ux = Math.cos(angleRad));
pL_weapon_uy = (uy = Math.sin(angleRad));
if (pL_mouseDown) {
if (pL_weaponsArr[pL_currWeaponNo].currReloadFr <= 0) {
if (pL_weaponType == "grenade") {
if ((++pL_grenadeThrowVelocity) >= 15) {
pL_grenadeThrowVelocity = 15;
}
statusWindowMC.txtGrenadeThrow = pL_grenadeThrowVelocity;
pL_weaponsArr[pL_currWeaponNo].currReloadFr = 0;
} else if ((pL_weaponsArr[pL_currWeaponNo].ammo > 0) || (pL_weaponsArr[pL_currWeaponNo].ammo == "inf")) {
if (pL_weaponsArr[pL_currWeaponNo].ammo != "inf") {
statusWindowMC.txtAmmo = --pL_weaponsArr[pL_currWeaponNo].ammo;
}
pL_weaponsArr[pL_currWeaponNo].currReloadFr = pL_weaponsArr[pL_currWeaponNo].reloadFr;
switch (pL_weaponType) {
case "pistol" :
case "blasterGun" :
case "laser" :
pL_weaponFireSnd.start(0, 1);
case "uzi" :
case "machineGun" :
case "miniGun" :
shortestLineOfFireObj = [];
shortestLineOfFireObj.minDist = 0;
tempLineObj = game_MC.pL_MC.pL_weapon_MC.lineOfFire_MC;
nozzleX = game_MC.pL_MC.pL_weapon_MC.nozzle_MC._x;
nozzleY = (game_MC.pL_MC.pL_weapon_MC.nozzle_MC._y * game_MC.pL_MC.pL_weapon_MC._xscale) / 100;
tempLine_x = (pL_x + (pL_weapon_ux * nozzleX)) - (pL_weapon_uy * nozzleY);
tempLine_y = ((pL_y - pL_weaponRotationY) + (pL_weapon_ux * nozzleY)) + (pL_weapon_uy * nozzleX);
enemyNo = enemyArr.length;
while ((enemyNo--) > 0) {
enemyMC = eval (enemyArr[enemyNo].target);
currDistObj = lineObjectIntersectionDist(tempLine_x, tempLine_y, pL_weapon_ux, pL_weapon_uy, enemyArr[enemyNo]);
currDist = currDistObj.minDist;
if (currDistObj.minDist > 0) {
if (shortestLineOfFireObj.minDist == 0) {
shortestLineOfFireObj = currDistObj;
hitEnemyArrayNo = enemyNo;
} else if (currDistObj.minDist < shortestLineOfFireObj.minDist) {
shortestLineOfFireObj = currDistObj;
hitEnemyArrayNo = enemyNo;
}
}
}
if (shortestLineOfFireObj.minDist > 0) {
enenmyGetsHurt(hitEnemyArrayNo, pL_weaponsArr[pL_currWeaponNo].attackDamage);
temp_angle = (180 / Math.PI) * Math.atan(pL_weapon_uy / pL_weapon_ux);
temp_x = tempLine_x + (shortestLineOfFireObj.minDist * pL_weapon_ux);
temp_y = tempLine_y + (shortestLineOfFireObj.minDist * pL_weapon_uy);
createRicochet("ricochet", 1, temp_x, temp_y, pL_weaponAngleDeg + 180);
temp_x = tempLine_x + (shortestLineOfFireObj.maxDist * pL_weapon_ux);
temp_y = tempLine_y + (shortestLineOfFireObj.maxDist * pL_weapon_uy);
createRicochet("ricochet", 1, temp_x, temp_y, pL_weaponAngleDeg);
} else {
lineOfFireHitsWall(tempLine_x, tempLine_y, pL_weapon_ux, pL_weapon_uy);
shortestLineOfFireObj.minDist = 1000;
}
game_MC.pL_MC.pL_weapon_MC.flash_MC.gotoAndPlay(pL_weaponType);
game_MC.pL_MC.pL_weapon_MC.lineOfFire_MC.gotoAndPlay(2);
game_MC.pL_MC.pL_weapon_MC.lineOfFire_MC._width = shortestLineOfFireObj.minDist;
game_MC.pL_MC.pL_head_MC.flash_MC.gotoAndPlay(2);
game_MC.pL_MC.pL_Body_MC.flash_MC.gotoAndPlay(2);
break;
case "grenade" :
break;
case "rocketLauncher" :
case "flameThrower" :
game_MC.pL_MC.pL_weapon_MC.flash_MC.gotoAndPlay(pL_weaponType);
game_MC.pL_MC.pL_head_MC.flash_MC.gotoAndPlay(2);
game_MC.pL_MC.pL_Body_MC.flash_MC.gotoAndPlay(2);
createProjectile(pL_weaponType);
break;
}
} else {
pL_weaponSoundStop();
}
}
}
if ((--pL_weaponsArr[pL_currWeaponNo].currReloadFr) < 0) {
pL_weaponsArr[pL_currWeaponNo].currReloadFr = 0;
} else {
statusWindowMC.txtReloading = pL_weaponsArr[pL_currWeaponNo].currReloadFr;
statusWindowMC.pL_ReloadMC.barMC._xscale = (100 * (pL_weaponsArr[pL_currWeaponNo].reloadFr - pL_weaponsArr[pL_currWeaponNo].currReloadFr)) / pL_weaponsArr[pL_currWeaponNo].reloadFr;
}
if (pL_projectileArr.length > 0) {
projectileNo = pL_projectileArr.length;
while ((projectileNo--) > 0) {
projObj = pL_projectileArr[projectileNo];
projectileMC = eval (projObj.targetMC);
projExplode = false;
switch (projObj.type) {
case "rocketLauncher" :
break;
case "grenade" :
projObj.vy = projObj.vy + grav;
case "flameThrower" :
if ((--projObj.timer) < 0) {
projExplode = true;
}
break;
}
projObj.x = (projectileMC._x = projectileMC._x + projObj.vx);
projObj.y = (projectileMC._y = projectileMC._y + projObj.vy);
projCollision = false;
enemyNo = enemyArr.length;
while ((enemyNo--) > 0) {
enemyMC = eval (enemyArr[enemyNo].target);
if (projectileMC.hitTest(enemyMC)) {
projCollision = true;
enenmyGetsHurt(enemyNo, projObj.attackDamage);
projExplode = true;
trace("enemyArr[enemyNo].health: " + enemyArr[enemyNo].health);
}
}
if (projObj.y < screenBufferTop) {
projCollision = true;
collisionDirection = "y";
projectileMC._y = screenBufferTop;
} else if (projObj.y > screenBufferBottom) {
projCollision = true;
collisionDirection = "y";
projectileMC._y = screenBufferBottom;
}
if (projObj.x < screenBufferLeft) {
projCollision = true;
collisionDirection = "x";
projectileMC._x = screenBufferLeft;
} else if (projObj.x > screenBufferRight) {
projCollision = true;
collisionDirection = "x";
projectileMC._x = screenBufferRight;
}
if (projCollision) {
switch (projObj.type) {
case "rocketLauncher" :
projExplode = true;
break;
case "flameThrower" :
break;
case "grenade" :
if (collisionDirection == "x") {
projObj.vx = projObj.vx * (-1);
} else if (collisionDirection == "y") {
projObj.vy = projObj.vy * (-0.7);
}
break;
}
}
if (projExplode) {
sgExplodes(projObj);
projectileMC.gotoAndPlay("explode");
pL_projectileArr.splice(projectileNo, 1);
}
}
}
with (game_MC) {
pL_MC._x = pL_x;
pL_MC._y = pL_y;
crossHairMC._x = _xmouse;
crossHairMC._y = _ymouse;
crossHairMC._rotation = pL_weaponAngleDeg;
if (dx > 0) {
pL_MC.pL_weapon_MC._xscale = 100;
pL_MC.pL_weapon_MC._rotation = pL_weaponAngleDeg;
pL_MC.pL_head_MC._xscale = 100;
pL_MC.pL_head_MC._rotation = pL_weaponAngleDeg;
pL_MC.pL_Body_MC._xscale = 100;
} else {
pL_MC.pL_weapon_MC._xscale = -100;
pL_MC.pL_weapon_MC._rotation = pL_weaponAngleDeg + 180;
pL_MC.pL_head_MC._xscale = -100;
pL_MC.pL_head_MC._rotation = pL_weaponAngleDeg + 180;
pL_MC.pL_Body_MC._xscale = -100;
}
}
if (moreEnemyToCome) {
while ((game_FrNo > nextEnemyFrNo) && (moreEnemyToCome)) {
enemyArr.push(tempEnemyArr[0]);
enemyObj = tempEnemyArr[0];
if ((noOfEnemyCreated++) > 200) {
noOfEnemyCreated = 0;
}
game_MC.enemyAttachMC.attachMovie(enemyObj.type + enemyObj.typeNo, (((enemyObj.type + enemyObj.typeNo) + "_") + noOfEnemyCreated) + "_MC", noOfEnemyCreated);
enemyMC = eval ((((("game_MC.enemyAttachMC." + enemyObj.type) + enemyObj.typeNo) + "_") + noOfEnemyCreated) + "_MC");
enemyMC._x = enemyObj.x;
enemyMC._y = enemyObj.y;
switch (enemyObj.type) {
case "turret" :
case "walker" :
enemyMC.weapon_MC._rotation = enemyObj.gunAngle;
break;
}
enemyObj.target = enemyMC;
tempEnemyArr.splice(0, 1);
nextEnemyFrNo = tempEnemyArr[0].showUpFr;
if (tempEnemyArr.length <= 0) {
moreEnemyToCome = false;
}
}
}
enemyNo = enemyArr.length;
while ((enemyNo--) > 0) {
enemyObj = enemyArr[enemyNo];
enemyMC = eval (enemyObj.target);
enemyPL_dx = pL_x - enemyObj.x;
enemyPL_dy = (pL_y - (pL_height / 2)) - enemyObj.y;
enemyPL_dist = Math.sqrt((enemyPL_dx * enemyPL_dx) + (enemyPL_dy * enemyPL_dy));
enemyPL_ux = enemyPL_dx / enemyPL_dist;
enemyPL_uy = enemyPL_dy / enemyPL_dist;
enemyPL_angle = Math.acos(enemyPL_dx / enemyPL_dist) * (enemyPL_dy / Abs(enemyPL_dy));
enemyPL_angleDeg = 57.2957795130823 * enemyPL_angle;
switch (enemyObj.type) {
case "stationary" :
switch (typeNo) {
case 1 :
this.shape = "circle";
this.rad = 7.5;
this.health = 5;
break;
case 2 :
break;
}
break;
case "turret" :
trace("=====================================================");
if (enemyObj.gunAngle > 180) {
enemyObj.gunAngle = enemyObj.gunAngle - 360;
} else if (enemyObj.gunAngle < -180) {
enemyObj.gunAngle = enemyObj.gunAngle + 360;
}
enemyObj.gunAngle = enemyObj.gunAngle + (getAngle2toAngle1direction(enemyPL_angleDeg, enemyObj.gunAngle) * enemyObj.gunRotSpeed);
if ((--enemyObj.nextAttackFr) <= 0) {
enemyObj.nextAttackFr = enemyObj.nextAttackIntervalFr;
shortestLineOfFireObj = [];
shortestLineOfFireObj.minDist = 0;
enemyMC = eval (enemyArr[enemyNo].target);
nozzleX = enemyMC.weapon_MC.nozzle_MC._x;
nozzleY = (enemyMC.weapon_MC.nozzle_MC._y * enemyMC.weapon_MC._xscale) / 100;
gunAngleRad = (enemyObj.gunAngle / 180) * Math.PI;
enemyPL_ux = Math.cos(gunAngleRad);
enemyPL_uy = Math.sin(gunAngleRad);
tempLine_x = (enemyObj.x + (enemyPL_ux * nozzleX)) - (enemyPL_uy * nozzleY);
tempLine_y = (enemyObj.y + (enemyPL_ux * nozzleY)) + (enemyPL_uy * nozzleX);
pL_BodyObj = new Object();
pL_BodyObj.x = pL_x;
pL_BodyObj.y = pL_y;
pL_BodyObj.w = pL_width;
pL_BodyObj.h = pL_height;
pL_BodyObj.shape = "rectangle";
pL_BodyObj.registration = "bottomCenter";
currDistObj = [];
currDistObj = lineObjectIntersectionDist(tempLine_x, tempLine_y, enemyPL_ux, enemyPL_uy, pL_BodyObj);
currDist = currDistObj.minDist;
if (currDistObj.minDist > 0) {
temp_x = tempLine_x + (currDistObj.minDist * enemyPL_ux);
temp_y = tempLine_y + (currDistObj.minDist * enemyPL_uy);
temp_angle = (180 / Math.PI) * Math.atan(enemyPL_uy / enemyPL_ux);
pL_getsHurt("bullet", enemyObj.attackDamage, temp_x, temp_y, enemyPL_ux, enemyPL_uy);
shortestLineOfFireObj = currDistObj;
} else {
lineOfFireHitsWall(tempLine_x, tempLine_y, enemyPL_ux, enemyPL_uy);
shortestLineOfFireObj.minDist = 1000;
}
enemyMC.weapon_MC.flash_MC.gotoAndPlay(pL_weaponType);
enemyMC.weapon_MC.lineOfFire_MC.gotoAndPlay(2);
enemyMC.weapon_MC.lineOfFire_MC._width = shortestLineOfFireObj.minDist - 20;
}
enemyMC.weapon_MC._rotation = enemyObj.gunAngle;
break;
case "walker" :
if (enemyPL_dx < 0) {
enemyObj.gunAngle = enemyObj.gunAngle - enemyObj.gunRotSpeed;
} else {
enemyObj.gunAngle = enemyObj.gunAngle + enemyObj.gunRotSpeed;
}
if ((enemyObj.gunAngle < -180) || (enemyObj.gunAngle > 90)) {
enemyObj.gunAngle = -180;
} else if (enemyObj.gunAngle > 0) {
enemyObj.gunAngle = 0;
}
if (enemyPL_dx < 0) {
vx = -enemyObj.v;
} else {
vx = enemyObj.v;
}
damage = 1;
enemyMC._x = (enemyObj.x = enemyObj.x + vx);
enemyMC.wheel_MC._rotation = enemyMC.wheel_MC._rotation + (4 * vx);
enemyMC.weapon_MC._rotation = enemyObj.gunAngle;
break;
case "flying" :
if (enemyObj.pathName == "pL_follow") {
if (game_MC.pL_MC.hitAreaMC.hitTest(enemyMC)) {
enemyMC.gotoAndPlay("dies");
sgExplodes(enemyObj);
enemyArr.splice(enemyNo, 1);
}
enemyCP_dx = pL_x - enemyObj.x;
enemyCP_dy = (pL_y - (pL_height / 2)) - enemyObj.y;
} else {
enemyCP_dx = enemyObj.nextCheckPointX - enemyObj.x;
enemyCP_dy = enemyObj.nextCheckPointY - enemyObj.y;
if (Abs(enemyCP_dx) < reachedCheckPointDist) {
if (Abs(enemyCP_dy) < reachedCheckPointDist) {
nextCP(enemyObj);
}
}
}
enemyCP_dist = Math.sqrt((enemyCP_dx * enemyCP_dx) + (enemyCP_dy * enemyCP_dy));
enemyCP_ux = enemyCP_dx / enemyCP_dist;
enemyCP_uy = enemyCP_dy / enemyCP_dist;
thrust_x = enemyCP_ux * enemyObj.v;
thrust_y = enemyCP_uy * enemyObj.v;
enemyObj.vx = thrust_x;
enemyObj.vy = thrust_y;
if (enemyObj.gunAngle > 180) {
enemyObj.gunAngle = enemyObj.gunAngle - 360;
} else if (enemyObj.gunAngle < -180) {
enemyObj.gunAngle = enemyObj.gunAngle + 360;
}
enemyObj.gunAngle = enemyObj.gunAngle + (getAngle2toAngle1direction(enemyPL_angleDeg, enemyObj.gunAngle) * enemyObj.gunRotSpeed);
if (enemyObj.nextAttackIntervalFr > 0) {
if ((--enemyObj.nextAttackFr) <= 0) {
enemyObj.nextAttackFr = enemyObj.nextAttackIntervalFr;
shortestLineOfFireObj = [];
shortestLineOfFireObj.minDist = 0;
enemyMC = eval (enemyArr[enemyNo].target);
nozzleX = enemyMC.weapon_MC.nozzle_MC._x;
nozzleY = (enemyMC.weapon_MC.nozzle_MC._y * enemyMC.weapon_MC._xscale) / 100;
gunAngleRad = (enemyObj.gunAngle / 180) * Math.PI;
enemyPL_ux = Math.cos(gunAngleRad);
enemyPL_uy = Math.sin(gunAngleRad);
tempLine_x = (enemyObj.x + (enemyPL_ux * nozzleX)) - (enemyPL_uy * nozzleY);
tempLine_y = (enemyObj.y + (enemyPL_ux * nozzleY)) + (enemyPL_uy * nozzleX);
pL_BodyObj = new Object();
pL_BodyObj.x = pL_x;
pL_BodyObj.y = pL_y;
pL_BodyObj.w = pL_width;
pL_BodyObj.h = pL_height;
pL_BodyObj.shape = "rectangle";
pL_BodyObj.registration = "bottomCenter";
currDistObj = [];
currDistObj = lineObjectIntersectionDist(tempLine_x, tempLine_y, enemyPL_ux, enemyPL_uy, pL_BodyObj);
currDist = currDistObj.minDist;
if (currDistObj.minDist > 0) {
temp_x = tempLine_x + (currDistObj.minDist * enemyPL_ux);
temp_y = tempLine_y + (currDistObj.minDist * enemyPL_uy);
temp_angle = (180 / Math.PI) * Math.atan(enemyPL_uy / enemyPL_ux);
pL_getsHurt("bullet", enemyObj.attackDamage, temp_x, temp_y, enemyPL_ux, enemyPL_uy);
shortestLineOfFireObj = currDistObj;
} else {
lineOfFireHitsWall(tempLine_x, tempLine_y, enemyPL_ux, enemyPL_uy);
shortestLineOfFireObj.minDist = 1000;
}
enemyMC.weapon_MC.flash_MC.gotoAndPlay(pL_weaponType);
enemyMC.weapon_MC.lineOfFire_MC.gotoAndPlay(2);
enemyMC.weapon_MC.lineOfFire_MC._width = shortestLineOfFireObj.minDist - 20;
}
}
enemyMC._x = (enemyObj.x = enemyObj.x + enemyObj.vx);
enemyMC._y = (enemyObj.y = enemyObj.y + enemyObj.vy);
enemyMC.weapon_MC._rotation = enemyObj.gunAngle;
break;
}
}
if ((enemyStatusDisplayFr--) == 0) {
statusWindowMC.EnemyStatusMC.gotoAndStop("none");
statusWindowMC.EnemyStatusMC.heathMC.barMC._xscale = 100;
statusWindowMC.EnemyStatusMC._visible = false;
} else if (enemyStatusDisplayFr < 0) {
enemyStatusDisplayFr = -2;
}
if (explosionDebryArr.length > 0) {
explosionDebryNo = explosionDebryArr.length;
while ((explosionDebryNo--) > 0) {
explosionDebryObj = explosionDebryArr[explosionDebryNo];
explosionDebryMC = eval (explosionDebryObj.targetMC);
if (explosionDebryObj.smokeTrail) {
explosionDebryObj.vy = explosionDebryObj.vy + (grav / 20);
explosionDebryObj.vx = explosionDebryObj.vx * 0.95;
explosionDebryObj.vy = explosionDebryObj.vy * 0.95;
} else {
explosionDebryObj.vy = explosionDebryObj.vy + (grav / 3);
explosionDebryObj.vx = explosionDebryObj.vx * 0.98;
explosionDebryObj.vy = explosionDebryObj.vy * 0.98;
}
explosionDebryObj.x = (explosionDebryMC._x = explosionDebryMC._x + explosionDebryObj.vx);
explosionDebryObj.y = (explosionDebryMC._y = explosionDebryMC._y + explosionDebryObj.vy);
explosionDebryMC._rotation = explosionDebryMC._rotation + explosionDebryObj.rotSpeed;
explosionDebryExplode = false;
explosionDebryCollision = false;
if (explosionDebryObj.y < screenBufferTop) {
explosionDebryCollision = true;
collisionDirection = "y";
explosionDebryMC._y = screenBufferTop;
} else if (explosionDebryObj.y > screenBufferBottom) {
explosionDebryCollision = true;
collisionDirection = "y";
explosionDebryMC._y = screenBufferBottom;
}
if (explosionDebryObj.x < screenBufferLeft) {
explosionDebryCollision = true;
collisionDirection = "x";
explosionDebryMC._x = screenBufferLeft;
} else if (explosionDebryObj.x > screenBufferRight) {
explosionDebryCollision = true;
collisionDirection = "x";
explosionDebryMC._x = screenBufferRight;
}
if (explosionDebryCollision) {
explosionDebryObj.rotSpeed = explosionDebryObj.rotSpeed * (-0.8 * (0.5 - Math.random()));
if (collisionDirection == "x") {
explosionDebryObj.vx = explosionDebryObj.vx * -1;
} else if (collisionDirection == "y") {
explosionDebryObj.vy = explosionDebryObj.vy * -0.7;
if ((explosionDebryObj.bounceNo++) > 3) {
explosionDebryExplode = true;
}
}
}
if (explosionDebryObj.smokeTrail) {
smokeColor = "white";
game_MC.smokeTrailAttachMC.attachMovie(smokeColor + "Smoke", (((smokeColor + "Smoke") + "_") + noOfSmokeTrailCreated) + "_MC", noOfSmokeTrailCreated);
targetMC = eval ((((("game_MC.smokeTrailAttachMC." + smokeColor) + "Smoke") + "_") + noOfSmokeTrailCreated) + "_MC");
targetMC._x = explosionDebryObj.x;
targetMC._y = explosionDebryObj.y;
targetMC._rotation = angleDeg;
targetMC._xscale = (targetMC._yscale = explosionDebryMC._xscale);
if ((explosionDebryObj.durationFr--) <= 0) {
explosionDebryExplode = true;
}
}
if (explosionDebryExplode) {
explosionDebryMC.gotoAndPlay("explode");
sgExplodes(explosionDebryObj);
explosionDebryArr.splice(explosionDebryNo, 1);
}
if ((noOfSmokeTrailCreated++) > 500) {
noOfSmokeTrailCreated = 0;
}
}
}
currentTime = int(levelAllowedTime - ((getTimer() - startTime) / 1000));
updateTimer(currentTime);
if (levelCompleteCounter > 0) {
levelCompleteCounter--;
trace("almost level complete " + levelCompleteCounter);
if (levelCompleteCounter == 0) {
game_over(missionFinishedReason);
}
} else if (g_missionType == "destroyEnemies") {
if (currentTime <= 0) {
startLevelCompleteCountdown("timeIsUp");
}
if ((enemyArr.length <= 0) && (tempEnemyArr.length <= 0)) {
if (explosionDebryArr.length <= 0) {
startLevelCompleteCountdown("missionComplete");
}
}
} else if (g_missionType == "timeTrial") {
if (currentTime < 0) {
startLevelCompleteCountdown("missionComplete");
}
}
}
function startLevelCompleteCountdown(reason) {
statusWindowMC.missionMessageMC._visible = true;
statusWindowMC.missionMessageMC.gotoAndStop(reason);
missionFinishedReason = reason;
trace("missionFinishedReason " + missionFinishedReason);
if (!(reason === "missionComplete")) {
}
levelCompleteCounter = 2 * FPS;
missionMessageMC._visible = true;
level_finish_time = getTimer();
}
_root.createEmptyMovieClip("_keyListener", 1);
Key.addListener(_keyListener);
_keyListener.onKeyDown = function () {
currKey = Key.getCode();
if (currKey == keyQualityToggle) {
if (_quality == "HIGH") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
}
mcQualityStatus.gotoAndPlay(2);
mcQualityStatus.txtQuality = (game_quality = _quality);
}
if (g_stat == "play") {
if (Key.isDown(key_pLNextWeapon)) {
pL_changeWeapon(1);
} else if (Key.isDown(key_pLPrevWeapon)) {
pL_changeWeapon(-1);
} else if (currKey == keyMusicOnOff) {
trace("playGameMusic: " + playGameMusic);
if (!playGameMusic) {
musicSndNo = 1;
musicSnd = new Sound();
musicSnd.attachSound("music" + musicSndNo);
musicSnd.start(0, 1000);
playGameMusic = true;
} else {
musicSnd.stop("music" + musicSndNo);
playGameMusic = false;
}
} else if (currKey == keyPauseGame) {
tempOnEnterFrame = onEnterFrame;
tempOnMouseDown = onMouseDown;
tempOnMouseUp = onMouseUp;
g_stat = "paused";
Mouse.show();
menuWindowMC.gotoAndStop("pause");
pause_start_time = getTimer();
delete onEnterFrame;
delete onMouseDown;
delete onMouseUp;
}
} else if (g_stat == "paused") {
if (currKey == keyPauseGame) {
onEnterFrame = tempOnEnterFrame;
onMouseDown = tempOnMouseDown;
onMouseUp = tempOnMouseUp;
g_stat = "play";
menuWindowMC.gotoAndStop("game_start");
level_start_time = level_start_time + (getTimer() - pause_start_time);
Mouse.hide();
}
}
};
onMouseDown_game = function () {
pL_mouseDown = true;
pL_weaponFireSnd = new Sound();
if ((pL_weaponsArr[pL_currWeaponNo].ammo > 0) || (pL_weaponsArr[pL_currWeaponNo].ammo == "inf")) {
pL_weaponFireSnd.attachSound(pL_weaponType + "_fire");
}
switch (pL_weaponType) {
case "pistol" :
return;
case "blasterGun" :
return;
case "uzi" :
case "machineGun" :
case "miniGun" :
pL_weaponFireSnd.start(0, 1000);
return;
case "laser" :
return;
case "rocketLauncher" :
return;
case "grenade" :
case "flameThrower" :
return;
}
};
onMouseUp_game = function () {
pL_mouseDown = false;
if (pL_weaponType == "grenade") {
if (pL_grenadeThrowVelocity > 0) {
createProjectile(pL_weaponType);
pL_weaponsArr[pL_currWeaponNo].currReloadFr = pL_weaponsArr[pL_currWeaponNo].reloadFr;
statusWindowMC.txtAmmo = --pL_weaponsArr[pL_currWeaponNo].ammo;
statusWindowMC.txtGrenadeThrow = (pL_grenadeThrowVelocity = 0);
}
}
switch (pL_weaponType) {
case "pistol" :
return;
case "blasterGun" :
return;
case "uzi" :
case "machineGun" :
case "miniGun" :
pL_weaponSoundStop();
return;
}
};
Frame 119
stop();
Symbol 20 MovieClip [flameThrower] Frame 23
this.removeMovieClip();
Symbol 24 MovieClip Frame 1
_rotation = (360 * Math.random());
Symbol 24 MovieClip Frame 10
stop();
Symbol 25 MovieClip [rocketLauncher] Frame 1
stop();
Symbol 25 MovieClip [rocketLauncher] Frame 11
this.removeMovieClip();
Symbol 26 MovieClip [grenade] Frame 1
stop();
Symbol 26 MovieClip [grenade] Frame 7
this.removeMovieClip();
Symbol 29 MovieClip [bloodsplatter1] Frame 1
Symbol 29 MovieClip [bloodsplatter1] Frame 6
this.removeMovieCLip();
Symbol 33 MovieClip [ricochet2] Frame 4
this.removeMovieCLip();
Symbol 36 MovieClip Frame 1
noOfRic = 3;
ricNo = 2 + int(noOfRic * Math.random());
gotoAndStop(ricNo);
Symbol 37 MovieClip [ricochet1] Frame 4
this.removeMovieCLip();
Symbol 40 MovieClip [explosion1] Frame 5
this.removeMovieCLip();
Symbol 48 MovieClip [debry1] Frame 1
this.gotoAndStop(1 + int(3 * Math.random()));
stop();
Symbol 48 MovieClip [debry1] Frame 10
this.removeMovieClip();
Symbol 51 MovieClip [whiteSmoke] Frame 8
this.removeMovieClip();
Symbol 55 Button
on (release) {
trace(txtMissionNo.text);
trace(buttonMC.txtMissionNo.text);
_root.g_levelNo = buttonNo;
_root.showCutScenes();
}
Symbol 59 Button [missionButton]
on (release) {
_root.levelNo = idNo;
_root.g.practiceMode = true;
trace((_parent.idNo + " : ") + idNo);
_root.levelInit();
_parent.gotoAndStop("game_start");
_parent.removePracticeLevelButtons();
}
Symbol 79 MovieClip Frame 1
stop();
Symbol 81 MovieClip [missionButton] Frame 1
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 3
gotoAndStop (1);
Symbol 95 MovieClip Frame 5
gotoAndStop (1);
Symbol 95 MovieClip Frame 7
gotoAndStop (1);
Symbol 95 MovieClip Frame 9
gotoAndStop (1);
Symbol 95 MovieClip Frame 11
gotoAndStop (1);
Symbol 95 MovieClip Frame 13
gotoAndStop (1);
Symbol 95 MovieClip Frame 16
gotoAndStop (1);
Symbol 95 MovieClip Frame 18
gotoAndStop (1);
Symbol 95 MovieClip Frame 20
gotoAndStop (1);
Symbol 97 MovieClip Frame 1
stop();
Symbol 102 MovieClip [walker1] Frame 1
stop();
Symbol 102 MovieClip [walker1] Frame 14
this.removeMovieClip();
Symbol 117 MovieClip Frame 9
stop();
Symbol 118 MovieClip [flying3] Frame 1
trace("ATTACHED FLIER ==========");
stop();
Symbol 118 MovieClip [flying3] Frame 15
this.removeMovieClip();
Symbol 121 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 128 MovieClip [flying2] Frame 1
trace("ATTACHED FLIER ==========");
stop();
Symbol 128 MovieClip [flying2] Frame 15
this.removeMovieClip();
Symbol 132 MovieClip [flying1] Frame 1
trace("ATTACHED FLIER ==========");
stop();
Symbol 132 MovieClip [flying1] Frame 15
this.removeMovieClip();
Symbol 138 MovieClip [turret1] Frame 1
stop();
Symbol 138 MovieClip [turret1] Frame 13
this.removeMovieClip();
Symbol 144 MovieClip [stationary3] Frame 1
stop();
Symbol 144 MovieClip [stationary3] Frame 11
this.removeMovieClip();
Symbol 150 MovieClip [stationary2] Frame 1
stop();
Symbol 150 MovieClip [stationary2] Frame 15
this.removeMovieClip();
Symbol 153 MovieClip [stationary1] Frame 1
stop();
Symbol 153 MovieClip [stationary1] Frame 15
this.removeMovieClip();
Symbol 165 Button
on (release) {
_root.play();
}
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
Symbol 180 Button
on (release) {
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Symbol 181 Button
on (release) {
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Symbol 200 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 9
stop();
Symbol 242 MovieClip Frame 1
stop();
Instance of Symbol 195 MovieClip "hitAreaMC" in Symbol 242 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 247 MovieClip Frame 1
Symbol 248 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 283 Button
on (release) {
g_levelNo = txt_levelNo;
game_over("missionComplete");
}
Symbol 285 Button
on (release) {
g_levelNo = (txt_levelNo = 0);
}
Symbol 286 Button
on (release) {
g_levelNo = txt_levelNo++;
}
Symbol 287 Button
on (release) {
g_levelNo = txt_levelNo--;
}
Symbol 301 MovieClip Frame 1
stop();
Symbol 303 Button
on (release) {
gotoAndStop (3);
}
Symbol 306 Button
on (release) {
gotoAndStop (6);
_root.displayKeyAssignments();
}
Symbol 316 Button
on (release) {
gotoAndStop (7);
}
Symbol 320 Button
on (release) {
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Symbol 323 Button
on (release) {
trace("player level code: " + _root.pL_levelCode);
_root.checkLevelCode(txtLevelCode);
}
Symbol 329 MovieClip Frame 1
_x = 0;
_y = 0;
Symbol 333 Button
on (release) {
gotoAndStop (1);
}
Symbol 341 MovieClip Frame 1
Symbol 346 Button
on (release) {
_root.continueDialogue();
}
Symbol 351 Button
on (release) {
_root.game_start();
}
Symbol 365 MovieClip Frame 22
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 2
stop();
Symbol 404 Button
on (release) {
_root.game_start();
}
Symbol 405 MovieClip Frame 1
Mouse.show();
_quality = "HIGH";
stop();
Symbol 405 MovieClip Frame 3
_root.checkLevelCode(_root.pL_levelCode);
Instance of Symbol 390 MovieClip "key_pLMoveLeft" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "key_pLMoveRight" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "key_pLMoveUp" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "keyQualityToggle" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "keyMusicOnOff" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "keyPauseGame" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "key_pLNextWeapon" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 390 MovieClip "key_pLPrevWeapon" in Symbol 405 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}