Frame 1
gameName = "superfishing";
version = "040624";
Frame 2
if (_level0.getBytesLoaded() < _level0.getBytesTotal()) {
gotoAndPlay (1);
title = ("loading " + int(_level0.getBytesTotal() / 1024)) + " kbyte...";
percent = int((_level0.getBytesLoaded() / _level0.getBytesTotal()) * 100) + " %";
}
Frame 4
this.timer = createEmptyMovieClip("timer", 99);
this.timer.running = false;
this.timer.speed = 6;
timer.init = function (timeTotal) {
this.maxTime = 100000 /* 0x0186A0 */;
this.timeTotal = timeTotal * 1000;
this.timeStart = getTimer();
_root.timeLeft = this.timeTotal;
this.running = false;
this.update();
};
timer.onEnterFrame = function () {
if (_root.paused) {
this.timestamp = getTimer();
return(undefined);
}
_global.dt = (((getTimer() - this.timestamp) / 33) * 0.3) + (_global.dt * 0.7);
this.timestamp = getTimer();
if (this.running) {
_root.timeLeft = _root.timeLeft - ((_global.dt * 33) * this.speed);
}
this.update();
};
timer.update = function () {
if (_root.paused) {
return(undefined);
}
_root.timeLeftDisplay = int(_root.timeLeft / 1000);
var f = (int((_root.timeLeft / this.maxTime) * 200) + 1);
_root.timeMc.gotoAndStop(f);
if ((_root.timeLeft < 30000) && (_root.timeLeft > 0)) {
_root.snd.playLoop("sndTicking", 1);
} else {
_root.snd.stop("sndTicking");
}
if ((_root.timeLeft <= -0.5) && (this.running)) {
_root.snd.stop("sndTicking");
this.running = false;
_root.timeOut();
}
};
timer.alter = function (d) {
_root.timeLeft = Math.min(this.maxTime, Math.max(0, _root.timeLeft + d));
this.update();
};
timer.timestamp = getTimer();
snd = new Object();
snd.lib = new Array();
snd.libMc = new Array();
snd.mcCount = 0;
snd.active = 1;
snd.mc = _root.createEmptyMovieClip("sndMc", 97);
s = new Sound();
s.setVolume(100);
snd.load = function (id) {
this.libMc[id] = this.mc.createEmptyMovieClip("snd" + this.mcCount, 15 + this.mcCount);
this.mcCount++;
this.lib[id] = new Sound(this.libMc[id]);
this.lib[id].attachSound(id);
};
snd.play = function (id, volume) {
if (volume === undefined) {
volume = 1;
}
volume = Math.max(0, Math.min(1, volume));
this.lib[id].start(id);
this.lib[id].setVolume(volume * 100);
};
snd.playLoop = function (id, volume) {
if (_root.snd.libMc[id].playing == 1) {
return(undefined);
}
if (volume === undefined) {
volume = 1;
}
volume = Math.max(0, Math.min(1, volume));
this.lib[id].start(id, 99999);
this.lib[id].setVolume(volume * 100);
this.libMc[id].playing = 1;
};
snd.playEvent = function (id, volume) {
if (volume === undefined) {
volume = 1;
}
volume = Math.max(0, Math.min(1, volume));
var s = new Sound();
s.attachSound(id);
s.setVolume(volume * 100);
s.start();
};
snd.stop = function (id) {
this.lib[id].stop();
this.libMc[id].playing = 0;
};
snd.load("sndWater");
snd.load("sndIntake");
snd.load("sndThunder");
snd.load("sndScore");
snd.load("sndBonus");
snd.load("sndMalus");
snd.load("sndTicking");
snd.load("sndBell");
hook = new Object();
hook.init = function () {
this.x = 0;
this.vy = 8;
this.maxY = 370;
this.minY = 60;
this.y = this.minY;
this.mc = _root.hookMc;
};
hook.redraw = function () {
this.mc._x = this.x;
this.mc._y = this.y;
};
hook.move = function () {
if (_root.mouseIsDown) {
this.y = this.y + (this.vy * _global.dt);
if (this.y > this.maxY) {
this.y = this.maxY;
_root.handlerMouseUp();
}
} else {
this.y = this.y - (this.vy * _global.dt);
}
if (this.y <= this.minY) {
this.y = this.minY;
this.clearFish = true;
} else {
this.clearFish = false;
}
};
boat = new Object();
boat.init = function () {
this.mc = _root.boatMc;
this.vx = 7;
this.x = 275;
this.maxX = 560;
this.minX = 30;
_root.hook.init();
};
boat.move = function () {
if ((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(32))) {
_root.osd.gotoAndPlay("quickhelp");
}
if (Math.abs(this.x - _root._xmouse) < this.vx) {
this.x = _root._xmouse;
} else {
if (this.x < _root._xmouse) {
this.x = this.x + (this.vx * _global.dt);
}
if (this.x > _root._xmouse) {
this.x = this.x - (this.vx * _global.dt);
}
if (this.x > this.maxX) {
this.x = this.maxX;
}
if (this.x < this.minX) {
this.x = this.minX;
}
}
};
boat.redraw = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var point = {x:this.mc.boatMc.rod._x, y:this.mc.boatMc.rod._y};
this.mc.boatMc.localToGlobal(point);
_root.hook.x = point.x;
_root.hook.redraw();
var mc = _root.threadMc;
mc.clear();
mc.lineStyle(1, 16777215, 100);
mc.moveTo(point.x, point.y);
mc.lineTo(hook.x, hook.y);
};
fish = new Object();
fish.protos = new Array();
fish.protos[0] = {vMax:5, vMin:2, score:2.1};
fish.protos[1] = {vMax:5, vMin:2, score:1.9};
fish.protos[2] = {vMax:5, vMin:2, score:1.5};
fish.protos[3] = {vMax:5, vMin:2, score:1.7};
fish.protos[4] = {vMax:5, vMin:2, score:2.3};
fish.protos[5] = {vMax:5, vMin:2, score:2.5, ground:1};
fish.protos[6] = {vMax:2.5, vMin:1, score:-2.5};
fish.protos[7] = {vMax:2, vMin:0.5, score:-2.5};
fish.typesAmount = fish.protos.length;
fish.borderX0 = -100;
fish.borderX1 = 650;
fish.init = function () {
this.mc = _root.fishMc;
this.mc.clear();
for (var i in this.mc) {
this.mc[i].removeMovieClip();
}
this.fishCount = 0;
this.bubbleCount = 0;
var amount = (5 + random(3));
var i = 0;
while (i < amount) {
this.create({freePos:1});
i++;
}
};
fish.create = function (params) {
var id = random(this.typesAmount);
var proto = this.protos[id];
var fish = this.mc.attachMovie("fish" + id, "fish" + this.fishCount, this.fishCount);
fish.proto = proto;
fish.proto.id = id;
fish.onEnterFrame = _root.fishMover;
fish.speed = ((Math.random() * (proto.vMax - proto.vMin)) + proto.vMin) * ((Math.random() > 0.5) ? 1 : -1);
var scale = ((Math.random() * 50) + 50);
fish._xscale = scale * ((fish.speed > 0) ? -1 : 1);
fish._yscale = scale;
if (proto.score < 0) {
fish._rotation = random(360);
} else {
_root.fishAmount++;
}
fish.hookRotation = ((fish.speed > 0) ? -10 : 10);
fish.hookRotationSteps = 9;
this.fishCount++;
fish._y = 130 + (Math.random() * 220);
if (proto.ground) {
fish._y = 370;
}
if (params.freePos) {
fish._x = Math.random() * 550;
} else {
fish._x = ((fish.speed > 0) ? (this.borderX0) : (this.borderX1));
}
};
fishMover = function () {
if (this.hooked) {
this._x = _root.hook.x;
this._y = _root.hook.y + 10;
if ((this.hookRotationSteps--) > 0) {
this._rotation = this._rotation + this.hookRotation;
}
if (_root.hook.clearFish) {
_root.score(int(this.proto.score * Math.abs(this._xscale)), this.proto.id);
if (this.proto.score > 0) {
_root.fishAmount--;
}
this.removeMovieClip();
}
} else {
if ((this.proto.score > 0) && (Math.random() < 0.02)) {
var mc = _root.bubblesMc.attachMovie("bubble", "bubble" + _root.fish.bubbleCount, _root.fish.bubbleCount);
mc._x = this._x + (this.vx * 3);
mc._y = this._y;
mc.onEnterFrame = _root.bubbleMover;
mc._xscale = 50 + random(50);
mc._yscale = mc._xscale;
mc.x = mc._x;
mc.actAge = 0;
_root.fish.bubbleCount++;
}
this._x = this._x + this.speed;
if ((this._x > _root.fish.borderX1) || (this._x < _root.fish.borderX0)) {
this.removeMovieClip();
if (this.proto.score > 0) {
_root.fishAmount--;
}
}
}
};
bubbleMover = function () {
this.actAge = this.actAge + _global.dt;
this._y = this._y - (this._xscale / 30);
this._x = this.x + (((Math.sin((this.actAge * 10) / this._xscale) * 2) * this._xscale) / 50);
if (this._y < 100) {
this.removeMovieClip();
}
};
cloud = new Object();
cloud.init = function () {
this.mc = _root.cloudMc;
this.x = this.mc._x;
this.y = this.mc._y;
this.randomizeTarget();
this.vx = 0;
this.ax = 0.2;
this.fx = 0.9;
this.power = 0;
};
cloud.randomizeTarget = function () {
this.tx = Math.random() * 550;
};
cloud.move = function () {
if (this.tx > this.x) {
this.vx = this.vx + this.ax;
} else {
this.vx = this.vx - this.ax;
}
if (Math.abs(this.x - this.tx) < this.vx) {
this.randomizeTarget();
}
this.vx = this.vx * this.fx;
this.x = this.x + this.vx;
this.mc._x = this.x;
if (Math.abs(_root.boat.x - this.x) < 35) {
this.power = Math.min(1, this.power + 0.05);
} else {
this.power = Math.max(-1, this.power - 0.05);
}
if (Math.random() < this.power) {
this.power = -1;
this.mc.gotoAndPlay("flash");
_root.boat.mc.gotoAndPlay("flash");
_root.snd.play("sndThunder", 0.7);
_root.timer.alter(-10000);
}
};
score = function (points, id) {
_root.actScore = _root.actScore + points;
_root.actCatch = _root.actCatch + points;
if (id ne "") {
_root.actCatchHistory.push(id);
}
_root.timer.alter(points * 100);
_root.actScoreDisplay = _root.actScore;
};
init = function () {
this.boat.init();
this.fish.init();
this.cloud.init();
this.showMenu();
_root.snd.playLoop("sndWater");
};
resetGame = function () {
_root.actScore = 0;
this.score(0);
this.timer.init(100);
};
showMenu = function () {
this.resetGame();
_root.osd.gotoAndStop("menu");
};
submitScore = function () {
_global.api.highscore.submit(_root.gameName, "", _root.actScore, 0);
};
startGame = function () {
this.resetGame();
this.cleanUp();
this.boat.init();
_root.osd.gotoAndStop("invisible");
this.actScore = 0;
_root.actCatch = 0;
_root.actCatchHistory = new Array();
this.timer.running = true;
this.onEnterFrame = stepMain;
this.onMouseDown = handlerMouseDown;
this.onMouseUp = handlerMouseUp;
};
stepMain = function () {
this.cloud.move();
this.boat.move();
this.hook.move();
this.boat.redraw();
if ((!_root.mouseIsDown) && (_root.fishMc.hitTest(this.hook.x, this.hook.y + 10, true))) {
for (var i in _root.fishMc) {
if ((_root.fishMc[i].hitTest(this.hook.x, this.hook.y + 10, true) || (_root.fishMc[i].hitTest(this.hook.x, this.hook.y + 8, true))) || (_root.fishMc[i].hitTest(this.hook.x, this.hook.y + 6, true))) {
var fish = _root.fishMc[i];
fish.hooked = true;
}
}
}
if (int(_root.actCatch) != 0) {
trace("? " + _root.actCatchHistory.length);
var multicatch = (_root.actCatchHistory.length > 1);
var i = 1;
while (i < _root.actCatchHistory.length) {
if (_root.actCatchHistory[i] != _root.actCatchHistory[i - 1]) {
multicatch = 0;
break;
}
i++;
}
_root.actCatchDisplay = _root.actCatch;
if (_root.actCatch > 0) {
if (multicatch) {
_root.actMultiCatchDisplay = _root.actCatchHistory.length;
_root.catchDisplay.gotoAndPlay("multicatch");
_root.actScore = _root.actScore + (_root.actCatch * (_root.actCatchHistory.length - 1));
_root.actScoreDisplay = _root.actScore;
_root.snd.play("sndBonus", 0.7);
} else {
_root.catchDisplay.gotoAndPlay("goodcatch");
_root.snd.play("sndScore", 0.4);
}
} else {
_root.snd.play("sndMalus", 0.5);
}
if (_root.actCatch < 0) {
_root.catchDisplay.gotoAndPlay("badcatch");
}
_root.actCatch = 0;
_root.actCatchHistory = new Array();
_root.catchDisplay._x = _root.boatMc._x;
}
var resource = 0;
for (var i in _root.fishMc) {
if (_root.fishMc[i].proto.score > 0) {
resource++;
}
}
if ((Math.random() < 0.04) || (resource < 3)) {
fish.create();
}
};
timeOut = function () {
_root.snd.stop("sndIntake");
_root.snd.stop("sndTicking");
_root.snd.play("sndBell", 1);
_root.onEnterFrame = undefined;
_root.osd.gotoAndPlay("gameover");
};
cleanUp = function () {
for (var i in _root.fishMc) {
var fish = _root.fishMc[i];
if (fish.hooked) {
fish.removeMovieClip();
}
}
};
handlerMouseDown = function () {
if (_root.onEnterFrame == _root.stepMain) {
_root.snd.playLoop("sndIntake", 0.3);
}
_root.mouseIsDown = true;
};
handlerMouseUp = function () {
if (_root.onEnterFrame == _root.stepMain) {
_root.snd.stop("sndIntake");
}
_root.mouseIsDown = false;
};
startPhase = function (f) {
f.init();
this.onEnterFrame = f;
this.phase = 0;
this.phaseDelay = 0;
};
stop();
init();
Symbol 8 MovieClip Frame 1
#initclip 1
_global.api = new Object();
_global.api.highscore = new Object();
_global.api.highscore.initSession = function () {
this.session = "";
while (this.session.length < 20) {
this.session = this.session + this.charTable.charAt(Math.round(Math.random() * (this.charTable.length - 1)));
}
this.charTableIndex = new Array();
var i = 0;
while (i < this.charTable.length) {
this.charTableIndex[this.charTable.charCodeAt(i)] = i;
i++;
}
};
_global.api.highscore.submit = function (pGame, pDisciple, pScore0, pScore1) {
var s = (("g=" + pGame) + "&");
s = s + (("d=" + pDisciple) + "&");
s = s + (("s0=" + pScore0) + "&");
s = s + (("s1=" + pScore1) + "&");
s = s + ("se=" + escape(session));
s = s + "&c=42";
var urlSubmit = ((this.urlSubmit + "?s=") + escape(this.encrypt(this.encrypt(s, this.keystring), this.keystring2)));
getURL (urlSubmit, "_blank");
};
_global.api.highscore.encrypt = function (text, pKey) {
var crypt = "";
var checkSum = 0;
var shift;
var code;
var i = 0;
while (i < text.length) {
char = this.charTableIndex[text.charCodeAt(i)];
shift = this.charTableIndex[pKey.charCodeAt(i % pKey.length)];
code = (char + shift) + checkSum;
code = code % this.charTable.length;
crypt = crypt + this.charTable.charAt(code);
checkSum = checkSum + code;
i++;
}
checkSum = checkSum % this.charTable.length;
return((crypt + "") + this.charTable.charAt(checkSum));
};
_global.api.highscore.charTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&=.";
_global.api.highscore.keystring = "whytheheckdoyouwasteyourtimehackingthishighscorelist";
_global.api.highscore.keystring2 = "AnotherKey4You2FindOut4815jiagIOm30JK";
_global.api.highscore.urlSubmit = "http://www.neodelight.com/v4/high_enter.php";
_global.api.highscore.initSession();
#endinitclip
_visible = false;
Symbol 69 MovieClip Frame 1
stop();
Symbol 71 Button
on (release) {
getURL ("http://www.neodelight.com?ref=superfishing&ref_loc=intro", "_BLANK");
}
Symbol 77 MovieClip Frame 1
trace((_parent._currentframe + "/") + _parent._totalframes);
Symbol 77 MovieClip Frame 2
trace((_parent._currentframe + "/") + _parent._totalframes);
Symbol 83 MovieClip Frame 1
startFrame = _parent._currentframe;
Symbol 83 MovieClip Frame 2
vol = (1 - ((_parent._currentFrame - startFrame) / (_parent._totalFrames - startFrame))) * 100;
if (vol < 0) {
vol = 0;
}
_parent.snd.setVolume(vol);
Symbol 83 MovieClip Frame 3
gotoAndPlay (2);
Symbol 84 MovieClip Frame 1
snd = new Sound(this);
snd.setVolume(100);
_parent.stop();
Symbol 84 MovieClip Frame 123
stop();
_parent.play();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 20
gotoAndStop (1);
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 20
gotoAndStop (1);
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 8
play();
display = "+" + _root.actCatchDisplay;
Symbol 138 MovieClip Frame 20
gotoAndStop (2);
Symbol 138 MovieClip Frame 21
play();
display = _root.actCatchDisplay;
Symbol 138 MovieClip Frame 33
gotoAndStop (2);
Symbol 138 MovieClip Frame 34
play();
display = "+" + _root.actCatchDisplay;
display2 = "X" + _root.actMultiCatchDisplay;
Symbol 138 MovieClip Frame 59
gotoAndStop (2);
Symbol 153 Button
on (release) {
_root.startGame();
}
Symbol 157 Button
on (release) {
getURL (("http://www.neodelight.com/downloads/" + _root.gameName) + ".exe");
}
Symbol 160 Button
on (release) {
if (_url.indexOf("playaholics") != -1) {
getURL (("http://www.neodelight.com/highscores_" + _root.gameName) + "_.html", "_blank");
} else {
getURL (("http://www.neodelight.com/highscores_" + _root.gameName) + "_.html", "_TOP");
}
}
Symbol 163 Button
on (release) {
if (_url.indexOf("playaholics") != -1) {
getURL ("http://www.playaholics.com/games.php", "_TOP");
} else {
getURL ((("http://www.neodelight.com?ref=" + _root.gameName) + "&ref_loc=moregames&ref_ver=") + _root.version, "_TOP");
}
}
Symbol 174 Button
on (release) {
_root.showMenu();
}
Symbol 178 Button
on (release) {
_root.submitScore();
}
Symbol 181 Button
on (release) {
_root.showMenu();
}
Symbol 187 Button
on (release) {
_root.startGame();
}
Symbol 192 Button
on (release) {
this.game = "superfishing";
this.score = _root.actScore;
this.getURL("http://www.playaholics.com/comp_entry.php", "_top", "POST");
}
Symbol 195 Button
on (release) {
this.game = "superfishing";
this.score = _root.actScore;
this.getURL("http://www.chickstop.com/games/submitscore/index.php", "_top", "POST");
}
Symbol 196 MovieClip Frame 1
display = "score: " + _root.actScore;
if ((_url.indexOf("playaholics") != -1) || (_url.indexOf("lightning-games") != -1)) {
if (_root.actScore >= 1000) {
gotoAndStop (4);
} else {
gotoAndStop (3);
}
} else if (_url.indexOf("chickstop") != -1) {
if (_root.actScore >= 1000) {
gotoAndStop (6);
} else {
gotoAndStop (5);
}
} else if (_root.actScore <= 0) {
stop();
}
Symbol 196 MovieClip Frame 2
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 6
stop();
Symbol 197 MovieClip Frame 37
gotoAndStop (6);
Symbol 197 MovieClip Frame 58
stop();
Symbol 210 Button
on (release) {
var s = new Sound();
s.setVolume(0);
_root.snd.active = 0;
nextFrame();
}
Symbol 214 Button
on (release) {
_root.snd.active = 1;
prevFrame();
}
Symbol 216 Button
on (release) {
var s = new Sound();
s.setVolume(100);
_root.snd.active = 1;
prevFrame();
}
Symbol 217 MovieClip Frame 1
stop();