Frame 1
_global.distance = function (obj1, obj2) {
var _local3 = Math.abs(obj1._x - obj2._x);
var _local2 = Math.abs(obj1._y - obj2._y);
var _local1 = Math.sqrt(Math.pow(_local3, 2) + Math.pow(_local2, 2));
return(_local1);
};
Array.prototype.getItemIndex = function (tItem) {
var _local3 = this.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this[_local2] == tItem) {
return(_local2);
}
_local2++;
}
return(-1);
};
ASSetPropFlags(Array.prototype, "getItemIndex", 1);
this.onEnterFrame = function () {
var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
load_mc.loadbar_mc.gotoAndStop(_local3);
if (_local3 >= 100) {
delete this.onEnterFrame;
this.play();
}
};
stop();
Frame 10
snd_mc.playmenu();
Frame 25
this.play_mc.onRelease = function () {
};
Frame 63
play_mc.onRelease = function () {
this._parent.play();
};
stop();
Frame 69
this.go_mc.onRelease = function () {
};
Frame 92
go_mc.onRelease = function () {
this._parent.snd_mc.playmusic();
this._parent.play();
};
stop();
Frame 103
this.init = function () {
this.pState = "idle";
this.pEnemyTimer = 93;
this.pBoatTimer = 31;
};
this.onEnterFrame = function () {
if (this.pState == "idle") {
return(undefined);
}
var _local3 = 0;
var _local2 = 0;
if (Key.isDown(37)) {
_local3--;
} else if (Key.isDown(39)) {
_local3++;
}
if (Key.isDown(38)) {
_local2--;
} else if (Key.isDown(40)) {
_local2++;
}
this.game_mc.bod_mc.nudge(_local3, _local2);
if (Key.isDown(32)) {
this.game_mc.bod_mc.fire();
}
switch (this.pState) {
case "ripjaw" :
if ((--this.pEnemyTimer) == 0) {
var _local4 = this.game_mc.topstrip_mc.pEnemies * 30;
this.pEnemyTimer = (20 + _local4) + Math.floor(Math.random() * 15);
game_mc.generateEnemy(this.pState);
this.snd_mc.playsound("pOcto");
}
break;
case "stinkfly" :
if ((--this.pBoatTimer) != 0) {
break;
}
game_mc.fireGrenade();
var _local4 = this.game_mc.topstrip_mc.pEnemies;
this.pBoatTimer = 20 * game_mc.topstrip_mc.pEnemies;
}
};
this.init();
stop();
Frame 104
this.pTimer = 120;
this.onEnterFrame = function () {
this.game_mc.bod_mc.nudge(0, 0);
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Frame 111
if (gWon) {
this.play();
} else {
this.gotoAndPlay("score");
}
Frame 117
this.pTimer = 90;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Frame 125
snd_mc.playmenu();
Frame 133
score_mc.scoretxt.text = gSC;
_global.gWon = false;
Frame 149
playagain_mc.onRelease = function () {
this._parent.gotoAndPlay("menubuild");
};
stop();
Symbol 4 MovieClip Frame 1
this._alpha = 0;
this._parent.hitarea = this;
stop();
Symbol 9 MovieClip [mc.soundclip] Frame 1
function setVol(x) {
pVol = 100 * x;
pDive.setVolume(pVol);
pMenuLoop.setVolume(pVol);
pMenuIntro.setVolume(pVol);
pGameIntro.setVolume(pVol);
pOctoShot.setVolume(pVol);
pStinkShot.setVolume(pVol);
pOctoBoom.setVolume(pVol);
pBoom.setVolume(pVol);
pGameIntro.setVolume(pVol);
if (this.pAB == "A") {
pGameLoopA.setVolume(pVol);
pHover.setVolume(pVol);
pBoatA.setVolume(pVol * this.pBoatVol);
} else {
pGameLoopB.setVolume(pVol);
pWater.setVolume(pVol);
pBoatB.setVolume(pVol * this.pBoatVol);
}
}
function playsound(snd) {
eval (snd).start();
}
function playmenu() {
pGameIntro.stop();
pGameLoopA.stop();
pGameLoopB.stop();
pMenuIntro.stop();
pMenuLoop.stop();
pMenuIntro.start();
pMenuIntro.onSoundComplete = function () {
pMenuLoop.start(0, 999);
};
}
function playmusic() {
pMenuIntro.stop();
pMenuLoop.stop();
pGameIntro.stop();
pGameLoopA.stop();
pGameLoopB.stop();
pBoatA.stop();
pBoatB.stop();
pGameIntro.start();
pBoatA.start(0, 999);
pBoatB.start(0, 999);
pBoatA.setVolume(30);
pBoatB.setVolume(0);
pGameIntro.onSoundComplete = function () {
pGameLoopA.start(0, 999);
pGameLoopB.start(0, 999);
};
}
function water() {
pWater.start(0, 999);
}
function mutate(ab) {
this.pAB = ab;
if (this.pAB == "A") {
pGameLoopA.setVolume(pVol);
pGameLoopB.setVolume(0);
pWater.stop();
pHover.start(0, 999);
pBoatA.setVolume(pVol);
pBoatB.setVolume(0);
} else {
pHover.stop();
pWater.start(0, 999);
pGameLoopB.setVolume(pVol);
pGameLoopA.setVolume(0);
pBoatB.setVolume(30);
pBoatA.setVolume(0);
}
}
function gameover() {
pGameIntro.stop();
pGameLoopA.stop();
pGameLoopB.stop();
}
function setBoatVol(tx) {
}
function onRelease() {
if (pVol == 100) {
pVol = 0;
this.setVol(0);
gotoAndStop (3);
} else {
pVol = 100;
this.setVol(1);
gotoAndStop (2);
}
}
var pVol = 100;
var pGoto = "menu";
var pBoost = 1;
this._x = 24;
this._y = 1351;
this.pVOover = 1;
this.pAB = "B";
this.pBoatVol = 50;
var i = 1;
while (i <= 25) {
this.createEmptyMovieClip(i + "_mc", this.getNextHighestDepth());
i++;
}
var pDive = new Sound("1_mc");
pDive.attachSound("divein");
var pBoatA = new Sound("2_mc");
pBoatA.attachSound("boatA");
var pBoatB = new Sound("3_mc");
pBoatB.attachSound("boatB");
var pMenuLoop = new Sound("4_mc");
pMenuLoop.attachSound("menuloop");
var pMenuIntro = new Sound("5_mc");
pMenuIntro.attachSound("menuintro");
var pGameIntro = new Sound("6_mc");
pGameIntro.attachSound("gameintro");
var pGameLoopA = new Sound("7_mc");
pGameLoopA.attachSound("loopA");
var pGameLoopB = new Sound("8_mc");
pGameLoopB.attachSound("loopB");
var pOctoShot = new Sound("9_mc");
pOctoShot.attachSound("octoshot");
var pStinkShot = new Sound("10_mc");
pStinkShot.attachSound("stinkflyshot");
var pOctoBoom = new Sound("11_mc");
pOctoBoom.attachSound("octoboom");
var pBoom = new Sound("12_mc");
pBoom.attachSound("s-grenade");
var pSplat = new Sound("13_mc");
pSplat.attachSound("splat");
var pGrenadeLaunch = new Sound("14_mc");
pGrenadeLaunch.attachSound("s-grenadelaunch");
var pMine = new Sound("15_mc");
pMine.attachSound("s-mine");
var pOcto = new Sound("16_mc");
pOcto.attachSound("octo_robots");
var pAttack = new Sound("17_mc");
pAttack.attachSound("s-attack");
var pMutate = new Sound("18_mc");
pMutate.attachSound("s-transform");
var pMutateA = new Sound("19_mc");
pMutateA.attachSound("s-mutateA");
var pMutateW = new Sound("20_mc");
pMutateW.attachSound("s-mutateW");
var pMan0 = new Sound("21_mc");
pMan0.attachSound("s-man0");
var pMan1 = new Sound("22_mc");
pMan1.attachSound("s-man1");
var pMan2 = new Sound("23_mc");
pMan2.attachSound("s-man2");
var pHover = new Sound("24_mc");
pHover.attachSound("s-hover");
var pWater = new Sound("25_mc");
pWater.attachSound("s-underwater");
this.setVol(1);
stop();
Symbol 73 MovieClip Frame 34
stop();
Symbol 74 MovieClip [mc.octo] Frame 1
this.init = function () {
this.pX = 640 + Math.floor(Math.random() * 120);
this.pY = -20 + Math.floor(Math.random() * 280);
this.pXspeed = -6;
this.pYspeed = 0;
this.pTimer = 15;
this.pState = "enter";
this._y = this.pY;
this._x = 900;
this.pBenMutating = 0;
this.pExploded = false;
};
this.onEnterFrame = function () {
if (this.pBenMutating) {
this.pYspeed++;
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
if (this.pExploded) {
return(undefined);
}
switch (this.pState) {
case "enter" :
if ((--this.pTimer) < 0) {
this.pXspeed++;
}
this.pX = this.pX + this.pXspeed;
if (this.pXspeed == 0) {
this.pState = "idle";
this.pTimer = Math.floor(45 + (Math.random() * 30));
this.pShots = 1 + Math.ceil(Math.random() * 3);
this.gotoAndPlay("octo_turn");
}
break;
case "idle" :
if ((--this.pTimer) < 0) {
if (((--this.pShots) > 0) && (this.pExploded == false)) {
this.fire();
this.pTimer = 12;
} else if (this.pExploded == false) {
this.pState = "drift";
this.gotoAndPlay("octo_leave");
}
}
break;
case "drift" :
if (this.pXspeed > -12) {
pXspeed--;
}
this.pX = this.pX + this.pXspeed;
this._x = this.pX;
if (this.pX >= -200) {
break;
}
this._parent.removeEnemy(this);
return(undefined);
}
this._x = this.pX;
this._y = this.pY - ((this._parent.bod_mc.pY + 150) / 8);
if (((distance(this, this._parent.bod_mc) < 40) && (this.pExploded == false)) && (this._parent.bod_mc.pMutateTimer < 0)) {
this.pExploded = true;
this._parent._parent.snd_mc.playsound("pOctoBoom");
if (this._parent.bod_mc.pModeTimer < 0) {
this._parent.topstrip_mc.setEnergy(-10);
this._parent.topstrip_mc.setScore(-500);
this._parent.bod_mc.hit();
this.gotoAndPlay("octo_explode");
} else {
this._parent.topstrip_mc.setScore(2500);
this.gotoAndPlay("octo_explode");
}
}
};
this.mutate = function () {
this.pBenMutating = 1;
};
this.fire = function () {
if (this.pBenMutating) {
return(undefined);
}
this._parent.fire("drop", this);
this._parent._parent.snd_mc.playsound("pOctoShot");
};
this.init();
stop();
Symbol 74 MovieClip [mc.octo] Frame 29
stop();
Symbol 74 MovieClip [mc.octo] Frame 40
stop();
Symbol 74 MovieClip [mc.octo] Frame 63
this._parent.removeEnemy(this);
stop();
Symbol 81 MovieClip [mc.octo-drop] Frame 1
this.init = function () {
this._x = this.pX;
this._y = this.pY;
this.pXspeed = -10;
this.pYspeed = -1 + Math.floor(Math.random() * 3);
this.pBenMutating = 0;
};
this.onEnterFrame = function () {
if (this.pBenMutating) {
this.pYspeed++;
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
this._x = this.pX;
this._y = this.pY;
if (distance(this, this._parent.bod_mc) < 30) {
this._parent.topstrip_mc.setEnergy(-2);
this._parent.topstrip_mc.setScore(-50);
this._parent.binBullet(this);
}
if (this.pX < -100) {
this._parent.binBullet(this);
}
};
this.mutate = function () {
this.pBenMutating = 1;
};
this.init();
Symbol 81 MovieClip [mc.octo-drop] Frame 18
stop();
Symbol 96 MovieClip Frame 27
stop();
Symbol 97 MovieClip [mc.fly-drop] Frame 1
this.init = function () {
trace("DROP");
this._x = -1000;
this._y = -1000;
this.pSplatting = false;
this.pSplat = true;
};
this.onEnterFrame = function () {
if (this.pSplatting) {
return(undefined);
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
this._x = this.pX;
this._y = this.pY;
if ((distance(this, this._parent.boat_mc) < 24) && (this.pSplat)) {
var _local2 = this._parent.topstrip_mc.setEnemyEnergy(-2);
trace("splat: " + _local2);
if (_local2 != pTarget) {
this.pSplat = false;
} else {
this._parent.topstrip_mc.setScore(50);
this.pSplatting = true;
this.gotoAndPlay("splat");
}
}
if (this._y > 500) {
this._parent.binBullet(this);
}
};
this.init();
Symbol 97 MovieClip [mc.fly-drop] Frame 18
stop();
Symbol 97 MovieClip [mc.fly-drop] Frame 22
this._parent._parent.snd_mc.playsound("pSplat");
Symbol 97 MovieClip [mc.fly-drop] Frame 73
this._parent.binBullet(this);
Symbol 102 MovieClip [mc.mine] Frame 1
this.init = function () {
this.pX = (800 + (pMine * 300)) + Math.floor(Math.random() * 100);
this.pXspeed = -2;
this.pYspeed = 0;
this.pY = -50 + ((pMine * 100) + Math.round(Math.random() * 100));
this.pBenMutating = 0;
this.pState = "idle";
this._x = 1000;
};
this.onEnterFrame = function () {
if (this.pBenMutating) {
this.pYspeed++;
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
if (this.pX < -100) {
this.reset();
}
this._x = this.pX;
this._y = this.pY;
if (this.pState == "exploding") {
return(undefined);
}
if ((distance(this, this._parent.bod_mc) < 30) && (this._parent.bod_mc.pMutateTimer < 0)) {
this._parent.topstrip_mc.setEnergy(-10);
this._parent.topstrip_mc.setScore(-1000);
this._parent._parent.snd_mc.playsound("pMine");
this.pState = "exploding";
this.gotoAndPlay("explode");
}
};
this.reset = function () {
this.pX = (800 + (pMine * 300)) + Math.floor(Math.random() * 100);
this.pY = -50 + ((pMine * 100) + Math.round(Math.random() * 100));
this.pState = "idle";
this._x = this.pX;
this._y = this.pY;
};
this.kill = function () {
this.removeMovieClip();
};
this.mutate = function () {
this.pBenMutating = 1;
};
this.init();
stop();
Symbol 102 MovieClip [mc.mine] Frame 22
this.reset();
this.gotoAndStop("mine");
Symbol 104 MovieClip Frame 97
stop();
Symbol 123 MovieClip Frame 32
stop();
Symbol 124 MovieClip [mc.grenade] Frame 1
this.init = function () {
this.pX = this._parent.boat_mc._x;
this.pY = this._parent.boat_mc._y;
this.pYexplode = 4 + Math.floor(Math.random() * 4);
this.pState = "flying";
this._parent._parent.snd_mc.playsound("pGrenadeLaunch");
this._x = this.pX;
this._y = this.pY;
};
this.onEnterFrame = function () {
if (this.pState == "exploding") {
return(undefined);
}
this.pYspeed = this.pYspeed + this.pG;
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
this._x = this.pX;
this._y = this.pY;
if ((distance(this, this._parent.bod_mc) < 40) && (this._parent.bod_mc.pMutateTimer < 0)) {
this._parent.topstrip_mc.setScore(-100);
this._parent.topstrip_mc.setEnergy(-10);
this.explode();
}
if (this._y > 200) {
this._parent.binBullet(this);
}
};
this.explode = function () {
this.pState = "exploding";
this._parent._parent.snd_mc.playsound("pBoom");
this.gotoAndPlay("explode");
};
this.init();
stop();
Symbol 124 MovieClip [mc.grenade] Frame 38
this._parent.binBullet(this);
Symbol 152 MovieClip Frame 1
stop();
Symbol 160 MovieClip [mc.energy] Frame 1
this.init = function () {
this.pX = 4000 + Math.floor(Math.random() * 800);
this.pXspeed = -8;
this.pYspeed = 0;
this.pY = Math.round(Math.random() * 150);
this.pBenMutating = 0;
this._y = 1000;
};
this.onEnterFrame = function () {
if (this.pBenMutating) {
this.pYspeed++;
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
if (this.pX < -100) {
this.reset();
}
this._x = this.pX;
this._y = this.pY;
if ((distance(this, this._parent.bod_mc) < 30) && (this._parent.bod_mc.pMutateTimer < 0)) {
this._parent.topstrip_mc.setEnergy(20);
this._parent.topstrip_mc.setScore(250);
this._parent._parent.snd_mc.playsound("pStinkShot");
this.reset();
}
};
this.reset = function () {
this.pX = 4000 + Math.floor(Math.random() * 800);
this.pY = Math.round(Math.random() * 150);
};
this.kill = function () {
this.removeMovieClip();
};
this.mutate = function () {
this.pBenMutating = 1;
};
this.init();
stop();
Symbol 165 MovieClip [mc.explosion] Frame 1
this._parent._parent._parent.snd_mc.playsound("pBoom");
Symbol 165 MovieClip [mc.explosion] Frame 34
this.removeMovieClip();
Symbol 181 MovieClip Frame 78
stop();
Symbol 183 MovieClip [mc.splashsequence] Frame 124
this.removeMovieClip();
stop();
Symbol 197 MovieClip Frame 9
stop();
Symbol 200 MovieClip Frame 13
stop();
Symbol 207 MovieClip Frame 11
stop();
Symbol 209 MovieClip Frame 1
kNbrHearts = 10;
kMinSpeed = 2;
kMaxSpeed = 5;
kMinSway = 0.0001;
kMaxSway = 0.01;
kSwayAmplitude = 60;
this.pTimerBase = getTimer();
SW = Stage.width;
SH = Stage.height;
moveHeart = function () {
var _local2 = (this.phase + getTimer()) - (this.pTimerBase * this.sway);
var sway = Math.sin(_local2);
this._x = this._x + sway;
this._y = this._y - this.speed;
if (this._y < (-this._height)) {
this._y = SH + this._height;
this.pTimerBase = getTimer();
}
};
i = 1;
while (i <= kNbrHearts) {
var mc = this.attachMovie("hearts", "heart_" + i, i, {_x:random(SW), _y:random(SH)});
mc._x = random(SW);
mc._y = random(SH);
mc.onEnterFrame = moveHeart;
mc._alpha = 100;
mc.phase = (Math.random() * 2) * Math.PI;
mc.speed = kMinSpeed + (Math.random() * (kMaxSpeed - kMinSpeed));
mc.sway = kMinSway + (Math.random() * (kMaxSway - kMinSway));
mc.gotoAndStop(random(3) + 1);
i++;
}
Symbol 214 MovieClip Frame 9
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 15
this.gotoAndPlay("swim");
Symbol 236 MovieClip Frame 32
this.gotoAndPlay("swim");
Symbol 242 MovieClip Frame 16
this.gotoAndPlay("swim");
Symbol 243 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 127
this.gotoAndPlay("swim");
Symbol 259 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 15
stop();
Symbol 284 MovieClip Frame 30
stop();
Symbol 284 MovieClip Frame 32
this.pTimer = 30;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 284 MovieClip Frame 46
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 21
this.pTimer = 30;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 306 MovieClip Frame 33
stop();
Symbol 306 MovieClip Frame 45
this.pTimer = 30;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 306 MovieClip Frame 57
stop();
Symbol 306 MovieClip Frame 68
this.pTimer = 30;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 306 MovieClip Frame 81
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 39
stop();
Symbol 318 MovieClip Frame 39
stop();
Symbol 322 MovieClip Frame 39
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 14
stop();
Symbol 323 MovieClip Frame 27
stop();
Symbol 323 MovieClip Frame 38
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 9
gotoAndPlay (1);
Symbol 338 MovieClip Frame 1
_global.gSC = 0;
this.pBenergy = 100;
this.pEenergy = 100;
this.pEnemies = 3;
this.setScore = function (tx) {
_global.gSC = _global.gSC + tx;
if (_global.gSC < 0) {
_global.gSC = 0;
}
this.score_txt.text = String(gSC);
};
this.setBenState = function (tstate) {
this.ben_mc.gotoAndPlay("mutate_to" + tstate);
};
this.setEnemyState = function () {
enemystate_mc.play();
this._parent.boat_mc.doods_mc.play();
};
this.setEnergy = function (te) {
this.pBenergy = this.pBenergy + te;
if (this.pBenergy > 100) {
this.pBenergy = 100;
}
this.energy_mc.gotoAndStop(100 - this.pBenergy);
if (this.pBenergy <= 0) {
this._parent.bod_mc.kill();
trace("BEN'S DEAD");
}
};
this.alert = function (talert) {
this.gotoAndPlay(talert);
};
this.setEnemyEnergy = function (te) {
if (this.pEnemies == 0) {
return(0);
}
this.pEenergy = this.pEenergy + te;
this.enemyenergy_mc.gotoAndStop(100 - this.pEenergy);
if (this.pEenergy == 10) {
this.alert("down");
}
if (this.pEenergy <= 0) {
this.pEnemies--;
trace("number of enemies left: " + this.pEnemies);
this._parent._parent.snd_mc.playsound("pMan" + this.pEnemies);
this._parent.grenadeBoom();
if (this.pEnemies > 0) {
this.setEnemyState();
this.pEenergy = 100;
this._parent.createMines(3 - this.pEnemies);
this.enemyenergy_mc.gotoAndStop(100 - this.pEenergy);
this._parent.bod_mc.drop();
} else {
this._parent.bod_mc.grabGirl();
trace("GAME OVER");
}
}
return(this.pEnemies);
};
stop();
Symbol 338 MovieClip Frame 39
stop();
Symbol 338 MovieClip Frame 75
stop();
Symbol 338 MovieClip Frame 111
stop();
Symbol 340 MovieClip Frame 35
stop();
Symbol 348 MovieClip Frame 16
gotoAndPlay (1);
Symbol 351 MovieClip Frame 1
Symbol 351 MovieClip Frame 231
this.gotoAndPlay("loop");
Symbol 354 MovieClip Frame 199
gotoAndPlay (1);
Symbol 361 MovieClip Frame 1
this.init = function () {
this.pX = 234;
this.pXspeed = 3;
this.pInitTimer = 120;
this.pSpeedBurst = 0;
this.pTFTimer = 0;
this.pBoatVol = 100;
this.pExit = false;
this.Exp = 0;
};
this.onEnterFrame = function () {
if ((--this.pInitTimer) > 0) {
return(undefined);
}
if (this.pInitTimer == 0) {
this._parent.boatbase_mc.pFollow = true;
}
if (this.pExit) {
this.pXspeed = this.pXspeed - 0.5;
this.pX = this.pX + this.pXspeed;
this._x = this.pX;
return(undefined);
}
if (this.pTFTimer > 0) {
this.pTFTimer--;
if (this.pTFTimer == 0) {
this._visible = true;
if (this._parent._currentframe < 230) {
this._parent.boatbase_mc._visible = true;
}
}
}
if ((--this.pSpeedBurst) > 0) {
this.pXspeed = 6;
} else {
this.pXspeed = -1;
}
this.pX = this.pX + this.pXspeed;
if ((this.pX == 480) && (this.pXspeed < 0)) {
this._parent.topstrip_mc.alert("up");
} else if ((this.pX == 401) && (this._parent.bod_mc.pExitTimer == 0)) {
trace("mutate now!");
this._parent.bod_mc.mutate();
}
if ((this.pXspeed < 0) && (this.pX < 400)) {
this.pX = 400;
}
this._x = this.pX;
this.pBoatVol = Math.floor(50 - ((this.pX - 400) / 10));
if (this.pBoatVol > 50) {
this.pBoatVol = 50;
}
if (this.pBoatVol < 0) {
this.pBoatVol = 0;
}
this._parent._parent.snd_mc.setBoatVol(this.pBoatVol);
};
this.speedBurst = function () {
this.pSpeedBurst = 180;
trace("mutate now!");
this._parent.bod_mc.mutate();
};
this.boatDeath = function () {
this.pExit = true;
this.gwen_mc._visible = false;
};
this.showMe = function (tf) {
trace("BOAT SHOW: " + tf);
if (tf == false) {
this._visible = tf;
this._parent.boatbase_mc._visible = tf;
} else {
this.pTFTimer = 2;
}
};
this.init();
this.speedBurst();
Symbol 361 MovieClip Frame 24
if (this.pExit == false) {
this.gotoAndPlay("loop");
}
Symbol 361 MovieClip Frame 27
this.Exp++;
var tx = (Math.floor(Math.random() * 80) - 40);
var ty = (Math.floor(Math.random() * 30) - 15);
this.attachMovie("mc.explosion", "exp" + this.Exp, this.getNextHighestDepth(), {_x:tx, _y:ty});
Symbol 361 MovieClip Frame 33
this.Exp++;
var tx = (Math.floor(Math.random() * 80) - 40);
var ty = (Math.floor(Math.random() * 30) - 15);
this.attachMovie("mc.explosion", "exp" + this.Exp, this.getNextHighestDepth(), {_x:tx, _y:ty});
Symbol 361 MovieClip Frame 41
this.Exp++;
var tx = (Math.floor(Math.random() * 80) - 40);
var ty = (Math.floor(Math.random() * 30) - 15);
this.attachMovie("mc.explosion", "exp" + this.Exp, this.getNextHighestDepth(), {_x:tx, _y:ty});
Symbol 361 MovieClip Frame 47
this.gotoAndPlay("deadloop");
Symbol 364 MovieClip Frame 1
this.pFollow = false;
this.onEnterFrame = function () {
if (this.pFollow) {
this._x = this._parent.boat_mc._x;
this._y = this._parent.boat_mc._y;
}
};
Symbol 364 MovieClip Frame 24
this.gotoAndPlay("loop");
Symbol 369 MovieClip Frame 1
this.mutate = function () {
this.gotoAndPlay("mutate");
};
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 30
stop();
Symbol 373 MovieClip Frame 80
stop();
Symbol 374 MovieClip Frame 72
gotoAndPlay (57);
Symbol 374 MovieClip Frame 78
stop();
Symbol 375 MovieClip Frame 121
stop();
Symbol 376 MovieClip Frame 1
this.init = function () {
this.pX = 106;
this.pY = 41;
this.pXspeed = 0;
this.pYspeed = 0;
this.pXmaxspeed = 8;
this.pYmaxspeed = 6;
this.pYmax = [-50, 220];
this.pState = "ripjaw";
this.pModeTimer = 0;
this.pGameFrame = 160;
this.pInitTimer = 27;
this.pHitTimer = 0;
this.gotoAndStop("ripjaw");
this._parent.setState("ripjaw");
this.pShootTimer = 0;
this.pExitTimer = 0;
this.pGirlGrabbed = 0;
this._parent.createMines(2);
this.pMutateTimer = -1;
this.pMtimer = 0;
};
this.mutate = function () {
if (this.pState == "ripjaw") {
this.pState = "ripjaw_mutate";
this.pXmaxspeed = 16;
this.pYmaxspeed = 16;
this.pYmax = [-100, 130];
this.pY = 0;
this.gotoAndPlay("ripjaw_mutate");
this._parent.topstrip_mc.setBenState("stinkfly");
} else {
this.pState = "stinkfly_mutate";
this.pXmaxspeed = 8;
this.pYmaxspeed = 6;
this.pYmax = [-50, 220];
this.pY = 100;
this.gotoAndPlay("stinkfly_mutate");
this._parent.topstrip_mc.setBenState("ripjaw");
}
this.pMutateTimer = 0;
this._alpha = 100;
this._parent._parent.snd_mc.playsound("pMutate");
this._parent.boat_mc.showMe(false);
this._parent.setState(this.pState);
this._parent.killBullets();
};
this.mutateAnim = function () {
this.pMutateTimer++;
if (this.pMutateTimer == 20) {
this._parent.removeAllEnemies();
}
if (this.pMutateTimer < 16) {
this._x = this._x + ((300 - this._x) / 3);
this._y = this._y + ((20 - this._y) / 3);
this._xscale = (this._yscale = 100 + (this.pMutateTimer * 5));
} else if (this.pMutateTimer > 44) {
this._x = this._x + ((this.pX - this._x) / 3);
this._y = this._y + ((this.pY - this._y) / 3);
this._xscale = (this._yscale = 100 + ((60 - this.pMutateTimer) * 5));
} else {
this._x = 300;
this._y = 20;
}
if (this.pMutateTimer == 60) {
this._parent.boat_mc.showMe(true);
if (this.pState == "stinkfly_mutate") {
this.pState = "ripjaw";
this._parent.pState = "ripjaw";
this._parent._parent.pState = "ripjaw";
this._parent.createMines(3);
} else {
this.pState = "stinkfly";
this._parent.pState = "stinkfly";
this._parent._parent.pState = "stinkfly";
this._parent.removeMines();
}
this.pMutateTimer = -1;
}
};
this.grabGirl = function () {
this.pExitTimer = 1;
_global.gWon = true;
};
this.kill = function () {
if ((this.pState == "dropping") || (this.pState == "floating")) {
return(undefined);
}
this._alpha = 100;
if (this.pState == "stinkfly") {
this._parent._parent.snd_mc.playsound("pMutateA");
this.gotoAndStop("bendrop");
this.pState = "dropping";
} else {
this._parent._parent.snd_mc.playsound("pMutateW");
this.gotoAndStop("benfloat");
this.pState = "floating";
}
this._parent._parent.play();
};
this.nudge = function (tx, ty) {
if (this.pInitTimer > 0) {
this.pInitTimer--;
return(undefined);
}
if (this.pMtimer > 0) {
this.pMtimer--;
if (this.pMtimer == 0) {
this._parent.boat_mc.speedBurst();
}
return(undefined);
}
if (this.pExitTimer > 0) {
if (this.pGirlGrabbed == 1) {
this.pXspeed = this.pXspeed + 0.1;
this.pYspeed = this.pYspeed - 0.2;
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
this._x = this.pX;
this._y = this.pY;
this.gotoAndStop("girl");
return(undefined);
}
ty = 0;
tx = ty;
var _local5 = (this._parent.boat_mc._x - this._x) / 10;
var _local4 = (this._parent.boat_mc._y - this._y) / 10;
this.pX = this.pX + _local5;
this.pY = this.pY + _local4;
this._x = this.pX;
this._y = this.pY;
if (distance(this, this._parent.boat_mc) < 30) {
this.pXspeed = 1;
this.pYspeed = -1;
this.pGirlGrabbed = 1;
this._parent.boat_mc.boatDeath();
this._parent._parent.play();
}
return(undefined);
}
if (this.pState == "dead") {
return(undefined);
}
if (this.pState == "dropping") {
this.pYspeed = this.pYspeed + 0.4;
this.pXspeed = -1;
this.pY = this.pY + this.pYspeed;
this.pX = this.pX + this.pXspeed;
this._x = this.pX;
this._y = this.pY;
if (this.pY > 230) {
this._parent.splash(this.pX);
this._y = 1000;
this.pState = "dead";
this.gotoAndStop("gone");
}
return(undefined);
}
if (this.pState == "floating") {
this.pYspeed = -2;
this.pY = this.pY + this.pYspeed;
if (this.pY < -80) {
this.pY = -80;
}
this._x = this.pX--;
this._y = this.pY;
return(undefined);
}
this.pShootTimer--;
if ((--this.pHitTimer) > 0) {
this._alpha = 20;
} else {
this._alpha = 100;
}
if ((--this.pModeTimer) > 0) {
tx = 32;
this.pXmaxspeed = 32;
ty = 0;
if (this.pModeTimer == 0) {
this.pXspeed = 8;
}
} else {
this.pXmaxspeed = 16;
}
if ((this.pState == "ripjaw_mutate") || (this.pState == "stinkfly_mutate")) {
this.mutateAnim();
return(undefined);
}
if (tx == 0) {
if (this.pXspeed > 0) {
this.pXspeed--;
} else if (this.pXspeed < 0) {
this.pXspeed++;
}
} else {
this.pXspeed = this.pXspeed + tx;
}
if (ty == 0) {
if (this.pYspeed > 0) {
this.pYspeed--;
} else if (this.pYspeed < 0) {
this.pYspeed++;
}
} else {
this.pYspeed = this.pYspeed + ty;
}
if (this.pXspeed > this.pXmaxspeed) {
this.pXspeed = this.pXmaxspeed;
} else if (this.pXspeed < (-this.pXmaxspeed)) {
this.pXspeed = -this.pXmaxspeed;
}
if (this.pYspeed > this.pYmaxspeed) {
this.pYspeed = this.pYmaxspeed;
} else if (this.pYspeed < (-this.pYmaxspeed)) {
this.pYspeed = -this.pYmaxspeed;
}
this.pX = this.pX + this.pXspeed;
this.pY = this.pY + this.pYspeed;
this.char_mc.gotoAndStop(60 + this.pXspeed);
if (this.pX > 550) {
this.pX = 550;
this.pXspeed = 0;
} else if (this.pX < 50) {
this.pX = 50;
this.pXspeed = 0;
}
if (this.pY > this.pYmax[1]) {
this.pY = this.pYmax[1];
this.pYspeed = 0;
} else if (this.pY < this.pYmax[0]) {
this.pY = this.pYmax[0];
this.pYspeed = 0;
}
this._x = this.pX;
this._y = this.pY;
switch (this.pState) {
case "ripjaw" :
this.pGameFrame = Math.round((this.pY + 150) / 8);
this._parent.setTargetFrame(210 - this.pGameFrame);
this._parent.boat_mc._y = -(104 + this.pGameFrame);
break;
case "stinkfly" :
this.pGameFrame = Math.round((this.pY + 150) / 16);
this._parent.setTargetFrame(275 - this.pGameFrame);
this._parent.boat_mc._y = 160 - this.pGameFrame;
break;
case "ripjaw_mutate" :
case "stinkfly_mutate" :
}
};
this.fire = function () {
if (this.pShootTimer > 0) {
return(undefined);
}
if (this.pState == "ripjaw") {
this.pModeTimer = 7;
this._parent._parent.snd_mc.playsound("pAttack");
this.char_mc.body_mc.head_mc.gotoAndPlay("attack");
this.pShootTimer = 30;
} else {
this._parent.shoot();
this._parent._parent.snd_mc.playsound("pStinkShot");
this.pShootTimer = 6;
}
};
this.drop = function () {
this.pMtimer = 45;
};
this.hit = function () {
this.pHitTimer = 12;
};
this.init();
stop();
Symbol 376 MovieClip Frame 10
stop();
Symbol 376 MovieClip Frame 17
this.pTimer = 15;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
this._parent.green_mc.mutate();
play();
}
};
stop();
Symbol 376 MovieClip Frame 38
this.pTimer = 15;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 376 MovieClip Frame 41
stop();
Symbol 376 MovieClip Frame 48
this.pTimer = 15;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
this._parent.green_mc.mutate();
play();
}
};
stop();
Symbol 376 MovieClip Frame 62
this.pTimer = 15;
this.onEnterFrame = function () {
if ((--this.pTimer) == 0) {
delete this.onEnterFrame;
play();
}
};
stop();
Symbol 376 MovieClip Frame 64
this.gotoAndStop("stinkfly");
Symbol 386 MovieClip Frame 1
this.init = function () {
this.pEnemyArray = new Array();
this.pEnemy = 0;
this.pState = "idle";
this.pDrop = 0;
this.pTargetFrame = 186;
this.pBulletArray = new Array();
this.pMinesArray = new Array();
this.grenadeStop = false;
};
this.generateEnemy = function (ttype) {
if (ttype == "ripjaw") {
var _local2 = 0;
while (_local2 < 3) {
this.pEnemy++;
var _local3 = this.attachMovie("mc.octo", ("enemy" + this.pEnemy) + "_mc", 1000 + this.pEnemy);
this.pEnemyArray.push(_local3);
_local2++;
}
}
};
this.removeAllEnemies = function () {
trace("removing all enemies!");
for (i in this.pEnemyArray) {
this.removeEnemy(this.pEnemyArray[i]);
}
for (i in this.pBulletArray) {
this.binBullet(this.pBulletArray[i]);
}
};
this.removeMines = function () {
for (i in this.pMinesArray) {
var _local2 = this.pMinesArray[i];
var _local3 = this.pMinesArray.getItemIndex(_local2);
this.pMinesArray.splice(_local3, 1);
_local2.removeMovieClip();
}
};
this.removeEnemy = function (tobj) {
var _local2 = this.pEnemyArray.getItemIndex(tobj);
this.pEnemyArray.splice(_local2, 1);
tobj.removeMovieClip();
};
this.binBullet = function (tclip) {
var _local2 = this.pBulletArray.getItemIndex(tclip);
this.pBulletArray.splice(_local2, 1);
tclip.removeMovieClip();
};
this.killBullets = function () {
for (i in this.pBulletArray) {
this.binBullet(this.pBulletArray[i]);
}
};
this.grenadeBoom = function () {
for (i in this.pBulletArray) {
this.pBulletArray[i].explode();
}
this.grenadeStop = true;
};
this.shoot = function () {
if (this.bod_mc.pMutateTimer > 0) {
return(undefined);
}
var _local7 = 30 - (this.topstrip_mc.pEnemies * 10);
var _local5 = ((_local7 + Math.floor(Math.random() * 10)) + this.boat_mc._x) - (this.bod_mc._x + 20);
var _local4 = (this.boat_mc._y + 15) - (this.bod_mc._y - 20);
var _local6 = Math.sqrt(Math.pow(_local5, 2) + Math.pow(_local4, 2));
var _local3 = (_local5 / _local6) * 8;
var _local2 = (_local4 / _local6) * 8;
if (_local3 < 3) {
_local3 = 3;
}
if (_local2 < 3) {
_local2 = 3;
}
this.pDrop++;
var _local8 = this.attachMovie("mc.fly-drop", ("drop" + this.pDrop) + "_mc", 10000 + this.pDrop, {pX:this.bod_mc._x + 20, pY:this.bod_mc._y - 20, pXspeed:_local3, pYspeed:_local2, pTarget:this.topstrip_mc.pEnemies});
this.pBulletArray.push(_local8);
};
this.fire = function (tType, tEnemy) {
this.pDrop++;
tType = "drop";
if (tType) {
var _local2 = this.attachMovie("mc.octo-drop", ("drop" + this.pDrop) + "_mc", 10000 + this.pDrop, {pX:tEnemy._x, pY:tEnemy._y});
this.pBulletArray.push(_local2);
}
};
this.fireGrenade = function () {
if (this.grenadeStop) {
return(undefined);
}
var _local4 = this.bod_mc._x - this.boat_mc._x;
var _local6 = this.boat_mc._y - this.bod_mc._y;
var _local5 = _local4 / 37;
var _local2 = _local4 / _local5;
var _local3 = 0.981;
var _local7 = ((_local6 + (((0.5 * _local3) * _local2) * _local2)) / _local2) + (_local3 / 2);
this.pDrop++;
var _local8 = this.attachMovie("mc.grenade", ("drop" + this.pDrop) + "_mc", 10000 + this.pDrop, {pXspeed:_local5, pYspeed:-_local7, pG:_local3});
this.pBulletArray.push(_local8);
};
this.onEnterFrame = function () {
if (this._currentframe < this.pTargetFrame) {
this.gotoAndStop(this._currentframe + 1);
} else if (this._currentframe > this.pTargetFrame) {
this.gotoAndStop(this._currentframe - 1);
}
};
this.setTargetFrame = function (tf) {
this.pTargetFrame = tf;
};
this.createMines = function (tnum) {
var _local2 = 0;
while (_local2 < tnum) {
this.pDrop++;
var _local5 = this.attachMovie("mc.mine", ("mine" + this.pDrop) + "_mc", 10000 + this.pDrop, {pMine:_local2});
this.pMinesArray.push(_local5);
_local2++;
}
this.pDrop++;
var _local5 = this.attachMovie("mc.energy", ("energy" + this.pDrop) + "_mc", 10000 + this.pDrop);
this.pMinesArray.push(_local5);
};
this.splash = function (tx) {
var _local2 = 230;
this.attachMovie("mc.splashsequence", "splash_mc", 100000, {_x:tx, _y:_local2});
};
this.setState = function (tstate) {
this.pState = tstate;
this._parent.pState = tstate;
if (this.pState == "ripjaw_mutate") {
this.setTargetFrame(260);
this._parent.snd_mc.mutate("A");
} else {
this.setTargetFrame(195);
this._parent.snd_mc.mutate("B");
}
for (i in this.pEnemyArray) {
this.pEnemyArray[i].mutate();
}
for (i in this.pMinesArray) {
this.pMinesArray[i].mutate();
}
this.killBullets();
this.grenadeStop = false;
};
this.init();
Symbol 386 MovieClip Frame 67
topstrip_mc.ben_mc.play();
this._parent.snd_mc.playsound("pMutate");
Symbol 386 MovieClip Frame 79
Symbol 386 MovieClip Frame 86
this._parent.snd_mc.playsound("pDive");
this._parent.snd_mc.water();
Symbol 386 MovieClip Frame 157
this.topstrip_mc.alert("go");
Symbol 386 MovieClip Frame 275
stop();
Symbol 397 MovieClip Frame 1
stop();