Frame 1
fscommand ("showmenu", "false");
_focusrect = false;
_root.loaderAnimDelta = 5;
_root.loaderAnimPause = 2500;
_root.parsingAnimDelta = 10;
_global.num_small_eated = 0;
_global.num_medium_eated = 0;
_global.num_big_eated = 0;
_global.time_bonus = 0;
_global.scoreForExtraLife = 1000;
_global.numExtraLife = 0;
_global.soundOn = true;
_global.current_level = 1;
_global.lives = 3;
_global.total_score = 0;
_global.tmp_score = 0;
_global.total_levels = 30;
_global.borderLeft = 0;
_global.borderRight = 825;
_global.borderUp = -200;
_global.borderDown = 400;
_global.cameraX = 0;
_global.cameraY = 0;
_global.cameraSizeX = 550;
_global.cameraSizeY = 400;
_global.mousePreX = (_global.mousePreY = 0);
_global.openSite = function () {
getURL ("http://www.gametop.com/stats/fishtalesdeluxe.html", "_blank");
};
_global.enableSound = function (is_on) {
_global.soundOn = is_on;
trace("_global.soundOn = " + _global.soundOn);
};
_global.playSound = function (sound_mark) {
if (_global.soundOn == false) {
return(undefined);
}
_root.sounds.gotoAndPlay(sound_mark);
};
_global.randRange = function (min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
};
_global.addScore = function (score_add, check_for_extra_life) {
_global.tmp_score = _global.tmp_score + score_add;
};
_global.addTotalScore = function (score_add) {
_global.total_score = _global.total_score + score_add;
};
_global.resetTmpScore = function () {
_global.tmp_score = 0;
};
_global.startNewGame = function () {
_global.num_small_eated = 0;
_global.num_medium_eated = 0;
_global.num_big_eated = 0;
_global.time_bonus = 0;
_global.current_level = 1;
_global.lives = 3;
_global.total_score = 0;
_global.tmp_score = 0;
_global.scoreForExtraLife = 1000;
_global.numExtraLife = 0;
};
_global.cameraScrollX = function (scrollX) {
_global.cameraX = _global.cameraX + scrollX;
_global.cameraCheckRangeX();
};
_global.cameraScrollY = function (scrollY) {
_global.cameraY = _global.cameraY + scrollY;
_global.cameraCheckRangeY();
};
_global.cameraScroll = function (scrollX, scrollY) {
_global.cameraScrollX(scrollX);
_global.cameraScrollY(scrollY);
};
_global.cameraSetX = function (pos_x) {
_global.cameraX = pos_x;
_global.cameraCheckRangeX();
};
_global.cameraSetY = function (pos_y) {
_global.cameraY = pos_y;
_global.cameraCheckRangeY();
};
_global.cameraSet = function (pos_x, pos_y) {
_global.cameraSetX(pos_x);
_global.cameraSetY(pos_y);
};
_global.cameraCheckRangeX = function () {
if (_global.cameraX < _global.borderLeft) {
_global.cameraX = _global.borderLeft;
} else if ((_global.cameraX + _global.cameraSizeX) > _global.borderRight) {
_global.cameraX = _global.borderRight - _global.cameraSizeX;
}
};
_global.cameraCheckRangeY = function () {
if (_global.cameraY < _global.borderUp) {
_global.cameraY = _global.borderUp;
} else if ((_global.cameraY + _global.cameraSizeY) > _global.borderDown) {
_global.cameraY = _global.borderDown - _global.cameraSizeY;
}
};
_global.checkQuadCollision = function (x1, y1, hw1, hh1, x2, y2, hw2, hh2) {
var _local2 = Math.abs(x2 - x1);
var _local1 = Math.abs(y2 - y1);
if ((_local2 <= (hw1 + hw2)) && (_local1 <= (hh1 + hh2))) {
return(true);
}
return(false);
};
Instance of Symbol 97 MovieClip in Frame 2
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
t = _root.getBytesTotal();
l = _root.getBytesLoaded();
bar._xscale = (100 * l) / t;
p = Math.round((1000 * l) / t) / 10;
if (p == Math.floor(p)) {
p = p + ".0";
}
p = p + "%";
tf.text = p;
if (t > 0) {
if ((l < t) && (_alpha < 100)) {
_alpha = (_alpha + 5);
}
if ((l == t) && (_alpha > 0)) {
_alpha = (_alpha - 5);
}
}
}
Frame 3
stop();
Instance of Symbol 100 MovieClip in Frame 3
onClipEvent (load) {
_alpha = 0;
state = 0;
_root.stop();
}
onClipEvent (enterFrame) {
l = _root.getBytesLoaded();
t = _root.getBytesTotal();
if (state == 0) {
_alpha = (_alpha + _root.loaderAnimDelta);
if (_alpha >= 100) {
_alpha = 100;
state = 1;
startPause = getTimer();
}
} else if ((((state == 1) && (t == l)) && (l > 10)) && ((getTimer() - startPause) > _root.loaderAnimPause)) {
var cur_frame = _root.fade_clip._currentframe;
if (cur_frame == 1) {
_root.fade_clip.gotoAndPlay(2);
}
if (cur_frame == 25) {
_root.gotoAndStop("menu");
}
}
}
Instance of Symbol 570 MovieClip in Frame 4
/* no clip actions */
Frame 5
stop();
Instance of Symbol 570 MovieClip "sounds" in Frame 5
/* no clip actions */
Frame 6
stop();
Frame 7
stop();
Symbol 2 MovieClip [mcAction] Frame 1
#initclip 9
Object.registerClass("mcAction", cCore);
#endinitclip
Symbol 20 Button
on (press) {
_root.mcMap.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 25 Button
on (press) {
_root.mcMap.m_startFade_Menu = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 83 MovieClip [map] Frame 1
#initclip 7
Object.registerClass("map", cCoreMap);
#endinitclip
stop();
Symbol 83 MovieClip [map] Frame 2
stop();
Symbol 83 MovieClip [map] Frame 3
stop();
Symbol 83 MovieClip [map] Frame 4
stop();
Symbol 83 MovieClip [map] Frame 5
stop();
Symbol 83 MovieClip [map] Frame 6
stop();
Symbol 83 MovieClip [map] Frame 7
stop();
Symbol 83 MovieClip [map] Frame 8
stop();
Symbol 83 MovieClip [map] Frame 9
stop();
Symbol 83 MovieClip [map] Frame 10
stop();
Symbol 83 MovieClip [map] Frame 11
stop();
Symbol 83 MovieClip [map] Frame 12
stop();
Symbol 83 MovieClip [map] Frame 13
stop();
Symbol 83 MovieClip [map] Frame 14
stop();
Symbol 83 MovieClip [map] Frame 15
stop();
Symbol 83 MovieClip [map] Frame 16
stop();
Symbol 83 MovieClip [map] Frame 17
stop();
Symbol 83 MovieClip [map] Frame 18
stop();
Symbol 83 MovieClip [map] Frame 19
stop();
Symbol 83 MovieClip [map] Frame 20
stop();
Symbol 83 MovieClip [map] Frame 21
stop();
Symbol 83 MovieClip [map] Frame 22
stop();
Symbol 83 MovieClip [map] Frame 23
stop();
Symbol 83 MovieClip [map] Frame 24
stop();
Symbol 83 MovieClip [map] Frame 25
stop();
Symbol 83 MovieClip [map] Frame 26
stop();
Symbol 83 MovieClip [map] Frame 27
stop();
Symbol 83 MovieClip [map] Frame 28
stop();
Symbol 83 MovieClip [map] Frame 29
stop();
Symbol 83 MovieClip [map] Frame 30
stop();
Symbol 84 MovieClip [mcAction_Menu] Frame 1
#initclip 8
Object.registerClass("mcAction_Menu", cCoreMenu);
#endinitclip
Symbol 90 MovieClip Frame 1
stop();
Instance of Symbol 87 MovieClip in Symbol 90 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1003 MovieClip [__Packages.cCoreMap] Frame 0
class cCoreMap extends MovieClip
{
var m_startFade, m_startFade_Menu, gotoAndStop;
function cCoreMap () {
super();
trace("cCoreMap");
m_startFade = false;
m_startFade_Menu = false;
gotoAndStop(_global.current_level);
}
function onEnterFrame() {
if (m_startFade) {
if (_root.fade_clip._currentframe == 25) {
_root.gotoAndPlay("game");
m_startFade = false;
}
} else if (m_startFade_Menu) {
if (_root.fade_clip._currentframe == 25) {
_root.gotoAndPlay("menu");
m_startFade_Menu = false;
}
}
}
}
Symbol 1004 MovieClip [__Packages.cCoreMenu] Frame 0
class cCoreMenu extends MovieClip
{
var m_startFade, attachMovie, m_baseCamPosX, m_timeIn, m_cFish, m_fish_next_depth, m_NumSmallFish, m_NumMediumFish, m_NumBigFish, m_NumGiantFish, m_timeToAddFish, m_iMaxSmallFish, m_iMaxMediumFish, m_iMaxBigFish, m_iMaxGiantFish, m_FishFlightProbability, m_BonusFishProbability, m_lastBorderIndex;
function cCoreMenu () {
super();
trace("cCoreMenu");
m_startFade = false;
attachMovie("back_0", "bg_0", 10);
attachMovie("back_1", "bg_1", 20);
attachMovie("back_main", "bg_main", 30);
attachMovie("back_3", "bg_3", 10000);
m_baseCamPosX = 150;
_global.cameraSetX(m_baseCamPosX);
_global.cameraSetY(0);
m_timeIn = 0;
m_cFish = new Array();
m_fish_next_depth = 100;
m_NumSmallFish = (m_NumMediumFish = (m_NumBigFish = (m_NumGiantFish = 0)));
m_timeToAddFish = 24;
m_iMaxSmallFish = new Array();
m_iMaxMediumFish = new Array();
m_iMaxBigFish = new Array();
m_iMaxGiantFish = new Array();
m_iMaxSmallFish[0] = 10;
m_iMaxMediumFish[0] = 5;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 5;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 2;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 5;
m_iMaxMediumFish[2] = 4;
m_iMaxBigFish[2] = 2;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
m_BonusFishProbability = 20;
}
function onEnterFrame() {
if (m_startFade) {
if (_root.fade_clip._currentframe == 25) {
_root.mcActionMenu.bg_main.removeMovieClip();
_root.mcActionMenu.bg_1.removeMovieClip();
_root.mcActionMenu.bg_3.removeMovieClip();
_root.mcActionMenu.bg_0.removeMovieClip();
RemoveAllFish();
_root.gotoAndPlay("map");
}
}
ScrollBackgroundClip(_root.mcActionMenu.bg_main);
ScrollBackgroundClip(_root.mcActionMenu.bg_1);
ScrollBackgroundClip(_root.mcActionMenu.bg_3);
m_timeIn++;
GenerateFish();
UpdateAllFish();
if (m_timeIn > 72) {
_global.cameraSetX(m_baseCamPosX + (200 * Math.sin((m_timeIn - 72) / 90)));
_global.cameraSetY(-70 + (70 * Math.cos((m_timeIn - 72) / 45)));
}
}
function ScrollBackgroundClip(bg) {
var _local10 = bg._width;
var _local5 = bg._height;
var _local12 = _global.borderLeft;
var _local7 = _global.borderRight;
var _local6 = _global.borderUp;
var _local11 = _global.borderDown;
var _local3 = _global.cameraSizeX;
var _local4 = _global.cameraSizeY;
var _local9 = ((_local10 - _local3) / (_local3 - _local7)) * _global.cameraX;
var _local8 = (_local4 - _local5) + (((_local5 - _local4) / _local6) * _global.cameraY);
bg._x = _local9;
bg._y = _local8;
}
function AddFish(fish_clip, fish_size, fish_type, pos_x, pos_y) {
var _local8;
var _local4;
_local4 = m_fish_next_depth;
m_fish_next_depth++;
var _local2 = new cFish(attachMovie(fish_clip, (fish_clip + "_i") + _local4, _local4));
_local2.InitFish(fish_type, fish_size, pos_x, pos_y);
_local2.setCollisionParam(fish_clip);
_local2.CreateDebugClips();
m_cFish.push(_local2);
if (fish_size == 0) {
m_NumSmallFish++;
} else if (fish_size == 2) {
m_NumMediumFish++;
} else if (fish_size == 4) {
m_NumBigFish++;
} else if (fish_size == 6) {
m_NumGiantFish++;
}
}
function RemoveFish(fish) {
var _local3 = -1;
var _local2 = 0;
while (_local2 < m_cFish.length) {
if (m_cFish[_local2] != fish) {
} else {
_local3 = m_cFish[_local2].m_fishSize;
m_cFish[_local2].onPrepareToDelete();
m_cFish.splice(_local2, 1);
break;
}
_local2++;
}
if (_local3 == 0) {
m_NumSmallFish--;
if (m_NumSmallFish < 0) {
m_NumSmallFish = 0;
}
} else if (_local3 == 2) {
m_NumMediumFish--;
if (m_NumMediumFish < 0) {
m_NumMediumFish = 0;
}
} else if (_local3 == 4) {
m_NumBigFish--;
if (m_NumBigFish < 0) {
m_NumBigFish = 0;
}
} else if (_local3 == 6) {
m_NumGiantFish--;
if (m_NumGiantFish < 0) {
m_NumGiantFish = 0;
}
}
}
function RemoveAllFish() {
var _local2 = 0;
while (_local2 <= m_cFish.length) {
m_cFish[_local2].onPrepareToDelete();
_local2++;
}
delete m_cFish;
m_cFish = new Array();
}
function GetFish(i) {
if ((i > (m_cFish.length - 1)) || (i < 0)) {
return(null);
}
return(m_cFish[i]);
}
function UpdateAllFish() {
var _local5 = 0;
while (_local5 < m_cFish.length) {
m_cFish[_local5].onThink();
_local5++;
}
_local5 = 0;
while (_local5 < m_cFish.length) {
var _local3 = 0;
while (_local3 < m_cFish.length) {
if (_local5 == _local3) {
} else {
var _local8 = m_cFish[_local5];
var _local4 = m_cFish[_local3];
if (_local8.m_fishSize <= _local4.m_fishSize) {
} else {
var _local9 = CheckFishCollision(_local5, _local3);
if (_local9) {
var _local7 = "dieFish_" + _global.randRange(1, 5);
var _local6 = attachMovie(_local7, (_local7 + "_i") + m_fish_next_depth, m_fish_next_depth);
_local6.m_realX = _local4.m_realX;
_local6.m_realY = _local4.m_realY;
m_fish_next_depth++;
trace((("fish " + _local5) + " eat fish ") + _local3);
_local8.eatFish(_local4);
RemoveFish(_local4);
_local3--;
}
}
}
_local3++;
}
_local5++;
}
}
function CheckFishCollision(attaker_index, target_index) {
if (attaker_index == target_index) {
}
var _local4 = m_cFish[attaker_index];
var _local3 = m_cFish[target_index];
var _local10 = _local4.m_realX + _local4.m_mouthClip._x;
var _local7 = _local4.m_realY + _local4.m_mouthClip._y;
var _local13 = _local4.m_mouthW / 2;
var _local8 = _local4.m_mouthH / 2;
var _local9 = _local3.m_realX + _local3.m_bodyClip._x;
var _local5 = _local3.m_realY + _local3.m_bodyClip._y;
var _local12 = _local3.m_bodyW / 2;
var _local6 = _local3.m_bodyH / 2;
var _local11 = _global.checkQuadCollision(_local10, _local7, _local13, _local8, _local9, _local5, _local12, _local6);
return(_local11);
}
function GenerateFish() {
m_timeToAddFish--;
if (m_timeToAddFish > 0) {
return(undefined);
}
m_timeToAddFish = 12;
var _local3 = m_lastBorderIndex;
while (_local3 == m_lastBorderIndex) {
_local3 = _global.randRange(1, 3);
}
m_lastBorderIndex = _local3;
var _local5 = 0;
var _local4 = 0;
if ((_local3 == 1) || (_local3 == 2)) {
_local4 = _global.randRange(_global.borderUp, _global.borderDown);
} else {
_local5 = _global.randRange(_global.borderLeft, _global.borderRight);
}
var _local9 = 1;
var _local7 = 0;
if (_local9 == 1) {
_local7 = 0;
} else if (_local9 == 3) {
_local7 = 1;
} else if (_local9 == 5) {
_local7 = 2;
}
var _local6 = -1;
var _local17 = false;
if (m_NumGiantFish < m_iMaxGiantFish[_local7]) {
_local6 = 4;
} else if (m_NumBigFish < m_iMaxBigFish[_local7]) {
_local6 = 3;
} else if (m_NumMediumFish < m_iMaxMediumFish[_local7]) {
_local6 = 2;
} else if (m_NumSmallFish < m_iMaxSmallFish[_local7]) {
_local6 = 1;
}
if (_local6 < 1) {
return(undefined);
}
var _local16 = false;
if (_local6 == 1) {
var _local20 = "smallFish";
if (_global.randRange(0, 99) <= m_BonusFishProbability) {
_local20 = "goldFish";
_local16 = true;
}
var _local10 = 0;
var _local13 = 1;
if (_global.randRange(0, 99) <= m_FishFlightProbability) {
_local17 = true;
}
} else if (_local6 == 2) {
var _local20 = "mediumFish";
var _local10 = 2;
var _local13 = 1;
} else if (_local6 == 3) {
var _local20 = "bigFish";
var _local10 = 4;
var _local13 = 1;
} else {
var _local20 = "sharkFish";
var _local10 = 6;
var _local13 = 1;
}
AddFish(_local20, _local10, _local13, 0, 0);
var _local8 = m_cFish.length - 1;
var _local19 = m_cFish[_local8].getFishWidth();
var _local18 = m_cFish[_local8].getFishHeight();
if (_local3 == 1) {
_local5 = _global.borderLeft - ((_local19 / 2) + 10);
} else if (_local3 == 2) {
_local5 = _global.borderRight + ((_local19 / 2) + 10);
} else if (_local3 == 3) {
_local4 = _global.borderUp - ((_local18 / 2) + 10);
} else if (_local3 == 4) {
_local4 = _global.borderDown + ((_local18 / 2) + 10);
}
m_cFish[_local8].setPos(_local5, _local4);
var _local14 = (_global.borderRight - _global.borderLeft) / 2;
var _local11 = (_global.borderDown + _global.borderUp) / 2;
m_cFish[_local8].setDir(_local14 - _local5, _local11 - _local4);
if (_local16) {
m_cFish[_local8].m_foodQuality = 5;
m_cFish[_local8].m_fishScore = 50;
}
if (_local17) {
AddFish("smallFish", _local10, _local13, 0, 0);
AddFish("smallFish", _local10, _local13, 0, 0);
var _local15 = m_cFish.length - 1;
var _local12 = m_cFish.length - 2;
m_cFish[_local15].setDir(_local14 - _local5, _local11 - _local4);
m_cFish[_local12].setDir(_local14 - _local5, _local11 - _local4);
m_cFish[_local15].setPos(_local5 - 30, _local4 - 24);
m_cFish[_local12].setPos(_local5 - 30, _local4 + 24);
m_cFish[_local8].SetAIMode(1);
m_cFish[_local15].SetAIMode(1);
m_cFish[_local12].SetAIMode(1);
}
}
}
Symbol 1005 MovieClip [__Packages.cFish] Frame 0
class cFish
{
var m_mcObj, m_realX, m_realY, m_angle, m_fishType, m_fishSize, m_dirX, m_dirY, m_Speed, m_NeedSpeed, m_minSpeed, m_maxSpeed, m_lifeTime, m_timeInState, m_swimToGameArea, m_timeToChangeDir, m_currentGrow, m_grow1, m_grow2, m_grow3, m_foodQuality, m_fishScore, m_attackRadius, m_immuneToChangeDir, m_timeStun, m_bIsStuned, m_bIsNeedToDelete, m_numToEructationSound, m_fishAIMode, m_immuneToDeath, m_mouthW, m_mouthH, m_mouthX, m_mouthY, m_bodyW, m_bodyH, m_bodyX, m_bodyY, m_bodyClip, m_mouthClip, m_zoneClip, m_mineLifeTime;
function cFish (clip) {
m_mcObj = clip;
m_realX = 0;
m_realY = 0;
m_angle = 0;
m_fishType = 1;
m_fishSize = 1;
m_dirX = _global.randRange(-1, 1);
m_dirY = _global.randRange(-1, 1);
m_Speed = 5;
m_NeedSpeed = 5;
m_minSpeed = 1;
m_maxSpeed = 5;
setDir(m_dirX, m_dirY);
m_lifeTime = 0;
m_timeInState = 0;
m_swimToGameArea = false;
m_timeToChangeDir = 0;
m_currentGrow = 0;
m_grow1 = 32;
m_grow2 = 67;
m_grow3 = 100;
m_foodQuality = 1;
m_fishScore = m_foodQuality * 10;
m_attackRadius = 100;
m_immuneToChangeDir = 0;
m_timeStun = 0;
m_bIsStuned = false;
m_bIsNeedToDelete = false;
}
function respawnPlayer(pl_size) {
if (m_fishType != 0) {
return(undefined);
}
m_numToEructationSound = 20;
m_fishSize = pl_size;
m_fishAIMode = 0;
if (m_fishSize == 1) {
m_currentGrow = 0;
setCollisionParam("Player");
} else if (m_fishSize == 3) {
m_currentGrow = m_grow1;
setCollisionParam("Player_Medium");
m_mcObj.gotoAndPlay("swim_2");
} else if (m_fishSize == 5) {
m_currentGrow = m_grow2;
setCollisionParam("Player_Big");
m_mcObj.gotoAndPlay("swim_3");
}
UpdateMouthDebugClip();
UpdateBodyDebugClip();
var _local3 = (_global.borderRight - _global.borderLeft) / 2;
var _local4 = (_global.borderDown + _global.borderUp) / 2;
_global.cameraSet(_local3 - (_global.cameraSizeX / 2), _global.borderUp);
m_realX = _local3;
m_realY = _global.borderUp - getFishHeight();
m_immuneToDeath = true;
}
function eatPearl() {
if (m_fishType != 0) {
return(undefined);
}
_global.playSound("sndEat");
_global.addScore(50, true);
}
function eatFish(food) {
_global.playSound("sndEat");
if (m_fishType != 0) {
return(undefined);
}
if (food.m_fishSize == 0) {
_global.num_small_eated++;
} else if (food.m_fishSize == 2) {
_global.num_medium_eated++;
} else if (food.m_fishSize == 4) {
_global.num_big_eated++;
}
_global.addScore(food.m_fishScore, true);
if (food.m_fishType != 1) {
return(undefined);
}
if (food.m_foodQuality == 0) {
return(undefined);
}
var _local4 = 1;
if (food.m_fishSize == 0) {
if (m_fishSize == 1) {
_local4 = 3;
} else if (m_fishSize == 3) {
_local4 = 2;
}
} else {
_local4 = food.m_foodQuality;
}
if ((_global.current_level >= 1) && (_global.current_level <= 3)) {
_local4 = _local4 * 2;
} else if ((_global.current_level >= 4) && (_global.current_level <= 6)) {
_local4 = _local4 * 1.5;
}
m_currentGrow = m_currentGrow + _local4;
m_numToEructationSound = m_numToEructationSound - _local4;
if (m_numToEructationSound <= 0) {
m_numToEructationSound = 20;
_global.playSound("sndEructation");
}
if ((m_currentGrow >= m_grow1) && (m_fishSize == 1)) {
m_mcObj.gotoAndPlay("grow_1_2");
m_fishSize = 3;
setCollisionParam("Player_Medium");
UpdateMouthDebugClip();
UpdateBodyDebugClip();
_global.playSound("sndGrow");
_global.addTotalScore(_global.tmp_score);
_global.resetTmpScore();
} else if ((m_currentGrow >= m_grow2) && (m_fishSize == 3)) {
m_mcObj.gotoAndPlay("grow_2_3");
m_fishSize = 5;
setCollisionParam("Player_Big");
UpdateMouthDebugClip();
UpdateBodyDebugClip();
_global.playSound("sndGrow");
_global.addTotalScore(_global.tmp_score);
_global.resetTmpScore();
} else if ((m_currentGrow >= m_grow3) && (m_fishSize == 5)) {
m_currentGrow = m_grow3;
_global.current_level++;
if (_global.current_level <= _global.total_levels) {
_root.game_gui.gui_levelwin.gotoAndPlay("move_in");
} else {
_root.game_gui.gui_gamewin.gotoAndPlay("move_in");
}
_global.addTotalScore(_global.tmp_score);
_global.resetTmpScore();
_global.playSound("sndLevelDone");
_root.mcAction.SetGameMode(3);
trace("Level done!");
}
}
function setCollisionParam(fish_name) {
trace(fish_name);
if (fish_name == "Player") {
m_mouthW = 20;
m_mouthH = 20;
m_mouthX = -13;
m_mouthY = 9;
m_bodyW = 35;
m_bodyH = 26;
m_bodyX = -5;
m_bodyY = 5;
} else if (fish_name == "Player_Medium") {
m_mouthW = 30;
m_mouthH = 30;
m_mouthX = -19.5;
m_mouthY = 15.3;
m_bodyW = 47;
m_bodyH = 47;
m_bodyX = -7;
m_bodyY = 5;
} else if (fish_name == "Player_Big") {
m_mouthW = 49.4;
m_mouthH = 57;
m_mouthX = -32.11;
m_mouthY = 25.65;
m_bodyW = 86.45;
m_bodyH = 74.1;
m_bodyX = -12.35;
m_bodyY = 14.25;
} else if (fish_name == "smallFish") {
m_mouthW = 5;
m_mouthH = 5;
m_mouthX = -5;
m_mouthY = 7;
m_bodyW = 20;
m_bodyH = 20;
m_bodyX = 0;
m_bodyY = 0;
} else if (fish_name == "goldFish") {
m_mouthW = 5;
m_mouthH = 5;
m_mouthX = -5;
m_mouthY = 7;
m_bodyW = 20;
m_bodyH = 20;
m_bodyX = 0;
m_bodyY = 0;
} else if (fish_name == "mediumFish") {
m_mouthW = 25;
m_mouthH = 15;
m_mouthX = -10;
m_mouthY = 10;
m_bodyW = 35;
m_bodyH = 35;
m_bodyX = 0;
m_bodyY = 0;
} else if (fish_name == "bigFish") {
m_mouthW = 50;
m_mouthH = 31;
m_mouthX = -18;
m_mouthY = 25;
m_bodyW = 64;
m_bodyH = 60;
m_bodyX = -8;
m_bodyY = 10;
} else if (fish_name == "sharkFish") {
m_mouthW = 78;
m_mouthH = 45;
m_mouthX = -70;
m_mouthY = 40;
m_bodyW = 150;
m_bodyH = 110;
m_bodyX = -35;
m_bodyY = 15;
} else if (fish_name == "sharkFish2") {
m_mouthW = 78;
m_mouthH = 45;
m_mouthX = -70;
m_mouthY = 40;
m_bodyW = 150;
m_bodyH = 110;
m_bodyX = -35;
m_bodyY = 15;
} else if (fish_name == "medusa") {
m_mouthW = 100;
m_mouthH = 110;
m_mouthX = 100;
m_mouthY = 0;
m_bodyW = 100;
m_bodyH = 110;
m_bodyX = 100;
m_bodyY = 0;
}
}
function CreateDebugClips() {
m_bodyClip = m_mcObj.createEmptyMovieClip("body_mc", m_mcObj.getNextHighestDepth());
m_bodyClip.beginFill(65280, 70);
m_bodyClip.moveTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, m_bodyH / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, m_bodyH / 2);
m_bodyClip.endFill();
m_bodyClip._x = m_bodyX;
m_bodyClip._y = m_bodyY;
m_mouthClip = m_mcObj.createEmptyMovieClip("mouth_mc", m_mcObj.getNextHighestDepth());
m_mouthClip.beginFill(16711680, 30);
m_mouthClip.moveTo((-m_mouthW) / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo((-m_mouthW) / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo(m_mouthW / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo(m_mouthW / 2, m_mouthH / 2);
m_mouthClip.lineTo((-m_mouthW) / 2, m_mouthH / 2);
m_mouthClip.endFill();
m_mouthClip._x = m_mouthX;
m_mouthClip._y = m_mouthY;
m_zoneClip = m_mcObj.createEmptyMovieClip("zone_mc", m_mcObj.getNextHighestDepth());
m_zoneClip.beginFill(255, 30);
drawCircle(m_zoneClip, 0, 0, m_attackRadius);
m_zoneClip.endFill();
m_mouthClip._visible = false;
m_bodyClip._visible = false;
m_zoneClip._visible = false;
if (m_fishType == 0) {
m_zoneClip._visible = false;
}
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function UpdateMouthDebugClip() {
m_mouthClip.clear();
m_mouthClip.beginFill(16711680, 70);
m_mouthClip.moveTo((-m_mouthW) / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo((-m_mouthW) / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo(m_mouthW / 2, (-m_mouthH) / 2);
m_mouthClip.lineTo(m_mouthW / 2, m_mouthH / 2);
m_mouthClip.lineTo((-m_mouthW) / 2, m_mouthH / 2);
m_mouthClip.endFill();
m_mouthClip._x = m_mouthX;
m_mouthClip._y = m_mouthY;
}
function UpdateBodyDebugClip() {
m_bodyClip.clear();
m_bodyClip.beginFill(65280, 50);
m_bodyClip.moveTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, m_bodyH / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, m_bodyH / 2);
m_bodyClip.endFill();
m_bodyClip._x = m_bodyX;
m_bodyClip._y = m_bodyY;
}
function InitFish(fType, fSize, pos_x, pos_y) {
m_fishType = fType;
m_fishSize = fSize;
m_realX = pos_x;
m_realY = pos_y;
setClipParam();
m_fishAIMode = 0;
if (m_fishType == 1) {
m_grow1 = (m_grow2 = (m_grow3 = 100000000));
if (m_fishSize == 0) {
m_foodQuality = 3;
} else if (m_fishSize == 2) {
m_foodQuality = 3;
} else if (m_fishSize == 4) {
m_foodQuality = 5;
} else if (m_fishSize == 6) {
m_foodQuality = 10;
}
} else if (m_fishType == 0) {
m_zoneClip._visible = false;
} else if (m_fishType == 3) {
m_mineLifeTime = _global.randRange(48, 250);
m_Speed = 5;
} else if (m_fishType == 4) {
m_Speed = 1;
}
}
function SetAIMode(ai_mode) {
m_fishAIMode = ai_mode;
m_timeInState = 0;
}
function stunFish() {
if ((m_fishType == 0) && (m_bIsStuned == false)) {
_global.playSound("sndShock");
}
m_timeStun = 48;
m_bIsStuned = true;
}
function onThink() {
m_lifeTime++;
m_timeInState++;
m_mcObj.stun_clip._visible = false;
if (m_bIsStuned) {
m_timeStun--;
m_mcObj.stun_clip._visible = true;
if (m_timeStun <= 0) {
m_bIsStuned = false;
}
setClipParam();
return(undefined);
}
if (m_fishType == 0) {
onThink_Player();
} else if (m_fishType == 2) {
onThink_BonusFish();
} else if (m_fishType == 3) {
onThink_Mine();
} else if (m_fishType == 4) {
onThink_Medusa();
} else {
onThink_Fish();
}
setClipParam();
}
function onThink_Player() {
if (m_fishAIMode == 0) {
m_dirX = 0;
m_dirY = 1;
m_Speed = 10;
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
if (m_timeInState > 12) {
_global.cameraScroll(m_dirX * m_Speed, 0);
_global.cameraScroll(0, m_dirY * m_Speed);
}
if (m_realY > 0) {
m_dirY = 0;
SetAIMode(2);
m_immuneToDeath = false;
}
return(undefined);
}
var _local6 = m_mcObj._parent._xmouse;
var _local7 = m_mcObj._parent._ymouse;
var _local3 = _local6 + _global.cameraX;
var _local4 = _local7 + _global.cameraY;
var _local5 = Math.sqrt(((_local3 - m_realX) * (_local3 - m_realX)) + ((_local4 - m_realY) * (_local4 - m_realY)));
if (_local5 == 0) {
return(undefined);
}
m_dirX = (_local3 - m_realX) / _local5;
m_dirY = (_local4 - m_realY) / _local5;
m_Speed = _local5 / 15;
var _local9 = m_realX;
var _local8 = m_realY;
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
if ((_local9 > _local3) && (m_realX < _local3)) {
m_realX = _local3;
m_dirX = 0;
}
if ((_local9 < _local3) && (m_realX > _local3)) {
m_realX = _local3;
m_dirX = 0;
}
if ((_local8 > _local4) && (m_realY < _local4)) {
m_realY = _local4;
m_dirY = 0;
}
if ((_local8 < _local4) && (m_realY > _local4)) {
m_realY = _local4;
m_dirY = 0;
}
if ((_local6 < 100) || (_local6 > 450)) {
_global.cameraScroll(m_dirX * m_Speed, 0);
}
if ((_local7 < 100) || (_local7 > 300)) {
_global.cameraScroll(0, m_dirY * m_Speed);
}
}
function onThink_Fish() {
m_immuneToChangeDir--;
var _local7 = getFishWidth() / 2;
var _local10 = getFishHeight() / 2;
if (m_swimToGameArea == false) {
if (((((m_realX + _local7) < _global.borderRight) && ((m_realX - _local7) > _global.borderLeft)) && ((m_realY + _local10) < _global.borderDown)) && ((m_realY - _local10) > _global.borderUp)) {
m_swimToGameArea = true;
}
}
if (m_fishAIMode == 0) {
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
if (m_swimToGameArea) {
SetNewRandomDir();
SetAIMode(2);
}
return(undefined);
}
if (m_fishAIMode == 1) {
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
var _local9 = (_global.borderRight - _global.borderLeft) / 2;
var _local8 = (_global.borderDown + _global.borderUp) / 2;
var _local11 = ((_local9 - m_realX) * (_local9 - m_realX)) + ((_local8 - m_realY) * (_local8 - m_realY));
if (_local11 <= 10000) {
SetNewRandomDir();
SetAIMode(2);
} else if (m_swimToGameArea) {
if (((m_realX >= _global.borderRight) && (m_dirX > 0)) || ((m_realX < _global.borderLeft) && (m_dirX < 0))) {
m_dirX = -m_dirX;
SetAIMode(2);
}
if (((m_realY <= _global.borderUp) && (m_dirY < 0)) || ((m_realY >= _global.borderDown) && (m_dirY > 0))) {
m_dirY = -m_dirY;
SetAIMode(2);
}
}
return(undefined);
}
if (m_fishAIMode == 3) {
m_Speed = m_Speed + 0.5;
if (m_Speed > 20) {
m_Speed = 20;
}
if (m_Speed < 5) {
m_Speed = 5;
}
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
if (m_swimToGameArea) {
if ((m_realX < (_global.borderLeft - (getFishWidth() / 2))) || (m_realX > (_global.borderRight + (getFishWidth() / 2)))) {
m_bIsNeedToDelete = true;
}
}
return(undefined);
}
m_timeToChangeDir--;
if (m_timeToChangeDir <= 0) {
SetNewRandomDir();
m_timeToChangeDir = _global.randRange(24, 120);
m_NeedSpeed = _global.randRange(m_minSpeed, m_maxSpeed);
}
var _local6 = 0.2;
if (m_Speed > m_NeedSpeed) {
m_Speed = m_Speed - _local6;
if (m_Speed < m_NeedSpeed) {
m_Speed = m_NeedSpeed;
}
} else if (m_Speed < m_NeedSpeed) {
m_Speed = m_Speed + _local6;
if (m_Speed > m_NeedSpeed) {
m_Speed = m_NeedSpeed;
}
}
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
var _local4 = _root.mcAction.m_cPlayerFish;
var _local11 = ((_local4.m_realX - m_realX) * (_local4.m_realX - m_realX)) + ((_local4.m_realY - m_realY) * (_local4.m_realY - m_realY));
var _local5 = m_attackRadius;
if (_global.current_level == 1) {
_local5 = 0;
} else if (_global.current_level == 2) {
_local5 = _local5 / 4;
} else if (_global.current_level == 3) {
_local5 = _local5 / 2;
} else if (_global.current_level == 4) {
_local5 = _local5 / 0;
}
if ((_local11 < (_local5 * _local5)) && (m_fishSize != _local4.m_fishSize)) {
m_NeedSpeed = m_maxSpeed - 2;
if (m_NeedSpeed < m_minSpeed) {
m_NeedSpeed = m_minSpeed;
}
m_Speed = m_maxSpeed;
m_timeToChangeDir = _global.randRange(24, 120);
if (m_fishSize < _local4.m_fishSize) {
setDir(m_realX - _local4.m_realX, m_realY - _local4.m_realY);
} else if (m_fishSize > _local4.m_fishSize) {
setDir(_local4.m_realX - m_realX, _local4.m_realY - m_realY);
}
}
if (((m_realX >= _global.borderRight) && (m_dirX > 0)) || ((m_realX < _global.borderLeft) && (m_dirX < 0))) {
m_dirX = -m_dirX;
m_immuneToChangeDir = 24;
}
if (((m_realY <= _global.borderUp) && (m_dirY < 0)) || ((m_realY >= _global.borderDown) && (m_dirY > 0))) {
m_dirY = -m_dirY;
m_immuneToChangeDir = 24;
}
}
function onThink_BonusFish() {
m_realX = _global.mousePreX;
m_realY = _global.mousePreY;
}
function onThink_Mine() {
m_dirX = 0;
m_dirY = 1;
m_Speed = m_Speed - 0.04;
if (m_Speed < 2) {
m_Speed = 2;
}
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
}
function onThink_Medusa() {
m_dirX = 0;
m_dirY = -1;
m_Speed = m_Speed + 0.04;
if (m_Speed > 5) {
m_Speed = 5;
}
m_realX = m_realX + (m_dirX * m_Speed);
m_realY = m_realY + (m_dirY * m_Speed);
}
function SetNewRandomDir() {
var _local3 = _global.randRange(0.392699081698724, (Math.PI/4));
var _local4 = _global.randRange(0, 99);
if (_local4 <= 50) {
_local3 = -_local3;
}
var _local6 = (m_dirX * Math.cos(_local3)) - (m_dirY * Math.sin(_local3));
var _local5 = (m_dirY * Math.cos(_local3)) + (m_dirX * Math.sin(_local3));
m_dirX = _local6;
m_dirY = _local5;
}
function setDir(dir_x, dir_y) {
if (m_immuneToChangeDir > 0) {
return(undefined);
}
m_dirX = dir_x;
m_dirY = dir_y;
if ((m_dirX == 0) && (m_dirY == 0)) {
m_dirX = 0.5;
m_dirY = 0.5;
}
var _local2 = Math.sqrt((m_dirX * m_dirX) + (m_dirY * m_dirY));
m_dirX = m_dirX / _local2;
m_dirY = m_dirY / _local2;
}
function onPrepareToDelete() {
deleteClip();
}
function setPos(pos_x, pos_y) {
m_realX = pos_x;
m_realY = pos_y;
setClipParam();
}
function setClipParam() {
if (!m_mcObj) {
return(undefined);
}
m_mcObj._x = m_realX - _global.cameraX;
m_mcObj._y = m_realY - _global.cameraY;
m_mcObj._rotation = m_angle;
if (m_dirX >= 0) {
m_mouthClip._x = -m_mouthX;
m_bodyClip._x = -m_bodyX;
m_mcObj.fish_img._xscale = -100;
} else {
m_mouthClip._x = m_mouthX;
m_bodyClip._x = m_bodyX;
m_mcObj.fish_img._xscale = 100;
}
}
function deleteClip() {
if (m_mouthClip) {
m_mouthClip.removeMovieClip();
}
if (m_bodyClip) {
m_bodyClip.removeMovieClip();
}
if (!m_mcObj) {
return(undefined);
}
m_mcObj.removeMovieClip();
m_mcObj = null;
}
function getFishWidth() {
var _local2 = m_mcObj.fish_img._width;
return(_local2);
}
function getFishHeight() {
var _local2 = m_mcObj.fish_img._height;
return(_local2);
}
}
Symbol 1006 MovieClip [__Packages.cCore] Frame 0
class cCore extends MovieClip
{
var attachMovie, m_mine_next_depth, m_fish_next_depth, m_medusa_next_depth, m_cFish, m_cMalusk, m_timeToAddFish, m_lastBorderIndex, m_NumSmallFish, m_NumMediumFish, m_NumBigFish, m_NumGiantFish, m_cPlayerFish, m_lastPlayerSize, m_timeInGameMode, m_mcDangerSymbol, m_dangerY, m_levelType, m_NeedShowWindowBeforeBonusLevel, m_TimeAtBonusLevel, m_MaxNumFishAtBonusLevel, m_timeInMode, m_gameMode, m_iNumMalusks, m_timeToDirectAttackShark, m_bIsShowDangerSymbol, m_bIsAttackFromLeft, m_timeToDirectShark_Min, m_timeToDirectShark_Max, m_bIsDirectAttackShark, m_iMaxGiantFish, m_iMaxBigFish, m_iMaxMediumFish, m_iMaxSmallFish, m_BonusFishProbability, m_FishFlightProbability, m_NumFishAtBonusLevel, m_bIsMineOnLevel, m_timeToAddMine, m_mineInPack, m_timeBetweenMinePack_Min, m_timeBetweenMinePack_Max, m_mineInPack_Min, m_mineInPack_Max, m_timeForMineInPack_Min, m_timeForMineInPack_Max, m_bIsMedusaOnLevel, m_timeToAddMedusa, m_medusaInPack, m_timeBetweenMedusaPack_Min, m_timeBetweenMedusaPack_Max, m_medusaInPack_Min, m_medusaInPack_Max, m_timeForMedusaInPack_Min, m_timeForMedusaInPack_Max, m_iMaxTotal;
function cCore () {
super();
trace("----- Game Init -----");
attachMovie("back_0", "bg_0", 10);
attachMovie("back_1", "bg_1", 20);
attachMovie("back_main", "bg_main", 30);
attachMovie("back_3", "bg_3", 10000);
m_mine_next_depth = 100;
m_fish_next_depth = 10000;
m_medusa_next_depth = 15000;
m_cFish = new Array();
m_cMalusk = new Array();
m_timeToAddFish = 0;
m_lastBorderIndex = 0;
m_NumSmallFish = 0;
m_NumMediumFish = 0;
m_NumBigFish = 0;
m_NumGiantFish = 0;
m_cPlayerFish = null;
SetLevelParam(_global.current_level);
AddMalusks();
m_lastPlayerSize = 1;
AddFish("Player", 1, 0, 0, 0);
SetGameMode(0);
trace(m_cFish.length);
GUI_SetLives();
GUI_SetScore();
m_timeInGameMode = 0;
_global.num_small_eated = 0;
_global.num_medium_eated = 0;
_global.num_big_eated = 0;
_global.time_bonus = 0;
m_mcDangerSymbol = attachMovie("danger_symbol", "danger_symbol_i30000", 30000);
m_mcDangerSymbol._visible = false;
m_dangerY = 300;
trace("----- Game Init Done -----");
}
function frameGame() {
if (m_levelType == 1) {
if (m_NeedShowWindowBeforeBonusLevel) {
m_NeedShowWindowBeforeBonusLevel = false;
SetGameMode(8);
_root.game_gui.gui_bonuswindow.gotoAndPlay("move_in");
}
m_timeInGameMode++;
var _local5 = m_TimeAtBonusLevel - Math.floor(m_timeInGameMode / 24);
var _local4 = _local5;
if (_local4 < 10) {
_local4 = "0" + _local4;
}
_root.game_gui.gui_time.tfTimer.text = "00:" + _local4;
_local4 = _global.num_small_eated;
if (_local4 < 10) {
_local4 = "0" + _local4;
}
_root.game_gui.gui_time.tfFishCounter.text = (_local4 + "/") + m_MaxNumFishAtBonusLevel;
_root.game_gui.gui_time._visible = true;
if (_global.num_small_eated >= m_MaxNumFishAtBonusLevel) {
_global.current_level++;
SetGameMode(3);
_root.game_gui.gui_levelwin.gotoAndPlay("move_in");
} else if (_local5 == 0) {
_global.current_level++;
SetGameMode(3);
_root.game_gui.gui_timesup.gotoAndPlay("move_in");
}
}
UpdateAllFish();
UpdateAllMalusks();
GenerateFish();
GenerateMine();
GenerateMedusa();
ScrollBackgroundClip(_root.mcAction.bg_main);
ScrollBackgroundClip(_root.mcAction.bg_1);
ScrollBackgroundClip(_root.mcAction.bg_3);
m_mcDangerSymbol._y = m_dangerY - _global.cameraY;
_global.mousePreX = _root._xmouse + _global.cameraX;
_global.mousePreY = _root._ymouse + _global.cameraY;
GUI_SetScore();
GUI_SetGrowProgress(m_cPlayerFish.m_currentGrow, 0, 0, 0);
if ((Key.isDown(27) || (Key.isDown(80))) && (m_timeInMode > 5)) {
SetGameMode(1);
_root.game_gui.gui_pause.gotoAndPlay("move_in");
}
}
function framePause() {
if ((Key.isDown(27) || (Key.isDown(80))) && (m_timeInMode > 5)) {
SetGameMode(0);
_root.game_gui.gui_pause.gotoAndPlay("move_out");
}
}
function frameGameOver() {
if (m_timeInMode == 25) {
_root.game_gui.gui_gameover.gotoAndPlay("move_in");
_root.game_gui.general_stats._visible = true;
_root.game_gui.general_stats.gotoAndPlay(2);
}
}
function frameLevelDone() {
}
function frameGameDone() {
}
function framePlayerDead() {
if (_root.fade_clip._currentframe == 25) {
var _local4 = false;
GUI_SetLives();
if (_global.lives == 0) {
SetGameMode(2);
RemoveAllFish();
_local4 = true;
}
if (_local4) {
return(undefined);
}
RemoveAllFish();
AddFish("Player", 1, 0, 0, 0);
SetGameMode(0);
}
}
function frameBeforeMainMenu() {
if (_root.fade_clip._currentframe == 25) {
RemoveAllFish();
RemoveAllMalusks();
_root.mcAction.bg_main.removeMovieClip();
_root.mcAction.bg_1.removeMovieClip();
_root.mcAction.bg_3.removeMovieClip();
_root.mcAction.bg_0.removeMovieClip();
_root.gotoAndPlay("menu");
}
}
function frameFadeBeforeMap() {
if (_root.fade_clip._currentframe == 25) {
RemoveAllFish();
RemoveAllMalusks();
_root.mcAction.bg_main.removeMovieClip();
_root.mcAction.bg_1.removeMovieClip();
_root.mcAction.bg_3.removeMovieClip();
_root.mcAction.bg_0.removeMovieClip();
_root.gotoAndPlay("map");
}
}
function frameWindowBeforeBonusLevel() {
}
function SetGameMode(new_mode) {
if ((new_mode < 0) || (m_gameMode > 8)) {
trace("try to set incorrect mode!");
return(undefined);
}
m_gameMode = new_mode;
m_timeInMode = 0;
if ((new_mode == 3) || (new_mode == 4)) {
if (m_levelType == 1) {
_root.game_gui.bonus_stats._visible = true;
_root.game_gui.bonus_stats.gotoAndPlay(2);
_global.time_bonus = (m_TimeAtBonusLevel - Math.floor(m_timeInGameMode / 24)) * 100;
_global.addScore(_global.time_bonus, false);
} else {
_root.game_gui.general_stats._visible = true;
_root.game_gui.general_stats.gotoAndPlay(2);
}
}
trace("set mode " + m_gameMode);
}
function onEnterFrame() {
switch (m_gameMode) {
case 0 :
frameGame();
break;
case 1 :
framePause();
break;
case 2 :
frameGameOver();
break;
case 3 :
frameLevelDone();
break;
case 4 :
frameGameDone();
break;
case 5 :
framePlayerDead();
break;
case 6 :
frameBeforeMainMenu();
break;
case 7 :
frameFadeBeforeMap();
break;
case 8 :
frameWindowBeforeBonusLevel();
break;
}
m_timeInMode++;
}
function AddMalusks() {
if (m_iNumMalusks == 0) {
return(undefined);
}
var _local3;
_local3 = m_fish_next_depth;
m_fish_next_depth++;
var _local4 = new cMalusk(attachMovie("maluskFish", "malusk_i" + _local3, _local3));
_local4.InitMalusk(375, _global.borderDown - 130);
m_cMalusk.push(_local4);
if (m_iNumMalusks == 1) {
return(undefined);
}
_local3 = m_fish_next_depth;
m_fish_next_depth++;
_local4 = new cMalusk(attachMovie("maluskFish", "malusk_i" + _local3, _local3));
_local4.InitMalusk(650, _global.borderDown - 130);
m_cMalusk.push(_local4);
if (m_iNumMalusks == 2) {
return(undefined);
}
_local3 = m_fish_next_depth;
m_fish_next_depth++;
_local4 = new cMalusk(attachMovie("maluskFish", "malusk_i" + _local3, _local3));
_local4.InitMalusk(100, _global.borderDown - 130);
m_cMalusk.push(_local4);
}
function AddFish(fish_clip, fish_size, fish_type, pos_x, pos_y) {
var _local10;
var _local5;
_local5 = m_fish_next_depth;
m_fish_next_depth++;
var _local3 = new cFish(attachMovie(fish_clip, (fish_clip + "_i") + _local5, _local5));
_local3.InitFish(fish_type, fish_size, pos_x, pos_y);
_local3.setCollisionParam(fish_clip);
_local3.CreateDebugClips();
m_cFish.push(_local3);
if (fish_size == 0) {
m_NumSmallFish++;
} else if (fish_size == 2) {
m_NumMediumFish++;
} else if (fish_size == 4) {
m_NumBigFish++;
} else if (fish_size == 6) {
m_NumGiantFish++;
}
if (fish_type == 0) {
m_cPlayerFish = m_cFish[m_cFish.length - 1];
m_cPlayerFish.respawnPlayer(m_lastPlayerSize);
_global.playSound("sndRespawn");
trace("player added");
}
}
function AddMine(fish_clip, pos_x, pos_y) {
var _local7;
var _local3;
_local3 = m_mine_next_depth;
m_mine_next_depth++;
var _local2 = new cFish(attachMovie(fish_clip, (fish_clip + "_i") + _local3, _local3));
_local2.InitFish(3, 1, pos_x, pos_y);
_local2.setCollisionParam(fish_clip);
_local2.CreateDebugClips();
m_cFish.push(_local2);
}
function AddMedusa(fish_clip, pos_x, pos_y) {
var _local7;
var _local3;
_local3 = m_medusa_next_depth;
m_medusa_next_depth++;
var _local2 = new cFish(attachMovie(fish_clip, (fish_clip + "_i") + _local3, _local3));
_local2.InitFish(4, 10, pos_x, pos_y);
_local2.setCollisionParam(fish_clip);
_local2.CreateDebugClips();
m_cFish.push(_local2);
}
function RemoveFish(fish) {
var _local3 = -1;
var _local2 = 0;
while (_local2 < m_cFish.length) {
if (m_cFish[_local2] != fish) {
} else {
_local3 = m_cFish[_local2].m_fishSize;
m_cFish[_local2].onPrepareToDelete();
if (m_cPlayerFish == m_cFish[_local2]) {
KillPlayerFish();
}
m_cFish.splice(_local2, 1);
break;
}
_local2++;
}
if (_local3 == 0) {
m_NumSmallFish--;
if (m_NumSmallFish < 0) {
m_NumSmallFish = 0;
}
} else if (_local3 == 2) {
m_NumMediumFish--;
if (m_NumMediumFish < 0) {
m_NumMediumFish = 0;
}
} else if (_local3 == 4) {
m_NumBigFish--;
if (m_NumBigFish < 0) {
m_NumBigFish = 0;
}
} else if (_local3 == 6) {
m_NumGiantFish--;
if (m_NumGiantFish < 0) {
m_NumGiantFish = 0;
}
}
}
function KillPlayerFish() {
if (m_cPlayerFish.m_immuneToDeath) {
return(undefined);
}
SetGameMode(5);
m_lastPlayerSize = m_cPlayerFish.m_fishSize;
m_cPlayerFish = null;
_root.fade_clip.gotoAndPlay(1);
_global.resetTmpScore();
_global.playSound("sndDie");
}
function RemoveAllFish() {
var _local2 = 0;
while (_local2 <= m_cFish.length) {
m_cFish[_local2].onPrepareToDelete();
_local2++;
}
delete m_cFish;
m_cFish = new Array();
m_NumSmallFish = (m_NumMediumFish = (m_NumBigFish = (m_NumGiantFish = 0)));
trace(m_cFish.length);
}
function RemoveAllMalusks() {
var _local2 = 0;
while (_local2 <= m_cMalusk.length) {
m_cMalusk[_local2].onPrepareToDelete();
_local2++;
}
delete m_cMalusk;
m_cMalusk = new Array();
trace("Number of malusks: " + m_cMalusk.length);
}
function GetFish(i) {
if ((i > (m_cFish.length - 1)) || (i < 0)) {
return(null);
}
return(m_cFish[i]);
}
function UpdateAllMalusks() {
var _local5 = 0;
while (_local5 < m_cMalusk.length) {
m_cMalusk[_local5].onThink();
if ((m_cMalusk[_local5].m_bIsOpen == false) && (m_cMalusk[_local5].m_timeInMode > 15)) {
} else if ((m_cMalusk[_local5].m_bIsOpen == true) && (m_cMalusk[_local5].m_timeInMode < 15)) {
} else {
var _local3 = m_cPlayerFish;
var _local4 = m_cMalusk[_local5];
var _local14 = _local3.m_realX + _local3.m_mouthClip._x;
var _local13 = _local3.m_realY + _local3.m_mouthClip._y;
var _local24 = _local3.m_mouthW / 2;
var _local23 = _local3.m_mouthH / 2;
var _local11 = _local3.m_realX + _local3.m_bodyClip._x;
var _local10 = _local3.m_realY + _local3.m_bodyClip._y;
var _local15 = _local3.m_bodyW / 2;
var _local12 = _local3.m_bodyH / 2;
var _local8 = _local4.m_realX + _local4.m_pearlClip._x;
var _local7 = _local4.m_realY + _local4.m_pearlClip._y;
var _local18 = _local4.m_pearlW / 2;
var _local16 = _local4.m_pearlW / 2;
var _local21 = _local4.m_realX + _local4.m_bodyClip._x;
var _local20 = _local4.m_realY + _local4.m_bodyClip._y;
var _local22 = _local4.m_bodyW / 2;
var _local19 = _local4.m_bodyH / 2;
if (m_cMalusk[_local5].m_bIsHavePearl) {
var _local17 = _global.checkQuadCollision(_local14, _local13, _local24, _local23, _local8, _local7, _local18, _local16);
if (_local17) {
_local4.m_bIsHavePearl = false;
_local3.eatPearl();
var _local9 = "dieFish_" + _global.randRange(1, 5);
var _local6 = attachMovie(_local9, (_local9 + "_i") + m_fish_next_depth, m_fish_next_depth);
_local6.m_realX = _local8;
_local6.m_realY = _local7;
m_fish_next_depth++;
}
}
if ((m_cMalusk[_local5].m_bIsOpen == false) && (m_cMalusk[_local5].m_timeInMode <= 15)) {
var _local17 = _global.checkQuadCollision(_local11, _local10, _local15, _local12, _local21, _local20, _local22, _local19);
if (_local17) {
RemoveFish(_local3);
var _local9 = "dieFish_" + _global.randRange(1, 5);
var _local6 = attachMovie(_local9, (_local9 + "_i") + m_fish_next_depth, m_fish_next_depth);
_local6.m_realX = _local11;
_local6.m_realY = _local10;
m_fish_next_depth++;
}
}
}
_local5++;
}
}
function UpdateAllFish() {
var _local4 = 0;
while (_local4 < m_cFish.length) {
if (m_cFish[_local4].m_bIsNeedToDelete) {
RemoveFish(m_cFish[_local4]);
_local4--;
} else {
m_cFish[_local4].onThink();
if ((m_cFish[_local4].m_fishType == 3) && (m_cFish[_local4].m_lifeTime > m_cFish[_local4].m_mineLifeTime)) {
mineExplosion(m_cFish[_local4].m_realX + 25, m_cFish[_local4].m_realY + 25);
var _local6 = attachMovie("mineExp", "mineExp_i" + m_fish_next_depth, m_fish_next_depth);
_local6.m_realX = m_cFish[_local4].m_realX + 50;
_local6.m_realY = m_cFish[_local4].m_realY + 50;
m_fish_next_depth++;
RemoveFish(m_cFish[_local4]);
_local4--;
} else if (m_cFish[_local4].m_fishType == 4) {
if (m_cFish[_local4].m_realY < (_global.borderUp - m_cFish[_local4].getFishHeight())) {
RemoveFish(m_cFish[_local4]);
_local4--;
}
}
}
_local4++;
}
_local4 = 0;
while (_local4 < m_cFish.length) {
if (m_cFish[_local4].m_fishType == 3) {
} else {
var _local3 = 0;
while (_local3 < m_cFish.length) {
if (_local4 == _local3) {
} else if (m_cFish[_local3].m_fishType == 3) {
} else if (m_cFish[_local3].m_fishType == 4) {
} else {
var _local8 = m_cFish[_local4];
var _local5 = m_cFish[_local3];
if (_local8.m_fishSize <= _local5.m_fishSize) {
} else {
var _local9 = CheckFishCollision(_local4, _local3);
if (_local9) {
if (m_cFish[_local4].m_fishType == 4) {
m_cFish[_local3].stunFish();
} else {
var _local7 = "dieFish_" + _global.randRange(1, 5);
var _local6 = attachMovie(_local7, (_local7 + "_i") + m_fish_next_depth, m_fish_next_depth);
_local6.m_realX = _local5.m_realX;
_local6.m_realY = _local5.m_realY;
m_fish_next_depth++;
trace((("fish " + _local4) + " eat fish ") + _local3);
_local8.eatFish(_local5);
RemoveFish(_local5);
_local3--;
}
}
}
}
_local3++;
}
}
_local4++;
}
}
function mineExplosion(e_x, e_y) {
var _local3 = 0;
while (_local3 < m_cFish.length) {
if (m_cFish[_local3].m_fishType == 3) {
} else if (m_cFish[_local3].m_fishType == 4) {
} else {
var _local5 = m_cFish[_local3].m_realX + m_cFish[_local3].m_bodyClip._x;
var _local4 = m_cFish[_local3].m_realY + m_cFish[_local3].m_bodyClip._y;
var _local6 = ((e_x - _local5) * (e_x - _local5)) + ((e_y - _local4) * (e_y - _local4));
if (_local6 <= 22500) {
m_cFish[_local3].stunFish();
}
}
_local3++;
}
_global.playSound("sndBombExp");
}
function CheckFishCollision(attaker_index, target_index) {
if (attaker_index == target_index) {
}
var _local4 = m_cFish[attaker_index];
var _local3 = m_cFish[target_index];
var _local10 = _local4.m_realX + _local4.m_mouthClip._x;
var _local7 = _local4.m_realY + _local4.m_mouthClip._y;
var _local13 = _local4.m_mouthW / 2;
var _local8 = _local4.m_mouthH / 2;
var _local9 = _local3.m_realX + _local3.m_bodyClip._x;
var _local5 = _local3.m_realY + _local3.m_bodyClip._y;
var _local12 = _local3.m_bodyW / 2;
var _local6 = _local3.m_bodyH / 2;
var _local11 = _global.checkQuadCollision(_local10, _local7, _local13, _local8, _local9, _local5, _local12, _local6);
return(_local11);
}
function UpdateTimer() {
var _local3 = Math.round((getTimer() - 0) / 1000);
var _local2 = _local3 % 60;
if (_local2 < 10) {
_local2 = "0" + _local2;
}
var _local4 = Math.floor(_local3 / 60);
_root.game_gui.tfTimer.text = (_local4 + ":") + _local2;
}
function ScrollBackgroundClip(bg) {
var _local10 = bg._width;
var _local5 = bg._height;
var _local12 = _global.borderLeft;
var _local7 = _global.borderRight;
var _local6 = _global.borderUp;
var _local11 = _global.borderDown;
var _local3 = _global.cameraSizeX;
var _local4 = _global.cameraSizeY;
var _local9 = ((_local10 - _local3) / (_local3 - _local7)) * _global.cameraX;
var _local8 = (_local4 - _local5) + (((_local5 - _local4) / _local6) * _global.cameraY);
bg._x = _local9;
bg._y = _local8;
}
function GenerateDirectShark() {
m_timeToDirectAttackShark--;
if (m_timeToDirectAttackShark > 0) {
return(undefined);
}
if (m_bIsShowDangerSymbol) {
var _local4 = "sharkFish2";
var _local5 = 6;
var _local6 = 1;
AddFish(_local4, _local5, _local6, _global.borderRight + 120, m_dangerY);
var _local3 = m_cFish.length - 1;
if (m_bIsAttackFromLeft) {
m_cFish[_local3].m_realX = _global.borderLeft - 120;
m_cFish[_local3].m_dirX = 1;
m_cFish[_local3].m_dirY = 0;
} else {
m_cFish[_local3].m_dirX = -1;
m_cFish[_local3].m_dirY = 0;
}
m_cFish[_local3].SetAIMode(3);
m_bIsShowDangerSymbol = false;
m_timeToDirectAttackShark = _global.randRange(m_timeToDirectShark_Min, m_timeToDirectShark_Max);
m_mcDangerSymbol._visible = false;
m_bIsAttackFromLeft = !m_bIsAttackFromLeft;
trace("add direct shark - hide symbol");
} else {
m_bIsShowDangerSymbol = true;
m_timeToDirectAttackShark = 24;
m_mcDangerSymbol._visible = true;
m_mcDangerSymbol._x = 510;
m_dangerY = m_cPlayerFish.m_realY;
if (m_bIsAttackFromLeft) {
m_mcDangerSymbol._x = 40;
}
trace("show danger symbol");
}
}
function GenerateFish() {
if (m_levelType == 1) {
GenerateFish_BonusLevel();
return(undefined);
}
if (m_bIsDirectAttackShark) {
GenerateDirectShark();
}
m_timeToAddFish--;
if (m_timeToAddFish > 0) {
return(undefined);
}
m_timeToAddFish = 12;
var _local3 = m_lastBorderIndex;
while (_local3 == m_lastBorderIndex) {
_local3 = _global.randRange(1, 3);
}
m_lastBorderIndex = _local3;
var _local5 = 0;
var _local4 = 0;
if ((_local3 == 1) || (_local3 == 2)) {
_local4 = _global.randRange(_global.borderUp, _global.borderDown);
} else {
_local5 = _global.randRange(_global.borderLeft, _global.borderRight);
}
var _local9 = m_cPlayerFish.m_fishSize;
var _local7 = 0;
if (_local9 == 1) {
_local7 = 0;
} else if (_local9 == 3) {
_local7 = 1;
} else if (_local9 == 5) {
_local7 = 2;
}
var _local6 = -1;
var _local17 = false;
if (m_NumGiantFish < m_iMaxGiantFish[_local7]) {
_local6 = 4;
} else if (m_NumBigFish < m_iMaxBigFish[_local7]) {
_local6 = 3;
} else if (m_NumMediumFish < m_iMaxMediumFish[_local7]) {
_local6 = 2;
} else if (m_NumSmallFish < m_iMaxSmallFish[_local7]) {
_local6 = 1;
}
if (_local6 < 1) {
return(undefined);
}
var _local16 = false;
if (_local6 == 1) {
var _local20 = "smallFish";
if (_global.randRange(0, 99) <= m_BonusFishProbability) {
_local20 = "goldFish";
_local16 = true;
}
var _local10 = 0;
var _local13 = 1;
if (_global.randRange(0, 99) <= m_FishFlightProbability) {
_local17 = true;
}
} else if (_local6 == 2) {
var _local20 = "mediumFish";
var _local10 = 2;
var _local13 = 1;
} else if (_local6 == 3) {
var _local20 = "bigFish";
var _local10 = 4;
var _local13 = 1;
} else {
var _local20 = "sharkFish";
var _local10 = 6;
var _local13 = 1;
}
AddFish(_local20, _local10, _local13, 0, 0);
var _local8 = m_cFish.length - 1;
var _local19 = m_cFish[_local8].getFishWidth();
var _local18 = m_cFish[_local8].getFishHeight();
if (_local3 == 1) {
_local5 = _global.borderLeft - ((_local19 / 2) + 10);
} else if (_local3 == 2) {
_local5 = _global.borderRight + ((_local19 / 2) + 10);
} else if (_local3 == 3) {
_local4 = _global.borderUp - ((_local18 / 2) + 10);
} else if (_local3 == 4) {
_local4 = _global.borderDown + ((_local18 / 2) + 10);
}
m_cFish[_local8].setPos(_local5, _local4);
var _local14 = (_global.borderRight - _global.borderLeft) / 2;
var _local11 = (_global.borderDown + _global.borderUp) / 2;
m_cFish[_local8].setDir(_local14 - _local5, _local11 - _local4);
if (_local16) {
m_cFish[_local8].m_foodQuality = 5;
m_cFish[_local8].m_fishScore = 50;
}
if (_local17) {
AddFish("smallFish", _local10, _local13, 0, 0);
AddFish("smallFish", _local10, _local13, 0, 0);
var _local15 = m_cFish.length - 1;
var _local12 = m_cFish.length - 2;
m_cFish[_local15].setDir(_local14 - _local5, _local11 - _local4);
m_cFish[_local12].setDir(_local14 - _local5, _local11 - _local4);
m_cFish[_local15].setPos(_local5 - 30, _local4 - 24);
m_cFish[_local12].setPos(_local5 - 30, _local4 + 24);
m_cFish[_local8].SetAIMode(1);
m_cFish[_local15].SetAIMode(1);
m_cFish[_local12].SetAIMode(1);
}
}
function GenerateFish_BonusLevel() {
if (m_NumFishAtBonusLevel <= 0) {
return(undefined);
}
m_timeToAddFish--;
if (m_timeToAddFish > 0) {
return(undefined);
}
m_timeToAddFish = 10;
var _local3 = m_lastBorderIndex;
while (_local3 == m_lastBorderIndex) {
_local3 = _global.randRange(1, 3);
}
m_lastBorderIndex = _local3;
var _local6 = 0;
var _local5 = 0;
if ((_local3 == 1) || (_local3 == 2)) {
_local5 = _global.randRange(_global.borderUp, _global.borderDown);
} else {
_local6 = _global.randRange(_global.borderLeft, _global.borderRight);
}
var _local9 = "goldFish";
var _local10 = 0;
var _local12 = 1;
AddFish(_local9, _local10, _local12, 0, 0);
var _local4 = m_cFish.length - 1;
var _local8 = m_cFish[_local4].getFishWidth();
var _local7 = m_cFish[_local4].getFishHeight();
if (_local3 == 1) {
_local6 = _global.borderLeft - ((_local8 / 2) + 10);
} else if (_local3 == 2) {
_local6 = _global.borderRight + ((_local8 / 2) + 10);
} else if (_local3 == 3) {
_local5 = _global.borderUp - ((_local7 / 2) + 10);
} else if (_local3 == 4) {
_local5 = _global.borderDown + ((_local7 / 2) + 10);
}
m_cFish[_local4].setPos(_local6, _local5);
var _local13 = (_global.borderRight - _global.borderLeft) / 2;
var _local11 = (_global.borderDown + _global.borderUp) / 2;
m_cFish[_local4].setDir(_local13 - _local6, _local11 - _local5);
m_cFish[_local4].m_foodQuality = 0;
m_cFish[_local4].m_fishScore = 50;
m_cFish[_local4].m_attackRadius = 100;
m_cFish[_local4].m_minSpeed = 4;
m_cFish[_local4].m_maxSpeed = 8;
m_cFish[_local4].m_Speed = (m_cFish[_local4].m_NeedSpeed = _global.randRange(m_cFish[_local4].m_minSpeed, m_cFish[_local4].m_maxSpeed));
m_NumFishAtBonusLevel--;
}
function GenerateMine() {
if (m_bIsMineOnLevel == false) {
return(undefined);
}
m_timeToAddMine--;
if (m_timeToAddMine > 0) {
return(undefined);
}
var _local3 = _global.randRange(0, _global.borderRight - 100);
AddMine("mine", _local3, -300);
m_mineInPack--;
if (m_mineInPack == 0) {
m_timeToAddMine = _global.randRange(m_timeBetweenMinePack_Min, m_timeBetweenMinePack_Max);
m_mineInPack = _global.randRange(m_mineInPack_Min, m_mineInPack_Max);
} else {
m_timeToAddMine = _global.randRange(m_timeForMineInPack_Min, m_timeForMineInPack_Max);
}
}
function GenerateMedusa() {
if (m_bIsMedusaOnLevel == false) {
return(undefined);
}
m_timeToAddMedusa--;
if (m_timeToAddMedusa > 0) {
return(undefined);
}
var _local3 = _global.randRange(0, _global.borderRight);
AddMedusa("medusa", _local3, _global.borderDown + 50);
m_medusaInPack--;
if (m_medusaInPack == 0) {
m_timeToAddMedusa = _global.randRange(m_timeBetweenMedusaPack_Min, m_timeBetweenMedusaPack_Max);
m_medusaInPack = _global.randRange(m_medusaInPack_Min, m_medusaInPack_Max);
} else {
m_timeToAddMedusa = _global.randRange(m_timeForMedusaInPack_Min, m_timeForMedusaInPack_Max);
}
}
function SetLevelParam(level_index) {
m_timeToAddFish = 24;
m_iMaxSmallFish = new Array();
m_iMaxMediumFish = new Array();
m_iMaxBigFish = new Array();
m_iMaxGiantFish = new Array();
m_iMaxTotal = new Array();
_root.game_gui.gui_time._visible = false;
m_levelType = 0;
m_NeedShowWindowBeforeBonusLevel = true;
m_MaxNumFishAtBonusLevel = 35;
m_TimeAtBonusLevel = 59;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
m_BonusFishProbability = 10;
m_iNumMalusks = 0;
m_bIsMineOnLevel = false;
m_timeBetweenMinePack_Min = 72;
m_timeBetweenMinePack_Max = 200;
m_mineInPack_Min = 1;
m_mineInPack_Max = 3;
m_timeForMineInPack_Min = 24;
m_timeForMineInPack_Max = 48;
m_timeToAddMine = _global.randRange(m_timeBetweenMinePack_Min, m_timeBetweenMinePack_Max);
m_mineInPack = _global.randRange(m_mineInPack_Min, m_mineInPack_Max);
m_bIsMedusaOnLevel = false;
m_timeBetweenMedusaPack_Min = 72;
m_timeBetweenMedusaPack_Max = 200;
m_medusaInPack_Min = 1;
m_medusaInPack_Max = 3;
m_timeForMedusaInPack_Min = 24;
m_timeForMedusaInPack_Max = 48;
m_timeToAddMedusa = _global.randRange(m_timeBetweenMedusaPack_Min, m_timeBetweenMedusaPack_Max);
m_medusaInPack = _global.randRange(m_medusaInPack_Min, m_medusaInPack_Max);
m_bIsDirectAttackShark = false;
m_bIsAttackFromLeft = true;
m_bIsShowDangerSymbol = false;
m_timeToDirectShark_Min = 100;
m_timeToDirectShark_Max = 240;
m_timeToDirectAttackShark = _global.randRange(m_timeToDirectShark_Min, m_timeToDirectShark_Max);
_root.game_gui.bonus_stats._visible = false;
_root.game_gui.general_stats._visible = false;
_root.game_gui.danger_symbol._visible = false;
if (level_index == 1) {
m_iMaxSmallFish[0] = 10;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 7;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 0;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 7;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 0;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
m_BonusFishProbability = 10;
} else if (level_index == 2) {
m_iMaxSmallFish[0] = 10;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 7;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 1;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 4;
m_iMaxBigFish[2] = 1;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 3) {
m_bIsDirectAttackShark = true;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 9;
m_iMaxMediumFish[1] = 2;
m_iMaxBigFish[1] = 0;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 4;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 4) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 20;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
} else if (level_index == 5) {
m_iNumMalusks = 1;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 1;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 4;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 6) {
m_bIsMineOnLevel = true;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 4;
m_iMaxBigFish[1] = 0;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 15;
m_iMaxMediumFish[2] = 4;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 7) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 25;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
} else if (level_index == 8) {
m_bIsMedusaOnLevel = true;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 1;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 7;
m_iMaxBigFish[1] = 1;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 20;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 4;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 9) {
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 2;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 7;
m_iMaxBigFish[1] = 2;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 20;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 4;
m_iMaxGiantFish[2] = 1;
} else if (level_index == 10) {
m_iNumMalusks = 2;
m_iMaxSmallFish[0] = 17;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 2;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 11) {
m_iMaxSmallFish[0] = 7;
m_iMaxMediumFish[0] = 2;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 7;
m_iMaxMediumFish[1] = 2;
m_iMaxBigFish[1] = 2;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 7;
m_iMaxMediumFish[2] = 2;
m_iMaxBigFish[2] = 2;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 12) {
m_iNumMalusks = 2;
m_iMaxSmallFish[0] = 10;
m_iMaxMediumFish[0] = 2;
m_iMaxBigFish[0] = 1;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 2;
m_iMaxBigFish[2] = 2;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 13) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 25;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
} else if (level_index == 14) {
m_bIsMineOnLevel = true;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 12;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 12;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 15) {
m_bIsMedusaOnLevel = true;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 0;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 12;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 12;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 16) {
m_iNumMalusks = 3;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 2;
m_iMaxBigFish[0] = 1;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 12;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 4;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 12;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else if (level_index == 17) {
m_iNumMalusks = 1;
m_bIsDirectAttackShark = true;
m_iMaxSmallFish[0] = 10;
m_iMaxMediumFish[0] = 1;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 12;
m_iMaxMediumFish[1] = 3;
m_iMaxBigFish[1] = 4;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 12;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 0;
m_FishFlightProbability = 20;
} else if (level_index == 18) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 30;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
} else if (level_index == 19) {
m_bIsMedusaOnLevel = true;
m_iMaxSmallFish[0] = 7;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 0;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 7;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 20) {
m_bIsMineOnLevel = true;
m_iMaxSmallFish[0] = 7;
m_iMaxMediumFish[0] = 2;
m_iMaxBigFish[0] = 1;
m_iMaxGiantFish[0] = 1;
m_iMaxSmallFish[1] = 7;
m_iMaxMediumFish[1] = 2;
m_iMaxBigFish[1] = 0;
m_iMaxGiantFish[1] = 2;
m_iMaxSmallFish[2] = 7;
m_iMaxMediumFish[2] = 2;
m_iMaxBigFish[2] = 1;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else if (level_index == 21) {
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 5;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 7;
m_iMaxBigFish[2] = 6;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 22) {
m_iNumMalusks = 3;
m_iMaxSmallFish[0] = 15;
m_iMaxMediumFish[0] = 4;
m_iMaxBigFish[0] = 0;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 10;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 2;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 23) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 30;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
} else if (level_index == 24) {
m_bIsMedusaOnLevel = true;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 4;
m_iMaxBigFish[0] = 1;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 5;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else if (level_index == 25) {
m_bIsDirectAttackShark = true;
m_iNumMalusks = 2;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 4;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 5;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else if (level_index == 26) {
m_bIsMineOnLevel = true;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 4;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 7;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 10;
m_iMaxMediumFish[2] = 8;
m_iMaxBigFish[2] = 5;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else if (level_index == 27) {
m_bIsMedusaOnLevel = true;
m_iNumMalusks = 2;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 1;
m_iMaxGiantFish[0] = 0;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 7;
m_iMaxBigFish[1] = 2;
m_iMaxGiantFish[1] = 0;
m_iMaxSmallFish[2] = 15;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 4;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 28) {
m_bIsMineOnLevel = true;
m_bIsMedusaOnLevel = true;
m_iMaxSmallFish[0] = 20;
m_iMaxMediumFish[0] = 4;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 1;
m_iMaxSmallFish[1] = 15;
m_iMaxMediumFish[1] = 7;
m_iMaxBigFish[1] = 5;
m_iMaxGiantFish[1] = 1;
m_iMaxSmallFish[2] = 15;
m_iMaxMediumFish[2] = 5;
m_iMaxBigFish[2] = 4;
m_iMaxGiantFish[2] = 1;
m_FishFlightProbability = 20;
} else if (level_index == 29) {
m_levelType = 1;
m_MaxNumFishAtBonusLevel = 35;
m_NumFishAtBonusLevel = m_MaxNumFishAtBonusLevel;
m_FishFlightProbability = 20;
} else if (level_index == 30) {
m_bIsMineOnLevel = true;
m_bIsMedusaOnLevel = true;
m_iNumMalusks = 3;
m_iMaxSmallFish[0] = 50;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 1;
m_iMaxSmallFish[1] = 30;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 2;
m_iMaxSmallFish[2] = 50;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
} else {
m_iMaxSmallFish[0] = 50;
m_iMaxMediumFish[0] = 3;
m_iMaxBigFish[0] = 2;
m_iMaxGiantFish[0] = 1;
m_iMaxSmallFish[1] = 30;
m_iMaxMediumFish[1] = 5;
m_iMaxBigFish[1] = 3;
m_iMaxGiantFish[1] = 2;
m_iMaxSmallFish[2] = 50;
m_iMaxMediumFish[2] = 3;
m_iMaxBigFish[2] = 3;
m_iMaxGiantFish[2] = 2;
m_FishFlightProbability = 20;
}
m_iMaxTotal[0] = ((m_iMaxSmallFish[0] + m_iMaxMediumFish[0]) + m_iMaxBigFish[0]) + m_iMaxGiantFish[0];
m_iMaxTotal[1] = ((m_iMaxSmallFish[1] + m_iMaxMediumFish[1]) + m_iMaxBigFish[1]) + m_iMaxGiantFish[1];
m_iMaxTotal[2] = ((m_iMaxSmallFish[2] + m_iMaxMediumFish[2]) + m_iMaxBigFish[2]) + m_iMaxGiantFish[2];
trace("set level " + level_index);
}
function GUI_SetLives() {
}
function GUI_SetScore() {
_root.game_gui.gui_topstring.tfScore.text = _global.total_score + _global.tmp_score;
}
function GUI_SetGrowProgress(c_g, g1, g2, g3) {
_root.game_gui.gui_topstring.grow_process._xscale = c_g;
}
}
Symbol 1007 MovieClip [__Packages.cMalusk] Frame 0
class cMalusk
{
var m_mcObj, m_realX, m_realY, m_angle, m_pearlW, m_pearlH, m_pearlX, m_pearlY, m_bodyW, m_bodyH, m_bodyX, m_bodyY, m_bIsOpen, m_bIsHavePearl, m_timeToChange, m_timeInMode, m_bodyClip, m_pearlClip;
function cMalusk (clip) {
m_mcObj = clip;
m_realX = 0;
m_realY = 0;
m_angle = 0;
}
function InitMalusk(pos_x, pos_y) {
m_realX = pos_x;
m_realY = pos_y;
m_pearlW = 28;
m_pearlH = 28;
m_pearlX = 52;
m_pearlY = 60;
m_bodyW = 80;
m_bodyH = 40;
m_bodyX = 50;
m_bodyY = 60;
CreateDebugClips();
setClipParam();
var _local3 = _global.randRange(1, 100);
if (_local3 <= 50) {
m_bIsOpen = false;
m_mcObj.gotoAndStop("closed");
} else {
m_bIsOpen = true;
m_mcObj.gotoAndStop("open");
}
m_bIsHavePearl = true;
m_mcObj.pearl_img._visible = true;
m_timeToChange = _global.randRange(30, 100);
}
function onThink() {
m_timeInMode++;
setClipParam();
m_mcObj.pearl_img._visible = false;
if (m_bIsHavePearl) {
m_mcObj.pearl_img._visible = true;
}
if ((m_bIsOpen == false) && (m_timeInMode > 15)) {
m_bIsHavePearl = true;
}
if (m_timeInMode >= m_timeToChange) {
changeMode();
}
}
function changeMode() {
m_timeInMode = 0;
m_timeToChange = _global.randRange(30, 100);
m_bIsOpen = !m_bIsOpen;
if (m_bIsOpen) {
m_mcObj.gotoAndPlay("opening");
} else {
m_mcObj.gotoAndPlay("closing");
}
}
function setClipParam() {
if (!m_mcObj) {
return(undefined);
}
m_mcObj._x = m_realX - _global.cameraX;
m_mcObj._y = m_realY - _global.cameraY;
m_mcObj._rotation = m_angle;
}
function CreateDebugClips() {
m_bodyClip = m_mcObj.createEmptyMovieClip("body_mc", m_mcObj.getNextHighestDepth());
m_bodyClip.beginFill(65280, 70);
m_bodyClip.moveTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, (-m_bodyH) / 2);
m_bodyClip.lineTo(m_bodyW / 2, m_bodyH / 2);
m_bodyClip.lineTo((-m_bodyW) / 2, m_bodyH / 2);
m_bodyClip.endFill();
m_bodyClip._x = m_bodyX;
m_bodyClip._y = m_bodyY;
m_pearlClip = m_mcObj.createEmptyMovieClip("pearl_mc", m_mcObj.getNextHighestDepth());
m_pearlClip.beginFill(16711680, 30);
m_pearlClip.moveTo((-m_pearlW) / 2, (-m_pearlH) / 2);
m_pearlClip.lineTo((-m_pearlW) / 2, (-m_pearlH) / 2);
m_pearlClip.lineTo(m_pearlW / 2, (-m_pearlH) / 2);
m_pearlClip.lineTo(m_pearlW / 2, m_pearlH / 2);
m_pearlClip.lineTo((-m_pearlW) / 2, m_pearlH / 2);
m_pearlClip.endFill();
m_pearlClip._x = m_pearlX;
m_pearlClip._y = m_pearlY;
m_pearlClip._visible = false;
m_bodyClip._visible = false;
}
function onPrepareToDelete() {
deleteClip();
}
function deleteClip() {
if (m_pearlClip) {
m_pearlClip.removeMovieClip();
m_pearlClip = null;
}
if (m_bodyClip) {
m_bodyClip.removeMovieClip();
m_bodyClip = null;
}
if (!m_mcObj) {
return(undefined);
}
m_mcObj.removeMovieClip();
m_mcObj = null;
}
}
Symbol 1008 MovieClip [__Packages.cDeadFish] Frame 0
class cDeadFish extends MovieClip
{
var m_realX, m_realY, m_angle, _totalframes, _currentframe, _x, _y, _rotation, removeMovieClip;
function cDeadFish (pos_x, pos_y) {
super();
m_realX = pos_x;
m_realY = pos_y;
m_angle = 0;
}
function onEnterFrame() {
setClipParam();
if (_currentframe == _totalframes) {
deleteClip();
}
}
function setClipParam() {
_x = m_realX - _global.cameraX;
_y = m_realY - _global.cameraY;
_rotation = m_angle;
}
function deleteClip() {
removeMovieClip();
}
}
Symbol 390 MovieClip Frame 12
stop();
Symbol 453 MovieClip [Player] Frame 9
gotoAndPlay ("swim_1");
Symbol 453 MovieClip [Player] Frame 29
gotoAndPlay ("swim_2");
Symbol 453 MovieClip [Player] Frame 50
gotoAndPlay ("swim_3");
Symbol 559 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 3
gotoAndStop (1);
Symbol 559 MovieClip Frame 10
gotoAndStop (1);
Symbol 570 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 3
gotoAndStop (1);
Symbol 570 MovieClip Frame 5
gotoAndStop (1);
Symbol 570 MovieClip Frame 7
gotoAndStop (1);
Symbol 570 MovieClip Frame 9
gotoAndStop (1);
Symbol 570 MovieClip Frame 11
gotoAndStop (1);
Symbol 570 MovieClip Frame 13
gotoAndStop (1);
Symbol 570 MovieClip Frame 15
gotoAndStop (1);
Symbol 570 MovieClip Frame 17
gotoAndStop (1);
Symbol 570 MovieClip Frame 19
gotoAndStop (1);
Symbol 570 MovieClip Frame 21
gotoAndStop (1);
Symbol 577 MovieClip Frame 1
var mal_base;
mal_base = Math.floor(Math.random() * 2) + 1;
gotoAndStop(mal_base);
Symbol 646 MovieClip [maluskFish] Frame 25
stop();
Symbol 646 MovieClip [maluskFish] Frame 36
stop();
Symbol 650 MovieClip [dieFish_1] Frame 1
#initclip 15
Object.registerClass("dieFish_1", cDeadFish);
#endinitclip
Symbol 650 MovieClip [dieFish_1] Frame 13
stop();
Symbol 654 MovieClip [dieFish_2] Frame 1
#initclip 10
Object.registerClass("dieFish_2", cDeadFish);
#endinitclip
Symbol 654 MovieClip [dieFish_2] Frame 13
stop();
Symbol 658 MovieClip [dieFish_3] Frame 1
#initclip 11
Object.registerClass("dieFish_3", cDeadFish);
#endinitclip
Symbol 658 MovieClip [dieFish_3] Frame 13
stop();
Symbol 662 MovieClip [dieFish_4] Frame 1
#initclip 12
Object.registerClass("dieFish_4", cDeadFish);
#endinitclip
Symbol 662 MovieClip [dieFish_4] Frame 13
stop();
Symbol 666 MovieClip [dieFish_5] Frame 1
#initclip 13
Object.registerClass("dieFish_5", cDeadFish);
#endinitclip
Symbol 666 MovieClip [dieFish_5] Frame 13
stop();
Symbol 672 MovieClip Frame 21
stop();
Symbol 699 MovieClip Frame 12
stop();
Symbol 704 MovieClip Frame 66
stop();
Symbol 709 MovieClip Frame 61
stop();
Symbol 714 MovieClip Frame 51
stop();
Symbol 719 MovieClip Frame 41
stop();
Symbol 720 MovieClip Frame 1
var bouble_num;
bouble_num = Math.floor(Math.random() * 14) + 1;
gotoAndStop(bouble_num);
Symbol 721 MovieClip [mineExp] Frame 1
#initclip 14
Object.registerClass("mineExp", cDeadFish);
#endinitclip
Symbol 721 MovieClip [mineExp] Frame 51
gotoAndPlay (1);
Symbol 884 Button
on (press) {
gotoAndStop (2);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 889 Button
on (press) {
gotoAndStop (2);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 894 Button
on (press) {
_global.openSite();
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 896 Button
on (press) {
this._parent.soundOff();
this.gotoAndStop(2);
}
Symbol 898 Button
on (press) {
this._parent.soundOn();
this.gotoAndStop(1);
}
Symbol 899 MovieClip Frame 1
this.stop();
trace(_root.mcMusic);
_root.mcMusic.gotoAndPlay("start_1");
_global.enableSound(true);
Symbol 899 MovieClip Frame 2
this.stop();
_root.mcMusic.gotoAndPlay("stop_1");
_global.enableSound(false);
Symbol 909 Button
on (press) {
_global.startNewGame();
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 910 Button
on (press) {
_parent.gotoAndStop(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 911 MovieClip Frame 12
stop();
Symbol 912 MovieClip Frame 1
stop();
Instance of Symbol 899 MovieClip in Symbol 912 MovieClip Frame 1
onClipEvent (load) {
if (!_global.soundOn) {
gotoAndStop (2);
}
}
Symbol 912 MovieClip Frame 2
stop();
Instance of Symbol 87 MovieClip in Symbol 913 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 913 MovieClip Frame 50
stop();
Symbol 916 MovieClip Frame 66
stop();
Symbol 919 MovieClip Frame 61
stop();
Symbol 922 MovieClip Frame 51
stop();
Symbol 925 MovieClip Frame 41
stop();
Symbol 926 MovieClip Frame 1
var bouble_num;
bouble_num = Math.floor(Math.random() * 14) + 1;
gotoAndStop(bouble_num);
Symbol 940 Button
on (press) {
_global.openSite();
}
Symbol 956 Button
on (press) {
_root.mcAction.SetGameMode(0);
_root.game_gui.gui_pause.gotoAndPlay("move_out");
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 957 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
_root.game_gui.gui_pause.gotoAndPlay("move_out");
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 958 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 13
stop();
Symbol 958 MovieClip Frame 22
stop();
Symbol 962 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 963 MovieClip Frame 1
stop();
Symbol 963 MovieClip Frame 13
stop();
Symbol 971 Button
on (press) {
_root.mcAction.SetGameMode(7);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 972 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 973 MovieClip Frame 1
stop();
Symbol 973 MovieClip Frame 13
stop();
Symbol 976 MovieClip Frame 1
stop();
Symbol 976 MovieClip Frame 13
stop();
Symbol 979 Button
on (press) {
_root.mcAction.SetGameMode(0);
_root.game_gui.gui_bonuswindow.gotoAndPlay("move_out");
}
Symbol 980 MovieClip Frame 1
stop();
Symbol 980 MovieClip Frame 13
stop();
Symbol 980 MovieClip Frame 22
stop();
Symbol 983 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 984 MovieClip Frame 1
stop();
Symbol 984 MovieClip Frame 13
stop();
Symbol 992 MovieClip Frame 1
stop();
Symbol 992 MovieClip Frame 30
stop();
Symbol 998 MovieClip Frame 1
stop();
Symbol 998 MovieClip Frame 30
stop();
Symbol 1001 MovieClip Frame 1
stop();