Frame 1
fscommand ("showmenu", "false");
Frame 3
var loadAmount = _totalframes;
if (_framesloaded == loadAmount) {
gotoAndPlay (8);
} else {
loaded = Math.round(getBytesLoaded() / 1024);
total = Math.round(getBytesTotal() / 1024);
percent = Math.round((loaded / total) * 100);
loadBar._width = loadBarHousing._width * (percent / 100);
gotoAndPlay (2);
}
Frame 8
stop();
Frame 9
stop();
Frame 10
function resetMax() {
mc_max._x = 275;
mc_max._y = 60;
mc_max._xscale = 100;
mc_max._rotation = 0;
mc_max.gotoAndStop("maxStill");
}
function sumObjects() {
for (i in this) {
if ((typeof(this[i]) == "movieclip") && (i.substring(0, 7) == "objectA")) {
noObjects = noObjects + 1;
}
if ((typeof(this[i]) == "movieclip") && (i.substring(0, 7) == "objectB")) {
noBonus = noBonus + 1;
}
}
}
function setObjects() {
maxLife.gotoAndStop("max" + maxDives);
for (i in this) {
if (i.substring(0, 7) == "objectA") {
this[i].gotoAndStop(1);
cnumber = Math.floor(Math.random() * 6) + 1;
this[i].crystalType.gotoAndStop("c" + cnumber);
}
if (i.substring(0, 7) == "objectB") {
this[i].gotoAndStop(1);
t = Math.floor(Math.random() * toolArray.length);
tnumber = toolArray[t];
this[i].toolType.gotoAndStop("t" + tnumber);
toolArray.splice(t, 1);
}
}
}
function sumPlants() {
for (i in this) {
if ((typeof(this[i]) == "movieclip") && (i.substring(0, 8) == "airPlant")) {
noPlants = noPlants + 1;
}
}
}
_global.game1_root = this;
level = 1;
maxDives = 3;
airSupply = 100;
noObjects = 0;
noBonus = 0;
noPlants = 0;
totalPoints = 20;
gamePoints = 0;
bonusPoints = 0;
timeCounter = 0;
totalScore = 0;
fishNumber = 3;
bubbleNumber = 2;
toolArray = [1, 2, 3];
controlLock = false;
pauseLock = false;
helpLock = false;
gameOver = false;
timeStart = true;
maxHorizontal = true;
reset = false;
mc_gameButtons.gotoAndStop("buttonsOn");
mc_seaScape.gotoAndStop("level01");
resetMax();
sumObjects();
setObjects();
sumPlants();
Instance of Symbol 189 MovieClip "mc_max" in Frame 10
onClipEvent (load) {
swim = 1;
bouyMax = 1;
decay = 0.9;
maxSpeed = 4;
airUse = 0.5;
airGain = 4;
bubbleAir = 30;
fishAir = 10;
whopperAir = 25;
airGone = false;
xSpeed = 0;
ySpeed = 0;
}
onClipEvent (enterFrame) {
if (_parent.pauseLock == false) {
this.mc_maxSwim.play();
this.mc_maxSurface.play();
if (_parent.controlLock == false) {
if (Key.isDown(37) && (Key.isDown(40))) {
_parent.maxHorizontal = true;
xSpeed = xSpeed - swim;
ySpeed = ySpeed - swim;
this._xscale = 100;
this._rotation = -35;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
} else if (Key.isDown(39) && (Key.isDown(40))) {
_parent.maxHorizontal = false;
xSpeed = xSpeed + swim;
ySpeed = ySpeed - swim;
this._xscale = -100;
this._rotation = 35;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
} else if (Key.isDown(37) && (Key.isDown(38))) {
_parent.maxHorizontal = true;
xSpeed = xSpeed - swim;
this._xscale = 100;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
if (this._y > 61) {
ySpeed = ySpeed + swim;
this._rotation = 35;
} else {
this._rotation = 0;
}
} else if (Key.isDown(39) && (Key.isDown(38))) {
_parent.maxHorizontal = false;
xSpeed = xSpeed + swim;
this._xscale = -100;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
if (this._y > 61) {
ySpeed = ySpeed + swim;
this._rotation = -35;
} else {
this._rotation = 0;
}
} else if (Key.isDown(37)) {
_parent.maxHorizontal = true;
xSpeed = xSpeed - swim;
this._xscale = 100;
this._rotation = 0;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
} else if (Key.isDown(39)) {
_parent.maxHorizontal = false;
xSpeed = xSpeed + swim;
this._xscale = -100;
this._rotation = 0;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
} else if (Key.isDown(38)) {
if (this._y > 61) {
ySpeed = ySpeed + swim;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
if (_parent.maxHorizontal) {
this._rotation = 55;
} else {
this._rotation = -65;
}
} else {
this._rotation = 0;
this.gotoAndStop("maxStill");
_parent.maxSwim = false;
}
} else if (Key.isDown(40)) {
ySpeed = ySpeed - swim;
this.gotoAndStop("maxSwim");
_parent.maxSwim = true;
if (_parent.maxHorizontal) {
this._rotation = -65;
} else {
this._rotation = 55;
}
} else {
this._rotation = 0;
this.gotoAndStop("maxStill");
_parent.maxSwim = false;
}
}
xSpeed = xSpeed * decay;
ySpeed = ySpeed * decay;
if ((xSpeed < 0.1) && (xSpeed > -0.1)) {
xSpeed = 0;
}
if ((ySpeed < 0.1) && (ySpeed > -0.1)) {
ySpeed = 0;
}
speed = Math.sqrt((xSpeed * xSpeed) + (ySpeed * ySpeed));
if (speed > maxSpeed) {
xSpeed = xSpeed * (maxSpeed / speed);
ySpeed = ySpeed * (maxSpeed / speed);
}
if (_parent.levelComplete) {
xSpeed = xSpeed * 0;
ySpeed = ySpeed * 0;
_parent.levelComplete = false;
}
this._y = this._y - (ySpeed + bouyMax);
this._x = this._x + xSpeed;
if ((this._y > 61) && (airGone == false)) {
if (_parent.airSupply > 0) {
_parent.airSupply = _parent.airSupply - airUse;
_parent.airSupplyBar._xscale = _parent.airSupply;
} else {
_parent.airSupply = 0;
_parent.airSupplyBar._xscale = 0;
_parent.maxDives = _parent.maxDives - 1;
_parent.maxLife.gotoAndStop("max" + _parent.maxDives);
airGone = true;
bouyMax = 8;
_parent.controlLock = true;
this.gotoAndStop("maxSurface");
this._rotation = 0;
}
}
if ((this._y < 61) && (airGone == false)) {
if (_parent.airSupply < 100) {
_parent.airSupply = _parent.airSupply + airGain;
_parent.airSupplyBar._xscale = _parent.airSupply;
} else {
_parent.airSupply = 100;
_parent.airSupplyBar._xscale = 100;
_parent.controlLock = false;
bouyMax = 1;
}
}
if ((this._y < 61) && (airGone == true)) {
this.gotoAndStop("maxStill");
airGone = false;
}
_parent.airGone = airGone;
if (this._y < 60) {
this._y = 60;
}
if (this._x < (0 + (this._width / 2))) {
this._x = 0 + (this._width / 2);
xSpeed = 0;
}
if (this._x > (550 - (this._width / 2))) {
this._x = 550 - (this._width / 2);
xSpeed = 0;
}
if (_parent.airGone == false) {
trace((this + " : ") + this._x);
if (_parent.mc_seaScape.mc_seaBottom.hitTest(this._x + (this._parent._x + 18), this._y + (this._parent._y + 18), true)) {
trace("Hit: 1");
this._x = this._x - xSpeed;
xSpeed = -2;
ySpeed = 2;
} else if (_parent.mc_seaScape.mc_seaBottom.hitTest(this._x - (18 - this._parent._x), this._y - this._parent._y, true)) {
trace("Hit: 2");
this._x = this._x - (-xSpeed);
this._y = this._y + (ySpeed + bouyMax);
xSpeed = 2;
ySpeed = -2.5;
} else if (_parent.mc_seaScape.mc_seaBottom.hitTest(this._x - (18 - this._parent._x), this._y + (this._parent._y + 18), true)) {
trace("Hit: 3");
this._x = this._x - xSpeed;
xSpeed = 2;
ySpeed = 2;
} else if (_parent.mc_seaScape.mc_seaBottom.hitTest(this._x + (this._parent._x + 18), this._y - this._parent._y, true)) {
trace("Hit: 4");
this._x = this._x - xSpeed;
this._y = this._y + (ySpeed + bouyMax);
xSpeed = -2;
ySpeed = -2.5;
}
for (i in _parent.mc_fishLife) {
if (i.substring(0, 4) == "fish") {
if (this.hitTest(_parent.mc_fishLife[i].objectHit)) {
_parent.mc_fishLife[i].gotoAndStop("fishHit_off");
_parent.mc_fishLife[i].speedHit = 10;
this.gotoAndStop("maxHit");
xSpeed = 0;
ySpeed = 0;
if (_parent.airSupply > fishAir) {
_parent.airSupply = _parent.airSupply - fishAir;
_parent.airSupplyBar._xscale = _parent.airSupply;
} else {
_parent.airSupply = 0;
_parent.airSupplyBar._xscale = 0;
}
}
}
}
for (i in _parent.mc_whopperLife) {
if (i.substring(0, 7) == "whopper") {
if (this.hitTest(_parent.mc_whopperLife[i].objectHit)) {
_parent.mc_whopperSound.play();
_parent.mc_whopperLife[i].gotoAndStop("whopperHit_off");
_parent.mc_whopperLife[i].speedHit = 10;
this.gotoAndStop("maxHit");
xSpeed = 0;
ySpeed = -20;
if (_parent.airSupply > whopperAir) {
_parent.airSupply = _parent.airSupply - whopperAir;
_parent.airSupplyBar._xscale = _parent.airSupply;
} else {
_parent.airSupply = 0;
_parent.airSupplyBar._xscale = 0;
}
}
}
}
if (_parent.airGone == false) {
for (i in _parent.mc_airBubble) {
if (i.substring(0, 6) == "bubble") {
if (this.hitTest(_parent.mc_airBubble[i].bubble_hit)) {
_parent.mc_airBubble[i].play();
if (_parent.airSupply < (100 - bubbleAir)) {
_parent.airSupply = _parent.airSupply + bubbleAir;
_parent.airSupplyBar._xscale = _parent.airSupply;
} else {
_parent.airSupply = 100;
_parent.airSupplyBar._xscale = 100;
}
}
}
}
for (i in _parent) {
if (i.substring(0, 7) == "objectA") {
if (this.hitTest(_parent[i].objectHit)) {
_parent.mc_objectSound.play();
_parent[i].gotoAndStop(2);
_parent.gamePoints = _parent.gamePoints + 1;
_parent.totalScore = _parent.totalScore + 1;
}
}
if (i.substring(0, 7) == "objectB") {
if (this.hitTest(_parent[i].objectHit)) {
_parent.mc_objectSound.play();
_parent[i].gotoAndStop(2);
_parent.bonusPoints = _parent.bonusPoints + 1;
_parent.totalScore = _parent.totalScore + 1;
}
}
}
}
}
} else {
this.mc_maxSwim.stop();
this.mc_maxSurface.stop();
}
}
Instance of Symbol 199 MovieClip "mc_scoreClip" in Frame 10
onClipEvent (enterFrame) {
_parent.levelScore = _parent.gamePoints + _parent.bonusPoints;
_parent.levelPoints = _parent.noObjects + _parent.noBonus;
if (((_parent.maxDives < 1) || (_parent.levelScore == _parent.levelPoints)) && (_parent.gameOver == false)) {
_parent.pauseLock = true;
_parent.gameOver = true;
_parent.mc_movieClip.attachMovie("mc_gameOverClip", "gameOver", 1);
_parent.mc_gameButtons.gotoAndStop("buttonsOff");
_parent.levelComplete = true;
if (_parent.totalScore != _parent.totalPoints) {
if (_parent.levelScore == _parent.levelPoints) {
_parent.mc_movieClip.gameOver.gotoAndStop("levelComplete");
} else if (_parent.totalScore < 10) {
_parent.mc_movieClip.gameOver.gotoAndStop("gameZero");
} else {
_parent.mc_movieClip.gameOver.gotoAndStop("gameOver");
}
} else {
_parent.mc_movieClip.gameOver.gotoAndStop("gameComplete");
}
}
}
Frame 11
stop();
Frame 19
level = 2;
airSupply = 100;
noObjects = 0;
noBonus = 0;
noPlants = 0;
gamePoints = 0;
bonusPoints = 0;
resetMax();
Frame 20
stop();
fishNumber = 3;
fishArray = new Array();
directFishArray = new Array();
bubbleNumber = 1;
toolArray = [1, 2, 3];
controlLock = false;
pauseLock = false;
helpLock = false;
gameOver = false;
timeStart = false;
maxHorizontal = true;
reset = false;
mc_gameButtons.gotoAndStop("buttonsOn");
sumObjects();
setObjects();
sumPlants();
Frame 29
level = 3;
airSupply = 100;
noObjects = 0;
noBonus = 0;
noPlants = 0;
gamePoints = 0;
bonusPoints = 0;
resetMax();
Frame 30
stop();
fishNumber = 2;
fishArray = new Array();
directFishArray = new Array();
whopperNumber = 1;
whopperArray = new Array();
directWhopperArray = new Array();
bubbleNumber = 1;
toolArray = [1, 2, 3];
controlLock = false;
pauseLock = false;
helpLock = false;
gameOver = false;
timeStart = false;
maxHorizontal = true;
reset = false;
mc_gameButtons.gotoAndStop("buttonsOn");
sumObjects();
setObjects();
sumPlants();
Symbol 28 MovieClip [mc_gameOverClip] Frame 1
stop();
continue_btn.onRelease = function () {
gotoAndStop (15);
};
Symbol 28 MovieClip [mc_gameOverClip] Frame 5
stop();
Symbol 28 MovieClip [mc_gameOverClip] Frame 10
stop();
Symbol 28 MovieClip [mc_gameOverClip] Frame 15
stop();
quit_btn.onRelease = function () {
_parent._parent._parent.gameObjArray[gameSelected].registerScore(_parent._parent.level, _parent._parent.totalScore);
if (game1_root == _root) {
_parent._parent.gotoAndStop("mainMenu");
} else {
game1_root._parent.quitGame();
}
};
newGame_btn.onRelease = function () {
_parent._parent._parent.gameObjArray[gameSelected].registerScore(_parent._parent.level, _parent._parent.totalScore);
_parent._parent.gotoAndPlay("startLevel01");
_parent._parent.mc_movieClip.gameOver.removeMovieClip();
};
Symbol 28 MovieClip [mc_gameOverClip] Frame 20
stop();
continue_btn.onRelease = function () {
_parent._parent.gotoAndStop("startLevel0" + (_parent._parent.level + 1));
_parent._parent.mc_seaScape.play();
_parent._parent.mc_movieClip.gameOver.removeMovieClip();
};
Symbol 32 MovieClip [bubble_action] Frame 1
stop();
bubblePlay = true;
Symbol 32 MovieClip [bubble_action] Frame 11
stop();
bubblePlay = false;
Symbol 32 MovieClip [bubble_action] Frame 12
bubblePlay = true;
Symbol 32 MovieClip [bubble_action] Frame 22
stop();
bubblePlay = false;
_parent.timeStart = true;
this.removeMovieClip();
this._name;
Symbol 43 MovieClip Frame 10
stop();
Symbol 45 MovieClip Frame 10
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 1
_parent._parent._parent.bubblePlay = true;
Symbol 65 MovieClip Frame 11
stop();
_parent._parent._parent.bubblePlay = false;
a = _parent._name.substring(6, 7);
var i = 0;
while (i < _parent._parent._parent.bubbleArray.length) {
if (_parent._parent._parent.bubbleArray[i] == a) {
_parent._parent._parent.bubbleArray.splice(i, 1);
removeMovieClip(_parent);
}
i++;
}
Symbol 89 MovieClip Frame 69
mc_soundClip.play();
Symbol 89 MovieClip Frame 111
mc_soundClip.play();
Symbol 92 Button
on (release) {
_parent.gotoAndStop("mainMenu", "mainMenu");
}
Symbol 93 Button
on (release) {
_parent._parent.mc_gameButtons.gotoAndStop("buttonsOn");
_parent._parent.pauseLock = false;
_parent._parent.helpLock = false;
_parent._parent.mc_movieClip.helpClip.removeMovieClip();
}
Symbol 94 MovieClip [mc_helpClip] Frame 1
stop();
Symbol 122 Button
on (release) {
gotoAndPlay (10);
}
Symbol 124 Button
on (release) {
gotoAndPlay (9);
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 16
stop();
_parent.gotoAndStop("level02");
Symbol 134 MovieClip Frame 30
stop();
_parent.gotoAndStop("level03");
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 4
stop();
Symbol 153 MovieClip Frame 11
stop();
Symbol 156 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 2
stop();
Symbol 156 MovieClip Frame 3
stop();
Symbol 156 MovieClip Frame 4
stop();
Symbol 156 MovieClip Frame 5
stop();
Symbol 156 MovieClip Frame 6
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
stop();
Symbol 158 MovieClip Frame 10
stop();
Symbol 159 MovieClip Frame 10
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 2
stop();
Symbol 160 MovieClip Frame 3
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Symbol 186 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 2
stop();
Symbol 186 MovieClip Frame 3
stop();
Symbol 186 MovieClip Frame 4
stop();
Symbol 186 MovieClip Frame 5
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 2
stop();
Symbol 188 MovieClip Frame 1
fishArray = new Array();
directFishArray = new Array();
Instance of Symbol 187 MovieClip "mc_fish" in Symbol 188 MovieClip Frame 1
onClipEvent (load) {
function fishD(No) {
var direction = Math.floor(Math.random() * No);
return(direction);
}
function newFish(fishNo, direction) {
duplicateMovieClip ("_parent.mc_fish", "fish" + fishNo, fishNo);
var fishName = eval ("_parent.fish" + fishNo);
fishName.fishType.gotoAndStop(Math.floor(Math.random() * 5) + 1);
fishName._y = Math.floor(Math.random() * 180) + 110;
if (direction == 0) {
fishName._y = Math.floor(Math.random() * 180) + 110;
fishName._x = Math.floor(Math.random() * 200) + 550;
} else {
fishName._xscale = -100;
fishName._y = Math.floor(Math.random() * 180) + 110;
fishName._x = Math.floor(Math.random() * -200);
}
}
speed = Math.round(Math.random() * 4) + 2;
speedHit = 0;
decay = 0.95;
maxSpeed = 10;
}
onClipEvent (enterFrame) {
if (_parent._parent.pauseLock == false) {
if (_parent.fishArray.length < _parent._parent.fishNumber) {
var i = 0;
while (i < _parent._parent.fishNumber) {
if (_parent.fishArray[i] != i) {
var d = fishD(2);
newFish(i, d);
_parent.fishArray.splice(i, 0, i);
_parent.directFishArray.splice(i, 0, d);
}
i++;
}
}
if (_name != "mc_fish") {
a = _name.substring(4, 5);
if ((_parent.directFishArray[a] == 0) && (_x < (_parent._parent._x - 200))) {
_parent.fishArray.splice(a, 1);
_parent.directFishArray.splice(a, 1);
this.removeMovieClip();
}
if ((_parent.directFishArray[a] == 1) && (_x > (_parent._parent._x + 600))) {
_parent.fishArray.splice(a, 1);
_parent.directFishArray.splice(a, 1);
this.removeMovieClip();
}
}
if (_name != "mc_fish") {
a = _name.substring(4, 5);
if (_parent.directFishArray[a] == 0) {
speedHit = speedHit * decay;
_x = (_x - (speed + speedHit));
}
if (_parent.directFishArray[a] == 1) {
speedHit = speedHit * decay;
_x = (_x + (speed + speedHit));
}
if (speedHit < 1) {
gotoAndStop (1);
}
}
fishType.fishAction.play();
} else {
fishType.fishAction.stop();
}
}
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 2
stop();
Symbol 189 MovieClip Frame 3
stop();
Symbol 189 MovieClip Frame 4
stop();
Symbol 192 MovieClip Frame 1
function timeSet() {
timeDelay = Math.floor(Math.random() * 3) + 1;
}
function newBubble(bubbleNo) {
duplicateMovieClip ("mc_bubble", "bubble" + bubbleNo, bubbleNo);
var bubbleName = eval ("bubble" + bubbleNo);
pnumber = Math.floor(Math.random() * _parent.noPlants) + 1;
for (i in _parent) {
if (i.substring(0, 9) == ("airPlant" + pnumber)) {
bubbleName._y = _parent[i]._y - 22;
bubbleName._x = _parent[i]._x;
_parent[i].airPlant_mc.play();
}
}
}
bubbleArray = [0];
airPlantNo = 0;
timeCounter = 0;
timeDelay = 1;
timeStart = true;
Instance of Symbol 32 MovieClip [bubble_action] "mc_bubble" in Symbol 192 MovieClip Frame 1
onClipEvent (load) {
bouyBubble = 2;
}
onClipEvent (enterFrame) {
if (_parent._parent.pauseLock == false) {
if (_name != "mc_bubble") {
if (bubblePlay) {
this.play();
}
}
if (_name != "mc_bubble") {
if (_y < (_parent._parent._y + 80)) {
_y = 80;
this.play();
}
if (_parent._parent.mc_seaScape.mc_seaBottom.hitTest(this._x + 53, this._y + 17, true)) {
this.play();
} else if (_parent._parent.mc_seaScape.mc_seaBottom.hitTest(this._x - -37, this._y - -1, true)) {
this.play();
} else if (_parent._parent.mc_seaScape.mc_seaBottom.hitTest(this._x - -37, this._y + 17, true)) {
this.play();
} else if (_parent._parent.mc_seaScape.mc_seaBottom.hitTest(this._x + 53, this._y - -1, true)) {
this.play();
}
}
if (_name != "mc_bubble") {
_y = (_y - bouyBubble);
}
} else if (_parent._parent.pauseLock) {
if (_name != "mc_bubble") {
this.stop();
}
}
}
Instance of Symbol 191 MovieClip in Symbol 192 MovieClip Frame 1
onClipEvent (load) {
timeCounter = 0;
bubbleCount = 0;
}
onClipEvent (enterFrame) {
if (_parent._parent.pauseLock == false) {
_parent._parent.bubbleCount = bubbleCount;
if (_parent.timeStart) {
if (_parent.reset) {
timeCounter = 0;
_parent.reset = false;
}
timeCounter = timeCounter + 41.6666666666667;
t = timeCounter;
sec = int(t / 1000);
if (sec == _parent.timeDelay) {
_parent.timeStart = false;
_parent.reset = true;
_parent.timeSet();
_parent.newBubble(bubbleCount++);
_parent.timeStart = true;
}
if (bubbleCount > 6) {
bubbleCount = 0;
}
}
}
}
Symbol 197 MovieClip Frame 1
stop();
help_btn.onRelease = function () {
if ((_parent.pauseLock == false) && (_parent.helpLock == false)) {
_parent.mc_movieClip.attachMovie("mc_helpClip", "helpClip", 1);
_parent.mc_movieClip.helpClip.gotoAndStop("gameHelp");
gotoAndStop (5);
_parent.pauseLock = true;
_parent.helpLock = true;
}
};
pause_btn.onRelease = function () {
if ((_parent.helpLock == false) && (_parent.pauseLock == false)) {
_parent.mc_movieClip.attachMovie("mc_gamePause", "gamePause", 1);
gotoAndStop (10);
_parent.pauseLock = true;
}
};
quit_btn.onRelease = function () {
_parent._parent.gameObjArray[gameSelected].registerScore(_parent.level, _parent.totalScore);
if (game1_root == _root) {
_parent.gotoAndStop("mainMenu");
} else {
game1_root._parent.quitGame();
}
};
Symbol 197 MovieClip Frame 5
stop();
Symbol 197 MovieClip Frame 10
stop();
pause_btn.onRelease = function () {
if ((_parent.pauseLock == true) && (_parent.helpLock == false)) {
_parent.mc_movieClip.gamePause.removeMovieClip();
gotoAndStop (1);
_parent.pauseLock = false;
}
};
Symbol 202 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 2
stop();
Instance of Symbol 204 MovieClip "mc_whopper" in Symbol 205 MovieClip Frame 1
onClipEvent (load) {
function fishD(No) {
var direction = Math.floor(Math.random() * No);
return(direction);
}
function newWhopper(whopperNo, direction) {
duplicateMovieClip ("_parent.mc_whopper", "whopper" + whopperNo, whopperNo);
var whopperName = eval ("_parent.whopper" + whopperNo);
whopperName._y = Math.floor(Math.random() * 180) + 110;
if (direction == 0) {
whopperName._y = 90;
whopperName._x = 630;
} else {
whopperName._xscale = -100;
whopperName._y = 90;
whopperName._x = -80;
}
_parent._parent.mc_whopperSound.play();
}
speed = Math.round(Math.random() * 3) + 1;
speedHit = 0;
decay = 0.95;
}
onClipEvent (enterFrame) {
if (_parent._parent.pauseLock == false) {
if (_parent._parent.whopperArray.length < _parent._parent.whopperNumber) {
var i = 0;
while (i < _parent._parent.whopperNumber) {
if (_parent._parent.whopperArray[i] != i) {
var d = fishD(2);
newWhopper(i, d);
_parent._parent.whopperArray.splice(i, 0, i);
_parent._parent.directWhopperArray.splice(i, 0, d);
}
i++;
}
}
if (_name != "mc_whopper") {
a = _name.substring(7, 8);
if ((_parent._parent.directWhopperArray[a] == 0) && (_x < (_parent._parent._x - 80))) {
_parent._parent.whopperArray.splice(a, 1);
_parent._parent.directWhopperArray.splice(a, 1);
removeMovieClip(this);
}
if ((_parent._parent.directWhopperArray[a] == 1) && (_x > (_parent._parent._x + 630))) {
_parent._parent.whopperArray.splice(a, 1);
_parent._parent.directWhopperArray.splice(a, 1);
removeMovieClip(this);
}
}
if (_name != "mc_whooper") {
a = _name.substring(7, 8);
if (_parent._parent.directWhopperArray[a] == 0) {
speedHit = speedHit * decay;
_x = (_x - (speed + speedHit));
}
if (_parent._parent.directWhopperArray[a] == 1) {
speedHit = speedHit * decay;
_x = (_x + (speed + speedHit));
}
if (speedHit < 1) {
gotoAndStop (1);
}
}
mc_whopperAction.play();
} else {
mc_whopperAction.stop();
}
}