Frame 1
function doPlay() {
play();
clearInterval(delayID);
}
stop();
var delayID;
onEnterFrame = function () {
intro.loading.value.text = Math.floor((100 * this.getBytesLoaded()) / this.getBytesTotal()) + "%";
if ((this.getBytesLoaded() == this.getBytesTotal()) && (this.getBytesTotal() != 0)) {
delayID = setInterval(this, "doPlay", 2000);
delete this.onEnterFrame;
}
};
Frame 2
stop();
var bgSound = new Sound();
bgSound.attachSound("bgMusic");
bgSound.onSoundComplete = function () {
this.start();
};
bgSound.start();
Frame 3
stop();
the_game.bootstap();
Symbol 21 Button
on (press) {
getURL ("http://www.frontnetwork.com");
}
Symbol 28 MovieClip [fishSymbol] Frame 1
stop();
Symbol 76 MovieClip [playerSymbol] Frame 1
stop();
Symbol 80 MovieClip [scoreIndicator] Frame 31
this.removeMovieClip();
Symbol 83 MovieClip [levelIndicator] Frame 38
owner.dispatchEvent({type:"onLevelStart", target:owner, level:level.text});
this.removeMovieClip();
Symbol 89 MovieClip [timeBall] Frame 1
stop();
Symbol 94 MovieClip [scoreBall] Frame 1
stop();
Symbol 97 Button
on (release) {
owner.currentScene.replay();
}
Symbol 101 MovieClip [Sprite] Frame 1
#initclip 25
Object.registerClass("Sprite", Sprite);
#endinitclip
Symbol 102 MovieClip [Background] Frame 1
#initclip 26
Object.registerClass("Background", Background);
#endinitclip
stop();
Symbol 103 MovieClip [Fish] Frame 1
#initclip 27
Object.registerClass("Fish", Fish);
#endinitclip
stop();
Symbol 104 MovieClip [Player] Frame 1
#initclip 28
Object.registerClass("Player", Player);
#endinitclip
stop();
Symbol 105 MovieClip [Game] Frame 1
#initclip 29
Object.registerClass("Game", Game);
#endinitclip
stop();
Symbol 141 MovieClip Frame 1
stop();
stop();
Symbol 141 MovieClip Frame 25
_parent.play();
this.removeMovieClip();
Symbol 144 Button
on (release) {
bgSound.setVolume(10);
info.play();
}
Symbol 149 Button
on (press) {
getURL ("http://www.t45ol.com");
}
Symbol 100 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
var fishList, keyBuffer, dispatchEvent, attachMovie, player, scoreBall, timeBall, replay, level;
function Game () {
super();
mx.events.EventDispatcher.initialize(this);
fishList = new Object();
keyBuffer = new Object();
Key.addListener(this);
}
function set rate(n) {
__rate = n;
dispatchEvent({type:"onRateChanged", target:this});
//return(rate);
}
function get rate() {
return(__rate);
}
function setBackground(lkg) {
return(Background(attachMovie(Background.symbolName, "background", BACKGROUND_LEVEL, {host:this, symbolLinkage:lkg})));
}
function createPlayer(lkg) {
if (player != undefined) {
player.destroy();
}
player = Player(attachMovie(Player.symbolName, "player", PLAYER_LEVEL, {host:this, symbolLinkage:lkg}));
player.adjustSymbol({_xscale:30, _yscale:30});
player.move(0, -80);
return(player);
}
function getPlayer() {
return(player);
}
function createFish(lkg) {
var _local2 = lcount++;
var _local3 = "fish" + _local2;
var _local4 = Fish(attachMovie(Fish.symbolName, _local3, FISH_BASE_LEVEL + _local2, {host:this, symbolLinkage:lkg}));
fishList[_local3] = _local4;
return(_local4);
}
function getFish(name) {
return(fishList[name]);
}
function deleteFish(name) {
fishList[name].destroy();
delete fishList[name];
}
function deleteAllFish() {
for (var _local2 in fishList) {
deleteFish(_local2);
}
fishList = new Object();
lcount = 0;
scount = 0;
}
function getFishNum() {
var _local2 = 0;
for (var _local3 in fishList) {
_local2++;
}
return(_local2);
}
function showScoreIndicator(n, x, y) {
var _local2 = scount++;
var _local3 = attachMovie(scoreIndicatorLkg, "s" + _local2, SCORE_BASE_LEVEL + _local2, {_x:x, _y:y});
_local3.score.value.text = n;
}
function showLevelIndicator(str) {
var _local3 = scount++;
var _local2 = attachMovie(levelIndicatorLkg, "levelIndicator", LEVEL_LEVEL, {owner:this});
_local2.level.value.text = str;
}
function getScoreBall() {
if (scoreBall == undefined) {
attachMovie(scoreBallLkg, "scoreBall", SCOREBALL_LEVEL, {owner:this, _xscale:20, _yscale:20, _x:-200, _y:160});
}
scoreBall._visible = false;
return(scoreBall);
}
function getTimeBall() {
if (timeBall == undefined) {
attachMovie(timeBallLkg, "timeBall", TIMEBALL_LEVEL, {owner:this, _xscale:28, _yscale:28, _x:-240, _y:160});
}
timeBall._visible = false;
return(timeBall);
}
function getReplay() {
if (replay == undefined) {
attachMovie(replayLkg, "replay", REPLAY_LEVEL, {owner:this, _x:-260, _y:160});
}
replay._visible = false;
return(replay);
}
function getLevel() {
if (level == undefined) {
attachMovie(levelLkg, "level", LEVEL2_LEVEL, {owner:this, _x:200, _y:160, _xscale:30, _yscale:30});
}
level._visible = false;
return(level);
}
function bootstap() {
(new scenes.SceneLevel01(this)).start();
}
function onKeyDown() {
if ((Key.getCode() == KEYCODE_LEFT) && (!keyBuffer[KEYCODE_LEFT])) {
dispatchEvent({type:"onLeftKeyDown", target:this});
keyBuffer[KEYCODE_LEFT] = true;
} else if ((Key.getCode() == KEYCODE_RIGHT) && (!keyBuffer[KEYCODE_RIGHT])) {
dispatchEvent({type:"onRightKeyDown", target:this});
keyBuffer[KEYCODE_RIGHT] = true;
} else if ((Key.getCode() == KEYCODE_ATTACK) && (!keyBuffer[KEYCODE_ATTACK])) {
dispatchEvent({type:"onAttachKeyDown", target:this});
keyBuffer[KEYCODE_ATTACK] = true;
}
}
function onKeyUp() {
if (Key.getCode() == KEYCODE_LEFT) {
dispatchEvent({type:"onLeftKeyUp", target:this});
delete keyBuffer[KEYCODE_LEFT];
} else if (Key.getCode() == KEYCODE_RIGHT) {
dispatchEvent({type:"onRightKeyUp", target:this});
delete keyBuffer[KEYCODE_RIGHT];
} else if (Key.getCode() == KEYCODE_ATTACK) {
delete keyBuffer[KEYCODE_ATTACK];
}
}
static var KEYCODE_LEFT = 37;
static var KEYCODE_RIGHT = 39;
static var KEYCODE_ATTACK = 32;
static var KEYCODE_START = 13;
static var BACKGROUND_LEVEL = 0;
static var PLAYER_LEVEL = 10;
static var FISH_BASE_LEVEL = 20;
static var SCORE_BASE_LEVEL = 100000;
static var TIMEBALL_LEVEL = 200000;
static var SCOREBALL_LEVEL = 200001;
static var REPLAY_LEVEL = 200002;
static var LEVEL_LEVEL = 200003;
static var LEVEL2_LEVEL = 200004;
var lcount = 0;
var scount = 0;
var scoreIndicatorLkg = "scoreIndicator";
var levelIndicatorLkg = "levelIndicator";
var levelLkg = "level";
var scoreBallLkg = "scoreBall";
var timeBallLkg = "timeBall";
var replayLkg = "replay";
var __rate = 40;
}
Symbol 106 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent == undefined) {
_local1[eventObj.type](eventObj);
} else {
_local1.handleEvent(eventObj);
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
}
Symbol 107 MovieClip [__Packages.Sprite] Frame 0
class Sprite extends MovieClip
{
var __symbolLinkage, attachMovie, dispatchEvent, symbol, hasOwnProperty, _x, _y, removeMovieClip;
function Sprite () {
super();
initFromClipParameters();
mx.events.EventDispatcher.initialize(this);
}
function set symbolLinkage(sl) {
__symbolLinkage = sl;
attachMovie(sl, "symbol", 0);
dispatchEvent({type:"symbolChanged", target:this});
//return(symbolLinkage);
}
function get symbolLinkage() {
return(__symbolLinkage);
}
function get direction() {
return(__dir);
}
function set direction(dir) {
if (dir == 1) {
symbol._xscale = Math.abs(symbol._xscale);
__dir = 1;
} else {
symbol._xscale = -Math.abs(symbol._xscale);
__dir = -1;
}
//return(direction);
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function adjustSymbol(obj) {
for (var _local3 in obj) {
symbol[_local3] = obj[_local3];
}
}
function move(x, y) {
_x = x;
_y = y;
}
function vFlipSymbol() {
symbol._xscale = -symbol._xscale;
}
function destroy() {
dispatchEvent({type:"destroy", target:this});
symbol.removeMovieClip();
removeMovieClip();
}
static var symbolName = "Sprite";
var __dir = 1;
var clipParameters = {symbolLinkage:1};
}
Symbol 108 MovieClip [__Packages.Background] Frame 0
class Background extends Sprite
{
var __host, dispatchEvent;
function Background () {
super();
}
function set host(g) {
__host = g;
dispatchEvent({type:"hostChanged", target:this});
//return(host);
}
function get host() {
return(__host);
}
static var symbolName = "Background";
}
Symbol 109 MovieClip [__Packages.pawaca.as.utils.Reiteration] Frame 0
class pawaca.as.utils.Reiteration extends Object
{
var __func, __vid;
function Reiteration (func) {
super();
__func = func;
}
function isRunning() {
return(__isRunning);
}
function setRate(r) {
if (isRunning()) {
stop();
__rate = r;
start();
} else {
__rate = r;
}
}
function getFunction() {
return(__func);
}
function getRate() {
return(__rate);
}
function start() {
if (isRunning()) {
trace("Reiteration is running");
return(undefined);
}
__isRunning = true;
__vid = setInterval(__func, __rate);
}
function stop() {
__isRunning = false;
clearInterval(__vid);
}
var __isRunning = false;
var __rate = 40;
}
Symbol 110 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 111 MovieClip [__Packages.pawaca.as.timeline.TimelineSegment] Frame 0
class pawaca.as.timeline.TimelineSegment
{
var __startFrame, __totalFrames, __hostSymbol, __runDriver, __startFrameNum, __markLoopFlag, dispatchEvent;
function TimelineSegment (hs, startFrame, length) {
mx.events.EventDispatcher.initialize(this);
__startFrame = startFrame;
__totalFrames = length;
__hostSymbol = hs;
__runDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, run));
__startFrameNum = calcFrameNum(__startFrame);
}
function calcFrameNum(fr) {
if (typeof(fr) == "number") {
return(fr);
}
var _local4 = __hostSymbol._currentframe;
__hostSymbol.gotoAndStop(fr);
var _local2 = __hostSymbol._currentframe;
__hostSymbol.gotoAndStop(_local4);
return(_local2);
}
function setHostSymbol(hs) {
if ((!isRunning()) && (!isPaused())) {
__hostSymbol = hs;
}
}
function getHostSymbol() {
return(__hostSymbol);
}
function setStartFrame(startFrame) {
if ((!isRunning()) && (!isPaused())) {
__startFrame = startFrame;
__startFrameNum = calcFrameNum(__startFrame);
}
}
function getStartFrame() {
return(__startFrame);
}
function getStartFrameNum() {
return(__startFrameNum);
}
function setTotalFrames(n) {
if ((!isRunning()) && (!isPaused())) {
__totalFrames = n;
}
}
function getTotalFrames() {
return(__totalFrames);
}
function getCurrentFrame() {
return(__nextFrameOffset - 1);
}
function setLoop(b) {
__loop = b;
}
function setRate(r) {
__runDriver.setRate(r);
}
function getRate() {
return(__runDriver.getRate());
}
function isLoop() {
return(__loop);
}
function isPaused() {
return(__pause);
}
function isRunning() {
return(__runDriver.isRunning());
}
function markLoop(lf) {
__markLoopFlag = lf;
}
function start() {
if ((!isRunning()) && (!isPaused())) {
reset();
__runDriver.start();
dispatchEvent({type:"onFrameStart", target:this});
}
}
function stop() {
__runDriver.stop();
__pause = false;
dispatchEvent({type:"onFrameEnd", target:this});
}
function pause() {
if (isRunning()) {
__runDriver.stop();
__pause = true;
dispatchEvent({type:"onFramePaused", target:this});
}
}
function resume() {
if (isPaused()) {
__runDriver.start();
__pause = false;
dispatchEvent({type:"onFrameResumed", target:this});
}
}
function releaseHostSymbol() {
stop();
setHostSymbol();
}
function reset() {
__hostSymbol.gotoAndStop(__startFrame);
__nextFrameOffset = 1;
}
function stepFrame() {
__hostSymbol.gotoAndStop(__startFrameNum + (__nextFrameOffset++));
dispatchEvent({type:"onFrameStep", target:this});
}
function run() {
if ((__nextFrameOffset - 1) == __totalFrames) {
if (!isLoop()) {
stop();
} else if (__markLoopFlag != undefined) {
__hostSymbol.gotoAndStop(__markLoopFlag);
__nextFrameOffset = calcFrameNum(__markLoopFlag) - __startFrameNum;
} else {
reset();
}
} else {
stepFrame();
}
}
function toString() {
return((((("[TimelineSegment] host symbol='" + __hostSymbol) + "' ") + "start frame='") + __startFrame) + "'");
}
var __nextFrameOffset = 1;
var __loop = false;
var __pause = false;
}
Symbol 112 MovieClip [__Packages.pawaca.as.timeline.Action] Frame 0
class pawaca.as.timeline.Action extends pawaca.as.timeline.TimelineSegment
{
function Action (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(true);
}
function pause() {
if (canPause()) {
super.pause();
}
}
}
Symbol 113 MovieClip [__Packages.actions.player.LeftWalk] Frame 0
class actions.player.LeftWalk extends pawaca.as.timeline.Action
{
var setLoop, walkDriver, owner, setRate, getRate, qid, stop;
function LeftWalk (hs, startFrame, length) {
super(hs, startFrame, length);
setLoop(true);
walkDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, doWalk));
}
function canPause() {
return(true);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onLeftKeyDown", this);
_local2.removeEventListener("onLeftKeyUp", this);
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onLeftKeyDown", this);
_local2.addEventListener("onLeftKeyUp", this);
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doWalk() {
if (owner._x > -170) {
if (owner.direction != dir) {
owner.direction = dir;
}
owner._x = owner._x + (((dir * speed) * 40) / getRate());
}
}
function onFrameStartHandler() {
walkDriver.start();
}
function onFrameEndHandler() {
walkDriver.stop();
}
function onFramePausedHandler() {
walkDriver.stop();
}
function onFrameResumedHandler() {
walkDriver.start();
}
function onLeftKeyDown() {
if ((qid == null) && (owner.enable)) {
qid = owner.queueAction(this);
}
}
function onLeftKeyUp() {
stop();
owner.removeActionByKey(qid);
qid = null;
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onLeftKeyDown", this);
_local3.removeEventListener("onLeftKeyUp", this);
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
var dir = -1;
var speed = 10;
}
Symbol 114 MovieClip [__Packages.actions.player.RightWalk] Frame 0
class actions.player.RightWalk extends pawaca.as.timeline.Action
{
var setLoop, walkDriver, owner, setRate, getRate, qid, stop;
function RightWalk (hs, startFrame, length) {
super(hs, startFrame, length);
setLoop(true);
walkDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, doWalk));
}
function canPause() {
return(true);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRightKeyDown", this);
_local2.removeEventListener("onRightKeyUp", this);
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRightKeyDown", this);
_local2.addEventListener("onRightKeyUp", this);
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doWalk() {
if (owner._x < 200) {
if (owner.direction != dir) {
owner.direction = dir;
}
owner._x = owner._x + (((dir * speed) * 40) / getRate());
}
}
function onFrameStartHandler() {
walkDriver.start();
}
function onFrameEndHandler() {
walkDriver.stop();
}
function onFramePausedHandler() {
walkDriver.stop();
}
function onFrameResumedHandler() {
walkDriver.start();
}
function onRightKeyDown() {
if ((qid == null) && (owner.enable)) {
qid = owner.queueAction(this);
}
}
function onRightKeyUp() {
stop();
owner.removeActionByKey(qid);
qid = null;
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRightKeyDown", this);
_local3.removeEventListener("onRightKeyUp", this);
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
var dir = 1;
var speed = 10;
}
Symbol 115 MovieClip [__Packages.actions.player.Attack] Frame 0
class actions.player.Attack extends pawaca.as.timeline.Action
{
var owner, setRate, qid;
function Attack (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onAttachKeyDown", this);
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onAttachKeyDown", this);
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function onFrameStartHandler() {
owner.dispatchEvent({type:"onPlayerAttack", target:owner});
}
function onFrameEndHandler() {
owner.dispatchEvent({type:"onPlayerAttackEnd", target:owner});
owner.removeActionByKey(qid);
qid = null;
}
function onAttachKeyDown() {
if ((qid == null) && (owner.enable)) {
qid = owner.queueAction(this);
}
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onAttachKeyDown", this);
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
}
Symbol 116 MovieClip [__Packages.actions.player.Breath] Frame 0
class actions.player.Breath extends pawaca.as.timeline.Action
{
var setLoop, owner, setRate;
function Breath (hs, startFrame, length) {
super(hs, startFrame, length);
setLoop(true);
}
function canPause() {
return(true);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
}
Symbol 117 MovieClip [__Packages.actions.player.Cry] Frame 0
class actions.player.Cry extends pawaca.as.timeline.Action
{
var setLoop, owner, setRate, qid;
function Cry (hs, startFrame, length) {
super(hs, startFrame, length);
setLoop(true);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doQueue() {
if (qid == null) {
qid = owner.queueAction(this);
}
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
owner.removeActionByKey(qid);
qid = null;
super.releaseHostSymbol();
}
}
Symbol 118 MovieClip [__Packages.actions.player.Laugh] Frame 0
class actions.player.Laugh extends pawaca.as.timeline.Action
{
var owner, setRate, qid;
function Laugh (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doQueue() {
if (qid == null) {
qid = owner.queueAction(this);
}
}
function onFrameEndHandler() {
owner.dispatchEvent({type:"onWinLevel01", target:owner});
owner.removeActionByKey(qid);
qid = null;
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
}
Symbol 119 MovieClip [__Packages.actions.player.Bear] Frame 0
class actions.player.Bear extends pawaca.as.timeline.Action
{
var owner, setRate, qid;
function Bear (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doQueue() {
if (qid == null) {
qid = owner.queueAction(this);
}
}
function onFrameEndHandler() {
owner.dispatchEvent({type:"onWinLevel", target:owner});
owner.removeActionByKey(qid);
qid = null;
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
}
Symbol 120 MovieClip [__Packages.actions.player.Bush] Frame 0
class actions.player.Bush extends pawaca.as.timeline.Action
{
var markLoop, setLoop, owner, setRate, qid;
function Bush (hs, startFrame, length) {
super(hs, startFrame, length);
markLoop("bushloop");
setLoop(true);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function doQueue() {
if (qid == null) {
qid = owner.queueAction(this);
}
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
owner.removeActionByKey(qid);
qid = null;
super.releaseHostSymbol();
}
}
Symbol 121 MovieClip [__Packages.actions.player.BushStart] Frame 0
class actions.player.BushStart extends pawaca.as.timeline.Action
{
var owner, setRate, qid;
function BushStart (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function onFrameEndHandler() {
owner.dispatchEvent({type:"onStart", target:owner});
owner.removeActionByKey(qid);
qid = null;
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
function doQueue() {
if (qid == null) {
qid = owner.queueAction(this);
}
}
}
Symbol 122 MovieClip [__Packages.Player] Frame 0
class Player extends Sprite
{
var actionList, keys, lwalk, symbol, rwalk, breath, attack, laugh, cry, bear, bush, bushStart, __host, dispatchEvent, prevAction;
function Player () {
super();
actionList = new Array();
keys = new Object();
lwalk = new actions.player.LeftWalk(symbol, "walk", 4);
lwalk.setOwner(this);
rwalk = new actions.player.RightWalk(symbol, "walk", 4);
rwalk.setOwner(this);
breath = new actions.player.Breath(symbol, "breath", 5);
breath.setOwner(this);
attack = new actions.player.Attack(symbol, "attack", 9);
attack.setOwner(this);
laugh = new actions.player.Laugh(symbol, "laugh", 34);
laugh.setOwner(this);
cry = new actions.player.Cry(symbol, "cry", 6);
cry.setOwner(this);
bear = new actions.player.Bear(symbol, "bear", 73);
bear.setOwner(this);
bush = new actions.player.Bush(symbol, "bush", 50);
bush.setOwner(this);
bushStart = new actions.player.BushStart(symbol, "start", 56);
bushStart.setOwner(this);
queueAction(breath);
}
function set host(g) {
__host = g;
dispatchEvent({type:"hostChanged", target:this});
//return(host);
}
function get host() {
return(__host);
}
function set score(n) {
__score = n;
dispatchEvent({type:"scoreChanged", target:this});
//return(score);
}
function get score() {
return(__score);
}
function get enable() {
return(__enable);
}
function set enable(e) {
__enable = e;
//return(enable);
}
function doCry() {
cry.doQueue();
}
function doLaugh() {
laugh.doQueue();
}
function doBear() {
bear.doQueue();
}
function doBush() {
bush.doQueue();
}
function doStart() {
bushStart.doQueue();
}
function getHitPoint() {
return(symbol.__hp__);
}
function fishIt(f) {
score = (score + f.getValue());
var _local3 = getHitPoint();
var _local2 = {x:_local3._x, y:_local3._y};
_local3._parent.localToGlobal(_local2);
host.globalToLocal(_local2);
host.showScoreIndicator(f.getValue(), _local2.x, _local2.y);
f.onAttacked(this);
}
function queueAction(a) {
var _local3 = String(qcount++);
actionList.push(a);
keys[_local3] = actionList.length - 1;
if (prevAction != undefined) {
if (prevAction.canPause()) {
prevAction.pause();
prevAction = a;
a.start();
}
} else {
prevAction = a;
a.start();
}
return(_local3);
}
function removeActionByKey(k) {
var _local2 = keys[k];
var _local5 = actionList[_local2];
actionList.splice(_local2, 1);
delete keys[k];
for (var _local4 in keys) {
if (keys[_local4] > _local2) {
keys[_local4]--;
}
}
if (!prevAction.isRunning()) {
var _local3 = actionList[actionList.length - 1];
if (_local3.isPaused()) {
prevAction = _local3;
_local3.resume();
} else if (!_local3.isRunning()) {
prevAction = _local3;
_local3.start();
}
}
}
function destroy() {
lwalk.releaseHostSymbol();
rwalk.releaseHostSymbol();
attack.releaseHostSymbol();
breath.releaseHostSymbol();
cry.releaseHostSymbol();
laugh.releaseHostSymbol();
bush.releaseHostSymbol();
bear.releaseHostSymbol();
bushStart.releaseHostSymbol();
super.destroy();
}
static var symbolName = "Player";
var __score = 0;
var __enable = true;
var qcount = 0;
var clipParameters = {symbolLinkage:1, host:1};
}
Symbol 123 MovieClip [__Packages.actions.fish.Jump] Frame 0
class actions.fish.Jump extends pawaca.as.timeline.Action
{
var owner, setRate;
function Jump (hs, startFrame, length) {
super(hs, startFrame, length);
}
function canPause() {
return(false);
}
function setOwner(ow) {
if (owner != undefined) {
var _local2 = owner.host;
_local2.removeEventListener("onRateChanged", this);
}
owner = ow;
var _local2 = owner.host;
_local2.addEventListener("onRateChanged", this);
setRate(_local2.__get__rate());
}
function onRateChanged(e) {
setRate(e.target.rate);
}
function releaseHostSymbol() {
var _local3 = owner.host;
_local3.removeEventListener("onRateChanged", this);
super.releaseHostSymbol();
}
}
Symbol 124 MovieClip [__Packages.Fish] Frame 0
class Fish extends Sprite
{
var __jump, symbol, __attackMonitor, __hplayer, __host, dispatchEvent, _name;
function Fish () {
super();
__jump = new actions.fish.Jump(symbol, 1, 32);
__jump.setOwner(this);
__jump.addEventListener("onFrameEnd", this);
__attackMonitor = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, checkAttack));
}
function set host(g) {
if (__hplayer != undefined) {
__hplayer.removeEventListener("onPlayerAttack", this);
__hplayer.removeEventListener("onPlayerAttackEnd", this);
}
__host = g;
__hplayer = g.getPlayer();
__hplayer.addEventListener("onPlayerAttack", this);
__hplayer.addEventListener("onPlayerAttackEnd", this);
dispatchEvent({type:"hostChanged", target:this});
//return(host);
}
function get host() {
return(__host);
}
function setValue(n) {
__value = n;
}
function getValue() {
return(__value);
}
function jump() {
__jump.start();
}
function checkAttack() {
var _local2 = __hplayer.getHitPoint();
if (symbol.theFish.hitTest(_local2) && (_local2 != undefined)) {
__hplayer.fishIt(this);
}
}
function killSelf() {
host.deleteFish(_name);
}
function onPlayerAttack(e) {
__attackMonitor.start();
}
function onPlayerAttackEnd(e) {
__attackMonitor.stop();
}
function onAttacked(p) {
__hplayer.removeEventListener("onPlayerAttack", this);
__hplayer.removeEventListener("onPlayerAttackEnd", this);
__attackMonitor.stop();
killSelf();
}
function onFrameEnd() {
killSelf();
}
static var symbolName = "Fish";
var __value = 100;
var clipParameters = {symbolLinkage:1, host:1};
}
Symbol 125 MovieClip [__Packages.Scene] Frame 0
class Scene
{
var game, next, prev;
function Scene (g) {
game = g;
}
function setNextScene(s) {
next = s;
}
function getNextScene(s) {
return((next = s));
}
function setPrevScene(s) {
prev = s;
}
function getPrevScene(s) {
return(prev);
}
function goNext() {
stop();
next.start();
}
function goPrev() {
stop();
prev.start();
}
function getSceneCenterPoint() {
return({x:Stage.width / 2, y:Stage.height / 2});
}
function start() {
}
function stop() {
}
}
Symbol 126 MovieClip [__Packages.scenes.SceneLevel03] Frame 0
class scenes.SceneLevel03 extends Scene
{
var fishDriver, timeDriver, game, failed, player, scoreBall, timeBall, replayBtn, level, delayid, getPrevScene;
function SceneLevel03 (g) {
super(g);
fishDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, randomFishBorn));
fishDriver.setRate(1000);
timeDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, timePassed));
timeDriver.setRate(timeOut / 100);
}
function start() {
game.currentScene = this;
game.addEventListener("onLevelStart", this);
game.showLevelIndicator("LEVEL 03");
game.setBackground("backgroundSymbol");
failed = false;
}
function onLevelStart() {
player = game.createPlayer("playerSymbol");
player.addEventListener("scoreChanged", this);
player.__set__enable(true);
scoreBall = game.getScoreBall();
timeBall = game.getTimeBall();
replayBtn = game.getReplay();
level = game.getLevel();
level.value.value.text = "LEVEL 03";
timeBall.gotoAndStop(100);
scoreBall.gotoAndStop(1);
timeBall._visible = true;
scoreBall._visible = true;
level._visible = true;
timeDriver.start();
fishDriver.start();
}
function randomFishBorn() {
var _local2 = game.createFish("fishSymbol");
var _local3 = (Stage.width / 2) - (_local2._width * 0.4);
var _local5 = (-Stage.width) / 2;
var _local4 = _local3 - _local5;
_local2.adjustSymbol({_xscale:40, _yscale:40});
_local2.move(Math.floor(Math.random() * _local4) - _local3, 100);
_local2.jump();
}
function timePassed() {
if (timeBall._currentframe == 2) {
player.__set__enable(false);
fishDriver.stop();
timeDriver.stop();
game.removeEventListener("onLevelStart", this);
failed = true;
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = true;
player.doCry();
}
timeBall.gotoAndStop(timeBall._currentframe - 1);
}
function scoreChanged(e) {
currentScore = e.target.score;
scoreBall.gotoAndStop(Math.floor((100 * currentScore) / preferScore));
if ((currentScore >= preferScore) && (!failed)) {
game.removeEventListener("onLevelStart", this);
player.__set__enable(false);
player.addEventListener("onWinLevel03", this);
delayid = setInterval(this, "win", delayAmount);
timeDriver.stop();
fishDriver.stop();
}
}
function win() {
player.doBush();
clearInterval(delayid);
}
function replay() {
level._visible = false;
getPrevScene().goPrev();
}
function stop() {
game.currentScene = null;
player.removeEventListener("onWinLevel03", this);
game.deleteAllFish();
player.destroy();
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = false;
level._visible = false;
}
function onWinLevel03() {
}
var currentScore = 0;
var preferScore = 800;
var timeOut = 10000;
var delayAmount = 2000;
}
Symbol 127 MovieClip [__Packages.scenes.SceneLevel02] Frame 0
class scenes.SceneLevel02 extends Scene
{
var fishDriver, timeDriver, setNextScene, game, failed, player, scoreBall, timeBall, replayBtn, level, delayid, goPrev, goNext;
function SceneLevel02 (g) {
super(g);
fishDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, randomFishBorn));
fishDriver.setRate(1000);
timeDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, timePassed));
timeDriver.setRate(timeOut / 100);
var _local3 = new scenes.SceneLevel03(g);
setNextScene(_local3);
_local3.setPrevScene(this);
}
function start() {
game.currentScene = this;
game.addEventListener("onLevelStart", this);
game.showLevelIndicator("LEVEL 02");
game.setBackground("backgroundSymbol");
failed = false;
}
function onLevelStart() {
player = game.createPlayer("playerSymbol");
player.addEventListener("scoreChanged", this);
player.__set__enable(true);
scoreBall = game.getScoreBall();
timeBall = game.getTimeBall();
replayBtn = game.getReplay();
level = game.getLevel();
level.value.value.text = "LEVEL 02";
timeBall.gotoAndStop(100);
scoreBall.gotoAndStop(1);
timeBall._visible = true;
scoreBall._visible = true;
level._visible = true;
timeDriver.start();
fishDriver.start();
}
function randomFishBorn() {
var _local2 = game.createFish("fishSymbol");
var _local3 = (Stage.width / 2) - (_local2._width * 0.4);
var _local5 = (-Stage.width) / 2;
var _local4 = _local3 - _local5;
_local2.adjustSymbol({_xscale:40, _yscale:40});
_local2.move(Math.floor(Math.random() * _local4) - _local3, 100);
_local2.jump();
}
function timePassed() {
if (timeBall._currentframe == 2) {
player.__set__enable(false);
fishDriver.stop();
timeDriver.stop();
game.removeEventListener("onLevelStart", this);
failed = true;
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = true;
player.doCry();
}
timeBall.gotoAndStop(timeBall._currentframe - 1);
}
function scoreChanged(e) {
currentScore = e.target.score;
scoreBall.gotoAndStop(Math.floor((100 * currentScore) / preferScore));
if ((currentScore >= preferScore) && (!failed)) {
game.removeEventListener("onLevelStart", this);
player.__set__enable(false);
player.addEventListener("onWinLevel", this);
delayid = setInterval(this, "win", delayAmount);
timeDriver.stop();
fishDriver.stop();
}
}
function win() {
player.doBear();
clearInterval(delayid);
}
function replay() {
level._visible = false;
goPrev();
}
function stop() {
game.currentScene = null;
player.removeEventListener("onWinLevel", this);
game.deleteAllFish();
player.destroy();
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = false;
level._visible = false;
}
function onWinLevel() {
goNext();
}
var currentScore = 0;
var preferScore = 1000;
var timeOut = 20000;
var delayAmount = 2000;
}
Symbol 128 MovieClip [__Packages.scenes.SceneLevel01] Frame 0
class scenes.SceneLevel01 extends Scene
{
var fishDriver, timeDriver, setNextScene, game, player, failed, scoreBall, timeBall, replayBtn, level, delayid, goNext;
function SceneLevel01 (g) {
super(g);
fishDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, randomFishBorn));
fishDriver.setRate(1000);
timeDriver = new pawaca.as.utils.Reiteration(mx.utils.Delegate.create(this, timePassed));
timeDriver.setRate(timeOut / 100);
var _local3 = new scenes.SceneLevel02(g);
setNextScene(_local3);
_local3.setPrevScene(this);
}
function start() {
game.currentScene = this;
game.setBackground("backgroundSymbol");
player = game.createPlayer("playerSymbol");
player.__set__enable(false);
player.doStart();
player.addEventListener("onStart", this);
failed = false;
}
function onLevelStart() {
player.__set__enable(true);
player.addEventListener("scoreChanged", this);
scoreBall = game.getScoreBall();
timeBall = game.getTimeBall();
replayBtn = game.getReplay();
level = game.getLevel();
timeBall.gotoAndStop(100);
scoreBall.gotoAndStop(1);
level.value.value.text = "LEVEL 01";
timeBall._visible = true;
scoreBall._visible = true;
level._visible = true;
timeDriver.start();
fishDriver.start();
}
function randomFishBorn() {
var _local2 = game.createFish("fishSymbol");
var _local6 = (Stage.width / 2) - (_local2._width * 0.4);
var _local3 = (-Stage.width) / 2;
var _local4 = _local6 - _local3;
var _local5 = Math.floor(Math.random() * _local4);
_local2.adjustSymbol({_xscale:40, _yscale:40});
_local2.move(_local5 + _local3, 100);
_local2.jump();
}
function timePassed() {
if (timeBall._currentframe == 2) {
player.__set__enable(false);
fishDriver.stop();
timeDriver.stop();
game.removeEventListener("onLevelStart", this);
failed = true;
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = true;
player.doCry();
}
timeBall.gotoAndStop(timeBall._currentframe - 1);
}
function scoreChanged(e) {
currentScore = e.target.score;
scoreBall.gotoAndStop(Math.floor((100 * currentScore) / preferScore));
if ((currentScore >= preferScore) && (!failed)) {
game.removeEventListener("onLevelStart", this);
player.__set__enable(false);
player.addEventListener("onWinLevel", this);
delayid = setInterval(this, "win", delayAmount);
timeDriver.stop();
fishDriver.stop();
}
}
function win() {
player.doBear();
clearInterval(delayid);
}
function replay() {
level._visible = false;
stop();
start();
}
function onStart() {
game.addEventListener("onLevelStart", this);
game.showLevelIndicator("LEVEL 01");
}
function stop() {
game.currentScene = null;
player.removeEventListener("onWinLevel", this);
player.removeEventListener("onStart", this);
game.deleteAllFish();
player.destroy();
timeBall._visible = false;
scoreBall._visible = false;
replayBtn._visible = false;
level._visible = false;
}
function onWinLevel() {
goNext();
}
var currentScore = 0;
var preferScore = 1000;
var timeOut = 30000;
var delayAmount = 1000;
}