Frame 1
_root.NewgroundsAPI_id = 3513;
_root.NewgroundsAPI_customEvents = new Array();
_root.NewgroundsAPI_customEvents[6] = "EasyFinish";
_root.NewgroundsAPI_customEvents[7] = "MediumFinish";
_root.NewgroundsAPI_customEvents[8] = "HardFinish";
_root.NewgroundsAPI_customEvents[9] = "VeryHardFinish";
_root.NewgroundsAPI_customEvents[10] = "CustomPlay";
_root.NewgroundsAPI_customEvents[11] = "EasyPlay";
_root.NewgroundsAPI_customEvents[12] = "MediumPlay";
_root.NewgroundsAPI_customEvents[13] = "HardPlay";
_root.NewgroundsAPI_customEvents[14] = "VeryHardPlay";
_root.NewgroundsAPI_customEvents[15] = "CustomFinish";
_root.NewgroundsAPI_customEvents[16] = "CFX";
Stage.showMenu = false;
_root.music = 1;
_root.playingMusic = true;
Instance of Symbol 29 MovieClip in Frame 1
onClipEvent (load) {
this.swapDepths(1008);
}
Frame 2
tellTarget ("sound") {
gotoAndPlay (2);
};
sand2._x = random(500) * -1;
sand._x = random(500) * -1;
_root.pbutton = pause;
_root.pause = 0;
i = 1;
while (i <= Number(_root.numenemy)) {
duplicateMovieClip (_root.fish, "fish" + i, Number(500 + i));
i++;
}
if (_root.difficulty == "Easy") {
_root.level = 35;
_root.NewgroundsAPI_logCustomEvent("EasyPlay");
}
if (_root.difficulty == "Medium") {
_root.level = 25;
_root.NewgroundsAPI_logCustomEvent("MediumPlay");
}
if (_root.difficulty == "Hard") {
_root.level = 20;
_root.NewgroundsAPI_logCustomEvent("HardPlay");
}
if (_root.difficulty == "Very hard") {
_root.level = 15;
_root.NewgroundsAPI_logCustomEvent("VeryHardPlay");
}
if (_root.difficulty == "Custom") {
_root.level = Number(clevel);
_root.NewgroundsAPI_logCustomEvent("CustomPlay");
}
_root.xspeed = 0;
_root.yspeed = 5;
_root.swidth = 700;
_root.sheight = 400;
_root.fisheaten = 0;
_root.fspeed = 0;
stop();
if (_root.music == 1) {
tellTarget ("musicmc") {
gotoAndPlay (2);
};
}
Instance of Symbol 53 MovieClip "sand2" in Frame 2
onClipEvent (enterFrame) {
if (this._x < -1400) {
this._x = 0;
}
if (this._x > 0) {
this._x = -1400;
}
}
Instance of Symbol 55 MovieClip "sand" in Frame 2
onClipEvent (enterFrame) {
if (this._x < -1400) {
this._x = 0;
}
if (this._x > 0) {
this._x = -1400;
}
}
Instance of Symbol 64 MovieClip "player" in Frame 2
onClipEvent (load) {
this._x = 350;
this._y = 30;
}
onClipEvent (enterFrame) {
if (_root.pause == 0) {
if (Key.isDown(39)) {
this.gotoAndStop(1);
if (_root.xspeed < _root.tspeed) {
_root.xspeed = _root.xspeed + _root.acspeed;
}
} else {
if (_root.xspeed > _root.dspeed) {
_root.xspeed = _root.xspeed - _root.dspeed;
}
if ((_root.xspeed <= _root.dspeed) and (_root.xspeed > 0)) {
_root.xspeed = 0;
}
}
if (Key.isDown(37)) {
this.gotoAndStop(2);
if (_root.xspeed > (-_root.tspeed)) {
_root.xspeed = _root.xspeed - _root.acspeed;
}
} else {
if (_root.xspeed < (-_root.dspeed)) {
_root.xspeed = _root.xspeed + _root.dspeed;
}
if ((_root.xspeed >= (-_root.dspeed)) and (_root.xspeed < 0)) {
_root.xspeed = 0;
}
}
if (Key.isDown(40)) {
if (_root.yspeed < _root.tspeed) {
_root.yspeed = _root.yspeed + _root.acspeed;
}
} else {
if (_root.yspeed > _root.dspeed) {
_root.yspeed = _root.yspeed - _root.dspeed;
}
if ((_root.yspeed <= _root.dspeed) and (_root.yspeed > 0)) {
_root.yspeed = 0;
}
}
if (Key.isDown(38)) {
if (_root.yspeed > (-_root.tspeed)) {
_root.yspeed = _root.yspeed - _root.acspeed;
}
} else {
if (_root.yspeed < (-_root.dspeed)) {
_root.yspeed = _root.yspeed + _root.dspeed;
}
if ((_root.yspeed >= (-_root.dspeed)) and (_root.yspeed < 0)) {
_root.yspeed = 0;
}
}
if (this._x > _root.swidth) {
this._x = 0;
}
if (this._x < 0) {
this._x = _root.swidth;
}
if (this._y < (0 + (this._height / 2))) {
this._y = 0 + ((this._height / 2) + 2);
_root.yspeed = 0;
}
if (this._y > (_root.sheight - (this._height / 2))) {
this._y = (_root.sheight - (this._height / 2)) - 2;
_root.yspeed = 0;
}
if (this._x > (_root.swidth - _root.buffer)) {
this._x = _root.swidth - _root.buffer;
}
if (this._x < _root.buffer) {
this._x = _root.buffer;
}
this._x = this._x + _root.xspeed;
this._y = this._y + _root.yspeed;
if (this._x >= (_root.swidth - _root.buffer)) {
_root.sand._x = _root.sand._x - _root.xspeed;
_root.sand2._x = _root.sand2._x - (_root.xspeed / 3);
_root.fspeed = _root.xspeed;
}
if (this._x <= _root.buffer) {
_root.sand._x = _root.sand._x - _root.xspeed;
_root.sand2._x = _root.sand2._x - (_root.xspeed / 3);
_root.fspeed = _root.xspeed;
}
if ((this._x > _root.buffer) and (this._x < (_root.swidth - _root.buffer))) {
_root.fspeed = 0;
}
}
this._width = _root.level;
this._height = this._width * 0.42857;
}
Instance of Symbol 80 MovieClip "fish" in Frame 2
onClipEvent (load) {
flevel = random(_root.maxsize - _root.minsize) + _root.minsize;
ldirection = random(2) + 1;
sdirection = random(2) + 1;
speed = random(_root.maxspeed - _root.minspeed) + _root.minspeed;
this._width = flevel;
this._height = this._width * 0.42857;
if (ldirection == 1) {
gotoAndStop(Math.round(this._width + 250));
if (sdirection == 1) {
this._x = random(700) - 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
if (sdirection == 2) {
this._x = random(700) + 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
}
if (ldirection == 2) {
gotoAndStop(Math.round(this._width));
if (sdirection == 1) {
this._x = random(700) - 800;
this._y = random(380) + 10;
}
if (sdirection == 2) {
this._x = random(700) + 800;
this._y = random(380) + 10;
}
}
}
onClipEvent (enterFrame) {
if (_root.pause == 0) {
if (ldirection == 1) {
this._x = this._x + (speed - _root.fspeed);
} else {
this._x = this._x - (speed + _root.fspeed);
}
}
if ((this._x > 1000) or (this._x < -300)) {
flevel = random(_root.maxsize - _root.minsize) + _root.minsize;
ldirection = random(2) + 1;
sdirection = random(2) + 1;
speed = random(_root.maxspeed - _root.minspeed) + _root.minspeed;
this._width = flevel;
this._height = this._width * 0.42857;
if (ldirection == 1) {
gotoAndStop(Math.round(this._width + 250));
if (sdirection == 1) {
this._x = random(700) - 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
if (sdirection == 2) {
this._x = random(700) + 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
}
if (ldirection == 2) {
gotoAndStop(Math.round(this._width));
if (sdirection == 1) {
this._x = random(700) - 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
if (sdirection == 2) {
this._x = random(700) + 800;
this._y = random(380) + 10;
if ((this._y + (this._height / 2)) > 390) {
this._y = 390 - (this._height / 2);
}
if ((this._y - (this._height / 2)) < 10) {
this._y = 10 + (this._height / 2);
}
}
}
}
if (this.hitTest(_root.player)) {
if (this._width < _root.player._width) {
tellTarget ("_root.sound") {
gotoAndPlay (4);
};
this._x = 1500;
_root.level = _root.level + ((this._width / _root.player._width) * _root.growth);
_root.fisheaten++;
if (_root.player._width > _root.maxwidth) {
_root.gotoAndStop(4);
}
} else {
tellTarget ("_root.sound") {
gotoAndPlay (4);
};
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 137 MovieClip in Frame 2
onClipEvent (load) {
this.swapDepths(1004);
}
onClipEvent (enterFrame) {
if (_root.pause == 1) {
this._x = 350;
this._y = 220;
} else {
this._x = 350;
this._y = -500;
}
}
Frame 3
i = 1;
while (i <= (_root.numenemy + 1)) {
removeMovieClip("fish" + i);
i++;
}
stop();
Frame 4
i = 1;
while (i <= (_root.numenemy + 1)) {
removeMovieClip("fish" + i);
i++;
}
stop();
Frame 5
i = 1;
while (i <= (_root.numenemy + 1)) {
removeMovieClip("fish" + i);
i++;
}
if (_root.music == 1) {
tellTarget ("musicmc") {
gotoAndPlay (2);
};
}
stop();
Frame 6
i = 1;
while (i <= (_root.numenemy + 1)) {
removeMovieClip("fish" + i);
i++;
}
Symbol 6 MovieClip Frame 1
Percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
percent = math.floor(percent);
Symbol 6 MovieClip Frame 2
gotoAndPlay (1);
Symbol 16 Button
on (release) {
_root.gotoandstop(5);
}
Symbol 17 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 17 MovieClip Frame 2
gotoAndPlay (1);
Symbol 17 MovieClip Frame 3
gotoAndStop (4);
Symbol 22 Button
on (release) {
_root.NewgroundsAPI_loadNewgrounds();
}
Symbol 25 Button
on (release) {
_root.NewgroundsAPI_loadNewgrounds();
}
Symbol 27 MovieClip Frame 1
function load_ad() {
url = new XML();
url.onLoad = function (s) {
if (s) {
_root.NewgroundsAPI_Ad_Unit.start_ad(this.toString());
}
};
url.load(_root.NewgroundsAPI_params.ad_url);
}
function start_ad(url) {
trace("[Newgrounds Flash Ads] Your ad was loaded. Your version of flash may have trouble displaying the ad, however, the ad will load fine if you test in a browser!");
ng_ad.loadMovie(url);
}
_root.NewgroundsAPI_Ad_Unit = this;
if (_root.NewgroundsAPI_params.ad_url != undefined) {
_root.NewgroundsAPI_Ad_Unit.load_ad();
}
_root.NewgroundsAPI_onAdsApproved = function () {
_root.NewgroundsAPI_Ad_Unit.load_ad();
};
Symbol 40 Button
on (release) {
_root.NewgroundsAPI_loadMyMovie();
}
Symbol 45 Button
on (release) {
_root.NewgroundsAPI_loadMyMovie();
}
Symbol 48 Button
on (release) {
this._visible = false;
}
Symbol 50 MovieClip Frame 1
_visible = false;
_root.NewgroundsAPI = this;
STAT_MOVIE_VIEWS = 1;
STAT_AUTHOR_SITE = 2;
STAT_NEWGROUNDS = 3;
STAT_NEW_VERSION = 4;
STAT_CUSTOM_STATS = 50;
Symbol 50 MovieClip Frame 2
_root.NewgroundsAPI.POPUP_ERROR._visible = false;
_root.NewgroundsAPI.POPUP_VERSION._visible = false;
customStats = new Object();
i = 1;
while (i < _root.NewgroundsAPI_customLinks.length) {
customStats[_root.NewgroundsAPI_customLinks[i]] = i + STAT_CUSTOM_STATS;
i++;
}
i = 1;
while (i < _root.NewgroundsAPI_customEvents.length) {
customStats[_root.NewgroundsAPI_customEvents[i]] = i + STAT_CUSTOM_STATS;
i++;
}
_x = 0;
_y = 0;
configureMovie = function () {
var _local1 = _root;
if (_local1.NewgroundsAPI_params.error != undefined) {
sendError(_local1.NewgroundsAPI_params.error);
}
if (_local1.NewgroundsAPI_params.settings_loaded == 1) {
sendMessage("You have successfully connected to the Newgrounds API gateway!");
sendMessage(("Movie Identified as '" + _local1.NewgroundsAPI_params.movie_name) + "'");
}
if (_local1.NewgroundsAPI_params.deny_host == 1) {
sendMessage(host + " is not approved to use this movie");
_local1.NewgroundsAPI_onDenyHost(host, _local1.NewgroundsAPI_params.movie_url, (script_url + "&stat=") + STAT_NEW_VERSION);
}
if (_local1.NewgroundsAPI_params.movie_version == 1) {
sendMessage(("Version " + _local1.NewgroundsAPI_params.movie_version) + " is now available!");
_local1.NewgroundsAPI_onNewVersionAvailable(_local1.NewgroundsAPI_params.movie_version, _local1.NewgroundsAPI_params.movie_url, (script_url + "&stat=") + STAT_NEW_VERSION);
}
if (_local1.NewgroundsAPI_params.ad_url != undefined) {
sendMessage("This movie has been approved to use Flash Ads");
_local1.NewgroundsAPI_onAdsApproved(_local1.NewgroundsAPI_params.ad_url);
}
};
sendError = function (error) {
trace("[NEWGROUNDS API ERROR] " + error);
};
sendMessage = function (message) {
trace("[NEWGROUNDS API] " + message);
};
sendStats = function (stat, new_window) {
var _local1 = this;
var _local2 = _root;
if (script_url != undefined) {
query = "&stat=" + stat;
if (new_window == true) {
getURL (script_url + query, "_blank");
} else {
initInfo = new XML();
initInfo.onLoad = function () {
var _local1 = this;
var _local2 = _root;
i = 0;
while (i < _local1.childNodes.length) {
if (_local1.childNodes[i].nodeName != null) {
j = 0;
while (j < _local1.childNodes[i].childNodes.length) {
if (_local1.childNodes[i].childNodes[j].nodeName != null) {
param_name = _local1.childNodes[i].childNodes[j].nodeName;
param_value = unescape(_local1.childNodes[i].childNodes[j].attributes.value);
_local2.NewgroundsAPI_params[param_name] = param_value;
}
j++;
}
}
i++;
}
_local2.NewgroundsAPI.configureMovie();
};
initInfo.load(script_url + query);
}
}
};
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
if (!_root.NewgroundsAPI_id) {
sendError("Missing required '_root.NewgroundsAPI_id' variable");
} else if (!tracker_id) {
tracker_id = _root.NewgroundsAPI_id;
script_url = (("http://www.ngads.com/gateway.php?id=" + tracker_id) + "&host=") + escape(host);
_root.NewgroundsAPI_params = new Object();
sendMessage("Connecting to API gateway...");
sendStats(STAT_MOVIE_VIEWS, false);
}
_root.NewgroundsAPI_loadMyMovie = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_NEW_VERSION, true);
};
_root.NewgroundsAPI_loadNewgrounds = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_NEWGROUNDS, true);
};
_root.NewgroundsAPI_loadMySite = function () {
_root.NewgroundsAPI.sendStats(_root.NewgroundsAPI.STAT_AUTHOR_SITE, true);
};
_root.NewgroundsAPI_loadCustomLink = function (link) {
var _local1 = _root;
var _local2 = link;
if (_local1.NewgroundsAPI.customStats[_local2]) {
_local1.NewgroundsAPI.sendStats(_local1.NewgroundsAPI.customStats[_local2], true);
} else {
_local1.NewgroundsAPI.sendError(("The custom link '" + _local2) + "' has not beed defined.");
}
};
_root.NewgroundsAPI_logCustomEvent = function (event) {
var _local1 = _root;
var _local2 = event;
if (_local1.NewgroundsAPI.customStats[_local2]) {
_local1.NewgroundsAPI.sendStats(_local1.NewgroundsAPI.customStats[_local2], false);
} else {
_local1.NewgroundsAPI.sendError(("The custom event '" + _local2) + "' has not beed defined.");
}
};
if (typeof(_root.NewgroundsAPI_onDenyHost) != "function") {
_root.NewgroundsAPI_onDenyHost = function (ad_url) {
var _local1 = _root;
_local1.NewgroundsAPI.swapDepths(99999);
_local1.NewgroundsAPI._visible = true;
_local1.NewgroundsAPI.POPUP_ERROR._visible = true;
};
}
if (typeof(_root.NewgroundsAPI_onNewVersionAvailable) != "function") {
_root.NewgroundsAPI_onNewVersionAvailable = function (ad_url) {
var _local1 = _root;
_local1.NewgroundsAPI.swapDepths(99999);
_local1.NewgroundsAPI._visible = true;
_local1.NewgroundsAPI.POPUP_VERSION._visible = true;
};
}
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 84 Button
on (release) {
_root._quality = "HIGH";
}
Symbol 86 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 88 Button
on (release) {
_root._quality = "LOW";
}
Symbol 92 Button
on (release) {
_root.gotoandstop(5);
}
Symbol 100 Button
on (release) {
tellTarget ("_root.musicmc") {
gotoAndPlay (2);
};
_root.music = 1;
_root.playingMusic = true;
}
Symbol 102 Button
on (release) {
stopAllSounds();
_root.music = 0;
_root.playingMusic = false;
}
Symbol 108 Button
on (release) {
_root.pause = 1;
stopAllSounds();
_root.music = 0;
}
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 3
gotoAndStop (1);
Symbol 128 MovieClip Frame 5
gotoAndStop (1);
Symbol 136 Button
on (release) {
if (_root.playingMusic == true) {
tellTarget ("_root.musicmc") {
gotoAndPlay (2);
};
_root.music = 1;
} else {
_root.music = 0;
}
_root.pause = 0;
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 2
gotoAndStop (1);
Symbol 147 Button
on (release) {
_root.gotoandstop(5);
}
Symbol 149 Button
on (release) {
_root.gotoandstop(2);
}
Symbol 157 MovieClip Frame 1
difficulty = _root.difficulty;
if (_root.difficulty == "Easy") {
_root.NewgroundsAPI_logCustomEvent("EasyFinish");
}
if (_root.difficulty == "Medium") {
_root.NewgroundsAPI_logCustomEvent("MediumFinish");
}
if (_root.difficulty == "Hard") {
_root.NewgroundsAPI_logCustomEvent("HardFinish");
}
if (_root.difficulty == "Very hard") {
_root.NewgroundsAPI_logCustomEvent("VeryHardFinish");
}
if (_root.difficulty == "Custom") {
_root.NewgroundsAPI_logCustomEvent("CustomFinish");
}
eaten = ("You ate a total of " + _root.fisheaten) + " fish";
Symbol 162 Button
on (release) {
tellTarget ("_root.musicmc") {
gotoAndPlay (2);
};
_root.music = 1;
_root.playingMusic = true;
}
Symbol 164 Button
on (release) {
stopAllSounds();
_root.music = 0;
_root.playingMusic = false;
}
Symbol 173 Button
on (release) {
getURL ("http://www.xgenstudios.com", "_blank");
}
Symbol 178 Button
on (release) {
_root.difficulty = "Easy";
_root.acspeed = 0.6;
_root.dspeed = 0.1;
_root.tspeed = 6;
_root.buffer = 200;
_root.level = 35;
_root.growth = 3;
_root.maxwidth = 300;
_root.numenemy = 15;
_root.maxsize = 150;
_root.minsize = 5;
_root.maxspeed = 2;
_root.minspeed = 1;
_root.gotoandstop(2);
}
Symbol 180 Button
on (release) {
_root.difficulty = "Medium";
_root.acspeed = 0.4;
_root.dspeed = 0.02;
_root.tspeed = 5;
_root.buffer = 200;
_root.level = 25;
_root.growth = 1.5;
_root.maxwidth = 300;
_root.numenemy = 20;
_root.maxsize = 150;
_root.minsize = 4;
_root.maxspeed = 2;
_root.minspeed = 1;
_root.gotoandstop(2);
}
Symbol 182 Button
on (release) {
_root.difficulty = "Hard";
_root.acspeed = 0.3;
_root.dspeed = 0.01;
_root.tspeed = 4;
_root.buffer = 200;
_root.level = 20;
_root.growth = 1;
_root.maxwidth = 300;
_root.numenemy = 20;
_root.maxsize = 150;
_root.minsize = 3;
_root.maxspeed = 3;
_root.minspeed = 1;
_root.gotoandstop(2);
}
Symbol 184 Button
on (release) {
_root.gotoandstop(6);
}
Symbol 186 Button
on (release) {
_root.difficulty = "Very hard";
_root.acspeed = 0.2;
_root.dspeed = 0.005;
_root.tspeed = 4;
_root.buffer = 200;
_root.level = 15;
_root.growth = 0.6;
_root.maxwidth = 300;
_root.numenemy = 25;
_root.maxsize = 150;
_root.minsize = 2;
_root.maxspeed = 3;
_root.minspeed = 1;
_root.gotoandstop(2);
}
Symbol 189 Button
on (release) {
_root._quality = "HIGH";
}
Symbol 190 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 191 Button
on (release) {
_root._quality = "LOW";
}
Symbol 192 Button
on (release) {
_root.NewgroundsAPI_logCustomEvent("CFX");
getURL ("http://www.cfxmusic.com", "_blank");
}
Symbol 229 Button
on (release) {
_root.wvalues = "";
_root.wrong = 0;
if ((((Number(cacspeed) < 0.05) or (Number(cacspeed) > 2)) or (cacspeed == "")) or (isNaN(cacspeed) == true)) {
_root.wrong = _root.wrong + 1;
_root.wvalues = _root.wvalues + "Acceleration";
}
if ((((Number(cdspeed) < 0) or (Number(cdspeed) > Number(ctspeed))) or (cdspeed == "")) or (isNaN(cdspeed) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Deceleration";
} else {
_root.wvalues = _root.wvalues + ", Deceleration";
}
}
if (((((Number(ctspeed) < 0.2) or (Number(ctspeed) < Number(cacspeed))) or (Number(ctspeed) > 20)) or (ctspeed == "")) or (isNaN(ctspeed) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Maximum speed";
} else {
_root.wvalues = _root.wvalues + ", Maximum speed";
}
}
if ((((Number(clevel) < Number(cminsize)) or (Number(clevel) > Number(cmaxwidth))) or (clevel == "")) or (isNaN(clevel) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Starting size";
} else {
_root.wvalues = _root.wvalues + ", Starting size";
}
}
if ((((Number(cbuffer) < 0) or (Number(cbuffer) > 350)) or (cbuffer == "")) or (isNaN(cbuffer) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Buffer";
} else {
_root.wvalues = _root.wvalues + ", Buffer";
}
}
if ((((Number(cgrowth) <= 0) or (Number(cgrowth) > 30)) or (cgrowth == "")) or (isNaN(cgrowth) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Growth rate";
} else {
_root.wvalues = _root.wvalues + ", Growth rate";
}
}
if ((((Number(cmaxwidth) < 100) or (Number(cmaxwidth) > 1000)) or (cmaxwidth == "")) or (isNaN(cmaxwidth) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Finish game size";
} else {
_root.wvalues = _root.wvalues + ", Finish game size";
}
}
if ((((Number(cmaxsize) < 50) or (Number(cmaxsize) > 250)) or (cmaxsize == "")) or (isNaN(cmaxsize) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Maximum size of other fish";
} else {
_root.wvalues = _root.wvalues + ", Maximum size of other fish";
}
}
if ((((Number(cminsize) <= 0) or (Number(cminsize) > Number(cmaxsize))) or (cminsize == "")) or (isNaN(cminsize) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Minimum size of other fish";
} else {
_root.wvalues = _root.wvalues + ", Minimum size of other fish";
}
}
if ((((Number(cmaxspeed) < Number(cminspeed)) or (Number(cmaxspeed) > Number(ctspeed))) or (cmaxspeed == "")) or (isNaN(cmaxspeed) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Maximum speed of other fish";
} else {
_root.wvalues = _root.wvalues + ", Maximum speed of other fish";
}
}
if ((((Number(cminspeed) < 0) or (Number(cminspeed) > Number(cmaxspeed))) or (cminspeed == "")) or (isNaN(cminspeed) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Minimum speed of other fish";
} else {
_root.wvalues = _root.wvalues + ", Minimum speed of other fish";
}
}
if ((((Number(cnumenemy) < 1) or (Number(cnumenemy) > 50)) or (cnumenemy == "")) or (isNaN(cnumenemy) == true)) {
_root.wrong++;
if (_root.wrong == 1) {
_root.wvalues = _root.wvalues + "Number of other fish";
} else {
_root.wvalues = _root.wvalues + ", Number of other fish";
}
}
if (_root.wrong >= 1) {
tellTarget ("wrongmc") {
gotoAndStop (2);
};
}
if (_root.wrong == 0) {
_root.difficulty = "Custom";
_root.cacspeed = cacspeed;
_root.cdspeed = cdspeed;
_root.ctspeed = ctspeed;
_root.cbuffer = cbuffer;
_root.clevel = clevel;
_root.cgrowth = cgrowth;
_root.cmaxwidth = cmaxwidth;
_root.cnumenemy = cnumenemy;
_root.cmaxsize = cmaxsize;
_root.cminsize = cminsize;
_root.cmaxspeed = cmaxspeed;
_root.cminspeed = cminspeed;
_root.acspeed = Number(cacspeed);
_root.dspeed = Number(cdspeed);
_root.tspeed = Number(ctspeed);
_root.buffer = Number(cbuffer);
_root.level = Number(clevel);
_root.growth = Number(cgrowth);
_root.maxwidth = Number(cmaxwidth);
_root.numenemy = Number(cnumenemy) - 1;
_root.maxsize = Number(cmaxsize);
_root.minsize = Number(cminsize);
_root.maxspeed = Number(cmaxspeed);
_root.minspeed = Number(cminspeed);
_root.xspeed = 0;
_root.yspeed = 5;
_root.swidth = 700;
_root.sheight = 400;
_root.fisheaten = 0;
_root.fspeed = 0;
_root.gotoandstop(2);
}
}
Symbol 237 Button
on (release) {
cacspeed = 0.6;
cdspeed = 0.1;
ctspeed = 6;
cbuffer = 200;
clevel = 35;
cgrowth = 3;
cmaxwidth = 300;
cnumenemy = 15;
cmaxsize = 150;
cminsize = 5;
cmaxspeed = 2;
cminspeed = 1;
}
Symbol 238 Button
on (release) {
cacspeed = 0.4;
cdspeed = 0.02;
ctspeed = 5;
cbuffer = 200;
clevel = 25;
cgrowth = 1.5;
cmaxwidth = 300;
cnumenemy = 20;
cmaxsize = 150;
cminsize = 4;
cmaxspeed = 2;
cminspeed = 1;
}
Symbol 239 Button
on (release) {
cacspeed = 0.3;
cdspeed = 0.01;
ctspeed = 4;
cbuffer = 200;
clevel = 20;
cgrowth = 1;
cmaxwidth = 300;
cnumenemy = 20;
cmaxsize = 150;
cminsize = 3;
cmaxspeed = 3;
cminspeed = 1;
}
Symbol 240 Button
on (release) {
cacspeed = 0.2;
cdspeed = 0.005;
ctspeed = 4;
cbuffer = 200;
clevel = 15;
cgrowth = 0.6;
cmaxwidth = 300;
cnumenemy = 25;
cmaxsize = 150;
cminsize = 2;
cmaxspeed = 3;
cminspeed = 1;
}
Symbol 243 Button
on (release) {
_root.gotoandstop(5);
}
Symbol 254 Button
on (release) {
gotoAndStop (1);
}
Symbol 255 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 2
stop();
if (_root.wrong == 1) {
are = "is";
mistakes = "mistake";
} else {
are = "are";
mistakes = "mistakes";
}
wmsg = (((((("There " + are) + " ") + _root.wrong) + " ") + mistakes) + " in the values you have chosen. The following values need to be changed: ") + _root.wvalues;
Symbol 256 MovieClip Frame 1
cacspeed.restrict = "0-9.";
cdspeed.restrict = "0-9.";
ctspeed.restrict = "0-9.";
cbuffer.restrict = "0-9.";
clevel.restrict = "0-9.";
cgrowth.restrict = "0-9.";
cmaxwidth.restrict = "0-9.";
cnumenemy.restrict = "0-9.";
cmaxsize.restrict = "0-9.";
cminsize.restrict = "0-9.";
cmaxspeed.restrict = "0-9.";
cminspeed.restrict = "0-9.";
cacspeed = _root.cacspeed;
cdspeed = _root.cdspeed;
ctspeed = _root.ctspeed;
cbuffer = _root.cbuffer;
clevel = _root.clevel;
cgrowth = _root.cgrowth;
cmaxwidth = Number(_root.cmaxwidth);
cnumenemy = _root.cnumenemy;
cmaxsize = _root.cmaxsize;
cminsize = _root.cminsize;
cmaxspeed = _root.cmaxspeed;
cminspeed = _root.cminspeed;