Frame 1
function chooseGameEndProcedure() {
if (tKey == undefined) {
tKey = "sjri5jf85jdor560";
}
gameEndSubmitUrl = "http://freeplay.gamedek.com/gameend.aspx";
if (params == undefined) {
myVariables.load("config.txt");
} else {
decryptParams(params);
crypto = 2;
}
}
function t_fLoadGameEnd() {
mcResign.removeMovieClip();
mcGameOver.removeMovieClip();
if (mcGameEnd != undefined) {
mcGameEnd.removeMovieClip();
}
endContainer.createEmptyMovieClip("mcGameEnd", 100);
endContainer.createEmptyMovieClip("mcGameEndBack", 99);
with (endContainer.mcGameEndBack) {
var backColor = 0;
beginFill(backColor, 100);
lineStyle(1, backColor, 100);
moveTo(0, 0);
lineTo(g_numGameWidth, 0);
lineTo(g_numGameWidth, g_numGameHeight);
lineTo(0, g_numGameHeight);
lineTo(0, 0);
endFill();
}
if (freeplayid != undefined) {
downloadURL = downloadURL + affiliateId;
}
var endUrlArray = new Array();
endUrlArray = endURL.split(".");
var subString = endUrlArray[endUrlArray.length - 1];
if ((subString == "aspx") || (subString == "html")) {
getURL (endURL, "_self");
} else {
endContainer.mcGameEnd.loadMovie(endURL, mcGameEnd);
endContainer.playAgain = playAgain;
}
}
function postGameLog() {
if (gameLogEnabled == 1) {
var _local1 = new LoadVars();
var _local2 = TEAEncrypt((("freeplayid=" + freeplayid) + "&gameLog=") + gameLog, tKey);
_local1.params = _local2;
_local1.sendAndLoad(gameEndSubmitUrl, result_lv, "POST");
gameLog = "";
}
}
function addToLog(myAddition) {
if (gameLogEnabled == 1) {
gameLog = gameLog + myAddition;
}
}
function trc(theString) {
trace((theString + ": ") + eval (theString));
}
function TEAEncrypt(src, key) {
var _local2 = charsToLongs(strToChars(src));
var k = charsToLongs(strToChars(key));
var n = _local2.length;
if (n == 0) {
return("");
}
if (n == 1) {
_local2[n++] = 0;
}
var _local3 = _local2[n - 1];
var y = _local2[0];
var delta = 2654435769;
var max32 = 4294967295;
var mx;
var e;
var q = Math.floor(6 + (52 / n));
var sum = 0;
var sum2 = 0;
while ((q--) > 0) {
sum = sum + delta;
sum = sum >>> 0;
e = (sum >>> 2) & 3;
var _local1 = 0;
while (_local1 < (n - 1)) {
y = _local2[_local1 + 1];
mx = (((_local3 >>> 5) ^ (y << 2)) + ((y >>> 3) ^ (_local3 << 4))) ^ ((sum ^ y) + (k[(_local1 & 3) ^ e] ^ _local3));
mx = mx >>> 0;
_local2[_local1] = _local2[_local1] + mx;
_local2[_local1] = _local2[_local1] >>> 0;
_local3 = _local2[_local1];
_local1++;
}
y = _local2[0];
mx = (((_local3 >>> 5) ^ (y << 2)) + ((y >>> 3) ^ (_local3 << 4))) ^ ((sum ^ y) + (k[(_local1 & 3) ^ e] ^ _local3));
mx = mx >>> 0;
_local2[n - 1] = _local2[n - 1] + mx;
_local2[n - 1] = _local2[n - 1] >>> 0;
_local3 = _local2[n - 1];
}
return(charsToHex(longsToChars(_local2)));
}
function TEADecrypt(src, key) {
var v = charsToLongs(hexToChars(src));
var k = charsToLongs(strToChars(key));
var n = v.length;
if (n == 0) {
return("");
}
var _local2 = v[n - 1];
var _local3 = v[0];
var delta = 2654435769;
var mx;
var e;
var q = Math.floor(6 + (52 / n));
var sum = (q * delta);
while (sum != 0) {
e = (sum >>> 2) & 3;
var _local1 = n - 1;
while (_local1 > 0) {
_local2 = v[_local1 - 1];
mx = (((_local2 >>> 5) ^ (_local3 << 2)) + ((_local3 >>> 3) ^ (_local2 << 4))) ^ ((sum ^ _local3) + (k[(_local1 & 3) ^ e] ^ _local2));
_local3 = (v[_local1] = v[_local1] - mx);
_local1--;
}
_local2 = v[n - 1];
mx = (((_local2 >>> 5) ^ (_local3 << 2)) + ((_local3 >>> 3) ^ (_local2 << 4))) ^ ((sum ^ _local3) + (k[(_local1 & 3) ^ e] ^ _local2));
_local3 = (v[0] = v[0] - mx);
sum = sum - delta;
}
return(charsToStr(longsToChars(v)));
}
function charsToLongs(chars) {
var _local2 = chars;
var _local3 = new Array(Math.ceil(_local2.length / 4));
var _local1 = 0;
while (_local1 < _local3.length) {
_local3[_local1] = ((_local2[_local1 * 4] + (_local2[(_local1 * 4) + 1] << 8)) + (_local2[(_local1 * 4) + 2] << 16)) + (_local2[(_local1 * 4) + 3] << 24);
_local1++;
}
return(_local3);
}
function longsToChars(longs) {
var _local2 = longs;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1] & 255, (_local2[_local1] >>> 8) & 255, (_local2[_local1] >>> 16) & 255, (_local2[_local1] >>> 24) & 255);
_local1++;
}
return(_local3);
}
function charsToHex(chars) {
var _local2 = chars;
var result = new String("");
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 < _local2.length) {
result = result + (_local3[_local2[_local1] >> 4] + _local3[_local2[_local1] & 15]);
_local1++;
}
return(result);
}
function hexToChars(hex) {
var _local2 = hex;
var _local3 = new Array();
var _local1 = ((_local2.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < _local2.length) {
_local3.push(parseInt(_local2.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
function charsToStr(chars) {
var _local2 = chars;
var _local3 = new String("");
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + String.fromCharCode(_local2[_local1]);
_local1++;
}
return(_local3);
}
function strToChars(str) {
var _local2 = str;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
function decryptParams(myParams) {
decPar = TEADecrypt(myParams, tKey);
arrayOfVars = new Array();
arrayOfVars = decPar.split("&");
count = 0;
while (count < arrayOfVars.length) {
varHolder = new Array();
varHolder = arrayOfVars[count].split("=");
Set(varHolder[0], varHolder[1]);
count++;
}
}
stop();
fscommand ("showmenu", "false");
stop();
System.security.allowDomain(domainToAllow);
System.security.allowDomain("http://freeplay.gamedek.com/");
var crypto = 0;
var gameLog = "";
myVariables = new LoadVars();
myVariables.onLoad = function (success) {
if (success) {
crypto = 1;
_root.decryptParams(this.params);
} else {
crypto = 0;
}
};
_root.xmlGameEnd = new XML();
_root.xmlGameEnd.onLoad = function (success) {
var _local1 = _root;
if (success) {
_local1.decryptParams(this.firstChild.firstChild.nodeValue);
_local1.endURL = _local1.gameEndUrl;
_local1.t_fLoadGameEnd();
delete this.onLoad;
}
};
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
if (success) {
trace("whatAmI" + this);
} else {
trace("Error receiving from server.");
}
};
chooseGameEndProcedure();
Frame 5
function CGame(a_root) {
var _local1 = this;
_local1.ROOT = a_root;
_local1.PRICES_DEPTH = 1500;
_local1.UI_DEPTH = 1000;
_local1.MESSAGE_DEPTH = 999;
_local1.MESSAGEPOPUP_DEPTH = 1001;
_local1.KEYBOARD_DEPTH = 998;
_local1.FISH_DEPTH = 100;
_local1.FISH_MOVE_CONTROL_DEPTH = 997;
_local1.CREEL_DEPTH = 996;
_local1.FIELD_WIDTH = 640;
_local1.FIELD_HEIGHT = 480;
_local1.FISH_LEFT_BOUND = -50;
_local1.FISH_RIGHT_BOUND = 680;
_local1.FISH_TOP_BOUND = 230;
_local1.FISH_BOTTOM_BOUND = 370;
_local1.LEVEL_UNDER_WATER = 130;
_local1.FISH_SPEED_X = 50;
_local1.FISH_SPEED_Y = 1;
_local1.CREEL_RADIUS = 100;
_local1.ROUNDS = 5;
_local1.bln_creelProceed = false;
_local1.bln_pause_game = true;
_local1.num_curr_round = 0;
}
function CPlayer() {
this.score = 0;
}
function CBoat() {
var _local1 = this;
_local1.SPEED_WITH_ENGINE = 5;
_local1.SPEED_WITH_OAR = 3;
_local1.LEFT_BOUND = 40;
_local1.RIGHT_BOUND = 470;
_local1.HOOK_ORIGIN_POSITION = 120;
_local1.HOOK_BOTTOM_POSITION = 400;
_local1.line_delta_x;
_local1.line_delta_y;
_local1.bln_motor_run = false;
_local1.bln_oar_run = false;
_local1.gasoline_capacity = 30;
_local1.gasoline = 30;
_local1.hook_speed = 3;
_local1.line_level = 1;
}
function openCantBuyWindow() {
this.attachMovie("id_wndCantBuy", "wndCantBuy", Game.MESSAGEPOPUP_DEPTH);
centerWindow(wndCantBuy);
}
function openNothingBuyWindow() {
this.attachMovie("id_wndNothingBuy", "wndNothingBuy", Game.MESSAGEPOPUP_DEPTH);
centerWindow(wndNothingBuy);
}
function onBtnWndAreYouShureYes_click() {
fscommand ("quit");
}
function onBtnOk_click(sender) {
sender.removeMovieClip();
}
function onBtnMenuPlay_click() {
gotoAndPlay ("play");
}
function onBtnMenuHelp_click() {
this.attachMovie("id_wndHelp", "wndHelp", Game.MESSAGE_DEPTH);
centerWindow(wndHelp);
}
function onBtnMenuScores_click() {
this.attachMovie("id_wndScores", "wndScores", Game.MESSAGE_DEPTH);
centerWindow(wndScores);
}
function onBtnMenuQuit_click() {
this.attachMovie("id_wndAreYouShure", "wndAreYouShure", Game.MESSAGE_DEPTH);
centerWindow(wndAreYouShure);
}
function openRoundWindow() {
this.attachMovie("id_wndRound", "wndRound", Game.MESSAGE_DEPTH);
centerWindow(wndRound);
wndRound.gotoAndPlay(Game.num_curr_round + 1);
idt_RoundWindow = setInterval(Game, "preinitRound", 2000);
}
function closeRoundWindow() {
clearInterval(idt_RoundWindow);
wndRound.removeMovieClip();
}
function openRoundCompleteWindow() {
timer.stopTimer();
clock.pendulum.stop();
this.attachMovie("id_wndRoundComplete", "wndRoundComplete", Game.MESSAGE_DEPTH);
centerWindow(wndRoundComplete);
idt_RoundCompleteWindow = setInterval(openShopWindow, 3000);
}
function closeRoundCompleteWindow() {
clearInterval(idt_RoundCompleteWindow);
wndRoundComplete.removeMovieClip();
}
function openShopWindow() {
closeRoundCompleteWindow();
clearInterval(idt_RoundCompleteWindow);
_root.attachMovie("id_wndShop", "wndShop", Game.MESSAGE_DEPTH);
centerWindow(wndShop);
}
function onBtnShopBuy_click(a_spend_money, a_gasoline_select, a_line_select) {
if ((a_gasoline_select == 0) && (a_line_select == 0)) {
openNothingBuyWindow();
return(undefined);
}
if (a_spend_money > Player.score) {
openCantBuyWindow();
return(undefined);
}
Player.score = Player.score - a_spend_money;
switch (a_gasoline_select) {
case 1 :
Boat.gasoline = Boat.gasoline + 30;
break;
case 2 :
Boat.gasoline = Boat.gasoline + 50;
}
Boat.gasoline_capacity = Boat.gasoline;
Boat.spendGasoline(0);
switch (a_line_select) {
case 1 :
Boat.hook_speed = 6;
Boat.line_level = 2;
break;
case 2 :
Boat.hook_speed = 9;
Boat.line_level = 3;
break;
case 3 :
Boat.hook_speed = 9;
Boat.line_level = 4;
Boat.bln_enable_hook_up = true;
}
Game.beginNextRound();
}
function onBtnShopCancel_click() {
wndShop.removeMovieClip();
Game.beginNextRound();
}
function openGameOverWindow() {
Game.afterGameOver();
}
function closeGameOverWindow() {
clearInterval(idt_GameOverWindow);
wndGameOver.removeMovieClip();
}
function centerWindow(a_wnd) {
a_wnd._x = 320;
a_wnd._y = 240;
}
stop();
CGame.prototype.beginNextRound = function () {
var _local1 = this;
_local1.num_curr_round++;
closeRoundCompleteWindow();
openRoundWindow();
_local1.arrMovedFish = new Array();
_local1.arrFishPriceTable = new Array();
Player.displayScore();
Boat.init();
};
CGame.prototype.preinitRound = function () {
var _local1 = this;
closeRoundWindow();
_local1.bln_pause_game = false;
_local1.distributeFishes();
_local1.showPrices();
_local1.KeyboardOn();
_local1.startMoveFishes();
timer.startTimer();
clock.pendulum.play();
};
CGame.prototype.KeyboardOn = function () {
var _local1 = this;
_local1.ROOT.createEmptyMovieClip("Keyboard", _local1.KEYBOARD_DEPTH);
_local1.ROOT.Keyboard.onEnterFrame = function () {
if (!Game.bln_pause_game) {
if ((((!Key.isDown(40)) && (mc_hook._y > Boat.HOOK_ORIGIN_POSITION)) && (!Boat.bln_move_hook_up)) && (!Boat.bln_enable_hook_up)) {
Boat.moveHookUpProcess();
}
if (Key.isDown(38) && (Boat.bln_enable_hook_up)) {
Boat.moveHookUp();
}
if (Key.isDown(40)) {
Boat.moveHookDown();
}
if (Key.isDown(37)) {
Boat.move(-1);
}
if (Key.isDown(39)) {
Boat.move(1);
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
Boat.stopRow();
Boat.stopEngine();
}
}
};
};
CGame.prototype.KeyboardOff = function () {
this.ROOT.Keyboard.removeMovieClip();
};
CGame.prototype.addSchool = function (a_fish_type, a_fish_number, a_fish_price, a_min_speed, a_max_speed) {
var _local1 = this;
var _local3;
var _local2;
_local3 = 0;
while (_local3 < a_fish_number) {
_local2 = _local1.ROOT.attachMovie("id_fish" + a_fish_type, "fish" + _local1.arrMovedFish.length, _local1.FISH_DEPTH + _local1.arrMovedFish.length);
_local2.t = a_fish_type;
_local2.mins = a_min_speed;
_local2.maxs = a_max_speed;
_local1.arrMovedFish.push(_local2);
_local3++;
}
_local1.arrFishPriceTable.push({t:a_fish_type, p:a_fish_price});
};
CGame.prototype.showPrices = function () {
var _local2 = this;
var _local1;
_local1 = 0;
while (_local1 < _local2.arrFishPriceTable.length) {
newpfish = _local2.ROOT.panel.attachMovie("id_fish" + _local2.arrFishPriceTable[_local1].t, "pfish" + _local1, 100 + _local1);
newpfish._xscale = 75;
newpfish._yscale = 75;
newpfish._x = -230 + (_local1 * 90);
newpfish._y = 210;
newpfish.fish.stop();
_local2.ROOT.panel.prices["txtPrice" + (_local1 + 1)].text = _local2.arrFishPriceTable[_local1].p;
_local2.ROOT.panel.prices["txtPriceShadow" + (_local1 + 1)].text = _local2.ROOT.panel.prices["txtPrice" + (_local1 + 1)].text;
_local1++;
}
};
CGame.prototype.clearPrices = function () {
var _local2 = this;
var _local1;
_local1 = 0;
while (_local1 < 5) {
_local2.ROOT.panel["pfish" + _local1].removeMovieClip();
_local2.ROOT.panel.prices["txtPrice" + (_local1 + 1)].text = "";
_local2.ROOT.panel.prices["txtPriceShadow" + (_local1 + 1)].text = "";
_local1++;
}
_local2.arrFishPriceTable = new Array();
};
CGame.prototype.distributeFishes = function () {
var _local2 = this;
var i;
var _local3;
i = 0;
while (i < _local2.arrMovedFish.length) {
_local3 = ((random(2) > 0) ? 1 : -1);
var _local1 = _local2.arrMovedFish[i];
if (_local3 > 0) {
_local1.gotoAndStop("right");
} else {
_local1.gotoAndStop("left");
}
_local1._x = _local2.FISH_LEFT_BOUND + random(_local2.FISH_RIGHT_BOUND - _local2.FISH_LEFT_BOUND);
_local1._y = _local2.FISH_TOP_BOUND + random(_local2.FISH_BOTTOM_BOUND - _local2.FISH_TOP_BOUND);
_local1.delta_x = (_local3 * (random(_local1.maxs) + _local1.mins)) / 5;
_local3 = ((random(2) > 0) ? 1 : -1);
_local1.delta_y = (_local3 * (random(_local2.FISH_SPEED_Y) + 1)) / 5;
i++;
}
};
CGame.prototype.startMoveFishes = function () {
this.ROOT.createEmptyMovieClip("FishMoveControl", this.FISH_MOVE_CONTROL_DEPTH);
this.ROOT.FishMoveControl.onEnterFrame = function () {
if (!Game.bln_pause_game) {
var _local2;
var _local1;
var distance_x;
var _local3;
_local2 = Game.arrMovedFish.length - 1;
while (_local2 >= 0) {
_local1 = Game.arrMovedFish[_local2];
_local1._x = _local1._x + _local1.delta_x;
_local1._y = _local1._y + _local1.delta_y;
if (_local1._x > Game.FISH_RIGHT_BOUND) {
_local1.gotoAndStop("left");
_local1.delta_x = -_local1.delta_x;
}
if (_local1._x < Game.FISH_LEFT_BOUND) {
_local1.gotoAndStop("right");
_local1.delta_x = -_local1.delta_x;
}
if ((_local1._y < Game.FISH_TOP_BOUND) || (_local1._y > Game.FISH_BOTTOM_BOUND)) {
_local1.delta_y = -_local1.delta_y;
}
if (!Game.bln_creelProceed) {
distance_x = _local1._x - mc_hook._x;
_local3 = _local1._y - mc_hook._y;
if (((distance_x * distance_x) + (_local3 * _local3)) <= Game.CREEL_RADIUS) {
Game.creelProcess(_local1);
Game.arrMovedFish.splice(_local2, 1);
}
}
_local2--;
}
}
};
};
CGame.prototype.creelProcess = function (a_fish) {
var _local1 = this;
Game.bln_creelProceed = true;
Boat.moveHookUpProcess();
mc_boat.mcMan1.gotoAndStop(2);
mc_boat.mcMan1.line_in_hand.gotoAndStop(Boat.line_level);
Boat.changeLinePosition(1);
Boat.placeLine();
_local1.ROOT.creeledFish = a_fish;
if (creeledFish.delta_x > 0) {
creeledFish.gotoAndStop("topLeft");
} else {
creeledFish.gotoAndStop("topRight");
}
_local1.ROOT.createEmptyMovieClip("CreelProcess", _local1.CREEL_DEPTH);
_local1.ROOT.CreelProcess.onEnterFrame = function () {
if (creeledFish._y > Game.LEVEL_UNDER_WATER) {
creeledFish._x = mc_hook._x;
creeledFish._y = mc_hook._y;
} else if (Game.bln_creelProceed) {
Game.bln_creelProceed = false;
creeledFish.gotoAndPlay("toBoat");
}
};
};
CGame.prototype.completeCreel = function () {
var _local1 = this;
Player.addScore(_local1.arrFishPriceTable[creeledFish.t - 1].p);
CreelProcess.removeMovieClip();
creeledFish.removeMovieClip();
mc_boat.mcMan1.gotoAndStop(1);
mc_boat.mcMan1.line_in_hand.gotoAndStop(Boat.line_level);
Boat.changeLinePosition(0);
Boat.placeLine();
if (_local1.arrMovedFish.length == 0) {
_local1.bln_pause_game = true;
_local1.roundComplete();
}
};
CGame.prototype.roundComplete = function () {
var _local1 = this;
Boat.stopFishing();
Boat.stopEngine();
Boat.stopRow();
_local1.clearPrices();
if (_local1.num_curr_round >= _local1.ROUNDS) {
_local1.gameOver();
} else {
openRoundCompleteWindow();
}
};
CGame.prototype.gameOver = function () {
CreelProcess.removeMovieClip();
mc_boat.mcHookUpProcess.removeMovieClip();
Boat.stopFishing();
Boat.stopEngine();
Boat.stopRow();
openGameOverWindow();
this.clearPrices();
};
CGame.prototype.afterGameOver = function () {
var _local2 = this;
var _local1;
creeledFish.removeMovieClip();
closeGameOverWindow();
_local1 = 0;
while (_local1 < _local2.arrMovedFish.length) {
_local2.arrMovedFish[_local1].removeMovieClip();
_local1++;
}
trace("trygameover");
gotoAndStop ("gameOverFrame2");
};
CGame.prototype.decreasePrices = function () {
var _local2 = this;
var _local1;
_local1 = 0;
while (_local1 < _local2.arrFishPriceTable.length) {
if (_local2.arrFishPriceTable[_local1].p > 0) {
_local2.arrFishPriceTable[_local1].p = _local2.arrFishPriceTable[_local1].p - 10;
if (_local2.arrFishPriceTable[_local1].p < 0) {
_local2.arrFishPriceTable[_local1].p = 0;
}
_local2.ROOT.panel.prices["txtPrice" + (_local1 + 1)].text = _local2.arrFishPriceTable[_local1].p;
_local2.ROOT.panel.prices["txtPriceShadow" + (_local1 + 1)].text = _local2.ROOT.panel.prices["txtPrice" + (_local1 + 1)].text;
}
_local1++;
}
};
CPlayer.prototype.addScore = function (a_score) {
this.score = this.score + a_score;
this.displayScore();
};
CPlayer.prototype.displayScore = function () {
var _local1 = 0;
_local1 = _local1.substr(0, 5 - String(this.score).length) + this.score;
txtScoreFront = _local1;
txtScoreBack = _local1;
};
CBoat.prototype.init = function () {
var _local1 = this;
_local1.stopEngine();
_local1.stopRow();
_local1.changeLinePosition(0);
_local1.placeHook();
_local1.placeLine();
_local1.stopFishing();
mc_boat.mcMan1.line_in_hand.gotoAndStop(_local1.line_level);
};
CBoat.prototype.startRow = function () {
mc_boat.mcMan2.play();
this.bln_row_started = true;
};
CBoat.prototype.stopRow = function () {
mc_boat.mcMan2.gotoAndStop(1);
this.bln_row_started = false;
};
CBoat.prototype.startFishing = function () {
mc_boat.mcMan1.stop();
mc_boat.mcMan1.mc_fm1_hand_left.play();
this.bln_fishing_started = true;
};
CBoat.prototype.stopFishing = function () {
mc_boat.mcMan1.stop();
mc_boat.mcMan1.mc_fm1_hand_left.stop();
this.bln_fishing_started = false;
};
CBoat.prototype.move = function (a_delta) {
var _local1 = this;
var _local2 = mc_boat._x;
_local1.spendGasoline(0.1);
if (_local1.gasoline > 0) {
_local1.speed = _local1.SPEED_WITH_ENGINE;
} else {
_local1.speed = _local1.SPEED_WITH_OAR;
}
_local2 = _local2 + (a_delta * _local1.speed);
if ((_local2 > _local1.LEFT_BOUND) && (_local2 < _local1.RIGHT_BOUND)) {
mc_boat._x = _local2;
if (_local1.gasoline > 0) {
if (!_local1.bln_engine_started) {
_local1.startEngine();
}
} else {
if (!_local1.bln_row_started) {
_local1.startRow();
}
if (_local1.bln_engine_started) {
_local1.stopEngine();
}
}
_local1.placeLine();
}
};
CBoat.prototype.spendGasoline = function (a_spend_gasoline) {
var _local1 = this;
if (_local1.gasoline > 0) {
_local1.gasoline = _local1.gasoline - a_spend_gasoline;
gasoline_indicator.bar._x = 18.7 - (106 - ((106 * _local1.gasoline) / _local1.gasoline_capacity));
}
};
CBoat.prototype.startEngine = function () {
mc_boat.mc_boat_body.mc_engine.gotoAndPlay(1);
mc_boat.mc_boat_body.mcRun.gotoAndPlay(2);
this.bln_engine_started = true;
};
CBoat.prototype.stopEngine = function () {
mc_boat.mc_boat_body.mc_engine.gotoAndStop(2);
mc_boat.mc_boat_body.mcRun.gotoAndStop(1);
this.bln_engine_started = false;
};
CBoat.prototype.placeLine = function () {
mc_line._x = mc_boat._x + this.line_delta_x;
mc_line._y = mc_boat._y - this.line_delta_y;
mc_hook._x = mc_line._x;
mc_line._height = mc_hook._y - mc_line._y;
};
CBoat.prototype.changeLinePosition = function (a_switcher) {
var _local1 = this;
switch (a_switcher) {
case 0 :
_local1.line_delta_x = 144;
_local1.line_delta_y = 47;
return;
case 1 :
_local1.line_delta_x = 116;
_local1.line_delta_y = 67;
}
};
CBoat.prototype.placeHook = function () {
mc_hook._x = mc_boat._x + 144;
mc_hook._y = this.HOOK_ORIGIN_POSITION;
this.bln_move_hook_up = false;
};
CBoat.prototype.moveHookDown = function () {
var _local1 = this;
if (!_local1.bln_fishing_started) {
_local1.startFishing();
}
if (!_local1.bln_move_hook_up) {
mc_hook._y = mc_hook._y + _local1.hook_speed;
_local1.placeLine();
if (mc_hook._y > _local1.HOOK_BOTTOM_POSITION) {
_local1.moveHookUpProcess();
}
}
};
CBoat.prototype.moveHookUp = function () {
var _local1 = this;
if (!_local1.bln_fishing_started) {
_local1.startFishing();
}
if ((!_local1.bln_move_hook_up) && (mc_hook._y >= _local1.HOOK_ORIGIN_POSITION)) {
mc_hook._y = mc_hook._y - _local1.hook_speed;
_local1.placeLine();
}
};
CBoat.prototype.moveHookUpProcess = function () {
this.bln_move_hook_up = true;
mc_boat.createEmptyMovieClip("mcHookUpProcess", 100);
this.startFishing();
mc_boat.mcHookUpProcess.onEnterFrame = function () {
if (mc_hook._y > Boat.HOOK_ORIGIN_POSITION) {
mc_hook._y = mc_hook._y - 5;
Boat.placeLine();
} else {
Boat.stopFishing();
mc_hook._y = Boat.HOOK_ORIGIN_POSITION;
Boat.bln_move_hook_up = false;
Boat.placeLine();
mc_boat.mcHookUpProcess.removeMovieClip();
}
};
};
i = 0;
while (i < 25) {
this["fish" + i].removeMovieClip();
i++;
}
this.attachMovie("id_panel", "panel", 1000);
panel._x = 320;
panel._y = 240;
gotoAndPlay ("intro");
Frame 10
stop();
Frame 15
stop();
Frame 20
stop();
timer.numTaskInterval = 10;
timer.timesRunOut = function () {
clock.pendulum.stop();
Game.gameOver();
};
timer.doTask = function () {
Game.decreasePrices();
};
var Player = new CPlayer();
var Boat = new CBoat();
var Game = new CGame(this);
Game.beginNextRound();
function g_fSetGameSize(a_numWidth, a_numHeight) {
g_numGameWidth = a_numWidth;
g_numGameHeight = a_numHeight;
}
function playAgain() {
Game.ROOT.gotoAndStop("start");
}
g_fSetGameSize(640, 480);
endContainer.playAgain = function () {
Game.ROOT.gotoAndStop("start");
trace("tryplayagain");
};
Frame 26
stop();
endContainer.g_numScore = (g_numScore = txtScoreFront);
mcGameEnd.removeMovieClip();
if ((crypto == 2) || (crypto == 0)) {
postGameLog();
_root.xmlGameEnd.load((gameEndSubmitUrl + "?params=") + TEAEncrypt((((("freePlayID=" + freeplayid) + "&score=") + endContainer.g_numScore) + "&timeStamp=") + timeStamp, tKey));
} else {
trace("config");
_root.t_fLoadGameEnd();
}
Symbol 4 MovieClip [SBGTimer] Frame 1
#initclip 1
SBGTimer = function () {
this.init();
};
SBGTimer.prototype = new MovieClip();
SBGTimer.prototype.init = function () {
var _local1 = this;
_local1.numStart = 0;
_local1.numRemainder = 0;
_local1.numLastTic = 0;
_local1.numTaskInterval = 0;
_local1.numLastTaskTime = 0;
_local1.numWarningTime = 0;
_local1.blnStop = true;
_local1.blnWarning = false;
_local1.blnBonus = false;
_local1.hColorOff = 3394815 /* 0x33CCFF */;
_local1.hColorOn = 204;
_local1.showTime();
};
SBGTimer.prototype.onEnterFrame = function () {
if (!this.blnStop) {
this.tick();
}
};
SBGTimer.prototype.tick = function () {
var _local1 = this;
var _local2 = getTimer();
if (_local1.blnBonus) {
_local1.numRemainder = _local1.numRemainder - 1;
_local1.timeBonus();
} else {
_local1.numRemainder = _local1.numRemainder - ((_local2 - _local1.numLastTic) / 1000);
_local1.numLastTic = _local2;
}
_local1.showTime();
if (_local1.numRemainder <= 0) {
_local1.numRemainder = 0;
_local1.blnBonus = false;
_local1.stopTimer();
_local1.showTime();
_local1.timesRunOut();
} else if (!_local1.blnBonus) {
if ((Math.floor(_local1.numRemainder) == _local1.numWarningTime) && (!_local1.blnWarning)) {
_local1.blnWarning = true;
_local1.timerWarning();
}
if ((_local1.numTaskInterval > 0) && ((_local1.numLastTaskTime - _local1.numRemainder) >= _local1.numTaskInterval)) {
_local1.numLastTaskTime = _local1.numRemainder;
_local1.doTask();
}
}
};
SBGTimer.prototype.showTime = function () {
var _local3 = this;
var numCurrTime = Math.round(_local3.numRemainder);
var _local2 = Math.floor(numCurrTime / 60);
var strMinutes = ((_local2 < 10) ? ("0" + String(_local2)) : (String(_local2)));
var _local1 = numCurrTime % 60;
var strSeconds = ((_local1 < 10) ? ("0" + String(_local1)) : (String(_local1)));
_local3.txtTime.text = (strMinutes + ":") + strSeconds;
_local3.txtTimeShadow.text = _local3.txtTime.text;
};
SBGTimer.prototype.startTimer = function () {
var _local1 = this;
if (_local1.numRemainder <= 0) {
} else {
_local1.numLastTic = getTimer();
_local1.blnStop = false;
_local1.numLastTaskTime = _local1.numRemainder;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOn, 16);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOn, 16);
_local1.showTime();
}
};
SBGTimer.prototype.startTimerAt = function (a_time) {
var _local1 = this;
if (a_time <= 0) {
} else {
_local1.numLastTic = getTimer();
_local1.numRemainder = a_time;
_local1.blnStop = false;
_local1.numLastTaskTime = _local1.numRemainder;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOn);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOn, 16);
_local1.showTime();
}
};
SBGTimer.prototype.stopTimer = function () {
var _local1 = this;
_local1.blnStop = true;
var _local2 = new Color(_local1.txtTime);
_local2.setRGB(_local1.hColorOff);
_local2 = new Color(_local1.mcTime);
_local2.setRGB(_local1.hColorOff);
};
SBGTimer.prototype.getTimer = function () {
return(Math.floor(this.numRemainder * 10) / 10);
};
SBGTimer.prototype.setTimer = function (a_time) {
this.numRemainder = a_time;
this.showTime();
};
SBGTimer.prototype.setWarningTime = function (a_time) {
this.numWarningTime = a_time;
};
SBGTimer.prototype.setTaskInterval = function (a_time) {
this.numTaskInterval = a_time;
};
SBGTimer.prototype.startTimeBonus = function () {
this.blnBonus = true;
};
SBGTimer.prototype.timerWarning = function () {
};
SBGTimer.prototype.timesRunOut = function () {
};
SBGTimer.prototype.doTask = function () {
};
SBGTimer.prototype.timeBonus = function () {
};
Object.registerClass("SBGTimer", SBGTimer);
#endinitclip
Symbol 15 Button
on (release, releaseOutside) {
_parent.onBtnShopBuy_click(gasoline_spend + line_spend, gasoline_select, line_select);
}
Symbol 17 Button
on (release, releaseOutside) {
_parent.onBtnShopCancel_click(this);
}
Symbol 20 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 2
stop();
Symbol 36 Button
on (release, releaseOutside) {
if (btnGasoline1._currentframe == 2) {
btnGasoline1.gotoAndStop(1);
gasoline_spend = 0;
gasoline_select = 0;
} else {
btnGasoline1.gotoAndStop(2);
btnGasoline2.gotoAndStop(1);
gasoline_spend = 200;
gasoline_select = 1;
}
}
Symbol 37 Button
on (release, releaseOutside) {
if (btnGasoline2._currentframe == 2) {
btnGasoline2.gotoAndStop(1);
gasoline_spend = 0;
gasoline_select = 0;
} else {
btnGasoline1.gotoAndStop(1);
btnGasoline2.gotoAndStop(2);
gasoline_spend = 400;
gasoline_select = 2;
}
}
Symbol 38 Button
on (release, releaseOutside) {
if (btnLine1._currentframe == 2) {
btnLine1.gotoAndStop(1);
line_spend = 0;
line_select = 0;
} else {
btnLine1.gotoAndStop(2);
btnLine2.gotoAndStop(1);
btnLine3.gotoAndStop(1);
line_spend = 1000;
line_select = 1;
}
}
Symbol 39 Button
on (release, releaseOutside) {
if (btnLine2._currentframe == 2) {
btnLine2.gotoAndStop(1);
line_spend = 0;
line_select = 0;
} else {
btnLine1.gotoAndStop(1);
btnLine2.gotoAndStop(2);
btnLine3.gotoAndStop(1);
line_spend = 1500;
line_select = 2;
}
}
Symbol 40 Button
on (release, releaseOutside) {
if (btnLine3._currentframe == 2) {
btnLine3.gotoAndStop(1);
line_spend = 0;
line_select = 0;
} else {
btnLine1.gotoAndStop(1);
btnLine2.gotoAndStop(1);
btnLine3.gotoAndStop(2);
line_spend = 3000;
line_select = 3;
}
}
Symbol 41 MovieClip [id_wndShop] Frame 1
var gasoline_spend = 0;
var line_spend = 0;
var gasoline_select = 0;
var line_select = 0;
Symbol 44 MovieClip Frame 1
this.onEnterFrame = function () {
var _local1 = _parent;
if (_local1.getBytesLoaded() < _local1.getBytesTotal()) {
txtLoading = ("loading..." + Math.floor((_local1.getBytesLoaded() / _local1.getBytesTotal()) * 100)) + "%";
} else {
_local1.gotoAndPlay("initialize");
}
};
Symbol 58 Button
on (release, releaseOutside) {
_parent.onBtnWndAreYouShureYes_click();
}
Symbol 60 Button
on (release, releaseOutside) {
_parent.onBtnOk_click(this);
}
Symbol 65 Button
on (release, releaseOutside) {
_parent.onBtnOk_click(this);
}
Symbol 78 MovieClip [id_fish1] Frame 1
stop();
Symbol 78 MovieClip [id_fish1] Frame 5
stop();
Symbol 78 MovieClip [id_fish1] Frame 10
stop();
Symbol 78 MovieClip [id_fish1] Frame 15
stop();
Symbol 78 MovieClip [id_fish1] Frame 31
stop();
_parent.Game.completeCreel();
Symbol 84 MovieClip [id_fish2] Frame 1
stop();
Symbol 84 MovieClip [id_fish2] Frame 5
stop();
Symbol 84 MovieClip [id_fish2] Frame 10
stop();
Symbol 84 MovieClip [id_fish2] Frame 15
stop();
Symbol 84 MovieClip [id_fish2] Frame 31
stop();
_parent.Game.completeCreel();
Symbol 91 MovieClip [id_fish3] Frame 1
stop();
Symbol 91 MovieClip [id_fish3] Frame 5
stop();
Symbol 91 MovieClip [id_fish3] Frame 10
stop();
Symbol 91 MovieClip [id_fish3] Frame 15
stop();
Symbol 91 MovieClip [id_fish3] Frame 31
stop();
_parent.Game.completeCreel();
Symbol 99 MovieClip [id_fish4] Frame 1
stop();
Symbol 99 MovieClip [id_fish4] Frame 5
stop();
Symbol 99 MovieClip [id_fish4] Frame 10
stop();
Symbol 99 MovieClip [id_fish4] Frame 15
stop();
Symbol 99 MovieClip [id_fish4] Frame 31
stop();
_parent.Game.completeCreel();
Symbol 106 MovieClip [id_fish5] Frame 1
stop();
Symbol 106 MovieClip [id_fish5] Frame 5
stop();
Symbol 106 MovieClip [id_fish5] Frame 10
stop();
Symbol 106 MovieClip [id_fish5] Frame 15
stop();
Symbol 106 MovieClip [id_fish5] Frame 31
stop();
_parent.Game.completeCreel();
Symbol 107 MovieClip [id_wndRound] Frame 2
stop();
fish1.fish.stop();
_parent.Game.addSchool(1, 4, 100, 20, 10);
_parent.clock.pendulum.stop();
_parent.timer.setTimer(40);
Symbol 107 MovieClip [id_wndRound] Frame 3
stop();
fish1.fish.stop();
fish2.fish.stop();
_parent.Game.addSchool(1, 4, 100, 20, 10);
_parent.Game.addSchool(2, 4, 200, 30, 20);
_parent.clock.pendulum.stop();
_parent.timer.setTimer(60);
Symbol 107 MovieClip [id_wndRound] Frame 4
stop();
fish1.fish.stop();
fish2.fish.stop();
fish3.fish.stop();
_parent.Game.addSchool(1, 4, 100, 10, 5);
_parent.Game.addSchool(2, 3, 200, 20, 10);
_parent.Game.addSchool(3, 2, 300, 30, 20);
_parent.clock.pendulum.stop();
_parent.timer.setTimer(90);
Symbol 107 MovieClip [id_wndRound] Frame 5
stop();
fish1.fish.stop();
fish2.fish.stop();
fish3.fish.stop();
fish4.fish.stop();
_parent.Game.addSchool(1, 4, 100, 10, 5);
_parent.Game.addSchool(2, 3, 200, 20, 10);
_parent.Game.addSchool(3, 3, 300, 30, 20);
_parent.Game.addSchool(4, 2, 400, 40, 20);
_parent.clock.pendulum.stop();
_parent.timer.setTimer(90);
Symbol 107 MovieClip [id_wndRound] Frame 6
stop();
fish1.fish.stop();
fish2.fish.stop();
fish3.fish.stop();
fish4.fish.stop();
fish5.fish.stop();
_parent.Game.addSchool(1, 4, 100, 10, 5);
_parent.Game.addSchool(2, 3, 200, 20, 10);
_parent.Game.addSchool(3, 3, 300, 30, 20);
_parent.Game.addSchool(4, 2, 400, 40, 20);
_parent.Game.addSchool(5, 2, 600, 40, 40);
_parent.clock.pendulum.stop();
_parent.timer.setTimer(180);
Symbol 115 MovieClip [id_wndRoundComplete] Frame 1
txtRound = _parent.Game.num_curr_round;
txtScore = _parent.Player.score;
Symbol 120 MovieClip [id_wndGameOver] Frame 1
stop();
txtRound = _parent.Game.num_curr_round;
txtScore = _parent.Player.score;
Symbol 136 MovieClip [id_wndCantBuy] Frame 1
stop();
Symbol 138 MovieClip [id_wndNothingBuy] Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 145 Button
on (release) {
getURL ("http://www.arkadium.com", "_blank");
}
Symbol 146 MovieClip Frame 1
if (_root.logoUrl == undefined) {
play();
} else {
loadBrandMov.loadMovie(_root.logoUrl);
stop();
}
Symbol 146 MovieClip Frame 2
stop();
Symbol 151 MovieClip Frame 29
_parent.gotoAndStop("start");
stop();
Symbol 156 Button
on (release, releaseOutside) {
onBtnMenuPlay_click();
}
Symbol 160 Button
on (release, releaseOutside) {
onBtnMenuHelp_click();
}
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 2
stop();
Symbol 190 MovieClip Frame 5
gotoAndPlay (2);
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 2
stop();
Symbol 223 MovieClip Frame 25
gotoAndPlay (7);