Frame 5
function startPreload() {
this.onEnterFrame = function () {
nBytesLoaded = this.getBytesLoaded();
nBytesTotal = this.getBytesTotal();
nPercentage = ((!isNaN(nBytesLoaded / nBytesTotal)) ? (Math.ceil((nBytesLoaded * 100) / nBytesTotal)) : 0);
if (nPercentage > 100) {
nPercentage = 100;
}
if ((nBytesLoaded == nBytesTotal) && (nBytesTotal > 100)) {
trace("percent : " + this);
this.preloader_MC.loadBar._xscale = nPercentage;
this.gotoAndPlay(10);
delete this.onEnterFrame;
} else {
this.preloader_MC.loadBar._xscale = nPercentage;
}
};
}
stop();
var nBytesTotal;
var nBytesLoaded;
var nPercentage;
startPreload();
stop();
Frame 15
function deleteGameVars() {
trace("Deleting Game Vars");
__fc.deleteSingletons();
}
var __fc = (new com.sony.freshCatch.FreshCatch(this, true));
stop();
Symbol 5 MovieClip [mWhoa] Frame 1
stop();
Symbol 213 MovieClip [__Packages.com.scharpdevelopment.utils.Broadcaster] Frame 0
class com.scharpdevelopment.utils.Broadcaster extends AsBroadcaster
{
static var __instance;
var broadcastMessage;
function Broadcaster () {
super();
init();
}
function init() {
AsBroadcaster.initialize(this);
__instance = this;
}
function run(func, bTraceOut) {
arguments.shift();
if (bTraceOut) {
trace(((((">> (" + getTimer()) + ") BROADCAST MESSAGE CALLED :: ") + func) + " Arg1 :") + arguments[1]);
}
arguments.shift();
broadcastMessage(func, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
}
static function getInstance() {
if (!__instance) {
__instance = getInstance();
}
return(__instance);
}
}
Symbol 214 MovieClip [__Packages.com.sony.freshCatch.FreshCatch] Frame 0
class com.sony.freshCatch.FreshCatch
{
static var __mRootTarget, __instance, __bDemoPlaying;
var __bStandAlone, __bc;
function FreshCatch (mRootTarget, bStandAlone) {
__mRootTarget = mRootTarget;
__bStandAlone = bStandAlone;
__instance = this;
__bc = new com.scharpdevelopment.utils.Broadcaster();
init();
}
function init() {
new com.sony.freshCatch.Header(__bStandAlone);
com.sony.freshCatch.Controller.getInstance();
com.sony.freshCatch.Scenes.getInstance();
com.sony.freshCatch.TosserPenguin.getInstance();
com.sony.freshCatch.Catchers.getInstance();
com.sony.freshCatch.Meter.getInstance();
}
static function getRootTarget() {
return(__mRootTarget);
}
static function getLevel() {
return(__nLevel);
}
static function setLevel(nLevel) {
__nLevel = nLevel;
}
static function setDemoPlaying(bDemoPlaying) {
__bDemoPlaying = bDemoPlaying;
}
static function getDemoPlaying() {
return(__bDemoPlaying);
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.FreshCatch();
}
return(__instance);
}
static function deleteInstance() {
__instance = undefined;
}
function deleteSingletons() {
com.sony.freshCatch.Controller.deleteInstance();
com.sony.freshCatch.Scenes.deleteInstance();
com.sony.freshCatch.TosserPenguin.deleteInstance();
com.sony.freshCatch.Catchers.deleteInstance();
com.sony.freshCatch.Meter.deleteInstance();
deleteInstance();
com.sony.freshCatch.Clock.deleteInstance();
com.sony.freshCatch.FishBoard.deleteInstance();
}
static var __nLevel = 1;
var __nFishCaught = 0;
var __nMeterSpeed = 0;
}
Symbol 215 MovieClip [__Packages.com.sony.freshCatch.Header] Frame 0
class com.sony.freshCatch.Header
{
var __bStandAlone;
function Header (bStandAlone) {
__bStandAlone = bStandAlone;
init();
}
function init() {
if (__bStandAlone) {
var _local4 = com.sony.freshCatch.FreshCatch.getRootTarget().mBamboo.attachMovie("mSurfsUpLogo", "mSurfsUpLogo", 10);
_local4._y = 5;
_local4._x = 5;
var _local2 = com.sony.freshCatch.FreshCatch.getRootTarget().mBamboo.attachMovie("mFreshCatchLogo", "mFreshCatchLogo", 20);
_local2._y = 90;
_local2._x = 330;
} else {
var _local2 = com.sony.freshCatch.FreshCatch.getRootTarget().mBamboo.attachMovie("mFreshCatchLogo", "mFreshCatchLogo", 20);
_local2._y = 90;
_local2._x = 295;
}
var _local3 = new mx.transitions.Tween(_local2, "_yscale", mx.transitions.easing.Strong.easeOut, 10, 100, 0.5, true);
_local3.mTarget = _local2;
_local3.onMotionChanged = function () {
this.mTarget._xscale = this.mTarget._yscale;
};
logoButton();
musicButton();
com.sony.freshCatch.Clock.getInstance();
com.sony.freshCatch.FishBoard.getInstance();
}
function logoButton() {
var _local1 = com.sony.freshCatch.FreshCatch.getRootTarget().mBamboo.mFreshCatchLogo;
_local1.mHitArea.onRelease = function () {
if (!com.sony.freshCatch.FreshCatch.getDemoPlaying()) {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onLogoPressed");
} else {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onLogoPressed");
}
};
}
function musicButton() {
var _local2 = com.sony.freshCatch.FreshCatch.getRootTarget().mMusic;
_local2.sound.gotoAndPlay("on");
_local2.state = "on";
_local2.onRelease = function () {
if (this.state == "on") {
this.state = "off";
this.gotoAndStop(2);
this.sound.gotoAndStop("off");
} else {
this.state = "on";
this.gotoAndStop(1);
this.sound.gotoAndPlay("on");
}
};
}
}
Symbol 216 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 217 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 218 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 219 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 220 MovieClip [__Packages.com.sony.freshCatch.Clock] Frame 0
class com.sony.freshCatch.Clock
{
static var __instance;
var __mTarget, __tfTime, __bTimesUp;
function Clock () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mClock;
com.scharpdevelopment.utils.Broadcaster.getInstance().addListener(this);
init();
}
function init() {
new com.scharpdevelopment.utils.Timer(1000);
com.scharpdevelopment.utils.Timer.setCountdown();
__tfTime = new TextFormat();
__tfTime.font = "TikiIsland";
__tfTime.color = 2758164 /* 0x2A1614 */;
__tfTime.size = 22;
__tfTime.bold = true;
}
function onTimeChanged(oTime) {
__mTarget.txtTime.text = oTime.second;
__mTarget.txtTime.setTextFormat(__tfTime);
__mTarget.txtTime.embedFonts = true;
__mTarget.txtTime.antiAliasType = "advanced";
if (oTime.second == 0) {
com.scharpdevelopment.utils.Timer.stopTimer();
__bTimesUp = true;
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onTimesUp");
}
}
function startClock() {
__bTimesUp = false;
com.scharpdevelopment.utils.Timer.startTimer();
}
function stopClock() {
com.scharpdevelopment.utils.Timer.stopTimer();
}
function setClock(oTime) {
com.scharpdevelopment.utils.Timer.setTime(oTime);
onTimeChanged(oTime);
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.Clock();
}
return(__instance);
}
static function deleteInstance() {
com.scharpdevelopment.utils.Timer.clearVars();
__instance = null;
}
}
Symbol 221 MovieClip [__Packages.com.scharpdevelopment.utils.Timer] Frame 0
class com.scharpdevelopment.utils.Timer
{
static var __nTiming, __instance, __bCountdown, __nInt, __nHour, __nMinute, __nSecond;
var __oTime;
function Timer (nTiming) {
__oTime = new Object({hour:0, minute:0, second:0});
__nTiming = nTiming;
__instance = this;
}
function tick() {
if (!__bCountdown) {
__oTime.second = __oTime.second + 1;
if (__oTime.second > 59) {
__oTime.second = 0;
__oTime.minute = __oTime.minute + 1;
if (__oTime.minute > 59) {
__oTime.minute = 0;
__oTime.hour = __oTime.hour + 1;
if (__oTime.hour > 23) {
__oTime.hour = 0;
}
}
}
} else {
__oTime.second = __oTime.second - 1;
if ((__oTime.minute != 0) && (__oTime.hour != 0)) {
if (__oTime.second < 0) {
__oTime.second = 59;
__oTime.minute = __oTime.minute - 1;
if (__oTime.minute < 0) {
__oTime.minute = 59;
__oTime.hour = __oTime.hour - 1;
if (__oTime.hour < 0) {
__oTime.hour = 23;
}
}
}
}
}
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onTimeChanged", false, __oTime);
}
static function stopTimer() {
clearInterval(__nInt);
}
static function startTimer() {
__nInt = setInterval(__instance, "tick", __nTiming);
}
static function setTiming(nTiming) {
__nTiming = nTiming;
}
static function getTime() {
return(getInstance().__oTime);
}
static function setTime(oTime) {
trace("SET TIME:: " + oTime.second);
getInstance().__oTime = oTime;
}
static function setCountdown() {
__bCountdown = true;
}
static function getInstance() {
if (__instance == null) {
__instance = new com.scharpdevelopment.utils.Timer();
}
return(__instance);
}
static function clearVars() {
stopTimer();
__nTiming = undefined;
__nHour = undefined;
__nMinute = undefined;
__nSecond = undefined;
getInstance().__oTime = undefined;
__bCountdown = undefined;
__instance = null;
}
}
Symbol 222 MovieClip [__Packages.com.sony.freshCatch.FishBoard] Frame 0
class com.sony.freshCatch.FishBoard
{
static var __instance;
var __mTarget, __mNoPoint, __mOnePoint, __mTwoPoints, __aInt;
function FishBoard () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mFishBoard;
init();
}
function init() {
__mNoPoint = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.attachMovie("mNoPoint", "mNoPoint", 10);
__mOnePoint = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.attachMovie("mOnePoint", "mOnePoint", 20);
__mTwoPoints = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.attachMovie("mTwoPoints", "mTwoPoints", 30);
__mNoPoint._x = (__mOnePoint._x = (__mTwoPoints._x = 520));
__mNoPoint._y = (__mOnePoint._y = (__mTwoPoints._y = 85));
__mNoPoint._alpha = (__mOnePoint._alpha = (__mTwoPoints._alpha = 0));
__aInt = new Array();
}
static function updateCounter(nNumber) {
var _local2 = __nCounter;
__nCounter = __nCounter + nNumber;
if (__nCounter < 0) {
__nCounter = 0;
}
if (nNumber > 0) {
var _local1 = _local2;
while (_local1 <= __nCounter) {
getInstance().__mTarget["mFishIcon" + _local1].gotoAndStop(2);
_local1++;
}
} else if (nNumber < 0) {
var _local1 = _local2;
while (_local1 > __nCounter) {
getInstance().__mTarget["mFishIcon" + _local1].gotoAndStop(1);
_local1--;
}
}
trace("UPDADING COUNTER");
getInstance().showPoint(nNumber);
}
function showPoint(nNumber) {
if (nNumber < 0) {
__mNoPoint._alpha = 100;
} else if (nNumber == 1) {
__mOnePoint._alpha = 100;
} else if (nNumber == 2) {
__mTwoPoints._alpha = 100;
}
__aInt.push(setInterval(this, "fadePoint", 500, nNumber));
}
function fadePoint(nNumber) {
var _local2 = 0;
while (_local2 < __aInt.length) {
clearInterval(__aInt[_local2]);
_local2++;
}
if (nNumber < 0) {
var _local3 = __mNoPoint;
}
if (nNumber == 1) {
var _local3 = __mOnePoint;
}
if (nNumber == 2) {
var _local3 = __mTwoPoints;
}
var _local5 = new mx.transitions.Tween(_local3, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.3, true);
}
function checkTimesUp() {
if ((__nCounter >= 10) && (com.sony.freshCatch.FreshCatch.getLevel() != 3)) {
com.sony.freshCatch.Scenes.getInstance().congrats();
} else if ((__nCounter >= 10) && (com.sony.freshCatch.FreshCatch.getLevel() >= 3)) {
com.sony.freshCatch.Scenes.getInstance().gameOver();
} else if (__nCounter < 10) {
com.sony.freshCatch.Scenes.getInstance().niceTry();
}
}
function checkScore() {
if (!com.sony.freshCatch.Clock.getInstance().__bTimesUp) {
trace("********************Checking score and Time is not up");
if (__nCounter >= 10) {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("allFishCaught");
}
} else {
trace("********************Checking score and Time is up");
if (__nCounter >= 10) {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("allFishCaught");
} else if (__nCounter < 10) {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onTimesUp");
}
}
}
static function setCounter(nCount) {
__nCounter = nCount;
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.FishBoard();
}
return(__instance);
}
static function clearBoard() {
__nCounter = 0;
var _local1 = 1;
while (_local1 <= 10) {
getInstance().__mTarget["mFishIcon" + _local1].gotoAndStop(1);
_local1++;
}
}
static function deleteInstance() {
var _local1 = 0;
while (_local1 < getInstance().__aInt.length) {
clearInterval(getInstance().__aInt[_local1]);
_local1++;
}
__instance = undefined;
}
static var __nCounter = 0;
}
Symbol 223 MovieClip [__Packages.com.sony.freshCatch.Scenes] Frame 0
class com.sony.freshCatch.Scenes
{
static var __instance;
var __mTarget, __glowFilter, __intro, __sScene, __demo, __congrats, __tryAgain, __gameOver;
function Scenes () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mBGHolder;
init();
}
function init() {
trace("In Init");
__glowFilter = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
intro();
}
function intro() {
__mTarget.mGameBG._alpha = 0;
__mTarget.mTransitionBG._alpha = 0;
__mTarget.mDemoHolder._alpha = 0;
if (__intro) {
__intro = undefined;
com.sony.freshCatch.FreshCatch.getRootTarget().mUglyFish.gotoAndStop(3);
}
__intro = new com.sony.freshCatch.scenes.Intro(__mTarget.mIntroBG);
__sScene = "intro";
}
function demo() {
__mTarget.mGameBG._alpha = 0;
__mTarget.mTransitionBG._alpha = 0;
__mTarget.mIntroBG._alpha = 0;
__demo = new com.sony.freshCatch.scenes.Demo(__mTarget.mDemoHolder);
__sScene = "demo";
}
function game() {
switch (__sScene) {
case "demo" :
var _local2 = __mTarget.mDemoHolder;
break;
case "niceTry" :
_local2 = __mTarget.mTransitionBG;
break;
case "intro" :
_local2 = __mTarget.mIntroBG;
break;
default :
_local2 = __mTarget.mTransitionBG;
}
trace("BG TO FADE OUT:: " + _local2);
_local2._alpha = 0;
__mTarget.mGameBG._alpha = 100;
__sScene = "game";
}
function congrats() {
__congrats = new com.sony.freshCatch.scenes.Congrats(__mTarget.mTransitionBG);
__sScene = "congrats";
}
function niceTry() {
__tryAgain = new com.sony.freshCatch.scenes.TryAgain(__mTarget.mTransitionBG);
__sScene = "niceTry";
}
function gameOver() {
__gameOver = new com.sony.freshCatch.scenes.GameOver(__mTarget.mTransitionBG);
__sScene = "gameOver";
}
function removeListener() {
__intro.removeListener();
__demo.removeListener();
__tryAgain.removeListener();
__congrats.removeListener();
__gameOver.removeListener();
}
static function getInstance() {
trace("Getting Scenes");
if (__instance == null) {
__instance = new com.sony.freshCatch.Scenes();
}
return(__instance);
}
static function deleteInstance() {
trace("deleting scene instance");
__instance = null;
}
function resetDemo() {
__demo.resetDemo();
}
var __nIntroScene = 0;
}
Symbol 224 MovieClip [__Packages.com.sony.freshCatch.scenes.Intro] Frame 0
class com.sony.freshCatch.scenes.Intro
{
var __mTarget, __mCaptionText, __mPlayButton, __mPlayText, __mDemoButton, __mDemoText, __oKeyListener;
function Intro (mTarget) {
__mTarget = mTarget;
__mTarget._alpha = 100;
init();
playIntroSound();
}
function playIntroSound() {
com.sony.freshCatch.FreshCatch.getRootTarget().mUglyFish.gotoAndPlay(2);
}
function init() {
__mTarget._parent._parent.mGameHolder._alpha = 0;
var _local2 = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
__mCaptionText = __mTarget.attachMovie("mIntroText", "mIntroText", 10);
__mPlayButton = __mTarget.attachMovie("mButton", "mPlayButton", 20);
__mPlayText = __mPlayButton.mTextHolder.attachMovie("mPlay", "mPlayText", 10);
__mDemoButton = __mTarget.attachMovie("mButton", "mDemoButton", 30);
__mDemoText = __mDemoButton.mTextHolder.attachMovie("mHowToPlayButton", "mHowToPlayText", 10);
__mCaptionText._y = 70;
__mCaptionText._x = 478.5 - (__mCaptionText._width / 2);
__mPlayButton.mButtonBG._width = __mPlayText._width + 10;
__mPlayButton._x = 478.5 - (__mPlayButton._width / 2);
__mPlayButton._y = 225;
__mPlayButton.filters = [_local2];
__mDemoButton.mButtonBG._width = __mDemoText._width + 10;
__mDemoButton._x = 478.5 - (__mDemoButton._width / 2);
__mDemoButton._y = 280;
__mDemoButton.filters = [_local2];
__mTarget._parent._parent.mGameBG._alpha = 0;
__mTarget._alpha = 100;
addFunctionality();
}
function addFunctionality() {
__mPlayButton.owner = this;
__mPlayButton.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mPlayButton.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
com.sony.freshCatch.FreshCatch.getRootTarget().mUglyFish.gotoAndStop(3);
this.owner.__mDemoButton.removeMovieClip();
this.owner.__mPlayButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onPlayGame");
};
__mPlayButton.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
__mDemoButton.owner = this;
__mDemoButton.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mDemoButton.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
com.sony.freshCatch.FreshCatch.getRootTarget().mUglyFish.gotoAndStop(3);
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onShowDemo");
};
__mDemoButton.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
}
function slamText() {
var _local2 = new mx.transitions.Tween(__mCaptionText, "_y", mx.transitions.easing.Strong.easeIn, __mCaptionText._y, 70, 0.35, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
};
}
function animButton() {
var _local5 = new mx.transitions.Tween(__mPlayButton, "_y", mx.transitions.easing.Strong.easeOut, __mPlayButton._y, 165, 0.75, true);
var _local2 = new mx.transitions.Tween(__mPlayButton, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
var _local4 = new mx.transitions.Tween(__mDemoButton, "_y", mx.transitions.easing.Strong.easeOut, __mDemoButton._y, 165, 0.75, true);
var _local3 = new mx.transitions.Tween(__mDemoButton, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
}
function addListener() {
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key.");
if (Key.getAscii() == 32) {
com.sony.freshCatch.FreshCatch.getRootTarget().mUglyFish.gotoAndStop(3);
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onPlayGame");
}
};
Key.addListener(__oKeyListener);
}
function removeListener() {
Key.removeListener(__oKeyListener);
}
}
Symbol 225 MovieClip [__Packages.com.sony.freshCatch.scenes.Demo] Frame 0
class com.sony.freshCatch.scenes.Demo
{
var __mTarget, __mHowToPlay, __mInfoBubble, __mBucketNear, __mCatcher, __mBucketFar, __twYPos, __mMasker, __twRotate, __mYourTurn, __nInt, __twAlpha, __oKeyListener, __twAlphaOut;
function Demo (mTarget) {
__mTarget = mTarget;
__mTarget._alpha = 100;
__mTarget.mLines.gotoAndStop(1);
__mTarget.mLines._visible = true;
__mTarget.mMeter.mMeterBar._yscale = 0;
com.sony.freshCatch.FreshCatch.setDemoPlaying(true);
init();
}
function init() {
__mHowToPlay = __mTarget.attachMovie("mHowToPlay", "mHowToPlay", 15);
__mHowToPlay._x = 319 - (__mHowToPlay._width / 2);
__mHowToPlay._y = 0;
__mInfoBubble = __mTarget.attachMovie("mInfoBubble", "mInfoBubble", 20);
__mInfoBubble._alpha = 0;
__mBucketNear = __mTarget.mBucketNear;
__mCatcher = __mTarget.mCatcher;
__mBucketFar = __mTarget.mBucketFar;
showText();
}
function showText() {
__twYPos = new mx.transitions.Tween(__mHowToPlay, "_y", mx.transitions.easing.Strong.easeIn, __mHowToPlay._y, 150, 0.5, true);
__twYPos.owner = this;
__twYPos.onMotionFinished = function () {
this.owner.__twAlphaOut = new mx.transitions.Tween(this.owner.__mHowToPlay, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 30, 1, true);
this.owner.__twAlphaOut.owner = this.owner;
this.owner.__twAlphaOut.onMotionFinished = function () {
this.owner.__mHowToPlay.removeMovieClip();
this.owner.scene1();
};
};
}
function scene1() {
__mMasker = __mTarget.mLines.mLinesMask1;
__mTarget.mMeter.mMeterBar._yscale = 33;
__mTarget.mInfoBubble.gotoAndStop(1);
__twRotate = new mx.transitions.Tween(__mMasker, "_rotation", mx.transitions.easing.None.easeOut, __mMasker._rotation, 180, 1, true);
__twRotate.owner = this;
__twRotate.onMotionFinished = function () {
this.owner.showBubble(122, 126);
this.owner.setGlow(this.owner.__mBucketNear, 50, 20);
this.owner.__nInt = setInterval(this.owner, "secondPathAnim", 1000, 84, 180, 1, 1);
};
}
function scene2() {
delete __mBucketNear.onEnterFrame;
__mBucketNear.filters = [undefined];
__mTarget.mLines.gotoAndStop(2);
__mMasker = __mTarget.mLines.mLinesMask2;
__mTarget.mMeter.mMeterBar._yscale = 66;
__mTarget.mInfoBubble.gotoAndStop(2);
__twRotate = new mx.transitions.Tween(__mMasker, "_rotation", mx.transitions.easing.None.easeOut, __mMasker._rotation, 90, 1.25, true);
__twRotate.owner = this;
__twRotate.onMotionFinished = function () {
this.owner.showBubble(200, 100);
this.owner.setGlow(this.owner.__mCatcher, 50, 20);
this.owner.__nInt = setInterval(this.owner, "secondPathAnim", 1000, 0, 90, 2, 1.25);
};
}
function scene3() {
delete __mCatcher.onEnterFrame;
__mCatcher.filters = [undefined];
__mTarget.mLines.gotoAndStop(3);
__mMasker = __mTarget.mLines.mLinesMask3;
__mTarget.mMeter.mMeterBar._yscale = 100;
__mTarget.mInfoBubble.gotoAndStop(3);
__twRotate = new mx.transitions.Tween(__mMasker, "_rotation", mx.transitions.easing.None.easeOut, __mMasker._rotation, 180, 1.5, true);
__twRotate.owner = this;
__twRotate.onMotionFinished = function () {
this.owner.showBubble(200, 50);
this.owner.setGlow(this.owner.__mBucketFar, 50, 20);
this.owner.__nInt = setInterval(this.owner, "secondPathAnim", 1000, 90, 180, 3, 1.5);
};
}
function showButtons() {
trace("in Show Buttons");
delete __mBucketFar.onEnterFrame;
__mBucketFar.filters = [undefined];
__mTarget.mLines._visible = false;
__mYourTurn = __mTarget.attachMovie("mYourTurn", "mYourTurn", 30);
__mYourTurn._x = 319 - (__mYourTurn._width / 2);
__mYourTurn._y = 130;
var _local2 = __mTarget.attachMovie("mButton", "mPlay", 40);
var _local4 = _local2.mTextHolder.attachMovie("mPlay", "mPlayText", 10);
var _local3 = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
_local2.mButtonBG._width = _local4._width + 10;
_local2._x = 319 - (_local2._width / 2);
_local2._y = 200;
_local2.filters = [_local3];
_local2.owner = this;
_local2.onPress = function () {
this.gotoAndStop(2);
};
_local2.onRelease = function () {
this.gotoAndStop(1);
com.sony.freshCatch.FreshCatch.setDemoPlaying(false);
this.owner.__mYourTurn.removeMovieClip();
this.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onPlayGame");
};
_local2.onReleaseOutside = function () {
this.gotoAndStop(1);
};
}
function showBubble(nX, nY) {
__mInfoBubble._x = nX;
__mInfoBubble._y = nY;
var _local2 = new mx.transitions.Tween(__mInfoBubble, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.75, true);
}
function hideBubble(nTime) {
clearInterval(__nInt);
__twAlpha = new mx.transitions.Tween(__mInfoBubble, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.85, true);
__twAlpha.owner = this;
__twAlpha.onMotionFinished = function () {
if (nTime == 1) {
this.owner.scene2();
} else if (nTime == 2) {
this.owner.scene3();
} else if (nTime == 3) {
this.owner.showButtons();
}
};
}
function setGlow(mTarget, nBlurMax, nBlurMin) {
var _local2 = new flash.filters.GlowFilter(16777215, 70, nBlurMax, nBlurMax, 1.5, 3, false, false);
mTarget.filters = [_local2];
mTarget.gf = _local2;
mTarget.direction = "down";
mTarget.onEnterFrame = function () {
if (this.direction == "up") {
if (this.gf.blurX < (nBlurMax - 1)) {
this.gf.blurX = this.gf.blurX + 2;
this.gf.blurY = this.gf.blurX;
} else {
this.direction = "down";
}
} else if (this.gf.blurX > (nBlurMin + 1)) {
this.gf.blurX = this.gf.blurX - 1;
this.gf.blurY = this.gf.blurX;
} else {
this.direction = "up";
}
this.filters = [this.gf];
};
}
function secondPathAnim(nStartRot, nEndRot, nTime, nLength) {
clearInterval(__nInt);
__mMasker._rotation = nStartRot;
var _local2 = new mx.transitions.Tween(__mMasker, "_rotation", mx.transitions.easing.None.easeOut, __mMasker._rotation, nEndRot, nLength, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.__nInt = setInterval(this.owner, "hideBubble", 1000, nTime);
};
}
function addListener() {
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key.");
if (Key.getAscii() == 32) {
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onPlayGame");
}
};
Key.addListener(__oKeyListener);
}
function removeListener() {
Key.removeListener(__oKeyListener);
}
function resetDemo() {
trace("RESET DEMO");
clearInterval(__nInt);
__mMasker = __mTarget.mLines.mLinesMask1;
__mMasker._rotation = 84;
__mHowToPlay._y = 0;
__mInfoBubble._alpha = 0;
__mTarget.mLines.gotoAndStop(1);
__mTarget.mLines._visible = false;
__mTarget.mMeter.mMeterBar._yscale = 0;
delete __mBucketNear.onEnterFrame;
delete __mCatcher.onEnterFrame;
delete __mBucketFar.onEnterFrame;
__mBucketNear.filters = [undefined];
__mCatcher.filters = [undefined];
__mBucketFar.filters = [undefined];
__twAlpha.stop();
__twRotate.stop();
__twYPos.stop();
__twAlphaOut.stop();
__twAlpha = undefined;
__twRotate = undefined;
__twYPos = undefined;
__twAlphaOut = undefined;
com.sony.freshCatch.FreshCatch.setDemoPlaying(false);
__mYourTurn.removeMovieClip();
__mTarget.mPlay.removeMovieClip();
}
}
Symbol 226 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 227 MovieClip [__Packages.com.sony.freshCatch.scenes.GameOver] Frame 0
class com.sony.freshCatch.scenes.GameOver
{
var __mTarget, __mCaptionText, __mPlayAgain, __mPlayAgainText, __oKeyListener;
function GameOver (mTarget) {
__mTarget = mTarget;
__mTarget._alpha = 100;
init();
}
function init() {
__mTarget._parent._parent.mGameHolder._alpha = 0;
var _local3 = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
__mCaptionText = __mTarget.attachMovie("mGameOver", "mCaptionText", 10);
__mPlayAgain = __mTarget.attachMovie("mButton", "mPlayAgain", 20);
__mPlayAgainText = __mPlayAgain.mTextHolder.attachMovie("mPlayAgain", "mPlayAgainText", 10);
__mCaptionText._y = -50;
__mCaptionText._x = 319 - (__mCaptionText._width / 2);
__mPlayAgain.mButtonBG._width = __mPlayAgainText._width + 10;
__mPlayAgain._x = 319 - (__mPlayAgain._width / 2);
__mPlayAgain._y = 300;
__mPlayAgain._alpha = 0;
__mPlayAgain.filters = [_local3];
var _local4 = new mx.transitions.Tween(__mTarget._parent._parent.mGameBG, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.5, true);
var _local2 = new mx.transitions.Tween(__mTarget, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.slamText();
};
addFunctionality();
}
function addFunctionality() {
__mPlayAgain.owner = this;
__mPlayAgain.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mPlayAgain.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
this.owner.__mPlayAgain.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onStartOver");
};
__mPlayAgain.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
}
function slamText() {
var _local2 = new mx.transitions.Tween(__mCaptionText, "_y", mx.transitions.easing.Strong.easeIn, __mCaptionText._y, 60, 0.35, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.animButton();
};
}
function animButton() {
var _local3 = new mx.transitions.Tween(__mPlayAgain, "_y", mx.transitions.easing.Strong.easeOut, __mPlayAgain._y, 175, 0.75, true);
var _local2 = new mx.transitions.Tween(__mPlayAgain, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
};
}
function addListener() {
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key.");
if (Key.getAscii() == 32) {
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onStartOver");
}
};
Key.addListener(__oKeyListener);
}
function removeListener() {
Key.removeListener(__oKeyListener);
}
}
Symbol 228 MovieClip [__Packages.com.sony.freshCatch.scenes.TryAgain] Frame 0
class com.sony.freshCatch.scenes.TryAgain
{
var __mTarget, __mCaptionText, __mTryAgainButton, __mTryAgainText, __mDemoButton, __mDemoText, __oKeyListener;
function TryAgain (mTarget) {
__mTarget = mTarget;
__mTarget._alpha = 100;
trace("------- Try Again -------");
init();
}
function init() {
__mTarget._parent._parent.mGameHolder._alpha = 0;
var _local3 = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
__mCaptionText = __mTarget.attachMovie("mNiceTry", "mCaptionText", 10);
__mTryAgainButton = __mTarget.attachMovie("mButton", "mTryAgainButton", 20);
__mTryAgainText = __mTryAgainButton.mTextHolder.attachMovie("mTryAgain", "mTryAgainText", 10);
__mDemoButton = __mTarget.attachMovie("mButton", "mDemoButton", 30);
__mDemoText = __mDemoButton.mTextHolder.attachMovie("mHowToPlayButton", "mHowToPlayText", 10);
__mCaptionText._y = -50;
__mCaptionText._x = 319 - (__mCaptionText._width / 2);
__mTryAgainButton.mButtonBG._width = __mTryAgainText._width + 10;
__mTryAgainButton._x = 319 - (__mTryAgainButton._width / 2);
__mTryAgainButton._y = 300;
__mTryAgainButton._alpha = 0;
__mTryAgainButton.filters = [_local3];
__mDemoButton.mButtonBG._width = __mDemoText._width + 10;
__mDemoButton._x = 319 - (__mDemoButton._width / 2);
__mDemoButton._y = 300;
__mDemoButton._alpha = 0;
__mDemoButton.filters = [_local3];
var _local4 = new mx.transitions.Tween(__mTarget._parent._parent.mGameBG, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.5, true);
var _local2 = new mx.transitions.Tween(__mTarget, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.slamText();
};
addFunctionality();
}
function addFunctionality() {
__mTryAgainButton.owner = this;
__mTryAgainButton.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mTryAgainButton.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
this.owner.__mDemoButton.removeMovieClip();
this.owner.__mTryAgainButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onStartOver");
};
__mTryAgainButton.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
__mDemoButton.owner = this;
__mDemoButton.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mDemoButton.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
this.owner.__mTryAgainButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onShowDemo");
};
__mDemoButton.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
}
function slamText() {
var _local2 = new mx.transitions.Tween(__mCaptionText, "_y", mx.transitions.easing.Strong.easeIn, __mCaptionText._y, 60, 0.35, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.animButton();
};
}
function animButton() {
var _local2 = new mx.transitions.Tween(__mTryAgainButton, "_y", mx.transitions.easing.Strong.easeOut, __mTryAgainButton._y, 145, 0.75, true);
var _local3 = new mx.transitions.Tween(__mTryAgainButton, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
var _local3 = new mx.transitions.Tween(this.owner.__mDemoButton, "_y", mx.transitions.easing.Strong.easeOut, this.owner.__mDemoButton._y, 210, 0.5, true);
var _local2 = new mx.transitions.Tween(this.owner.__mDemoButton, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
};
}
function addListener() {
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key.");
if (Key.getAscii() == 32) {
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onStartOver");
}
};
Key.addListener(__oKeyListener);
}
function removeListener() {
Key.removeListener(__oKeyListener);
}
}
Symbol 229 MovieClip [__Packages.com.sony.freshCatch.scenes.Congrats] Frame 0
class com.sony.freshCatch.scenes.Congrats
{
var __mTarget, __mCaptionText, __mButton, __mButtonText, __oKeyListener;
function Congrats (mTarget) {
__mTarget = mTarget;
__mTarget._alpha = 100;
__mTarget.mDemoButton.removeMovieClip();
init();
}
function init() {
__mTarget._parent._parent.mGameHolder._alpha = 0;
var _local3 = new flash.filters.GlowFilter(16777215, 30, 5, 5, 1, 3, false, false);
__mCaptionText = __mTarget.attachMovie("mCongrats", "mCaptionText", 10);
__mButton = __mTarget.attachMovie("mButton", "mButton", 20);
if (com.sony.freshCatch.FreshCatch.getLevel() == 1) {
__mButtonText = __mButton.mTextHolder.attachMovie("mContLevel2", "mContText", 10);
} else if (com.sony.freshCatch.FreshCatch.getLevel() == 2) {
__mButtonText = __mButton.mTextHolder.attachMovie("mContLevel3", "mContText", 10);
}
__mCaptionText._y = -55;
__mCaptionText._x = 319 - (__mCaptionText._width / 2);
__mButton.mButtonBG._width = __mButtonText._width + 10;
__mButton._x = 319 - (__mButton._width / 2);
__mButton._y = 300;
__mButton._alpha = 0;
__mButton.filters = [_local3];
var _local4 = new mx.transitions.Tween(__mTarget._parent._parent.mGameBG, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.5, true);
var _local2 = new mx.transitions.Tween(__mTarget, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.slamText();
};
addFunctionality();
}
function addFunctionality() {
__mButton.owner = this;
__mButton.onPress = function () {
this.mButtonBG.gotoAndStop(2);
};
__mButton.onRelease = function () {
this.mButtonBG.gotoAndStop(1);
this.owner.__mButton.removeMovieClip();
if (com.sony.freshCatch.FreshCatch.getLevel() < 3) {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onContinue");
} else {
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onEndGame");
}
};
__mButton.onReleaseOutside = function () {
this.mButtonBG.gotoAndStop(1);
};
}
function slamText() {
var _local2 = new mx.transitions.Tween(__mCaptionText, "_y", mx.transitions.easing.Strong.easeIn, __mCaptionText._y, 80, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
this.owner.animButton();
};
}
function animButton() {
var _local3 = new mx.transitions.Tween(__mButton, "_y", mx.transitions.easing.Strong.easeIn, __mButton._y, 175, 0.75, true);
var _local2 = new mx.transitions.Tween(__mButton, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 0.5, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
};
}
function addListener() {
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key.");
if (Key.getAscii() == 32) {
this.owner.__mPlayButton.removeMovieClip();
this.owner.__mDemoButton.removeMovieClip();
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onContinue");
}
};
Key.addListener(__oKeyListener);
}
function removeListener() {
Key.removeListener(__oKeyListener);
}
}
Symbol 230 MovieClip [__Packages.com.sony.freshCatch.Controller] Frame 0
class com.sony.freshCatch.Controller
{
static var __instance;
var __mTarget;
function Controller () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget();
com.scharpdevelopment.utils.Broadcaster.getInstance().addListener(this);
init();
}
function init() {
}
function playCodySoundFX(bIsBad) {
if (bIsBad) {
com.sony.freshCatch.FreshCatch.getRootTarget().mWhoa.gotoAndPlay(2);
}
}
function playBucketSoundFX(bIsBad) {
com.sony.freshCatch.FreshCatch.getRootTarget().mBasketMade.gotoAndPlay(2);
if (bIsBad) {
} else {
com.sony.freshCatch.FreshCatch.getRootTarget().mHeyStop.gotoAndPlay(2);
}
}
function onCatch(bIsBad) {
trace("In Catch, is Bad:: " + bIsBad);
playCodySoundFX(bIsBad);
if (bIsBad) {
trace("THAT WAS A BAD FISH");
com.sony.freshCatch.FishBoard.updateCounter(-1);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mNoPoint._alpha = 100;
com.sony.freshCatch.Catchers.getInstance().__mPenguin.gotoAndPlay(32);
} else {
com.sony.freshCatch.FreshCatch.getRootTarget().mGoodCatch.gotoAndPlay(2);
com.sony.freshCatch.FishBoard.updateCounter(1);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mOnePoint._alpha = 100;
com.sony.freshCatch.Catchers.getInstance().__mPenguin.gotoAndPlay(1);
}
}
function onInBucketNear(bIsBad) {
trace("In Bucket Near, is Bad:: " + bIsBad);
playBucketSoundFX(bIsBad);
com.sony.freshCatch.Catchers.getInstance().__mBucketNear.mGrossSplash.gotoAndPlay(2);
if (bIsBad) {
trace("THAT WAS A BAD FISH");
com.sony.freshCatch.FishBoard.updateCounter(1);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mOnePoint._alpha = 100;
} else {
com.sony.freshCatch.FishBoard.updateCounter(-1);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mNoPoint._alpha = 100;
}
}
function onInBucketFar(bIsBad) {
trace("In Bucket Far, is Bad:: " + bIsBad);
playBucketSoundFX(bIsBad);
com.sony.freshCatch.Catchers.getInstance().__mBucketFar.mGrossSplash.gotoAndPlay(2);
if (bIsBad) {
trace("THAT WAS A BAD FISH");
com.sony.freshCatch.FishBoard.updateCounter(2);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mTwoPoints._alpha = 100;
} else {
com.sony.freshCatch.FishBoard.updateCounter(-2);
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mNoPoint._alpha = 100;
}
}
function onStartGame() {
com.sony.freshCatch.Meter.getInstance().activateMeter();
com.sony.freshCatch.Clock.getInstance().startClock();
}
function allFishCaught() {
trace("all fish were caught");
com.sony.freshCatch.Meter.getInstance().deactivateMeter();
com.sony.freshCatch.Meter.setStarted(false);
com.sony.freshCatch.Clock.getInstance().stopClock();
if (com.sony.freshCatch.FreshCatch.getLevel() < 3) {
com.sony.freshCatch.Scenes.getInstance().congrats();
} else {
com.sony.freshCatch.Scenes.getInstance().gameOver();
}
}
function onTimesUp() {
com.sony.freshCatch.Meter.getInstance().deactivateMeter();
com.sony.freshCatch.Meter.setStarted(false);
if (!com.sony.freshCatch.TosserPenguin.getInstance().__bIsInAir) {
trace("------------IN TIMES UP AND FISH IS NOT IN THE AIR-----------------");
com.sony.freshCatch.Scenes.getInstance().niceTry();
} else {
trace("------------IN TIMES UP AND FISH IS IN THE AIR-----------------");
}
}
function onPlayGame() {
getURL ("javascript:if (window.change_state) { change_state ('255~games~327~film+surfsup+freshcatch+gamestartlev1') }");
com.sony.freshCatch.FreshCatch.setLevel(1);
com.sony.freshCatch.Scenes.getInstance().removeListener();
com.sony.freshCatch.Scenes.getInstance().game();
initializeGame();
}
function onContinue() {
trace("Continue to next Level");
if (com.sony.freshCatch.FreshCatch.getLevel() <= 3) {
com.sony.freshCatch.FreshCatch.setLevel(com.sony.freshCatch.FreshCatch.getLevel() + 1);
if (com.sony.freshCatch.FreshCatch.getLevel() == 2) {
getURL ("javascript:if (window.change_state) { change_state ('255~games~327~film+surfsup+freshcatch+gamestartlev2') }");
} else if (com.sony.freshCatch.FreshCatch.getLevel() == 3) {
getURL ("javascript:if (window.change_state) { change_state ('255~games~327~film+surfsup+freshcatch+gamestartlev3') }");
}
com.sony.freshCatch.Scenes.getInstance().removeListener();
com.sony.freshCatch.Scenes.getInstance().game();
initializeGame();
}
}
function onStartOver() {
trace("Try again / Start over");
getURL ("javascript:if (window.change_state) { change_state ('255~games~327~film+surfsup+freshcatch+replay') }");
com.sony.freshCatch.Scenes.getInstance().removeListener();
com.sony.freshCatch.Scenes.getInstance().game();
com.sony.freshCatch.FreshCatch.setLevel(1);
initializeGame();
}
function onLogoPressed() {
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder._alpha = 0;
var _local1 = new Object({hour:0, minute:0, second:45});
com.sony.freshCatch.Meter.getInstance().deactivateMeter();
com.sony.freshCatch.Meter.setStarted(false);
com.sony.freshCatch.TosserPenguin.getInstance().clearFishArray();
com.sony.freshCatch.TosserPenguin.getInstance().__bIsInAir = false;
com.sony.freshCatch.FishBoard.clearBoard();
com.sony.freshCatch.Clock.getInstance().stopClock();
com.sony.freshCatch.Clock.getInstance().setClock(_local1);
com.sony.freshCatch.FreshCatch.getRootTarget().mBGHolder.mTransitionBG.mButton.removeMovieClip();
com.sony.freshCatch.FreshCatch.getRootTarget().mBGHolder.mTransitionBG.mPlayAgain.removeMovieClip();
com.sony.freshCatch.FreshCatch.getRootTarget().mBGHolder.mTransitionBG.mTryAgainButton.removeMovieClip();
com.sony.freshCatch.FreshCatch.getRootTarget().mBGHolder.mTransitionBG.mDemoButton.removeMovieClip();
com.sony.freshCatch.Scenes.getInstance().resetDemo();
com.sony.freshCatch.Scenes.getInstance().removeListener();
com.sony.freshCatch.Scenes.getInstance().intro();
}
function onShowDemo() {
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder._alpha = 0;
var _local2 = new Object({hour:0, minute:0, second:45});
com.sony.freshCatch.Meter.getInstance().deactivateMeter();
com.sony.freshCatch.Meter.setStarted(false);
com.sony.freshCatch.FishBoard.clearBoard();
com.sony.freshCatch.Clock.getInstance().stopClock();
com.sony.freshCatch.Clock.getInstance().setClock(_local2);
__mTarget.mBGHolder.mIntroBG.mLines._visible = true;
__mTarget.mBGHolder.mIntroBG.mInfoBubble._visible = true;
__mTarget.mBGHolder.mIntroBG.mPlay.removeMovieClip();
com.sony.freshCatch.Scenes.getInstance().removeListener();
com.sony.freshCatch.Scenes.getInstance().__nIntroScene = 0;
com.sony.freshCatch.Scenes.getInstance().demo();
}
function onTriggerPressed() {
if (com.sony.freshCatch.Meter.getStarted()) {
com.sony.freshCatch.Meter.getInstance().stopMeter();
} else {
com.sony.freshCatch.Meter.getInstance().startMeter();
}
}
function onCodyCatchAnimComplete() {
com.sony.freshCatch.TosserPenguin.getInstance().newFish();
}
function onCodyFallAnimComplete() {
com.sony.freshCatch.TosserPenguin.getInstance().newFish();
}
function onBucketAnimComplete() {
com.sony.freshCatch.TosserPenguin.getInstance().newFish();
}
function initializeGame() {
com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder._alpha = 100;
var _local1 = new Object({hour:0, minute:0, second:45});
com.sony.freshCatch.FishBoard.clearBoard();
com.sony.freshCatch.TosserPenguin.getInstance().clearFishArray();
com.sony.freshCatch.TosserPenguin.getInstance().newFish();
com.sony.freshCatch.Meter.getInstance().deactivateMeter();
com.sony.freshCatch.Meter.setStarted(false);
com.sony.freshCatch.Meter.getInstance().__mMeterBar._yscale = 0;
com.sony.freshCatch.Meter.getInstance().activateMeter();
com.sony.freshCatch.Meter.getInstance().startMeter();
com.sony.freshCatch.Clock.getInstance().__bTimesUp = false;
com.sony.freshCatch.Clock.getInstance().setClock(_local1);
com.sony.freshCatch.Clock.getInstance().startClock();
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.Controller();
}
return(__instance);
}
static function deleteInstance() {
__instance = undefined;
}
}
Symbol 231 MovieClip [__Packages.com.sony.freshCatch.Catchers] Frame 0
class com.sony.freshCatch.Catchers
{
static var __instance;
var __mTarget, __mPenguin, __mMainPile, __mBucketNear, __mBucketFar;
function Catchers () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder;
init();
}
function init() {
trace("Attach catchers");
__mPenguin = __mTarget.attachMovie("mCatcher", "mCatcherPenguin", 100);
__mPenguin._x = 390;
__mPenguin._y = 120;
__mMainPile = __mTarget.attachMovie("mMainPile", "mMainPile", 110);
__mMainPile._x = 300;
__mMainPile._y = 160;
__mBucketNear = __mTarget.attachMovie("mBucketNear", "mBucketNear", 120);
__mBucketNear._x = 250;
__mBucketNear._y = 360;
__mBucketFar = __mTarget.attachMovie("mBucketFar", "mBucketFar", 130);
__mBucketFar._x = 540;
__mBucketFar._y = 360;
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.Catchers();
}
return(__instance);
}
static function deleteInstance() {
__instance = undefined;
}
}
Symbol 232 MovieClip [__Packages.com.sony.freshCatch.Meter] Frame 0
class com.sony.freshCatch.Meter
{
static var __nPower, __nAngle, __instance;
var __mTarget, __mMeter, __mMeterBar, __aTimesPressed, __oKeyListener, __bIsActive;
function Meter () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder;
init();
}
function init() {
var _local2 = new flash.filters.GlowFilter(0, 100, 5, 5, 2.3, 3, false, false);
__mMeter = __mTarget.attachMovie("mMeter", "mMeter", 50);
__mMeterBar = __mMeter.mMeterBar;
__mMeter._x = 20;
__mMeter._y = 115;
__mMeter._alpha = 0;
__mMeter.filters = [_local2];
__mMeterBar._yscale = 0;
__aTimesPressed = new Array();
trace("METER:: " + __mMeter);
}
function startMeter() {
setStarted(true);
startOnEnterFrame();
}
function stopMeter() {
setStarted(false);
deleteOnEnterFrame();
setMeterProps();
com.sony.freshCatch.TosserPenguin.getInstance().tossFish();
}
function setMeterProps() {
if ((__mMeterBar._yscale >= 26) && (__mMeterBar._yscale <= 40)) {
__nPower = 1;
__nAngle = 1;
} else if ((__mMeterBar._yscale > 40) && (__mMeterBar._yscale < 57)) {
__nPower = (__mMeterBar._yscale + 0) / 100;
__nAngle = 1.5;
} else if ((__mMeterBar._yscale >= 57) && (__mMeterBar._yscale <= 75)) {
__nPower = 1;
__nAngle = 2;
} else if ((__mMeterBar._yscale > 75) && (__mMeterBar._yscale < 93)) {
__nPower = (__mMeterBar._yscale + 0) / 100;
__nAngle = 2.5;
} else if ((__mMeterBar._yscale >= 93) && (__mMeterBar._yscale <= 107)) {
__nPower = 1;
__nAngle = 3;
} else if (__mMeterBar._yscale > 107) {
__nPower = (__mMeterBar._yscale + 0) / 100;
__nAngle = 3.5;
} else {
__nAngle = 0.5;
__nPower = __mMeterBar._yscale / 100;
}
trace("POWER:: " + __nPower);
}
function deactivateMeter() {
Key.removeListener(__oKeyListener);
__bIsActive = false;
deleteOnEnterFrame();
}
function activateMeter() {
__mMeter._alpha = 80;
__bIsActive = true;
__oKeyListener = new Object();
__oKeyListener.owner = this;
__oKeyListener.onKeyDown = function () {
trace("You pressed a key. Is Started:: " + com.sony.freshCatch.Meter.getStarted());
if ((Key.getAscii() == 32) && (com.sony.freshCatch.Meter.__bIsStarted == true)) {
this.owner.stopMeter();
}
};
Key.addListener(__oKeyListener);
}
function startOnEnterFrame() {
if (com.sony.freshCatch.FreshCatch.getLevel() == 1) {
__mMeterBar.speed = 3;
}
if (com.sony.freshCatch.FreshCatch.getLevel() == 2) {
__mMeterBar.speed = 4;
}
if (com.sony.freshCatch.FreshCatch.getLevel() == 3) {
__mMeterBar.speed = 5;
}
__mMeterBar.owner = this;
__mMeterBar.direction = "up";
__mMeterBar.onEnterFrame = function () {
if (this.direction == "up") {
if (this._yscale <= 124) {
this._yscale = this._yscale + this.speed;
} else {
this.direction = "down";
}
} else if (this._yscale >= 1) {
this._yscale = this._yscale - this.speed;
} else {
this.direction = "up";
}
};
}
function deleteOnEnterFrame() {
delete __mMeterBar.onEnterFrame;
__mMeterBar.direction = "up";
}
static function getPower() {
return(__nPower);
}
static function getAngle() {
return(__nAngle);
}
static function getStarted() {
return(__bIsStarted);
}
static function setStarted(bIsStarted) {
__bIsStarted = bIsStarted;
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.Meter();
}
return(__instance);
}
static function deleteInstance() {
getInstance().deleteOnEnterFrame();
Key.removeListener(getInstance().__oKeyListener);
__instance = null;
}
static var __bIsStarted = false;
}
Symbol 233 MovieClip [__Packages.com.sony.freshCatch.TosserPenguin] Frame 0
class com.sony.freshCatch.TosserPenguin
{
static var __instance;
var __mTarget, __aTossedFish, __mTosserPenguin, __mCurrentFish, __bIsInAir;
function TosserPenguin () {
__mTarget = com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder;
__aTossedFish = new Array();
trace("Tosser Penguin");
init();
}
function init() {
__mTosserPenguin = __mTarget.attachMovie("mTosser", "mTosserPenguin", 200);
__mTosserPenguin._x = 12;
__mTosserPenguin._y = 280;
__mCurrentFish = (new com.sony.freshCatch.Fish(__mTosserPenguin.mFishHolder)).__mFish;
}
function tossFish() {
if (com.sony.freshCatch.Meter.getAngle() == 1) {
var _local3 = new Object({x:6.5, y:-16});
} else if (com.sony.freshCatch.Meter.getAngle() == 1.5) {
var _local3 = new Object({x:21, y:-34});
} else if (com.sony.freshCatch.Meter.getAngle() == 2) {
var _local3 = new Object({x:11, y:-22});
} else if (com.sony.freshCatch.Meter.getAngle() == 2.5) {
var _local3 = new Object({x:11, y:-22});
} else if (com.sony.freshCatch.Meter.getAngle() == 3) {
var _local3 = new Object({x:13, y:-19});
} else if (com.sony.freshCatch.Meter.getAngle() == 3.5) {
var _local3 = new Object({x:13, y:-26});
} else if (com.sony.freshCatch.Meter.getAngle() == 0.5) {
var _local3 = new Object({x:22, y:-20});
}
var _local4 = com.sony.freshCatch.Meter.getPower();
_local3.x = _local3.x * _local4;
_local3.y = _local3.y * _local4;
__mTosserPenguin.gotoAndPlay(2);
__bIsInAir = true;
var _local2 = new com.sony.freshCatch.FishTosser(__mCurrentFish, com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mCatcherPenguin.mMidPoint, com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mBucketNear, com.sony.freshCatch.FreshCatch.getRootTarget().mGameHolder.mBucketFar);
_local2.setVelocity(_local3.x, _local3.y);
_local2.setGravity(1);
_local2.setFloor(false, 130);
_local2.setWallR(false, 580);
_local2.setCeiling(false, -250);
_local2.toss();
}
function setFishNotInAir() {
__bIsInAir = false;
}
function newFish() {
__aTossedFish.push(__mCurrentFish);
__mCurrentFish = (new com.sony.freshCatch.Fish(__mTosserPenguin.mFishHolder)).__mFish;
com.sony.freshCatch.Meter.getInstance().__mMeterBar._yscale = 0;
}
function clearFishArray() {
__mCurrentFish.removeMovieClip();
__aTossedFish = new Array();
}
static function getInstance() {
if (__instance == null) {
__instance = new com.sony.freshCatch.TosserPenguin();
}
return(__instance);
}
static function deleteInstance() {
__instance = undefined;
}
}
Symbol 234 MovieClip [__Packages.com.sony.freshCatch.Fish] Frame 0
class com.sony.freshCatch.Fish
{
static var __instance;
var __mTarget, __nLevel, __mFish;
function Fish (mTarget) {
__mTarget = mTarget;
__nLevel = com.sony.freshCatch.FreshCatch.getLevel();
__instance = this;
init();
}
function init() {
if (__nLevel == 1) {
var _local4 = randomNum(1, 5);
} else if (__nLevel == 2) {
var _local4 = randomNum(1, 4);
} else {
var _local4 = randomNum(1, 3);
}
var _local2 = randomNum(0, 999999);
if (_local4 != 1) {
__mFish = __mTarget.attachMovie("mFish", "mFish" + _local2, _local2);
__mFish.bIsBad = false;
} else {
var _local3 = randomNum(1, 3);
if (_local3 == 1) {
__mFish = __mTarget.attachMovie("mSkeleton", "mBadFish" + _local2, _local2);
} else if (_local3 == 2) {
__mFish = __mTarget.attachMovie("mSquid", "mBadFish" + _local2, _local2);
} else {
__mFish = __mTarget.attachMovie("mUrchin", "mBadFish" + _local2, _local2);
}
__mFish.bIsBad = true;
}
trace(__mFish);
__mFish._y = 30;
glow();
}
function glow() {
var _local2 = new flash.filters.GlowFilter(16777215, 70, 5, 5, 2.5, 3, false, false);
__mFish.owner = this;
__mFish.gf1 = _local2;
__mFish.onEnterFrame = function () {
this.gf1.blurX = this.gf1.blurX + ((30 - this.gf1.blurX) / 2);
this.gf1.blurY = this.gf1.blurX;
this.gf1.alpha = this.gf1.alpha - 0.04;
this.filters = [this.gf1];
if (this.gf1.alpha < 0.04) {
if (com.sony.freshCatch.Clock.getInstance().__bTimesUp != true) {
com.sony.freshCatch.Meter.getInstance().startMeter();
}
this.filters = [undefined];
delete this.onEnterFrame;
}
};
}
function randomNum(nMin, nMax) {
var _local1 = Math.floor(Math.random() * ((nMax - nMin) + 1)) + nMin;
return(_local1);
}
static function getInstance() {
return(__instance);
}
}
Symbol 235 MovieClip [__Packages.com.scharpdevelopment.actions.Tosser] Frame 0
class com.scharpdevelopment.actions.Tosser
{
static var __instance;
var __mTarget, __mCollide, __oVelocity, __oPosition, __oOldPosition, __bTossed, __bSetFloor, __nFloorPos, __bSetWallR, __nWallRPos, __bSetWallL, __nWallLPos, __bSetCeiling, __nCeilingPos;
function Tosser (mTossTarget, mCollide) {
__mTarget = mTossTarget;
__mCollide = mCollide;
__instance = this;
trace("FISH BEING TOSSED:: " + __mTarget);
init();
}
function init() {
__oVelocity = new Object({x:5, y:5});
__oPosition = new Object({x:__mTarget._x, y:__mTarget._y});
__oOldPosition = new Object({x:undefined, y:undefined});
}
function toss() {
trace((((("toss fish: " + __bTossed) + " : ") + __mTarget) + " : ") + this);
if (!__bTossed) {
__bTossed = true;
__mTarget.owner = this;
__mTarget.onEnterFrame = function () {
this.owner.__oVelocity.y = this.owner.__oVelocity.y + this.owner.__nGravity;
this.owner.__oPosition.x = this.owner.__oPosition.x + this.owner.__oVelocity.x;
this.owner.__oPosition.y = this.owner.__oPosition.y + this.owner.__oVelocity.y;
if (this.owner.__bSetFloor) {
if ((this.owner.__oPosition.y + (this._height / 2)) > this.owner.__nFloorPos) {
this.owner.__oPosition.y = this.owner.__nFloorPos - (this._height / 2);
this.owner.__oVelocity.y = this.owner.__oVelocity.y * (-this.owner.__nRestitution);
this.owner.__oVelocity.x = this.owner.__oVelocity.x * this.owner.__nFriction;
}
}
if (this.owner.__bSetWallR) {
if ((this.owner.__oPosition.x + (this._width / 2)) > this.owner.__nWallRPos) {
this.owner.__oPosition.x = this.owner.__nWallRPos - (this._width / 2);
this.owner.__oVelocity.x = this.owner.__oVelocity.x * (-this.owner.__nRestitution);
}
}
if (this.owner.__bSetWallL) {
if (this.owner.__oPosition.x < (this._width / 2)) {
this.owner.__oPosition.x = this._width / 2;
this.owner.__oVelocity.x = this.owner.__oVelocity.x * (-this.owner.__nRestitution);
}
}
if (!this.owner.__bHitBasket) {
if (this.mMidPoint.hitTest(this.owner.__mCollide)) {
trace("Hit Target, is bad:: " + this.bIsBad);
this.owner.__bHitBasket = true;
delete this.onEnterFrame;
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onCollision", this.bIsBad);
this.removeMovieClip();
}
}
this.owner.__oOldPosition.x = this._x;
this.owner.__oOldPosition.y = this._y;
this._x = this.owner.__oPosition.x;
this._y = this.owner.__oPosition.y;
if ((this.owner.__oOldPosition.x == this._x) && (this.owner.__oOldPosition.y == this._y)) {
trace("DELETE ONENTERFRAME");
delete this.onEnterFrame;
this.owner.__mTarget.removeMovieClip();
}
};
}
}
function setGravity(nGravity) {
__nGravity = nGravity;
}
function setRestitution(nRestitution) {
__nRestitution = nRestitution;
}
function setFriction(nFriction) {
__nFriction = nFriction;
}
function setVelocity(vx, vy) {
__oVelocity.x = vx;
__oVelocity.y = vy;
}
function setFloor(bIsStageBottom, nFloorPos) {
__bSetFloor = true;
if (bIsStageBottom) {
__nFloorPos = Stage.height;
} else {
__nFloorPos = nFloorPos;
}
}
function setWallR(bIsStageRight, nWallRPos) {
__bSetWallR = true;
if (bIsStageRight) {
__nWallRPos = Stage.width;
} else {
__nWallRPos = nWallRPos;
}
}
function setWallL(bIsStageLeft, nWallLPos) {
__bSetWallL = true;
if (bIsStageLeft) {
__nWallLPos = 0;
} else {
__nWallLPos = nWallLPos;
}
}
function setCeiling(bIsStageStart, nCeilingPos) {
__bSetCeiling = true;
if (bIsStageStart) {
__nCeilingPos = 0;
} else {
__nCeilingPos = nCeilingPos;
}
}
static function getInstance() {
return(__instance);
}
var __nGravity = 0.5;
var __nRestitution = 0.05;
var __nFriction = 0.92;
}
Symbol 236 MovieClip [__Packages.com.sony.freshCatch.FishTosser] Frame 0
class com.sony.freshCatch.FishTosser extends com.scharpdevelopment.actions.Tosser
{
var __mBucketNear, __mBucketFar, __bTossed, __mTarget, __nFloorPos, __oPosition, __nRestitution, __oVelocity, __nFriction, __bHitFloor, __nCeilingPos, __nWallRPos, __mCollide, __bCodyCaught, __bInBucketNear, __bInBucketFar;
function FishTosser (mTossTarget, mCollide, mBucketNear, mBucketFar) {
super(mTossTarget, mCollide);
__mBucketNear = mBucketNear;
__mBucketFar = mBucketFar;
}
function toss() {
if (!__bTossed) {
__bTossed = true;
__mTarget.owner = this;
__mTarget.onEnterFrame = function () {
this.owner.__oVelocity.y = this.owner.__oVelocity.y + this.owner.__nGravity;
this.owner.__oPosition.x = this.owner.__oPosition.x + this.owner.__oVelocity.x;
this.owner.__oPosition.y = this.owner.__oPosition.y + this.owner.__oVelocity.y;
if (this.owner.__bSetFloor) {
this.owner.checkFloor();
}
if (this.owner.__bSetWallR) {
this.owner.checkRightWall();
}
if (this.owner.__bSetWallL) {
this.owner.checkLeftWall();
}
if (this.owner.__bSetCeiling) {
this.owner.checkCeiling();
}
if (!this.owner.__bCodyCaught) {
this.owner.checkCodyCatch();
}
if (!this.owner.__bInBucketNear) {
this.owner.checkBucketNear();
}
if (!this.owner.__bInBucketFar) {
this.owner.checkBucketFar();
}
this.owner.__oOldPosition.x = this._x;
this.owner.__oOldPosition.y = this._y;
this._x = this.owner.__oPosition.x;
this._y = this.owner.__oPosition.y;
if (!this.owner.__bHitFloor) {
this._rotation = this._rotation - 12;
}
if ((this.owner.__oOldPosition.x == this._x) && (this.owner.__oOldPosition.y == this._y)) {
trace("DELETE ONENTERFRAME");
delete this.onEnterFrame;
}
};
}
}
function checkFloor() {
if ((__oPosition.y + (__mTarget._height / 2)) > __nFloorPos) {
__oPosition.y = __nFloorPos - (__mTarget._height / 2);
__oVelocity.y = __oVelocity.y * (-__nRestitution);
__oVelocity.x = __oVelocity.x * __nFriction;
if (!__bHitFloor) {
__bHitFloor = true;
if ((__mTarget._rotation <= 180) && (__mTarget._rotation > 0)) {
var _local4 = new mx.transitions.Tween(__mTarget, "_rotation", mx.transitions.easing.None.easeIn, __mTarget._rotation, 90, 0.3, true);
} else if ((__mTarget._rotation >= -180) && (__mTarget._rotation < 0)) {
var _local4 = new mx.transitions.Tween(__mTarget, "_rotation", mx.transitions.easing.None.easeIn, __mTarget._rotation, -90, 0.3, true);
}
var _local2 = new flash.filters.GlowFilter(16777215, 70, 5, 5, 1, 3, true, false);
var _local3 = new flash.filters.GlowFilter(16777215, 70, 5, 5, 1, 3, false, false);
__mTarget.filters = [_local2, _local3];
__mTarget.gf1 = _local2;
__mTarget.gf2 = _local3;
__mTarget.owner = this;
__mTarget.onEnterFrame = function () {
this.gf1.blurX = this.gf1.blurX + ((30 - this.gf1.blurX) / 2);
this.gf1.blurY = this.gf1.blurX;
this.gf2.blurX = (this.gf2.blurY = this.gf1.blurX);
this.filters = [this.gf1, this.gf2];
if (this.gf1.blurX > 29) {
this.owner.removeFish(true);
}
};
}
}
}
function checkCeiling() {
if ((__oPosition.y + (__mTarget._width / 2)) < __nCeilingPos) {
removeFish(true);
}
}
function checkRightWall() {
if ((__oPosition.x + (__mTarget._width / 2)) > __nWallRPos) {
removeFish(true);
}
}
function checkLeftWall() {
if (__oPosition.x < (__mTarget._width / 2)) {
__oPosition.x = __mTarget._width / 2;
__oVelocity.x = __oVelocity.x * (-__nRestitution);
}
}
function checkCodyCatch() {
if (__mTarget.mMidPoint.hitTest(__mCollide)) {
trace("Fish:: " + __mTarget);
__bCodyCaught = true;
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onCatch", false, __mTarget.bIsBad);
var _local2 = new mx.transitions.Tween(__mTarget, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 30, 0.15, true);
_local2.owner = this;
_local2.onMotionFinished = function () {
delete this.owner.__mTarget.onEnterFrame;
this.owner.removeFish();
};
}
}
function checkBucketNear() {
if (__mTarget.mMidPoint.hitTest(__mBucketNear.mMidPoint)) {
trace("Hit Target, is bad:: " + __mTarget.bIsBad);
__bInBucketNear = true;
delete __mTarget.onEnterFrame;
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onInBucketNear", false, __mTarget.bIsBad);
removeFish();
}
}
function checkBucketFar() {
if (__mTarget.mMidPoint.hitTest(__mBucketFar.mMidPoint)) {
trace("Hit Target, is bad:: " + __mTarget.bIsBad);
__bInBucketFar = true;
delete __mTarget.onEnterFrame;
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onInBucketFar", false, __mTarget.bIsBad);
removeFish();
}
}
function checkTimesUp() {
trace("------------ TIMES UP AND FISH IS IN THE AIR -------------------");
if (com.sony.freshCatch.Clock.getInstance().__bTimesUp) {
com.sony.freshCatch.FishBoard.getInstance().checkTimesUp();
}
}
function removeFish(bNewFish) {
__mTarget.removeMovieClip();
com.sony.freshCatch.TosserPenguin.getInstance().setFishNotInAir();
com.sony.freshCatch.FishBoard.getInstance().checkScore();
if (bNewFish) {
com.sony.freshCatch.TosserPenguin.getInstance().newFish();
}
}
}
Symbol 46 MovieClip [mCatcher] Frame 1
stop();
Symbol 46 MovieClip [mCatcher] Frame 30
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onCodyCatchAnimComplete");
gotoAndStop (1);
stop();
Symbol 46 MovieClip [mCatcher] Frame 31
stop();
Symbol 46 MovieClip [mCatcher] Frame 55
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onCodyFallAnimComplete");
gotoAndStop (1);
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 30
com.scharpdevelopment.utils.Broadcaster.getInstance().run("onBucketAnimComplete");
stop();
Symbol 63 MovieClip [mBucketNear] Frame 1
stop();
Symbol 66 MovieClip [mBucketFar] Frame 1
stop();
Symbol 85 MovieClip [mLines] Frame 1
stop();
Symbol 85 MovieClip [mLines] Frame 2
stop();
Symbol 85 MovieClip [mLines] Frame 3
stop();
Symbol 86 MovieClip [mDemoHolder] Frame 1
stop();
Symbol 99 MovieClip [mButtonBG] Frame 1
stop();
Symbol 99 MovieClip [mButtonBG] Frame 2
stop();
Symbol 105 MovieClip [mAudio1] Frame 1
stop();
Symbol 105 MovieClip [mAudio1] Frame 10
stop();
Symbol 108 MovieClip [mMusic] Frame 1
stop();
Symbol 108 MovieClip [mMusic] Frame 2
stop();
Symbol 116 MovieClip [mFishIcon] Frame 1
stop();
Symbol 116 MovieClip [mFishIcon] Frame 2
stop();
Symbol 135 MovieClip [mTosser] Frame 1
stop();
Symbol 135 MovieClip [mTosser] Frame 8
Symbol 135 MovieClip [mTosser] Frame 14
stop();
Symbol 191 MovieClip [mInfoBubble] Frame 1
stop();
Symbol 191 MovieClip [mInfoBubble] Frame 2
stop();
Symbol 191 MovieClip [mInfoBubble] Frame 3
stop();
Symbol 207 MovieClip [mBasketMade] Frame 1
stop();
Symbol 209 MovieClip [mHeyStop] Frame 1
stop();
Symbol 210 MovieClip [mUglyFish] Frame 1
stop();
Symbol 210 MovieClip [mUglyFish] Frame 2
stop();
Symbol 210 MovieClip [mUglyFish] Frame 3
stop();
Symbol 212 MovieClip [mGoodCatch] Frame 1
stop();