Frame 1
gConstantsSet = false;
gInitialized = false;
gJumpLoc = false;
gInGame = false;
gPlayAgain = false;
gLevelChosen = false;
gPaused = false;
play();
function fnSetConstants() {
TOTAL_BG_LENGTH = Number(coral._width);
INTERFACE_WIDTH = Number(560);
SPEED = Number(4);
FISH_SPEED = Number(7);
FISH_ACCEL = Number(FISH_SPEED - SPEED);
INTERFACE_CENTER_X = Number(280 + Number(177));
FULL_OXYGEN = Number(26);
BG_START_POSITION = Number(coral._x);
BG_LEFT_LIMIT = Number(INTERFACE_CENTER_X - Number(Number(TOTAL_BG_LENGTH / 2) - Number(INTERFACE_WIDTH / 2)));
BG_RIGHT_LIMIT = Number(INTERFACE_CENTER_X + Number(Number(TOTAL_BG_LENGTH / 2) - Number(INTERFACE_WIDTH / 2)));
WALL_PENALTY = Number(3);
CREATURE_PENALTY = Number(3);
VERT_FACTOR = Number(16);
LEFT_BOUND = Number(177);
RIGHT_BOUND = LEFT_BOUND + Number(INTERFACE_WIDTH);
TOP_BOUND = Number(67);
BOTTOM_BOUND = Number(327);
TANK_REFILL = Number(10);
POINTS_FOR_MINE_cadet = Number(10);
POINTS_FOR_MINE_commando = Number(15);
SAFETY_DIFF = Number(28);
LOW_OXYGEN = Number(10);
}
function fnGetRoot(mySWF) {
var vfullpath = _url;
var vtrimloc = vfullpath.indexOf(mySWF);
SITEROOT = vfullpath.substring(0, vtrimloc);
}
function fnPauseGame() {
gPaused = true;
if ((gRecruitStatus == "hit") || ((gRecruitStatus == "recovering") && (_currentframe != 18))) {
recruitResetFrame = Number(recruit._currentframe);
}
timer.gotoAndStop("base");
scrollerClip.gotoAndStop("base");
oxygenLauncher.gotoAndStop("base");
fishLauncher.gotoAndStop("base");
mineLauncher.gotoAndStop("base");
gProdFrame = recruit.vProdFrame;
if ((gProdFrame == undefined) && (gProdStatus != "activated")) {
gProdFrame = Number(1);
}
gJumpLoc = true;
recruitResetX = recruit._x;
recruitResetY = recruit._y;
coralResetX = coral._x;
i = 0;
while (i < activeTanks.length) {
Set(activeTanks[i] + "ResetX", eval (activeTanks[i] + "._x"));
Set(activeTanks[i] + "ResetY", eval (activeTanks[i] + "._y"));
setProperty(activeTanks[i], _visible , 0);
i++;
}
i = 0;
while (i < activeMines.length) {
Set(activeMines[i] + "ResetX", eval (activeMines[i] + "._x"));
Set(activeMines[i] + "ResetY", eval (activeMines[i] + "._y"));
setProperty(activeMines[i], _visible , 0);
i++;
}
i = 0;
while (i < activeFishies.length) {
Set(activeFishies[i] + "ResetX", eval (activeFishies[i] + "._x"));
Set(activeFishies[i] + "ResetY", eval (activeFishies[i] + "._y"));
setProperty(activeFishies[i], _visible , 0);
i++;
}
}
function fnViewBriefing() {
if (gInGame == true) {
if (gPaused == false) {
fnPauseGame();
}
} else if ((endClip._currentframe == 1) || (endClip._currentframe == undefined)) {
gResumeFrame = null;
} else if (gScore >= 200) {
gResumeFrame = "passend";
} else {
gResumeFrame = "nopassend";
}
gotoAndStop (28);
}
Instance of Symbol 46 MovieClip "skillLevel" in Frame 1
onClipEvent (load) {
gotoAndStop(String(_root.gSkillLevel));
}
Instance of Symbol 61 MovieClip "load_start" in Frame 1
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.levelselectHelp.gotoAndStop("active");
this.gotoAndStop("ready");
}
}
Frame 2
fnGetRoot("scuba/vipersreef.swf");
Frame 3
loadMovieNum (SITEROOT + "nav.swf", 50000);
Frame 4
ifFrameLoaded (16) {
gotoAndPlay (6);
}
Frame 5
gotoAndPlay (4);
Frame 6
play();
Frame 16
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
stop();
if (gPlayAgain == true) {
missionButtonClip.gotoAndStop("active");
}
} else {
gotoAndPlay (6);
}
Frame 18
if (gConstantsSet == false) {
gConstantsSet = true;
skillLevel.gotoAndStop(String(gSkillLevel));
fnSetConstants();
}
points = eval ("POINTS_FOR_MINE_" + String(gSkillLevel));
stop();
function fnInitialize() {
gResumeFrame = null;
gTimeCounter = Number(0);
gScore = Number(0);
gOxygenStatus = FULL_OXYGEN;
gRecruitStatus = "free";
var gSideOfImpact;
var gResetOffset;
var gRecoverTargetY;
var gRecoverTargetX;
gRecruitTilt = "none";
gProdStatus = "not_activated";
allFishies = new Array("fish1", "fish2", "fish3", "fish4", "fish5", "fish6");
i = 0;
while (i < allFishies.length) {
Set(allFishies[i] + ".status", "static");
setProperty(allFishies[i], _x , eval (allFishies[i] + ".vOrigX"));
setProperty(allFishies[i], _y , eval (allFishies[i] + ".vOrigY"));
setProperty(allFishies[i], _visible , 1);
i++;
}
activeFishies = new Array();
allMines = new Array("mine1", "mine2", "mine3", "mine4");
i = 0;
while (i < allMines.length) {
Set(allMines[i] + ".status", "static");
setProperty(allMines[i], _x , eval (allMines[i] + ".vOrigX"));
setProperty(allMines[i], _y , eval (allMines[i] + ".vOrigY"));
setProperty(allMines[i], _visible , 1);
i++;
}
activeMines = new Array();
setProperty("coral", _x , BG_START_POSITION);
allOxyTanks = new Array("tank1", "tank2", "tank3", "tank4");
i = 0;
while (i < allOxyTanks.length) {
Set(allOxyTanks[i] + ".status", "static");
setProperty(allOxyTanks[i], _x , eval (allOxyTanks[i] + ".vOrigX"));
setProperty(allOxyTanks[i], _y , eval (allOxyTanks[i] + ".vOrigY"));
setProperty(allOxyTanks[i], _visible , 1);
i++;
}
activeOxyTanks = new Array();
oxygenGauge.gotoAndStop("oxy" + String(gOxygenStatus));
skillLevel.gotoAndStop(String(gSkillLevel));
lowOxyWarning.gotoAndStop("base");
setProperty("recruit", _visible , 1);
recruit.gotoAndPlay("enterfromleft");
if (gInitialized == false) {
gInitialized = true;
}
gJumpLoc = false;
gDifficultyFactorOxy = Number(1);
gDifficultyFactorFish = Number(1);
gDifficultyIncr = Number(0.04);
}
function fnBeginGame() {
setProperty("recruit", _x , recruit.vOrigX);
setProperty("recruit", _y , recruit.vOrigY);
recruit.gotoAndPlay("swim");
fnStartScriptClips();
}
function fnStartScriptClips() {
gInGame = true;
skillLevel.gotoAndStop(String(gSkillLevel));
timer.gotoAndPlay("go");
scrollerClip.gotoAndPlay("go");
mineLauncher.gotoAndPlay("launch");
oxygenLauncher.gotoAndPlay("launch");
fishLauncher.gotoAndPlay("launch");
}
function fnHelp() {
if (gInGame == true) {
gJumpLoc = true;
fnPauseGame();
} else if ((endClip._currentframe == 1) || (endClip._currentframe == undefined)) {
gResumeFrame = null;
} else {
endClip.gotoAndStop("base");
endhelp.gotoAndStop("base");
if (gScore >= 200) {
gResumeFrame = "passend";
} else {
gResumeFrame = "nopassend";
}
}
gotoAndStop (18);
}
function fnResumeGame() {
gotoAndStop (24);
}
function fnEndGame() {
gPlayAgain = true;
setProperty("recruit", _visible , 0);
gInGame = false;
gRecruitStatus = "dead";
scrollerClip.gotoAndStop("base");
timer.gotoAndStop("base");
endClip.gotoAndPlay("message");
lowOxyWarning.gotoAndStop("base");
oxygenGauge.gotoAndStop("oxy0");
}
function fnHitWall() {
recruit.vProdFrame = Number(gRechargeFrame);
if (gHitByFish == true) {
recruit.vHitByFishFrame = Number(Number(recruit.diver._totalframes - Number(recruit.diver._currentframe)) - Number(1));
}
gRecruitStatus = "hit";
scrollerClip.gotoAndStop("base");
gSideOfImpact = "undetermined";
var vPixelCounter;
var topClearCount = Number(1);
var bottomClearCount = Number(1);
var rightClearCount = Number(1);
var leftClearCount = Number(1);
gResetOffset = 20;
vPixelCounter = 5;
while (vPixelCounter < 31) {
if (coral.hitTest(Number(recruit._x), Number(Number(recruit._y) - Number(vPixelCounter)), true) == false) {
topClearCount++;
} else {
topClearCount--;
}
if (coral.hitTest(Number(recruit._x), Number(Number(recruit._y) + Number(vPixelCounter)), true) == false) {
bottomClearCount++;
} else {
bottomClearCount--;
}
if (coral.hitTest(Number(Number(recruit._x) + Number(vPixelCounter)), Number(recruit._y), true) == false) {
rightClearCount++;
} else {
rightClearCount--;
}
if (coral.hitTest(Number(Number(recruit._x) - Number(vPixelCounter)), Number(recruit._y), true) == false) {
leftClearCount++;
} else {
leftClearCount--;
}
vPixelCounter++;
}
if ((((rightClearCount < topClearCount) && (rightClearCount < bottomClearCount)) && (0())) || (25 < Number(leftClearCount - rightClearCount))) {
gSideOfImpact = "right";
} else if ((bottomClearCount >= topClearCount) && (rightClearCount >= topClearCount)) {
gSideOfImpact = "top";
} else {
gSideOfImpact = "bottom";
}
if (gSideOfImpact == "top") {
gRecoverTargetY = Number(Number(recruit._y) + Number(gResetOffset));
} else if (gSideOfImpact == "bottom") {
gRecoverTargetY = Number(Number(recruit._y) - Number(gResetOffset));
} else if (gSideOfImpact == "right") {
if (BG_RIGHT_LIMIT < Number(coral._x + Number(gResetOffset))) {
gRecoverTargetX = Number(BG_LEFT_LIMIT + Number(Number(coral._x + Number(gResetOffset)) - Number(BG_RIGHT_LIMIT)));
} else {
gRecoverTargetX = Number(coral._x + Number(gResetOffset));
}
}
gRecruitStatus = "recovering";
fnRunIntoSomething("WALL");
recruit.gotoAndPlay("hitwall");
}
function fnWallHitDone() {
gRecruitStatus = "free";
recruit.vProdFrame = gProdRechargeFrame;
recruit.gotoAndPlay("swim");
scrollerClip.gotoAndPlay("go");
}
function fnTakeOxygen() {
gOxygenStatus = Number(gOxygenStatus + Number(TANK_REFILL));
if (FULL_OXYGEN < gOxygenStatus) {
gOxygenStatus = FULL_OXYGEN;
}
oxygenGauge.gotoAndStop("oxy" + gOxygenStatus);
}
function fnRunIntoSomething(penalty) {
gOxygenStatus = Number(gOxygenStatus - Number(eval (penalty + "_PENALTY")));
if (gOxygenStatus < 1) {
gOxygenStatus = 0;
fnEndGame();
}
oxygenGauge.gotoAndStop("oxy" + gOxygenStatus);
}
function fnCreatureAttack() {
gHitByFish = true;
fnRunIntoSomething("CREATURE");
recruit.diver.gotoandPlay("hitbyfish");
}
function fnScorePoints() {
gScore = Number(gScore + Number(eval ("POINTS_FOR_MINE_" + String(gSkillLevel))));
}
Instance of Symbol 100 MovieClip "coral" in Frame 18
onClipEvent (enterFrame) {
if ((this.hitTest(Number(_root.recruit._x), Number(_root.recruit._y), true) == true) && (_root.gRecruitStatus == "free")) {
_root.gRecruitStatus = "hit";
_root.fnHitWall();
}
}
Instance of Symbol 111 MovieClip "mine1" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Instance of Symbol 111 MovieClip "mine2" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Instance of Symbol 111 MovieClip "mine3" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Instance of Symbol 111 MovieClip "mine4" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Instance of Symbol 117 MovieClip "tank3" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if ((status == "active") && (this._x < _root.RIGHT_BOUND)) {
if ((_root.recruit.diver.hitTest(this._x, this._y, false) == true) && (hit != true)) {
_root.fnTakeOxygen();
hit = true;
this.gotoAndPlay("takeoxygen");
} else if (hit == true) {
if (this._x < _root.LEFT_BOUND) {
hit = false;
this.gotoAndPlay("loop");
}
}
}
}
Instance of Symbol 117 MovieClip "tank2" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if ((status == "active") && (this._x < _root.RIGHT_BOUND)) {
if ((_root.recruit.diver.hitTest(this._x, this._y, false) == true) && (hit != true)) {
_root.fnTakeOxygen();
hit = true;
this.gotoAndPlay("takeoxygen");
} else if (hit == true) {
if (this._x < _root.LEFT_BOUND) {
hit = false;
this.gotoAndPlay("loop");
}
}
}
}
Instance of Symbol 117 MovieClip "tank1" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if ((status == "active") && (this._x < _root.RIGHT_BOUND)) {
if ((_root.recruit.diver.hitTest(this._x, this._y, false) == true) && (hit != true)) {
_root.fnTakeOxygen();
hit = true;
this.gotoAndPlay("takeoxygen");
} else if (hit == true) {
if (this._x < _root.LEFT_BOUND) {
hit = false;
this.gotoAndPlay("loop");
}
}
}
}
Instance of Symbol 117 MovieClip "tank4" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + (Number(this._height) * 2);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if ((status == "active") && (this._x < _root.RIGHT_BOUND)) {
if ((_root.recruit.diver.hitTest(this._x, this._y, false) == true) && (hit != true)) {
_root.fnTakeOxygen();
hit = true;
this.gotoAndPlay("takeoxygen");
} else if (hit == true) {
if (this._x < _root.LEFT_BOUND) {
hit = false;
this.gotoAndPlay("loop");
}
}
}
}
Instance of Symbol 130 MovieClip "fish4" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 139 MovieClip "fish1" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 139 MovieClip "fish2" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 130 MovieClip "fish6" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 130 MovieClip "fish5" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 139 MovieClip "fish3" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if ((((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) && (this._visible == 1)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if ((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this.hitarea) == true)) && (vProdded == false)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 194 MovieClip "fish4" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if (((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if (((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this) == true)) && (vProdded == false)) && (Number(Math.abs(Number(Math.abs(this._x) - Math.abs(Number(_root.recruit._x + Number(_root.recruit.diver._x))))) + Math.abs(Number(Math.abs(this._y) - Math.abs(Number(_root.recruit._y + Number(_root.recruit.diver._y)))))) < _root.SAFETY_DIFF)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 195 MovieClip "fish3" in Frame 18
onClipEvent (load) {
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
var vSlope;
var vAdjustmentDiv;
var vAttackedDiver = false;
var vProdded = false;
var vSwimmingDir = "straight";
vOrigX = this._x;
vOrigY = this._y;
}
onClipEvent (enterFrame) {
if (status == "active") {
if (this._x >= _root.RIGHT_BOUND) {
if (_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter;
} else if ((_root.coral.hitTest(Number(this._x - Number(_root.FISH_ACCEL)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter;
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (this._x < _root.RIGHT_BOUND) {
vSideOfImpact = "undetermined";
i = 5;
while ((i < 100) && (vSideOfImpact == "undetermined")) {
if (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), this._y, true) == true) {
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
vAdjustmentDiv = Number(i);
if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == true) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == false)) {
vSideOfImpact = "top";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
} else if ((_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y - Number(vPixelCounter)), true) == false) && (_root.coral.hitTest(Number(this._x - (Number(_root.FISH_ACCEL) * i)), Number(this._y + Number(vPixelCounter)), true) == true)) {
vSideOfImpact = "bottom";
vPixelOffset = Number(vPixelCounter + Number(this._height * 2));
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "down";
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
setProperty(this, _y , this._y + Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
vSwimmingDir = "straight";
}
} else if (vSideOfImpact == "bottom") {
if (vSwimmingDir == "straight") {
vSwimmingDir = "up";
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "up") {
setProperty(this, _y , this._y - Number(vPixelOffset / vAdjustmentDiv));
} else if (vSwimmingDir == "down") {
vSwimmingDir = "straight";
}
}
} else {
vSwimmingDir = "straight";
}
i = Number(i + Number(3));
}
if (((vProdded == false) && (_root.gProdStatus == "activated")) && (_root.recruit.prod.hitTest(this) == true)) {
vProdded = true;
this.gotoAndPlay("prodded");
} else if (((((vAttackedDiver == false) && (_root.gProdStatus == "not_activated")) && (_root.recruit.diver.hitTest(this) == true)) && (vProdded == false)) && (Number(Math.abs(Number(Math.abs(this._x) - Math.abs(Number(_root.recruit._x + Number(_root.recruit.diver._x))))) + Math.abs(Number(Math.abs(this._y) - Math.abs(Number(_root.recruit._y + Number(_root.recruit.diver._y)))))) < _root.SAFETY_DIFF)) {
vAttackedDiver = true;
_root.fnCreatureAttack();
}
}
}
}
Instance of Symbol 111 MovieClip "mine1" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Instance of Symbol 111 MovieClip "mine1" in Frame 18
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
var vPixelCounter;
var vPixelOffset;
var vSideOfImpact;
}
onClipEvent (enterFrame) {
if ((status == "active") && (this._x >= _root.RIGHT_BOUND)) {
if (_root.coral.hitTest(this._x, this._y, true) == true) {
vSideOfImpact = "undetermined";
vPixelCounter = Number(1);
while (vSideOfImpact == "undetermined") {
if ((_root.coral.hitTest(this._x, Number(this._y + Number(vPixelCounter)), true) == false) && (Number(this._y + Number(vPixelCounter)) < _root.BOTTOM_BOUND)) {
vSideOfImpact = "top";
vPixelOffset = vPixelCounter + Number(this._height);
} else if ((_root.coral.hitTest(this._x, Number(this._y - Number(vPixelCounter)), true) == false) && (_root.TOP_BOUND < Number(this._y - Number(vPixelCounter)))) {
vSideOfImpact = "bottom";
vPixelOffset = vPixelCounter + Number(this._height);
}
vPixelCounter++;
}
if (vSideOfImpact == "top") {
setProperty(this, _y , Number(this._y + Number(vPixelOffset)));
} else if (vSideOfImpact == "bottom") {
setProperty(this, _y , Number(this._y - Number(vPixelOffset)));
}
}
} else if (((status == "active") && (this._x < _root.RIGHT_BOUND)) && (_root.recruit.diver.hitTest(this._x, this._y, false) == true)) {
status = "neutralized";
this.gotoAndPlay("neutralized");
_root.fnScorePoints();
}
}
Frame 21
fnInitialize();
stop();
function fnRetrieveSettings() {
gPaused = false;
setProperty("recruit", _x , recruitResetX);
setProperty("recruit", _y , recruitResetY);
setProperty("coral", _x , coralResetX);
i = 0;
while (i < activeTanks.length) {
setProperty(activeTanks[i], _x , eval (activeTanks[i] + "ResetX"));
setProperty(activeTanks[i], _y , eval (activeTanks[i] + "ResetY"));
setProperty(activeTanks[i], _visible , 1);
i++;
}
i = 0;
while (i < activeMines.length) {
setProperty(activeMines[i], _x , eval (activeMines[i] + "ResetX"));
setProperty(activeMines[i], _y , eval (activeMines[i] + "ResetY"));
setProperty(activeMines[i], _visible , 1);
i++;
}
i = 0;
while (i < activeFishies.length) {
setProperty(activeFishies[i], _x , eval (activeFishies[i] + "ResetX"));
setProperty(activeFishies[i], _y , eval (activeFishies[i] + "ResetY"));
setProperty(activeFishies[i], _visible , 1);
i++;
}
if ((gRecruitStatus == "hit") || (gRecruitStatus == "recovering")) {
recruit.gotoAndPlay(Number(recruitResetFrame));
recruit.vProdFrame = Number(gProdFrame);
} else {
recruit.gotoAndPlay("swim");
}
fnStartScriptClips();
}
function fnPlayAgain() {
endClip.gotoAndStop("base");
gLevelChosen = false;
gHelpCalled = false;
gotoAndStop (16);
}
Instance of Symbol 274 MovieClip "recruit" in Frame 21
onClipEvent (load) {
vOrigX = this._x;
vOrigY = this._y;
}
Instance of Symbol 301 MovieClip "recruitMover" in Frame 21
onClipEvent (load) {
vKeyFactor = 80;
}
onClipEvent (enterFrame) {
_root.recruit.vProdFrame = Number(_root.recruit.prod._currentframe);
if (_root.recruit.vProdFrame == 0) {
_root.recruit.vProdFrame = Number(1);
}
if (((_root.recruit.vProdFrame >= 1) != true) || ((Number(_root.recruit.prod._totalframes) >= _root.recruit.vProdFrame) != true)) {
_root.recruit.vProdFrame = Number(1);
}
if (_root.gInGame == true) {
if (_root.gRecruitStatus == "free") {
if ((Key.isDown(Key.DOWN) == false) && (Key.isDown(Key.UP) == false)) {
if (0.5 < Number(_root._ymouse - Number(_root.recruit._y))) {
if (_root.gRecruitTilt != "down") {
if (_root.gHitByFish == true) {
_root.recruit.vHitByFishFrame = Number(Number(_root.recruit.diver._totalframes - Number(_root.recruit.diver._currentframe)) - Number(1));
}
_root.recruit.gotoAndPlay("swimdown");
_root.gRecruitTilt = "down";
}
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) + Number(Number(_root._ymouse - Number(_root.recruit._y)) / _root.VERT_FACTOR)));
setProperty("_root.recruit", _rotation , Number(Number(_root._ymouse - Number(_root.recruit._y)) / _root.VERT_FACTOR));
} else if (0.5 < Number(_root.recruit._y - Number(_root._ymouse))) {
if (_root.gRecruitTilt != "up") {
if (_root.gHitByFish == true) {
_root.recruit.vHitByFishFrame = Number(Number(_root.recruit.diver._totalframes - Number(_root.recruit.diver._currentframe)) - Number(1));
}
_root.recruit.gotoAndPlay("swimup");
_root.gRecruitTilt = "up";
}
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) - Number(Number(_root.recruit._y - Number(_root._ymouse)) / _root.VERT_FACTOR)));
setProperty("_root.recruit", _rotation , -(Number(_root.recruit._y - Number(_root._ymouse)) / _root.VERT_FACTOR));
} else {
if (_root.gRecruitTilt != "none") {
if (_root.gHitByFish == true) {
_root.recruit.vHitByFishFrame = Number(Number(_root.recruit.diver._totalframes - Number(_root.recruit.diver._currentframe)) - Number(1));
}
_root.recruit.gotoAndPlay("swim");
_root.gRecruitTilt = "none";
}
setProperty("_root.recruit", _y , _root._ymouse);
setProperty("_root.recruit", _rotation , 0);
}
} else if (Key.isDown(Key.DOWN) == true) {
if (_root.gRecruitTilt != "down") {
if (_root.gHitByFish == true) {
_root.recruit.vHitByFishFrame = Number(Number(_root.recruit.diver._totalframes - Number(_root.recruit.diver._currentframe)) - Number(1));
}
_root.recruit.gotoAndPlay("swimdown");
_root.gRecruitTilt = "down";
}
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) + Number(vKeyFactor / _root.VERT_FACTOR)));
setProperty("_root.recruit", _rotation , Number(vKeyFactor / _root.VERT_FACTOR));
} else if (Key.isDown(Key.UP) == true) {
if (_root.gRecruitTilt != "up") {
if (_root.gHitByFish == true) {
_root.recruit.vHitByFishFrame = Number(Number(_root.recruit.diver._totalframes - Number(_root.recruit.diver._currentframe)) - Number(1));
}
_root.recruit.gotoAndPlay("swimup");
_root.gRecruitTilt = "up";
}
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) - Number(vKeyFactor / _root.VERT_FACTOR)));
setProperty("_root.recruit", _rotation , -(Number(vKeyFactor) / _root.VERT_FACTOR));
}
} else if (_root.gRecruitStatus == "recovering") {
if (_root.gSideOfImpact == "top") {
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) + (Number(Number(_root.gRecoverTargetY) - Number(_root.recruit._y)) / 2)));
i = 0;
while (i < _root.activeFishies.length) {
setProperty("_root." + _root.activeFishies[i], _x , Number(eval (("_root." + _root.activeFishies[i]) + "._x")) - Number(_root.FISH_ACCEL));
i++;
}
} else if (_root.gSideOfImpact == "bottom") {
setProperty("_root.recruit", _y , Number(Number(_root.recruit._y) - (Number(Number(_root.recruit._y) - Number(_root.gRecoverTargetY)) / 2)));
i = 0;
while (i < _root.activeFishies.length) {
setProperty("_root." + _root.activeFishies[i], _x , Number(eval (("_root." + _root.activeFishies[i]) + "._x")) - Number(_root.FISH_ACCEL));
i++;
}
} else if (_root.gSideOfImpact == "right") {
if (_root.coral._x < _root.gRecoverTargetX) {
i = 0;
while (i < _root.activeMines.length) {
setProperty("_root." + _root.activeMines[i], _x , Number(eval (("_root." + _root.activeMines[i]) + "._x") + Number(Number(_root.gRecoverTargetX - Number(_root.coral._x)) / 2)));
i++;
}
i = 0;
while (i < _root.activeFishies.length) {
setProperty("_root." + _root.activeFishies[i], _x , Number(Number(eval (("_root." + _root.activeFishies[i]) + "._x")) - Number(_root.FISH_ACCEL)) + Number(Number(Number(_root.gRecoverTargetX - Number(_root.coral._x)) / 2)));
i++;
}
i = 0;
while (i < _root.activeOxyTanks.length) {
setProperty("_root." + _root.activeOxyTanks[i], _x , Number(eval (("_root." + _root.activeOxyTanks[i]) + "._x") + Number(Number(_root.gRecoverTargetX - Number(_root.coral._x)) / 2)));
i++;
}
setProperty("_root.coral", _x , _root.coral._x + Number(Number(_root.gRecoverTargetX - Number(_root.coral._x)) / 2));
} else if (_root.BG_RIGHT_LIMIT < Number(_root.coral._x + Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2))) {
i = 0;
while (i < _root.activeMines.length) {
setProperty("_root." + _root.activeMines[i], _x , eval (("_root." + _root.activeMines[i]) + "._x") + Number(_root.BG_LEFT_LIMIT + Number(_root.BG_RIGHT_LIMIT - Number(Number(_root.coral._x + Number(Number(Number((_root.BG_RIGHT_LIMIT - NumbeNumber(r(_root.coral._x))) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)))))));
i++;
}
i = 0;
while (i < _root.activeFishies.length) {
setProperty("_root." + _root.activeFishies[i], _x , Number(Number(eval (("_root." + _root.activeFishies[i]) + "._x")) - Number(_root.FISH_ACCEL)) + Number(_root.BG_LEFT_LIMIT + Number(_root.BG_RIGHT_LIMIT - Number(Number(_root.coral._x + Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2))))));
i++;
}
i = 0;
while (i < _root.activeOxyTanks.length) {
setProperty("_root." + _root.activeOxyTanks[i], _x , eval (("_root." + _root.activeOxyTanks[i]) + "._x") + Number(_root.BG_LEFT_LIMIT + Number(_root.BG_RIGHT_LIMIT - Number(Number(_root.coral._x + Number(Number(Number((_root.BG_RIGHT_LIMIT - NumbeNumber(r(_root.coral._x))) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)))))));
i++;
}
setProperty("_root.coral", _x , _root.BG_LEFT_LIMIT + Number(_root.BG_RIGHT_LIMIT - Number(Number(_root.coral._x + Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)))));
} else {
i = 0;
while (i < _root.activeMines.length) {
setProperty("_root." + _root.activeMines[i], _x , eval (("_root." + _root.activeMines[i]) + "._x") + Number(Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)));
i++;
}
i = 0;
while (i < _root.activeFishies.length) {
setProperty("_root." + _root.activeFishies[i], _x , Number(Number(eval (("_root." + _root.activeFishies[i]) + "._x")) - Number(_root.FISH_ACCEL)) + Number(Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)));
i++;
}
i = 0;
while (i < _root.activeOxyTanks.length) {
setProperty("_root." + _root.activeOxyTanks[i], _x , eval (("_root." + _root.activeOxyTanks[i]) + "._x") + Number(Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2)));
i++;
}
setProperty("_root.coral", _x , _root.coral._x + Number(Number(Number(_root.BG_RIGHT_LIMIT - Number(_root.coral._x)) + Number(_root.gRecoverTargetX - Number(_root.BG_LEFT_LIMIT))) / 2));
}
}
}
} else if (_root.gRecruitStatus == "dead") {
_root.recruit.gotoAndStop("base");
}
}
Frame 24
fnRetrieveSettings();
stop();
Frame 26
endClip.gotoAndStop(gResumeFrame);
if (gResumeFrame == "passend") {
endhelp.gotoAndStop("activepass");
} else {
endhelp.gotoAndStop("activenopass");
}
stop();
Frame 28
briefing.gotoAndPlay("begin");
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
stop();
Symbol 42 MovieClip Frame 3
stop();
Symbol 42 MovieClip Frame 4
stop();
Symbol 42 MovieClip Frame 5
stop();
Symbol 42 MovieClip Frame 6
stop();
Symbol 42 MovieClip Frame 7
stop();
Symbol 42 MovieClip Frame 8
stop();
Symbol 42 MovieClip Frame 9
stop();
Symbol 42 MovieClip Frame 10
stop();
Symbol 42 MovieClip Frame 11
stop();
Symbol 42 MovieClip Frame 12
stop();
Symbol 42 MovieClip Frame 13
stop();
Symbol 42 MovieClip Frame 14
stop();
Symbol 42 MovieClip Frame 15
stop();
Symbol 42 MovieClip Frame 16
stop();
Symbol 42 MovieClip Frame 17
stop();
Symbol 42 MovieClip Frame 18
stop();
Symbol 42 MovieClip Frame 19
stop();
Symbol 42 MovieClip Frame 20
stop();
Symbol 42 MovieClip Frame 21
stop();
Symbol 42 MovieClip Frame 22
stop();
Symbol 42 MovieClip Frame 23
stop();
Symbol 42 MovieClip Frame 24
stop();
Symbol 42 MovieClip Frame 25
stop();
Symbol 42 MovieClip Frame 26
stop();
Symbol 42 MovieClip Frame 27
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 2
stop();
Symbol 46 MovieClip Frame 3
stop();
Symbol 58 Button
on (release) {
_root.gSkillLevel = "cadet";
_root.gLevelChosen = true;
if (_root.gPlayAgain == true) {
_root.gotoAndStop("game");
} else {
_root.gotoAndStop("briefing");
}
}
Symbol 60 Button
on (release) {
_root.gSkillLevel = "commando";
_root.gLevelChosen = true;
if (_root.gPlayAgain == true) {
_root.gotoAndStop("game");
} else {
_root.gotoAndStop("briefing");
}
}
Symbol 61 MovieClip Frame 1
play();
Symbol 61 MovieClip Frame 5
gotoAndPlay (1);
Symbol 61 MovieClip Frame 6
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 2
stop();
Symbol 92 Button
on (release) {
_root.fnViewBriefing();
}
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 3
play();
Symbol 111 MovieClip Frame 8
stop();
Symbol 117 MovieClip Frame 1
play();
Symbol 117 MovieClip Frame 20
if (hit == true) {
gotoAndPlay (23);
} else {
gotoAndPlay (1);
}
Symbol 117 MovieClip Frame 23
play();
Symbol 117 MovieClip Frame 27
gotoAndStop (29);
Symbol 117 MovieClip Frame 29
stop();
Symbol 130 MovieClip Frame 1
play();
Symbol 130 MovieClip Frame 40
if (vProdded == true) {
gotoAndPlay (41);
} else {
gotoAndPlay (1);
}
Symbol 130 MovieClip Frame 41
play();
Symbol 130 MovieClip Frame 52
vProdded = false;
gotoAndPlay (1);
Symbol 139 MovieClip Frame 1
play();
Symbol 139 MovieClip Frame 4
if (vProdded == true) {
gotoAndPlay (5);
} else {
gotoAndPlay (1);
}
Symbol 139 MovieClip Frame 5
play();
Symbol 139 MovieClip Frame 16
vProdded = false;
gotoAndPlay (1);
Symbol 161 Button
on (release) {
_root.fnPlayAgain();
}
Symbol 170 Button
on (release) {
getURL ("/gijoe/experience/pl/page.games/dn/default.cfm", "_self");
}
Symbol 181 Button
on (release) {
getURL (("/gijoe/experience/hm/pl/path.recruit/gameID.101/score." + _root.gScore) + "/locID.10285/dn/games_cert.cfm", "_blank");
}
Symbol 186 Button
on (release) {
var newscore = (_root.gScore * 400);
}
on (release) {
getURL (("javascript:openWindowGames('http://www.hasbro.com/gijoe/include/challenge_a_friend.cfm?server=www.hasbro.com&script=/gijoe/experience/recruitcenter/games/pl/path.recruit/dn/scuba.cfm&gameID=101&rad=" + newscore) + "');");
}
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 24
if (_root.user_id == "none") {
getURL (("/gijoe/experience/scripts/holder.cfm?action=nouser&gameID=101&score=" + _root.gScore) + "&test=test");
stop();
} else {
loadVariablesNum (("/gijoe/experience/scripts/scores.cfm?action=postscores&gameID=101&score=" + _root.gScore) + "&test=test", 0);
if (_root.gScore >= 200) {
gotoAndPlay (33);
} else {
gotoAndPlay (26);
}
}
Symbol 187 MovieClip Frame 26
play();
Symbol 187 MovieClip Frame 31
_root.endhelp.gotoAndStop("activenopass");
stop();
Symbol 187 MovieClip Frame 33
play();
Symbol 187 MovieClip Frame 38
_root.endhelp.gotoAndStop("activepass");
stop();
Symbol 188 Button
on (release) {
fnViewBriefing();
}
Symbol 194 MovieClip Frame 1
play();
Symbol 194 MovieClip Frame 40
if (vProdded == true) {
gotoAndPlay (41);
} else {
gotoAndPlay (1);
}
Symbol 194 MovieClip Frame 41
play();
Symbol 194 MovieClip Frame 52
vProdded = false;
gotoAndPlay (1);
Symbol 195 MovieClip Frame 1
play();
Symbol 195 MovieClip Frame 4
if (vProdded == true) {
gotoAndPlay (5);
} else {
gotoAndPlay (1);
}
Symbol 195 MovieClip Frame 5
play();
Symbol 195 MovieClip Frame 16
vProdded = false;
gotoAndPlay (1);
Symbol 227 Button
on (release) {
if (gResumeFrame == null) {
if ((gJumpLoc == false) || (gRecruitStatus == "dead")) {
gotoAndStop (21);
} else if (gJumpLoc == true) {
gotoAndStop (24);
}
} else {
gotoAndStop (26);
}
}
Symbol 238 MovieClip Frame 1
play();
Symbol 238 MovieClip Frame 34
if (_root.gHitByFish == true) {
gotoAndPlay (35);
} else {
gotoAndPlay (1);
}
Symbol 238 MovieClip Frame 35
play();
Symbol 238 MovieClip Frame 36
play();
Symbol 238 MovieClip Frame 37
play();
Symbol 238 MovieClip Frame 38
play();
Symbol 238 MovieClip Frame 39
play();
Symbol 238 MovieClip Frame 40
play();
Symbol 238 MovieClip Frame 41
play();
Symbol 238 MovieClip Frame 42
play();
Symbol 238 MovieClip Frame 43
play();
Symbol 238 MovieClip Frame 44
_root.gHitByFish = false;
gotoAndPlay (1);
Symbol 239 MovieClip Frame 1
play();
Symbol 239 MovieClip Frame 34
if (_root.gHitByFish == true) {
gotoAndPlay (35);
} else {
gotoAndPlay (1);
}
Symbol 239 MovieClip Frame 35
play();
Symbol 239 MovieClip Frame 36
play();
Symbol 239 MovieClip Frame 37
play();
Symbol 239 MovieClip Frame 38
play();
Symbol 239 MovieClip Frame 39
play();
Symbol 239 MovieClip Frame 40
play();
Symbol 239 MovieClip Frame 41
play();
Symbol 239 MovieClip Frame 42
play();
Symbol 239 MovieClip Frame 43
play();
Symbol 239 MovieClip Frame 44
_root.gHitByFish = false;
gotoAndPlay (1);
Symbol 244 MovieClip Frame 1
_root.gProdRechargeFrame = Number(13);
if ((_parent.vProdFrame == 1) || (_parent.vProdFrame == 2)) {
stop();
} else {
gotoAndPlay(Number(_parent.vProdFrame));
}
Symbol 244 MovieClip Frame 3
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 4
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 5
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 6
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 7
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 8
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 9
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 10
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 11
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 12
_root.gProdStatus = "activated";
play();
Symbol 244 MovieClip Frame 13
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 14
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 15
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 16
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 17
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 18
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 19
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 20
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 21
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 22
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 23
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 24
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 25
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 26
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 27
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 28
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 29
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 30
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 31
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 32
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 33
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 34
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 35
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 36
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 37
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 38
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 39
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 40
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 41
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 42
_root.gProdStatus = "not_activated";
play();
Symbol 244 MovieClip Frame 43
_parent.vProdFrame = Number(1);
_root.gProdStatus = "not_activated";
gotoAndStop (1);
Symbol 257 MovieClip Frame 1
play();
Symbol 257 MovieClip Frame 2
if (_root.gHitByFish == true) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Symbol 257 MovieClip Frame 3
play();
Symbol 257 MovieClip Frame 4
play();
Symbol 257 MovieClip Frame 5
play();
Symbol 257 MovieClip Frame 6
play();
Symbol 257 MovieClip Frame 7
play();
Symbol 257 MovieClip Frame 8
play();
Symbol 257 MovieClip Frame 9
play();
Symbol 257 MovieClip Frame 10
play();
Symbol 257 MovieClip Frame 11
play();
Symbol 257 MovieClip Frame 12
_root.gHitByFish = false;
gotoAndPlay (1);
Symbol 272 MovieClip Frame 1
play();
Symbol 272 MovieClip Frame 2
if (_root.gHitByFish == true) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Symbol 272 MovieClip Frame 3
play();
Symbol 272 MovieClip Frame 4
play();
Symbol 272 MovieClip Frame 5
play();
Symbol 272 MovieClip Frame 6
play();
Symbol 272 MovieClip Frame 7
play();
Symbol 272 MovieClip Frame 8
play();
Symbol 272 MovieClip Frame 9
play();
Symbol 272 MovieClip Frame 10
play();
Symbol 272 MovieClip Frame 11
play();
Symbol 272 MovieClip Frame 12
_root.gHitByFish = false;
gotoAndPlay (1);
Symbol 273 MovieClip Frame 1
play();
Symbol 273 MovieClip Frame 2
if (_root.gHitByFish == true) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Symbol 273 MovieClip Frame 3
play();
Symbol 273 MovieClip Frame 4
play();
Symbol 273 MovieClip Frame 5
play();
Symbol 273 MovieClip Frame 6
play();
Symbol 273 MovieClip Frame 7
play();
Symbol 273 MovieClip Frame 8
play();
Symbol 273 MovieClip Frame 9
play();
Symbol 273 MovieClip Frame 10
play();
Symbol 273 MovieClip Frame 11
play();
Symbol 273 MovieClip Frame 12
_root.gHitByFish = false;
gotoAndPlay (1);
Symbol 274 MovieClip Frame 1
var vProdFrame;
var vHitByFishFrame;
stop();
Symbol 274 MovieClip Frame 3
play();
Symbol 274 MovieClip Frame 12
_root.fnBeginGame();
vProdFrame = Number(1);
Symbol 274 MovieClip Frame 13
if (_root.gJumpLoc == true) {
if (_root.gProdFrame != 1) {
prod.gotoAndPlay(Number(_root.gProdFrame));
vProdFrame = _root.gProdFrame;
}
_root.gJumpLoc = false;
} else if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Instance of Symbol 244 MovieClip "prod" in Symbol 274 MovieClip Frame 13
onClipEvent (mouseDown) {
if (this._currentframe == 1) {
this.gotoAndPlay("activated");
}
}
Symbol 274 MovieClip Frame 21
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 22
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Symbol 274 MovieClip Frame 30
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 31
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
gotoAndPlay (13);
Symbol 274 MovieClip Frame 34
if (_root.gJumpLoc == true) {
if (_root.gProdFrame != 1) {
prod.gotoAndPlay(Number(_root.gProdFrame));
vProdFrame = _root.gProdFrame;
}
_root.gJumpLoc = false;
} else if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Instance of Symbol 244 MovieClip "prod" in Symbol 274 MovieClip Frame 34
onClipEvent (mouseDown) {
if (this._currentframe == 1) {
this.gotoAndPlay("activated");
}
}
Symbol 274 MovieClip Frame 42
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 43
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Symbol 274 MovieClip Frame 51
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 52
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
gotoAndPlay (34);
Symbol 274 MovieClip Frame 55
if (_root.gJumpLoc == true) {
if (_root.gProdFrame != 1) {
prod.gotoAndPlay(Number(_root.gProdFrame));
vProdFrame = _root.gProdFrame;
}
_root.gJumpLoc = false;
} else if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Instance of Symbol 244 MovieClip "prod" in Symbol 274 MovieClip Frame 55
onClipEvent (mouseDown) {
if (this._currentframe == 1) {
this.gotoAndPlay("activated");
}
}
Symbol 274 MovieClip Frame 63
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 64
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
play();
Symbol 274 MovieClip Frame 72
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 73
if (vProdFrame != 1) {
prod.gotoAndPlay(Number(vProdFrame));
}
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
gotoAndPlay (55);
Symbol 274 MovieClip Frame 76
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 77
if (_root.gHitByFish == true) {
diver.gotoAndPlay(Number(diver._totalframes - Number(vHitByFishFrame)));
}
Symbol 274 MovieClip Frame 81
if (_root.gHitByFish == true) {
vHitByFishFrame = Number(Number(diver._totalframes - Number(diver._currentframe)) - Number(1));
}
play();
Symbol 274 MovieClip Frame 82
vProdFrame = _root.gProdRechargeFrame;
_root.fnWallHitDone();
Symbol 275 Button
on (release) {
fnHelp();
}
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 3
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 5
vStartTime = Math.round(Number(getTimer() / 1000));
vOxyBegin = Math.round(Number(getTimer() / 1000));
play();
Symbol 283 MovieClip Frame 6
play();
Symbol 283 MovieClip Frame 7
if (0 < _root.gOxygenStatus) {
if (((getTimer() / 1000) - Number(vOxyBegin)) >= _root.gO2Duration) {
_root.gO2Duration = Number(_root.gO2Duration - Number(_root.gO2LessIncr));
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
}
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
Symbol 283 MovieClip Frame 9
play();
Symbol 283 MovieClip Frame 10
_root.gTimeCounter++;
play();
Symbol 283 MovieClip Frame 20
if (60 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 21
if (55 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 22
if (50 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 23
if (45 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 24
if (40 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 25
if (35 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 26
if (30 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 27
if (25 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 28
if (20 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 29
if (15 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 30
if (10 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 31
if (5 < _root.gTimeCounter) {
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
}
Symbol 283 MovieClip Frame 32
if (0 < _root.gOxygenStatus) {
_root.gOxygenStatus--;
_root.oxygenGauge.gotoAndStop("oxy" + _root.gOxygenStatus);
vOxyBegin = Math.round(Number(getTimer() / 1000));
if (_root.LOW_OXYGEN >= _root.gOxygenStatus) {
_root.lowOxyWarning.gotoAndStop("warning");
} else {
_root.lowOxyWarning.gotoAndStop("base");
}
gotoAndPlay (10);
} else {
_root.fnEndGame();
gotoAndStop (1);
}
Symbol 297 MovieClip Frame 2
stop();
Symbol 297 MovieClip Frame 3
stop();
Symbol 297 MovieClip Frame 4
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 5
play();
Symbol 299 MovieClip Frame 6
if (Number(_root.coral._x - _root.SPEED) < _root.BG_LEFT_LIMIT) {
setProperty("_root.coral", _x , _root.BG_RIGHT_LIMIT - Number(_root.BG_LEFT_LIMIT - Number(_root.coral._x - _root.SPEED)));
} else {
setProperty("_root.coral", _x , Number(_root.coral._x - _root.SPEED));
}
i = 0;
while (i < _root.activeFishies.length) {
if (eval (("_root." + _root.activeFishies[i]) + "._x") < _root.LEFT_BOUND) {
_root.allFishies.push(_root.activeFishies[i]);
Set(("_root." + _root.activeFishies[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeFishies[i]), _x , eval (("_root." + _root.activeFishies[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeFishies[i]), _y , eval (("_root." + _root.activeFishies[i]) + ".vOrigY"));
_root.activeFishies.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeFishies[i], _x , eval (("_root." + _root.activeFishies[i]) + "._x") - _root.FISH_SPEED);
}
i++;
}
i = 0;
while (i < _root.activeMines.length) {
if (eval (("_root." + _root.activeMines[i]) + "._x") < _root.LEFT_BOUND) {
_root.allMines.push(_root.activeMines[i]);
Set(("_root." + _root.activeMines[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeMines[i]), _x , eval (("_root." + _root.activeMines[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeMines[i]), _y , eval (("_root." + _root.activeMines[i]) + ".vOrigY"));
_root.activeMines.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeMines[i], _x , eval (("_root." + _root.activeMines[i]) + "._x") - _root.SPEED);
}
i++;
}
i = 0;
while (i < _root.activeOxyTanks.length) {
if (eval (("_root." + _root.activeOxyTanks[i]) + "._x") < _root.LEFT_BOUND) {
_root.allOxyTanks.push(_root.activeOxyTanks[i]);
Set(("_root." + _root.activeOxyTanks[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeOxyTanks[i]), _x , eval (("_root." + _root.activeOxyTanks[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeOxyTanks[i]), _y , eval (("_root." + _root.activeOxyTanks[i]) + ".vOrigY"));
_root.activeOxyTanks.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeOxyTanks[i], _x , eval (("_root." + _root.activeOxyTanks[i]) + "._x") - _root.SPEED);
}
i++;
}
play();
Symbol 299 MovieClip Frame 7
if (Number(_root.coral._x - _root.SPEED) < _root.BG_LEFT_LIMIT) {
setProperty("_root.coral", _x , _root.BG_RIGHT_LIMIT - Number(_root.BG_LEFT_LIMIT - Number(_root.coral._x - _root.SPEED)));
} else {
setProperty("_root.coral", _x , Number(_root.coral._x - _root.SPEED));
}
i = 0;
while (i < _root.activeFishies.length) {
if (eval (("_root." + _root.activeFishies[i]) + "._x") < _root.LEFT_BOUND) {
_root.allFishies.push(_root.activeFishies[i]);
Set(("_root." + _root.activeFishies[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeFishies[i]), _x , eval (("_root." + _root.activeFishies[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeFishies[i]), _y , eval (("_root." + _root.activeFishies[i]) + ".vOrigY"));
_root.activeFishies.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeFishies[i], _x , eval (("_root." + _root.activeFishies[i]) + "._x") - _root.FISH_SPEED);
}
i++;
}
i = 0;
while (i < _root.activeMines.length) {
if (eval (("_root." + _root.activeMines[i]) + "._x") < _root.LEFT_BOUND) {
_root.allMines.push(_root.activeMines[i]);
Set(("_root." + _root.activeMines[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeMines[i]), _x , eval (("_root." + _root.activeMines[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeMines[i]), _y , eval (("_root." + _root.activeMines[i]) + ".vOrigY"));
_root.activeMines.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeMines[i], _x , eval (("_root." + _root.activeMines[i]) + "._x") - _root.SPEED);
}
i++;
}
i = 0;
while (i < _root.activeOxyTanks.length) {
if (eval (("_root." + _root.activeOxyTanks[i]) + "._x") < _root.LEFT_BOUND) {
_root.allOxyTanks.push(_root.activeOxyTanks[i]);
Set(("_root." + _root.activeOxyTanks[i]) + ".status", "static");
setProperty(eval ("_root." + _root.activeOxyTanks[i]), _x , eval (("_root." + _root.activeOxyTanks[i]) + ".vOrigX"));
setProperty(eval ("_root." + _root.activeOxyTanks[i]), _y , eval (("_root." + _root.activeOxyTanks[i]) + ".vOrigY"));
_root.activeOxyTanks.splice(i, 1);
i--;
} else {
setProperty("_root." + _root.activeOxyTanks[i], _x , eval (("_root." + _root.activeOxyTanks[i]) + "._x") - _root.SPEED);
}
i++;
}
gotoAndPlay (6);
Symbol 303 MovieClip Frame 1
var vCounter = Number(0);
var vToPull;
stop();
Symbol 303 MovieClip Frame 3
play();
Symbol 303 MovieClip Frame 5
vCounter = Number(vCounter + Number(_root.gDifficultyFactorFish));
if (_root.gDifficultyFactorFish < 0.4) {
_root.gDifficultyFactorFish = Number(_root.gDifficultyFactorFish + Number(_root.gDifficultyIncr));
}
if (_root.gSkillLevel == "cadet") {
if (vCounter < 5) {
gotoAndPlay (3);
} else {
vCounter = Number(0);
gotoAndPlay (6);
}
} else if (_root.gSkillLevel == "commando") {
if (vCounter < 2) {
gotoAndPlay (3);
} else {
vCounter = Number(0);
gotoAndPlay (6);
}
}
Symbol 303 MovieClip Frame 6
play();
Symbol 303 MovieClip Frame 9
if (0 < _root.allFishies.length) {
vToPull = Math.floor(Math.random() * Number(_root.allFishies.length));
_root.activeFishies.push(_root.allFishies[vToPull]);
setProperty(eval ("_root." + _root.allFishies[vToPull]), _y , Number(_root.TOP_BOUND) + Number(Math.random() * Number(_root.BOTTOM_BOUND - Number(_root.TOP_BOUND))));
Set(("_root." + _root.allFishies[vToPull]) + ".status", "active");
Set(("_root." + _root.allFishies[vToPull]) + ".vAttackedDiver", false);
_root.allFishies.splice(vToPull, 1);
}
Symbol 303 MovieClip Frame 12
gotoAndPlay (3);
Symbol 305 MovieClip Frame 1
var vCounter = Number(0);
var vToPull;
stop();
Symbol 305 MovieClip Frame 3
play();
Symbol 305 MovieClip Frame 8
vCounter++;
if (vCounter < 5) {
gotoAndPlay (3);
} else {
vCounter = Number(0);
gotoAndPlay (13);
}
Symbol 305 MovieClip Frame 13
play();
Symbol 305 MovieClip Frame 20
if (0 < _root.allMines.length) {
vToPull = Math.floor(Math.random() * Number(_root.allMines.length));
_root.activeMines.push(_root.allMines[vToPull]);
setProperty(eval ("_root." + _root.allMines[vToPull]), _y , Number(_root.TOP_BOUND) + Number(Math.random() * Number(_root.BOTTOM_BOUND - Number(_root.TOP_BOUND))));
Set(("_root." + _root.allMines[vToPull]) + ".status", "active");
eval ("_root." + _root.allMines[vToPull]).gotoAndStop("base");
_root.allMines.splice(vToPull, 1);
}
Symbol 305 MovieClip Frame 24
gotoAndPlay (3);
Symbol 307 MovieClip Frame 1
var vCounter = Number(0);
var vToPull;
stop();
Symbol 307 MovieClip Frame 3
play();
Symbol 307 MovieClip Frame 8
vCounter++;
if (_root.gSkillLevel == "cadet") {
if (10 < vCounter) {
gotoAndPlay (9);
} else {
gotoAndPlay (3);
}
} else if (_root.gSkillLevel == "commando") {
if (15 < vCounter) {
gotoAndPlay (9);
} else {
gotoAndPlay (3);
}
}
Symbol 307 MovieClip Frame 9
play();
Symbol 307 MovieClip Frame 12
if (0 < _root.allOxyTanks.length) {
vToPull = Math.floor(Math.random() * Number(_root.allOxyTanks.length));
_root.activeOxyTanks.push(_root.allOxyTanks[vToPull]);
setProperty(eval ("_root." + _root.allOxyTanks[vToPull]), _y , Number(_root.TOP_BOUND) + Number(Math.random() * Number(_root.BOTTOM_BOUND - Number(_root.TOP_BOUND))));
Set(("_root." + _root.allOxyTanks[vToPull]) + ".status", "active");
eval ("_root." + _root.allOxyTanks[vToPull]).gotoAndStop("base");
_root.allOxyTanks.splice(vToPull, 1);
}
Symbol 307 MovieClip Frame 16
vCounter = Number(0);
gotoAndPlay (3);
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 2
stop();
Symbol 308 MovieClip Frame 3
stop();
Symbol 313 Button
on (release) {
fnChangeLevel();
}
Symbol 352 Button
on (release) {
if ((_root.gConstantsSet == true) && (_root.gInGame == true)) {
_root.gotoAndStop("resume");
} else if ((_root.gLevelChosen == true) && (_root.gPlayAgain == false)) {
_root.gotoAndStop("instructions");
} else if (_root.gResumeFrame == null) {
_root.gotoAndStop("endtitle");
} else {
_root.gotoAndStop("endscreens");
}
}
Symbol 413 Button
on (release) {
if ((_root.gConstantsSet == true) && (_root.gInGame == true)) {
_root.gotoAndStop("resume");
} else if ((_root.gLevelChosen == true) && (_root.gPlayAgain == false)) {
_root.gotoAndStop("instructions");
} else if (_root.gResumeFrame == null) {
_root.gotoAndStop("endtitle");
} else {
_root.gotoAndStop("endscreens");
}
}
Symbol 414 MovieClip Frame 1
play();
Symbol 414 MovieClip Frame 135
stop();