Frame 4
txtURL = _root._url;
Instance of Symbol 97 MovieClip "mcLoader" in Frame 4
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
i = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
txtPercentLoaded = i;
if (i >= 100) {
this.gotoAndStop(2);
}
}
Frame 6
function setDefaultKeys() {
trace("setting default keys");
keyQualityToggle = 81;
keyMusicOnOff = 77;
keyPauseGame = 80;
keyQuitGame = 87;
keyScopeZoomClose = 65;
keyScopeZoomMed = 83;
keyScopeZoomFar = 68;
keyScopeSizeSmall = 90;
keyScopeSizeMed = 88;
keyScopeSizeLarge = 67;
keyScopeShapeCircle = 86;
keyScopeShapeSquare = 66;
keyScopeShapeDiamond = 78;
arrMissionComplete = [];
arrMissionComplete[1] = [1, 1, 1];
arrMissionComplete[2] = [1, 1, 1];
arrMissionComplete[3] = [1, 1, 1];
arrMissionComplete[4] = [3, 3, 3];
arrMissionComplete[5] = [3, 3, 3];
arrMissionComplete[101] = [1, 1, 1];
arrMissionComplete[102] = [1, 1, 1];
arrMissionComplete[103] = [1, 1, 1];
arrMissionComplete[104] = [3, 3, 3];
arrMissionComplete[105] = [3, 3, 3];
i = 1;
while (i <= 5) {
trace((arrMissionComplete[i][1] + " ") + i);
i++;
}
}
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] = "'";
}
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);
}
}
Sin = Math.sin;
Cos = Math.cos;
Abs = Math.abs;
Rand = Math.random;
KeyIsDown = Key.isDown;
PIper180 = (Math.PI/180);
GetTimer = getTimer;
KeyGetCode = Key.getCode;
function startGame(curr_game_difficulty) {
trace("curr_game_difficulty " + curr_game_difficulty);
game_difficulty = curr_game_difficulty;
game_quality = "HIGH";
g_stat = "play";
currMission = "mission_" + level_no;
setScopeShapeSize(scopeShapeSize);
_root.gotoAndStop(currMission);
trace(currMission);
bgndMC.gotoAndStop(currMission);
scopeMC.bgndMC.gotoAndStop(currMission);
statusWindowMC.gotoAndStop("game_start");
currOnEnterFrame = eval ("onEnterFrame" + level_no);
onEnterFrame = eval ("onEnterFrame" + level_no);
onMouseDown = eval ("onMouseDown" + level_no);
level_time = x;
noOfShotsFired = 0;
noOfSuccessfulShots = 0;
missionMessageMC._visible = false;
screenBufferDistance = 0;
startDrag ("/scopeMC", true, screenBufferDistance, screenBufferDistance, sw - screenBufferDistance, sh - screenBufferDistance);
varScopeZoomClose = 2;
varScopeZoomMed = 3;
varScopeZoomFar = 4;
varScopeZoom = varScopeZoomMed;
scopeMC.bgndMC._xscale = (scopeMC.bgndMC._yscale = varScopeZoom * 100);
changeScopeView("shape", varScopeShape);
changeScopeView("size", varScopeSize);
rocketFireFrInterval = 5 * FPS;
nextRocketFireFr = 3 * FPS;
pLhealth = 100;
damagePlayer(0);
switch (level_no) {
case 1 :
noOfRocketBGs = 1;
arrBGrocket = [];
rocketArr = [];
rocket_distance = 90;
noOfFrToTravel = 6 * FPS;
vanSpeed = 1;
vanScreenLimit_xMin = 50;
vanScreenLimit_xMax = sw - 50;
switch (game_difficulty) {
case "easy" :
allowedTime = 140;
noOfRocketsToFire = 10;
break;
case "med" :
allowedTime = 100;
noOfFrToTravel = noOfFrToTravel * (1 / 1.1);
noOfRocketsToFire = 10;
break;
case "hard" :
allowedTime = 80;
noOfFrToTravel = noOfFrToTravel * (1 / 1.2);
noOfRocketsToFire = 10;
break;
default :
trace("no case tested true");
}
trace("allowedTime " + allowedTime);
txt_noOfRocketsToFire = noOfRocketsToFire;
break;
case 2 :
arrBGrocket = [];
noOfRocketBGs = 8;
txt_noOfRocketsToFire = noOfRocketBGs;
rocketArr = [];
rocket_distance = 90;
noOfFrToTravel = 6 * FPS;
switch (game_difficulty) {
case "easy" :
allowedTime = 160;
break;
case "med" :
allowedTime = 130;
noOfFrToTravel = noOfFrToTravel * (1 / 1.1);
break;
case "hard" :
allowedTime = 80;
noOfFrToTravel = noOfFrToTravel * (1 / 1.2);
break;
default :
trace("no case tested true");
}
break;
case 3 :
arrBGrocket = [];
noOfRocketBGs = 10;
txt_noOfRocketsToFire = noOfRocketBGs;
rocketArr = [];
rocket_distance = 90;
noOfFrToTravel = 6 * FPS;
switch (game_difficulty) {
case "easy" :
allowedTime = 160;
break;
case "med" :
allowedTime = 130;
noOfFrToTravel = noOfFrToTravel * (1 / 1.1);
break;
case "hard" :
allowedTime = 100;
noOfFrToTravel = noOfFrToTravel * (1 / 1.2);
break;
default :
trace("no case tested true");
}
break;
case 4 :
rocketArr = [];
rocket_distance = 90;
noOfFrToTravel = 6 * FPS;
bgRocketHealth = 100;
bgRocketHealthBarMC.bar._yscale = 100;
switch (game_difficulty) {
case "easy" :
allowedTime = 120;
break;
case "med" :
allowedTime = 90;
noOfFrToTravel = noOfFrToTravel * (1 / 1.1);
break;
case "hard" :
allowedTime = 60;
noOfFrToTravel = noOfFrToTravel * (1 / 1.2);
break;
default :
trace("no case tested true");
}
break;
case 5 :
mainRotorDamage = 0;
tailRotorDamage = 0;
mainRotorDamageMC.bar._yscale = 100;
tailRotorDamageMC.bar._yscale = 100;
rocketArr = [];
rocket_distance = 90;
switch (game_difficulty) {
case "easy" :
allowedTime = 120;
break;
case "med" :
allowedTime = 90;
noOfFrToTravel = noOfFrToTravel * (1 / 1.5);
break;
case "hard" :
allowedTime = 60;
noOfFrToTravel = noOfFrToTravel * (1 / 2);
break;
default :
trace("no case tested true");
}
break;
case 101 :
noOfTargets = 10;
switch (game_difficulty) {
case "easy" :
allowedTime = 40;
allowedAccuracy = 20;
break;
case "med" :
allowedTime = 25;
allowedAccuracy = 50;
break;
case "hard" :
allowedTime = 12;
allowedAccuracy = 100;
break;
default :
trace("no case tested true");
}
break;
case 102 :
noOfTargets = 10;
switch (game_difficulty) {
case "easy" :
allowedTime = 40;
allowedAccuracy = 20;
break;
case "med" :
allowedTime = 25;
allowedAccuracy = 50;
break;
case "hard" :
allowedTime = 13;
allowedAccuracy = 100;
break;
default :
trace("no case tested true");
}
break;
case 103 :
noOfTargets = 8;
switch (game_difficulty) {
case "easy" :
allowedTime = 50;
allowedAccuracy = 20;
break;
case "med" :
allowedTime = 30;
allowedAccuracy = 50;
break;
case "hard" :
allowedTime = 14;
allowedAccuracy = 100;
break;
default :
trace("no case tested true");
}
break;
case 104 :
noOfTargets = 8;
allowedTime = 40;
switch (game_difficulty) {
case "easy" :
allowedTime = 40;
allowedAccuracy = 20;
break;
case "med" :
allowedTime = 25;
allowedAccuracy = 50;
break;
case "hard" :
allowedTime = 15;
allowedAccuracy = 100;
break;
default :
trace("no case tested true");
}
break;
case 105 :
noOfTargets = 10;
targetArr = [];
allowedTime = 40;
switch (game_difficulty) {
case "easy" :
allowedTime = 140;
allowedAccuracy = 20;
break;
case "med" :
allowedTime = 90;
allowedAccuracy = 50;
break;
case "hard" :
allowedTime = 60;
allowedAccuracy = 100;
break;
default :
trace("no case tested true");
}
break;
default :
trace("no case tested true");
}
level_start_time = getTimer();
txt_noOnRocketsToFire = noOnRocketsToFire;
startHeliSound();
trace("Mouse.hide();");
Mouse.hide();
}
function gameOver(currReason) {
trace("gameOver: " + currReason);
level_finish_time = getTimer();
displayStatValues();
statusWindowMC.missionMessageMC.gotoAndStop("failure");
if (currReason == "health") {
currExplanation = "You were killed";
} else if (currReason == "time") {
currExplanation = "Out of time";
} else if (currReason == "accuracy") {
currExplanation = "Insufficient accuracy";
} else if (currReason == "user quit") {
statusWindowMC.gotoAndStop("main_menu");
}
statusWindowMC.txtMissionFailureExplanation = currExplanation;
stopHeliSound();
}
function level_complete() {
trace("level - complete");
_quality = "HIGH";
gotoAndStop (7);
displayStatValues();
if (level_no == 5) {
statusWindowMC.missionMessageMC.gotoAndStop("congrat");
statusWindowMC.txtMissionFailureExplanation = "You completed all 5 missions";
} else {
statusWindowMC.missionMessageMC.gotoAndStop("success");
statusWindowMC.txtMissionFailureExplanation = "";
}
currMissionComplete = eval ("missionComplete_m" + level_no);
temp100s = int(currMissionComplete / 100);
temp10s = int((currMissionComplete - (temp100s * 100)) / 10);
temp1s = int((currMissionComplete - (temp100s * 100)) - (temp10s * 10));
trace(arrMissionComplete[level_no][0]);
switch (game_difficulty) {
case "easy" :
arrMissionComplete[level_no][0] = 2;
break;
case "med" :
arrMissionComplete[level_no][1] = 2;
break;
case "hard" :
arrMissionComplete[level_no][2] = 2;
break;
}
trace(arrMissionComplete[level_no][0]);
checkUnlockMissions();
removeOnScreenObjects();
stopHeliSound();
}
function checkUnlockMissions() {
noOfCompleteMissions_easy = 0;
noOfCompleteMissions_med = 0;
noOfCompleteMissions_hard = 0;
i = 1;
while (i <= 5) {
if (arrMissionComplete[i][0] == 2) {
noOfCompleteMissions_easy++;
}
if (arrMissionComplete[i][1] == 2) {
noOfCompleteMissions_med++;
}
if (arrMissionComplete[i][2] == 2) {
noOfCompleteMissions_hard++;
}
trace((((((((i + " ") + arrMissionComplete[i][0]) + " ") + noOfCompleteMissions_easy) + " ") + noOfCompleteMissions_med) + " ") + noOfCompleteMissions_hard);
if (i >= 4) {
if ((noOfCompleteMissions_easy + 1) == i) {
arrMissionComplete[i][0] = 1;
}
if ((noOfCompleteMissions_med + 1) == i) {
arrMissionComplete[i][1] = 1;
}
if ((noOfCompleteMissions_hard + 1) == i) {
arrMissionComplete[i][2] = 1;
}
}
i++;
}
noOfCompleteMissions_easy = 0;
noOfCompleteMissions_med = 0;
noOfCompleteMissions_hard = 0;
i = 1;
while (i <= 5) {
if (arrMissionComplete[100 + i][0] == 2) {
noOfCompleteMissions_easy++;
}
if (arrMissionComplete[100 + i][1] == 2) {
noOfCompleteMissions_med++;
}
if (arrMissionComplete[100 + i][2] == 2) {
noOfCompleteMissions_hard++;
}
trace((((((((i + " ") + arrMissionComplete[100 + i][0]) + " ") + noOfCompleteMissions_easy) + " ") + noOfCompleteMissions_med) + " ") + noOfCompleteMissions_hard);
if (i >= 4) {
if ((noOfCompleteMissions_easy + 1) == i) {
arrMissionComplete[100 + i][0] = 1;
}
if ((noOfCompleteMissions_med + 1) == i) {
arrMissionComplete[100 + i][1] = 1;
}
if ((noOfCompleteMissions_hard + 1) == i) {
arrMissionComplete[100 + i][2] = 1;
}
}
i++;
}
}
function displayStatValues() {
trace("displayStatValues");
g_stat = "over";
stopDrag();
bgndMC.gotoAndStop(1);
scopeMC.bgndMC.gotoAndStop(1);
with (statusWindowMC) {
_visible = true;
gotoAndStop("stat_screen");
txtShotsFired = noOfShotsFired;
txtAccuracy = int((100 * noOfSuccessfulShots) / noOfShotsFired);
level_time = int((level_finish_time - level_start_time) / 100) / 10;
txtTime = level_time;
txtHealth = pLhealth;
noOfShotsFired_total = noOfShotsFired_total + noOfShotsFired;
noOfSuccessfulShots_total = noOfSuccessfulShots_total + noOfSuccessfulShots;
level_time_total = level_time_total + level_time;
txtShotsFired_total = noOfShotsFired_total;
txtAccuracy_total = int((100 * noOfSuccessfulShots_total) / noOfShotsFired_total);
txtTime_total = level_time_total;
}
delete onEnterFrame;
delete onMouseDown;
}
function next_level() {
if (_root.level_no == 105) {
_root.level_no == 1;
level_init(_root.level_no);
} else if (_root.level_no == 5) {
_root.level_no++;
_root.game_init();
} else {
_root.level_no++;
level_init(_root.level_no);
}
trace("_root.level_no: " + _root.level_no);
}
function updateTimer() {
if (levelCompleteCounter <= 0) {
currTime = getTimer() - level_start_time;
currTimeSeconds = allowedTime - int(currTime / 1000);
currMinutes = int(currTimeSeconds / 60);
currTenSeconds = int((currTimeSeconds - (currMinutes * 60)) / 10);
currSeconds = int((currTimeSeconds - (currMinutes * 60)) - (currTenSeconds * 10));
displayDigit(time_1m_MC, currMinutes);
displayDigit(time_10s_MC, currTenSeconds);
displayDigit(time_1s_MC, currSeconds);
if (currTimeSeconds < 0) {
gameOver("time");
trace("time is UP !!!! ");
}
}
}
function displayDigit(numericDigit, value) {
if (value == 0) {
numericDigit.gotoAndStop(10);
} else {
numericDigit.gotoAndStop(value);
}
}
function changeScopeBgndScale() {
mcSniperView._xscale = varScopeSize;
mcSniperView._yscale = varScopeSize;
mcSniperView.bigpic._xscale = (100 * varZoomScale) / (varScopeSize / 100);
mcSniperView.bigpic._yscale = mcSniperView.bigpic._xscale;
}
function damagePlayer(damage) {
pLhealth = pLhealth - damage;
if (pLhealth <= 0) {
gameOver("health");
} else {
txt_pLhealth = pLhealth;
pLhealthMC.bar._yscale = pLhealth;
}
}
function moveScope() {
if (game_difficulty == "med") {
bgndMC._y = (Amplitude / 2) * Sin((heliUpDownSpeed * frameNo) * PIper180);
}
if (game_difficulty == "hard") {
bgndMC._y = Amplitude * Sin(((heliUpDownSpeed * frameNo) * 1.5) * PIper180);
bgndMC._x = (Amplitude / 2) * Cos((heliUpDownSpeed * frameNo) * PIper180);
}
scopeMC.bgndMC._x = ((-scopeMC._x) + bgndMC._x) * varScopeZoom;
scopeMC.bgndMC._y = ((-scopeMC._y) + bgndMC._y) * varScopeZoom;
}
function changeScopeView(currType, currValue) {
if (currType == "shape") {
varScopeShape = currValue;
} else if (currType == "size") {
varScopeSize = currValue;
} else if (currType == "zoom") {
if (currValue == "close") {
varScopeZoom = varScopeZoomClose;
} else if (currValue == "med") {
varScopeZoom = varScopeZoomMed;
} else if (currValue == "far") {
varScopeZoom = varScopeZoomFar;
}
}
scopeMC.mcScopeShape.gotoAndStop((varScopeShape + "_") + varScopeSize);
scopeMC.mcScopeOutline.gotoAndStop((varScopeShape + "_") + varScopeSize);
scopeMC.bgndMC.gotoAndStop("mission_" + level_no);
scopeMC.bgndMC._xscale = (scopeMC.bgndMC._yscale = varScopeZoom * 100);
}
function createRocket(type, x, y) {
noOfRocketsFired++;
bgndMC.attachMovie("rocketMC", "rocketMC" + noOfRocketsFired, rocketLayer - noOfRocketsFired);
scopeMC.bgndMC.attachMovie("rocketMC", "rocketMC" + noOfRocketsFired, rocketLayer - noOfRocketsFired);
rocketID = "rocketMC" + noOfRocketsFired;
rocketMC_scope = eval ("scopeMC.bgndMC." + rocketID);
rocketMC_bgnd = eval ("bgndMC." + rocketID);
rocketMC_bgnd._x = (rocketMC_scope._x = x);
rocketMC_bgnd._y = (rocketMC_scope._y = y);
rocketMC_bgnd._xscale = (rocketMC_bgnd._yscale = (rocketMC_scope._xscale = (rocketMC_scope._yscale = 100 - rocket_distance)));
xDist = (sw / 4) * Rand();
randomNo = Rand();
if (randomNo > 0.5) {
xDist = (sw - xDist) - x;
} else {
xDist = xDist - x;
}
yDist = (sh / 4) * Rand();
randomNo = Rand();
if (randomNo > 0.5) {
yDist = yDist - y;
} else {
yDist = (sh - yDist) - y;
}
xSpeed = xDist / noOfFrToTravel;
ySpeed = yDist / noOfFrToTravel;
zSpeed = rocket_distance / noOfFrToTravel;
zSpeed = Math.pow(100 / (100 - rocket_distance), 1 / noOfFrToTravel);
rocketArr.push(new RocketObj(rocketID, type, x, y, xSpeed, ySpeed, zSpeed, noOfFrToTravel));
}
function RocketObj(rocketID, type, x, y, xSpeed, ySpeed, zSpeed, noOfFrToTravel) {
this.rocketID = rocketID;
this.type = type;
this.x = x;
this.y = y;
this.xSpeed = xSpeed;
this.ySpeed = ySpeed;
this.zSpeed = zSpeed;
this.noOfFrToTravel = noOfFrToTravel;
}
function moveRockets() {
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
if ((currRocket.noOfFrToTravel--) <= 0) {
removeRocket(rocketNo);
damagePlayer(rocketDamageToPlayer);
} else {
rocketMC = currRocket.rocketID;
rocketMC_scope = eval ("scopeMC.bgndMC." + rocketMC);
rocketMC_bgnd = eval ("bgndMC." + rocketMC);
rocketMC_scope._x = (rocketMC_bgnd._x = rocketMC_bgnd._x + currRocket.xSpeed);
rocketMC_scope._y = (rocketMC_bgnd._y = rocketMC_bgnd._y + currRocket.ySpeed);
xScale = 50 + (50 / currRocket.noOfFrToTravel);
rocketMC_bgnd._xscale = (rocketMC_bgnd._yscale = rocketMC_bgnd._yscale * currRocket.zSpeed);
rocketMC_scope._xscale = (rocketMC_scope._yscale = rocketMC_scope._yscale * currRocket.zSpeed);
}
}
}
function removeRocket(rocketNo) {
currRocket = rocketArr[rocketNo];
rocketMC = currRocket.rocketID;
rocketMC_scope = eval ("scopeMC.bgndMC." + rocketMC);
rocketMC_bgnd = eval ("bgndMC." + rocketMC);
rocketMC_scope.play();
rocketMC_bgnd.play();
rocketArr.splice(rocketNo, 1);
}
function createSmoke(type, x, y, scale) {
if ((noOfSmoke++) > 100) {
noOfSmoke = 1;
}
bgndMC.attachMovie("smokeMC", "smokeMC" + noOfSmoke, smokeLayer + noOfSmoke);
scopeMC.bgndMC.attachMovie("smokeMC", "smokeMC" + noOfSmoke, smokeLayer + noOfRocketsFired);
smokeID = "smokeMC" + noOfSmoke;
smokeMC_scope = eval ("scopeMC.bgndMC." + smokeID);
smokeMC_bgnd = eval ("bgndMC." + smokeID);
smokeMC_bgnd._x = (smokeMC_scope._x = x);
smokeMC_bgnd._y = (smokeMC_scope._y = y);
smokeMC_bgnd._xscale = (smokeMC_bgnd._yscale = (rocketMC_scope._xscale = (smokeMC_scope._yscale = scale)));
}
function removeOnScreenObjects() {
if (rocketArr.length > 0) {
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
rocketMC = currRocket.rocketID;
rocketMC_scope = eval ("scopeMC.bgndMC." + rocketMC);
rocketMC_bgnd = eval ("bgndMC." + rocketMC);
rocketMC_scope.removeMovieClip();
rocketMC_bgnd.removeMovieClip();
rocketArr.splice(rocketNo, 1);
}
}
}
function startLevelCompleteCountdown() {
levelCompleteCounter = 2 * FPS;
missionMessageMC._visible = true;
nextRocketFireFr = 1000;
level_finish_time = getTimer();
}
function waitAfterLevelComplete() {
if (levelCompleteCounter > 0) {
levelCompleteCounter--;
trace("almost level complete " + levelCompleteCounter);
if (levelCompleteCounter == 0) {
level_complete();
}
nextRocketFireFr = 10;
}
}
function startHeliSound() {
sndHeli = new Sound();
sndHeli.attachSound("Heli Sound");
sndHeli.start(0, 1000);
}
function stopHeliSound() {
sndHeli.stop();
}
varScopeShape = "circle";
varScopeSize = "med";
function game_init() {
FPS = 12;
sw = 540;
sh = 340;
total_score = 0;
rocketLayer = 10000;
smokeLayer = 500;
Amplitude = 20;
heliUpDownSpeed = 8;
noOfShotsFired = 0;
noOfSuccessfulShots = 0;
noOfShotsFired_total = 0;
noOfSuccessfulShots_total = 0;
rocketDamageToPlayer = 17;
statusWindowMC.gotoAndStop("level_select");
displayMissionCompleteMCs();
}
function displayMissionCompleteMCs() {
i = 1;
while (i <= 5) {
currMission = ("statusWindowMC.m" + i) + "_MC";
eval (currMission + ".easyMC").gotoAndStop(arrMissionComplete[i][0]);
eval (currMission + ".medMC").gotoAndStop(arrMissionComplete[i][1]);
eval (currMission + ".hardMC").gotoAndStop(arrMissionComplete[i][2]);
i++;
}
i = 1;
while (i <= 5) {
currMission = ("statusWindowMC.m10" + i) + "_MC";
eval (currMission + ".easyMC").gotoAndStop(arrMissionComplete[100 + i][0]);
eval (currMission + ".medMC").gotoAndStop(arrMissionComplete[100 + i][1]);
eval (currMission + ".hardMC").gotoAndStop(arrMissionComplete[100 + i][2]);
i++;
}
}
function level_init(level_no) {
_root.level_no = level_no;
statusWindowMC.gotoAndStop("level_mission");
currMissionComplete = eval ("missionComplete_m" + level_no);
currMissionButton = "statusWindowMC.textMC";
eval (currMissionButton + "_easy").gotoAndStop(arrMissionComplete[level_no][0]);
eval (currMissionButton + "_easy.textMC").gotoAndStop("easy");
eval (currMissionButton + "_med").gotoAndStop(arrMissionComplete[level_no][1]);
eval (currMissionButton + "_med.textMC").gotoAndStop("med");
eval (currMissionButton + "_hard").gotoAndStop(arrMissionComplete[level_no][2]);
eval (currMissionButton + "_hard.textMC").gotoAndStop("hard");
if (level_no >= 100) {
briefing_level_no = (level_no - 100) + 6;
} else {
briefing_level_no = level_no;
}
statusWindowMC.levelBriefingMC.gotoAndStop(briefing_level_no);
_quality = game_quality;
removeOnScreenObjects();
}
if (firstTimeToLoad == undefined) {
setDefaultKeys();
firstTimeToLoad = false;
}
_root.createEmptyMovieClip("_keyListener", 1);
Key.addListener(_keyListener);
_keyListener.onKeyDown = function () {
currKey = KeyGetCode();
if (g_stat == "play") {
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);
} else if (currKey == keyMusicOnOff) {
} else if (currKey == keyPauseGame) {
tempOnEnterFrame = onEnterFrame;
tempOnMouseDown = onMouseDown;
g_stat = "paused";
Mouse.show();
statusWindowMC.gotoAndStop("pause");
pause_start_time = getTimer();
delete onEnterFrame;
delete onMouseDown;
} else if (currKey == keyQuitGame) {
removeOnScreenObjects();
statusWindowMC.gotoAndStop("game_start");
delete onEnterFrame;
delete onMouseDown;
gameOver("user quit");
} else if (currKey == keyScopeZoomClose) {
changeScopeView("zoom", "close");
} else if (currKey == keyScopeZoomMed) {
changeScopeView("zoom", "med");
} else if (currKey == keyScopeZoomFar) {
changeScopeView("zoom", "far");
} else if (currKey == keyScopeSizeSmall) {
changeScopeView("size", "small");
} else if (currKey == keyScopeSizeMed) {
changeScopeView("size", "med");
} else if (currKey == keyScopeSizeLarge) {
changeScopeView("size", "large");
} else if (currKey == keyScopeShapeCircle) {
changeScopeView("shape", "circle");
} else if (currKey == keyScopeShapeSquare) {
changeScopeView("shape", "square");
} else if (currKey == keyScopeShapeDiamond) {
changeScopeView("shape", "diamond");
}
} else if (g_stat == "paused") {
if (currKey == keyPauseGame) {
onEnterFrame = tempOnEnterFrame;
onMouseDown = tempOnMouseDown;
g_stat = "play";
statusWindowMC.gotoAndStop("game_start");
level_start_time = level_start_time + (getTimer() - pause_start_time);
Mouse.hide();
}
}
};
Frame 8
function onEnterFrame1() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
if (((nextRocketFireFr--) <= 0) && (noOfRocketsToFire > 0)) {
bgRocketMC = "vanMC.bgRocket_" + (int(noOfRocketBGs * Rand()) + 1);
bgRocketMC_scope = eval ("scopeMC.bgndMC." + bgRocketMC);
bgRocketMC_bgnd = eval ("bgndMC." + bgRocketMC);
bgRocketMC_scope.gotoAndPlay("fires_rocket");
bgRocketMC_bgnd.gotoAndPlay("fires_rocket");
nextRocketFireFr = rocketFireFrInterval * (1 + (Rand() / 4));
}
if (rocketArr.length > 0) {
moveRockets();
}
if (bgndMC.vanMC._x < vanScreenLimit_xMin) {
vanSpeed = Abs(vanSpeed);
} else if (bgndMC.vanMC._x > vanScreenLimit_xMax) {
vanSpeed = -Abs(vanSpeed);
} else {
randomNo = Rand();
if (randomNo < 0.01) {
vanSpeed = vanSpeed * -1;
}
}
scopeMC.bgndMC.vanMC._x = (bgndMC.vanMC._x = bgndMC.vanMC._x + vanSpeed);
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown1() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
rocketMC_bgnd = eval (("bgndMC." + currRocket.rocketID) + ".hitArea");
if (rocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
noOfSuccessfulShots++;
removeRocket(rocketNo);
noOfRocketsToFire--;
txt_noOfRocketsToFire = noOfRocketsToFire;
if (noOfRocketsToFire <= 0) {
startLevelCompleteCountdown();
}
}
}
}
}
trace("onEnterFrame1()");
Frame 9
function onEnterFrame2() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
if ((nextRocketFireFr--) <= 0) {
newBGcreated = false;
while (!newBGcreated) {
currBGno = int(noOfRocketBGs * Rand()) + 1;
if (arrBGrocket[currBGno] != true) {
bgCoverMC = "bgCoverMC_" + currBGno;
newBGcreated = true;
}
}
bgCoverMC_scope = eval ("scopeMC.bgndMC." + bgCoverMC);
bgCoverMC_bgnd = eval ("bgndMC." + bgCoverMC);
bgCoverMC_scope.gotoAndStop(2);
bgCoverMC_bgnd.gotoAndStop(2);
bgRocketMC_scope = eval (("scopeMC.bgndMC." + bgCoverMC) + ".bgRocketMC");
bgRocketMC_bgnd = eval (("bgndMC." + bgCoverMC) + ".bgRocketMC");
bgRocketMC_scope.gotoAndPlay("appears");
bgRocketMC_bgnd.gotoAndPlay("appears");
nextRocketFireFr = rocketFireFrInterval * (1 + (Rand() / 4));
noOnRocketsToFire--;
txt_noOnRocketsToFire = noOnRocketsToFire;
}
if (rocketArr.length > 0) {
moveRockets();
}
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown2() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
hitSomething = false;
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
rocketMC_bgnd = eval (("bgndMC." + currRocket.rocketID) + ".hitArea");
if (rocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
noOfSuccessfulShots++;
removeRocket(rocketNo);
hitSomething = true;
}
}
rocketBGno = noOfRocketBGs + 1;
while ((rocketBGno--) > 0) {
if (!hitSomething) {
coverMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".coverMC");
if (coverMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
trace("hit cover: ");
hitSomething = true;
} else {
bgRocketMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
if (bgRocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
bgRocketHealthBarMC._yscale = bgRocketHealthBarMC._yscale * 0.9;
noOfSuccessfulShots++;
trace("hit bg: ");
bgRocketMC_scope = eval (("scopeMC.bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
bgRocketMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
bgRocketMC_scope.gotoAndPlay("dies");
bgRocketMC_bgnd.gotoAndPlay("dies");
arrBGrocket[rocketBGno] = true;
currKilledBG = 0;
i = 1;
while (i <= noOfRocketBGs) {
if (arrBGrocket[i] == true) {
currKilledBG++;
}
i++;
}
txt_noOfRocketsToFire = noOfRocketBGs - currKilledBG;
if (currKilledBG >= noOfRocketBGs) {
startLevelCompleteCountdown();
}
}
}
}
}
}
}
Frame 10
function onEnterFrame3() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
if ((nextRocketFireFr--) <= 0) {
newBGcreated = false;
while (!newBGcreated) {
currBGno = int(noOfRocketBGs * Rand()) + 1;
if (arrBGrocket[currBGno] != true) {
bgCoverMC = "bgCoverMC_" + currBGno;
newBGcreated = true;
}
}
bgCoverMC_scope = eval ("scopeMC.bgndMC." + bgCoverMC);
bgCoverMC_bgnd = eval ("bgndMC." + bgCoverMC);
bgCoverMC_scope.gotoAndStop(2);
bgCoverMC_bgnd.gotoAndStop(2);
bgRocketMC_scope = eval (("scopeMC.bgndMC." + bgCoverMC) + ".bgRocketMC");
bgRocketMC_bgnd = eval (("bgndMC." + bgCoverMC) + ".bgRocketMC");
bgRocketMC_scope.gotoAndPlay("appears");
bgRocketMC_bgnd.gotoAndPlay("appears");
nextRocketFireFr = rocketFireFrInterval * (1 + (Rand() / 4));
noOnRocketsToFire--;
txt_noOnRocketsToFire = noOnRocketsToFire;
}
if (rocketArr.length > 0) {
moveRockets();
}
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown3() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
hitSomething = false;
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
rocketMC_bgnd = eval (("bgndMC." + currRocket.rocketID) + ".hitArea");
if (rocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
noOfSuccessfulShots++;
removeRocket(rocketNo);
hitSomething = true;
}
}
if (!hitSomething) {
rocketBGno = noOfRocketBGs + 1;
while ((rocketBGno--) > 0) {
trace("rocketBGno " + rocketBGno);
coverMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".coverMC");
if (coverMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
trace("hit cover: ");
hitSomething = true;
} else {
bgRocketMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
if (bgRocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
bgRocketHealthBarMC._yscale = bgRocketHealthBarMC._yscale * 0.9;
noOfSuccessfulShots++;
trace("hit bg: ");
bgRocketMC_scope = eval (("scopeMC.bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
bgRocketMC_bgnd = eval (("bgndMC.bgCoverMC_" + rocketBGno) + ".bgRocketMC");
bgRocketMC_scope.gotoAndPlay("dies");
bgRocketMC_bgnd.gotoAndPlay("dies");
arrBGrocket[rocketBGno] = true;
currKilledBG = 0;
i = 1;
while (i <= noOfRocketBGs) {
trace(arrBGrocket[i]);
if (arrBGrocket[i] == true) {
currKilledBG++;
}
i++;
}
txt_noOfRocketsToFire = noOfRocketBGs - currKilledBG;
if (currKilledBG >= noOfRocketBGs) {
startLevelCompleteCountdown();
}
}
}
}
}
}
}
Frame 11
function onEnterFrame4() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
if ((nextRocketFireFr--) <= 0) {
bgRocketMC = "heliMC.bgRocket_1";
bgRocketMC_scope = eval ("scopeMC.bgndMC." + bgRocketMC);
bgRocketMC_bgnd = eval ("bgndMC." + bgRocketMC);
bgRocketMC_scope.gotoAndPlay("appears");
bgRocketMC_bgnd.gotoAndPlay("appears");
nextRocketFireFr = rocketFireFrInterval * (1 + (Rand() / 4));
noOnRocketsToFire--;
txt_noOnRocketsToFire = noOnRocketsToFire;
}
if (rocketArr.length > 0) {
moveRockets();
}
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown4() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
hitSomething = false;
rocketNo = rocketArr.length;
while ((rocketNo--) > 0) {
currRocket = rocketArr[rocketNo];
rocketMC_bgnd = eval (("bgndMC." + currRocket.rocketID) + ".hitArea");
if (rocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
noOfSuccessfulShots++;
removeRocket(rocketNo);
hitSomething = true;
}
}
if (!hitSomething) {
coverMC_bgnd = bgndMC.heliMC.coverMC;
if (coverMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
trace("hit cover: ");
hitSomething = true;
} else {
bgRocketMC_bgnd = bgndMC.heliMC.bgRocket_1;
if (bgRocketMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
bgRocketHealthBarMC.bar._yscale = (bgRocketHealth = bgRocketHealth - 21);
if (bgRocketHealthBarMC.bar._yscale < 0) {
bgRocketHealthBarMC.bar._yscale = 0;
}
bgRocketMC = "heliMC.bgRocket_1";
bgRocketMC_scope = eval ("scopeMC.bgndMC." + bgRocketMC);
bgRocketMC_bgnd = eval ("bgndMC." + bgRocketMC);
bgRocketMC_scope.gotoAndPlay("hides");
bgRocketMC_bgnd.gotoAndPlay("hides");
noOfSuccessfulShots++;
trace("hit bg: ");
if (bgRocketHealthBarMC.bar._yscale <= 0) {
startLevelCompleteCountdown();
bgRocketMC_scope.gotoAndPlay("dies");
bgRocketMC_bgnd.gotoAndPlay("dies");
}
}
}
}
}
}
Instance of Symbol 438 MovieClip "bgRocketHealthBarMC" in Frame 11
/* no clip actions */
Frame 12
function onEnterFrame5() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
heliMC_bgnd = bgndMC.heliMC;
heliMC_scope = scopeMC.bgndMC.heliMC;
heliMC_scope._x = (heliMC_bgnd._x = 250 + (40 * Math.sin((((mainRotorDamage / 4) + 1) * frameNo) / 10)));
heliMC_scope._y = (heliMC_bgnd._y = 180 + (20 * Math.sin((((mainRotorDamage / 4) + 1) * frameNo) / 14)));
heliMC_scope._rotation = (heliMC_bgnd._rotation = (2 * (tailRotorDamage + 1)) + (20 * Math.sin(((tailRotorDamage + 1) * frameNo) / 25)));
nextTailRotorSmoke--;
if ((tailRotorDamage > 0) && (nextTailRotorSmoke <= 0)) {
nextTailRotorSmoke = 5 - tailRotorDamage;
currRotorMC_bgnd = bgndMC.heliMC.tailRotorMC;
x = (heliMC_bgnd._x + (Cos(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._x)) - (Sin(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._y);
y = (heliMC_bgnd._y + (Sin(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._x)) + (Cos(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._y);
x = x + (20 * (0.5 - Rand()));
y = y + (15 * (0.5 - Rand()));
createSmoke(type, x, y, 100);
}
nextMainRotorSmoke--;
if ((mainRotorDamage > 0) && (nextMainRotorSmoke <= 0)) {
nextMainRotorSmoke = 5 - mainRotorDamage;
currRotorMC_bgnd = bgndMC.heliMC.mainRotorMC;
x = (heliMC_bgnd._x + (Cos(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._x)) - (Sin(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._y);
y = (heliMC_bgnd._y + (Sin(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._x)) + (Cos(heliMC_bgnd._rotation * PIper180) * currRotorMC_bgnd._y);
x = x + (20 * (0.5 - Rand()));
y = y + (10 * (0.5 - Rand()));
createSmoke(type, x, y, 100);
}
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown5() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
hitSomething = false;
tailRotorMC = bgndMC.heliMC.tailRotorMC;
if ((tailRotorDamageMC.bar._yscale > 0) && (tailRotorMC.hitTest(scopeMC._x, scopeMC._y, true))) {
trace("hit tailRotorMC: ");
tailRotorDamage++;
tailRotorExplosionMC = "heliMC.tailRotorExplosionMC";
tailRotorExplosionMC_bgnd = eval ("bgndMC." + tailRotorExplosionMC);
tailRotorExplosionMC_scope = eval ("scopeMC.bgndMC." + tailRotorExplosionMC);
tailRotorExplosionMC_bgnd.gotoAndPlay(2);
tailRotorExplosionMC_scope.gotoAndPlay(2);
tailRotorFireMC = "heliMC.tailRotorFireMC";
tailRotorFireMC_bgnd = eval ("bgndMC." + tailRotorFireMC);
tailRotorFireMC_scope = eval ("scopeMC.bgndMC." + tailRotorFireMC);
tailRotorFireMC_bgnd.gotoAndStop(tailRotorDamage + 1);
tailRotorFireMC_scope.gotoAndStop(tailRotorDamage + 1);
tailRotorDamageMC.bar._yscale = tailRotorDamageMC.bar._yscale - 26;
if (tailRotorDamageMC.bar._yscale < 0) {
tailRotorDamageMC.bar._yscale = 0;
}
} else {
mainRotorMC = bgndMC.heliMC.mainRotorMC;
if ((mainRotorDamageMC.bar._yscale > 0) && (mainRotorMC.hitTest(scopeMC._x, scopeMC._y, true))) {
trace("hit mainRotorMC: ");
mainRotorDamage++;
mainRotorExplosionMC = "heliMC.mainRotorExplosionMC";
mainRotorExplosionMC_bgnd = eval ("bgndMC." + mainRotorExplosionMC);
mainRotorExplosionMC_scope = eval ("scopeMC.bgndMC." + mainRotorExplosionMC);
mainRotorExplosionMC_bgnd.gotoAndPlay(2);
mainRotorExplosionMC_scope.gotoAndPlay(2);
mainRotorFireMC = "heliMC.mainRotorFireMC";
mainRotorFireMC_bgnd = eval ("bgndMC." + mainRotorFireMC);
mainRotorFireMC_scope = eval ("scopeMC.bgndMC." + mainRotorFireMC);
mainRotorFireMC_bgnd.gotoAndStop(mainRotorDamage + 1);
mainRotorFireMC_scope.gotoAndStop(mainRotorDamage + 1);
mainRotorDamageMC.bar._yscale = mainRotorDamageMC.bar._yscale - 26;
if (mainRotorDamageMC.bar._yscale < 0) {
mainRotorDamageMC.bar._yscale = 0;
}
}
}
if ((tailRotorDamageMC.bar._yscale == 0) && (mainRotorDamageMC.bar._yscale == 0)) {
startLevelCompleteCountdown();
}
}
}
Frame 14
function onEnterFrame101() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown101() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
targetNo = noOfTargets + 1;
while ((targetNo--) > 0) {
targetMC_bgnd = eval ("bgndMC.target_" + targetNo);
targetMC_scope = eval ("scopeMC.bgndMC.target_" + targetNo);
if (targetMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
targetMC_bgnd.gotoAndStop(2);
targetMC_scope.gotoAndStop(2);
if ((++noOfSuccessfulShots) >= noOfTargets) {
startLevelCompleteCountdown();
}
}
}
}
}
Frame 15
function onEnterFrame102() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown102() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
targetNo = noOfTargets + 1;
while ((targetNo--) > 0) {
targetMC_bgnd = eval ("bgndMC.target_" + targetNo);
targetMC_scope = eval ("scopeMC.bgndMC.target_" + targetNo);
if (targetMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
targetMC_bgnd.gotoAndStop(2);
targetMC_scope.gotoAndStop(2);
if ((++noOfSuccessfulShots) >= noOfTargets) {
startLevelCompleteCountdown();
}
}
}
}
}
Frame 16
function onEnterFrame103() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown103() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
targetNo = noOfTargets + 1;
while ((targetNo--) > 0) {
targetMC_bgnd = eval (("bgndMC.target_" + targetNo) + ".hitArea");
targetMC_scope = eval (("scopeMC.bgndMC.target_" + targetNo) + ".hitArea");
if (targetMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
targetMC_bgnd.gotoAndStop(2);
targetMC_scope.gotoAndStop(2);
if ((++noOfSuccessfulShots) >= noOfTargets) {
startLevelCompleteCountdown();
}
}
}
}
}
Frame 17
function onEnterFrame104() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown104() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
targetNo = noOfTargets + 1;
while ((targetNo--) > 0) {
targetMC_bgnd = eval (("bgndMC.target_" + targetNo) + ".hitArea");
targetMC_scope = eval (("scopeMC.bgndMC.target_" + targetNo) + ".hitArea");
if (targetMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
targetMC_bgnd.gotoAndStop(2);
targetMC_scope.gotoAndStop(2);
if ((++noOfSuccessfulShots) >= noOfTargets) {
startLevelCompleteCountdown();
}
}
}
}
}
Frame 18
stop();
function onEnterFrame105() {
if (g_stat == "play") {
frameNo++;
waitAfterLevelComplete();
updateTimer();
moveScope();
if ((nexTargetShowFr--) <= 0) {
selectedNextTarget = false;
while (!selectedNextTarget) {
targetNo = int(noOfTargets * Rand()) + 1;
if (!targetArr[targetNo]) {
selectedNextTarget = true;
}
}
targetMC_bgnd = eval ("bgndMC.target_" + targetNo);
targetMC_scope = eval ("scopeMC.bgndMC.target_" + targetNo);
targetMC_bgnd.play();
targetMC_scope.play();
nexTargetShowFr = FPS * (4 + (2 * Rand()));
trace((targetArr[targetNo] + " == ") + targetMC_bgnd);
}
} else if (g_stat == "paused") {
} else if (g_stat == "level_complete") {
delete onEnterFrame;
} else if (g_stat == "over") {
delete onEnterFrame;
}
}
function onMouseDown105() {
if (sniperGunStatus == "ready") {
sniperGunStatusMC.play();
noOfShotsFired++;
targetNo = noOfTargets + 1;
while ((targetNo--) > 0) {
targetMC_bgnd = eval (("bgndMC.target_" + targetNo) + ".hitArea");
targetMC_scope = eval (("scopeMC.bgndMC.target_" + targetNo) + ".hitArea");
if (targetMC_bgnd.hitTest(scopeMC._x, scopeMC._y, true)) {
targetMC_bgnd.gotoAndStop(2);
targetMC_scope.gotoAndStop(2);
targetArr[targetNo] = true;
if ((++noOfSuccessfulShots) >= noOfTargets) {
startLevelCompleteCountdown();
}
}
}
}
}
Symbol 14 MovieClip [rocketMC] Frame 1
stop();
Symbol 14 MovieClip [rocketMC] Frame 9
this.removeMovieClip();
Symbol 17 Button
on (release) {
_root.levelNo = idNo;
_root.g.practiceMode = true;
trace((_parent.idNo + " : ") + idNo);
_root.levelInit();
_parent.gotoAndStop("game_start");
_parent.removePracticeLevelButtons();
}
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 5
currTarget = this;
addUpCoords = true;
currTarget_x = this._x;
currTarget_y = this._y;
i = 6;
while (i > 0) {
currTarget = eval (currTarget + "._parent");
if ((currTarget._name != "bgndMC") && (addUpCoords)) {
currTarget_x = currTarget_x + currTarget._x;
currTarget_y = currTarget_y + currTarget._y;
addUpCoords = false;
trace((("currTarget: " + currTarget) + " -- x: ") + currTarget._x);
trace((currTarget_x + " === ") + currTarget_y);
}
if (currTarget._name == "scopeMC") {
trace("_target is scopeMC");
_root.createRocket(type, currTarget_x, currTarget_y);
i = 0;
} else if (_target == "_level0") {
}
i--;
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 6
gotoAndPlay("wait_" + _root.game_difficulty);
trace("wait: " + _root.game_difficulty);
Symbol 43 MovieClip Frame 50
trace("shoot rocket: ");
currTarget = this;
addUpCoords = true;
currTarget_x = this._x;
currTarget_y = this._y;
i = 6;
while (i > 0) {
currTarget = eval (currTarget + "._parent");
if ((currTarget._name != "bgndMC") && (addUpCoords)) {
currTarget_x = currTarget_x + currTarget._x;
currTarget_y = currTarget_y + currTarget._y;
addUpCoords = false;
}
if (currTarget._name == "scopeMC") {
_root.createRocket(type, currTarget_x, currTarget_y);
i = 0;
} else if (_target == "_level0") {
}
i--;
}
Symbol 43 MovieClip Frame 56
gotoAndStop (1);
Symbol 43 MovieClip Frame 57
if (_root.Rand() < 0.5) {
this._xscale = -100;
}
Symbol 46 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 1
stop();
Instance of Symbol 70 MovieClip in Symbol 71 MovieClip [smokeMC] Frame 1
onClipEvent (load) {
this.gotoAndStop(int(3 * Math.random()) + 1);
}
Symbol 71 MovieClip [smokeMC] Frame 19
this.removeMovieClip();
Symbol 86 Button
on (release) {
getURL ("http://www.tuti.tv", "_blank");
}
Symbol 94 Button
on (release) {
_root.play();
}
Symbol 97 MovieClip Frame 1
stop();
Symbol 108 Button
on (release) {
nextFrame();
}
Symbol 116 Button
on (release) {
nextFrame();
}
Symbol 118 Button
on (release) {
getURL ("http://www.tuti.tv/movies/ev/ev.html", "_blank");
}
Symbol 121 Button
on (release) {
this.gotoAndStop(1);
}
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 3
subtitleText = "Once upon a time, a long long time ago,";
Symbol 197 MovieClip Frame 4
subtitleText = "tutis were enslaved by creatures called humans.";
Symbol 197 MovieClip Frame 5
subtitleText = "";
Symbol 197 MovieClip Frame 6
subtitleText = "Being enslaved by such horrible creatures meant";
Symbol 197 MovieClip Frame 7
subtitleText = "that tutis were working day after day,";
Symbol 197 MovieClip Frame 8
subtitleText = "night after night, constantly exhausted.";
Symbol 197 MovieClip Frame 9
subtitleText = "One day, a miracle has happened.";
Symbol 197 MovieClip Frame 10
subtitleText = "One lucky tuti was freed from its master";
Symbol 197 MovieClip Frame 11
subtitleText = "in an accident.";
Symbol 197 MovieClip Frame 12
subtitleText = "";
Symbol 197 MovieClip Frame 14
subtitleText = "Taking a taste of sweet freedom, our tuti swore ";
Symbol 197 MovieClip Frame 15
subtitleText = "that he would not rest till all tutis were free. ";
Symbol 197 MovieClip Frame 16
subtitleText = "";
Symbol 197 MovieClip Frame 18
subtitleText = "Tutis were essential to humans without whom, ";
Symbol 197 MovieClip Frame 19
subtitleText = "humans could simply not reproduce. ";
Symbol 197 MovieClip Frame 20
subtitleText = "Not being able to reproduce, the human race ";
Symbol 197 MovieClip Frame 21
subtitleText = "started dying out. ";
Symbol 197 MovieClip Frame 22
subtitleText = "Once humans were extinct, there was nothing ";
Symbol 197 MovieClip Frame 23
subtitleText = "to stop the tutis from evolving into";
Symbol 197 MovieClip Frame 24
subtitleText = " the sophisticated creatures that they are today. ";
Symbol 197 MovieClip Frame 25
subtitleText = "";
Symbol 197 MovieClip Frame 32
subtitleText = "And that is why I like banana sandwiches. ";
Symbol 197 MovieClip Frame 33
subtitleText = "uhhh I mean... ";
Symbol 197 MovieClip Frame 34
subtitleText = "And childern, that is how our ansectors ";
Symbol 197 MovieClip Frame 35
subtitleText = "achieved freedom.";
Symbol 197 MovieClip Frame 36
subtitleText = "";
Symbol 228 MovieClip Frame 4
this.gotoAndPlay(int(3 * _root.Rand()) + 1);
this._rotation = int(360 * _root.Rand());
Symbol 229 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
stop();
Instance of Symbol 211 MovieClip in Symbol 239 MovieClip Frame 5
onClipEvent (enterFrame) {
this._x = this._x - 0.5;
}
Instance of Symbol 219 MovieClip "heliMC" in Symbol 239 MovieClip Frame 5
onClipEvent (enterFrame) {
currFr++;
this._y = 200 + (20 * Math.sin(currFr / 10));
this._x = 250 + (40 * Math.sin(currFr / 15));
this._rotation = 10 + (10 * Math.sin(currFr / 25));
}
Symbol 259 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 271 Button
on (release) {
_root.game_init();
}
Symbol 274 Button
on (release) {
gotoAndStop (6);
_root.displayKeyAssignments();
}
Symbol 280 Button
on (release) {
gotoAndStop (7);
}
Symbol 288 Button
on (release) {
gotoAndStop (1);
}
Symbol 290 Button
on (release) {
_root.level_init(3);
}
Symbol 292 Button
on (release) {
_root.level_init(1);
}
Symbol 293 Button
on (release) {
_root.level_init(2);
}
Symbol 294 Button
on (release) {
_root.level_init(4);
}
Symbol 295 Button
on (release) {
_root.level_init(5);
}
Symbol 296 Button
on (release) {
_root.level_init(103);
}
Symbol 297 Button
on (release) {
_root.level_init(101);
}
Symbol 298 Button
on (release) {
_root.level_init(102);
}
Symbol 299 Button
on (release) {
_root.level_init(104);
}
Symbol 300 Button
on (release) {
_root.level_init(105);
}
Symbol 307 MovieClip Frame 1
stop();
Symbol 312 Button
on (release) {
trace(id);
_root.startGame(id);
}
Symbol 316 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 342 Button
on (release) {
_root.game_init();
}
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 2
stop();
Symbol 379 Button
on (release) {
_root.next_level();
}
Symbol 382 Button
on (release) {
_root.level_init(_root.level_no);
}
Symbol 401 MovieClip Frame 1
Mouse.show();
stop();
Instance of Symbol 319 MovieClip "textMC_med" in Symbol 401 MovieClip Frame 4
onClipEvent (load) {
id = "med";
}
Instance of Symbol 319 MovieClip "textMC_hard" in Symbol 401 MovieClip Frame 4
onClipEvent (load) {
id = "hard";
}
Instance of Symbol 319 MovieClip "textMC_easy" in Symbol 401 MovieClip Frame 4
onClipEvent (load) {
id = "easy";
}
Instance of Symbol 360 MovieClip "keyQualityToggle" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyMusicOnOff" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeZoomClose" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeZoomMed" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeZoomFar" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeSizeSmall" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeSizeMed" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeSizeLarge" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyPauseGame" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyQuitGame" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeShapeCircle" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeShapeSquare" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Instance of Symbol 360 MovieClip "keyScopeShapeDiamond" in Symbol 401 MovieClip Frame 6
onClipEvent (load) {
_root.displayKeyValue(this);
}
onClipEvent (keyUp) {
_root.setKeyValue(this);
}
onClipEvent (mouseUp) {
_root.highlightKey(this);
}
Symbol 401 MovieClip Frame 10
Mouse.show();
Symbol 402 Button
on (release) {
_root.level_complete();
}
Symbol 422 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 1
_root.sniperGunStatus = "ready";
stop();
Symbol 427 MovieClip Frame 2
_root.sniperGunStatus = "reload";
Symbol 433 MovieClip Frame 1
stop();