Frame 1
cardID = 7946;
stop();
fscommand ("allowscale", "false");
stageWidth = 500;
stageHeight = 350;
playerControlFunctionNumber = 3;
Frame 2
function findNode(xmlObject, pathArray, count) {
var i;
var returnValue;
strng = pathArray[0];
var children = new Array();
var foundCount = 0;
children = xmlObject.childNodes;
returnValue = null;
i = 0;
while (i < children.length) {
var currentNode = children[i];
if (currentNode.nodeName eq strng) {
if ((count != null) and (pathArray.length == 1)) {
foundCount++;
if (foundCount == count) {
returnValue = currentNode;
break;
}
} else {
returnValue = currentNode;
break;
}
}
i++;
}
if ((returnValue != null) and (1 < pathArray.length)) {
pathArray.shift();
return(findNode(returnValue, pathArray, count));
}
return(returnValue);
}
function getNumberOfNodes(xmlObject, nodeName) {
strng = nodeName;
var children = new Array();
var i;
var foundCount = 0;
var returnValue;
children = xmlObject.childNodes;
returnValue = null;
i = 0;
while (i < children.length) {
var currentNode = children[i];
if (currentNode.nodeName eq strng) {
foundCount++;
}
i++;
}
return(foundCount);
}
function getNumAttribute(Xobj, att) {
return(Number(Xobj.attributes[att]));
}
function getAttribute(Xobj, att) {
return(Xobj.attributes[att]);
}
function processXML(successful) {
var theRoot = _level0.root;
if (successful) {
var allTimeXML = findNode(this.firstChild, ["HIGHSCORES_ALLTIME"]);
var allTimeLowestXML = findNode(allTimeXML, ["LOWEST_SCORE"]);
allTimeLowestScore = Number(allTimeLowestXML.firstChild.nodeValue);
var numberOfEntries = getNumberOfNodes(allTimeXML, "ENTRY");
allTimeHighScoreTable = new Array(numberOfEntries);
var i = 0;
while (i < numberOfEntries) {
var anEntry = findNode(allTimeXML, ["ENTRY"], i + 1);
allTimeHighScoreTable[Number(anEntry.attributes.num) - 1] = {name:anEntry.attributes.name, score:Number(anEntry.attributes.score), date:anEntry.attributes.date, uin:Number(anEntry.attributes.uin), email:anEntry.attributes.email};
i++;
}
allTimeEntries = numberOfEntries;
var todayXML = findNode(this.firstChild, ["HIGHSCORES_TODAY"]);
var todayLowestXML = findNode(todayXML, ["LOWEST_SCORE"]);
todayLowestScore = Number(todayLowestXML.firstChild.nodeValue);
var numberOfEntries = getNumberOfNodes(todayXML, "ENTRY");
todayHighScoreTable = new Array(numberOfEntries);
var i = 0;
while (i < numberOfEntries) {
var anEntry = findNode(todayXML, ["ENTRY"], i + 1);
todayHighScoreTable[Number(anEntry.attributes.num) - 1] = {name:anEntry.attributes.name, score:Number(anEntry.attributes.score), date:anEntry.attributes.date, uin:Number(anEntry.attributes.uin), email:anEntry.attributes.email};
i++;
}
todayEntries = numberOfEntries;
theRoot.highScoresLoadState = "loaded";
theRoot.xmlLoadedFunction();
} else {
theRoot.highScoresLoadState = "failed";
}
}
function order(a, b) {
var s1 = a.score;
var s2 = b.score;
if (s2 < s1) {
return(-1);
}
if (s1 < s2) {
return(1);
}
return(0);
}
function madeTheHighScores() {
var theScore = statusBar.scoreDisplay.score;
if (0 < theScore) {
if ((allTimeLowestScore < theScore) or (allTimeEntries < 10)) {
return("allTime");
}
if ((todayLowestScore < theScore) or (todayEntries < 10)) {
return("today");
}
return("no");
}
return("no");
}
function loadHighScores(url) {
dataXML = new XML();
dataXML.onLoad = processXML;
xmlLoadedFunction = null;
highScoresLoadState = "loading";
dataXML.load(url);
}
function toggleSoundtrack() {
if (soundTrack) {
soundTrack = false;
loopPlaying = false;
loop.stop();
} else {
loopPlaying = true;
soundTrack = true;
loop.start(0, 1000);
}
soundTrackIcon.init();
}
function toggleMute() {
mute = !mute;
if (!mute) {
player.soundFX.setVolume(player.soundFX.originalVolume);
} else {
player.soundFX.setVolume(0);
}
muteMC.init();
}
function encode(str, key, base) {
var i;
var j;
var k;
var m;
i = 0;
while (i < str.length) {
j = 0;
while (j < key.length) {
k = (key[j] + base) % str.length;
str[i] = str[i] ^ key[j];
m = str[i];
str[i] = str[k];
str[k] = m;
j++;
}
if (0 < i) {
str[i] = (str[i] + ((str[i - 1] >> 4) & 15)) & 255;
}
i++;
}
return(str);
}
function encode_data(dataString, keyString) {
var i;
var res;
var dataStringA = new Array();
var keyStringA = new Array();
i = 0;
while (i < dataString.length) {
dataStringA[i] = dataString.charCodeAt(i);
i++;
}
i = 0;
while (i < keyString.length) {
keyStringA[i] = keyString.charCodeAt(i);
i++;
}
i = 0;
while (i < secrets.length) {
dataStringA = encode(dataStringA, keyStringA, secrets[i]);
i++;
}
res = "";
i = 0;
while (i < dataStringA.length) {
var c = dataStringA[i].toString(16);
if (c.length == 1) {
c = "0" + c;
}
res = res + c;
i++;
}
return(res);
}
function clearTabs(s) {
var a = s.split("\t");
return(a.join(""));
}
MovieClip.prototype.root = this;
root = this;
menuBackframe = 1;
highScoreTop = 100;
theGameHighscoresURL = "/games/get_scores.php?game_id=1";
allTimeHighScoreTableMaxEntries = 50;
todayHighScoreTableMaxEntries = 10;
soundTrack = true;
mute = false;
MovieClip.prototype.randomNumber = function (num) {
return(Math.round(Math.random() * (num - 1)));
};
MovieClip.prototype.playSound = function (soundObjectName, soundName, loops) {
this[soundObjectName].attachSound(soundName);
this[soundObjectName].start(0, loops);
};
secrets = [23, 71, 1, 13, 47, 79, 3];
enc_code = "aGn3!z+";
Frame 5
Frame 6
function startLoop() {
root.loop = new Sound(root);
root.loop.originalVolume = 80;
root.loop.setVolume(root.loop.originalVolume);
root.playSound("loop", "loop0", 1000);
soundTrack = true;
loopPlaying = true;
}
stop();
Mouse.show();
loadHighScores(theGameHighscoresURL);
if (((!loopPlaying) and (!mute)) and soundtrack) {
startLoop();
}
Instance of Symbol 209 MovieClip "menuContent" in Frame 6
onClipEvent (unload) {
}
onClipEvent (load) {
}
Instance of Symbol 215 MovieClip "timer" in Frame 6
onClipEvent (load) {
startTime = getTimer();
endTime = 30000;
}
onClipEvent (enterFrame) {
if (endTime < (getTimer() - startTime)) {
_parent.play();
}
}
onClipEvent (mouseMove) {
startTime = getTimer();
}
Frame 7
if (highScoresLoadState eq "loaded") {
gotoAndPlay ("highscores");
} else {
prevFrame();
}
Frame 10
stop();
Instance of Symbol 218 MovieClip in Frame 10
/* no clip actions */
Instance of Symbol 282 MovieClip "intro" in Frame 10
onClipEvent (enterFrame) {
if (Key.isDown(27)) {
root.gotoAndPlay("menu");
}
}
Frame 23
function addToScore(theItemMC, points) {
score = score + points;
statusBar.scoreDisplay.score = score;
theItemMC.removeMovieClip();
if (nextBonusScore < score) {
nextBonusScore = ((score + 1) * 1.5) - 1;
player.dubi.head.play();
}
if (nextSpeedScore < score) {
if (defaultScrollSpeed < maxScrollSpeed) {
defaultScrollSpeed++;
scrollSpeed++;
nextSpeedScore = ((nextSpeedScore + 1) * 1.8) - 1;
} else {
nextSpeedScore = 0;
}
}
}
function pause() {
if (paused) {
paused = false;
player.gameOn = true;
scrollSpeed = defaultScrollSpeed;
root.pausedSign.gotoAndStop(1);
if (player.oxygenAlarmOn) {
oxygenAlarm.play();
}
} else if (player.gameOn) {
paused = true;
player.gameOn = false;
scrollSpeed = 0;
root.pausedSign.gotoAndStop(2);
if (player.oxygenAlarmOn) {
oxygenAlarm.stop();
}
}
}
paused = false;
if ((soundTrack and (!mute)) and (!loopPlaying)) {
startLoop();
}
muteMC.init();
soundTrackIcon.init();
xmlLoaded = false;
maxFishDepth = 199;
depthOffset = 20;
depthIndex = depthOffset;
score = 0;
statusBar.scoreDisplay.score = score;
Mouse.hide();
MovieClip.prototype.player = player;
defaultScrollSpeed = (scrollSpeed = 5);
maxScrollSpeed = 9;
stageBottom = statusBar._y;
nextBonusScore = 29999;
nextSpeedScore = 59999;
Instance of Symbol 218 MovieClip "back0" in Frame 23
onClipEvent (enterFrame) {
theLeftOne._x = theLeftOne._x - _parent.scrollSpeed;
theRightOne._x = (theLeftOne._x + theLeftOne._width) - 1;
if (theLeftOne._x < leftMostPos) {
theLeftOne._x = theLeftOne._x + (2 * theLeftOne._width);
theLeftOne.play();
aaa = theLeftOne;
theLeftOne = theRightOne;
theRightOne = aaa;
depthIndex++;
i = 0;
while (i < theRightOne.theAttachedMCsList.length) {
theRightOne.theAttachedMCsList[i].removeMovieClip();
i++;
}
theRightOne.theAttachedMCsList = new Array();
}
}
onClipEvent (load) {
leftMostPos = -_width;
theLeftOne = this;
theRightOne = _parent.back1;
theAttachedMCsList = new Array();
theRightOne.theAttachedMCsList = new Array();
}
Instance of Symbol 287 MovieClip "back1" in Frame 23
/* no clip actions */
Instance of Symbol 296 MovieClip " objectLayer" in Frame 23
onClipEvent (load) {
bottleTypesArray = [1, 2, 3];
rockTypesArray1 = [1, 2, 3];
rockTypesArray2 = [1, 2, 3, 4, 5, 6, 7];
fishTypesArray1 = [1, 2];
fishTypesArray2 = [1, 2, 3];
bubbleFactor = 0.01;
fishTime = 110;
depthOffSet = 10;
depthIndex = depthOffSet;
rockBottomTime = 100;
coinTime = 30;
icqCoinTimeInterval = (icqCoinTime = 520);
bottleTime = 150;
lifeTime = 50;
treasureTime = 80;
allowedBottom = 200;
nextLifeScore = 30000;
rockTypes = [1, 2, 3, 4, 5, 6, 7, 8];
}
onClipEvent (enterFrame) {
score = root.statusBar.scoreDisplay.score;
_root.frameTime = getTimer() - lastFrame;
lastFrame = getTimer();
if (player.gameOn) {
fishTime--;
rockBottomTime--;
coinTime--;
icqCoinTime--;
oxygenTime--;
if (nextLifeScore < score) {
lifeTime--;
}
bottleTime--;
treasureTime--;
if (0 < stopObjectsForWidth) {
stopObjectsForWidth = stopObjectsForWidth - root.scrollSpeed;
} else {
allowObjects = true;
stopObjectsForWidth = 0;
}
if (allowObjects) {
if (coinTime < 1) {
coinTime = 15;
coinTime = coinTime + randomNumber(coinTime / 2);
coin.duplicateMovieClip("coin" + depthIndex, depthIndex);
depthIndex++;
} else if (icqCoinTime < 1) {
icqCoinTime = icqCoinTimeInterval;
icqCoinTime = icqCoinTime + randomNumber(icqCoinTime / 2);
icqCoin.duplicateMovieClip("icqCoin" + depthIndex, depthIndex);
depthIndex++;
} else if (bottleTime < 1) {
bottleTime = 100 + randomNumber(40);
bottle.duplicateMovieClip("bottle" + depthIndex, depthIndex);
depthIndex++;
bottle._rotation = random(180);
} else if ((treasureTime < 1) and (!stopObjectsForWidth)) {
treasureTime = 150;
treasureTime = treasureTime + randomNumber(treasureTime / 2);
treasure.duplicateMovieClip("treasure" + depthIndex, depthIndex);
depthIndex++;
} else if (lifeTime < 1) {
lifeTime = 50;
nextLifeScore = nextLifeScore * 2;
life.duplicateMovieClip("life" + depthIndex, depthIndex);
depthIndex++;
} else if (rockBottomTime < 1) {
rockBottomTime = 100 + randomNumber(30);
thePos = 580;
this.attachMovie("rockBottom" + nextWall, ("rockBottom" + nextWall) + depthIndex, depthIndex);
theMC = this[("rockBottom" + nextWall) + depthIndex];
theMC._x = thePos;
depthIndex++;
}
}
if (fishTime < 1) {
if (30000 < root.score) {
fishTime = (70 + randomNumber(40)) - 20;
fishVariety = 3;
fishTypesArray = fishTypesArray2;
} else if (15000 < root.score) {
fishTime = (90 + randomNumber(40)) - 20;
fishVariety = 2;
fishTypesArray = fishTypesArray1;
} else {
fishTime = (110 + randomNumber(40)) - 20;
fishVariety = 1;
}
if (1 < fishVariety) {
var a = randomNumber(fishVariety - 1);
fishType = fishTypesArray[a];
fishTypesArray.splice(a, 1);
fishTypesArray.push(fishType);
} else {
fishType = 1;
}
if (fishType == 1) {
spikeyFish.duplicateMovieClip("spikeyFish" + depthIndex, depthIndex);
depthIndex++;
} else if (fishType == 2) {
electricFish.duplicateMovieClip("electricFish" + depthIndex, depthIndex);
depthIndex++;
} else if (fishType == 3) {
medusaFish.duplicateMovieClip("medusaFish" + depthIndex, depthIndex);
depthIndex++;
}
}
if (97 < depthIndex) {
depthIndex = depthOffSet;
}
if (97 < _parent.depthIndex) {
_parent.depthIndex = _parent.depthOffSet;
}
}
}
Instance of Symbol 386 MovieClip "player" in Frame 23
onClipEvent (enterFrame) {
if (gameOn) {
controlFunction();
oxygenBar._xscale = oxygenBar._xscale - oxygenConsumption;
if (oxygenBar._xscale < 20) {
if (!oxygenAlarmOn) {
oxygenAlarmOn = true;
root.oxygenAlarm.play();
} else if (oxygenBar._xscale < 1) {
die("drown");
}
}
if (_y == topBoundry) {
if (root.takeAirSoundMC == null) {
root.attachMovie("takeAirSound", "takeAirSoundMC", root.depthIndex++);
}
oxygenBar._xscale = oxygenBar._xscale + (oxygenConsumption * 20);
if (100 < oxygenBar._xscale) {
oxygenBar._xscale = 100;
}
if (oxygenAlarmOn) {
oxygenAlarmOn = false;
root.oxygenAlarm.gotoAndStop(1);
}
}
var i = 0;
while (i < numberOfCheckPoints) {
checkPoint[i] = {x:this["checkPoint" + i]._x, y:this["checkPoint" + i]._y};
localToGlobal(checkPoint[i]);
i++;
}
lookTime--;
if (lookTime < 0) {
dubi.head.play();
lookTime = lookTimeFrames;
}
}
}
onClipEvent (load) {
function keyControl2() {
if (Key.isDown(39) and (!hitWall)) {
guide.x = guide.x + (keySteps2 * 1.2);
} else if (Key.isDown(37)) {
guide.x = guide.x - keySteps2;
}
if (Key.isDown(38) and (!hitWall)) {
guide.y = guide.y - (keySteps2 * 1.2);
} else if (Key.isDown(40)) {
guide.y = guide.y + (keySteps2 * 1.2);
} else if (Key.isDown(27)) {
root.gotoAndPlay("menu");
}
dX = (guide.x - _x) * 0.2;
dY = (guide.y - _y) * 0.2;
_y = (_y + dY);
_x = (_x + dX);
if (_x < leftBoundry) {
_x = leftBoundry;
guide.x = leftBoundry;
} else if (rightBoundry < _x) {
_x = rightBoundry;
guide.x = rightBoundry;
}
if (_y < topBoundry) {
_y = topBoundry;
guide.y = topBoundry;
} else if (bottomBoundry < _y) {
_y = bottomBoundry;
guide.y = bottomBoundry;
}
tilt = (guide.y - _y) * 0.55;
_rotation = tilt;
}
function die(cause) {
if (gameOn and (!ghostMode)) {
root.oxygenAlarm.gotoAndStop(1);
lookTime = lookTimeFrames;
lives--;
livesDisplay.gotoAndStop(lives);
gameOn = false;
removeBubbles();
this.gotoAndPlay(cause);
}
}
function removeBubbles() {
root.objectLayer.a._visible = false;
}
function createBubbles() {
root.objectLayer.a._visible = true;
}
function looseLife() {
if (lives == 0) {
gameOver();
} else {
startOver();
}
}
function startOver() {
oxygenBar._xscale = 100;
oxygenAlarmOn = false;
gotoAndPlay ("swim");
createBubbles();
gameOn = true;
ghostMode = true;
this.attachMovie("attachedTimer", "ghostTimer", depthIndex++);
ghostTimer.time = 1500;
timeOutFunction = function () {
ghostMode = false;
_visible = 1;
};
intervalFunction = function () {
if (_visible == 1) {
_visible = 0;
} else {
_visible = 1;
}
};
root.scrollSpeed = root.defaultScrollSpeed;
_x = ((guide.x = originalX));
_y = ((guide.y = originalY));
}
function gameOver() {
root.gotoAndStop("gameOver");
}
function tintToColor(percent) {
percent = 100 - percent;
cxform = {ra:percent, rb:255, ga:percent, gb:255, ba:percent, bb:0, aa:100, ab:0};
myColor = new Color(this);
myColor.setTransform(cxform);
}
function hits(mc) {
var i = 0;
while (i < numberOfCheckPoints) {
if (mc.hitTest(checkPoint[i].x, checkPoint[i].y, true)) {
return(i + 1);
}
i++;
}
}
soundFX = new Sound(this);
soundFX.originalVolume = 50;
soundFX.setVolume(soundFX.originalVolume);
lookTime = (lookTimeFrames = 200);
numberOfCheckPoints = 4;
checkPoint = new Array(numberOfCheckPoints);
testMode = false;
ghostMode = false;
gameOn = true;
depthIndex = 10;
oxygenConsumption = 0.25;
oxygenAlarmOn = false;
lives = 3;
oxygenBar = _parent.statusBar.oBar;
oxygenBar._xscale = 100;
livesDisplay = _parent.statusBar.lives;
livesDisplay.gotoAndStop(lives);
originalX = _x;
originalY = _y;
leftBoundry = 80;
rightBoundry = 360;
topBoundry = 50;
bottomBoundry = 300;
guide = {x:_x, y:_y};
keySteps1 = 4;
keySteps2 = 6;
controlFunction = keyControl2;
}
Frame 24
stop();
Frame 32
Mouse.show();
play();
loadHighScores(theGameHighscoresURL);
loop.stop();
loopPlaying = false;
Frame 33
stop();
Instance of Symbol 215 MovieClip "timer" in Frame 33
onClipEvent (load) {
startTime = getTimer();
endTime = 3000;
}
onClipEvent (enterFrame) {
if (endTime < (getTimer() - startTime)) {
_parent.play();
}
}
Frame 34
if (highScoresLoadState eq "failed") {
gotoAndPlay ("playAgain");
} else if (highScoresLoadState eq "loaded") {
highscoreTableMade = madeTheHighScores();
if (highscoreTableMade ne "no") {
gotoAndPlay ("getInfo");
} else {
gotoAndPlay ("playAgain");
}
} else {
play();
}
Frame 35
prevFrame();
Frame 36
stop();
Instance of Symbol 215 MovieClip "timer" in Frame 36
onClipEvent (load) {
startTime = getTimer();
endTime = 10000;
}
onClipEvent (enterFrame) {
if (endTime < (getTimer() - startTime)) {
_parent.gotoAndPlay("highscores");
}
}
Frame 37
gotoAndPlay ("startGame");
Frame 43
stop();
dubiOmed.gotoAndStop("happy");
congrats.gotoAndStop(highscoreTableMade);
user_name = "";
user_email = "";
Frame 44
play();
Frame 45
if (highScoresLoadState eq "failed") {
gotoAndPlay ("menu");
} else if (highScoresLoadState eq "loaded") {
gotoAndPlay ("displayHighscores");
} else {
prevFrame();
}
Frame 50
dubiOmed.gotoAndStop("happy");
if (highScoresLoadState eq "loaded") {
gotoAndPlay ("displayHighscores");
} else if (highScoresLoadState eq "loading") {
play();
} else if (highScoresLoadState eq "failed") {
xmlFailCount++;
if (3 < xmlFailCount) {
xmlFailCount = 0;
gotoAndPlay ("menu");
} else {
loadHighScores(theGameHighscoresURL);
}
} else {
loadHighScores(theGameHighscoresURL);
}
Instance of Symbol 435 MovieClip "highscorePanel" in Frame 50
onClipEvent (load) {
function displayTable(theTableName, left) {
theTable = root[theTableName + "highScoreTable"];
this.attachMovie(theTableName + "HighscoreTitle", theTableName + "HighscoreTitle", depthIndex++);
theTitleMC = this[theTableName + "HighscoreTitle"];
theTitleMC._x = left;
theTitleMC._y = highScoreTop + -36;
i = 0;
while (i < theTable.length) {
if (0 < theTable[i].uin) {
this.attachMovie("highscoreEntryUIN", (theTableName + "highscoreEntry") + i, depthIndex++);
} else if (theTable[i].email ne "") {
this.attachMovie("highscoreEntryEMAIL", (theTableName + "highscoreEntry") + i, depthIndex++);
} else {
this.attachMovie("highscoreEntry", (theTableName + "highscoreEntry") + i, depthIndex++);
}
theEntryMC = this[(theTableName + "highscoreEntry") + i];
for (var prop in eval ("theTable." add i)) {
theEntryMC[prop] = theTable[i][prop];
}
theEntryMC.place = i + 1;
theEntryMC._x = left;
theEntryMC._y = highScoreTop + (i * 18);
i++;
}
}
highScoreTop = 75;
}
Frame 51
gotoAndPlay ("highscores");
Frame 52
highscorePanel.displayTable("today", 295);
highscorePanel.displayTable("AllTime", 50);
xmlFailCount = 0;
if (((!loopPlaying) and (!mute)) and soundtrack) {
startLoop();
}
stop();
Instance of Symbol 215 MovieClip "timer" in Frame 52
onClipEvent (load) {
startTime = getTimer();
endTime = 10000;
}
onClipEvent (enterFrame) {
if (endTime < (getTimer() - startTime)) {
_parent.play();
}
}
onClipEvent (mouseMove) {
startTime = getTimer();
}
Frame 53
gotoAndPlay ("menu");
Symbol 22 Button
on (release) {
getURL ("mailto:" + email);
}
Symbol 27 Button
on (release) {
getURL ("http://web.icq.com/wwp?Uin=" + uin, "_blank");
}
Symbol 39 MovieClip [itemScore] Frame 1
_parent.nextFrame();
pointStep = points / 20;
alpha = 100;
Symbol 39 MovieClip [itemScore] Frame 2
play();
Symbol 39 MovieClip [itemScore] Frame 3
alpha = alpha - 5;
root.topBar.scoreDisplay.score = root.topBar.scoreDisplay.score + pointStep;
if (0 < alpha) {
prevFrame();
} else {
_parent.removeMovieClip();
}
Symbol 47 MovieClip Frame 1
_parent._parent.allowObjects = true;
Symbol 47 MovieClip Frame 2
_parent._parent.allowObjects = false;
Symbol 47 MovieClip Frame 3
_parent._parent.allowObjects = true;
Symbol 47 MovieClip Frame 4
_parent._parent.allowObjects = true;
Symbol 47 MovieClip Frame 5
_parent._parent.allowObjects = false;
Symbol 47 MovieClip Frame 6
_parent._parent.allowObjects = true;
Symbol 47 MovieClip Frame 7
_parent._parent.allowObjects = false;
Symbol 47 MovieClip Frame 8
_parent._parent.allowObjects = false;
Symbol 48 MovieClip [rockBottom] Frame 1
_y = root.stageBottom;
if (15000 < root.score) {
rockTypesArray = _parent.rockTypesArray2;
} else {
rockTypesArray = _parent.rockTypesArray1;
}
chooseFrom = rockTypesArray.length;
a = randomNumber(chooseFrom - 1);
theFrame = rockTypesArray[a];
rockTypesArray.splice(a, 1);
rockTypesArray.push(theFrame);
rocks.gotoAndStop(theFrame);
Symbol 48 MovieClip [rockBottom] Frame 2
_parent.stopObjectsForWidth = _width + 20;
_parent.rockHeight = _height;
Symbol 48 MovieClip [rockBottom] Frame 3
_x = (_x - root.scrollSpeed);
if (_x < -300) {
this.removeMovieClip();
}
if (player.hits(this)) {
player.die("hitRock");
}
Symbol 48 MovieClip [rockBottom] Frame 4
gotoAndPlay (3);
Symbol 49 MovieClip [attachedTimer] Frame 1
startTime = getTimer();
Symbol 49 MovieClip [attachedTimer] Frame 2
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 3
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 4
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 5
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 6
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 7
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 8
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 9
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 10
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 11
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 12
_parent.intervalFunction();
Symbol 49 MovieClip [attachedTimer] Frame 13
if (time < (getTimer() - startTime)) {
_parent.timeOutFunction();
this.removeMovieClip();
} else {
_parent.intervalFunction();
gotoAndPlay (2);
}
Symbol 50 MovieClip [takeAirSound] Frame 1
player.playSound("soundFX", "takeAir");
Symbol 50 MovieClip [takeAirSound] Frame 36
this.removeMovieClip();
stop();
Instance of Symbol 53 MovieClip in Symbol 54 MovieClip [bubble] Frame 20
/* no clip actions */
Instance of Symbol 53 MovieClip in Symbol 54 MovieClip [bubble] Frame 74
/* no clip actions */
Instance of Symbol 53 MovieClip in Symbol 54 MovieClip [bubble] Frame 155
/* no clip actions */
Symbol 63 MovieClip [score500] Frame 1
_parent.nextFrame();
Symbol 63 MovieClip [score500] Frame 2
play();
Symbol 63 MovieClip [score500] Frame 3
_alpha = (_alpha - 5);
if (10 < _alpha) {
prevFrame();
} else {
_parent.removeMovieClip();
}
Symbol 85 MovieClip Frame 4
play();
Symbol 85 MovieClip Frame 5
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.play();
}
Symbol 85 MovieClip Frame 6
bar._xscale = 1;
Symbol 85 MovieClip Frame 7
percent = int((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
bar._xscale = percent;
Symbol 85 MovieClip Frame 8
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndPlay ("loop");
} else {
_root.play();
}
Symbol 90 Button
on (release, keyPress "<Space>") {
gotoAndPlay ("startGame");
}
Symbol 92 Button
on (release) {
gotoAndPlay ("highscores");
}
Symbol 109 Button
on (release) {
getURL ("javascript:logo();");
}
Symbol 114 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 28
gotoAndPlay(30 + random(30));
Symbol 159 MovieClip Frame 21
if (!picked) {
gotoAndPlay (1);
}
Symbol 159 MovieClip Frame 22
play();
Symbol 159 MovieClip Frame 44
this.removeMovieClip();
Symbol 174 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 37
player.lookTime = player.lookTimeFrames;
Symbol 198 MovieClip Frame 21
if (!picked) {
gotoAndPlay (1);
}
Symbol 198 MovieClip Frame 22
play();
Symbol 198 MovieClip Frame 44
this.removeMovieClip();
Symbol 208 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 211
a.gotoAndPlay(4);
Symbol 217 Button
on (keyPress "m") {
toggleSoundtrack();
}
on (keyPress "s") {
toggleMute();
}
on (keyPress "M") {
toggleSoundtrack();
}
on (keyPress "S") {
toggleMute();
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 2
stop();
Symbol 218 MovieClip Frame 3
stop();
Symbol 269 MovieClip Frame 98
stop();
this.removeMovieClip();
Symbol 282 MovieClip Frame 1
stop();
Instance of Symbol 252 MovieClip in Symbol 282 MovieClip Frame 1
onClipEvent (enterFrame) {
n = n + 1;
if (n >= 4) {
n = 0;
smoke = smoke + 1;
duplicateMovieClip (eval ("_parent.smoke" + (smoke - 1)), "smoke" + smoke, smoke);
eval ("_parent.smoke" + smoke)._x = _x + 100;
eval ("_parent.smoke" + smoke).gotoAndPlay(30 + random(50));
}
_x = (_x - 6);
if (_x < -360) {
_parent.play();
} else if ((_x < 200) and (!played)) {
played = true;
if (!root.mute) {
s = new Sound(this);
s.attachSound("horn");
s.start();
}
}
}
onClipEvent (load) {
smoke = 1;
n = 0;
}
Symbol 282 MovieClip Frame 2
stop();
root.play();
Symbol 283 Button
on (keyPress "<Space>") {
gotoAndPlay ("gameOn");
}
Symbol 284 Button
on (keyPress "q") {
gotoAndPlay ("menu");
}
on (keyPress "Q") {
gotoAndPlay ("menu");
}
Symbol 287 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 2
stop();
Symbol 287 MovieClip Frame 3
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 1
a = randomNumber(2);
theFrame = _parent.bottleTypesArray[a];
gotoAndStop(theFrame);
_parent.bottleTypesArray.splice(a, 1);
_parent.bottleTypesArray.push(theFrame);
Symbol 296 MovieClip Frame 1
Instance of Symbol 159 MovieClip "coin" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
myEnterFrameFunction();
}
onClipEvent (load) {
vX = -1;
myPossibleHeight = 200;
if (_parent.stopObjectsForWidth) {
myPossibleHeight = myPossibleHeight - _parent.rockHeight;
}
_x = 580;
_y = ((player.topBoundry + 5) + randomNumber(myPossibleHeight));
myEnterFrameFunction = function () {
aa = this.hitTest(player);
_x = (_x - root.scrollSpeed);
if (_x < -50) {
this.removeMovieClip();
} else if (this.hitTest(player)) {
if (player.gameOn and (!this.picked)) {
picked = true;
player.playSound("soundFX", "pickup" + randomNumber(3));
this.gotoAndPlay("picked");
root.addToScore(null, 500);
}
}
};
}
Instance of Symbol 288 MovieClip "treasure" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
myEnterFrameFunction();
}
onClipEvent (load) {
_y = (root.stageBottom - 5);
_x = 580;
myEnterFrameFunction = function () {
_x = (_x - root.scrollSpeed);
if (_x < -50) {
this.removeMovieClip();
} else if (this.hitTest(player)) {
if (player.gameOn and (!this.picked)) {
picked = true;
player.dubi.backHand.play();
root.addToScore(null, 5000);
player.playSound("soundFX", "t1");
this.play();
}
}
};
}
Instance of Symbol 289 MovieClip "life" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
myEnterFrameFunction();
}
onClipEvent (load) {
myPossibleHeight = 200;
if (_parent.stopObjectsForWidth) {
myPossibleHeight = myPossibleHeight - _parent.rockHeight;
}
_y = ((player.topBoundry + 5) + randomNumber(myPossibleHeight));
_x = 580;
myEnterFrameFunction = function () {
_x = (_x - root.scrollSpeed);
if (_x < -50) {
this.removeMovieClip();
} else if (this.hitTest(player)) {
if (player.gameOn and (!this.picked)) {
picked = true;
if (player.lives < 5) {
player.lives++;
root.statusBar.lives.gotoAndStop(player.lives);
player.playSound("soundFX", "lfe");
this.removeMovieClip();
}
}
}
};
}
Instance of Symbol 294 MovieClip "bottle" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!root.paused) {
myEnterFrameFunction();
}
}
onClipEvent (load) {
myBottom = root.stageBottom - 10;
_y = (55 + randomNumber(200));
_x = 580;
myEnterFrameFunction = function () {
if (_y < myBottom) {
_y = (_y+1);
_rotation = (_rotation+1);
}
_x = (_x - root.scrollSpeed);
if (_x < -50) {
this.removeMovieClip();
} else if (player.hits(this)) {
if (player.gameOn) {
player.die("hitRock");
}
}
};
}
Instance of Symbol 198 MovieClip "icqCoin" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
myEnterFrameFunction();
}
onClipEvent (load) {
myPossibleHeight = 200;
if (_parent.stopObjectsForWidth) {
myPossibleHeight = myPossibleHeight - _parent.rockHeight;
}
_x = 580;
_y = ((player.topBoundry + 5) + randomNumber(myPossibleHeight));
myEnterFrameFunction = function () {
aa = this.hitTest(player);
_x = (_x - root.scrollSpeed);
if (_x < -50) {
this.removeMovieClip();
} else if (this.hitTest(player)) {
if (player.gameOn and (!this.picked)) {
picked = true;
player.playSound("soundFX", "pickup" + randomNumber(3));
this.gotoAndPlay("picked");
root.addToScore(null, 1000);
}
}
};
}
Instance of Symbol 205 MovieClip "spikeyFish" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!root.paused) {
myEnterFrameFunction();
}
}
onClipEvent (load) {
vX = -2;
myBottom = _parent.allowedBottom;
if (100000 < root.statusBar.scoreDisplay.score) {
myBottom = 60;
}
_y = ((player.topBoundry + 15) + randomNumber(myBottom));
_x = 580;
myEnterFrameFunction = function () {
if (500000 < root.score) {
closeInFactor = 0.01;
} else if (10000 < root.score) {
closeInFactor = 0.005;
} else {
closeInFactor = 0;
}
deltaYtoPlayer = player._y - this._y;
movement = deltaYtoPlayer * closeInFactor;
this._y = this._y + movement;
tilt = movement * -10;
_rotation = tilt;
_x = (_x + (vX - root.scrollSpeed));
if (_x < -100) {
this.removeMovieClip();
}
if (player.hits(this)) {
player.die("hitRock");
}
};
}
Instance of Symbol 130 MovieClip "electricFish" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!root.paused) {
myEnterFrameFunction();
}
}
onClipEvent (load) {
vX = -2;
myBottom = _parent.allowedBottom;
if (100000 < root.score) {
myBottom = 60;
}
_y = ((player.topBoundry + 5) + randomNumber(myBottom));
_x = 580;
myEnterFrameFunction = function () {
if (100000 < root.score) {
closeInFactor = 0.01;
vX = -4;
} else if (10000 < root.score) {
closeInFactor = 0.005;
}
if (player._x < this._x) {
deltaYtoPlayer = player._y - this._y;
movement = deltaYtoPlayer * closeInFactor;
}
this._y = this._y + movement;
tilt = movement * -10;
_rotation = tilt;
_x = (_x + (vX - root.scrollSpeed));
if (_x < -100) {
this.removeMovieClip();
}
if (player.hits(this)) {
player.die("electrify");
}
};
}
Instance of Symbol 77 MovieClip [medusaFish] "medusaFish" in Symbol 296 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!root.paused) {
myEnterFrameFunction();
}
}
onClipEvent (load) {
vX = -2;
myBottom = _parent.allowedBottom;
if (100000 < root.score) {
myBottom = 60;
}
_y = ((player.topBoundry + 45) + randomNumber(myBottom - 40));
_x = 580;
myEnterFrameFunction = function () {
if (500000 < root.score) {
closeInFactor = 0.025;
} else if (100000 < root.score) {
closeInFactor = 0.015;
} else if (10000 < root.score) {
closeInFactor = 0.005;
}
if (player._x < this._x) {
deltaYtoPlayer = player._y - this._y;
movement = deltaYtoPlayer * closeInFactor;
}
this._y = this._y + movement;
tilt = movement * -10;
_rotation = tilt;
_x = (_x + (vX - root.scrollSpeed));
if (_x < -100) {
this.removeMovieClip();
}
if (player.hits(this)) {
player.die("hitMedusa");
player.medusaThatKilledMe = this;
}
};
}
Instance of Symbol 54 MovieClip [bubble] "a" in Symbol 296 MovieClip Frame 1
onClipEvent (load) {
function reset() {
this.xStart = (_parent.displacement + _parent.player._x) + 5;
this.yStart = _parent.player._y - 30;
this._y = yStart;
this._x = xStart;
n = 10 + random(40);
this._xscale = n;
this._yscale = n;
this.ySpeed = (20 + random(30)) / 10;
this.gotoAndPlay(random(80));
}
reset();
top = player.topBoundry;
}
onClipEvent (enterFrame) {
this._y = this._y - ySpeed;
this._x = this._x - root.scrollSpeed;
point = {x:0, y:_y};
this.localToGlobal(point);
if (point.y < top) {
if ((80 < player._y) and player.gameOn) {
reset();
}
}
}
Symbol 296 MovieClip Frame 2
function clearConstructorMCs(theList) {
var i = 0;
while (i < theList.length) {
var theMC = this[theList[i]];
theMC._visible = false;
theMC.myEnterFrameFunction = null;
i++;
}
}
n = 1;
while (n < 10) {
duplicateMovieClip ("a", "a" + n, n);
n++;
}
stop();
clearConstructorMCs(["medusaFish", "spikeyFish", "electricFish", "icqCoin", "coin", "treasure", "life", "bottle"]);
stop();
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
_parent.head.gotoAndPlay(2);
Symbol 316 MovieClip Frame 16
gotoAndPlay (1);
Symbol 318 MovieClip Frame 1
root.scrollSpeed = root.scrollSpeed * 0.75;
if (root.scrollSpeed < 0.5) {
root.scrollSpeed = 0;
stop();
}
Symbol 386 MovieClip Frame 1
dubi.play();
Symbol 386 MovieClip Frame 2
stop();
Symbol 386 MovieClip Frame 10
dubi.stop();
player.playSound("SoundFX", "whistle");
Symbol 386 MovieClip Frame 66
looseLife();
stop();
Symbol 386 MovieClip Frame 98
dubi.stop();
player.playSound("SoundFX", "electrify");
Symbol 386 MovieClip Frame 136
looseLife();
stop();
Symbol 386 MovieClip Frame 179
dubi.stop();
root.scrollSpeed = 0;
player.playSound("SoundFX", "boing");
Symbol 386 MovieClip Frame 181
root.scrollSpeed = -10;
Symbol 386 MovieClip Frame 182
root.scrollSpeed = 7;
Symbol 386 MovieClip Frame 183
root.scrollSpeed = -5;
Symbol 386 MovieClip Frame 184
root.scrollSpeed = 3;
Symbol 386 MovieClip Frame 185
root.scrollSpeed = -2;
Symbol 386 MovieClip Frame 186
root.scrollSpeed = 1;
Symbol 386 MovieClip Frame 187
root.scrollSpeed = 0;
Symbol 386 MovieClip Frame 209
root.scrollSpeed = root.defaultScrollSpeed;
Symbol 386 MovieClip Frame 219
looseLife();
stop();
Symbol 386 MovieClip Frame 240
dubi.stop();
medusaThatKilledMe.removeMovieClip();
medusaThatKilledMe = null;
player.playSound("SoundFX", "yell");
Symbol 386 MovieClip Frame 284
looseLife();
stop();
Symbol 388 MovieClip Frame 1
stop();
_visible = false;
Symbol 388 MovieClip Frame 2
player.playSound("soundFX", "oxygenAlarm");
_visible = true;
Symbol 388 MovieClip Frame 30
player.playSound("soundFX", "oxygenAlarm");
Symbol 388 MovieClip Frame 59
gotoAndPlay (2);
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 2
stop();
Symbol 391 Button
on (keyPress "p") {
pause();
}
on (keyPress "P") {
pause();
}
Instance of Symbol 393 MovieClip "lives" in Symbol 400 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 396 MovieClip "scoreDisplay" in Symbol 400 MovieClip Frame 1
onClipEvent (load) {
score = 0;
}
Symbol 403 MovieClip Frame 1
function init() {
if (root.mute) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
init();
Symbol 405 MovieClip Frame 1
function init() {
if (!_parent.soundTrack) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
init();
Symbol 414 MovieClip Frame 44
stop();
Symbol 431 Button
on (release, keyPress "<Enter>") {
user_name = clearTabs(user_name);
user_email = clearTabs(user_email);
varString = (((("Score:1\t" + user_name) + "\t") + root.statusBar.scoreDisplay.score) + "\t") + user_email;
enc = encode_data(varString, enc_code);
theURL = "/games/set_score.php?game_data=" + enc;
loadHighScores(theURL);
play();
}
Symbol 439 Button
on (release) {
getURL ("javascript:highScore(1);");
}