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 = 1080;
_global.borderUp = -270;
_global.borderDown = 540;
_global.cameraX = 0;
_global.cameraY = 0;
_global.cameraSizeX = 720;
_global.cameraSizeY = 540;
_global.mousePreX = (_global.mousePreY = 0);
_global.numberLevelsOpened = 1;
_global.use_playtomic = true;
Playtomic.Log.View(940100, "8f591191533f480d", _root._url);
_global.openSite = function (link_name, link_group) {
var _local2 = "http://www.freegamesdownload.com/stats/fish-tales-2.html";
trace("Open URL: " + _local2);
if (_global.use_playtomic) {
_global.openSitePlaytomic(_local2, link_name, link_group);
} else {
getURL (_local2, "_blank");
}
};
_global.openSitePlaytomic = function (url_string, link_name, link_group) {
var _local1 = Playtomic.Link.Open(url_string, link_name, link_group);
if (!_local1) {
trace("can't open url " + url_string);
}
};
_global.saveLevelsOpened = function () {
var _local2 = SharedObject.getLocal("FishTalesND", "/");
if ((_local2.data.numberOpened < _global.numberLevelsOpened) || (_local2.data.numberOpened == undefined)) {
_local2.data.numberOpened = _global.numberLevelsOpened;
_local2.flush();
}
};
_global.loadLevelsOpened = function () {
var _local1 = SharedObject.getLocal("FishTalesND", "/");
if ((_local1.data.numberOpened == undefined) || (_local1.data.numberOpened < 1)) {
_local1.data.numberOpened = 1;
_local1.flush();
}
return(_local1.data.numberOpened);
};
_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 105 MovieClip "status_mc" in Frame 2
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
t = _root.getBytesTotal();
l = _root.getBytesLoaded();
gotoAndStop(Math.floor((l / t) * 100));
tf.text = Math.floor((l / t) * 100) + "%";
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 111 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)) {
this._alpha = this._alpha - _root.loaderAnimDelta;
if (_alpha < 0) {
_root.gotoAndStop("menu");
}
}
}
Instance of Symbol 581 MovieClip in Frame 4
/* no clip actions */
Frame 5
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("544ddbff", this, 10301, true);
stop();
Instance of Symbol 581 MovieClip "sounds" in Frame 5
/* no clip actions */
Frame 6
stop();
Frame 7
stop();
Symbol 2 MovieClip [mcAction] Frame 1
#initclip 12
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 30 Button
on (press) {
openSite("Map", "Site");
}
Symbol 89 MovieClip [map] Frame 1
#initclip 10
Object.registerClass("map", cCoreMap);
#endinitclip
stop();
Symbol 89 MovieClip [map] Frame 2
stop();
Symbol 89 MovieClip [map] Frame 3
stop();
Symbol 89 MovieClip [map] Frame 4
stop();
Symbol 89 MovieClip [map] Frame 5
stop();
Symbol 89 MovieClip [map] Frame 6
stop();
Symbol 89 MovieClip [map] Frame 7
stop();
Symbol 89 MovieClip [map] Frame 8
stop();
Symbol 89 MovieClip [map] Frame 9
stop();
Symbol 89 MovieClip [map] Frame 10
stop();
Symbol 89 MovieClip [map] Frame 11
stop();
Symbol 89 MovieClip [map] Frame 12
stop();
Symbol 89 MovieClip [map] Frame 13
stop();
Symbol 89 MovieClip [map] Frame 14
stop();
Symbol 89 MovieClip [map] Frame 15
stop();
Symbol 89 MovieClip [map] Frame 16
stop();
Symbol 89 MovieClip [map] Frame 17
stop();
Symbol 89 MovieClip [map] Frame 18
stop();
Symbol 89 MovieClip [map] Frame 19
stop();
Symbol 89 MovieClip [map] Frame 20
stop();
Symbol 89 MovieClip [map] Frame 21
stop();
Symbol 89 MovieClip [map] Frame 22
stop();
Symbol 89 MovieClip [map] Frame 23
stop();
Symbol 89 MovieClip [map] Frame 24
stop();
Symbol 89 MovieClip [map] Frame 25
stop();
Symbol 89 MovieClip [map] Frame 26
stop();
Symbol 89 MovieClip [map] Frame 27
stop();
Symbol 89 MovieClip [map] Frame 28
stop();
Symbol 89 MovieClip [map] Frame 29
stop();
Symbol 89 MovieClip [map] Frame 30
stop();
Symbol 90 MovieClip [mcAction_Menu] Frame 1
#initclip 11
Object.registerClass("mcAction_Menu", cCoreMenu);
#endinitclip
Symbol 96 MovieClip Frame 1
stop();
Instance of Symbol 93 MovieClip in Symbol 96 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1173 MovieClip [__Packages.Playtomic.LogRequest] Frame 0
class Playtomic.LogRequest
{
var Pieces;
function LogRequest () {
}
function Queue(data) {
Pieces++;
Data = Data + (((Data == "") ? "" : "~") + data);
if ((Pieces == 8) || (Data.length > 300)) {
Pieces = 0;
Ready = true;
}
}
function Send() {
var _local3 = function (success) {
if ((this.Data.indexOf("v/") == 0) || (this.Data.indexOf("~v/") > -1)) {
Playtomic.Log.IncreaseViews();
}
if ((this.Data.indexOf("p/") == 0) || (this.Data.indexOf("~p/") > -1)) {
Playtomic.Log.IncreasePlays();
}
};
var _local2 = new LoadVars();
_local2.sendAndLoad(((((((((("http://g" + Playtomic.Log.GUID) + ".api.playtomic.com/Tracker/q.aspx?swfid=") + Playtomic.Log.SWFID) + "&q=") + Data) + "&url=") + Playtomic.Log.SourceUrl) + "&") + Math.random()) + "z", _local3, "POST");
}
var Data = "";
var Ready = false;
}
Symbol 1174 MovieClip [__Packages.Playtomic.Log] Frame 0
class Playtomic.Log
{
static var SourceUrl, Cookie;
function Log () {
}
static function View(swfid, guid, defaulturl) {
if (swfid == undefined) {
swfid = 0;
}
if (guid == undefined) {
guid = "";
}
if (defaulturl == undefined) {
defaulturl = "";
}
if (SWFID > 0) {
return(undefined);
}
SWFID = swfid;
GUID = guid;
Enabled = true;
if ((SWFID == 0) || (GUID == "")) {
Enabled = false;
return(undefined);
}
if (((defaulturl.indexOf("http://") != 0) && (System.security.sandboxType != "localWithNetwork")) && (System.security.sandboxType != "localTrusted")) {
Enabled = false;
return(undefined);
}
SourceUrl = GetUrl(defaulturl);
if (((SourceUrl == null) || (SourceUrl == "")) || (SourceUrl.indexOf("https://") == 0)) {
Enabled = false;
return(undefined);
}
Cookie = SharedObject.getLocal("playtomic");
var _local5 = GetCookie("views");
Send("v/" + (_local5 + 1), true);
_global.setTimeout(PingServer, 60000);
}
static function ForceSend() {
Request.Send();
Request = new Playtomic.LogRequest();
}
static function IncreaseViews() {
var _local1 = GetCookie("views");
_local1++;
SaveCookie("views", _local1);
}
static function IncreasePlays() {
Plays++;
}
static function Play() {
if (!Enabled) {
return(undefined);
}
LevelCounters = new Array();
LevelAverages = new Array();
LevelRangeds = new Array();
Send("p/" + (Plays + 1), true);
}
static function CustomMetric(name, group, unique) {
if (!Enabled) {
return(undefined);
}
if ((group == null) || (group == undefined)) {
group = "";
}
if ((unique == null) || (unique == undefined)) {
unique = false;
}
if (unique) {
if (Customs.indexOf(name) > -1) {
return(undefined);
}
Customs.push(name);
}
Send((("c/" + Clean(name)) + "/") + Clean(group));
}
static function Link(url, name, group, unique, total, fail) {
if (!Enabled) {
return(undefined);
}
Send((((((((((("l/" + Clean(name)) + "/") + Clean(group)) + "/") + Clean(url)) + "/") + unique) + "/") + total) + "/") + fail);
}
static function LevelCounterMetric(name, level, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelCounters.indexOf(name) > -1) {
return(undefined);
}
LevelCounters.push(name);
}
Send((("lc/" + Clean(name)) + "/") + Clean(level));
}
static function LevelRangedMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelRangeds.indexOf(name) > -1) {
return(undefined);
}
LevelRangeds.push(name);
SaveCookie("lr_" + name, 1);
}
Send((((("lr/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function LevelAverageMetric(name, level, value, unique) {
if (!Enabled) {
return(undefined);
}
if (unique) {
if (LevelAverages.indexOf(name) > -1) {
return(undefined);
}
LevelAverages.push(name);
}
Send((((("la/" + Clean(name)) + "/") + Clean(level)) + "/") + value);
}
static function PingServer() {
if (!Enabled) {
return(undefined);
}
Pings++;
Send((("t/" + (FirstPing ? "y" : "n")) + "/") + Pings, true);
if (FirstPing) {
FirstPing = false;
setInterval(PingServer, 60000);
}
}
static function Send(s, view) {
if (view == undefined) {
view = false;
}
Request.Queue(s);
if ((Request.Ready || (view)) || (!Queue)) {
Request.Send();
Request = new Playtomic.LogRequest();
}
}
static function GetCookie(n) {
if (Cookie.data[n] == undefined) {
return(0);
}
return(parseInt(Cookie.data[n]));
}
static function SaveCookie(n, v) {
var _local1 = SharedObject.getLocal("swfstats");
_local1.data[n] = v.toString();
_local1.flush();
}
static function Clean(s) {
while (s.indexOf("/") > -1) {
s = s.replace("/", "\\");
}
while (s.indexOf("~") > -1) {
s = s.replace("~", "-");
}
return(escape(s));
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static function GetUrl(defaulturl) {
return(defaulturl);
}
static var Enabled = false;
static var Queue = true;
static var SWFID = 0;
static var GUID = "";
static var Request = new Playtomic.LogRequest();
static var FirstPing = true;
static var Pings = 0;
static var Plays = 0;
static var HighestGoal = 0;
static var Customs = new Array();
static var LevelCounters = new Array();
static var LevelAverages = new Array();
static var LevelRangeds = new Array();
}
Symbol 1175 MovieClip [__Packages.Playtomic.Link] Frame 0
class Playtomic.Link
{
function Link () {
}
static function Open(url, name, group) {
var _local9 = 0;
var _local5 = 0;
var _local3 = 0;
var _local4 = 0;
var _local8 = 0;
var _local11 = 0;
var _local6 = (url + ".") + name;
var _local7;
var _local1 = url;
_local1 = Replace(_local1, "http://", "");
if (_local1.indexOf("/") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("/"));
}
if (_local1.indexOf("?") > -1) {
_local1 = _local1.substring(0, _local1.indexOf("?"));
}
_local1 = ("http://" + _local1) + "/";
var _local2 = _local1;
if (_local2.indexOf("//") > -1) {
_local2 = _local2.substring(_local2.indexOf("//") + 2);
}
_local2 = Replace(_local2, "www.", "");
if (_local2.indexOf("/") > -1) {
_local2 = _local2.substring(0, _local2.indexOf("/"));
}
try {
getURL (url, "_blank");
if (Clicks.indexOf(_local6) > -1) {
_local3 = 1;
} else {
_local3 = 1;
_local9 = 1;
Clicks.push(_local6);
}
if (Clicks.indexOf(_local2) > -1) {
_local4 = 1;
} else {
_local4 = 1;
_local5 = 1;
Clicks.push(_local2);
}
_local7 = true;
} catch(err) {
_local8 = 1;
_local11 = 1;
_local7 = false;
}
Playtomic.Log.Link(_local1, _local2.toLowerCase(), "DomainTotals", _local5, _local4, _local11);
Playtomic.Log.Link(url, name, group, _local9, _local3, _local8);
Playtomic.Log.ForceSend();
return(_local7);
}
static function Replace(str, find, replace) {
return(str.split(find).join(replace));
}
static var Clicks = new Array();
}
Symbol 1176 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 1177 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 1178 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 1179 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);
}
if (_global.use_playtomic) {
trace(("Win level " + _global.current_level) + "; Playtomic stat was updated!");
Playtomic.Log.LevelCounterMetric("Completed", _global.current_level);
Playtomic.Log.ForceSend();
}
_global.numberLevelsOpened = _global.current_level;
_global.saveLevelsOpened();
} else if (new_mode == 2) {
if (_global.use_playtomic) {
trace(("Failed level " + _global.current_level) + "; Playtomic stat was updated!");
Playtomic.Log.LevelCounterMetric("Fail", _global.current_level);
Playtomic.Log.ForceSend();
}
}
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 = 680;
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 1180 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 1181 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 105 MovieClip Frame 1
stop();
Symbol 107 Button
on (release) {
_global.openSite("Loading", "Site");
}
Symbol 108 Button
on (release) {
_global.openSite("Loading", "Site");
}
Symbol 401 MovieClip Frame 12
stop();
Symbol 464 MovieClip [Player] Frame 9
gotoAndPlay ("swim_1");
Symbol 464 MovieClip [Player] Frame 29
gotoAndPlay ("swim_2");
Symbol 464 MovieClip [Player] Frame 50
gotoAndPlay ("swim_3");
Symbol 570 MovieClip Frame 1
stop();
Symbol 570 MovieClip Frame 3
gotoAndStop (1);
Symbol 570 MovieClip Frame 10
gotoAndStop (1);
Symbol 581 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 3
gotoAndStop (1);
Symbol 581 MovieClip Frame 5
gotoAndStop (1);
Symbol 581 MovieClip Frame 7
gotoAndStop (1);
Symbol 581 MovieClip Frame 9
gotoAndStop (1);
Symbol 581 MovieClip Frame 11
gotoAndStop (1);
Symbol 581 MovieClip Frame 13
gotoAndStop (1);
Symbol 581 MovieClip Frame 15
gotoAndStop (1);
Symbol 581 MovieClip Frame 17
gotoAndStop (1);
Symbol 581 MovieClip Frame 19
gotoAndStop (1);
Symbol 581 MovieClip Frame 21
gotoAndStop (1);
Symbol 588 MovieClip Frame 1
var mal_base;
mal_base = Math.floor(Math.random() * 2) + 1;
gotoAndStop(mal_base);
Symbol 657 MovieClip [maluskFish] Frame 25
stop();
Symbol 657 MovieClip [maluskFish] Frame 36
stop();
Symbol 661 MovieClip [dieFish_1] Frame 1
#initclip 18
Object.registerClass("dieFish_1", cDeadFish);
#endinitclip
Symbol 661 MovieClip [dieFish_1] Frame 13
stop();
Symbol 665 MovieClip [dieFish_2] Frame 1
#initclip 13
Object.registerClass("dieFish_2", cDeadFish);
#endinitclip
Symbol 665 MovieClip [dieFish_2] Frame 13
stop();
Symbol 669 MovieClip [dieFish_3] Frame 1
#initclip 14
Object.registerClass("dieFish_3", cDeadFish);
#endinitclip
Symbol 669 MovieClip [dieFish_3] Frame 13
stop();
Symbol 673 MovieClip [dieFish_4] Frame 1
#initclip 15
Object.registerClass("dieFish_4", cDeadFish);
#endinitclip
Symbol 673 MovieClip [dieFish_4] Frame 13
stop();
Symbol 677 MovieClip [dieFish_5] Frame 1
#initclip 16
Object.registerClass("dieFish_5", cDeadFish);
#endinitclip
Symbol 677 MovieClip [dieFish_5] Frame 13
stop();
Symbol 683 MovieClip Frame 21
stop();
Symbol 710 MovieClip Frame 12
stop();
Symbol 715 MovieClip Frame 66
stop();
Symbol 720 MovieClip Frame 61
stop();
Symbol 725 MovieClip Frame 51
stop();
Symbol 730 MovieClip Frame 41
stop();
Symbol 731 MovieClip Frame 1
var bouble_num;
bouble_num = Math.floor(Math.random() * 14) + 1;
gotoAndStop(bouble_num);
Symbol 732 MovieClip [mineExp] Frame 1
#initclip 17
Object.registerClass("mineExp", cDeadFish);
#endinitclip
Symbol 732 MovieClip [mineExp] Frame 51
gotoAndPlay (1);
Symbol 896 Button
on (press) {
gotoAndStop (2);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 901 Button
on (press) {
gotoAndStop (2);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 902 Button
on (press) {
openSite("Menu", "Site");
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 905 Button
on (press) {
this._parent.soundOff();
this.gotoAndStop(2);
}
Symbol 907 Button
on (press) {
this._parent.soundOn();
this.gotoAndStop(1);
}
Symbol 908 MovieClip Frame 1
this.stop();
trace(_root.mcMusic);
_root.mcMusic.gotoAndPlay("start_1");
_global.enableSound(true);
Symbol 908 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 914 Button
on (press) {
_parent.gotoAndStop(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 919 Button
on (press) {
Playtomic.Log.Play();
_parent.gotoAndStop(3);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 920 Button
on (press) {
openSite("Help", "Site");
}
Symbol 921 MovieClip Frame 12
stop();
Symbol 928 Button
on (press) {
_global.startNewGame();
_global.current_level = 1;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 933 Button
on (press) {
_global.startNewGame();
_global.current_level = 2;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 938 Button
on (press) {
_global.startNewGame();
_global.current_level = 3;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 943 Button
on (press) {
_global.startNewGame();
_global.current_level = 4;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 948 Button
on (press) {
_global.startNewGame();
_global.current_level = 5;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 953 Button
on (press) {
_global.startNewGame();
_global.current_level = 6;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 958 Button
on (press) {
_global.startNewGame();
_global.current_level = 7;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 963 Button
on (press) {
_global.startNewGame();
_global.current_level = 8;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 968 Button
on (press) {
_global.startNewGame();
_global.current_level = 9;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 973 Button
on (press) {
_global.startNewGame();
_global.current_level = 10;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 978 Button
on (press) {
_global.startNewGame();
_global.current_level = 11;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 983 Button
on (press) {
_global.startNewGame();
_global.current_level = 12;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 988 Button
on (press) {
_global.startNewGame();
_global.current_level = 13;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 993 Button
on (press) {
_global.startNewGame();
_global.current_level = 14;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 998 Button
on (press) {
_global.startNewGame();
_global.current_level = 15;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1003 Button
on (press) {
_global.startNewGame();
_global.current_level = 16;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1008 Button
on (press) {
_global.startNewGame();
_global.current_level = 17;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1013 Button
on (press) {
_global.startNewGame();
_global.current_level = 18;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1018 Button
on (press) {
_global.startNewGame();
_global.current_level = 19;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1023 Button
on (press) {
_global.startNewGame();
_global.current_level = 20;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1028 Button
on (press) {
_global.startNewGame();
_global.current_level = 21;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1033 Button
on (press) {
_global.startNewGame();
_global.current_level = 22;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1038 Button
on (press) {
_global.startNewGame();
_global.current_level = 23;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1043 Button
on (press) {
_global.startNewGame();
_global.current_level = 24;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1048 Button
on (press) {
_global.startNewGame();
_global.current_level = 25;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1053 Button
on (press) {
_global.startNewGame();
_global.current_level = 26;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1058 Button
on (press) {
_global.startNewGame();
_global.current_level = 27;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1063 Button
on (press) {
_global.startNewGame();
_global.current_level = 28;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1068 Button
on (press) {
_global.startNewGame();
_global.current_level = 29;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1073 Button
on (press) {
_global.startNewGame();
_global.current_level = 30;
_root.mcActionMenu.m_startFade = true;
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1074 Button
on (press) {
_parent.gotoAndStop(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1075 Button
on (press) {
openSite("LevelSelect", "Site");
}
Symbol 1077 MovieClip Frame 1
stop();
Instance of Symbol 908 MovieClip in Symbol 1077 MovieClip Frame 1
onClipEvent (load) {
if (!_global.soundOn) {
gotoAndStop (2);
}
}
Symbol 1077 MovieClip Frame 2
stop();
Symbol 1077 MovieClip Frame 3
stop();
Instance of Symbol 1076 MovieClip in Symbol 1077 MovieClip Frame 3
onClipEvent (load) {
trace("init select level screen");
_global.numberLevelsOpened = _global.loadLevelsOpened();
var opened = _global.numberLevelsOpened;
trace(opened + " levels opened");
var i = 1;
while (i <= 30) {
var clip = this["lvl" + i];
clip._visible = false;
if (i <= opened) {
clip._visible = true;
}
i++;
}
}
Instance of Symbol 93 MovieClip in Symbol 1078 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1078 MovieClip Frame 50
stop();
Symbol 1081 MovieClip Frame 66
stop();
Symbol 1084 MovieClip Frame 61
stop();
Symbol 1087 MovieClip Frame 51
stop();
Symbol 1090 MovieClip Frame 41
stop();
Symbol 1091 MovieClip Frame 1
var bouble_num;
bouble_num = Math.floor(Math.random() * 14) + 1;
gotoAndStop(bouble_num);
Symbol 1114 Button
on (press) {
_root.mcAction.SetGameMode(0);
_root.game_gui.gui_pause.gotoAndPlay("move_out");
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1115 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 1116 Button
on (press) {
openSite("Pause", "Site");
}
Symbol 1117 MovieClip Frame 1
stop();
Symbol 1117 MovieClip Frame 13
stop();
Symbol 1117 MovieClip Frame 22
stop();
Symbol 1120 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1121 Button
on (press) {
openSite("GameOver", "Site");
}
Symbol 1122 MovieClip Frame 1
stop();
Symbol 1122 MovieClip Frame 13
stop();
Symbol 1130 Button
on (press) {
_root.mcAction.SetGameMode(7);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1131 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1132 Button
on (press) {
openSite("LevelDone", "Site");
}
Symbol 1133 MovieClip Frame 1
stop();
Symbol 1133 MovieClip Frame 13
stop();
Symbol 1136 Button
on (press) {
openSite("GameDone", "Site");
}
Symbol 1137 MovieClip Frame 1
stop();
Symbol 1137 MovieClip Frame 13
stop();
Symbol 1140 Button
on (press) {
_root.mcAction.SetGameMode(0);
_root.game_gui.gui_bonuswindow.gotoAndPlay("move_out");
}
Symbol 1141 MovieClip Frame 1
stop();
Symbol 1141 MovieClip Frame 13
stop();
Symbol 1141 MovieClip Frame 22
stop();
Symbol 1144 Button
on (press) {
_root.mcAction.SetGameMode(6);
_root.fade_clip.gotoAndPlay(1);
}
on (rollOver) {
_global.playSound("sndButton");
}
Symbol 1145 MovieClip Frame 1
stop();
Symbol 1145 MovieClip Frame 13
stop();
Symbol 1153 MovieClip Frame 1
stop();
Symbol 1153 MovieClip Frame 30
stop();
Symbol 1159 MovieClip Frame 1
stop();
Symbol 1159 MovieClip Frame 30
stop();
Symbol 1162 MovieClip Frame 1
stop();
Symbol 1172 Button
on (press) {
openSite("Game", "Site");
}