Frame 1
stop();
bytesLoaded = 0;
bytesTotal = _root.getBytesTotal();
loading.onEnterFrame = function () {
bytesLoaded = _root.getBytesLoaded();
if ((bytesLoaded / bytesTotal) < 0.98) {
this.gotoAndStop(1);
} else if (((bytesLoaded / bytesTotal) >= 0.98) && ((bytesLoaded / bytesTotal) < 1)) {
this.gotoAndStop(2);
} else {
delete this.onEnterFrame;
gotoAndStop (2);
}
};
stopAllSounds();
Frame 2
function DynamicRegistration(targetMc, xreg, yreg) {
targetMc.xreg = xreg;
targetMc.yreg = yreg;
targetMc.setPropRel = function (property, amount) {
var _local3 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local3);
this._parent.globalToLocal(_local3);
this[property] = amount;
var _local2 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._x = this._x - (_local2.x - _local3.x);
this._y = this._y - (_local2.y - _local3.y);
};
with (targetMc) {
addProperty("_x2", function () {
var _local2 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
return(_local2.x);
}, function (value) {
var _local2 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._x = this._x + (value - _local2.x);
});
addProperty("_y2", function () {
var _local2 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
return(_local2.y);
}, function (value) {
var _local2 = {x:this.xreg, y:this.yreg};
this.localToGlobal(_local2);
this._parent.globalToLocal(_local2);
this._y = this._y + (value - _local2.y);
});
addProperty("_xscale2", function () {
return(this._xscale);
}, function (value) {
this.setPropRel("_xscale", value);
});
addProperty("_yscale2", function () {
return(this._yscale);
}, function (value) {
this.setPropRel("_yscale", value);
});
addProperty("_rotation2", function () {
return(this._rotation);
}, function (value) {
this.setPropRel("_rotation", value);
});
addProperty("_xmouse2", function () {
return(this._xmouse - this.xreg);
}, null);
addProperty("_ymouse2", function () {
return(this._ymouse - this.yreg);
}, null);
}
}
function drawMC(mc, c, a, w, h) {
with (mc) {
beginFill(c, a);
moveTo(0, 0);
lineTo(w, 0);
lineTo(w, h);
lineTo(0, h);
lineTo(0, 0);
endFill();
}
return(mc);
}
function distance(x1, y1, x2, y2) {
var _local1 = new Object();
_local1.distanceX = x2 - x1;
_local1.distanceY = y2 - y1;
_local1.distance = Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
return(_local1);
}
function uncertain() {
var _local2 = arguments;
if (_local2.length == 0) {
return(Math.random());
}
if (_local2.length == 1) {
return(Math.floor(_local2[0] * Math.random()));
}
if (_local2.length == 2) {
return(Math.floor(Math.random() * (_local2[1] - _local2[0])) + _local2[0]);
}
}
function setVolume_g(num) {
_root.soundControl.setVolume(num);
}
function getVolume_g() {
return(_root.soundControl.getVolume());
}
function addScore(scoreInc) {
var _local1 = int(scoreInc);
score = score + _local1;
levelScore = levelScore + _local1;
score1 = score1 + (_local1 * 0.3);
score2 = score2 + (_local1 * 0.7);
return(score);
}
function removeAllMc() {
for (var _local2 in _root) {
if ((typeof(_root[_local2]) == "movieclip") && (_root[_local2] != soundLayer)) {
_root[_local2].removeMovieClip();
}
}
}
function get_ad(totalTools, status_str) {
var _local1 = ("2|nowtool=" + totalTools) + "&totaltool=5&maxquestion=5";
if (status_str != undefined) {
_local1 = _local1 + ("&nowStatus=" + status_str);
}
fscommand ("GOQO_AnswerQuestion", _local1);
}
function drawItem() {
var _local2 = 0;
if (propNums > 5) {
propNums = 5;
}
var _local1 = 1;
while (_local1 <= 5) {
if (stateLayer["propBox" + _local1]._currentframe > 1) {
_local2++;
} else {
break;
}
_local1++;
}
var _local3 = propNums - _local2;
if (_local3 > 0) {
_local1 = _local2 + 1;
while (_local1 <= propNums) {
stateLayer["propBox" + _local1].gotoAndStop(random(4) + 2);
_local1++;
}
}
}
function setGameLevel(num) {
if ((stateLayer != undefined) && (num < 100)) {
with (stateLayer) {
levelNum0.gotoAndStop(Math.floor(num / 10) + 1);
levelNum1.gotoAndStop((num % 10) + 1);
}
}
}
function setLifeNum(num) {
if ((stateLayer != undefined) && (num < 10)) {
with (stateLayer) {
lifeNum0.gotoAndStop(num + 1);
}
}
}
function setGameScore(num) {
if ((stateLayer != undefined) && (num < 1000000)) {
var _local2 = String(num);
var _local3 = "";
var _local1 = 0;
while (_local1 < (6 - _local2.length)) {
_local3 = _local3 + "0";
_local1++;
}
_local2 = _local3.concat(_local2);
_local1 = 0;
while (_local1 < _local2.length) {
stateLayer["scoreNum" + _local1].gotoAndStop(int(_local2.substr(_local1, 1)) + 1);
_local1++;
}
if ((!main.role.crazyFlag) && (levelScore >= levelScoreArr[level - 1])) {
worldPrevState = worldState;
worldState = "nextLevel";
}
}
}
function fishVisible(fish) {
if ((((fish._x > 0) && (fish._x < 560)) && (fish._y > 0)) && (fish._y < 350)) {
return(true);
}
return(false);
}
function fishEnable(fish) {
if ((((fish._x > -100) && (fish._x < 700)) && (fish._y > -100)) && (fish._y < 500)) {
return(true);
}
return(false);
}
function floatCrystal() {
_root.main.gameBG.attachMovie("crystalBall", "crystalBall" + _root.main.gameBG.getNextHighestDepth(), _root.main.gameBG.getNextHighestDepth(), {_x:random(560), _y:430});
}
function flyScore(scoreNum) {
var _local1 = getNextHighestDepth();
var _local2 = attachMovie("flyScoreMc", "flyScoreMc" + _local1, _local1, {_x:main.role._x, _y:main.role._y});
_local2.num = scoreNum;
}
function levelInit() {
sound_loop_obj[0].stop();
sound_loop_obj[1].stop();
sound_loop_obj[2].stop();
sound_loop_obj[(level - 1) % 3].start(0, 99999999);
main.role.removeMovieClip();
group.removeMovieClip();
var _local2 = 0;
while (_local2 < totalFishes) {
for (var _local3 in main["fishLayer" + (_local2 + 1)]) {
main["fishLayer" + (_local2 + 1)][_local3].removeMovieClip();
}
_local2++;
}
setVolume_g(100);
createRole(level + 0.5, 280, -20);
var _local5 = random(5) + 10;
_local2 = 0;
while (_local2 < _local5) {
addEnemy(random(level + 2) + 1, random(560), random(400)).startSwim();
_local2++;
}
if (level >= 7) {
addWhale(800, 200).startSwim();
}
var _local4 = new Array();
var _local6 = random(10) + 5;
_local2 = 0;
while (_local2 < _local6) {
var _local8 = random(100);
var _local7 = random(100) + 150;
_local4.push(addFry(_local8, _local7));
_local2++;
}
addGroup(_local4, {x:800, y:200}).startSwim();
trace("_root.propNums = " + _root.propNums);
drawItem();
}
function useProp1() {
main.role.currSpeed = 0.3;
var _local3 = attachMovie("time_mc", "time_mc" + getNextHighestDepth(), getNextHighestDepth());
_local3.total = 150;
_local3.run = function () {
_root.main.role.currSpeed = 0.15;
this.removeMovieClip();
};
}
function useProp2() {
main.role.attachMovie("light_fish", "light_fish", 1);
main.role.protectedFlag = true;
}
function useProp3() {
main.role.level++;
main.role.setScale();
var _local3 = attachMovie("time_mc", "time_mc" + getNextHighestDepth(), getNextHighestDepth());
_local3.total = 150;
_local3.run = function () {
if (_root.main.role.level > (_root.level + 0.5)) {
_root.main.role.level--;
main.role.setScale();
}
this.removeMovieClip();
};
}
function useProp4() {
if (!main.role.crazyFlag) {
main.role.crazyEat();
}
}
function createRole(level, x, y) {
var obj = {_x:x, _y:y, _xscale:roleScale[level - 0.5], _yscale:roleScale[level - 0.5], name:"role", minSpeed:0, currSpeed:0.15, maxSpeed:0.9, speedInc:0, dir:-1, level:level, dx:0, dy:0, eatingFlag:false, crazyFlag:false, protectedFlag:true, turningFlag:false, deadFlag:false, targetFishs:new Array()};
var mc = main.attachMovie("role", "role", (11.5 - level) * 2, obj);
mc.attachMovie("light_fish", "light_fish", 1);
mc.setScale = function () {
var _local3 = this._xscale / Math.abs(this._xscale);
this._xscale = _local3 * _root.roleScale[this.level - 0.5];
this._yscale = _root.roleScale[this.level - 0.5];
};
mc.moves = function () {
if ((!this.eatingFlag) && (!this.turningFlag)) {
if (((this.dx > 0) && (this.dir == -1)) || ((this.dx < 0) && (this.dir == 1))) {
this.gotoAndPlay("turn");
this.turningFlag = true;
}
this._x = this._x + this.dx;
this._y = this._y + this.dy;
}
};
mc.toMouse = function (x, y) {
if ((!this.crazyFlag) && (!this.deadFlag)) {
var _local4 = _root.distance(this._x, this._y, x, y);
if (_local4.distance <= 0.6) {
this.speedInc = 0;
}
this.dx = _local4.distanceX * (this.currSpeed + this.speedInc);
this.dy = _local4.distanceY * (this.currSpeed + this.speedInc);
this.moves();
var _local3 = this.isDead();
if ((_local3 && (!tmp.eatingFlag)) && (!this.protectedFlag)) {
_local3.gotoAndPlay("eat");
_local3.eatingFlag = true;
this.die(_local3);
}
}
};
mc.crazyEat = function () {
var _local4 = 1;
while (_local4 <= _root.totalFishes) {
var _local3 = _root.main["fishLayer" + _local4];
for (var _local5 in _local3) {
if ((_root.fishVisible(_local3[_local5]) && (_local3[_local5].name == "enemy")) && (_local3[_local5].level < this.level)) {
this.targetFishs.push(_local3[_local5]);
}
_local3[_local5].crazyFlag = true;
}
_local4++;
}
this.crazyFlag = true;
this.currSpeed = this.currSpeed * 5;
this.crazyID = setInterval(this, "autoSwim", 5);
};
mc.autoSwim = function () {
if (this.targetFishs.length > 0) {
var _local7 = this.targetFishs[0]._x;
var _local6 = this.targetFishs[0]._y;
if ((_local7 == undefined) || (_local6 == undefined)) {
_local7 = this._x;
_local6 = this._y;
}
var _local8 = _root.distance(this._x, this._y, _local7, _local6);
this.dx = _local8.distanceX * this.currSpeed;
this.dy = _local8.distanceY * this.currSpeed;
this.moves();
if (_local8.distance < 5) {
var _local9 = this.targetFishs.shift();
_root.flyScore(_local9.level * 100);
_local9.die();
_root.sound_arr[1].start(0, 1);
this.gotoAndPlay("eat");
this.eatingFlag = true;
}
} else {
var _local4 = 1;
while (_local4 <= _root.totalFishes) {
var _local3 = _root.main["fishLayer" + _local4];
for (var _local5 in _local3) {
_local3[_local5].crazyFlag = false;
}
_local4++;
}
this.crazyFlag = false;
this.currSpeed = this.currSpeed / 5;
this.targetFishs = [];
clearInterval(this.crazyID);
}
updateAfterEvent();
};
mc.isDead = function () {
var _local4 = 1;
while (_local4 <= _root.totalFishes) {
var _local3 = _root.main["fishLayer" + _local4];
for (var _local5 in _local3) {
if (((_local3[_local5].name != undefined) && (this.level < _local3[_local5].level)) && (this.hitTest(_local3[_local5].hitMC))) {
return(_local3[_local5]);
}
}
_local4++;
}
return(false);
};
mc.die = function (enemy) {
var p = {x:enemy.hitMC._x, y:enemy.hitMC._y};
enemy.localToGlobal(p);
this.globalToLocal(p);
this.deadFlag = true;
_root.DynamicRegistration(this, p.x, p.y);
this._xscale2 = this._xscale;
var tweenObj = (new mx.transitions.Tween(this, "_xscale2", mx.transitions.easing.Strong.easeOut, this._xscale2, this._xscale2 / 100, 0.3, true));
tweenObj.mc = this;
tweenObj.onMotionFinished = function () {
this.mc.removeMovieClip();
with (_root) {
lifeNum--;
setLifeNum(lifeNum);
if (lifeNum > 0) {
createRole(level + 0.5, 280, -20);
} else {
worldPrevState = worldState;
worldState = "lost";
}
}
};
this.onEnterFrame = function () {
this._yscale2 = Math.abs(this._xscale2);
};
};
return(mc);
}
function addFry(x, y) {
var depth = _root.main.fishLayer1.getNextHighestDepth();
var obj = {_x:x, _y:y, dx:0, dy:0, dir:-1, name:"enemy", currSpeed:0.1, level:1, turningFlag:false, crazyFlag:false, deadFlag:false};
var mc = _root.main.fishLayer1.attachMovie(("enemy" + random(2)) + "_mc", "fry" + depth, depth, obj);
mc.changeMoveInc = function (targetP) {
var _local3 = _root.distance(this._x, this._y, targetP.x, targetP.y);
this.dx = ((_local3.distanceX / _local3.distance) * this.currSpeed) * 10;
this.dy = ((_local3.distanceY / _local3.distance) * this.currSpeed) * 10;
};
mc.moves = function () {
if (this.crazyFlag || (this.deadFlag)) {
return(undefined);
}
with (this) {
if (!turningFlag) {
if (((dx > 0) && (dir == -1)) || ((dx < 0) && (dir == 1))) {
gotoAndPlay("turn");
turningFlag = true;
}
_x = _x + dx;
_y = _y + dy;
}
}
var tmp = this.isDead();
if ((tmp && (this.level < tmp.level)) && (!tmp.eatingFlag)) {
if (tmp == _root.main.role) {
_root.sound_arr[1].start(0, 1);
_root.flyScore(100 * this.level);
}
tmp.gotoAndPlay("eat");
tmp.eatingFlag = true;
this.die(tmp);
}
};
mc.escapes = function () {
var _local4 = _root.main.role;
if (_local4 == undefined) {
return(false);
}
var _local3 = new Object();
if (this._x > _local4._x) {
_local3.x = random(560) + this._x;
} else {
_local3.x = random(this._x - random(560));
}
if (this._y > _local4._y) {
_local3.y = random(400) + this._y;
} else {
_local3.y = this._y - random(400);
}
this.currSpeed = this.currSpeed * (random(4) + 2);
this.changeMoveInc(_local3);
};
mc.isDanger = function () {
var _local3 = _root.main.role;
if (_local3 == undefined) {
return(false);
}
if (_root.distance(this._x, this._y, _local3._x, _local3._y).distance < 100) {
return(true);
}
return(false);
};
mc.isDead = function () {
var _local4 = 1;
while (_local4 <= _root.totalFishes) {
var _local3 = _root.main["fishLayer" + _local4];
for (var _local5 in _local3) {
if (((_local3[_local5] != this) && (this.level < _local3[_local5].level)) && (_local3[_local5].name != undefined)) {
if (this.hitTest(_local3[_local5].hitMC)) {
return(_local3[_local5]);
}
}
}
_local4++;
}
if (this.hitTest(_root.main.role.hitMC)) {
return(_root.main.role);
}
return(false);
};
mc.die = function (enemy) {
if (this.turningFlag) {
this.gotoAndPlay("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
}
var _local3 = {x:enemy.hitMC._x, y:enemy.hitMC._y};
enemy.localToGlobal(_local3);
this.globalToLocal(_local3);
this.deadFlag = true;
_root.DynamicRegistration(this, _local3.x, _local3.y);
var _local4 = new mx.transitions.Tween(this, "_xscale2", mx.transitions.easing.Strong.easeOut, this._xscale2, this._xscale2 / 100, 0.1, true);
_local4.mc = this;
_local4.onMotionFinished = function () {
this.mc.removeMovieClip();
};
this.onEnterFrame = function () {
this._yscale2 = Math.abs(this._xscale2);
};
};
return(mc);
}
function addEnemy(level, x, y) {
if (!level) {
level = 1;
}
var depth = main["fishLayer" + level].getNextHighestDepth();
var obj = {_x:x, _y:y, name:"enemy", minSpeed:0, currSpeed:0.1, maxSpeed:0.9, dir:-1, level:level, count:0, maxCount:random(100) + 150, dx:0, dy:0, protectedFlag:false, escapingFlag:false, freeingFlag:true, eatingFlag:false, turningFlag:false, crazyFlag:false, deadFlag:false};
var mc = main["fishLayer" + level].attachMovie(("enemy" + level) + "_mc", "enemy" + depth, depth, obj);
mc.moves = function () {
with (this) {
if ((!turningFlag) && (!eatingFlag)) {
if (((dx > 0) && (dir == -1)) || ((dx < 0) && (dir == 1))) {
gotoAndPlay("turn");
turningFlag = true;
}
_x = _x + dx;
_y = _y + dy;
}
}
};
mc.changeMoveInc = function (targetP) {
var _local3 = _root.distance(this._x, this._y, targetP.x, targetP.y);
this.dx = ((_local3.distanceX / _local3.distance) * this.currSpeed) * 10;
this.dy = ((_local3.distanceY / _local3.distance) * this.currSpeed) * 10;
};
mc.startSwim = function () {
this.changeMoveInc({x:random(560), y:random(200) + 100});
this.onEnterFrame = function () {
if (((_root.worldState == "game") && (!this.crazyFlag)) && (!this.deadFlag)) {
if (this.isDanger()) {
this.count = 0;
if (this.level < _root.main.role.level) {
if ((!this.escapingFlag) && (Math.random() > 0.9)) {
this.escapes();
this.escapingFlag = true;
}
} else if ((this.level > _root.main.role.level) && (!_root.main.role.protectedFlag)) {
if (Math.random() > 0.9) {
this.attack();
}
}
} else {
this.escapingFlag = false;
this.currSpeed = 0.1;
if (this.count >= this.maxCount) {
this.count = 0;
this.changeMoveInc({x:random(560), y:random(400)});
}
this.count++;
}
if (!this.deadFlag) {
var _local3 = this.isDead();
if ((_local3 && (!tmp.eatingFlag)) && (!this.protectedFlag)) {
if (_local3 == _root.main.role) {
_root.sound_arr[1].start(0, 1);
_root.flyScore(100 * this.level);
}
_local3.gotoAndPlay("eat");
_local3.eatingFlag = true;
this.die(_local3);
}
}
this.moves();
if (!_root.fishEnable(this)) {
this.changeMoveInc({x:random(560 - this._x), y:random(200) + 100});
}
}
};
};
mc.attack = function () {
var _local3 = _root.main.role;
if (_local3 == undefined) {
return(false);
}
var _local4 = _root.distance(this._x, this._y, _local3._x, _local3._y);
this.dx = (_local4.distanceX * this.currSpeed) * 0.5;
this.dy = (_local4.distanceY * this.currSpeed) * 0.5;
};
mc.escapes = function () {
var _local4 = _root.main.role;
if (_local4 == undefined) {
return(false);
}
var _local3 = new Object();
if (this._x > _local4._x) {
_local3.x = random(560) + this._x;
} else {
_local3.x = random(this._x - random(560));
}
if (this._y > _local4._y) {
_local3.y = random(400) + this._y;
} else {
_local3.y = this._y - random(400);
}
this.currSpeed = this.currSpeed * (random(4) + 2);
this.escapingFlag = true;
this.changeMoveInc(_local3);
};
mc.isDanger = function () {
var _local3 = _root.main.role;
if (_local3 == undefined) {
return(false);
}
if (_root.distance(this._x, this._y, _local3._x, _local3._y).distance < 100) {
return(true);
}
return(false);
};
mc.isDead = function () {
var _local4 = 1;
while (_local4 <= _root.totalFishes) {
var _local3 = _root.main["fishLayer" + _local4];
for (var _local5 in _local3) {
if ((((_local3[_local5] != this) && (_local3[_local5].name != undefined)) && (this.level < _local3[_local5].level)) && (this.hitTest(_local3[_local5].hitMC))) {
return(_local3[_local5]);
}
}
_local4++;
}
if ((this.level < _root.main.role.level) && (this.hitTest(_root.main.role.hitMC))) {
return(_root.main.role);
}
return(false);
};
mc.die = function (enemy) {
if (this.turningFlag) {
this.gotoAndPlay("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
}
var p = {x:enemy.hitMC._x, y:enemy.hitMC._y};
enemy.localToGlobal(p);
this.globalToLocal(p);
this.deadFlag = true;
_root.DynamicRegistration(this, p.x, p.y);
var tweenObj = (new mx.transitions.Tween(this, "_xscale2", mx.transitions.easing.Strong.easeOut, this._xscale2, this._xscale2 / 100, 0.3, true));
tweenObj.mc = this;
tweenObj.onMotionFinished = function () {
with (_root) {
var rndm = random(4);
if (rndm == 0) {
addEnemy(this.mc.level, _root.uncertain(-100), random(500)).startSwim();
} else if (rndm == 1) {
addEnemy(this.mc.level, random(100) + 570, random(500)).startSwim();
} else if (rndm == 2) {
addEnemy(this.mc.level, random(700), _root.uncertain(-100)).startSwim();
} else if (rndm == 3) {
addEnemy(this.mc.level, random(700), random(90) + 410).startSwim();
}
}
this.mc.removeMovieClip();
};
this.onEnterFrame = function () {
this._yscale2 = Math.abs(this._xscale2);
};
};
return(mc);
}
function addWhale(x, y) {
var _local5 = main.fishLayer9.getNextHighestDepth();
var _local6 = {_x:x, _y:y, max_x:random(800) + 1000, min_x:(-random(800)) - 500, name:"whale", level:9, eatingFlag:false, crazyFlag:false, deadFlag:false};
var _local3 = main.fishLayer9.attachMovie("whale_mc", "whale_mc" + _local5, _local5, _local6);
if (x > 280) {
_local3.currSpeed = -4;
} else {
_local3.currSpeed = 4;
_local3._xscale = _local3._xscale * -1;
}
_local3.moves = function () {
this._x = this._x + this.currSpeed;
if ((this._x >= this.max_x) || (this._x <= this.min_x)) {
this._xscale = this._xscale * -1;
this.currSpeed = this.currSpeed * -1;
this.max_x = random(800) + 1000;
this.min_x = (-random(800)) - 500;
}
};
_local3.startSwim = function () {
this.onEnterFrame = function () {
if (((_root.worldState == "game") && (!this.crazyFlag)) && (!this.deadFlag)) {
var _local3 = this.isDead();
if ((_local3 && (!tmp.eatingFlag)) && (!this.protectedFlag)) {
if (_local3 == _root.main.role) {
_root.sound_arr[1].start(0, 1);
_root.flyScore(100 * this.level);
}
_local3.gotoAndPlay("eat");
_local3.eatingFlag = true;
this.die(_local3);
}
this.moves();
}
};
};
_local3.isDead = function () {
if ((this.level < _root.main.role.level) && (this.hitTest(_root.main.role.hitMC))) {
return(_root.main.role);
}
return(false);
};
_local3.die = function () {
this.removeMovieClip();
};
return(_local3);
}
function addGroup(memberArr, targetP) {
var _local8 = _root.getNextHighestDepth();
_root.group = (mc = _root.createEmptyMovieClip("fishGroup" + _local8, _local8));
mc.memberArr = memberArr;
mc.targetP = targetP;
mc.dissolution = false;
mc.startSwim = function () {
for (var _local3 in this.memberArr) {
this.memberArr[_local3].changeMoveInc({x:(this.targetP.x + random(100)) - 50, y:(this.targetP.y + random(100)) - 50});
}
this.onEnterFrame = function () {
if (_root.worldState == "game") {
if (this.memberArr.length > 0) {
var _local3 = 0;
while (_local3 < this.memberArr.length) {
this.memberArr[_local3].moves();
if (!_root.fishEnable(this.memberArr[_local3])) {
this.memberArr[_local3].die();
this.memberArr.splice(_local3, 1);
return(undefined);
}
if (this.memberArr[_local3] == undefined) {
this.memberArr.splice(_local3, 1);
return(undefined);
}
_local3++;
}
if (this.isDanger() && (!this.dissolution)) {
this.dissolution = true;
for (_local3 in this.memberArr) {
this.memberArr[_local3].escapes();
}
}
} else {
var _local6 = new Array();
var _local7 = random(10) + 5;
var _local5 = -1;
if (Math.random() > 0.5) {
_local5 = 1;
}
var _local3 = 0;
while (_local3 < _local7) {
if (_local5 == 1) {
var _local4 = _root.addFry(_root.uncertain(-100), random(100) + 150);
} else {
var _local4 = _root.addFry(random(100) + 570, random(100) + 150);
}
_local6.push(_local4);
_local3++;
}
_root.addGroup(_local6, {x:_local5 * 800, y:200}).startSwim();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
};
mc.isDanger = function () {
for (var _local2 in this.memberArr) {
if (this.memberArr[_local2].isDanger()) {
return(true);
}
return(false);
}
};
return(mc);
}
function start_game() {
if ((_root._INTERFACE_1 != "") and (_root._INTERFACE_1 != undefined)) {
SendData = new LoadVars();
SendData.GameID = _root.GAME_ID;
SendData.MemberID = _root.MEMBER_ID;
SendData.CafeID = _root.CAFE_ID;
SendData.SessionID = _root.SESSION_ID;
SendData.SequenceID = 0;
SendData.Interface = _root._INTERFACE_1;
fscommand ("GOQO_StartGame", unescape(SendData));
}
}
function end_game(my_score) {
if ((_root._INTERFACE_2 != "") and (_root._INTERFACE_2 != undefined)) {
my_score = Math.round(my_score);
SendData.Score = my_score;
SendData.allAddItem = _root.allAddItem;
SendData.SequenceID = _root.SequenceID;
SendData.Interface = _root._INTERFACE_2;
var _local2 = (String(SendData.SequenceID) + String(SendData.Score)) + String(SendData.allAddItem);
_local2 = dns(_local2);
_local2 = _local2.substr(7, 5);
SendData.ver = _local2;
fscommand ("GOQO_EndGame", unescape(SendData));
}
}
function dns(s) {
return(binl2hex(core_dns(str2binl(s), s.length * strsize)));
}
function b64_dns(s) {
}
function str_dns(s) {
}
function hex_hmac_dns(key, data) {
}
function b64_hmac_dns(key, data) {
stop();
// swfAction0x02 // Unknown action
}
function str_hmac_dns(key, data) {
}
function core_dns(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = dns_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = dns_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = dns_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = dns_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = dns_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = dns_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = dns_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = dns_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = dns_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = dns_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = dns_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = dns_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = dns_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = dns_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = dns_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = dns_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = dns_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = dns_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = dns_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = dns_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = dns_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = dns_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = dns_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = dns_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = dns_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = dns_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = dns_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = dns_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = dns_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = dns_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = dns_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = dns_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = dns_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = dns_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = dns_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = dns_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = dns_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = dns_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = dns_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = dns_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = dns_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = dns_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = dns_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = dns_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = dns_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = dns_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = dns_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = dns_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = dns_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = dns_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = dns_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = dns_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = dns_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = dns_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = dns_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = dns_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = dns_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = dns_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = dns_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = dns_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = dns_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = dns_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = dns_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = dns_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(Array(_local4, _local3, _local2, _local1));
}
function dns_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function dns_ff(a, b, c, d, x, s, t) {
return(dns_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function dns_gg(a, b, c, d, x, s, t) {
return(dns_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function dns_hh(a, b, c, d, x, s, t) {
return(dns_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function dns_ii(a, b, c, d, x, s, t) {
return(dns_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_dns(key, data) {
var _local2 = str2binl(key);
if (_local2.length > 16) {
_local2 = core_dns(_local2, key.length * strsize);
}
var _local3 = Array(16);
var _local4 = Array(16);
var _local1 = 0;
while (_local1 < 16) {
_local3[_local1] = _local2[_local1] ^ 909522486;
_local4[_local1] = _local2[_local1] ^ 1549556828;
_local1++;
}
var _local5 = core_dns(_local3.concat(str2binl(data)), 512 + (data.length * strsize));
return(core_dns(_local4.concat(_local5), 640));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local3 = Array();
var _local4 = (1 << strsize) - 1;
var _local1 = 0;
while (_local1 < (str.length * strsize)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / strsize) & _local4) << (_local1 % 32));
_local1 = _local1 + strsize;
}
return(_local3);
}
function binl2str(bin) {
var _local3 = "";
var _local4 = (1 << strsize) - 1;
var _local1 = 0;
while (_local1 < (bin.length * 32)) {
_local3 = _local3 + String.fromCharCode((bin[_local1 >> 5] >>> (_local1 % 32)) & _local4);
_local1 = _local1 + strsize;
}
return(_local3);
}
function binl2hex(binarray) {
var _local3 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var _local4 = "";
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local4 = "";
var _local2 = 0;
while (_local2 < (binarray.length * 4)) {
var _local5 = ((((binarray[_local2 >> 2] >> (8 * (_local2 % 4))) & 255) << 16) | (((binarray[(_local2 + 1) >> 2] >> (8 * ((_local2 + 1) % 4))) & 255) << 8)) | ((binarray[(_local2 + 2) >> 2] >> (8 * ((_local2 + 2) % 4))) & 255);
var _local1 = 0;
while (_local1 < 4) {
if (((_local2 * 8) + (_local1 * 6)) > (binarray.length * 32)) {
_local4 = _local4 + b64pad;
} else {
_local4 = _local4 + _local6.charAt((_local5 >> (6 * (3 - _local1))) & 63);
}
_local1++;
}
_local2 = _local2 + 3;
}
return(_local4);
}
function des(key, message, encrypt, mode, iv) {
var _local17 = new Array(16843776, 0, 65536, 16843780, 16842756, 66564, 4, 65536, 1024, 16843776, 16843780, 1024, 16778244, 16842756, 16777216, 4, 1028, 16778240, 16778240, 66560, 66560, 16842752, 16842752, 16778244, 65540, 16777220, 16777220, 65540, 0, 1028, 66564, 16777216, 65536, 16843780, 4, 16842752, 16843776, 16777216, 16777216, 1024, 16842756, 65536, 66560, 16777220, 1024, 4, 16778244, 66564, 16843780, 65540, 16842752, 16778244, 16777220, 1028, 66564, 16843776, 1028, 16778240, 16778240, 0, 65540, 66560, 0, 16842756);
var _local24 = new Array(2148565024, 2147516416, 32768, 1081376, 1048576, 32, 2148532256, 2147516448, 2147483680, 2148565024, 2148564992, 2147483648, 2147516416, 1048576, 32, 2148532256, 1081344, 1048608, 2147516448, 0, 2147483648, 32768, 1081376, 2148532224, 1048608, 2147483680, 0, 1081344, 32800, 2148564992, 2148532224, 32800, 0, 1081376, 2148532256, 1048576, 2147516448, 2148532224, 2148564992, 32768, 2148532224, 2147516416, 32, 2148565024, 1081376, 32, 32768, 2147483648, 32800, 2148564992, 1048576, 2147483680, 1048608, 2147516448, 2147483680, 1048608, 1081344, 0, 2147516416, 32800, 2147483648, 2148532256, 2148565024, 1081344);
var _local16 = new Array(520, 134349312, 0, 134348808, 134218240, 0, 131592, 134218240, 131080, 134217736, 134217736, 131072, 134349320, 131080, 134348800, 520, 134217728, 8, 134349312, 512, 131584, 134348800, 134348808, 131592, 134218248, 131584, 131072, 134218248, 8, 134349320, 512, 134217728, 134349312, 134217728, 131080, 520, 131072, 134349312, 134218240, 0, 512, 131080, 134349320, 134218240, 134217736, 512, 0, 134348808, 134218248, 131072, 134217728, 134349320, 8, 131592, 131584, 134217736, 134348800, 134218248, 520, 134348800, 131592, 8, 134348808, 131584);
var _local22 = new Array(8396801, 8321, 8321, 128, 8396928, 8388737, 8388609, 8193, 0, 8396800, 8396800, 8396929, 129, 0, 8388736, 8388609, 1, 8192, 8388608, 8396801, 128, 8388608, 8193, 8320, 8388737, 1, 8320, 8388736, 8192, 8396928, 8396929, 129, 8388736, 8388609, 8396800, 8396929, 129, 0, 0, 8396800, 8320, 8388736, 8388737, 1, 8396801, 8321, 8321, 128, 8396929, 129, 1, 8192, 8388609, 8193, 8396928, 8388737, 8193, 8320, 8388608, 8396801, 128, 8388608, 8192, 8396928);
var _local23 = new Array(256, 34078976, 34078720, 1107296512, 524288, 256, 1073741824, 34078720, 1074266368, 524288, 33554688, 1074266368, 1107296512, 1107820544, 524544, 1073741824, 33554432, 1074266112, 1074266112, 0, 1073742080, 1107820800, 1107820800, 33554688, 1107820544, 1073742080, 0, 1107296256, 34078976, 33554432, 1107296256, 524544, 524288, 1107296512, 256, 33554432, 1073741824, 34078720, 1107296512, 1074266368, 33554688, 1073741824, 1107820544, 34078976, 1074266368, 256, 33554432, 1107820544, 1107820800, 524544, 1107296256, 1107820800, 34078720, 0, 1074266112, 1107296256, 524544, 33554688, 1073742080, 524288, 0, 1074266112, 34078976, 1073742080);
var _local20 = new Array(536870928, 541065216, 16384, 541081616, 541065216, 16, 541081616, 4194304, 536887296, 4210704, 4194304, 536870928, 4194320, 536887296, 536870912, 16400, 0, 4194320, 536887312, 16384, 4210688, 536887312, 16, 541065232, 541065232, 0, 4210704, 541081600, 16400, 4210688, 541081600, 536870912, 536887296, 16, 541065232, 4210688, 541081616, 4194304, 16400, 536870928, 4194304, 536887296, 536870912, 16400, 536870928, 541081616, 4210688, 541065216, 4210704, 541081600, 0, 541065232, 16, 16384, 541065216, 4210704, 16384, 4194320, 536887312, 0, 541081600, 536870912, 4194320, 536887312);
var _local21 = new Array(2097152, 69206018, 67110914, 0, 2048, 67110914, 2099202, 69208064, 69208066, 2097152, 0, 67108866, 2, 67108864, 69206018, 2050, 67110912, 2099202, 2097154, 67110912, 67108866, 69206016, 69208064, 2097154, 69206016, 2048, 2050, 69208066, 2099200, 2, 67108864, 2099200, 67108864, 2099200, 2097152, 67110914, 67110914, 69206018, 69206018, 2, 2097154, 67108864, 67110912, 2097152, 69208064, 2050, 2099202, 69208064, 2050, 67108866, 69208066, 69206016, 2099200, 0, 2, 69208066, 0, 2099202, 69206016, 2048, 67108866, 67110912, 2048, 2097154);
var _local19 = new Array(268439616, 4096, 262144, 268701760, 268435456, 268439616, 64, 268435456, 262208, 268697600, 268701760, 266240, 268701696, 266304, 4096, 64, 268697600, 268435520, 268439552, 4160, 266240, 262208, 268697664, 268701696, 4160, 0, 0, 268697664, 268435520, 268439552, 266304, 262144, 266304, 262144, 268701696, 4096, 64, 268697664, 4096, 266304, 268439552, 64, 268435520, 268697600, 268697664, 268435456, 262144, 268439616, 0, 268701760, 262208, 268435520, 268697600, 268439552, 268439616, 0, 268701760, 266240, 266240, 4160, 4160, 262208, 268435456, 268701696);
var _local11 = des_createKeys(key);
var _local8 = 0;
var _local6;
var _local7;
var _local3;
var _local33;
var _local5;
var _local4;
var _local2;
var _local1;
var _local10;
var _local14;
var _local27;
var _local15;
var _local28;
var _local12;
var _local13;
var _local31 = message.length;
var _local18 = 0;
var _local25 = ((_local11.length == 32) ? 3 : 9);
if (_local25 == 3) {
_local10 = (encrypt ? (new Array(0, 32, 2)) : (new Array(30, -2, -2)));
} else {
_local10 = (encrypt ? (new Array(0, 32, 2, 62, 30, -2, 64, 96, 2)) : (new Array(94, 62, -2, 32, 64, 2, 30, -2, -2)));
}
message = message + "";
result = "";
tempresult = "";
if (mode == 1) {
_local14 = (((iv.charCodeAt(_local8++) << 24) | (iv.charCodeAt(_local8++) << 16)) | (iv.charCodeAt(_local8++) << 8)) | iv.charCodeAt(_local8++);
_local15 = (((iv.charCodeAt(_local8++) << 24) | (iv.charCodeAt(_local8++) << 16)) | (iv.charCodeAt(_local8++) << 8)) | iv.charCodeAt(_local8++);
_local8 = 0;
}
while (_local8 < _local31) {
_local2 = (((message.charCodeAt(_local8++) << 24) | (message.charCodeAt(_local8++) << 16)) | (message.charCodeAt(_local8++) << 8)) | message.charCodeAt(_local8++);
_local1 = (((message.charCodeAt(_local8++) << 24) | (message.charCodeAt(_local8++) << 16)) | (message.charCodeAt(_local8++) << 8)) | message.charCodeAt(_local8++);
if (mode == 1) {
if (encrypt) {
_local2 = _local2 ^ _local14;
_local1 = _local1 ^ _local15;
} else {
_local27 = _local14;
_local28 = _local15;
_local14 = _local2;
_local15 = _local1;
}
}
_local3 = ((_local2 >>> 4) ^ _local1) & 252645135;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 4);
_local3 = ((_local2 >>> 16) ^ _local1) & 65535;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 16);
_local3 = ((_local1 >>> 2) ^ _local2) & 858993459;
_local2 = _local2 ^ _local3;
_local1 = _local1 ^ (_local3 << 2);
_local3 = ((_local1 >>> 8) ^ _local2) & 16711935;
_local2 = _local2 ^ _local3;
_local1 = _local1 ^ (_local3 << 8);
_local3 = ((_local2 >>> 1) ^ _local1) & 1431655765;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 1);
_local2 = (_local2 << 1) | (_local2 >>> 31);
_local1 = (_local1 << 1) | (_local1 >>> 31);
_local7 = 0;
while (_local7 < _local25) {
_local12 = _local10[_local7 + 1];
_local13 = _local10[_local7 + 2];
_local6 = _local10[_local7];
while (_local6 != _local12) {
_local5 = _local1 ^ _local11[_local6];
_local4 = ((_local1 >>> 4) | (_local1 << 28)) ^ _local11[_local6 + 1];
_local3 = _local2;
_local2 = _local1;
_local1 = _local3 ^ (((((((_local24[(_local5 >>> 24) & 63] | _local22[(_local5 >>> 16) & 63]) | _local20[(_local5 >>> 8) & 63]) | _local19[_local5 & 63]) | _local17[(_local4 >>> 24) & 63]) | _local16[(_local4 >>> 16) & 63]) | _local23[(_local4 >>> 8) & 63]) | _local21[_local4 & 63]);
_local6 = _local6 + _local13;
}
_local3 = _local2;
_local2 = _local1;
_local1 = _local3;
_local7 = _local7 + 3;
}
_local2 = (_local2 >>> 1) | (_local2 << 31);
_local1 = (_local1 >>> 1) | (_local1 << 31);
_local3 = ((_local2 >>> 1) ^ _local1) & 1431655765;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 1);
_local3 = ((_local1 >>> 8) ^ _local2) & 16711935;
_local2 = _local2 ^ _local3;
_local1 = _local1 ^ (_local3 << 8);
_local3 = ((_local1 >>> 2) ^ _local2) & 858993459;
_local2 = _local2 ^ _local3;
_local1 = _local1 ^ (_local3 << 2);
_local3 = ((_local2 >>> 16) ^ _local1) & 65535;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 16);
_local3 = ((_local2 >>> 4) ^ _local1) & 252645135;
_local1 = _local1 ^ _local3;
_local2 = _local2 ^ (_local3 << 4);
if (mode == 1) {
if (encrypt) {
_local14 = _local2;
_local15 = _local1;
} else {
_local2 = _local2 ^ _local27;
_local1 = _local1 ^ _local28;
}
}
tempresult = tempresult + String.fromCharCode(_local2 >>> 24, (_local2 >>> 16) & 255, (_local2 >>> 8) & 255, _local2 & 255, _local1 >>> 24, (_local1 >>> 16) & 255, (_local1 >>> 8) & 255, _local1 & 255);
_local18 = _local18 + 8;
if (_local18 == 512) {
result = result + tempresult;
tempresult = "";
_local18 = 0;
}
}
return(result + tempresult);
}
function printHex(s) {
var _local4 = "0x";
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < s.length) {
_local4 = _local4 + (_local3[s.charCodeAt(_local1) >> 4] + _local3[s.charCodeAt(_local1) & 15]);
_local1++;
}
return(_local4);
}
function unHex(s) {
var _local3 = "";
var _local1 = 2;
while (_local1 < s.length) {
x1 = s.charCodeAt(_local1);
x1 = (((x1 >= 48) && (x1 < 58)) ? (x1 - 48) : ((x1 - 97) + 10));
x2 = s.charCodeAt(_local1 + 1);
x2 = (((x2 >= 48) && (x2 < 58)) ? (x2 - 48) : ((x2 - 97) + 10));
_local3 = _local3 + String.fromCharCode(((x1 << 4) & 240) | (x2 & 15));
_local1 = _local1 + 2;
}
return(_local3);
}
item_modified = "0";
readScoreXML = "";
readScoreXML_length = "";
areaArr = "";
goqoArr = "";
high_socre = "";
score = (score1 = (score2 = 0));
youlong = 0;
crystalInterval = 0;
totalFishes = 9;
roleScale = [0, 20, 30, 40, 55, 70, 90, 115, 145, 210];
levelScoreArr = [1500, 3500, 7000, 12000, 19000, 30000, 45000, 45000];
soundName = ["sound_loop", "sound_eat", "sound_end"];
soundControl = new Sound();
createEmptyMovieClip("soundLayer", -1);
with (soundLayer) {
var i = 0;
while (i < soundName.length) {
createEmptyMovieClip("sound_mc" + i, i);
i++;
}
}
sound_arr = new Array();
var i = (soundName.length - 1);
while (i >= 0) {
sound_arr[i] = new Sound(soundLayer["sound_mc" + i]);
sound_arr[i].attachSound(soundName[i]);
i--;
}
KEY_LEFT = 37;
KEY_RIGHT = 39;
KEY_UP = 38;
KEY_DOWN = 40;
pressFlag = [false, false];
mouseControl = true;
createEmptyMovieClip("mouseMC", -199);
mouseMC._x = _xmouse;
mouseMC._y = _ymouse;
onMouseMove = function () {
mouseMC._x = _xmouse;
mouseMC._y = _ymouse;
mouseControl = true;
};
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
System.security.allowDomain("61.145.117.96", "61.145.117.58", "61.145.117.85", "211.157.27.248", "211.157.27.249");
fscommand ("trapallkeys", true);
var hexcase = 0;
var b64pad = "";
var strsize = 8;
if (false) {
}
// swfAction0x02 // Unknown action
// swfAction0x01 // Unknown action
function gameRun() {
switch (gameState) {
case "init" :
gameInit();
return;
case "loop" :
gameLoop();
}
}
function gameInit() {
removeAllMc();
sound_arr[0].stop();
sound_arr[0].start(0, 99999999);
setVolume_g(100);
createEmptyMovieClip("main", getNextHighestDepth());
var _local7 = main.attachMovie("gameBG", "gameBG", 0);
_local7.gotoAndStop(Math.ceil(level / 2));
var _local2 = 0;
while (_local2 < totalFishes) {
_root.main.createEmptyMovieClip("fishLayer" + (_local2 + 1), ((totalFishes * 2) - (_local2 * 2)) - 1);
_local2++;
}
createRole(level + 0.5, 280, -20);
var _local5 = random(5) + 10;
_local2 = 0;
while (_local2 < _local5) {
addEnemy(random(level + 2) + 1, random(560), random(400)).startSwim();
_local2++;
}
var _local4 = new Array();
var _local6 = random(10) + 5;
_local2 = 0;
while (_local2 < _local6) {
var _local3 = addFry(random(100), random(100) + 150);
_local4.push(_local3);
_local2++;
}
addGroup(_local4, {x:800, y:200}).startSwim();
stateLayer = attachMovie("stateLayer", "stateLayer", getNextHighestDepth());
setGameLevel(level);
setLifeNum(lifeNum);
setGameScore(score);
drawItem();
gameMask = drawMC(createEmptyMovieClip("mask", getNextHighestDepth()), 0, 100, 560, 400);
_root.setMask(gameMask);
gameState = "loop";
}
function gameLoop() {
main.role.toMouse(mouseMC._x, mouseMC._y);
if (crystalInterval > 100) {
crystalInterval = 0;
if (Math.random() > 0.5) {
floatCrystal();
}
} else {
crystalInterval++;
}
var _local1 = 8;
if (Key.isDown(37)) {
mouseMC._x = mouseMC._x - _local1;
mouseControl = false;
} else if (Key.isDown(39)) {
mouseMC._x = mouseMC._x + _local1;
mouseControl = false;
}
if (Key.isDown(38)) {
mouseMC._y = mouseMC._y - _local1;
mouseControl = false;
} else if (Key.isDown(40)) {
mouseMC._y = mouseMC._y + _local1;
mouseControl = false;
}
if (mouseMC._x < 0) {
mouseMC._x = 0;
} else if (mouseMC._x > 560) {
mouseMC._x = 560;
}
if (mouseMC._y < 0) {
mouseMC._y = 0;
} else if (mouseMC._y > 360) {
mouseMC._y = 360;
}
}
function gameOver() {
var _local1 = 0;
while (_local1 < 9) {
if (blockObjs[_local1][13].style != 25) {
return(true);
}
_local1++;
}
return(false);
}
gameState = "init";
worldState = "init";
worldPrevState = "";
onEnterFrame = function () {
switch (worldState) {
case "init" :
if (menuCanvas == undefined) {
level = 1;
lifeNum = 3;
propNums = 0;
getedProp = false;
levelScore = 0;
removeAllMc();
setVolume_g(0);
attachMovie("menuCanvas", "menuCanvas", 0);
}
return;
case "help" :
if (helpCanvas == undefined) {
removeAllMc();
setVolume_g(0);
attachMovie("helpCanvas", "helpCanvas", 0);
}
return;
case "game" :
gameRun();
return;
case "nextLevel" :
if (level == 8) {
worldPrevState = worldState;
worldState = "win";
} else if (nextLevelCanvas == undefined) {
setVolume_g(0);
attachMovie("nextLevelCanvas", "nextLevelCanvas", getNextHighestDepth());
}
levelScore = 0;
return;
case "thisLevel" :
level++;
setGameLevel(level);
levelInit();
worldPrevState = worldState;
worldState = "game";
return;
case "lost" :
if (lostCanvas == undefined) {
stopAllSounds();
sound_arr[2].start(0, 1);
attachMovie("lostCanvas", "lostCanvas", getNextHighestDepth());
}
return;
case "win" :
if (winCanvas == undefined) {
setVolume_g(0);
attachMovie("winCanvas", "winCanvas", getNextHighestDepth());
}
return;
case "pause" :
if (pauseCanvas == undefined) {
setVolume_g(0);
with (stateLayer) {
pause_mc.gotoAndStop(2);
sound_mc.gotoAndStop(2);
sound_mc.btn.enabled = false;
}
var tmpMc = attachMovie("pauseCanvas", "pauseCanvas", getNextHighestDepth());
tmpMc.useHandCursor = false;
tmpMc.onPress = function () {
worldPrevState = worldState;
worldState = "resume";
};
}
return;
case "resume" :
pauseCanvas.removeMovieClip();
setVolume_g(100);
with (stateLayer) {
pause_mc.gotoAndStop(1);
sound_mc.gotoAndStop(1);
}
worldPrevState = worldState;
worldState = "game";
}
};
Symbol 18 Button
on (press, keyPress "s") {
startGame();
}
Symbol 33 MovieClip Frame 10
stop();
Symbol 73 MovieClip Frame 7
stop();
Symbol 76 MovieClip Frame 7
stop();
Symbol 79 MovieClip Frame 7
stop();
Symbol 82 MovieClip Frame 7
stop();
Symbol 112 MovieClip Frame 1
function getProp() {
if (prop_bt.enabled) {
prop_bt._alpha = 50;
prop_bt.enabled = false;
with (_root) {
get_ad(propNums);
}
}
}
function startGame() {
with (_root) {
start_game();
propNums = propNums + Number(item_modified);
item_modified = "0";
worldPrevState = worldState;
worldState = "game";
}
}
if (_root.getedProp) {
prop_bt._alpha = 50;
prop_bt.enabled = false;
}
Symbol 112 MovieClip Frame 734
stop();
Symbol 135 MovieClip Frame 765
stop();
btn.onPress = function () {
_parent.mov1.gotoAndPlay(1);
_parent.mov2.gotoAndPlay(1);
};
Symbol 141 MovieClip [light_fish] Frame 11
if (count == undefined) {
count = 1;
}
if ((count != undefined) && (_root.worldState == "game")) {
count++;
}
if (count == 15) {
_root.main.role.protectedFlag = false;
this.removeMovieClip();
}
Symbol 156 MovieClip [enemy8_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 156 MovieClip [enemy8_mc] Frame 24
gotoAndPlay ("swim");
Symbol 156 MovieClip [enemy8_mc] Frame 30
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 156 MovieClip [enemy8_mc] Frame 39
gotoAndPlay ("swim");
Symbol 163 MovieClip [enemy1_mc] Frame 1
this.turningFlag = false;
Symbol 163 MovieClip [enemy1_mc] Frame 12
gotoAndPlay ("swim");
Symbol 163 MovieClip [enemy1_mc] Frame 15
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 176 MovieClip [enemy6_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 176 MovieClip [enemy6_mc] Frame 12
gotoAndPlay ("swim");
Symbol 176 MovieClip [enemy6_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 176 MovieClip [enemy6_mc] Frame 24
gotoAndPlay ("swim");
Symbol 193 MovieClip [enemy5_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 193 MovieClip [enemy5_mc] Frame 12
gotoAndPlay ("swim");
Symbol 193 MovieClip [enemy5_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 193 MovieClip [enemy5_mc] Frame 24
gotoAndPlay ("swim");
Symbol 208 MovieClip [enemy3_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 208 MovieClip [enemy3_mc] Frame 12
gotoAndPlay ("swim");
Symbol 208 MovieClip [enemy3_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 208 MovieClip [enemy3_mc] Frame 21
gotoAndPlay ("swim");
Symbol 221 MovieClip [enemy2_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 221 MovieClip [enemy2_mc] Frame 12
gotoAndPlay ("swim");
Symbol 221 MovieClip [enemy2_mc] Frame 15
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 221 MovieClip [enemy2_mc] Frame 18
gotoAndPlay ("swim");
Symbol 240 MovieClip [stingFish_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 240 MovieClip [stingFish_mc] Frame 12
gotoAndPlay ("swim");
Symbol 240 MovieClip [stingFish_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 240 MovieClip [stingFish_mc] Frame 27
stop();
Symbol 240 MovieClip [stingFish_mc] Frame 33
gotoAndPlay ("swim");
Symbol 257 MovieClip [enemy7_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 257 MovieClip [enemy7_mc] Frame 12
gotoAndPlay ("swim");
Symbol 257 MovieClip [enemy7_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 257 MovieClip [enemy7_mc] Frame 24
gotoAndPlay ("swim");
Symbol 274 MovieClip [role] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 274 MovieClip [role] Frame 16
gotoAndPlay ("swim");
Symbol 274 MovieClip [role] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 274 MovieClip [role] Frame 22
gotoAndPlay ("swim");
Symbol 285 MovieClip [enemy4_mc] Frame 1
this.turningFlag = false;
this.eatingFlag = false;
Symbol 285 MovieClip [enemy4_mc] Frame 12
gotoAndPlay ("swim");
Symbol 285 MovieClip [enemy4_mc] Frame 18
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 285 MovieClip [enemy4_mc] Frame 24
gotoAndPlay ("swim");
Symbol 294 MovieClip [enemy0_mc] Frame 1
this.turningFlag = false;
Symbol 294 MovieClip [enemy0_mc] Frame 12
gotoAndPlay ("swim");
Symbol 294 MovieClip [enemy0_mc] Frame 15
gotoAndPlay ("swim");
this.dir = this.dir * -1;
this._xscale = this._xscale * -1;
Symbol 298 Button
on (press) {
_root.allAddItem = 0;
with (_root) {
worldState = "lost";
end_game(score1 + score2);
if (lostCanvas == undefined) {
attachMovie("lostCanvas", "lostCanvas", getNextHighestDepth());
}
lostCanvas.gotoAndStop(3);
winCanvas.removeMovieClip();
}
}
Symbol 304 MovieClip Frame 1
onEnterFrame = function () {
author._y = author._y - 1;
if (author._y <= -380) {
author._y = 0;
}
};
Symbol 305 MovieClip [winCanvas] Frame 38
stop();
Symbol 310 Button
on (press, keyPress "s") {
with (_root) {
stopAllSounds();
level = 1;
item_modified = "0";
propNums = 0;
score = (score1 = (score2 = 0));
worldPrevState = worldState;
worldState = "init";
gameState = "init";
}
}
Symbol 311 MovieClip [lostCanvas] Frame 1
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt >= 40) {
var _local2 = new mx.transitions.Tween(endMC, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1, true);
_local2.targetMC = endMC;
_local2.onMotionFinished = function () {
this.targetMC.removeMovieClip();
this.targetMC._parent.play();
};
delete cnt;
delete onEnterFrame;
}
};
Symbol 311 MovieClip [lostCanvas] Frame 2
stop();
Symbol 336 MovieClip [menuCanvas] Frame 43
System.useCodepage = true;
if (_root.readScoreXML == "") {
_root.readScoreXML = new XML();
_root.readScoreXML.ignoreWhite = true;
_root.readScoreXML.load(_root.scoreXMLAdd);
_root.readScoreXML.onLoad = function (success) {
if (success) {
_root.areaArr = [];
_root.goqoArr = [];
_root.readScoreXML_length = _root.readScoreXML.firstChild.childNodes.length;
var _local2 = 0;
while (_local2 < _root.readScoreXML.firstChild.childNodes.length) {
_root.areaArr[_local2] = int(_root.readScoreXML.firstChild.childNodes[_local2].childNodes[0].childNodes[0].nodeValue);
_root.goqoArr[_local2] = int(_root.readScoreXML.firstChild.childNodes[_local2].childNodes[1].childNodes[0].nodeValue);
_local2++;
}
}
};
if (_root.ADD_POINT == undefined) {
_root.ADD_POINT = "10_1.5_20_2_30_3_";
}
_root.ADD_POINT_temp = _root.ADD_POINT;
_root.pointTime = [];
while (_root.ADD_POINT.length != 0) {
var nowInc1 = _root.ADD_POINT.indexOf("_", 0);
var cutString1 = Number(_root.ADD_POINT.substr(0, nowInc1));
_root.ADD_POINT = _root.ADD_POINT.substr(nowInc1 + 1);
var nowInc1 = _root.ADD_POINT.indexOf("_", 0);
var cutString2 = Number(_root.ADD_POINT.substr(0, nowInc1));
_root.ADD_POINT = _root.ADD_POINT.substr(nowInc1 + 1);
_root.pointTime.push({Qtime:cutString1, Ptime:cutString2});
}
}
prop_bt.onPress = function () {
with (_root) {
getedProp = true;
get_ad(propNums);
}
this._alpha = 50;
this.enabled = false;
};
go_bt.onPress = function () {
with (_root) {
start_game();
propNums = propNums + Number(item_modified);
item_modified = "0";
worldPrevState = worldState;
worldState = "game";
}
};
help_bt.onPress = function () {
with (_root) {
worldPrevState = worldState;
worldState = "help";
}
};
stop();
_root.getedProp = false;
Symbol 342 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 375 MovieClip [numberMc2] Frame 1
stop();
Symbol 396 MovieClip Frame 1
stop();
Symbol 397 MovieClip [stateLayer] Frame 1
function getProp(mc) {
if ((_root.worldState != "game") || (mc._currentframe == 1)) {
return(undefined);
}
if (mc._currentframe == 2) {
_root.useProp1();
} else if (mc._currentframe == 3) {
_root.useProp2();
} else if (mc._currentframe == 4) {
_root.useProp3();
} else if (mc._currentframe == 5) {
_root.useProp4();
}
mc.gotoAndStop(1);
var i = 1;
while (i < 5) {
if (eval ("propBox" + i)._currentframe == 1) {
var j = i;
while (j < 5) {
eval ("propBox" + j).gotoAndStop(eval ("propBox" + (j + 1))._currentframe);
j++;
}
break;
}
i++;
}
propBox5.gotoAndStop(1);
_root.propNums--;
}
Instance of Symbol 342 MovieClip "sound_mc" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press) {
if (_root.worldState == "game") {
var c = this._currentframe;
if (c == 1) {
_root.setVolume_g(0);
this.gotoAndStop(2);
} else if (c == 2) {
_root.setVolume_g(100);
this.gotoAndStop(1);
}
}
}
Instance of Symbol 345 MovieClip "pause_mc" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "<Space>") {
if (_root.worldState == "game") {
this.gotoAndStop(2);
with (_root) {
worldPrevState = worldState;
worldState = "pause";
}
}
}
Instance of Symbol 354 MovieClip "propBox1" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "1") {
if (_root.worldState == "game") {
_parent.getProp(this);
}
}
Instance of Symbol 354 MovieClip "propBox2" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "2") {
if (_root.worldState == "game") {
_parent.getProp(this);
}
}
Instance of Symbol 354 MovieClip "propBox3" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "3") {
if (_root.worldState == "game") {
_parent.getProp(this);
}
}
Instance of Symbol 354 MovieClip "propBox4" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "4") {
if (_root.worldState == "game") {
_parent.getProp(this);
}
}
Instance of Symbol 354 MovieClip "propBox5" in Symbol 397 MovieClip [stateLayer] Frame 1
on (press, keyPress "5") {
if (_root.worldState == "game") {
_parent.getProp(this);
}
}
Symbol 402 Button
on (press, keyPress "s") {
with (_root) {
var modified = Number(item_modified);
item_modified = "0";
propNums = propNums + modified;
worldPrevState = worldState;
worldState = "thisLevel";
}
_parent.removeMovieClip();
}
Symbol 404 MovieClip [nextLevelCanvas] Frame 42
stop();
Symbol 409 MovieClip [pauseCanvas] Frame 20
stop();
onEnterFrame = function () {
if (Key.isDown(32) && (!_root.pressFlag[0])) {
with (_root) {
pressFlag[0] = true;
worldPrevState = worldState;
worldState = "resume";
}
} else if ((!Key.isDown(32)) && (_root.pressFlag[0])) {
_root.pressFlag[0] = false;
}
};
Symbol 438 MovieClip [whale_mc] Frame 1
this.eatingFlag = false;
Symbol 438 MovieClip [whale_mc] Frame 30
gotoAndPlay ("swim");
Symbol 438 MovieClip [whale_mc] Frame 42
gotoAndPlay ("swim");
Symbol 441 MovieClip [crystalBall] Frame 1
function die() {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.worldState == "game") {
var _local3 = _root.main.role;
if (this.hitTest(_local3.hitMC) && (!_local3.eatingFlag)) {
_root.flyScore(300);
_root.sound_arr[1].start(0, 1);
_local3.gotoAndPlay("eat");
_local3.eatingFlag = true;
this.die();
}
this._y = this._y - 3;
if (this._y < -100) {
this.die();
}
}
};
Symbol 442 MovieClip [flyScoreMc] Frame 1
var str = String(num);
speed = 20;
min_speed = 1;
target_xPos = 494 - (14 * str.length);
target_yPos = 370;
disObj = _root.distance(this._x, this._y, target_xPos, target_yPos);
var i = 0;
while (i < str.length) {
var mc = this.attachMovie("numberMc2", "num" + i, i, {_x:14 * i, _y:0});
mc.gotoAndStop(int(str.substr(i, 1)) + 1);
i++;
}
onEnterFrame = function () {
if (_root.worldState != "game") {
delete this.onEnterFrame;
this.removeMovieClip();
} else {
var _local6 = _x;
var _local3 = _y;
var _local5 = (disObj.distanceX / disObj.distance) * speed;
var _local4 = (disObj.distanceY / disObj.distance) * speed;
_x = (_x + _local5);
_y = (_y + _local4);
if (speed > min_speed) {
speed = speed - 0.05;
}
updateAfterEvent();
if (((_y > target_yPos) && (_local3 <= target_yPos)) || ((_y < target_yPos) && (_local3 >= target_yPos))) {
_x = target_xPos;
_y = target_yPos;
updateAfterEvent();
_root.setGameScore(_root.addScore(num));
this.removeMovieClip();
}
}
};
Symbol 443 MovieClip [time_mc] Frame 1
curr = 0;
onEnterFrame = function () {
if (_root.worldState == "game") {
if (curr >= total) {
run();
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
curr++;
};
Symbol 451 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 452 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 453 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 454 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}