Frame 1
stop();
Stage.showMenu = false;
this.onEnterFrame = function () {
sofar = this.getBytesLoaded();
total = this.getBytesTotal();
Bar._width = int((sofar / total) * 378);
if (sofar == total) {
delete this.onEnterFrame;
play();
}
};
Frame 25
gotoAndStop (26);
Frame 26
stop();
Frame 35
stop();
Frame 48
_quality = "MEDIUM";
_root.distance = 0;
_root.hud.score = 0;
_root.alive = true;
_root.shielded = false;
_root.blinking = false;
_root.ascend = false;
_root.acceleration = 0.75;
_root.accelLimit = 6;
_root.deceleration = 0.45;
_root.decelLimit = -7.3;
_root.scrollSpeed = 10;
_root.dy = 0;
_root.hitWidth = 8;
_root.hitHeight = 6;
_root.levelNum = 1;
_root.stageNum = 1;
_root.enemyState = "idle";
_root.bubbleCount = 1;
_root.hit = new Sound();
_root.hit.attachSound("hit");
_root.splat = new Sound();
_root.splat.attachSound("splat");
_root.scream = new Sound();
_root.scream.attachSound("scream");
_root.footsteps = new Sound();
_root.footsteps.attachSound("footsteps");
_root.shieldStart = new Sound();
_root.shieldStart.attachSound("shieldStart");
_root.shieldEnd = new Sound();
_root.shieldEnd.attachSound("shieldEnd");
_root.controls.onPress = function () {
if (_root.alive) {
if (!_root.blinking) {
_root.player.gotoAndStop("anime");
_root.player.player.gotoAndPlay("swim");
} else {
_root.player.gotoAndPlay("blink");
_root.player.player.gotoAndPlay("swim");
}
_root.ascend = true;
}
};
_root.controls.onRelease = function () {
if (_root.alive) {
if (!_root.blinking) {
_root.player.gotoAndStop("anime");
_root.player.player.gotoAndPlay("fall");
} else {
_root.player.gotoAndPlay("blink");
_root.player.player.gotoAndPlay("fall");
}
_root.ascend = false;
}
};
_root.player.onEnterFrame = function () {
this.swapDepths(500);
if (_root.alive) {
_root.distance++;
_root.hud.score = int(_root.distance / 10);
if (_root.ascend) {
if (_root.dy < _root.accelLimit) {
_root.dy = _root.dy + _root.acceleration;
}
} else if (_root.dy > _root.decelLimit) {
_root.dy = _root.dy - _root.deceleration;
}
} else {
this._x = this._x - _root.scrollSpeed;
}
if ((this._y > 30) && (this._y < 370)) {
this._y = this._y - _root.dy;
} else if (_root.alive && (this._y <= 50)) {
this._y = this._y + 15;
} else if (_root.alive && (this._y >= 350)) {
this._y = this._y - 15;
}
if (_root.ascend) {
_root.bubble.duplicateMovieClip("bubble" + _root.bubbleCount, _root.bubbleCount);
_root["bubble" + _root.bubbleCount]._x = _root.player._x - 15;
_root["bubble" + _root.bubbleCount]._y = _root.player._y + 15;
_root["bubble" + _root.bubbleCount].by = 1;
_root["bubble" + _root.bubbleCount].onEnterFrame = function () {
this.swapDepths(2400);
this._x = this._x - _root.scrollSpeed;
this.by = this.by + 0.75;
this._y = this._y - this.by;
};
if (_root.bubbleCount < 9) {
_root.bubbleCount++;
} else {
_root.bubbleCount = 1;
}
}
_root[("bubble" + _root.bubbleCount) - 1]._x = _root[("bubble" + _root.bubbleCount) - 1]._x - _root.scrollSpeed;
};
_root.walls.onEnterFrame = function () {
if (_root.alive) {
if (((this.hitTest(_root.player._x, _root.player._y, true) || (this.hitTest(_root.player._x, _root.player._y + _root.hitHeight, true))) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y, true))) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y + _root.hitHeight, true))) {
killPlayer();
_root.hit.start();
} else if (this._x < (-this._width)) {
this._x = this._width - (2 * _root.scrollSpeed);
trace((("LEVEL = " + _root.levelNum) + " / STAGE = ") + _root.stageNum);
switch (_root.levelNum) {
case 1 :
nextStage = int(Math.random() * 3) + 1;
trace("next stage = " + nextStage);
break;
case 2 :
nextStage = int(Math.random() * 3) + 4;
trace("next stage = " + nextStage);
break;
case 3 :
nextStage = int(Math.random() * 3) + 7;
trace("next stage = " + nextStage);
}
this.attachMovie("level" + nextStage, _root.walls2, 100);
_root.stageNum++;
if (_root.stageNum > 7) {
trace("NEXT LEVEL!!!!");
_root.stageNum = 1;
_root.levelNum++;
}
}
}
};
_root.walls.duplicateMovieClip("walls2", 110);
_root.walls2.onEnterFrame = _root.walls.onEnterFrame;
_root.walls2._x = _root.walls2._x + _root.walls._width;
_root.walls2.attachMovie(("level" + _root.levelNum) + 1, walls2, 110);
_root.bg.onEnterFrame = function () {
if (_root.alive) {
_root.walls._x = _root.walls._x - _root.scrollSpeed;
_root.walls2._x = _root.walls2._x - _root.scrollSpeed;
this._x = this._x - (_root.scrollSpeed / 2);
if (this._x < 0) {
this._x = this._x + ((this._width / 2) - (_root.scrollSpeed / 2));
}
}
};
_root.seaweed.onEnterFrame = function () {
if (_root.alive) {
if ((this.hitTest(_root.player._x, _root.player._y + _root.hitHeight, true) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y, true))) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y + _root.hitHeight, true))) {
killPlayer();
_root.hit.start();
}
if (this._x < 0) {
this._x = int((Math.random() * 500) * _root.levelNum) + 700;
} else {
this._x = this._x - _root.scrollSpeed;
}
}
};
_root.seaweed2.onEnterFrame = _root.seaweed.onEnterFrame;
_root.enemy.onEnterFrame = function () {
if (_root.alive) {
this.swapDepths(250);
if (((this._x - _root.player._x) < 100) && (_root.enemyState == "chase")) {
_root.enemyState = "attack";
this.gotoAndPlay("attack");
_root.scream.start();
} else if ((this._x - _root.player._x) < 350) {
if (_root.enemyState == "idle") {
_root.enemyState = "chase";
_root.footsteps.start();
}
if (this._y < _root.player._y) {
this._y = this._y + 1.5;
} else {
this._y = this._y - 1.5;
}
}
if ((this.hitTest(_root.player._x, _root.player._y + _root.hitHeight, true) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y, true))) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y + _root.hitHeight, true))) {
killPlayer();
_root.splat.start();
}
if (this._x < -200) {
this._x = int((Math.random() * 600) * _root.levelNum) + 1200;
this._y = int(Math.random() * 200) + 100;
this.gotoAndPlay("idle");
_root.enemyState = "idle";
} else {
this._x = this._x - (_root.scrollSpeed * 1.25);
}
}
};
_root.hud.onEnterFrame = function () {
this.swapDepths(1600);
};
_root.overlay.onEnterFrame = function () {
if (_root.hud.score == 0) {
_root.overlay.gotoAndPlay("ready");
}
if (_root.hud.score < 7) {
_root.dy = 0;
_root.player._y = 173;
}
};
_root.shield.onEnterFrame = function () {
if (!_root.shielded) {
if ((this.hitTest(_root.player._x, _root.player._y + _root.hitHeight, true) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y, true))) || (this.hitTest(_root.player._x + _root.hitWidth, _root.player._y + _root.hitHeight, true))) {
this._x = this._x - 200;
_root.player.player.shield.gotoAndPlay("start");
_root.shielded = true;
_root.shieldStart.start();
} else {
if (this._x < -50) {
this._x = 5000;
}
if (this._x < 0) {
this._x = int((Math.random() * 1000) * _root.levelNum) + 700;
} else {
this._x = this._x - _root.scrollSpeed;
if (this.hitTest(_root.walls) || (this.hitTest(_root.walls2))) {
trace("SHIELD HIT WALL");
this.y = this.y - 30;
if (this._y < 50) {
this._y = 350;
}
}
}
}
}
};
killPlayer = function () {
if (!_root.shielded) {
_root.alive = false;
_root.player.player.gotoAndPlay("death");
_root.overlay.swapDepths(-1600);
_root.overlay.gotoAndPlay("gameover");
_root.walls.stop();
_root.bg._x = 3910;
_root.walls._x = 0;
_root.walls2._x = _root.walls._width;
_root.walls2.stop();
_root.shield.stop();
_root.bg.stop();
_root.enemy.stop();
_root.overlay.score = "Final Score: " + _root.hud.score;
_root.dy = 1;
_root.scrollSpeed = 0;
_root.walls.attachMovie("level1", _root.walls, 100);
_root.enemy._x = int((Math.random() * 600) * _root.levelNum) + 1200;
_root.enemy._y = int(Math.random() * 200) + 100;
_root.enemyState = "idle";
} else if (!_root.blinking) {
_root.player.player.shield.gotoAndPlay("end");
_root.shieldEnd.start();
_root.blinking = true;
_root.shieldInterval = setInterval(stopBlinking, 3000);
}
};
stopBlinking = function (startTime) {
_root.shielded = false;
_root.blinking = false;
_root.player.gotoAndPlay("anime");
clearInterval(_root.shieldInterval);
};
Instance of Symbol 156 MovieClip "hud" in Frame 48
onClipEvent (load) {
this.swapDepths(this.getNextHighestDepth());
}
Frame 49
stop();
Frame 50
stop();
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 15
this.gotoAndPlay("swim");
Symbol 35 MovieClip Frame 32
this.gotoAndPlay("swim");
Symbol 47 Button
on (press) {
getURL ("http://www.funfastgame.com/");
}
Symbol 52 Button
on (release) {
stopAllSounds();
gotoAndStop (48);
}
Symbol 55 Button
on (press) {
var url1 = "http:";
var i = 0;
while (i < 2) {
url1 = url1 + "/";
i++;
}
i = 0;
while (i < 3) {
url1 = url1 + "w";
i++;
}
url1 = url1 + ".funfastgame.com";
getURL (url1, "_top");
}
Symbol 58 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 116 Button
on (release) {
stopAllSounds();
gotoAndStop (48);
}
Symbol 132 MovieClip Frame 13
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 11
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 10
stop();
Symbol 135 MovieClip Frame 21
stop();
Symbol 141 MovieClip Frame 6
stop();
Symbol 142 MovieClip Frame 5
stop();
Symbol 142 MovieClip Frame 14
stop();
Symbol 142 MovieClip Frame 21
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 5
gotoAndPlay ("blink");
Symbol 171 Button
on (release) {
_root.distance = 0;
_root.hud.score = 0;
_root.alive = true;
_root.shielded = false;
_root.blinking = false;
_root.ascend = false;
_root.acceleration = 0.75;
_root.accelLimit = 6;
_root.deceleration = 0.45;
_root.decelLimit = -7.3;
_root.scrollSpeed = 10;
_root.dy = 0;
_root.hitWidth = 8;
_root.hitHeight = 6;
_root.levelNum = 1;
_root.stageNum = 1;
_root.enemyState = "idle";
_root.bubbleCount = 1;
_root._x = 0;
_root.walls._x = 0;
stopAllSounds();
gotoAndPlay (48);
}
Symbol 172 Button
on (press) {
var url = "http:";
var i = 0;
while (i < 2) {
url = url + "/";
i++;
}
i = 0;
while (i < 3) {
url = url + "w";
i++;
}
url = url + ".funfastgame.com";
getURL (url, "_top");
}
Symbol 174 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 2
this.swapDepths(2000);
Symbol 174 MovieClip Frame 54
gotoAndStop (1);
Symbol 174 MovieClip Frame 55
this.swapDepths(2000);
Symbol 174 MovieClip Frame 74
stop();