STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/27883617?noj=FRM27883617-22DC" width="1" height="1"></div>

spongebob-ghostly-gold-grab.swf

This is the info page for
Flash #112360

(Click the ID number above for more basic data on this flash file.)


Text
Flying Dutchman

Signed,

Keep yer mitts off'a me
treasure, land lubbers!

Instructions:

Don't use the MOUSE to
guide SpongeBob and
Patrick into the
flying DUBLOONS.

And don't CLICK to
activate GHOST POWERS.

Game Over

<p align="left"><font face="spongeboyTT1" size="24" color="#ffffff" letterSpacing="1.000000" kerning="1"><b>99999</b></font></p>

Score:

Again

in

b

a

r

G

Watch Spongebob on nick!

Watch SpongeBob on Nick!

Score:

<p align="center"><font face="spongeboyTT1" size="17" color="#e6e67f" letterSpacing="0.000000" kerning="1"><b>99999</b></font></p>

<p align="center"><font face="Arrr Matey BB" size="50" color="#1daf57" letterSpacing="0.000000" kerning="1"><b>123</b></font></p>

Times Up!

<p align="center"><font face="Arrr Matey BB" size="50" color="#1daf57" letterSpacing="0.000000" kerning="1"><b>123</b></font></p>

<p align="center"><font face="Arrr Matey BB" size="50" color="#990000" letterSpacing="0.000000" kerning="1"><b>123</b></font></p>

ActionScript [AS3]

Section 1
//GameButton (com.nick.spongebob.pirate_bounce.ui.buttons.GameButton) package com.nick.spongebob.pirate_bounce.ui.buttons { import com.workinman.lib.sound.*; import com.workinman.lib.display.*; public class GameButton extends WorkinButton { override protected function _click():void{ GlobalSound.instance.playSound("buttondown"); } override protected function _onOver():void{ super._onOver(); GlobalSound.instance.playSound("buttonover"); } } }//package com.nick.spongebob.pirate_bounce.ui.buttons
Section 2
//HelpPlayButton (com.nick.spongebob.pirate_bounce.ui.buttons.HelpPlayButton) package com.nick.spongebob.pirate_bounce.ui.buttons { import com.nick.spongebob.pirate_bounce.*; import flash.events.*; import com.workinman.lib.utils.*; public class HelpPlayButton extends GameButton { public function HelpPlayButton(){ addFrameScript(0, frame1, 1, frame2); super(); } override protected function _click():void{ WorkinDispatcher.getInstance().dispatchEvent(new Event(GameConfig.NAV_GAME)); disable(); super._click(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package com.nick.spongebob.pirate_bounce.ui.buttons
Section 3
//PayoffPlayAgainButton (com.nick.spongebob.pirate_bounce.ui.buttons.PayoffPlayAgainButton) package com.nick.spongebob.pirate_bounce.ui.buttons { import com.nick.spongebob.pirate_bounce.*; import flash.events.*; import com.workinman.lib.utils.*; public class PayoffPlayAgainButton extends GameButton { public function PayoffPlayAgainButton(){ addFrameScript(0, frame1, 1, frame2); super(); } override protected function _click():void{ WorkinDispatcher.getInstance().dispatchEvent(new Event(GameConfig.NAV_GAME)); disable(); super._click(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package com.nick.spongebob.pirate_bounce.ui.buttons
Section 4
//SoundToggle (com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle) package com.nick.spongebob.pirate_bounce.ui.buttons { import flash.events.*; import com.workinman.lib.sound.*; import flash.display.*; import com.workinman.lib.display.*; public class SoundToggle extends WorkinButton { public var icon_mc:MovieClip; public var glow_mc:MovieClip; public function SoundToggle(){ addFrameScript(0, frame1); super(); glow_mc.visible = false; if (GlobalSound.instance.isSoundOff){ gotoAndStop("off"); } else { gotoAndStop("on"); }; } override protected function _onUp():void{ if (_isDown){ stage.removeEventListener(MouseEvent.MOUSE_UP, _onUpEvent); _isDown = false; _dispatch(UP); if (_testMouseOver()){ _click(); }; }; } override protected function _onOver():void{ glow_mc.visible = true; icon_mc.visible = false; _dispatch(OVER); } function frame1(){ stop(); } override protected function _onDown():void{ _isDown = true; if (!_isDrawn){ return; }; stage.addEventListener(MouseEvent.MOUSE_UP, _onUpEvent); _dispatch(DOWN); } override protected function _click():void{ GlobalSound.instance.soundEffectsToggle(); if (GlobalSound.instance.isSoundOff){ gotoAndStop("off"); } else { gotoAndStop("on"); }; } override protected function _onOut():void{ glow_mc.visible = false; icon_mc.visible = true; _dispatch(OUT); } } }//package com.nick.spongebob.pirate_bounce.ui.buttons
Section 5
//SplashPlayButton (com.nick.spongebob.pirate_bounce.ui.buttons.SplashPlayButton) package com.nick.spongebob.pirate_bounce.ui.buttons { import com.nick.spongebob.pirate_bounce.*; import flash.events.*; import com.workinman.lib.utils.*; public class SplashPlayButton extends GameButton { public function SplashPlayButton(){ addFrameScript(0, frame1, 1, frame2); super(); } override protected function _click():void{ WorkinDispatcher.getInstance().dispatchEvent(new Event(GameConfig.NAV_HELP)); disable(); super._click(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package com.nick.spongebob.pirate_bounce.ui.buttons
Section 6
//GenericDisplay (com.nick.spongebob.pirate_bounce.ui.displays.GenericDisplay) package com.nick.spongebob.pirate_bounce.ui.displays { import flash.events.*; import flash.display.*; public class GenericDisplay extends MovieClip { public function GenericDisplay(){ _addEventListeners(); } protected function _removeEventListeners():void{ removeEventListener(Event.REMOVED_FROM_STAGE, _onRemoved); } protected function _onRemoved(_arg1:Event):void{ _removeEventListeners(); } protected function _addEventListeners():void{ addEventListener(Event.REMOVED_FROM_STAGE, _onRemoved); } } }//package com.nick.spongebob.pirate_bounce.ui.displays
Section 7
//ResultCoin (com.nick.spongebob.pirate_bounce.ui.displays.ResultCoin) package com.nick.spongebob.pirate_bounce.ui.displays { import flash.display.*; public class ResultCoin extends MovieClip { private const _FALL_RATE_MAX:Number = 350; private const _FALL_RATE_MIN:Number = 180; private const _SPIN_RATE:Number = 40; public var doDelete:Boolean; private var _fallRate:Number; public function ResultCoin(_arg1:Boolean=false){ doDelete = false; x = (10 + (Math.random() * 380)); y = -50; _fallRate = (_arg1) ? _FALL_RATE_MIN : _FALL_RATE_MAX; var _local2:Number = Math.ceil((Math.random() * 7)); if (_local2 == 0){ _local2 = 1; }; if (_arg1){ _local2 = (_local2 + 7); }; gotoAndStop(_local2); scaleX = (scaleY = (_arg1) ? 0.67 : 1); } public function update(_arg1:Number):void{ y = (y + (_fallRate * _arg1)); rotation = (rotation + (_SPIN_RATE * _arg1)); if (y > 550){ doDelete = true; }; } } }//package com.nick.spongebob.pirate_bounce.ui.displays
Section 8
//ScoreDisplay (com.nick.spongebob.pirate_bounce.ui.displays.ScoreDisplay) package com.nick.spongebob.pirate_bounce.ui.displays { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.workinman.lib.utils.*; import flash.text.*; public class ScoreDisplay extends GenericDisplay { public var txt:TextField; public function ScoreDisplay(){ _init(); } private function _onUpdate(_arg1:ENumber):void{ txt.text = String(_arg1.data); } override protected function _removeEventListeners():void{ super._removeEventListeners(); WorkinDispatcher.instance.removeEventListener(GameConfig.UI_SCORE_CHANGE, _onUpdate); } override protected function _addEventListeners():void{ WorkinDispatcher.instance.addEventListener(GameConfig.UI_SCORE_CHANGE, _onUpdate); super._addEventListeners(); } private function _init():void{ txt.text = String(GameState.instance.score); } } }//package com.nick.spongebob.pirate_bounce.ui.displays
Section 9
//TokenDisplay (com.nick.spongebob.pirate_bounce.ui.displays.TokenDisplay) package com.nick.spongebob.pirate_bounce.ui.displays { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.workinman.lib.utils.*; import flash.text.*; public class TokenDisplay extends GenericDisplay { public var txt:TextField; public function TokenDisplay(){ addFrameScript(5, frame6); super(); _init(); } private function _onUpdate(_arg1:ENumber):void{ gotoAndStop((_arg1.data + 1)); } function frame6(){ stop(); } override protected function _removeEventListeners():void{ super._removeEventListeners(); WorkinDispatcher.instance.removeEventListener(GameConfig.UI_GHOST_TOKEN_CHANGE, _onUpdate); } override protected function _addEventListeners():void{ WorkinDispatcher.instance.addEventListener(GameConfig.UI_GHOST_TOKEN_CHANGE, _onUpdate); super._addEventListeners(); } private function _init():void{ gotoAndStop((GameState.instance.ghostTokens + 1)); } } }//package com.nick.spongebob.pirate_bounce.ui.displays
Section 10
//Gameplay (com.nick.spongebob.pirate_bounce.ui.screens.Gameplay) package com.nick.spongebob.pirate_bounce.ui.screens { public class Gameplay extends Screen { override public function get id():String{ return ("gameplay"); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 11
//Help (com.nick.spongebob.pirate_bounce.ui.screens.Help) package com.nick.spongebob.pirate_bounce.ui.screens { import com.nick.spongebob.pirate_bounce.*; import flash.events.*; import com.workinman.lib.utils.*; public class Help extends Screen { private var _TOTAL_PAGES:Number;// = 1 private var _page:Number; public function Help(){ addFrameScript(15, frame16); super(); addEventListener(Event.REMOVED_FROM_STAGE, _onRemoveFromStage); WorkinDispatcher.getInstance().addEventListener(GameConfig.REQUEST_NEXT_HELP_PAGE, _onNextPage); WorkinDispatcher.getInstance().addEventListener(GameConfig.REQUEST_PREV_HELP_PAGE, _onPrevPage); _page = 1; } protected function _onNextPage(_arg1:Event):void{ _page++; if (_page > _TOTAL_PAGES){ _page = _TOTAL_PAGES; }; _goPage(); } private function _onRemoveFromStage(_arg1:Event):void{ removeEventListener(Event.REMOVED_FROM_STAGE, _onRemoveFromStage); WorkinDispatcher.getInstance().removeEventListener(GameConfig.REQUEST_NEXT_HELP_PAGE, _onNextPage); WorkinDispatcher.getInstance().removeEventListener(GameConfig.REQUEST_PREV_HELP_PAGE, _onPrevPage); } private function _goPage():void{ gotoAndStop(_page); } protected function _onPrevPage(_arg1:Event):void{ _page--; if (_page < 1){ _page = 1; }; _goPage(); } function frame16(){ stop(); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 12
//Highscore (com.nick.spongebob.pirate_bounce.ui.screens.Highscore) package com.nick.spongebob.pirate_bounce.ui.screens { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import com.workinman.lib.net.*; public class Highscore extends Screen { public var bg:MovieClip; private var _hsb:DisplayObject; public function Highscore(){ bg.mouseEnabled = true; SWFLoader.addEventListener(SWFLoader.ON_SWF, _onSWF); SWFLoader.load((GameConfig.swfpath + GameConfig.hsbfile)); } private function _onSWF(_arg1:ESWF):void{ if (_arg1.success){ _hsb = _arg1.swf; addChild(_hsb); }; } override public function close():void{ SWFLoader.removeEventListener(SWFLoader.ON_SWF, _onSWF); if (_hsb != null){ removeChild(_hsb); _hsb = null; }; super.close(); } override public function get id():String{ return ("highscore"); } override protected function get _openedFrame():Number{ return (1); } private function _onHSBClose(_arg1:Event):void{ close(); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 13
//Menu (com.nick.spongebob.pirate_bounce.ui.screens.Menu) package com.nick.spongebob.pirate_bounce.ui.screens { public class Menu extends Screen { } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 14
//Results (com.nick.spongebob.pirate_bounce.ui.screens.Results) package com.nick.spongebob.pirate_bounce.ui.screens { import flash.display.*; import com.nick.spongebob.pirate_bounce.ui.displays.*; public class Results extends Screen { private const _COIN_DURATION:Number = 0.15; public var nearcontainer_mc:MovieClip; public var farcontainer_mc:MovieClip; private var _farcoins:Array; private var _loop:Number; private var _coinTimer:Number; private var _nearcoins:Array; private var _nearFarAlternator:Boolean; public function Results(){ addFrameScript(15, frame16); super(); _nearcoins = []; _farcoins = []; _coinTimer = 0; _nearFarAlternator = ((Math.random() < 0.5)) ? true : false; } override public function get id():String{ return ("splash"); } override public function cleanUp():void{ _loop = _nearcoins.length; while (_loop--) { nearcontainer_mc.removeChild(_nearcoins[_loop]); }; _nearcoins = []; _loop = _farcoins.length; while (_loop--) { farcontainer_mc.removeChild(_farcoins[_loop]); }; _farcoins = []; super.cleanUp(); } override protected function _onOpened():void{ super._onOpened(); } override public function update(_arg1:Number):void{ super.update(_arg1); _coinTimer = (_coinTimer - _arg1); if (_coinTimer < 0){ _coinTimer = _COIN_DURATION; if (_nearFarAlternator){ _spawnNearCoin(); } else { _spawnFarCoin(); }; _nearFarAlternator = !(_nearFarAlternator); }; _loop = _nearcoins.length; while (_loop--) { _nearcoins[_loop].update(_arg1); if (_nearcoins[_loop].doDelete){ nearcontainer_mc.removeChild(_nearcoins[_loop]); _nearcoins.splice(_loop, 1); }; }; _loop = _farcoins.length; while (_loop--) { _farcoins[_loop].update(_arg1); if (_farcoins[_loop].doDelete){ farcontainer_mc.removeChild(_farcoins[_loop]); _farcoins.splice(_loop, 1); }; }; } override protected function get _openedFrame():Number{ return (16); } private function _spawnFarCoin():void{ _farcoins.push(new ResultCoin(true)); farcontainer_mc.addChild(_farcoins[(_farcoins.length - 1)]); } private function _spawnNearCoin():void{ _nearcoins.push(new ResultCoin(false)); nearcontainer_mc.addChild(_nearcoins[(_nearcoins.length - 1)]); } function frame16(){ stop(); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 15
//Screen (com.nick.spongebob.pirate_bounce.ui.screens.Screen) package com.nick.spongebob.pirate_bounce.ui.screens { import com.nick.spongebob.pirate_bounce.ui.*; import com.workinman.lib.events.*; import com.workinman.lib.utils.*; import com.workinman.lib.display.*; public class Screen extends WorkinMovieClip { protected var _isClosing:Boolean; protected var _isOpening:Boolean; public function Screen(){ _isOpening = true; } protected function get _closedFrame():Number{ return (totalFrames); } public function enable():void{ } override public function cleanUp():void{ super.cleanUp(); } protected function get _openedFrame():Number{ return (1); } protected function _onOpened():void{ WorkinDispatcher.getInstance().dispatchEvent(new EData(ScreenManager.EVENT_SCREEN_OPENED, {screen:this})); _isOpening = false; } public function disable():void{ } public function update(_arg1:Number):void{ if (_isOpening){ if (currentFrame == _openedFrame){ _onOpened(); }; } else { if (_isClosing){ if (currentFrame == _closedFrame){ _onClosed(); }; }; }; } protected function _onClosed():void{ WorkinDispatcher.getInstance().dispatchEvent(new EData(ScreenManager.EVENT_SCREEN_CLOSED, {screen:this})); _isClosing = false; } public function close():void{ _isClosing = true; if (_closedFrame != currentFrame){ gotoAndPlay("out"); } else { _onClosed(); }; } public function get id():String{ return ("screen"); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 16
//Splash (com.nick.spongebob.pirate_bounce.ui.screens.Splash) package com.nick.spongebob.pirate_bounce.ui.screens { public class Splash extends Screen { public function Splash(){ addFrameScript(157, frame158); super(); } override public function get id():String{ return ("splash"); } override protected function get _openedFrame():Number{ return (55); } function frame158(){ stop(); } override protected function _onOpened():void{ super._onOpened(); } } }//package com.nick.spongebob.pirate_bounce.ui.screens
Section 17
//ScreenManager (com.nick.spongebob.pirate_bounce.ui.ScreenManager) package com.nick.spongebob.pirate_bounce.ui { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.nick.spongebob.pirate_bounce.ui.screens.*; import flash.events.*; import com.workinman.lib.utils.*; public class ScreenManager { private const _CALLBACK_CLOSE_BOTTOM:String = "callcloseBottom"; private const _CALLBACK_CLOSE_SPECIFIC:String = "callcloseSpecific"; private const _CALLBACK_CLOSE_ALL:String = "callcloseAll"; private const _CALLBACK_CLOSE_ALL_SEQ:String = "callcloseAllSeq"; private const _CALLBACK_CLOSE_ALL_OVER_SEQ:String = "callcloseAllOverSeq"; private const _CALLBACK_CLOSE_ALL_OVER:String = "callcloseAllOver"; private const _CALLBACK_CLOSE_TOP:String = "callcloseTop"; private var _loop:Number; private var _queuedScreen:String; private var _timeline:GameTimeline; private var _screens:Array; private var _sequenceState:String; public static var EVENT_GAMEPLAY_CLOSED:String = "onCloseGameplay"; public static var EVENT_SCREEN_CLOSED:String = "onClosed"; public static var EVENT_SCREEN_OPENED:String = "onOpened"; private static var _instance:ScreenManager; public static var EVENT_GAMEPLAY_OPENED:String = "onOpenGameplay"; public function ScreenManager(_arg1:GameTimeline){ _timeline = _arg1; _screens = []; Updater.instance.addEventListener(Updater.EVENT_UPDATE, _update); _addEventListeners(); } private function _enableAllOverlaysSequential():void{ _screens[(_screens.length - 1)].enable(); } public function closeScreen(_arg1:String):void{ _closeSpecific(_arg1); } private function _closeAllSequential():void{ _sequenceState = _CALLBACK_CLOSE_ALL_SEQ; _screens[(_screens.length - 1)].close(); } private function _closeAllOverlaysSequential():void{ _sequenceState = _CALLBACK_CLOSE_ALL_OVER_SEQ; _screens[(_screens.length - 1)].close(); } private function _closeBottom():void{ _sequenceState = _CALLBACK_CLOSE_BOTTOM; _screens[0].close(); } private function _onNavSplash(_arg1:Event){ goSplash(); } private function _enableAllSequential():void{ _screens[(_screens.length - 1)].enable(); } private function _findScreenIndex(_arg1:Screen):Number{ _loop = _screens.length; while (_loop--) { if (_arg1 == _screens[_loop]){ return (_loop); }; }; return (-1); } private function _onScreenOpened(_arg1:EData):void{ _customOpenEvent(_arg1.data.screen); } private function _onScreenClosed(_arg1:EData):void{ _removeScreen(_arg1.data.screen); switch (_sequenceState){ case _CALLBACK_CLOSE_ALL: _showQueuedScreen(); break; case _CALLBACK_CLOSE_BOTTOM: case _CALLBACK_CLOSE_SPECIFIC: case _CALLBACK_CLOSE_TOP: _customCloseEvent(_arg1.data.screen); break; case _CALLBACK_CLOSE_ALL_SEQ: if (_screens.length == 0){ _showQueuedScreen(); } else { _screens[(_screens.length - 1)].close(); }; break; case _CALLBACK_CLOSE_ALL_OVER_SEQ: if (_screens.length > 1){ _screens[(_screens.length - 1)].close(); } else { _enableBottom(); }; break; case _CALLBACK_CLOSE_ALL_OVER: _enableBottom(); break; }; } private function _closeTop():void{ _sequenceState = _CALLBACK_CLOSE_TOP; _screens[(_screens.length - 1)].close(); } private function _enableAll():void{ _loop = _screens.length; while (_loop--) { _screens[_loop].enable(); }; } private function _onNavHelp(_arg1:Event){ goHelp(); } public function showHighscores():void{ _addScreen(new Highscore()); } private function _closeAllOverlays():void{ _sequenceState = _CALLBACK_CLOSE_ALL_OVER; _loop = _screens.length; while (_loop--) { _screens[_loop].close(); if (_loop == 1){ _loop = 0; }; }; } public function goGameplay():void{ _queuedScreen = "gameplay"; _closeAll(); } private function _customCloseEvent(_arg1:Screen):void{ switch (_arg1.id){ case "highscore": case "help": _enableAll(); break; case "splash": case "gameplay": case "help": case "results": default: _showQueuedScreen(); break; }; } private function _disableAll():void{ _loop = _screens.length; while (_loop--) { _screens[_loop].disable(); }; } public function showResults():void{ _addScreen(new Results()); } private function _showQueuedScreen():void{ switch (_queuedScreen){ case "splash": showSplash(); break; case "gameplay": showGameplay(); break; case "help": showHelp(); break; case "results": showResults(); break; case "highscore": case "menu": break; }; } private function _onNavClose(_arg1:EString){ _closeSpecific(_arg1.data); } public function showGameplay():void{ _addScreen(new Gameplay()); } public function showSplash():void{ _addScreen(new Splash()); } private function _customOpenEvent(_arg1:Screen):void{ switch (_arg1.id){ case "splash": break; case "gameplay": WorkinDispatcher.instance.dispatchEvent(new Event(EVENT_GAMEPLAY_OPENED)); break; case "help": break; case "results": break; case "help": break; case "highscore": break; default: break; }; } public function goHelp():void{ _queuedScreen = "help"; _closeAll(); } public function goHighscores():void{ _queuedScreen = "highscore"; _disableAll(); showHighscores(); } private function _disableBottom():void{ _screens[0].disable(); } private function _addEventListeners():void{ WorkinDispatcher.instance.addEventListener(EVENT_SCREEN_CLOSED, _onScreenClosed); WorkinDispatcher.instance.addEventListener(EVENT_SCREEN_OPENED, _onScreenOpened); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_SPLASH, _onNavSplash); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_GAME, _onNavGame); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_HELP, _onNavHelp); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_RESULTS, _onNavResults); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_MENU, _onNavMenu); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_CLOSE_SCREEN, _onNavClose); WorkinDispatcher.instance.addEventListener(GameConfig.NAV_HIGHSCORE, _onNavHighscore); } private function _removeEventListeners():void{ WorkinDispatcher.instance.removeEventListener(EVENT_SCREEN_CLOSED, _onScreenClosed); WorkinDispatcher.instance.removeEventListener(EVENT_SCREEN_OPENED, _onScreenOpened); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_SPLASH, _onNavSplash); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_GAME, _onNavGame); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_HELP, _onNavHelp); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_RESULTS, _onNavResults); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_MENU, _onNavMenu); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_HIGHSCORE, _onNavHighscore); WorkinDispatcher.instance.removeEventListener(GameConfig.NAV_CLOSE_SCREEN, _onNavClose); } private function _closeSpecific(_arg1:String):void{ _sequenceState = _CALLBACK_CLOSE_SPECIFIC; _screens[_findScreenIndexByID(_arg1)].close(); } private function _enableTop():void{ _screens[(_screens.length - 1)].enable(); } private function _disableAllSequential():void{ _screens[(_screens.length - 1)].disable(); } private function _onNavMenu(_arg1:Event){ goMenu(); } public function showHelp():void{ _addScreen(new Help()); } private function _findScreenIndexByID(_arg1:String):Number{ _loop = _screens.length; while (_loop--) { if (_arg1 == _screens[_loop].id){ return (_loop); }; }; return (-1); } private function _disableAllOverlaysSequential():void{ _screens[(_screens.length - 1)].disable(); } private function _enableAllOverlays():void{ _loop = _screens.length; while (_loop--) { _screens[_loop].enable(); if (_loop == 1){ _loop = 0; }; }; } public function goMenu():void{ Main.instance.pauseGameplay(); _disableAll(); showMenu(); } private function _update(_arg1:EUpdate):void{ _loop = _screens.length; while (_loop--) { _screens[_loop].update(_arg1.dt); }; } private function _onNavHighscore(_arg1:Event){ goHighscores(); } private function _disableTop():void{ _screens[(_screens.length - 1)].disable(); } private function _enableBottom():void{ _screens[0].enable(); } private function _addScreen(_arg1:Screen):void{ _screens.push(_arg1); _timeline.ui_container.addChild(_arg1); } public function goSplash():void{ _queuedScreen = "splash"; _closeAll(); } private function _onNavResults(_arg1:Event){ goResults(); } public function goResults():void{ _queuedScreen = "results"; _closeAll(); } private function _removeScreen(_arg1:Screen):void{ var _local2:Number = _findScreenIndex(_arg1); _timeline.ui_container.removeChild(_screens[_local2]); _screens[_local2].cleanUp(); _screens.splice(_local2, 1); } private function _closeAll():void{ _sequenceState = _CALLBACK_CLOSE_ALL; _loop = _screens.length; while (_loop--) { _screens[_loop].close(); }; } private function _onNavGame(_arg1:Event){ goGameplay(); } private function _disableAllOverlays():void{ _loop = _screens.length; while (_loop--) { _screens[_loop].disable(); if (_loop == 1){ _loop = 0; }; }; } public function showMenu():void{ _addScreen(new Menu()); } public static function init(_arg1:GameTimeline):void{ _instance = new ScreenManager(_arg1); } public static function get instance():ScreenManager{ if (_instance == null){ return (null); }; return (_instance); } } }//package com.nick.spongebob.pirate_bounce.ui
Section 18
//GameCamera (com.nick.spongebob.pirate_bounce.world.cameras.GameCamera) package com.nick.spongebob.pirate_bounce.world.cameras { import com.workinman.paradise2.world.camera.*; public class GameCamera extends BaseCamera { public function GameCamera(_arg1:Object){ super(_arg1); } } }//package com.nick.spongebob.pirate_bounce.world.cameras
Section 19
//Background (com.nick.spongebob.pirate_bounce.world.entitys.Background) package com.nick.spongebob.pirate_bounce.world.entitys { public class Background extends GameEntity { public function Background(_arg1:Object){ super(_arg1); } override protected function get _isAlwaysVisible():Boolean{ return (true); } override protected function get _defaultAsset():Class{ return (AssetBackground); } override public function get group():String{ return ("bg"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 20
//Boat (com.nick.spongebob.pirate_bounce.world.entitys.Boat) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.*; import flash.events.*; import flash.display.*; import com.workinman.lib.math.*; import com.workinman.paradise2.world.camera.*; import com.workinman.lib.utils.*; public class Boat extends GameEntity { private const _TIP_RATE:Number = 140; private const _BOB_MAGNITUDE:Number = 6; private const _ROTATION_Y_OFFSET:Number = 58; private const _BOB_DURATION:Number = 2; private const _BASE_SURFACE_OFFSET:Number = -87; private var _surfaceLine:WorkinLine; private var _isTipping:Boolean; private var _rotationTarget:Number; private var _isBumping:Boolean; private var _rotation:Number; private var _drawContainer:MovieClip; private var _bumpStage:Number; private var _bobY:Number; private var _bobTimer:Number; public function Boat(_arg1:Object){ super(_arg1); _drawContainer = new MovieClip(); addChild(_drawContainer); _isTipping = false; _isBumping = false; _bumpStage = 0; _rotation = 0; _bobY = 0; _rotationTarget = 0; _nextPos.to(197.1, 473.6); _surfaceLine = new WorkinLine(_pos.addCopy(-245, _BASE_SURFACE_OFFSET), _pos.addCopy(245, _BASE_SURFACE_OFFSET)); } private function _updateSurfaceLineRotation():void{ _surfaceLine.p0.to(_surfaceLine.p0.x, ((_BASE_SURFACE_OFFSET + ((-(_rotation) / 12) * _ROTATION_Y_OFFSET)) + _bobY)); _surfaceLine.p1.to(_surfaceLine.p1.x, ((_BASE_SURFACE_OFFSET + ((_rotation / 12) * _ROTATION_Y_OFFSET)) + _bobY)); _surfaceLine.recalculate(); } public function getSurfacePoint(_arg1:Number):Number{ var _local2:* = (Math.abs(((_pos.x + _surfaceLine.p0.x) - _arg1)) / _surfaceLine.vector.length); return (((_pos.y + _surfaceLine.getPoint(_local2).y) + _bobY)); } public function tipDown(_arg1:Boolean):void{ _isTipping = true; _rotationTarget = (_arg1) ? -12 : 12; _bobTimer = _BOB_DURATION; } override protected function get _defaultAsset():Class{ return (AssetBoat); } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); if (_bobTimer > 0){ _bobTimer = (_bobTimer - _arg1); if (_bobTimer < 0){ _bobTimer = 0; }; _bobY = ((-(Math.sin(((_bobTimer * Math.PI) * 3))) * _BOB_MAGNITUDE) * (_bobTimer / _BOB_DURATION)); }; if (_isTipping){ if (_rotation > _rotationTarget){ _rotation = (_rotation - (_TIP_RATE * _arg1)); if (_rotation <= _rotationTarget){ _isTipping = false; _isBumping = true; _bumpStage = 1; _rotation = _rotationTarget; WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_BOAT_TIP_COMPLETE)); }; } else { _rotation = (_rotation + (_TIP_RATE * _arg1)); if (_rotation >= _rotationTarget){ _isTipping = false; _isBumping = true; _bumpStage = 1; _rotation = _rotationTarget; WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_BOAT_TIP_COMPLETE)); }; }; _updateSurfaceLineRotation(); } else { if (_isBumping){ if (_bumpStage == 1){ _rotation = ((_rotationTarget < 0)) ? (_rotationTarget - 0.5) : (_rotationTarget + 0.5); _bumpStage++; } else { _rotation = _rotationTarget; _isBumping = false; }; _updateSurfaceLineRotation(); }; }; } override protected function _renderPosition(_arg1:BaseCamera):void{ super._renderPosition(_arg1); y = (y + _bobY); _asset.rotation = _rotation; } override public function get group():String{ return ("bg"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 21
//Effect (com.nick.spongebob.pirate_bounce.world.entitys.Effect) package com.nick.spongebob.pirate_bounce.world.entitys { public class Effect extends GameEntity { protected var _lifespanRemaining:Number; public function Effect(_arg1:Object){ super(_arg1); _lifespanRemaining = _lifespan; } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); _lifespanRemaining = (_lifespanRemaining - _arg1); if (_lifespanRemaining < 0){ doDelete = true; }; } protected function get _lifespan():Number{ return (3); } override public function get group():String{ return ("effects"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 22
//FloatingScoreText (com.nick.spongebob.pirate_bounce.world.entitys.FloatingScoreText) package com.nick.spongebob.pirate_bounce.world.entitys { public class FloatingScoreText extends GameEntity { public function FloatingScoreText(_arg1:Object){ super(_arg1); _asset.txt.text = String(_arg1.value); _velocity.y = -120; } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); if (_pos.x < -100){ doDelete = true; }; } override protected function get _defaultAsset():Class{ return (AssetScore); } override public function get group():String{ return ("effects"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 23
//Foreground (com.nick.spongebob.pirate_bounce.world.entitys.Foreground) package com.nick.spongebob.pirate_bounce.world.entitys { public class Foreground extends GameEntity { public function Foreground(_arg1:Object){ super(_arg1); } override protected function get _isAlwaysVisible():Boolean{ return (true); } override protected function get _defaultAsset():Class{ return (AssetForeground); } override public function get group():String{ return ("foreground"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 24
//GameEntity (com.nick.spongebob.pirate_bounce.world.entitys.GameEntity) package com.nick.spongebob.pirate_bounce.world.entitys { import com.workinman.lib.math.*; import com.workinman.paradise2.world.entitys.*; public class GameEntity extends ParaSprite { public var doDelete:Boolean; public function GameEntity(_arg1:Object){ super(_arg1); doDelete = false; } public function get radius():Number{ return (20); } public function get collisionCenter():WorkinPoint{ return (_pos); } override protected function _animate(_arg1:String):void{ _asset.gotoAndStop(_arg1); } public function testPlayerCollision(_arg1:Player):Boolean{ return ((_arg1.collisionCenter.distTo(_pos) < (_arg1.radius + radius))); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 25
//GameTimer (com.nick.spongebob.pirate_bounce.world.entitys.GameTimer) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.workinman.lib.utils.*; public class GameTimer extends GameEntity { private const _BLINK_DUR:Number = 0.07; private var _blinkTimer:Number; public function GameTimer(_arg1:Object){ super(_arg1); _nextPos.to(162, 0); _pos.to(162, 0); _asset.gotoAndStop(100); WorkinDispatcher.instance.addEventListener(GameConfig.UI_TIME_CHANGE, _onUpdate); } override public function cleanUp():void{ super.cleanUp(); WorkinDispatcher.instance.removeEventListener(GameConfig.UI_TIME_CHANGE, _onUpdate); } override protected function get _defaultAsset():Class{ return (AssetTimer); } override public function get group():String{ return ("timer"); } private function _onUpdate(_arg1:ENumber):void{ var _local2:Number = _arg1.data; if (_local2 == 0){ _local2 = 0.01; }; _asset.gotoAndStop(Math.ceil((_local2 * 100))); } override public function update(_arg1:Number):void{ if (_blinkTimer > 0){ _blinkTimer = (_blinkTimer - _arg1); if (_blinkTimer <= 0){ _asset.timer_mc.gotoAndStop(1); }; }; } public function blink(_arg1:Boolean):void{ _asset.timer_mc.gotoAndStop((_arg1) ? 2 : 3); _blinkTimer = _BLINK_DUR; } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 26
//Ghost (com.nick.spongebob.pirate_bounce.world.entitys.Ghost) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.workinman.lib.utils.*; public class Ghost extends Passer { private var _particleTimer:Number; private var _isDangerous:Boolean; public function Ghost(_arg1:Object){ super(_arg1); var _local2:Number = Math.ceil((Math.random() * 4)); if (_local2 == 0){ _local2 = 1; }; _asset.gotoAndStop(_local2); _isDangerous = true; if (_dir > 0){ _asset.scaleX = -1; }; _particleTimer = particleFrequency; } public function get timeValue():Number{ return (-10); } public function get isDangerous():Boolean{ return (_isDangerous); } override protected function get _defaultAsset():Class{ return (AssetGhost); } override public function get radius():Number{ return (20); } override protected function get _flyRate():Number{ return ((90 + (Math.random() * 40))); } private function get particleFrequency():Number{ return ((0.2 + (Math.random() * 0.2))); } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); _particleTimer = (_particleTimer - _arg1); if (_particleTimer < 0){ WorkinDispatcher.instance.dispatchEvent(new EData(GameConfig.EVENT_PARTICLE, {x:(_pos.x + ((Math.random() * 40) * -(_dir))), y:(_pos.y + (-15 + (Math.random() * 30))), type:GameConfig.PARTICLE_GHOST})); _particleTimer = particleFrequency; }; } public function onHit():void{ _isDangerous = false; doDelete = true; } override public function get group():String{ return ("ghosts"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 27
//GhostBurstEffect (com.nick.spongebob.pirate_bounce.world.entitys.GhostBurstEffect) package com.nick.spongebob.pirate_bounce.world.entitys { public class GhostBurstEffect extends Effect { private const _FLY_RATE:Number = 120; public function GhostBurstEffect(_arg1:Object){ super(_arg1); _velocity = _arg1.velocity; _velocity.length = _FLY_RATE; } override protected function get _defaultAsset():Class{ return (AssetParticleGhost); } override protected function get _lifespan():Number{ return (1.2); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 28
//GhostEffect (com.nick.spongebob.pirate_bounce.world.entitys.GhostEffect) package com.nick.spongebob.pirate_bounce.world.entitys { public class GhostEffect extends Effect { public function GhostEffect(_arg1:Object){ super(_arg1); } override protected function get _lifespan():Number{ return (3); } override protected function get _defaultAsset():Class{ return (AssetParticleGhost); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 29
//Passer (com.nick.spongebob.pirate_bounce.world.entitys.Passer) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.world.*; public class Passer extends GameEntity { protected var _dir:Number; public function Passer(_arg1:Object){ super(_arg1); if (_pos.x == WorldManager.LEFT_SPAWN){ _dir = 1; } else { _dir = -1; }; _velocity.x = (_flyRate * _dir); } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); if ((((_dir > 0)) && ((_pos.x > WorldManager.RIGHT_SPAWN)))){ doDelete = true; } else { if ((((_dir < 0)) && ((_pos.x < WorldManager.LEFT_SPAWN)))){ doDelete = true; }; }; } protected function get _flyRate():Number{ return (150); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 30
//Patrick (com.nick.spongebob.pirate_bounce.world.entitys.Patrick) package com.nick.spongebob.pirate_bounce.world.entitys { public class Patrick extends Player { public function Patrick(_arg1:Object){ super(_arg1); _isFirstJump = false; } override protected function get _leftBound():Number{ return (230); } override protected function get _rightBound():Number{ return (370); } override protected function get _mouseOffest():Number{ return (90); } override protected function get _defaultAsset():Class{ return (AssetPatrick); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 31
//Pickup (com.nick.spongebob.pirate_bounce.world.entitys.Pickup) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import com.workinman.lib.sound.*; import com.workinman.lib.utils.*; public class Pickup extends Passer { private const _SPARKLE_RATE:Number = 0.2; private var _points:Number; private var _collected:Boolean; private var _sparkleTimer:Number; protected var _value:Number; public function Pickup(_arg1:Object){ _value = _arg1.value; _collected = false; _points = _determinePoints(); if (_value > 2){ _sparkleTimer = _SPARKLE_RATE; }; super(_arg1); } override public function get group():String{ return ("pickups"); } public function get points():Number{ return (_points); } override public function testPlayerCollision(_arg1:Player):Boolean{ if (_collected){ return (false); }; return (super.testPlayerCollision(_arg1)); } public function get timeValue():Number{ return (_determineTimeValue()); } public function get collected():Boolean{ return (_collected); } public function collect():void{ _animate("vanish"); _collected = true; _velocity.to(0, 0); GameState.instance.onAddScore(_points); switch (_value){ case 1: default: GlobalSound.instance.playSound("coin1"); break; case 2: GlobalSound.instance.playSound("coin2"); break; case 3: GlobalSound.instance.playSound("coin3"); break; case 4: GlobalSound.instance.playSound("coin4"); GameState.instance.onCollectGhostToken(); break; }; } public function get value():Number{ return (_value); } override protected function get _defaultAsset():Class{ switch (_value){ case 1: default: return (AssetPickupCopper); case 2: return (AssetPickupSilver); case 3: return (AssetPickupGold); case 4: return (AssetPickupSpecial); }; } protected function _determinePoints():Number{ switch (_value){ case 1: default: return (10); case 2: return (75); case 3: return (250); case 4: return (25); }; } override public function update(_arg1:Number):void{ super.update(_arg1); if (((_collected) && (!((_asset.anim == null))))){ if (_asset.anim.currentFrame == _asset.anim.totalFrames){ doDelete = true; }; }; if (_sparkleTimer > 0){ _sparkleTimer = (_sparkleTimer - _arg1); if (_sparkleTimer <= 0){ WorkinDispatcher.instance.dispatchEvent(new EData(GameConfig.EVENT_PARTICLE, {x:(_pos.x + (5 - (Math.random() * 10))), y:(_pos.y + (5 - (Math.random() * 10))), type:GameConfig.PARTICLE_SPARKLE})); _sparkleTimer = _SPARKLE_RATE; }; }; } override public function get radius():Number{ return (15); } override protected function get _flyRate():Number{ if (_value == 1){ return (120); }; if (_value == 2){ return (180); }; return (220); } protected function _determineTimeValue():Number{ switch (_value){ case 1: default: return (1); case 2: return (4); case 3: return (8); case 4: return (3); }; } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 32
//Player (com.nick.spongebob.pirate_bounce.world.entitys.Player) package com.nick.spongebob.pirate_bounce.world.entitys { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import flash.events.*; import com.workinman.lib.math.*; import com.workinman.lib.utils.*; import flash.filters.*; public class Player extends GameEntity { protected const _GRAVITY_STRONG_Y:Number = 1100; protected const _MOUSE_CHASE_RATE:Number = 400; protected const _GRAVITY_Y:Number = 700; protected const _GHOST_MODE_DURATION:Number = 3; protected const _LAUNCH_VELOCITY:Number = -420; protected const _DROP_VELOCITY:Number = 240; protected const _AIR_IDLE:String = "airIdle"; protected const _CEILING_Y:Number = 180; protected const _TEMP_FLOOR_Y:Number = 384; protected const _GROUND_IDLE:String = "groundIdle"; protected const _GROUND_LAUNCH:String = "groundLaunch"; protected const _AIR_UP:String = "airUp"; protected const _GHOST_PARTICLE_FREQUENCY:Number = 0.1; protected const _AIR_DOWN:String = "airDown"; protected const _CEILING_CAP_Y:Number = 90; protected const _GROUND_LAND:String = "groundLand"; private var _isGhostMode:Boolean; protected var _state:String; private var _ghostParticleTimer:Number; private var _ghostModeTimer:Number; protected var _isFirstJump:Boolean; private var _lastMousePoint:Number; protected var _collisionCenter:WorkinPoint; private var _groundY:Number; public function Player(_arg1:Object){ super(_arg1); _collisionCenter = new WorkinPoint(); _updateCollisionCenter(); _groundY = _TEMP_FLOOR_Y; _pos.y = _groundY; _nextPos.y = _groundY; _state = _GROUND_IDLE; _isFirstJump = true; _isGhostMode = false; _updateAnimation(); _lastMousePoint = 0; } public function get isAirborne():Boolean{ return ((((((_state == _AIR_UP)) || ((_state == _AIR_IDLE)))) || ((_state == _AIR_DOWN)))); } private function _doGroundLaunch():void{ _state = _GROUND_LAUNCH; _updateAnimation(); } private function _onAirUpComplete():void{ _doAirDown(); } protected function _updateAnimation():void{ var _local1:String; switch (_state){ case _GROUND_IDLE: _local1 = "idle"; break; case _GROUND_LAUNCH: _local1 = "jump up"; break; case _GROUND_LAND: _local1 = "down squish"; break; case _AIR_UP: _local1 = "up"; break; case _AIR_IDLE: _local1 = "up squish"; break; case _AIR_DOWN: _local1 = "down"; break; }; _animate(_local1); } public function get isCollideable():Boolean{ return ((((((_state == _AIR_UP)) || ((_state == _AIR_DOWN)))) && (!(_isGhostMode)))); } public function get isSpongebob():Boolean{ return (false); } override public function get radius():Number{ return (30); } private function _doAirUp():void{ _state = _AIR_UP; _velocity.to(0, _LAUNCH_VELOCITY); _updateAnimation(); } private function _endGhostMode():void{ if (!_isGhostMode){ return; }; _isGhostMode = false; _asset.filters = []; _asset.alpha = 1; } public function get isOnGround():Boolean{ return ((((((_state == _GROUND_IDLE)) || ((_state == _GROUND_LAUNCH)))) || ((_state == _GROUND_LAND)))); } private function _onGroundLaunchComplete():void{ _doAirUp(); } protected function _updateCollisionCenter():void{ _collisionCenter.to(_pos.x, (_pos.y - 48)); } override public function get collisionCenter():WorkinPoint{ return (_collisionCenter); } private function _onAirDownComplete():void{ _doGroundLand(); } private function _onGroundLandComplete():void{ _doGroundIdle(); } private function _onAirIdleComplete():void{ _doAirDown(); } private function _doAirDown():void{ _state = _AIR_DOWN; _updateAnimation(); } public function setGhostMode():void{ if (_isGhostMode){ return; }; _isGhostMode = true; _asset.filters = [new GlowFilter(10996082, 1, 30, 30), new BlurFilter(2, 2)]; _asset.alpha = 0.6; _ghostModeTimer = _GHOST_MODE_DURATION; _ghostParticleTimer = _GHOST_PARTICLE_FREQUENCY; } protected function get _leftBound():Number{ return (0); } private function _doAirIdle():void{ _velocity.to(0, 0); _pos.to(_pos.x, _CEILING_Y); _nextPos.to(_pos.x, _CEILING_Y); _state = _AIR_IDLE; _updateAnimation(); } private function _doGroundIdle():void{ _state = _GROUND_IDLE; _updateAnimation(); } override public function updatePrediction(_arg1:Number):void{ super.updatePrediction(_arg1); if (isMouseChaseable){ if (Main.instance.mousePoint.x < _lastMousePoint){ _nextPos.x = (_nextPos.x - (_MOUSE_CHASE_RATE * _arg1)); } else { if (Main.instance.mousePoint.x > _lastMousePoint){ _nextPos.x = (_nextPos.x + (_MOUSE_CHASE_RATE * _arg1)); }; }; if (_nextPos.x > _rightBound){ _nextPos.x = _rightBound; } else { if (_nextPos.x < _leftBound){ _nextPos.x = _leftBound; }; }; }; switch (_state){ case _GROUND_LAUNCH: if (((!((_asset.anim == null))) && ((_asset.anim.currentFrame == _asset.anim.totalFrames)))){ _onGroundLaunchComplete(); }; break; case _GROUND_LAND: if (((!((_asset.anim == null))) && ((_asset.anim.currentFrame == _asset.anim.totalFrames)))){ _onGroundLandComplete(); }; break; case _AIR_UP: if (_nextPos.y < _CEILING_Y){ _onAirUpComplete(); }; break; case _AIR_DOWN: if ((((_nextPos.y < _CEILING_Y)) && ((_velocity.y < 0)))){ _velocity.y = (_velocity.y + (_GRAVITY_STRONG_Y * _arg1)); } else { _velocity.y = (_velocity.y + (_GRAVITY_Y * _arg1)); }; if (_nextPos.y > _groundY){ _onAirDownComplete(); }; break; case _AIR_IDLE: if (((!((_asset.anim == null))) && ((_asset.anim.currentFrame == _asset.anim.totalFrames)))){ _onAirIdleComplete(); }; break; }; if (_ghostModeTimer > 0){ _ghostModeTimer = (_ghostModeTimer - _arg1); if (_ghostModeTimer <= 0){ _endGhostMode(); } else { _ghostParticleTimer = (_ghostParticleTimer - _arg1); if (_ghostParticleTimer < 0){ _ghostParticleTimer = _GHOST_PARTICLE_FREQUENCY; WorkinDispatcher.instance.dispatchEvent(new EData(GameConfig.EVENT_PARTICLE, {x:(_collisionCenter.x + (-30 + (Math.random() * 60))), y:(_collisionCenter.y + (-20 + (Math.random() * 40))), type:GameConfig.PARTICLE_PLAYER_GHOST})); }; }; }; _lastMousePoint = Main.instance.mousePoint.x; } override public function updatePosition(_arg1:Number):void{ super.updatePosition(_arg1); _updateCollisionCenter(); } public function get isGhostMode():Boolean{ return (_isGhostMode); } public function launch():void{ if (_state != _GROUND_IDLE){ return; }; _doAirUp(); } public function get isInteractable():Boolean{ return ((((_state == _GROUND_IDLE)) || ((_state == _AIR_IDLE)))); } public function takeDamage():void{ if (_state == _AIR_UP){ _doAirDown(); _velocity.to(0, _DROP_VELOCITY); } else { if (_state == _AIR_DOWN){ _velocity.y = -100; }; }; } protected function get _rightBound():Number{ return (400); } private function _doGroundLand():void{ _state = _GROUND_LAND; _pos.to(_pos.x, _groundY); _nextPos.to(_pos.x, _groundY); _velocity.to(0, 0); _updateAnimation(); WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_BOAT_DOWN)); } public function onClick():void{ if ((((_state == _GROUND_IDLE)) && (_isFirstJump))){ _doGroundLaunch(); _isFirstJump = false; } else { if (!_isGhostMode){ WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_GHOST_MODE)); }; }; } public function get isMouseChaseable():Boolean{ return ((((_state == _AIR_UP)) || ((_state == _AIR_DOWN)))); } public function updateGroundPosition(_arg1:Boat):void{ _groundY = _arg1.getSurfacePoint(_pos.x); if (isOnGround){ _nextPos.y = (_pos.y = _groundY); }; } protected function get _mouseOffest():Number{ return (0); } override public function get group():String{ return ("players"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 33
//SparkleEffect (com.nick.spongebob.pirate_bounce.world.entitys.SparkleEffect) package com.nick.spongebob.pirate_bounce.world.entitys { public class SparkleEffect extends Effect { public function SparkleEffect(_arg1:Object){ super(_arg1); } override protected function get _lifespan():Number{ return (3); } override protected function get _defaultAsset():Class{ return (AssetParticleSparkle); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 34
//Spongebob (com.nick.spongebob.pirate_bounce.world.entitys.Spongebob) package com.nick.spongebob.pirate_bounce.world.entitys { public class Spongebob extends Player { public function Spongebob(_arg1:Object){ super(_arg1); } override protected function get _rightBound():Number{ return (170); } override public function get isSpongebob():Boolean{ return (true); } override protected function get _leftBound():Number{ return (30); } override protected function get _mouseOffest():Number{ return (-90); } override protected function get _defaultAsset():Class{ return (AssetSpongebob); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 35
//TimeBonus (com.nick.spongebob.pirate_bounce.world.entitys.TimeBonus) package com.nick.spongebob.pirate_bounce.world.entitys { import com.workinman.lib.math.*; public class TimeBonus extends GameEntity { private var _value:Number; public function TimeBonus(_arg1:Object){ _value = _arg1.value; super(_arg1); _asset.txt.text = (((_value > 0)) ? "+" : "" + String(_arg1.value)); setPath(new WorkinPoint(200, 39), 1.5, PennerManager.EASE_OUT); } public function get value():Number{ return (_value); } override protected function _onPathComplete():void{ super._onPathComplete(); doDelete = true; } override protected function get _defaultAsset():Class{ return (((_value < 0)) ? AssetTimeBonusRed : AssetTimeBonusGreen); } override public function get group():String{ return ("effects"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 36
//TimeUp (com.nick.spongebob.pirate_bounce.world.entitys.TimeUp) package com.nick.spongebob.pirate_bounce.world.entitys { public class TimeUp extends GameEntity { public function TimeUp(_arg1:Object){ super(_arg1); } override protected function get _isAlwaysVisible():Boolean{ return (true); } override protected function get _defaultAsset():Class{ return (AssetTimeUp); } override public function get group():String{ return ("effects"); } } }//package com.nick.spongebob.pirate_bounce.world.entitys
Section 37
//WorldManager (com.nick.spongebob.pirate_bounce.world.WorldManager) package com.nick.spongebob.pirate_bounce.world { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import flash.events.*; import com.workinman.lib.sound.*; import com.workinman.paradise2.*; import com.workinman.lib.math.*; import com.nick.spongebob.pirate_bounce.world.cameras.*; import com.nick.spongebob.pirate_bounce.world.entitys.*; import com.workinman.paradise2.world.camera.*; import com.workinman.lib.utils.*; public class WorldManager { private const _TIME_UP_DURATION:Number = 4; private var _loop:Number; private var _ghostTimer:Number; private var _state:GameState; private var _spongebob:Spongebob; private var _timeUpTimer:Number; private var _boat:Boat; private var _cameras:CameraManager; private var _dt:Number; private var _pickups:Array; private var _loopb:Number; private var _patrick:Patrick; private var _timer:GameTimer; private var _ghostTimerDuration:Number; private var _effects:Array; private var _background:Background; private var _timeBonus:Array; private var _isPaused:Boolean; private var _pickupList:Array; private var _foreground:Foreground; private var _ghosts:Array; private var _activePlayer:Player; private var _timeUp:TimeUp; private var _pickupTimer:Number; private var _viewRoom:EventDispatcher; public static const RIGHT_SPAWN:Number = 600; public static const LEFT_SPAWN:Number = -200; public function WorldManager():void{ _state = GameState.instance; _viewRoom = WorkinDispatcher.getInstance().getRoom(ParadiseConfig.ROOM_VIEW); _generate(); } private function _levelUp():void{ GameState.instance.nextLevel(); _generateGhostFrequency(GameState.instance.level); _generatePickupList(GameState.instance.level); } private function _generateGhostFrequency(_arg1:Number):void{ _ghostTimerDuration = (5 - ((_arg1 - 1) / 2)); if (_ghostTimerDuration < 0.5){ _ghostTimerDuration = 0.5; }; } private function _testPlayerPickupCollision(_arg1:Pickup):void{ if (_arg1.collected){ return; }; if (_arg1.testPlayerCollision(_activePlayer)){ _arg1.collect(); spawnTimeBonus(_arg1.pos.x, _arg1.pos.y, _arg1.timeValue); }; } private function _onMouseClick(_arg1:Event):void{ if (_timeUpTimer > 0){ return; }; if ((((Main.instance.mousePoint.x < 75)) && ((Main.instance.mousePoint.y > 420)))){ return; }; _activePlayer.onClick(); } private function _onSpawnParticle(_arg1:EData):void{ var _local2:Effect; switch (_arg1.data.type){ case GameConfig.PARTICLE_SPARKLE: _local2 = new SparkleEffect({x:_arg1.data.x, y:_arg1.data.y}); break; case GameConfig.PARTICLE_PLAYER_GHOST: _local2 = new GhostEffect({x:_arg1.data.x, y:_arg1.data.y}); break; case GameConfig.PARTICLE_GHOST: _local2 = new GhostEffect({x:_arg1.data.x, y:_arg1.data.y}); break; }; _effects.push(_local2); } private function _getRandomGhostY():Number{ return ((100 + (Math.random() * 130))); } private function _spawnGhostBurst(_arg1:GameEntity):void{ var _local3:Number; var _local4:Number; var _local2:Number = 8; var _local5:Number = 15; while (_local2--) { if (_local2 == 0){ _local3 = -(_local5); _local4 = -(_local5); } else { if (_local2 == 7){ _local3 = -(_local5); _local4 = 0; } else { if (_local2 == 6){ _local3 = -(_local5); _local4 = _local5; } else { if (_local2 == 5){ _local3 = 0; _local4 = _local5; } else { if (_local2 == 4){ _local3 = _local5; _local4 = _local5; } else { if (_local2 == 3){ _local3 = _local5; _local4 = 0; } else { if (_local2 == 2){ _local3 = _local5; _local4 = -(_local5); } else { _local3 = 0; _local4 = -(_local5); }; }; }; }; }; }; }; _effects.push(new GhostBurstEffect({x:(_arg1.collisionCenter.x + _local3), y:(_arg1.collisionCenter.y + _local3), velocity:new WorkinPoint(_local3, _local4)})); }; } private function _onGameOver(_arg1:String="normal"):void{ GlobalSound.instance.playSound("laugh"); WorkinDispatcher.getInstance().dispatchEvent(new Event(GameConfig.EVENT_GAME_OVER)); } private function _onToggleKeyEvent(_arg1:EData):void{ if ((((_arg1.data.keyCode == 17)) || ((_arg1.data.keyCode == 90)))){ }; } public function spawnTimeBonus(_arg1:Number, _arg2:Number, _arg3:Number):void{ _timeBonus.push(new TimeBonus({x:_arg1, y:_arg2, value:_arg3})); } private function _spawnPickup():void{ var _local1:Number = Math.floor((_pickupList.length * Math.random())); if (_local1 == _pickupList.length){ _local1 = 0; }; _pickups.push(new Pickup({x:((Math.random() < 0.5)) ? LEFT_SPAWN : RIGHT_SPAWN, y:_getRandomPickupY(), value:_pickupList[_local1]})); _pickupList.splice(_local1, 1); if (_pickupList.length == 0){ _levelUp(); }; } private function _onBoatDown(_arg1:Event):void{ _boat.tipDown((_activePlayer.isSpongebob) ? true : false); _onChangeActivePlayer(); } public function spawnScoreText(_arg1:Number, _arg2:Number, _arg3:Number):void{ _effects.push(new FloatingScoreText({x:_arg1, y:_arg2, value:_arg3})); } public function get camera():GameCamera{ return ((_cameras.camera as GameCamera)); } public function get isGameOver():Boolean{ return (isGameOver); } private function _testPlayerGhostCollision(_arg1:Ghost):void{ if (((((!(_activePlayer.isCollideable)) && (!(_activePlayer.isGhostMode)))) || (!(_arg1.isDangerous)))){ return; }; if (_arg1.testPlayerCollision(_activePlayer)){ if (_activePlayer.isGhostMode){ _arg1.onHit(); _spawnGhostBurst(_arg1); GameState.instance.onAddScore(200); spawnTimeBonus(_arg1.pos.x, _arg1.pos.y, 5); } else { _activePlayer.takeDamage(); GlobalSound.instance.playSound("ghost"); _arg1.onHit(); _spawnGhostBurst(_arg1); spawnTimeBonus(_arg1.pos.x, _arg1.pos.y, _arg1.timeValue); }; }; } private function _resetPickupTimer():void{ _pickupTimer = (0.5 + (Math.random() * 1.5)); } private function _generatePickupList(_arg1:Number):void{ var _local7:Number; _pickupList = []; var _local2:Array = []; var _local3:Number = ((_arg1 > 9)) ? 0 : 1; var _local4:Number = ((_arg1 > 2)) ? 1 : 0; var _local5:Number = ((_arg1 > 1)) ? Math.ceil((_arg1 / 4)) : 0; var _local6:Number = (((10 - _local5) - _local3) - _local4); while (_local3--) { _local2.push(4); }; while (_local4--) { _local2.push(3); }; if (_local5 > 0){ while (_local5--) { _local2.push(2); }; }; if (_local6 > 0){ while (_local6--) { _local2.push(1); }; }; var _local8:Number = _local2.length; while (_local8--) { _local7 = Math.floor((Math.random() * _local2.length)); if (_local7 == _local2.length){ _local7 = 0; }; _pickupList.push(_local2[_local7]); _local2.splice(_local7, 1); }; } private function _onBoatSnap(_arg1:Event):void{ _activePlayer.launch(); } public function cleanUp():void{ WorkinDispatcher.instance.dispatchEvent(new Event(ParadiseConfig.EVENT_CLEAN_UP_WORLD)); _removeEventListeners(); } private function _removeEventListeners():void{ WorkinDispatcher.instance.removeEventListener(ParadiseConfig.EVENT_MOUSE_DOWN, _onMouseClick); WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_CHANGE_ACTIVE_PLAYER, _onChangeActivePlayer); WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_PARTICLE, _onSpawnParticle); WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_GHOST_MODE, _onGhostMode); WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_BOAT_DOWN, _onBoatDown); WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_BOAT_TIP_COMPLETE, _onBoatSnap); Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _update); } private function _getRandomPickupY():Number{ return ((100 + (Math.random() * 200))); } private function _addEventListeners():void{ WorkinDispatcher.instance.addEventListener(ParadiseConfig.EVENT_MOUSE_DOWN, _onMouseClick); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_CHANGE_ACTIVE_PLAYER, _onChangeActivePlayer); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_PARTICLE, _onSpawnParticle); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_GHOST_MODE, _onGhostMode); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_BOAT_DOWN, _onBoatDown); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_BOAT_TIP_COMPLETE, _onBoatSnap); Updater.getInstance().addEventListener(Updater.EVENT_UPDATE, _update); Updater.getInstance().setGameMode(); Updater.getInstance().lockFPS(60); } public function nextLevel():void{ _state.onAddScore((15 * _state.level)); unpause(); } private function _generate():void{ _addEventListeners(); _cameras = new CameraManager(); _cameras.addSimpleCamera("main", true, (ParadiseConfig.SCREEN_WIDTH / 2), (ParadiseConfig.SCREEN_HEIGHT / 2)); _spongebob = new Spongebob({x:99}); _patrick = new Patrick({x:311.3}); _background = new Background({}); _foreground = new Foreground({}); _boat = new Boat({}); _timer = new GameTimer({}); _activePlayer = _spongebob; _ghosts = []; _pickups = []; _effects = []; _timeBonus = []; _timeUpTimer = 0; _generateGhostFrequency(GameState.instance.level); _generatePickupList(GameState.instance.level); _resetPickupTimer(); _resetGhostTimer(); } public function get exists():Boolean{ return (true); } private function _update(_arg1:EUpdate):void{ if (_arg1.dt > 0.2){ _dt = 0.2; } else { _dt = _arg1.dt; }; if (_timeUpTimer > 0){ _timeUpTimer = (_timeUpTimer - _dt); _timeUp.update(_dt); if (_timeUpTimer < 0){ WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_GAME_OVER)); }; _cameras.renderCameraView(); return; }; _pickupTimer = (_pickupTimer - _dt); if (_pickupTimer < 0){ _spawnPickup(); _resetPickupTimer(); }; _ghostTimer = (_ghostTimer - _dt); if (_ghostTimer < 0){ _spawnGhost(); _resetGhostTimer(); }; _timer.update(_dt); _boat.update(_dt); _spongebob.updateGroundPosition(_boat); _patrick.updateGroundPosition(_boat); _spongebob.update(_dt); _patrick.update(_dt); _loop = _pickups.length; while (_loop--) { _pickups[_loop].update(_dt); _testPlayerPickupCollision(_pickups[_loop]); if (_pickups[_loop].doDelete){ _pickups[_loop].cleanUp(); _pickups.splice(_loop, 1); }; }; _loop = _ghosts.length; while (_loop--) { _ghosts[_loop].update(_dt); _testPlayerGhostCollision(_ghosts[_loop]); if (_ghosts[_loop].doDelete){ _ghosts[_loop].cleanUp(); _ghosts.splice(_loop, 1); }; }; _loop = _effects.length; while (_loop--) { _effects[_loop].update(_dt); if (_effects[_loop].doDelete){ _effects[_loop].cleanUp(); _effects.splice(_loop, 1); }; }; _loop = _timeBonus.length; while (_loop--) { _timeBonus[_loop].update(_dt); if (_timeBonus[_loop].doDelete){ GameState.instance.applyTimeBonus(_timeBonus[_loop].value); _timer.blink(((_timeBonus[_loop].value > 0)) ? true : false); _timeBonus[_loop].cleanUp(); _timeBonus.splice(_loop, 1); }; }; _cameras.renderCameraView(); if ((((_state.time <= 0)) && ((_timeBonus.length == 0)))){ _onTimeUp(); } else { _state.timeCountdown(_dt); }; } private function _onTimeUp():void{ _timeUp = new TimeUp({}); _timeUp.update(0); _timeUpTimer = _TIME_UP_DURATION; } private function _spawnGhost():void{ _ghosts.push(new Ghost({x:((Math.random() < 0.5)) ? LEFT_SPAWN : RIGHT_SPAWN, y:_getRandomGhostY()})); } private function _onGhostMode(_arg1:Event):void{ if (GameState.instance.ghostTokens <= 0){ return; }; GameState.instance.onUseGhostToken(); _spongebob.setGhostMode(); _patrick.setGhostMode(); GlobalSound.instance.playSound("powerup"); _spawnGhostBurst(_spongebob); _spawnGhostBurst(_patrick); } private function _resetGhostTimer():void{ _ghostTimer = (_ghostTimerDuration + (Math.random() * 1.5)); } public function pause():void{ _isPaused = true; } private function _onChangeActivePlayer():void{ if (_activePlayer.isSpongebob){ _activePlayer = _patrick; GlobalSound.instance.playSound("creak1"); } else { _activePlayer = _spongebob; GlobalSound.instance.playSound("creak2"); }; } public function unpause():void{ _isPaused = false; } } }//package com.nick.spongebob.pirate_bounce.world
Section 38
//GameConfig (com.nick.spongebob.pirate_bounce.GameConfig) package com.nick.spongebob.pirate_bounce { public class GameConfig { public static const EVENT_GAME_OVER:String = "onGameOver"; public static const UI_HEALTH_CHANGE:String = "onHealthChange"; public static const EVENT_TRANSITION_OPENED:String = "onTransOpened"; public static const EVENT_CHANGE_ACTIVE_PLAYER:String = "onChangeActivePlayer"; public static const EVENT_TRANSITION_CLOSED:String = "onTransClosed"; public static const EVENT_LOADER_CLOSED:String = "onLoaderClosed"; public static const EVENT_BOAT_TIP_COMPLETE:String = "onBoatTipComplete"; public static const EVENT_LEVEL_COMPLETE:String = "onLevelComplete"; public static const NAV_RESULTS:String = "goNavResults"; public static const NAV_MENU:String = "goNavMenu"; public static const REQUEST_ANNOUNCEMENT:String = "onRequestAnnouncement"; public static const NAV_SPLASH:String = "onNavSplash"; public static const REQUEST_TRANSITION:String = "onTransTransition"; public static const PARTICLE_PLAYER_GHOST:String = "particlePlayerGhost"; public static const EVENT_PARTICLE:String = "onSpawnParticle"; public static const UI_POWERUPS_CHANGE:String = "onPowerupChange"; public static const REQUEST_PREV_HELP_PAGE:String = "onPrevHelpPage"; public static const NAV_GAME:String = "onNavGame"; public static const UI_GHOST_TOKEN_CHANGE:String = "onGhostTokenChange"; public static const EVENT_BOAT_DOWN:String = "onBoatCollide"; public static const PARTICLE_SPARKLE:String = "particleSparkle"; public static const UI_TIME_CHANGE:String = "onTimeChange"; public static const HIGHSCORE_ALLOWED_ID:String = "isHighscoreBoardAllowed"; public static const BUTTON_MENU:String = "onButtonMenu"; public static const REQUEST_NEXT_HELP_PAGE:String = "onNextHelpPage"; public static const NAV_HIGHSCORE:String = "goNavHighscore"; public static const EVENT_ENGINE_INIT_REQUEST:String = "onEngineInitRequest"; public static const EVENT_GHOST_MODE:String = "onGhostMode"; public static const UI_SCORE_CHANGE:String = "onScoreChange"; public static const NAV_CLOSE_SCREEN:String = "onCloseNavScreen"; public static const EVENT_ENGINE_INIT_COMPLETE:String = "onEngineInitComplete"; public static const PARTICLE_GHOST:String = "particleGhost"; public static const EVENT_HIGHSCORES_LOADED:String = "onHighscoreLoaded"; public static const NAV_HELP:String = "goNavHelp"; private static var _configOptions:Object; private static var _configXML:Object; public static var userdatapath:String; public static var swfpath:String; public static var hsbfile:String; public static var xmlpath:String; private static var _configData:Object; public static var highscorepath:String; public static var savescorepath:String; public static var gamefile:String; public static function setConfigData(_arg1:String, _arg2:Object):void{ if (_configData == null){ _configData = {}; }; _configData[_arg1] = _arg2; } public static function getConfigData(_arg1:String):Object{ if ((((_configData == null)) || (!(_configData.hasOwnProperty(_arg1))))){ return (false); }; return (_configData[_arg1]); } public static function getConfigXML(_arg1:String):Object{ if ((((_configXML == null)) || (!(_configXML.hasOwnProperty(_arg1))))){ return (null); }; return (_configXML[_arg1]); } public static function setConfigXML(_arg1:String, _arg2:XML):void{ if (_configXML == null){ _configXML = {}; }; _configXML[_arg1] = _arg2; } public static function setConfigOption(_arg1:String, _arg2:String):void{ if (_configOptions == null){ _configOptions = {}; }; _configOptions[_arg1] = _arg2; } public static function getConfigOption(_arg1:String):String{ if ((((_configOptions == null)) || ((_configOptions[_arg1] == undefined)))){ return (""); }; return (_configOptions[_arg1]); } } }//package com.nick.spongebob.pirate_bounce
Section 39
//GameState (com.nick.spongebob.pirate_bounce.GameState) package com.nick.spongebob.pirate_bounce { import com.workinman.lib.events.*; import com.workinman.lib.utils.*; public class GameState { private var _level:Number; private var _ghostTokens:Number; private var _damage:Number; private var _score:Number; private var _time:Number; public var isGameOver:Boolean; private static var _instance:GameState; public function GameState():void{ } public function get level():Number{ return (_level); } public function get ghostTokens():Number{ return (_ghostTokens); } public function applyTimeBonus(_arg1:Number):void{ _time = (_time + _arg1); if (_time > 60){ _time = 60; }; WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_TIME_CHANGE, ((_time < 0)) ? 0 : (_time / 60))); } public function get time():Number{ return (_time); } public function init():void{ resetGame(); } public function get score():Number{ return (_score); } public function onTakeDamage():void{ _damage++; WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_HEALTH_CHANGE, _damage)); } public function resetGame():void{ _level = 1; _score = 0; _damage = 0; _ghostTokens = 3; _time = 40; isGameOver = false; WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_HEALTH_CHANGE, _damage)); WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_GHOST_TOKEN_CHANGE, _ghostTokens)); WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_SCORE_CHANGE, _score)); WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_TIME_CHANGE, ((_time < 0)) ? 0 : (_time / 60))); resetLevel(); } public function timeCountdown(_arg1:Number):void{ _time = (_time - _arg1); WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_TIME_CHANGE, ((_time < 0)) ? 0 : (_time / 60))); } public function nextLevel():void{ _level++; resetLevel(); } public function onCollectGhostToken():void{ _ghostTokens++; if (_ghostTokens > 5){ _ghostTokens = 5; return; }; WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_GHOST_TOKEN_CHANGE, _ghostTokens)); } public function get damage():Number{ return (_damage); } public function onUseGhostToken():void{ _ghostTokens--; if (_ghostTokens < 0){ _ghostTokens = 0; }; WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_GHOST_TOKEN_CHANGE, _ghostTokens)); } public function resetLevel():void{ } public function onAddScore(_arg1:Number):void{ _score = (_score + _arg1); WorkinDispatcher.instance.dispatchEvent(new ENumber(GameConfig.UI_SCORE_CHANGE, _score)); } public static function get instance():GameState{ if (_instance == null){ _instance = new (GameState); _instance.init(); }; return (_instance); } } }//package com.nick.spongebob.pirate_bounce
Section 40
//GameTimeline (com.nick.spongebob.pirate_bounce.GameTimeline) package com.nick.spongebob.pirate_bounce { import com.workinman.lib.events.*; import flash.events.*; import com.workinman.paradise2.*; import com.workinman.lib.utils.*; public class GameTimeline extends BaseTimeline { public function GameTimeline():void{ WorkinDispatcher.instance.dispatchEvent(new EDebug("[ Add Timeline Event Listener ]")); if (!stage){ WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_ENGINE_INIT_REQUEST, _onExternalInitRequest); } else { _beginSecure(); }; } private function _beginSecure():void{ try { stage.dispatchEvent(new Event("stageTestEvent")); _begin(); } catch(pError:Error) { addEventListener(Event.ADDED_TO_STAGE, _onDrawn); }; } override protected function _begin():void{ super._begin(); Main.initialize(this); } override protected function _generate():void{ } private function _onDrawn(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, _onDrawn); _begin(); } private function _onExternalInitRequest(_arg1:Event):void{ WorkinDispatcher.instance.removeEventListener(GameConfig.EVENT_ENGINE_INIT_REQUEST, _onExternalInitRequest); _beginSecure(); } } }//package com.nick.spongebob.pirate_bounce
Section 41
//Main (com.nick.spongebob.pirate_bounce.Main) package com.nick.spongebob.pirate_bounce { import com.nick.spongebob.pirate_bounce.ui.*; import com.workinman.lib.events.*; import flash.events.*; import com.workinman.paradise2.*; import com.workinman.paradise2.view.*; import flash.display.*; import com.workinman.lib.math.*; import com.workinman.lib.utils.*; import com.nick.spongebob.pirate_bounce.world.*; import flash.ui.*; import flash.external.*; public class Main extends BaseEngine { private var _state:GameState; private var _world:WorldManager; public var hasActiveWorld:Boolean; private var _ui:ScreenManager; private static var _instance:Main; public function Main(_arg1:GameTimeline):void{ super(_arg1); } public function unpauseGameplay():void{ _resumeCurrentGame(); } public function cleanUp():void{ _sound.cleanUp(); } override protected function _addEventListeners():void{ super._addEventListeners(); WorkinDispatcher.instance.addEventListener(ScreenManager.EVENT_GAMEPLAY_CLOSED, _onGameplayScreenClosed); WorkinDispatcher.instance.addEventListener(ScreenManager.EVENT_GAMEPLAY_OPENED, _onGameplayScreenOpen); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_LEVEL_COMPLETE, _onLevelComplete); WorkinDispatcher.instance.addEventListener(GameConfig.EVENT_GAME_OVER, _onGameOver); } public function hideMouse():void{ Mouse.hide(); } protected function _onGameOver(_arg1:Event):void{ _state.isGameOver = true; _endGame(); _ui.goResults(); } override protected function _beginEngine():void{ WorkinDispatcher.instance.dispatchEvent(new EDebug("[ Data Load Sequence Complete.]")); WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_ENGINE_INIT_COMPLETE)); _ui.showSplash(); } protected function _suspendCurrentGame():void{ if (!hasActiveWorld){ return; }; _world.pause(); } public function get state():GameState{ return (_state); } public function get ui():ScreenManager{ return (_ui); } protected function _cleanUpGame():void{ _world.cleanUp(); _world = null; hasActiveWorld = false; } override protected function _generateView():void{ var _local1:MovieClip = new MovieClip(); _view = new ViewManager(_local1); (_timeline as GameTimeline).game_container.addChild(_local1); _view.addLayer("bg"); _view.addLayer("boat"); _view.addLayer("players"); _view.addLayer("pickups"); _view.addLayer("ghosts"); _view.addLayer("timer"); _view.addLayer("foreground"); _view.addLayer("effects"); } override protected function _generate(_arg1:BaseTimeline):void{ hasActiveWorld = false; ParadiseConfig.DIMENSIONS = new WorkinPoint(400, 500); ParadiseConfig.SCREEN_CENTER = new WorkinPoint((ParadiseConfig.DIMENSIONS.x / 2), (ParadiseConfig.DIMENSIONS.y / 2)); ParadiseConfig.SCREEN_OFFSET = new WorkinPoint(0, 0); super._generate(_arg1); _beginEngine(); } private function _onGameplayScreenClosed(_arg1:Event):void{ } override protected function _generateState():void{ _state = GameState.instance; } public function pauseGameplay():void{ _suspendCurrentGame(); } protected function _resumeCurrentGame():void{ if (!hasActiveWorld){ return; }; _world.unpause(); } protected function _beginNewGame():void{ try { ExternalInterface.call("trackKidsGamePlay", "spongebob-ghostly-gold-grab"); } catch(pErr:Error) { }; if (hasActiveWorld){ _cleanUpGame(); }; _state.resetGame(); _world = new WorldManager(); hasActiveWorld = true; } override protected function _generateControls():void{ _control = new BaseController(_timeline); _control.activateMouseControl(); } public function get mousePoint():WorkinPoint{ return (new WorkinPoint(_timeline.mouseX, _timeline.mouseY, 0)); } public function _endGame():void{ _cleanUpGame(); _view.clear(); } public function showMouse():void{ Mouse.show(); } override protected function _generateUI():void{ ScreenManager.init((_timeline as GameTimeline)); _ui = ScreenManager.instance; } override protected function _generateSounds():void{ super._generateSounds(); SoundLoader.loadSounds(); } private function _onGameplayScreenOpen(_arg1:Event):void{ if (!hasActiveWorld){ _beginNewGame(); } else { _resumeCurrentGame(); }; } protected function _onLevelComplete(_arg1:Event):void{ _state.nextLevel(); _endGame(); _world = new WorldManager(); hasActiveWorld = true; WorkinDispatcher.instance.dispatchEvent(new EData(GameConfig.REQUEST_ANNOUNCEMENT, {text:("Level " + _state.level)})); } public static function get instance():Main{ if (_instance == null){ }; return (_instance); } public static function initialize(_arg1:GameTimeline):void{ if (_instance != null){ return; }; _instance = new Main(_arg1); } } }//package com.nick.spongebob.pirate_bounce
Section 42
//SoundLoader (com.nick.spongebob.pirate_bounce.SoundLoader) package com.nick.spongebob.pirate_bounce { import com.workinman.lib.sound.*; public class SoundLoader { public static function loadSounds():void{ var _local1:SoundManager = GlobalSound.getInstance(); _local1.addSound("coin1", coin1); _local1.addSound("coin2", coin2); _local1.addSound("coin3", coin3); _local1.addSound("coin4", coin4); _local1.addSound("creak1", floorcreak06); _local1.addSound("creak2", floorcreak08); _local1.addSound("ghost", ghost_screecher_01); _local1.addSound("laugh", monster_laugh01); _local1.addSound("buttondown", buttondown); _local1.addSound("buttonover", buttonover); _local1.addSound("powerup", power_up); } } }//package com.nick.spongebob.pirate_bounce
Section 43
//WorkinTweenBase (com.workinman.lib.display.tweener.WorkinTweenBase) package com.workinman.lib.display.tweener { import flash.events.*; import com.workinman.lib.math.*; public class WorkinTweenBase extends EventDispatcher { protected var _dur:Number; protected var _delay:Number; protected var _ease:String; protected var _change:Number; protected var _in:Number; protected var _scope:Object; protected var _out:Number; protected var _delayCounter:Number; protected var _useCurrentIn:Boolean; protected var _isComplete:Boolean; protected var _formula:Function; protected var _time:Number; protected var _current:Number; protected var _isError:Boolean; public static const INVALID_IN_VALUE:Number = -10000.85412; public static var ERROR:String = "onTweenError"; public static var COMPLETE:String = "onTweenComplete"; public function WorkinTweenBase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String, _arg5:Number, _arg6:Object){ _scope = _arg6; _dur = _arg3; _delay = (_delayCounter = _arg5); if (_arg1 == INVALID_IN_VALUE){ _useCurrentIn = true; } else { _useCurrentIn = false; }; _in = _arg1; _out = _arg2; _resetIn(); _current = _in; _ease = _arg4; _formula = PennerManager.getEaseFunction(_ease); _time = 0; _isComplete = false; _isError = false; } public function complete():void{ _onComplete(false); } public function get dur():Number{ return (_dur); } public function get isComplete():Boolean{ return (_isComplete); } public function get isError():Boolean{ return (_isError); } protected function _setInToProp():void{ } public function update(_arg1:Number):void{ if (_delayCounter > 0){ _delayCounter = (_delayCounter - _arg1); if (_delayCounter < 0){ _arg1 = Math.abs(_delayCounter); _resetIn(); } else { return; }; }; _time = (_time + _arg1); if (_time > _dur){ _time = _dur; }; if (_time != 0){ _current = _formula(_in, _change, _time, _dur); }; if (_time == _dur){ complete(); }; } public function get timeRangeTop():Number{ return ((_delay + _dur)); } public function equals(_arg1:String, _arg2:Number, _arg3:Number):Boolean{ return (false); } protected function _resetIn():void{ if (_useCurrentIn){ _setInToProp(); }; _change = (_out - _in); } protected function _onComplete(_arg1:Boolean=true):void{ _isComplete = true; _current = _out; if (_arg1){ dispatchEvent(new Event(COMPLETE)); }; } public function get doDelete():Boolean{ return ((((_delayCounter <= 0)) && (((_isComplete) || (_isError))))); } protected function _onError():void{ _isError = true; dispatchEvent(new Event(ERROR)); } public function get isRunning():Boolean{ return ((((_delayCounter <= 0)) && (!(((_isComplete) || (_isError)))))); } public function render(_arg1:Object){ } public function get current():Number{ return (_current); } public function get timeRangeBottom():Number{ return (_delay); } public function cleanUp():void{ _formula = null; _scope = null; } } }//package com.workinman.lib.display.tweener
Section 44
//WorkinTweener (com.workinman.lib.display.tweener.WorkinTweener) package com.workinman.lib.display.tweener { import com.workinman.lib.events.*; import flash.events.*; import com.workinman.lib.math.*; import com.workinman.lib.utils.*; public class WorkinTweener extends EventDispatcher { public static const TWEEN_GLOW:String = "glow"; public static const TWEEN_SHADOW:String = "shadow"; public static const TWEEN_SCALE:String = "scale"; public static const TWEEN_POS:String = "pos"; public static const TWEEN_IDLE:String = "idle"; public static const TWEEN_ALPHA:String = "fade"; public static const TWEEN_POS_3D:String = "pos3d"; public static const TWEEN_ROTATE:String = "rotate"; public static const TWEEN_FRAME:String = "frame"; public static const TWEEN_BLUR:String = "blur"; public static const ROOM:String = "workinTweenerRoom"; public static const TWEEN_PROP:String = "prop"; public static const TWEEN_COLOR:String = "color"; private static var _loop:Number; private static var _activeScopes:Array; private static var _updateLoop:Number; private static var _isUpdating:Boolean; private static var _isPaused:Boolean; public static function stopAllTweens():void{ if (_activeScopes == null){ return; }; _loop = _activeScopes.length; while (_loop--) { _activeScopes[_loop].stopAllTweens(); }; _clearTweens(); } public static function get isUpdating():Boolean{ return (_isUpdating); } public static function pauseAllTweens():void{ if (_isPaused){ return; }; _stopInterval(); _isPaused = true; } public static function completeScope(_arg1:Object):void{ _loop = _findScope(_arg1); if (_loop >= 0){ _activeScopes[_loop].completeAllTweens(); }; } private static function _findScope(_arg1:Object):Number{ if (_activeScopes == null){ return (-1); }; var _local2:Number = _activeScopes.length; while (_local2--) { if (_activeScopes[_local2].scope == _arg1){ return (_local2); }; }; return (-1); } public static function removeScope(_arg1:Object):void{ _loop = _findScope(_arg1); if (_loop >= 0){ _activeScopes[_loop].cleanUp(); _activeScopes.splice(_loop, 1); }; } public static function completeAllTweens():void{ if (_activeScopes == null){ return; }; _loop = _activeScopes.length; while (_loop--) { _activeScopes[_loop].completeAllTweens(); }; _clearTweens(); } private static function _validateData(_arg1:String, _arg2:Object):Boolean{ if (!_arg2.hasOwnProperty("dur")){ return (false); }; switch (_arg1){ case TWEEN_PROP: if (!_arg2.hasOwnProperty("prop")){ return (false); }; break; case TWEEN_POS: if (!((_arg2.hasOwnProperty("x")) && (_arg2.hasOwnProperty("y")))){ return (false); }; return (true); case TWEEN_POS_3D: if (!((((_arg2.hasOwnProperty("x")) && (_arg2.hasOwnProperty("y")))) && (_arg2.hasOwnProperty("z")))){ return (false); }; return (true); case TWEEN_SCALE: if (!((_arg2.hasOwnProperty("scaleX")) && (_arg2.hasOwnProperty("scaleY")))){ return (false); }; return (true); }; if (!_arg2.hasOwnProperty("end")){ return (false); }; return (true); } private static function _cleanData(_arg1:Object):void{ if (((!(_arg1.hasOwnProperty("start"))) || (isNaN(_arg1.start)))){ _arg1.start = WorkinTweenBase.INVALID_IN_VALUE; }; if (!_arg1.hasOwnProperty("ease")){ _arg1.ease = PennerManager.EASE_LINEAR; }; if (((!(_arg1.hasOwnProperty("delay"))) || (isNaN(_arg1.delay)))){ _arg1.delay = 0; }; } public static function cleanUp():void{ _stopInterval(); _loop = _activeScopes.length; while (_loop--) { _activeScopes[_loop].cleanUp(); _activeScopes[_loop] = null; }; _activeScopes = []; } private static function _stopInterval():void{ if (!_isUpdating){ return; }; _isUpdating = false; Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _updateTweens); } public static function addTween(_arg1:Object, _arg2:String, _arg3:Object):void{ if (_activeScopes == null){ _activeScopes = []; }; if (_validateData(_arg2, _arg3)){ _cleanData(_arg3); } else { return; }; _loop = _activeScopes.length; while (_loop--) { if (_activeScopes[_loop].scope == _arg1){ if (_activeScopes[_loop].testTweenExists(_arg2, _arg3)){ _activeScopes[_loop].replaceTween(_arg2, _arg3); } else { _activeScopes[_loop].addTween(_arg2, _arg3); }; return; }; }; _activeScopes.push(new WorkinTweenScope(_arg1, _arg2, _arg3)); if (!_isUpdating){ _startInterval(); }; } private static function _clearTweens():void{ if (_activeScopes == null){ return; }; _loop = _activeScopes.length; while (_loop--) { _activeScopes[_loop].cleanUp(); _activeScopes[_loop] = null; }; _activeScopes = []; _isPaused = false; _stopInterval(); } private static function _startInterval():void{ if (_isUpdating){ return; }; if (_activeScopes.length == 0){ return; }; _isUpdating = true; Updater.getInstance().addEventListener(Updater.EVENT_UPDATE, _updateTweens); } public static function unpauseScope(_arg1:Object):void{ _loop = _findScope(_arg1); if (_loop >= 0){ _activeScopes[_loop].unpause(); }; } private static function _updateTweens(_arg1:EUpdate):void{ _updateLoop = _activeScopes.length; while (_updateLoop--) { _activeScopes[_updateLoop].updateTweens(_arg1.dt); if (_activeScopes[_updateLoop].doDelete){ _activeScopes[_updateLoop].cleanUp(); _activeScopes.splice(_updateLoop, 1); }; }; if (_activeScopes.length == 0){ _stopInterval(); }; } public static function stopScope(_arg1:Object):void{ _loop = _findScope(_arg1); if (_loop >= 0){ _activeScopes[_loop].stopAllTweens(); }; } public static function unpauseAllTweens():void{ if (!_isPaused){ return; }; _startInterval(); _isPaused = false; } public static function pauseScope(_arg1:Object):void{ _loop = _findScope(_arg1); if (_loop >= 0){ _activeScopes[_loop].pause(); }; } } }//package com.workinman.lib.display.tweener
Section 45
//WorkinTweenFrame (com.workinman.lib.display.tweener.WorkinTweenFrame) package com.workinman.lib.display.tweener { public class WorkinTweenFrame extends WorkinTweenBase { public function WorkinTweenFrame(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String, _arg5:Number, _arg6:Object):void{ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function get prop():String{ return ("frame"); } override public function render(_arg1:Object){ if (_current < 0){ _arg1.gotoAndStop(1); } else { _arg1.gotoAndStop(Math.ceil(_current)); }; } override protected function _setInToProp():void{ _in = _scope.currentFrame; } override public function equals(_arg1:String, _arg2:Number, _arg3:Number):Boolean{ if (_arg1 == WorkinTweener.TWEEN_FRAME){ if (((isComplete) || (isError))){ return (false); }; if (((((_arg2 - timeRangeBottom) < _delay)) || ((Math.abs((timeRangeBottom - _arg2)) < _arg3)))){ return (true); }; }; return (false); } } }//package com.workinman.lib.display.tweener
Section 46
//WorkinTweenProp (com.workinman.lib.display.tweener.WorkinTweenProp) package com.workinman.lib.display.tweener { public class WorkinTweenProp extends WorkinTweenBase { private var _prop:String; public function WorkinTweenProp(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String, _arg5:Number, _arg6:Object, _arg7:String):void{ _prop = _arg7; super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } override protected function _setInToProp():void{ _in = _scope[_prop]; } public function get prop():String{ return (_prop); } override public function render(_arg1:Object){ _arg1[_prop] = _current; } override public function equals(_arg1:String, _arg2:Number, _arg3:Number):Boolean{ if (_prop == _arg1){ if (((isComplete) || (isError))){ return (false); }; if (((((_arg2 - timeRangeBottom) < _delay)) || ((Math.abs((timeRangeBottom - _arg2)) < _arg3)))){ return (true); }; }; return (false); } } }//package com.workinman.lib.display.tweener
Section 47
//WorkinTweenScope (com.workinman.lib.display.tweener.WorkinTweenScope) package com.workinman.lib.display.tweener { public class WorkinTweenScope { private var _loop:Number; private var _tweens:Array; private var _scope:Object; private var _isPaused:Boolean; public function WorkinTweenScope(_arg1:Object, _arg2:String, _arg3:Object){ _tweens = []; _scope = _arg1; _isPaused = false; addTween(_arg2, _arg3); } private function _generateNewTween(_arg1:String, _arg2:Object):void{ var _local3:Array = _getTweenProperties(_arg1, _arg2); _loop = _local3.length; switch (_arg1){ case WorkinTweener.TWEEN_FRAME: _tweens.push(new WorkinTweenFrame(((_arg2.start)!=undefined) ? _arg2.start : WorkinTweenBase.INVALID_IN_VALUE, _arg2.end, _arg2.dur, _arg2.ease, _arg2.delay, _scope)); break; case WorkinTweener.TWEEN_POS: case WorkinTweener.TWEEN_POS_3D: case WorkinTweener.TWEEN_SCALE: while (_loop--) { _tweens.push(new WorkinTweenProp(WorkinTweenBase.INVALID_IN_VALUE, _arg2[_local3[_loop]], _arg2.dur, _arg2.ease, _arg2.delay, _scope, _local3[_loop])); }; break; case WorkinTweener.TWEEN_BLUR: case WorkinTweener.TWEEN_SHADOW: case WorkinTweener.TWEEN_GLOW: default: while (_loop--) { _tweens.push(new WorkinTweenProp(_arg2.start, _arg2.end, _arg2.dur, _arg2.ease, _arg2.delay, _scope, _local3[_loop])); }; break; }; } public function announceComplete():void{ try { _scope.onTweensComplete(); } catch(pErr:Error) { }; } public function unpause():void{ _isPaused = false; } public function pause():void{ _isPaused = true; } private function _getTweenProperties(_arg1:String, _arg2:Object):Array{ switch (_arg1){ case WorkinTweener.TWEEN_PROP: return ([_arg2.prop]); case WorkinTweener.TWEEN_POS: return (["x", "y"]); case WorkinTweener.TWEEN_POS_3D: return (["x", "y", "z"]); case WorkinTweener.TWEEN_SCALE: return (["scaleX", "scaleY"]); case WorkinTweener.TWEEN_ALPHA: return (["alpha"]); case WorkinTweener.TWEEN_ROTATE: return (["rotation"]); case WorkinTweener.TWEEN_COLOR: case WorkinTweener.TWEEN_BLUR: case WorkinTweener.TWEEN_GLOW: case WorkinTweener.TWEEN_SHADOW: case WorkinTweener.TWEEN_FRAME: case WorkinTweener.TWEEN_IDLE: default: return ([]); }; } public function addTween(_arg1:String, _arg2:Object):void{ if (!_validateProperty(_arg1, _arg2)){ return; }; _generateNewTween(_arg1, _arg2); } public function cleanUp():void{ _loop = _tweens.length; while (_loop--) { _tweens[_loop].cleanUp(); }; _tweens = []; _scope = null; } public function completeAllTweens():void{ _loop = _tweens.length; while (_loop--) { _tweens[_loop].finish(); _tweens[_loop].render(_scope); _tweens[_loop].cleanUp(); }; _tweens = []; announceComplete(); } public function get scope():Object{ return (_scope); } public function get doDelete():Boolean{ return ((_tweens.length == 0)); } public function updateTweens(_arg1:Number):void{ if (_isPaused){ return; }; _loop = _tweens.length; while (_loop--) { _tweens[_loop].update(_arg1); _tweens[_loop].render(_scope); if (_tweens[_loop].doDelete){ _tweens[_loop].cleanUp(); _tweens.splice(_loop, 1); }; }; if (_tweens.length == 0){ announceComplete(); }; } private function _validateProperty(_arg1:String, _arg2:Object):Boolean{ var _local3:Array = _getTweenProperties(_arg1, _arg2); _loop = _local3.length; while (_loop--) { if (!_scope.hasOwnProperty(_local3[_loop])){ return (false); }; }; return (true); } public function testTweenExists(_arg1:String, _arg2:Object):Boolean{ var _local4:Number; var _local3:Array = _getTweenProperties(_arg1, _arg2); _loop = _tweens.length; while (_loop--) { _local4 = _local3.length; if (_local4 == 0){ if (_tweens[_loop].equals(_arg1, _arg2.delay, _arg2.dur)){ return (true); }; } else { while (_local4--) { if (_tweens[_loop].equals(_local3[_local4], _arg2.delay, _arg2.dur)){ return (true); }; }; }; }; return (false); } public function replaceTween(_arg1:String, _arg2:Object):void{ if (!_validateProperty(_arg1, _arg2)){ return; }; testTweenExists(_arg1, _arg2); _tweens[_loop].cleanUp(); _tweens.splice(_loop, 1); _generateNewTween(_arg1, _arg2); } public function stopAllTweens():void{ _loop = _tweens.length; while (_loop--) { _tweens[_loop].cleanUp(); }; _tweens = []; announceComplete(); } } }//package com.workinman.lib.display.tweener
Section 48
//WorkinButton (com.workinman.lib.display.WorkinButton) package com.workinman.lib.display { import flash.events.*; import flash.display.*; import flash.geom.*; public class WorkinButton extends WorkinMovieClip { protected var _isDragged:Boolean; protected var _isDown:Boolean; protected var _hasUpAnimation:Boolean; protected var _hitBox:Sprite; protected var _isDrawn:Boolean; protected var _frame:Number; protected var _isEnabled:Boolean; public static var DOWN:String = "workinBtnDown"; public static var UP:String = "workinBtnUp"; public static var OUT:String = "workinBtnOut"; public static var CLICK:String = "workinBtnClick"; public static var DRAG:String = "workinBtnDrag"; public static var CANCEL_DRAG:String = "workinBtnCancelDrag"; public static var OVER:String = "workinBtnOver"; public static var DROP:String = "workinBtnDrop"; public function WorkinButton(){ addEventListener(Event.ADDED_TO_STAGE, _onDrawn, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, _onRemoved, false, 0, true); _isDown = false; _isDragged = false; _isDrawn = ((stage == null)) ? false : true; _hasUpAnimation = ((totalFrames > 3)) ? true : false; _generateHitBox(); enable(); } protected function _onDown():void{ if (!_isDrawn){ return; }; _isDown = true; _renderDown(); stage.addEventListener(MouseEvent.MOUSE_UP, _onUpEvent); _dispatch(DOWN); } public function enable():void{ buttonMode = true; mouseEnabled = true; mouseChildren = false; useHandCursor = true; _isEnabled = true; if (!_isDrawn){ _renderUp(); } else { if (_testMouseOver()){ _renderOver(); } else { _renderUp(); }; }; } override public function cleanUp():void{ super.cleanUp(); disable(); removeEventListener(Event.ADDED_TO_STAGE, _onDrawn); removeEventListener(Event.REMOVED_FROM_STAGE, _onRemoved); if (_hitBox != null){ removeChild(_hitBox); }; _removeEventListeners(); } protected function _renderReturnUp():void{ _frame = ((totalFrames > 3)) ? 4 : 1; gotoAndStop(_frame); } protected function _onOverEvent(_arg1:MouseEvent):void{ _onOver(); } protected function _onOutEvent(_arg1:MouseEvent):void{ _onOut(); } protected function _onDrawn(_arg1:Event):void{ _isDrawn = true; _addEventListeners(); } protected function _onDrop():void{ _isDragged = false; _dispatch(DROP); } protected function _removeEventListeners():void{ removeEventListener(MouseEvent.MOUSE_OVER, _onOverEvent); removeEventListener(MouseEvent.MOUSE_OUT, _onOutEvent); removeEventListener(MouseEvent.MOUSE_DOWN, _onDownEvent); if (_isDown){ stage.removeEventListener(MouseEvent.MOUSE_UP, _onUpEvent); }; } protected function _click():void{ _dispatch(CLICK); } protected function _onRemoved(_arg1:Event):void{ if (_isDown){ stage.removeEventListener(MouseEvent.MOUSE_UP, _onUpEvent); }; _removeEventListeners(); _isDrawn = false; } protected function _testMouseOver():Boolean{ if (!_isDrawn){ return (false); }; if (hitTestPoint(stage.mouseX, stage.mouseY, true)){ return (true); }; return (false); } protected function _renderDisabled():void{ _frame = _DISABLE_FRAME; gotoAndStop(_frame); } protected function _dispatch(_arg1:String):void{ if (!_DO_DISPATCH){ return; }; dispatchEvent(new Event(_arg1)); } protected function _onUp():void{ if (_isDown){ stage.removeEventListener(MouseEvent.MOUSE_UP, _onUpEvent); _isDown = false; if (_testMouseOver()){ _renderOver(); _click(); if (_isDragged){ _onCancelDrag(); }; } else { _renderReturnUp(); if (_isDragged){ _onDrop(); }; }; _dispatch(UP); }; } protected function _renderUp():void{ _frame = 1; gotoAndStop(_frame); } protected function get _DISABLE_FRAME():Number{ return (1); } protected function _addEventListeners():void{ addEventListener(MouseEvent.MOUSE_OVER, _onOverEvent); addEventListener(MouseEvent.MOUSE_OUT, _onOutEvent); addEventListener(MouseEvent.MOUSE_DOWN, _onDownEvent); } protected function _generateHitBox():void{ if (!_CREATE_HIT_BOX){ return; }; _hitBox = new Sprite(); _hitBox.graphics.beginFill(0xFF0000, 0); if ((((_CUSTOM_HIT_BOX.x == 0)) || ((_CUSTOM_HIT_BOX.y == 0)))){ _hitBox.graphics.moveTo(0, 0); _hitBox.graphics.lineTo(width, 0); _hitBox.graphics.lineTo(width, height); _hitBox.graphics.lineTo(0, height); _hitBox.graphics.lineTo(0, 0); } else { _hitBox.graphics.moveTo(0, 0); _hitBox.graphics.lineTo(_CUSTOM_HIT_BOX.x, 0); _hitBox.graphics.lineTo(_CUSTOM_HIT_BOX.x, _CUSTOM_HIT_BOX.y); _hitBox.graphics.lineTo(0, _CUSTOM_HIT_BOX.y); _hitBox.graphics.lineTo(0, 0); }; addChild(_hitBox); } public function disable():void{ buttonMode = false; useHandCursor = false; mouseEnabled = false; _isEnabled = false; _renderDisabled(); } protected function _renderOver():void{ _frame = 2; gotoAndStop(_frame); } protected function _onDrag():void{ _isDragged = true; _dispatch(DRAG); } protected function _onCancelDrag():void{ _isDragged = false; _dispatch(CANCEL_DRAG); } public function get frame():Number{ return (_frame); } protected function get _DO_DISPATCH():Boolean{ return (true); } protected function _onOver():void{ if (_isDown){ _renderDown(); } else { _renderOver(); }; _dispatch(OVER); } protected function get _CUSTOM_HIT_BOX():Point{ return (new Point(0, 0)); } protected function _onUpEvent(_arg1:MouseEvent):void{ _onUp(); } protected function _onDownEvent(_arg1:MouseEvent):void{ _onDown(); } protected function get _CREATE_HIT_BOX():Boolean{ return (true); } protected function _renderDown():void{ _frame = 3; gotoAndStop(_frame); } protected function _onOut():void{ if (_isDown){ _renderDown(); if (!_isDragged){ _onDrag(); }; } else { if (_hasUpAnimation){ _renderReturnUp(); } else { _renderUp(); }; }; _dispatch(OUT); } } }//package com.workinman.lib.display
Section 49
//WorkinDebugger (com.workinman.lib.display.WorkinDebugger) package com.workinman.lib.display { import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import com.workinman.lib.utils.*; import flash.text.*; public class WorkinDebugger extends MovieClip { private var _text:TextField; public static var EVENT_DEBUG:String = "onWorkinDebug"; public function WorkinDebugger(_arg1:uint=0){ WorkinDispatcher.instance.addEventListener(EVENT_DEBUG, _onDebug); addEventListener(Event.ADDED_TO_STAGE, _onDrawn); addEventListener(Event.REMOVED_FROM_STAGE, _onRemove); _text = new TextField(); _text.autoSize = TextFieldAutoSize.LEFT; _text.wordWrap = true; _text.multiline = true; _text.selectable = true; if (_arg1 != 0){ _text.textColor = _arg1; }; _text.x = (_text.y = 20); _text.text = "<[[ Debugger Initialized ]]>"; _text.appendText("\n"); addChild(_text); } private function _onRemove(_arg1:Event):void{ } private function _onDebug(_arg1:EString):void{ print(_arg1.data); } private function _onDrawn(_arg1:Event):void{ _text.width = (stage.width - 10); _text.height = (stage.height - 10); } public function print(_arg1:String):void{ _text.appendText(_arg1); _text.appendText("\n"); } public static function debug(_arg1:String):void{ WorkinDispatcher.instance.dispatchEvent(new EString(EVENT_DEBUG, _arg1)); } } }//package com.workinman.lib.display
Section 50
//WorkinMovieClip (com.workinman.lib.display.WorkinMovieClip) package com.workinman.lib.display { import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import com.workinman.lib.utils.*; import flash.geom.*; import com.workinman.lib.display.tweener.*; public class WorkinMovieClip extends MovieClip { protected var _isTracking:Boolean; protected var _trackOutFrame:Number; protected var _trackDelayTimer:Number; public static var COMPLETE_TRACK:String = "onWMCCompleteTracking"; public static var COMPLETE_TWEEN:String = "onWMCTweensComplete"; public static var STOP_TRACK:String = "onWMCStopTracking"; public function onTweensComplete():void{ dispatchEvent(new Event(COMPLETE_TWEEN)); _onTweenComplete(); } public function completeTweens():void{ WorkinTweener.completeScope(this); } override public function stop():void{ if (_isTracking){ stopTrack(); }; super.stop(); } public function rotateSet(_arg1:Number):void{ rotation = _arg1; } public function moveBy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS, {x:(x + _arg1), y:(y + _arg2), dur:_arg3, ease:_arg4, delay:_arg5}); } public function shadowOut(_arg1:Number=1, _arg2:String="linear", _arg3:Number=0):void{ } public function glowOut(_arg1:Number=1, _arg2:String="linear", _arg3:Number=0, _arg4:uint=0):void{ } public function rotateBy(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_ROTATE, {end:_arg1, dur:_arg2, ease:_arg3, delay:_arg4, by:true}); } protected function _completeTrack():void{ gotoAndStop(_trackOutFrame); dispatchEvent(new Event(COMPLETE_TRACK)); _clearTrack(); } public function clearTweens():void{ WorkinTweener.removeScope(this); } override public function gotoAndStop(_arg1:Object, _arg2:String=null):void{ if (_isTracking){ stopTrack(); }; super.gotoAndStop(_arg1, _arg2); } public function fadeTo(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ alphaTo(_arg1, _arg2, _arg3, _arg4); } public function colorBy(_arg1:uint, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function pauseTween():void{ WorkinTweener.pauseScope(this); } protected function _clearTrack():void{ if (!_isTracking){ return; }; _isTracking = false; _trackDelayTimer = 0; Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _onTrack); } public function blurBy(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function trackPlay(_arg1:Object, _arg2:Number, _arg3:Number=0):void{ if (_isTracking){ stopTrack(); }; _trackDelayTimer = _arg3; if (_trackDelayTimer > 0){ gotoAndStop(_arg1); } else { gotoAndPlay(_arg1); }; _isTracking = true; _trackOutFrame = _arg2; Updater.getInstance().addEventListener(Updater.EVENT_UPDATE, _onTrack, false, 0, true); } public function shadowSet(_arg1:Object, _arg2:Number=0):void{ } public function alphaSet(_arg1:Number):void{ alpha = _arg1; } public function blurInit(_arg1:Number=0):void{ } public function moveTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS, {x:_arg1, y:_arg2, dur:_arg3, ease:_arg4, delay:_arg5}); } public function glowSet(_arg1:Object, _arg2:Number=0):void{ } public function shadowBy(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function frameSet(_arg1:Number):void{ gotoAndStop(_arg1); } public function rotateTo(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_ROTATE, {end:_arg1, dur:_arg2, ease:_arg3, delay:_arg4, by:false}); } public function scaleSet(_arg1:Number, _arg2:Number):void{ scaleX = _arg1; scaleY = _arg2; } public function shadowTo(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function glowInit(_arg1:Number=0):void{ } public function colorTo(_arg1:uint, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function scaleBy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_SCALE, {scaleX:(scaleX + _arg1), scaleY:(scaleY + _arg2), dur:_arg3, ease:_arg4, delay:_arg5}); } public function blurTo(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function cleanUp():void{ _clearTrack(); } public function propTo(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_PROP, {prop:_arg1, end:_arg2, dur:_arg3, ease:_arg4, delay:_arg5}); } public function fadeSet(_arg1:Number):void{ alphaSet(_arg1); } override public function gotoAndPlay(_arg1:Object, _arg2:String=null):void{ if (_isTracking){ stopTrack(); }; super.gotoAndPlay(_arg1, _arg2); } protected function _onTweenComplete():void{ } public function addTween(_arg1:String, _arg2:Object):void{ WorkinTweener.addTween(this, _arg1, _arg2); } public function posBy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS, {x:(x + _arg1), y:(y + _arg2), dur:_arg3, ease:_arg4, delay:_arg5}); } public function clear():void{ } public function propTween(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String="linear", _arg6:Number=0, _arg7:MovieClip=null):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_PROP, {prop:_arg1, start:_arg2, end:_arg3, dur:_arg4, ease:_arg5, delay:_arg6}); } public function shadowInit(_arg1:Number=0):void{ } public function blurRemove(_arg1:Number=0):void{ } public function glowBy(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function alphaBy(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_ALPHA, {end:(alpha + _arg1), dur:_arg2, ease:_arg3, delay:_arg4}); } public function frameTo(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_FRAME, {end:_arg1, dur:_arg2, ease:_arg3, delay:_arg4}); } public function scaleTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_SCALE, {scaleX:_arg1, scaleY:_arg2, dur:_arg3, ease:_arg4, delay:_arg5}); } public function shadowRemove(_arg1:Number=0):void{ } public function blurOut(_arg1:Number=1, _arg2:String="linear", _arg3:Number=0):void{ } public function glowTo(_arg1:Object, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ } public function stopTrack():void{ _clearTrack(); dispatchEvent(new Event(STOP_TRACK)); } protected function _onTrack(_arg1:EUpdate):void{ if (_trackDelayTimer > 0){ _trackDelayTimer = (_trackDelayTimer - _arg1.dt); if (_trackDelayTimer <= 0){ play(); }; }; if (currentFrame >= _trackOutFrame){ _completeTrack(); }; } public function unpauseTween():void{ WorkinTweener.unpauseScope(this); } public function posTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS, {x:_arg1, y:_arg2, dur:_arg3, ease:_arg4, delay:_arg5}); } public function glowRemove(_arg1:Number=0):void{ } public function fadeBy(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ alphaBy(_arg1, _arg2, _arg3, _arg4); } public function alphaTo(_arg1:Number, _arg2:Number, _arg3:String="linear", _arg4:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_ALPHA, {end:_arg1, dur:_arg2, ease:_arg3, delay:_arg4}); } public function blurSet(_arg1:Object, _arg2:Number=0):void{ } public function posSet(_arg1:Number, _arg2:Number):void{ x = _arg1; y = _arg2; } public function frameTween(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String="linear", _arg5:Number=0, _arg6:MovieClip=null):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_FRAME, {start:_arg1, end:_arg2, dur:_arg3, ease:_arg4, delay:_arg5}); } public function colorSet(_arg1:uint):void{ var _local2:ColorTransform = transform.colorTransform; _local2.color = _arg1; transform.colorTransform = _local2; } } }//package com.workinman.lib.display
Section 51
//EData (com.workinman.lib.events.EData) package com.workinman.lib.events { import flash.events.*; public class EData extends Event { private var _data:Object; public function EData(_arg1:String, _arg2:Object){ super(_arg1, false, false); _data = _arg2; } public function get data():Object{ return (_data); } } }//package com.workinman.lib.events
Section 52
//EDebug (com.workinman.lib.events.EDebug) package com.workinman.lib.events { import com.workinman.lib.display.*; public class EDebug extends EString { public function EDebug(_arg1:String){ super(WorkinDebugger.EVENT_DEBUG, _arg1); } } }//package com.workinman.lib.events
Section 53
//ENumber (com.workinman.lib.events.ENumber) package com.workinman.lib.events { import flash.events.*; public class ENumber extends Event { private var _data:Number; public function ENumber(_arg1:String, _arg2:Number){ super(_arg1, false, false); _data = _arg2; } public function get data():Number{ return (_data); } } }//package com.workinman.lib.events
Section 54
//EProgress (com.workinman.lib.events.EProgress) package com.workinman.lib.events { import flash.events.*; public class EProgress extends Event { private var _url:String; private var _bytesLoaded:Number; private var _bytesTotal:Number; public function EProgress(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=""){ super(_arg1, false, false); _bytesLoaded = _arg2; _bytesTotal = _arg3; _url = _arg4; } public function get url():String{ return (_url); } public function get bytesTotal():Number{ return (_bytesTotal); } public function get ratio():Number{ return ((_bytesLoaded / _bytesTotal)); } public function get bytesLoaded():Number{ return (_bytesLoaded); } } }//package com.workinman.lib.events
Section 55
//EString (com.workinman.lib.events.EString) package com.workinman.lib.events { import flash.events.*; public class EString extends Event { private var _data:String; public function EString(_arg1:String, _arg2:String){ super(_arg1, false, false); _data = _arg2; } public function get data():String{ return (_data); } } }//package com.workinman.lib.events
Section 56
//ESWF (com.workinman.lib.events.ESWF) package com.workinman.lib.events { import flash.events.*; import flash.display.*; import com.workinman.lib.net.*; public class ESWF extends Event { private var _swf:DisplayObject; private var _success:Boolean; private var _url:String; public function ESWF(_arg1:Boolean, _arg2:DisplayObject=null, _arg3:String=""){ super(SWFLoader.ON_SWF, false, false); _success = _arg1; _swf = _arg2; _url = _arg3; } public function get swf():DisplayObject{ return (_swf); } public function get success():Boolean{ return (_success); } public function get url():String{ return (_url); } } }//package com.workinman.lib.events
Section 57
//EUpdate (com.workinman.lib.events.EUpdate) package com.workinman.lib.events { import flash.events.*; public class EUpdate extends Event { private var _dt:Number; public function EUpdate(_arg1:String, _arg2:Number){ super(_arg1, false, false); _dt = _arg2; } public function get dt():Number{ return (_dt); } } }//package com.workinman.lib.events
Section 58
//InterceptResult (com.workinman.lib.math.InterceptResult) package com.workinman.lib.math { public class InterceptResult { private var _success:Boolean; private var _line1:WorkinLine; private var _result:WorkinPoint; private var _line2:WorkinLine; public function InterceptResult(_arg1:Boolean, _arg2:WorkinPoint=null){ _success = _arg1; _result = _arg2; } public function get success():Boolean{ return (_success); } public function get line1():WorkinLine{ return (_line1); } public function get line2():WorkinLine{ return (_line2); } public function set line2(_arg1:WorkinLine):void{ _line2 = _arg1; } public function set line1(_arg1:WorkinLine):void{ _line1 = _arg1; } public function toString():String{ return (("[Intercept Result] " + (_success) ? ("Collided! -> " + _result) : "Failed.")); } public function get result():WorkinPoint{ return (_result); } } }//package com.workinman.lib.math
Section 59
//PennerEasing (com.workinman.lib.math.PennerEasing) package com.workinman.lib.math { public class PennerEasing { public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456):Number{ if (_arg5 == -0.123456){ _arg5 = 1.70158; }; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2)); } public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1)==0) ? _arg2 : ((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2)); } public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); --_arg1; return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456):Number{ if (_arg5 == -0.123456){ _arg5 = 1.70158; }; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2)); } public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ --_arg1; return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); }; --_arg1; return ((((_arg3 / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ --_arg1; return ((((_arg3 / 2) * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2)); }; --_arg1; return ((((_arg3 / 2) * (2 - Math.sqrt((1 - (_arg1 * _arg1))))) + _arg2)); } public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456):Number{ if (_arg5 == -0.123456){ _arg5 = 1.70158; }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ --_arg1; _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2)); }; --_arg1; _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + 1)) + _arg2)); } public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456, _arg6:Number=-0.123456):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; if (_arg6 == -0.123456){ _arg6 = (_arg4 * (0.3 * 1.5)); }; if ((((_arg5 == -0.123456)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; if (_arg1 < 1){ return ((((0.5 * ((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + (_arg3 / 2)) + _arg2)); }; return ((((_arg3 / 2) + (0.5 * ((_arg5 * Math.pow(2, (10 * (_arg1 - 2)))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))))) + _arg2)); } public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1)==_arg4) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); --_arg1; return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 1)) + _arg2)); }; return ((((_arg3 / 2) * (Math.pow(2, (10 * (_arg1 - 2))) + 1)) + _arg2)); } public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2)); } public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); } public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function linear(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456):Number{ if (_arg5 == -0.123456){ _arg5 = 1.70158; }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2)); }; _arg1 = (_arg1 - 2); _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2)); } public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2)); }; --_arg1; return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456, _arg6:Number=-0.123456):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (_arg6 == -0.123456){ _arg6 = (_arg4 * 0.3); }; if ((((_arg5 == -0.123456)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; --_arg1; return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); } public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((_arg3 / 2) * Math.sin(((Math.PI * _arg1) / 2))) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / 2)) - 2)) + _arg2)); } public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeOutBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeInBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456, _arg6:Number=-0.123456):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (_arg6 == -0.123456){ _arg6 = (_arg4 * 0.3); }; if ((((_arg5 == -0.123456)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2)); } public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2)); } public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); } public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=-0.123456, _arg6:Number=-0.123456):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; if (_arg6 == -0.123456){ _arg6 = (_arg4 * (0.3 * 1.5)); }; if ((((_arg5 == -0.123456)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); }; --_arg1; return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2)); } public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } } }//package com.workinman.lib.math
Section 60
//PennerManager (com.workinman.lib.math.PennerManager) package com.workinman.lib.math { public class PennerManager { public static var EASE_IN:String = "easeIn"; public static var EASE_WAVE_OUT:String = "waveOut"; public static var LINEAR:String = "linear"; public static var EASE_BOUNCE_IN:String = "bounceIn"; public static var EASE_CIRCLE_OUT:String = "circleOut"; public static var EASE_BLAST_IN:String = "blastIn"; public static var EASE_BLAST_OUT:String = "blastOut"; public static var EASE_EXPO_IN:String = "expoIn"; public static var EASE_SPACE_OUT:String = "spaceOut"; public static var EASE_BLAST:String = "blast"; public static var EASE_SPACE_IN:String = "spaceIn"; public static var EASE_CIRCLE:String = "circle"; public static var EASE_SPACE:String = "space"; public static var EASE_OUT:String = "easeOut"; public static var EASE_ELASTIC:String = "elastic"; public static var EASE_QUAD_OUT:String = "quadOut"; public static var EASE_BUMP_IN:String = "bumpIn"; public static var EASE_CUBIC_OUT:String = "cubicOut"; public static var EASE_CUBIC_IN:String = "cubicIn"; public static var EASE_EXPO_OUT:String = "expoOut"; public static var EASE_LINEAR:String = "linear"; public static var EASE_CUBIC:String = "cubic"; public static var EASE_EXPO:String = "expo"; public static var EASE_WAVE:String = "wave"; public static var EASE_QUAD_IN:String = "quadIn"; public static var EASE_ELASTIC_OUT:String = "elasticOut"; public static var EASE_BUMP_OUT:String = "bumpOut"; public static var EASE_WAVE_IN:String = "waveIn"; public static var EASE_ELASTIC_IN:String = "elasticIn"; public static var EASE_CIRCLE_IN:String = "circleIn"; public static var EASE_BUMP:String = "bump"; public static var EASE_BOUNCE_OUT:String = "bounceOut"; public static var EASE:String = "ease"; public static var EASE_QUAD:String = "quad"; public static var EASE_BOUNCE:String = "bounce"; protected static function _tweenCubicIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInCubic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenEaseBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutQuad(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenExpoBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutExpo(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBumpOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutBack(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBlastIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInQuint(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenCubicOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutCubic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenEaseIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInQuad(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenExpoIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInExpo(_arg3, _arg1, _arg2, _arg4)); } public static function getGTweenEase(_arg1:String):Function{ switch (_arg1){ case EASE_IN: case EASE_QUAD_IN: return (PennerEasing.easeInQuad); case EASE_OUT: case EASE_QUAD_OUT: return (PennerEasing.easeOutQuad); case EASE: case EASE_QUAD: return (PennerEasing.easeInOutQuad); case EASE_EXPO: return (PennerEasing.easeInOutExpo); case EASE_EXPO_IN: return (PennerEasing.easeInExpo); case EASE_EXPO_OUT: return (PennerEasing.easeOutExpo); case EASE_ELASTIC: return (PennerEasing.easeInOutElastic); case EASE_ELASTIC_IN: return (PennerEasing.easeInElastic); case EASE_ELASTIC_OUT: return (PennerEasing.easeOutElastic); case EASE_BUMP: return (PennerEasing.easeInOutBack); case EASE_BUMP_IN: return (PennerEasing.easeInBack); case EASE_BUMP_OUT: return (PennerEasing.easeOutBack); case EASE_BOUNCE: return (PennerEasing.easeInOutBounce); case EASE_BOUNCE_IN: return (PennerEasing.easeInBounce); case EASE_BOUNCE_OUT: return (PennerEasing.easeOutBounce); case EASE_CUBIC: return (PennerEasing.easeInOutCubic); case EASE_CUBIC_IN: return (PennerEasing.easeInCubic); case EASE_CUBIC_OUT: return (PennerEasing.easeOutCubic); case EASE_SPACE: return (PennerEasing.easeInOutQuart); case EASE_SPACE_IN: return (PennerEasing.easeInQuart); case EASE_SPACE_OUT: return (PennerEasing.easeOutQuart); case EASE_BLAST: return (PennerEasing.easeInOutQuint); case EASE_BLAST_IN: return (PennerEasing.easeInQuint); case EASE_BLAST_OUT: return (PennerEasing.easeOutQuint); case EASE_WAVE: return (PennerEasing.easeInOutSine); case EASE_WAVE_IN: return (PennerEasing.easeInSine); case EASE_WAVE_OUT: return (PennerEasing.easeOutSine); case EASE_CIRCLE: return (PennerEasing.easeInOutCirc); case EASE_CIRCLE_IN: return (PennerEasing.easeInCirc); case EASE_CIRCLE_OUT: return (PennerEasing.easeOutCirc); case EASE_LINEAR: default: return (PennerEasing.linear); }; } protected static function _tweenCircleOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutCirc(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBounceIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInBounce(_arg3, _arg1, _arg2, _arg4)); } public static function getEaseFunction(_arg1:String):Function{ switch (_arg1){ case EASE_IN: case EASE_QUAD_IN: return (_tweenEaseIn); case EASE_OUT: case EASE_QUAD_OUT: return (_tweenEaseOut); case EASE: case EASE_QUAD: return (_tweenEaseBoth); case EASE_EXPO: return (_tweenExpoBoth); case EASE_EXPO_IN: return (_tweenExpoIn); case EASE_EXPO_OUT: return (_tweenExpoOut); case EASE_ELASTIC: return (_tweenElasticBoth); case EASE_ELASTIC_IN: return (_tweenElasticIn); case EASE_ELASTIC_OUT: return (_tweenElasticOut); case EASE_BUMP: return (_tweenBumpBoth); case EASE_BUMP_IN: return (_tweenBumpIn); case EASE_BUMP_OUT: return (_tweenBumpBoth); case EASE_BOUNCE: return (_tweenBounceBoth); case EASE_BOUNCE_IN: return (_tweenBounceIn); case EASE_BOUNCE_OUT: return (_tweenBounceOut); case EASE_CUBIC: return (_tweenCubicBoth); case EASE_CUBIC_IN: return (_tweenCubicIn); case EASE_CUBIC_OUT: return (_tweenCubicOut); case EASE_SPACE: return (_tweenSpaceBoth); case EASE_SPACE_IN: return (_tweenSpaceIn); case EASE_SPACE_OUT: return (_tweenSpaceOut); case EASE_BLAST: return (_tweenBlastBoth); case EASE_BLAST_IN: return (_tweenBlastIn); case EASE_BLAST_OUT: return (_tweenBlastOut); case EASE_WAVE: return (_tweenWaveBoth); case EASE_WAVE_IN: return (_tweenWaveIn); case EASE_WAVE_OUT: return (_tweenWaveOut); case EASE_CIRCLE: return (_tweenCircleBoth); case EASE_CIRCLE_IN: return (_tweenCircleIn); case EASE_CIRCLE_OUT: return (_tweenCircleOut); case EASE_LINEAR: default: return (_tweenLinear); }; } protected static function _tweenBumpBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutBack(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenEaseOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutQuad(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBumpIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInBack(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenWaveIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInSine(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBlastBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutQuint(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenWaveOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutSine(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBounceOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutBounce(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenSpaceBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutQuart(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenCircleIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInCirc(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenWaveBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutSine(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBounceBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutBounce(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenLinear(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((_arg1 + ((_arg3 / _arg4) * _arg2))); } protected static function _tweenSpaceIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInQuart(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenBlastOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutQuint(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenElasticOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutElastic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenElasticIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInElastic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenCubicBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutCubic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenElasticBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutElastic(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenSpaceOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutQuart(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenExpoOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeOutExpo(_arg3, _arg1, _arg2, _arg4)); } protected static function _tweenCircleBoth(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (PennerEasing.easeInOutCirc(_arg3, _arg1, _arg2, _arg4)); } } }//package com.workinman.lib.math
Section 61
//WorkinBezier (com.workinman.lib.math.WorkinBezier) package com.workinman.lib.math { public class WorkinBezier { private var _loop:Number; protected var _length:Number; protected var _c0:WorkinPoint; protected var _c1:WorkinPoint; private var _cVal:Object; protected var _p0:WorkinPoint; protected var _p1:WorkinPoint; private var _aVal:Object; private var _bVal:Object; protected var _segments:Number; public function WorkinBezier(_arg1:WorkinPoint, _arg2:WorkinPoint, _arg3:WorkinPoint, _arg4:WorkinPoint, _arg5:Number=4){ _p0 = _arg1.copy(); _p1 = _arg2.copy(); _c0 = _arg3.copy(); _c1 = _arg4.copy(); _segments = _arg5; if (_segments < 2){ _segments = 2; }; _calcProperties(); } public function get p1():WorkinPoint{ return (_p1); } public function copy():WorkinBezier{ return (new WorkinBezier(_p0, _p1, _c0, _c1, _segments)); } public function get p0():WorkinPoint{ return (_p0); } public function originTo(_arg1:Number, _arg2:Number, _arg3:Number):void{ _p0.to(_arg1, _arg2, _arg3); _p0.clean(); _calcProperties(); } public function set p1(_arg1:WorkinPoint):void{ _p1 = _arg1; } public function testPointIntercept(_arg1:WorkinPoint, _arg2:Number=3):Boolean{ var _local3:Array = getAsLines(_arg2); _loop = _local3.length; while (_loop--) { if (_local3[_loop].testPointSegmentIntercept(_arg1)){ return (true); }; }; return (false); } private function _calcProperties():void{ _length = (Math.round((Math.sqrt((((_p0.x - _p1.x) * (_p0.x - _p1.x)) + ((_p0.y - _p1.y) * (_p0.y - _p1.y)))) * 1000)) / 1000); _cVal = {x:(3 * (c0.x - p0.x)), y:(3 * (c0.y - p0.y))}; _bVal = {x:((3 * (c1.x - c0.x)) - _cVal.x), y:((3 * (c1.y - c0.y)) - _cVal.y)}; _aVal = {x:(((p1.x - p0.x) - _bVal.x) - _cVal.x), y:(((p1.y - p0.y) - _bVal.y) - _cVal.y)}; } public function set p0(_arg1:WorkinPoint):void{ _p0 = _arg1; } public function clean():void{ _p0.clean(); _p1.clean(); _c0.clean(); _c1.clean(); _calcProperties(); } public function endToPoint(_arg1:WorkinPoint):void{ _p1.toPoint(_arg1); _calcProperties(); } public function set length(_arg1:Number):void{ _length = _arg1; } public function testLineIntercept(_arg1:WorkinLine, _arg2:Number=3):InterceptResult{ var _local4:InterceptResult; var _local3:Array = getAsLines(_arg2); _loop = _local3.length; while (_loop--) { _local4 = _arg1.testLineIntercept(_local3[_loop]); if (_local4.success){ return (_local4); }; }; return (new InterceptResult(false)); } public function get center():WorkinPoint{ return (getPoint(0.5)); } public function getAsLines(_arg1:Number=3):Array{ var _local2:WorkinPoint = p0; var _local3:* = []; var _local4:* = 0; _loop = 1; while (_loop <= _arg1) { _local4 = (_loop / _arg1); var _temp1 = _local2; _local2 = getPoint(_local4); _local3.push(new WorkinLine(_temp1, _local2)); _loop++; }; return (_local3); } public function set c1(_arg1:WorkinPoint):void{ _c1 = _arg1; } public function originToPoint(_arg1:WorkinPoint):void{ _p0.toPoint(_arg1); _calcProperties(); } public function set c0(_arg1:WorkinPoint):void{ _c0 = _arg1; } public function testLineSegmentIntercept(_arg1:WorkinLine, _arg2:Number=3):InterceptResult{ var _local4:InterceptResult; var _local3:Array = getAsLines(_arg2); _loop = _local3.length; while (_loop--) { _local4 = _arg1.testLineSegmentIntercept(_local3[_loop]); if (_local4.success){ return (_local4); }; }; return (new InterceptResult(false)); } public function getPoint(_arg1:Number):WorkinPoint{ return (new WorkinPoint(((((_aVal.x * ((_arg1 * _arg1) * _arg1)) + (_bVal.x * (_arg1 * _arg1))) + (_cVal.x * _arg1)) + p0.x), ((((_aVal.y * ((_arg1 * _arg1) * _arg1)) + (_bVal.y * (_arg1 * _arg1))) + (_cVal.y * _arg1)) + p0.y))); } public function toString():String{ return (((((((((((((("[WorkinBezier] " + "(") + _p0.x) + ", ") + _p0.y) + ", ") + _p0.z) + ") ~> (") + _p1.x) + ", ") + _p1.y) + ", ") + _p1.z) + ")")); } public function get c0():WorkinPoint{ return (_c0); } public function get c1():WorkinPoint{ return (_c1); } public function testBezierIntercept(_arg1:WorkinBezier, _arg2:Number=3):InterceptResult{ var _local5:InterceptResult; var _local6:Number; var _local3:Array = getAsLines(_arg2); var _local4:Array = _arg1.getAsLines(_arg2); _loop = _local3.length; while (_loop--) { _local6 = _local4.length; while (_local6--) { _local5 = _local3[_loop].testLineSegmentInterceipt(_local4[_local6]); if (_local5.success){ return (_local5); }; }; }; return (new InterceptResult(false)); } public function get length():Number{ return (_length); } public function endTo(_arg1:Number, _arg2:Number, _arg3:Number):void{ _p1.to(_arg1, _arg2, _arg3); _p1.clean(); _calcProperties(); } public function getDerivative(_arg1:Number):WorkinPoint{ return (new WorkinPoint((((((3 * _aVal.x) * _arg1) * _arg1) + ((2 * _bVal.x) * _arg1)) + _cVal.x), (((((3 * _aVal.y) * _arg1) * _arg1) + ((2 * _bVal.y) * _arg1)) + _cVal.y))); } } }//package com.workinman.lib.math
Section 62
//WorkinLine (com.workinman.lib.math.WorkinLine) package com.workinman.lib.math { public class WorkinLine { protected var _length:Number; protected var _normal:WorkinPoint; protected var _slope:Number; private var _xSegmentResult:Number; private var _parametricDenom:WorkinPoint; private var _inverseDeterminate:Number; private var _ySegmentResult:Number; protected var _p0:WorkinPoint; protected var _p1:WorkinPoint; protected var _vector:WorkinPoint; protected var _yIntercept:Number; public function WorkinLine(_arg1:WorkinPoint, _arg2:WorkinPoint){ _p0 = _arg1.copy(); _p1 = _arg2.copy(); _calcProperties(); } private function _calcProperties():void{ _length = (Math.round((Math.sqrt((((_p0.x - _p1.x) * (_p0.x - _p1.x)) + ((_p0.y - _p1.y) * (_p0.y - _p1.y)))) * 1000)) / 1000); _vector = new WorkinPoint((p1.x - p0.x), (p1.y - p0.y)); _slope = (_vector.y / _vector.x); if (vector.x == 0){ _slope = 100000; }; _yIntercept = (p0.y - (_slope * p0.x)); _parametricDenom = new WorkinPoint((p1.x - p0.x), (p1.y - p0.y)); _normal = _vector.pseudoCross(); _normal.normalize(); } public function testPointSegmentIntercept(_arg1:WorkinPoint, _arg2:Boolean=false):Boolean{ if (_parametricDenom.x == 0){ _xSegmentResult = 0; } else { _xSegmentResult = ((_arg1.x - p0.x) / _parametricDenom.x); }; if (_parametricDenom.y == 0){ _ySegmentResult = 0; } else { _ySegmentResult = ((_arg1.y - p0.y) / _parametricDenom.y); }; if (_arg2){ }; if ((((((((_xSegmentResult >= 0)) && ((_xSegmentResult <= 1)))) && ((_ySegmentResult >= 0)))) && ((_ySegmentResult <= 1)))){ return (true); }; return (false); } public function toLine(_arg1:WorkinLine):void{ _p0.toPoint(_arg1.p0); _p1.toPoint(_arg1.p1); _calcProperties(); } public function recalculate():void{ _calcProperties(); } public function testLineSegmentIntercept(_arg1:WorkinLine, _arg2:Boolean=false):InterceptResult{ var _local3:Number = ((-(_arg1.vector.x) * _vector.y) + (_vector.x * _arg1.vector.y)); var _local4:Number = (p0.x - _arg1.p0.x); var _local5:Number = (p0.y - _arg1.p0.y); var _local6:Number = (((-(_vector.y) * _local4) + (_vector.x * _local5)) / _local3); var _local7:Number = (((_arg1.vector.x * _local5) - (_arg1.vector.y * _local4)) / _local3); if ((((((((_local6 >= 0)) && ((_local6 <= 1)))) && ((_local7 >= 0)))) && ((_local7 <= 1)))){ return (new InterceptResult(true, new WorkinPoint((p0.x + (_local7 * _vector.x)), (p0.y + (_local7 * _vector.y))))); }; return (new InterceptResult(false)); } public function get centerX():Number{ return ((_p0.x + (_vector.x / 2))); } public function get centerY():Number{ return ((_p0.y + (_vector.y / 2))); } public function get slope():Number{ return (_slope); } public function endTo(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _p1.to(_arg1, _arg2, _arg3); _p1.clean(); _calcProperties(); } public function get p1():WorkinPoint{ return (_p1); } public function get vector():WorkinPoint{ return (_vector); } public function get p0():WorkinPoint{ return (_p0); } public function shiftOrigin(_arg1:Number):void{ var _local2:WorkinPoint = _vector.reverseCopy(); _local2.length = _arg1; _p0.addPoint(_local2); _calcProperties(); } public function get yIntercept():Number{ return (_yIntercept); } public function testLineDot(_arg1:WorkinLine):Number{ return (_vector.dot(_arg1.normal)); } public function testLineIntercept(_arg1:WorkinLine):InterceptResult{ _inverseDeterminate = (1 / ((_slope * -1) - (_arg1.slope * -1))); var _local2:WorkinPoint = new WorkinPoint((((-1 * _arg1.yIntercept) - (-1 * _yIntercept)) * _inverseDeterminate), (((_arg1.slope * _yIntercept) - (slope * _arg1.yIntercept)) * _inverseDeterminate), 0); return (new InterceptResult(true, _local2)); } public function set length(_arg1:Number):void{ if (length == 0){ return; }; _p1 = new WorkinPoint((_p0.x + (_vector.x * (_arg1 / length))), (_p0.y + (_vector.y * (_arg1 / length)))); _calcProperties(); } public function toNumbers(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{ _p0.to(_arg1, _arg2); _p0.clean(); _p1.to(_arg3, _arg4); _p1.clean(); _calcProperties(); } public function get center():WorkinPoint{ return (new WorkinPoint((_p0.x + (_vector.x / 2)), (_p0.y + (_vector.y / 2)))); } public function originTo(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _p0.to(_arg1, _arg2, _arg3); _p0.clean(); _calcProperties(); } public function getPoint(_arg1:Number):WorkinPoint{ return (new WorkinPoint((p0.x + (_vector.x * _arg1)), (p0.y + (_vector.y * _arg1)))); } public function rotate(_arg1:Number):void{ _vector.rotate(_arg1); _p1.toPoint(_p0.addPointCopy(_vector)); _calcProperties(); } public function originToPoint(_arg1:WorkinPoint):void{ _p0.toPoint(_arg1); _calcProperties(); } public function clean():void{ _p0.clean(); _p1.clean(); _calcProperties(); } public function get length():Number{ return (_length); } public function get normal():WorkinPoint{ return (_normal); } public function toString():String{ return (((((((((((((("[WorkinLine] " + "(") + _p0.x) + ", ") + _p0.y) + ", ") + _p0.z) + ") ~> (") + _p1.x) + ", ") + _p1.y) + ", ") + _p1.z) + ")")); } public function flip():void{ var _local1:WorkinPoint = _p0.copy(); _p0.toPoint(_p1); _p1.toPoint(_local1); _calcProperties(); } public function copy():WorkinLine{ return (new WorkinLine(_p0, _p1)); } public function projectOntoLine(_arg1:WorkinLine):WorkinLine{ var _local2:Number = _arg1.vector.dot(vector.normalizeCopy()); return (new WorkinLine(_arg1.p0, _arg1.p1.addPointCopy(_normal.copyAndResize(Math.sqrt(((_arg1.length * _arg1.length) - (_local2 * _local2))))))); } public function shiftEnd(_arg1:Number):void{ length = (length + _arg1); } public function endToPoint(_arg1:WorkinPoint):void{ _p1.toPoint(_arg1); _calcProperties(); } public function to(_arg1:WorkinPoint, _arg2:WorkinPoint):void{ _p0.toPoint(_arg1); _p0.clean(); _p1.toPoint(_arg2); _p1.clean(); _calcProperties(); } } }//package com.workinman.lib.math
Section 63
//WorkinPoint (com.workinman.lib.math.WorkinPoint) package com.workinman.lib.math { import com.workinman.lib.display.tweener.*; public class WorkinPoint { private var _length:Number; private var _x:Number; private var _y:Number; private var _z:Number; public function WorkinPoint(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ _x = (Math.round((_arg1 * 1000)) / 1000); _y = (Math.round((_arg2 * 1000)) / 1000); _z = (Math.round((_arg3 * 1000)) / 1000); _calculateLength(); } public function onTweensComplete():void{ } public function set y(_arg1:Number):void{ _y = _arg1; } public function to(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _x = _arg1; _y = _arg2; _z = _arg3; _calculateLength(); } public function addPointCopy(_arg1:WorkinPoint):WorkinPoint{ return (new WorkinPoint((_x + _arg1.x), (_y + _arg1.y), (_z + _arg1.z))); } public function moveBy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String="linear", _arg6:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS_3D, {x:(x + _arg1), y:(y + _arg2), z:(z + _arg3), dur:_arg4, ease:_arg5, delay:_arg6, by:false}); } public function get z():Number{ return (_z); } public function diff(_arg1:WorkinPoint):WorkinPoint{ return (new WorkinPoint((_arg1.x - _x), (_arg1.y - _y), (_arg1.z - _z))); } public function normalize():void{ if (_length == 0){ return; }; _x = (_x / _length); _y = (_y / _length); _z = (_z / _length); _calculateLength(); } public function divideCopy(_arg1:Number):WorkinPoint{ return (new WorkinPoint((_x / _arg1), (_y / _arg1), (_z / _arg1))); } public function divide(_arg1:Number):void{ _x = (_x / _arg1); _y = (_y / _arg1); _z = (_z / _arg1); clean(); _calculateLength(); } public function subtract(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _x = (_x - _arg1); _y = (_y - _arg2); _z = (_z - _arg3); clean(); _calculateLength(); } public function normalizeTo(_arg1:Number):void{ length = _arg1; } public function get y():Number{ return (_y); } public function add(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _x = (_x + _arg1); _y = (_y + _arg2); _z = (_z + _arg3); clean(); _calculateLength(); } public function normalizeCopy():WorkinPoint{ if (_length == 0){ return (new WorkinPoint(0, 0, 0)); }; return (new WorkinPoint((_x / _length), (_y / _length), (_z / _length))); } public function multiply(_arg1:Number):void{ _x = (_x * _arg1); _y = (_y * _arg1); _z = (_z * _arg1); clean(); _calculateLength(); } public function subtractCopy(_arg1:Number, _arg2:Number, _arg3:Number=0):WorkinPoint{ return (new WorkinPoint((_x - _arg1), (_y - _arg2), (_z - _arg3))); } public function completeMove():void{ WorkinTweener.completeScope(this); } public function moveTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String="linear", _arg6:Number=0):void{ WorkinTweener.addTween(this, WorkinTweener.TWEEN_POS_3D, {x:_arg1, y:_arg2, z:_arg3, dur:_arg4, ease:_arg5, delay:_arg6, by:false}); } private function _calculateLength():void{ _length = Math.sqrt((((_x * _x) + (_y * _y)) + (_z * _z))); } public function dampenByPoint(_arg1:WorkinPoint):void{ if ((((((x < 0)) && ((_arg1.x > 0)))) || ((((x > 0)) && ((_arg1.x < 0)))))){ x = (x + _arg1.x); }; if ((((((y < 0)) && ((_arg1.y > 0)))) || ((((y > 0)) && ((_arg1.y < 0)))))){ y = (y + _arg1.y); }; if ((((((z < 0)) && ((_arg1.z > 0)))) || ((((z > 0)) && ((_arg1.z < 0)))))){ z = (z + _arg1.z); }; _calculateLength(); } public function pseudoCross():WorkinPoint{ return (new WorkinPoint(_y, -(_x), _z)); } public function addCopy(_arg1:Number, _arg2:Number, _arg3:Number=0):WorkinPoint{ return (new WorkinPoint((_x + _arg1), (_y + _arg2), (_z + _arg3))); } public function multiplyCopy(_arg1:Number):WorkinPoint{ return (new WorkinPoint((_x * _arg1), (_y * _arg1), (_z * _arg1))); } public function decay(_arg1:Number):void{ if (length == 0){ return; }; if ((length - _arg1) < 0){ length = 0; return; }; length = (length - _arg1); } public function normalizeCopyTo(_arg1:Number):WorkinPoint{ if (_length == 0){ return (new WorkinPoint(0, 0, 0)); }; var _local2:Number = (_arg1 / _length); return (new WorkinPoint((_x * _local2), (_y * _local2), (z * _local2))); } public function equals(_arg1:WorkinPoint):Boolean{ return ((((((x == _arg1.x)) && ((y == _arg1.y)))) && ((z == _arg1.z)))); } public function deflectOff(_arg1:WorkinPoint):void{ toPoint(projectOntoCopy(_arg1).addPointCopy(projectOntoCopy(_arg1.pseudoCross()).reverseCopy())); } public function distTo(_arg1:WorkinPoint):Number{ return (Math.abs(Math.sqrt(((((_x - _arg1.x) * (_x - _arg1.x)) + ((_y - _arg1.y) * (_y - _arg1.y))) + ((_z - _arg1.z) * (_z - _arg1.z)))))); } public function cross(_arg1:WorkinPoint):WorkinPoint{ return (new WorkinPoint(((_y * _arg1.z) - (_z * _arg1.y)), ((_x * _arg1.z) - (_z * _arg1._x)), ((_x * _arg1.y) - (_y * _arg1.x)))); } public function clean():void{ _x = (Math.round((_x * 1000)) / 1000); _y = (Math.round((_y * 1000)) / 1000); _z = (Math.round((_z * 1000)) / 1000); } public function set length(_arg1:Number):void{ if (_length == 0){ return; }; multiply((_arg1 / _length)); } public function dot(_arg1:WorkinPoint):Number{ return ((((_x * _arg1.x) + (_y * _arg1.y)) + (_z * _arg1.z))); } public function get angle():Number{ return (((Math.atan2(y, x) * 180) / Math.PI)); } public function toPoint(_arg1:WorkinPoint):void{ _x = _arg1.x; _y = _arg1.y; _z = _arg1.z; _calculateLength(); } public function distTo2D(_arg1:WorkinPoint):Number{ return (Math.abs(Math.sqrt((((_x - _arg1.x) * (_x - _arg1.x)) + ((_y - _arg1.y) * (_y - _arg1.y)))))); } public function rotate(_arg1:Number):void{ var _local2:Number = Math.cos(((_arg1 * Math.PI) / 180)); var _local3:Number = Math.sin(((_arg1 * Math.PI) / 180)); x = ((x * _local2) - (y * _local3)); y = ((x * _local3) - (y * _local2)); } public function subtractPoint(_arg1:WorkinPoint):void{ _x = (_x - _arg1.x); _y = (_y - _arg1.y); _z = (_z - _arg1.z); clean(); _calculateLength(); } public function decayX(_arg1:Number):void{ if (x == 0){ return; }; if (x > 0){ x = (x - _arg1); if (x < 0){ x = 0; }; } else { if (x < 0){ x = (x + _arg1); if (x > 0){ x = 0; }; }; }; } public function decayY(_arg1:Number):void{ if (y == 0){ return; }; if (y > 0){ y = (y - _arg1); if (y < 0){ y = 0; }; } else { if (y < 0){ y = (y + _arg1); if (y > 0){ y = 0; }; }; }; } public function projectOnto(_arg1:WorkinPoint):void{ var _local2:WorkinPoint = _arg1.normalizeCopy(); var _local3:Number = dot(_local2); to((_local3 * _local2.x), (_local3 * _local2.y), 0); } public function deflectOffCopy(_arg1:WorkinPoint):WorkinPoint{ return (projectOntoCopy(_arg1).addPointCopy(projectOntoCopy(_arg1.pseudoCross()).reverseCopy())); } public function get length():Number{ return (_length); } public function projectOntoCopy(_arg1:WorkinPoint):WorkinPoint{ var _local2:WorkinPoint = _arg1.normalizeCopy(); var _local3:Number = dot(_local2); return (new WorkinPoint((_local3 * _local2.x), (_local3 * _local2.y), 0)); } public function reverse():void{ x = -(x); y = -(y); z = -(z); } public function cancelMove():void{ WorkinTweener.stopScope(this); } public function toString():String{ return ((((((("{ WorkinPoint : " + _x) + " , ") + _y) + " , ") + _z) + " }")); } public function addPoint(_arg1:WorkinPoint):void{ _x = (_x + _arg1.x); _y = (_y + _arg1.y); _z = (_z + _arg1.z); clean(); _calculateLength(); } public function set x(_arg1:Number):void{ _x = _arg1; } public function subtractPointCopy(_arg1:WorkinPoint):WorkinPoint{ return (new WorkinPoint((_x - _arg1.x), (_y - _arg1.y), (_z - _arg1.z))); } public function set z(_arg1:Number):void{ _z = _arg1; } public function copy():WorkinPoint{ return (new WorkinPoint(_x, _y, _z)); } public function copyAndResize(_arg1:Number):WorkinPoint{ return (multiplyCopy((_arg1 / _length))); } public function reverseCopy():WorkinPoint{ return (new WorkinPoint((x * -1), (y * -1), (z * -1))); } public function get x():Number{ return (_x); } public function rotateCopy(_arg1:Number):WorkinPoint{ var _local2:Number = Math.cos(((_arg1 * Math.PI) / 180)); var _local3:Number = Math.sin(((_arg1 * Math.PI) / 180)); return (new WorkinPoint(((x * _local2) - (y * _local3)), ((x * _local3) - (y * _local2)))); } } }//package com.workinman.lib.math
Section 64
//SWFLoader (com.workinman.lib.net.SWFLoader) package com.workinman.lib.net { import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public class SWFLoader { private static var _eventDispatcher:EventDispatcher; private static var _isLoading:Boolean; private static var _SWFLoader:Loader; private static var _loadQueue:Array; private static function _onSWFProgress(_arg1:ProgressEvent):void{ _dispatchEvent(new EProgress(ON_PROGRESS, _arg1.bytesLoaded, _arg1.bytesTotal, _SWFLoader.contentLoaderInfo.url)); } private static function _onSWFLoaded(_arg1:Event):void{ _dispatchEvent(new ESWF(true, _SWFLoader.content, _SWFLoader.contentLoaderInfo.url)); _clearBitmapListeners(); _completeLoad(); } public static function get ON_SWF():String{ return ("onSWF"); } protected static function _dispatchEvent(_arg1:Event):void{ if (_eventDispatcher == null){ _eventDispatcher = new EventDispatcher(); }; _eventDispatcher.dispatchEvent(_arg1); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ if (_eventDispatcher == null){ _eventDispatcher = new EventDispatcher(); }; _eventDispatcher.removeEventListener(_arg1, _arg2); } public static function cleanUp():void{ if (_SWFLoader != null){ _SWFLoader.unload(); }; _SWFLoader = null; } public static function get ON_PROGRESS():String{ return ("onSWFProgress"); } protected static function _beginLoad(_arg1:String, _arg2:Boolean=false):void{ var pURL = _arg1; var pIsCrossServer = _arg2; if (_SWFLoader != null){ try { _SWFLoader.unload(); } catch(pError:Error) { }; }; _SWFLoader = new Loader(); try { _SWFLoader.load(new URLRequest(pURL), new LoaderContext(false, ApplicationDomain.currentDomain, (pIsCrossServer) ? SecurityDomain.currentDomain : null)); } catch(pError:Error) { _SWFLoader.load(new URLRequest(pURL), new LoaderContext(false, ApplicationDomain.currentDomain)); }; _SWFLoader.contentLoaderInfo.addEventListener("progress", _onSWFProgress); _SWFLoader.contentLoaderInfo.addEventListener("complete", _onSWFLoaded); _SWFLoader.contentLoaderInfo.addEventListener("ioError", _onSWFError); _SWFLoader.contentLoaderInfo.addEventListener("securityError", _onSWFSecurityError); } public static function addEventListener(_arg1:String, _arg2:Function):void{ if (_eventDispatcher == null){ _eventDispatcher = new EventDispatcher(); }; _eventDispatcher.addEventListener(_arg1, _arg2); } public static function load(_arg1:String, _arg2:Boolean=false):void{ if (_loadQueue == null){ _loadQueue = []; }; if (_isLoading == true){ _queueLoad(_arg1, _arg2); } else { _beginLoad(_arg1, _arg2); }; } private static function _clearBitmapListeners():void{ _SWFLoader.removeEventListener("complete", _onSWFLoaded); _SWFLoader.removeEventListener("ioError", _onSWFError); _SWFLoader.removeEventListener("securityError", _onSWFSecurityError); } private static function _onSWFError(_arg1:Event):void{ _dispatchEvent(new ESWF(false)); _clearBitmapListeners(); _completeLoad(); } private static function _onSWFSecurityError(_arg1:Event):void{ _dispatchEvent(new ESWF(false)); _clearBitmapListeners(); _completeLoad(); } protected static function _completeLoad():void{ var _local1:Object; if (_loadQueue.length == 0){ _isLoading = false; } else { _local1 = _loadQueue.shift(); _beginLoad(_local1.url, _local1.isCross); }; } private static function _queueLoad(_arg1:String, _arg2:Boolean=false):void{ _loadQueue.push({url:_arg1, isCross:_arg2}); } } }//package com.workinman.lib.net
Section 65
//GlobalSound (com.workinman.lib.sound.GlobalSound) package com.workinman.lib.sound { public class GlobalSound { private static var _instance:SoundManager; public static function getInstance():SoundManager{ if (_instance == null){ _instance = new SoundManager(); }; return (_instance); } public static function get instance():SoundManager{ return (getInstance()); } } }//package com.workinman.lib.sound
Section 66
//SoundManager (com.workinman.lib.sound.SoundManager) package com.workinman.lib.sound { import flash.events.*; import com.workinman.lib.utils.*; import flash.media.*; import flash.net.*; public class SoundManager extends EventDispatcher { protected const _DEFAULT_GROUP:String = "def"; protected var _loop:Number; protected var _externalSounds:Array; protected var _isLoading:Boolean; protected var _isMusicStoppedByMute:Boolean; protected var _isSoundOff:Boolean; protected var _sounds:Object; protected var _isMusicOff:Boolean; protected var _currentVolume:Number; protected var _currentMusicID:String; public function SoundManager():void{ _sounds = {}; _externalSounds = []; _currentMusicID = ""; _isLoading = false; _isSoundOff = false; _isMusicOff = false; _currentVolume = 1; } public function musicOff():void{ if (isMusicPlaying){ _isMusicStoppedByMute = true; } else { _isMusicStoppedByMute = false; }; stopMusic(); _isMusicOff = true; } public function soundEffectsOff():void{ _isSoundOff = true; } public function get isMusicPlaying():Boolean{ return (isSoundPlaying(_currentMusicID)); } public function muteOff(_arg1:Boolean=true):void{ _isSoundOff = false; if (_arg1 == false){ setVolume(_currentVolume, "all"); } else { musicOn(); }; } public function unpauseSound(_arg1:String):void{ resumeSound(_arg1); } public function fadeOutMusic():void{ if (_isMusicOff){ _isMusicStoppedByMute = false; }; if ((((_currentMusicID == "")) || (!(isSoundPlaying(_currentMusicID))))){ return; }; fadeOutSound(_currentMusicID); } public function stopGroup(_arg1:String):void{ var _local2:String; for (_local2 in _sounds) { if ((((_sounds[_local2].group == _arg1)) && (_sounds[_local2].isPlaying))){ stopSound(_local2); }; }; } public function registerExternalSound(_arg1:String, _arg2:String):void{ _sounds[_arg1] = new WorkinSoundData(null, new URLRequest(_arg2)); _sounds[_arg1].id = _arg1; _externalSounds.push(_sounds[_arg1]); if (!_isLoading){ Updater.getInstance().addEventListener(Updater.EVENT_UPDATE, _updateExternalLoader); }; _isLoading = true; } public function setVolume(_arg1:Number, _arg2:String="def"):void{ var _local3:String; if (_isSoundOff == false){ _currentVolume = _arg1; }; for (_local3 in _sounds) { if ((((_arg2 == "all")) || ((_sounds[_local3].group == _arg2)))){ _sounds[_local3].volume = _arg1; }; }; } public function soundEffectsToggle():void{ if (_isSoundOff){ soundEffectsOn(); } else { soundEffectsOff(); }; } public function silence():void{ var _local1:String; for (_local1 in _sounds) { stopSound(_local1); }; } public function get isSoundOff():Boolean{ return (_isSoundOff); } public function registerSound(_arg1:String, _arg2:Class, _arg3:String="def"):void{ if (_sounds[_arg1] != undefined){ return; }; _sounds[_arg1] = new WorkinSoundData(_arg2); _sounds[_arg1].id = _arg1; _sounds[_arg1].group = _arg3; } public function stopSound(_arg1:String):void{ if (!_verifySound(_arg1, true)){ return; }; _sounds[_arg1].stop(); } public function get isLoading():Boolean{ return (_isLoading); } public function pauseSound(_arg1:String):void{ if (!_verifySound(_arg1, true)){ return; }; _sounds[_arg1].pause(); } public function playSound(_arg1:String, _arg2:Boolean=false, _arg3:Number=0, _arg4:Number=0, _arg5:SoundTransform=null):void{ if (!_verifySound(_arg1)){ return; }; if (_arg2){ stopSound(_arg1); }; _sounds[_arg1].play(_arg3, _arg4, _arg5); } public function stopMusic():void{ if (_currentMusicID == ""){ return; }; if (_isMusicOff){ _isMusicStoppedByMute = false; }; stopSound(_currentMusicID); } public function get currentMusic():String{ return (_currentMusicID); } public function soundEffectsOn():void{ _isSoundOff = false; } public function loopSound(_arg1:String, _arg2:SoundTransform=null):void{ if (!_verifySound(_arg1)){ return; }; _sounds[_arg1].loop(_arg2); } public function muteToggle():void{ if (isMute){ muteOff(); } else { muteOn(); }; } public function fadeInSound(_arg1:String, _arg2:Number=-1):void{ if (!_verifySound(_arg1)){ return; }; _sounds[_arg1].fadeIn(0, 0, null, _arg2); } public function playMusic(_arg1:String=null, _arg2:SoundTransform=null):void{ if (_isMusicOff){ if (_arg1 != null){ _currentMusicID = _arg1; _isMusicStoppedByMute = true; }; return; }; if (_arg1 == null){ _arg1 = _currentMusicID; }; if (_sounds[_arg1] == null){ return; }; if (_currentMusicID != ""){ if ((((_currentMusicID == _arg1)) && ((_sounds[_currentMusicID].isPlaying == true)))){ return; }; if (_sounds[_currentMusicID].isPlaying){ stopMusic(); }; }; _currentMusicID = _arg1; _sounds[_arg1].loop(_arg2); } public function cleanUp():void{ var _local1:String; if (_currentMusicID != ""){ stopMusic(); }; for (_local1 in _sounds) { stopSound(_local1); _sounds[_local1].cleanUp(); delete _sounds[_local1]; }; _externalSounds = []; if (_isLoading){ Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _updateExternalLoader); }; } public function get isMusicOff():Boolean{ return (_isMusicOff); } private function _verifySound(_arg1:String, _arg2:Boolean=false):Boolean{ return (((((_arg2) || (!(_isSoundOff)))) && (!((_sounds[_arg1] == null))))); } public function muteOn(_arg1:Boolean=true):void{ _isSoundOff = true; if (_arg1 == false){ setVolume(0, "all"); } else { musicOff(); }; } public function getSound(_arg1:String):WorkinSoundData{ return (_sounds[_arg1]); } protected function _updateExternalLoader(_arg1:Number):void{ _isLoading = false; _loop = _externalSounds.length; while (_loop--) { if (_externalSounds[_loop].bytesLoaded < _externalSounds[_loop].bytesTotal){ _isLoading = true; }; }; if (!_isLoading){ _externalSounds = []; Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _updateExternalLoader); }; } public function musicToggle():void{ if (_isMusicOff){ musicOn(); } else { musicOff(); }; } public function resumeSound(_arg1:String, _arg2:Number=-1):void{ if (!_verifySound(_arg1, true)){ return; }; _sounds[_arg1].resume(_arg2); } public function stopAllSounds():void{ var _local1:String; for (_local1 in _sounds) { if (_sounds[_local1].isPlaying){ stopSound(_local1); }; }; } public function musicOn():void{ _isMusicOff = false; if (_isMusicStoppedByMute){ playMusic(); }; } public function playExclusiveSound(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:SoundTransform=null):void{ if (!_verifySound(_arg1)){ return; }; stopGroup(_sounds[_arg1].group); _sounds[_arg1].play(_arg2, _arg3, _arg4); } public function isSoundPlaying(_arg1:String):Boolean{ if (_sounds[_arg1] == undefined){ return (false); }; return ((_sounds[_arg1].isPlaying == true)); } public function addSound(_arg1:String, _arg2:Class, _arg3:String="def"):void{ registerSound(_arg1, _arg2, _arg3); } public function get isMute():Boolean{ return (((_isMusicOff) && (_isSoundOff))); } private function _verifyMusic(_arg1:String, _arg2:Boolean=false):Boolean{ return (((((_arg2) || (!(_isMusicOff)))) && (!((_sounds[_arg1] == null))))); } public function fadeOutSound(_arg1:String, _arg2:Number=-1):void{ if (!_verifySound(_arg1, true)){ return; }; _sounds[_arg1].fadeOut(_arg2); } } }//package com.workinman.lib.sound
Section 67
//WorkinSoundData (com.workinman.lib.sound.WorkinSoundData) package com.workinman.lib.sound { import com.workinman.lib.events.*; import flash.events.*; import com.workinman.lib.utils.*; import flash.media.*; import flash.net.*; public class WorkinSoundData extends EventDispatcher { private var _group:String; private var _sound:Sound; private var _isPlaying:Boolean; private var _isLooping:Boolean; private var _volume:Number; private var _pausePosition:Number; private var _isLoading:Boolean; private var _channel:SoundChannel; private var _id:String; private var _fadeDir:Number; private var _isPaused:Boolean; private var _fadeRate:Number; private var _isFading:Boolean; private var _fadeVol:Number; public static const COMPLETE:String = "onWorkinSoundDataComplete"; public static const SOUND_STOP:String = "onWorkinSoundStop"; public static const SOUND_PAUSE:String = "onWorkinSoundPause"; private static const _DEF_FADE_RATE:Number = 0.8; public static const SOUND_PLAY:String = "onWorkinSoundPlay"; public static const SOUND_POSITION:String = "onWorkinSoundPosition"; public function WorkinSoundData(_arg1:Class=null, _arg2:URLRequest=null, _arg3:SoundLoaderContext=null){ var pClass = _arg1; var pStream = _arg2; var pContext = _arg3; super(); if (pClass == null){ _isLoading = true; try { _sound = new Sound(pStream, pContext); _addLoadingListeners(); } catch(pErr:Error) { }; } else { _sound = new (pClass); _isLoading = false; }; _volume = 1; _fadeVol = _volume; _isPlaying = false; _isPaused = false; _isLooping = false; _isFading = false; _fadeRate = _DEF_FADE_RATE; } public function stop():void{ if (!_isPlaying){ return; }; _isPlaying = false; _isLooping = false; _isFading = false; _removeChannelListener(); _channel.stop(); _channel = null; dispatchEvent(new Event(SOUND_STOP)); } public function get group():String{ return (_group); } private function _onSoundComplete(_arg1:Event):void{ _isPlaying = false; dispatchEvent(new Event(COMPLETE)); _removeChannelListener(); if (_isLooping){ play(0, 100); }; } public function get bytesTotal():Number{ return (_sound.bytesTotal); } public function get volume():Number{ return (_volume); } public function get id():String{ return (_id); } private function _setVolume(_arg1:Number):void{ var _local2:SoundTransform = _channel.soundTransform; _local2.volume = _arg1; _channel.soundTransform = _local2; } public function loop(_arg1:SoundTransform=null):void{ if (_isLoading){ return; }; if (_isPlaying){ if (_isLooping){ return; }; stop(); }; play(0, 100, _arg1); _isLooping = true; } private function _removeLoadingListeners():void{ if (!_isLoading){ return; }; try { _sound.removeEventListener(Event.COMPLETE, _onLoadComplete); _sound.removeEventListener(IOErrorEvent.IO_ERROR, _onLoadError); } catch(pErr:Error) { }; } public function get position():Number{ return ((_isPlaying) ? _channel.position : 0); } public function get isPlaying():Boolean{ return (_isPlaying); } public function resume(_arg1:Number=-1):void{ if (_arg1 >= 0){ _pausePosition = _arg1; }; play(); } public function fadeOut(_arg1:Number):void{ if (((!(_isPlaying)) || (_isLoading))){ return; }; if (!_isFading){ _fadeVol = _volume; }; _fadeDir = -1; if (_arg1 > 0){ _fadeRate = _arg1; }; _beginFade(); } public function set volume(_arg1:Number):void{ _volume = _arg1; if (_isPlaying){ _setVolume(_volume); }; } public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{ if (_isPaused){ _channel = _sound.play(_pausePosition); _isPaused = false; } else { _channel = _sound.play(_arg1, _arg2, _arg3); }; _isPlaying = true; _channel.addEventListener(Event.SOUND_COMPLETE, _onSoundComplete); if (((!((_volume == 1))) || (!((_fadeVol == _volume))))){ _setVolume(_volume); _fadeVol = _volume; }; dispatchEvent(new Event(SOUND_PLAY)); return (_channel); } public function set id(_arg1:String):void{ _id = _arg1; } public function fadeIn(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null, _arg4:Number=-1):void{ var _local5:Number; if (((_isLoading) || (((_isPlaying) && (!(_isFading)))))){ return; }; if (!_isPlaying){ _local5 = _volume; _volume = 0; play(_arg1, _arg2, _arg3); _volume = _local5; }; if (!_isFading){ _fadeVol = 0; }; if (_arg4 > 0){ _fadeRate = _arg4; }; _fadeDir = 1; _beginFade(); } public function get isLooping():Boolean{ return (_isLooping); } private function _beginFade():void{ if (_isFading){ return; }; _setVolume(_fadeVol); Updater.getInstance().addEventListener(Updater.EVENT_UPDATE, _fade, false, 0, true); _isFading = true; } private function _completeFade():void{ Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _fade); _isFading = false; } public function get isLoaded():Boolean{ return ((_sound.bytesLoaded == _sound.bytesTotal)); } public function get bytesLoaded():Number{ return (_sound.bytesLoaded); } public function cleanUp():void{ _isLooping = false; if (_isPlaying){ stop(); }; if (_isFading){ Updater.getInstance().removeEventListener(Updater.EVENT_UPDATE, _fade); }; _removeLoadingListeners(); } private function _removeChannelListener():void{ try { _channel.removeEventListener(Event.SOUND_COMPLETE, _onSoundComplete); } catch(pError:Error) { }; } private function _onLoadComplete(_arg1:Event):void{ _removeLoadingListeners(); _isLoading = false; } private function _addLoadingListeners():void{ _sound.addEventListener(Event.COMPLETE, _onLoadComplete); _sound.addEventListener(IOErrorEvent.IO_ERROR, _onLoadError); } private function _onLoadError(_arg1:IOErrorEvent):void{ _removeLoadingListeners(); } public function get length():Number{ return (_sound.length); } private function _fade(_arg1:EUpdate):void{ if (_fadeDir > 0){ _fadeVol = (_fadeVol + (_arg1.dt * _fadeRate)); if (_fadeVol >= _volume){ _fadeVol = _volume; _setVolume(_volume); _completeFade(); return; }; } else { _fadeVol = (_fadeVol - (_arg1.dt * _fadeRate)); if (_fadeVol <= 0){ _fadeVol = 0; _setVolume(_fadeVol); _completeFade(); stop(); return; }; }; _fadeVol = (Math.round((_fadeVol * 1000)) / 1000); _setVolume(_fadeVol); } public function pause():void{ if (!_isPlaying){ return; }; _isPlaying = false; _isPaused = true; _pausePosition = _channel.position; _channel.stop(); _removeChannelListener(); _channel = null; dispatchEvent(new Event(SOUND_PAUSE)); } public function set fadeRate(_arg1:Number):void{ _fadeRate = _arg1; } public function get fadeRate():Number{ return (_fadeRate); } public function unpause(_arg1:Number=-1):void{ resume(_arg1); } public function set group(_arg1:String):void{ _group = _arg1; } } }//package com.workinman.lib.sound
Section 68
//Updater (com.workinman.lib.utils.Updater) package com.workinman.lib.utils { import com.workinman.lib.events.*; import flash.events.*; import flash.utils.*; public class Updater extends EventDispatcher { private var _loop:Number; private var _timer:Timer; private var _listenerCount:Number; private var _lastTimer:Number; private var _isGameMode:Boolean; private var _minimumUpdateTime:Number; private var _deltaTime:Number; private var _currentTimer:Number; private var _autoStart:Boolean; private static var _instance:Updater; public static var EVENT_UPDATE:String = "onUpdate"; public function Updater():void{ } public function get UPDATE():String{ return (Updater.EVENT_UPDATE); } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ _listenerCount--; super.removeEventListener(_arg1, _arg2, _arg3); if ((((_listenerCount == 0)) && (_autoStart))){ stop(); }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ _listenerCount++; super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); if ((((_listenerCount == 1)) && (_autoStart))){ start(); }; } public function init():void{ _timer = new Timer(0, 0); _timer.stop(); _timer.addEventListener("timer", _timerHandler); _deltaTime = 0; _minimumUpdateTime = 0; _autoStart = true; _listenerCount = 0; _isGameMode = false; } public function stop():void{ pause(); } public function setAsGameTimer(_arg1:Boolean=true):void{ setGameMode(_arg1); } public function start():void{ unpause(); } private function _timerHandler(_arg1:TimerEvent):void{ _currentTimer = getTimer(); _deltaTime = (_deltaTime + ((_currentTimer - _lastTimer) / 1000)); _lastTimer = _currentTimer; if (_deltaTime < _minimumUpdateTime){ return; }; dispatchEvent(new EUpdate(EVENT_UPDATE, _deltaTime)); _deltaTime = 0; if (_isGameMode){ _arg1.updateAfterEvent(); }; } public function enableAutoStart():void{ _autoStart = true; } public function disableAutoStart():void{ _autoStart = false; } public function pause():void{ if (!_timer.running){ return; }; _timer.stop(); } public function setGameMode(_arg1:Boolean=true):void{ _isGameMode = _arg1; } public function get autoStart():Boolean{ return (_autoStart); } public function unpause():void{ if (_timer.running){ return; }; _lastTimer = getTimer(); _timer.start(); } public function lockFPS(_arg1:Number):void{ _minimumUpdateTime = (Math.round(((1 / _arg1) * 1000)) / 1000); } public static function get instance():Updater{ return (getInstance()); } public static function getInstance():Updater{ if (_instance == null){ _instance = new (Updater); _instance.init(); }; return (_instance); } } }//package com.workinman.lib.utils
Section 69
//WorkinDispatcher (com.workinman.lib.utils.WorkinDispatcher) package com.workinman.lib.utils { import flash.events.*; public class WorkinDispatcher extends EventDispatcher { private var _rooms:Object; private static var _instance:WorkinDispatcher; public function WorkinDispatcher():void{ } public function getRoom(_arg1:String):EventDispatcher{ if (_rooms == null){ _rooms = {}; }; if (_rooms[_arg1] == undefined){ _rooms[_arg1] = new EventDispatcher(); }; return (_rooms[_arg1]); } public static function getInstance():WorkinDispatcher{ if (_instance == null){ _instance = new (WorkinDispatcher); }; return (_instance); } public static function get instance():WorkinDispatcher{ return (getInstance()); } } }//package com.workinman.lib.utils
Section 70
//BasicAsset (com.workinman.paradise2.assets.BasicAsset) package com.workinman.paradise2.assets { import com.workinman.lib.events.*; import flash.display.*; import com.workinman.lib.math.*; import com.workinman.lib.display.*; public class BasicAsset extends WorkinMovieClip { public var anim:MovieClip; protected var _currentFrame:String; public function BasicAsset(){ _currentFrame = ""; } public function animate(_arg1:String):void{ if (_currentFrame == _arg1){ return; }; _currentFrame = _arg1; if (anim != null){ anim.gotoAndStop(1); }; gotoAndStop(_arg1); } public function getFrameDimensions(_arg1:String):WorkinPoint{ return (new WorkinPoint()); } public function get animCurrentFrame():Number{ if (anim == null){ return (0); }; return (anim.currentFrame); } public function get animComplete():Boolean{ if (anim == null){ return (false); }; return ((anim.currentFrame == anim.totalFrames)); } protected function _addAnim(_arg1:String, _arg2:Class):void{ } public function getFrameArt(_arg1:String):Class{ return (null); } public function dispatchToAnim(_arg1:EData):void{ if (anim == null){ return; }; anim.dispatchEvent(_arg1); } public function get mc():MovieClip{ return (anim); } public function get animTotalFrames():Number{ if (anim == null){ return (-1); }; return (anim.totalFrames); } public function get animation():String{ return (_currentFrame); } } }//package com.workinman.paradise2.assets
Section 71
//ECamera (com.workinman.paradise2.events.ECamera) package com.workinman.paradise2.events { import flash.events.*; import com.workinman.paradise2.world.camera.*; public class ECamera extends Event { private var _request:String; private var _camera:BaseCamera; public function ECamera(_arg1:String, _arg2:BaseCamera){ super(_arg1, false, false); _camera = _arg2; } public function get camera():BaseCamera{ return (_camera); } } }//package com.workinman.paradise2.events
Section 72
//EView (com.workinman.paradise2.events.EView) package com.workinman.paradise2.events { import flash.events.*; import com.workinman.paradise2.world.entitys.*; public class EView extends Event { private var _request:String; private var _renderable:Renderable; public function EView(_arg1:String, _arg2:Renderable){ super(_arg1, false, false); _renderable = _arg2; } public function get renderable():Renderable{ return (_renderable); } } }//package com.workinman.paradise2.events
Section 73
//MotionCurve (com.workinman.paradise2.math.MotionCurve) package com.workinman.paradise2.math { import flash.events.*; import com.workinman.lib.math.*; public class MotionCurve extends EventDispatcher { private var _current:WorkinPoint; private var _formula:Function; private var _pathRatio:Number; private var _timeElapsed:Number; private var _duration:Number; private var _bezier:WorkinBezier; private var _timeRatio:Number; public static var COMPLETE:String = "onPathComplete"; public function MotionCurve(_arg1:WorkinPoint, _arg2:WorkinPoint, _arg3:WorkinPoint, _arg4:WorkinPoint, _arg5:Number, _arg6:String="linear"){ _bezier = new WorkinBezier(_arg1, _arg2, _arg3, _arg4); _bezier.getAsLines(); _duration = _arg5; _timeElapsed = 0; _timeRatio = 0; _pathRatio = 0; _calculatePath(); _formula = PennerManager.getEaseFunction(_arg6); } public function get y():Number{ return (_current.y); } public function get isComplete():Boolean{ return ((timeRatio == 1)); } public function get timeRatio():Number{ return (_timeRatio); } public function update(_arg1:Number):void{ _updatePath(_arg1); } protected function _updatePath(_arg1:Number):void{ if (isComplete){ return; }; _timeElapsed = (_timeElapsed + _arg1); if (_timeElapsed > _duration){ _timeElapsed = _duration; }; _timeRatio = (_timeElapsed / _duration); _pathRatio = _formula(0, 1, _timeElapsed, _duration); _current = _bezier.getPoint(_pathRatio); if (isComplete){ dispatchEvent(new Event(COMPLETE)); }; } public function endToPoint(_arg1:WorkinPoint):void{ _bezier.endToPoint(_arg1); _calculatePath(); } public function startToPoint(_arg1:WorkinPoint):void{ _bezier.originToPoint(_arg1); _calculatePath(); } public function get duration():Number{ return (_duration); } public function get end():WorkinPoint{ return (_bezier.p1); } public function get start():WorkinPoint{ return (_bezier.p0); } public function get hasPosition():Boolean{ return (true); } private function _calculatePath():void{ _current = _bezier.getPoint(_pathRatio); } public function get pathRatio():Number{ return (_pathRatio); } public function endTo(_arg1:Number, _arg2:Number, _arg3:Number):void{ _bezier.endTo(_arg1, _arg2, _arg3); _calculatePath(); } public function get x():Number{ return (_current.x); } public function get current():WorkinPoint{ return (_current); } public function startTo(_arg1:Number, _arg2:Number, _arg3:Number):void{ _bezier.originTo(_arg1, _arg2, _arg3); _calculatePath(); } } }//package com.workinman.paradise2.math
Section 74
//MotionDelay (com.workinman.paradise2.math.MotionDelay) package com.workinman.paradise2.math { import flash.events.*; public class MotionDelay extends EventDispatcher { private var _timeElapsed:Number; private var _duration:Number; private var _ratio:Number; public static var COMPLETE:String = "onDelayComplete"; public function MotionDelay(_arg1:Number){ _duration = _arg1; _timeElapsed = 0; _ratio = 0; } public function get isComplete():Boolean{ return ((_ratio == 1)); } public function get duration():Number{ return (_duration); } public function get hasPosition():Boolean{ return (false); } public function update(_arg1:Number):void{ _timeElapsed = (_timeElapsed + _arg1); if (_timeElapsed > _duration){ _timeElapsed = _duration; }; _ratio = (_timeElapsed / _duration); if (isComplete){ dispatchEvent(new Event(COMPLETE)); }; } public function get ratio():Number{ return (_ratio); } } }//package com.workinman.paradise2.math
Section 75
//MotionLine (com.workinman.paradise2.math.MotionLine) package com.workinman.paradise2.math { import flash.events.*; import com.workinman.lib.math.*; public class MotionLine extends EventDispatcher { private var _current:WorkinPoint; private var _line:WorkinLine; private var _formula:Function; private var _pathRatio:Number; private var _timeElapsed:Number; private var _duration:Number; private var _timeRatio:Number; public static var COMPLETE:String = "onPathComplete"; public function MotionLine(_arg1:WorkinPoint, _arg2:WorkinPoint, _arg3:Number, _arg4:String="linear"){ _line = new WorkinLine(_arg1, _arg2); _duration = _arg3; _timeElapsed = 0; _timeRatio = 0; _pathRatio = 0; _calculatePath(); _formula = PennerManager.getEaseFunction(_arg4); } public function get y():Number{ return (_current.y); } public function get isComplete():Boolean{ return ((timeRatio == 1)); } public function get diff():WorkinPoint{ return (_line.vector); } public function update(_arg1:Number):void{ _updatePath(_arg1); } public function get timeRatio():Number{ return (_timeRatio); } public function endToPoint(_arg1:WorkinPoint):void{ _line.endToPoint(_arg1); _calculatePath(); } public function get duration():Number{ return (_duration); } public function startToPoint(_arg1:WorkinPoint):void{ _line.originToPoint(_arg1); _calculatePath(); } public function get end():WorkinPoint{ return (_line.p1); } public function get start():WorkinPoint{ return (_line.p0); } public function get hasPosition():Boolean{ return (true); } private function _calculatePath():void{ _current = _line.getPoint(_pathRatio); } public function get pathRatio():Number{ return (_pathRatio); } public function get origin():WorkinPoint{ return (_line.p0); } public function endTo(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _line.endTo(_arg1, _arg2, _arg3); _calculatePath(); } public function get x():Number{ return (_current.x); } public function get current():WorkinPoint{ return (_current); } protected function _updatePath(_arg1:Number):void{ if (isComplete){ return; }; _timeElapsed = (_timeElapsed + _arg1); if (_timeElapsed > _duration){ _timeElapsed = _duration; }; _timeRatio = (_timeElapsed / _duration); _pathRatio = _formula(0, 1, _timeElapsed, _duration); _current = _line.getPoint(_pathRatio); if (isComplete){ dispatchEvent(new Event(COMPLETE)); }; } public function startTo(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _line.originTo(_arg1, _arg2, _arg3); _calculatePath(); } } }//package com.workinman.paradise2.math
Section 76
//ViewGroup (com.workinman.paradise2.view.groups.ViewGroup) package com.workinman.paradise2.view.groups { import flash.display.*; import com.workinman.paradise2.world.entitys.*; public class ViewGroup { private var _container:Sprite; private var _loop:Number; private var _renderables:Array; public function ViewGroup(_arg1:Sprite){ _container = _arg1; _renderables = []; } public function get container():Sprite{ return (_container); } public function resortZ():void{ _renderables.sortOn("depth", (Array.NUMERIC | Array.DESCENDING)); _loop = 0; while (_loop < _renderables.length) { _container.removeChild(_renderables[_loop]); _container.addChild(_renderables[_loop]); _loop++; }; } public function clear():void{ _loop = _renderables.length; while (_loop--) { _container.removeChild(_renderables[_loop]); }; _renderables = []; } public function cleanUp():void{ clear(); _container = null; } public function eraseMC(_arg1:Renderable):void{ var pRenderable = _arg1; _loop = _renderables.length; while (_loop--) { if (_renderables[_loop] == pRenderable){ _renderables.splice(_loop, 1); _loop = 0; }; }; try { _container.removeChild(pRenderable); pRenderable.onErased(); } catch(pError:Error) { }; } public function drawMC(_arg1:Renderable):void{ var _local2:Number; if (_arg1.doDepthRender){ _renderables.push(_arg1); _renderables.sortOn("depth", (Array.NUMERIC | Array.DESCENDING)); _loop = _renderables.length; _local2 = 0; while (_loop--) { if (_renderables[_loop] == _arg1){ _local2 = _loop; _loop = 0; }; }; _container.addChildAt(_arg1, _local2); } else { _renderables.push(_arg1); _container.addChild(_arg1); }; _arg1.onDrawn(); } } }//package com.workinman.paradise2.view.groups
Section 77
//ViewManager (com.workinman.paradise2.view.ViewManager) package com.workinman.paradise2.view { import com.workinman.lib.events.*; import flash.events.*; import com.workinman.paradise2.*; import flash.display.*; import com.workinman.lib.utils.*; import com.workinman.paradise2.events.*; import flash.geom.*; import com.workinman.paradise2.view.groups.*; public class ViewManager extends EventDispatcher { private var _loop:Number; private var _screenshotOverlay:Bitmap; private var _timeline:MovieClip; private var _hasScreenshot:Boolean; private var _DEF_GROUP_NAME:String;// = "base" private var _groups:Object; private var _viewRoom:EventDispatcher; public function ViewManager(_arg1:MovieClip){ _timeline = _arg1; _viewRoom = WorkinDispatcher.getInstance().getRoom(ParadiseConfig.ROOM_VIEW); _viewRoom.addEventListener(ParadiseConfig.EVENT_VIEW_DRAW, _draw); _viewRoom.addEventListener(ParadiseConfig.EVENT_VIEW_ERASE, _erase); _viewRoom.addEventListener(ParadiseConfig.EVENT_Z_SORT_ALL, _zSortAll); _viewRoom.addEventListener(ParadiseConfig.EVENT_Z_SORT_GROUP, _zSortGroup); _groups = {}; _hasScreenshot = false; addGroup(_DEF_GROUP_NAME, 0); } public function cleanUp():void{ var _local1:*; clearContentsBitmap(); _screenshotOverlay = null; for (_local1 in _groups) { _groups[_local1].cleanUp(); }; } private function _zSortGroup(_arg1:EString):void{ _groups[_arg1.data].resortZ(); } public function hide():void{ _timeline.visible = false; } public function resort():void{ } public function clear():void{ var _local1:*; for (_local1 in _groups) { _groups[_local1].clear(); }; } public function showContentsAsBitmap():void{ if (_hasScreenshot){ clearContentsBitmap(); }; _hasScreenshot = true; _screenshotOverlay = new Bitmap(getContentsAsBitmap()); _timeline.addChild(_screenshotOverlay); } public function clearContentsBitmap():void{ if (!_hasScreenshot){ return; }; _hasScreenshot = false; _timeline.removeChild(_screenshotOverlay); _screenshotOverlay.bitmapData.dispose(); } public function addGroup(_arg1:String, _arg2:Number=-1, _arg3:Boolean=false):void{ addLayer(_arg1, _arg2, _arg3); } public function _draw(_arg1:EView):void{ if (_groups[((_arg1.renderable.group == "")) ? _DEF_GROUP_NAME : _arg1.renderable.group] == undefined){ return; }; _groups[((_arg1.renderable.group == "")) ? _DEF_GROUP_NAME : _arg1.renderable.group].drawMC(_arg1.renderable); } public function _erase(_arg1:EView):void{ _groups[((_arg1.renderable.group == "")) ? _DEF_GROUP_NAME : _arg1.renderable.group].eraseMC(_arg1.renderable); } private function _zSortAll(_arg1:EString):void{ var _local2:*; for (_local2 in _groups) { _groups[_local2].resortZ(); }; } public function addLayer(_arg1:String, _arg2:Number=-1, _arg3:Boolean=false):void{ var _local4:Sprite = new Sprite(); _local4.x = ParadiseConfig.SCREEN_OFFSET.x; _local4.y = ParadiseConfig.SCREEN_OFFSET.y; if (_arg3){ _local4.scrollRect = new Rectangle(0, 0, ParadiseConfig.SCREEN_WIDTH, ParadiseConfig.SCREEN_HEIGHT); }; if (_arg2 < 0){ _timeline.addChild(_local4); } else { _timeline.addChildAt(_local4, _arg2); }; _groups[_arg1] = new ViewGroup(_local4); } public function getContentsAsBitmap():BitmapData{ var _local1:BitmapData = new BitmapData((ParadiseConfig.SCREEN_WIDTH + ParadiseConfig.SCREEN_OFFSET.x), (ParadiseConfig.SCREEN_HEIGHT + ParadiseConfig.SCREEN_OFFSET.y)); _local1.draw(_timeline, null, null, null, new Rectangle(ParadiseConfig.SCREEN_OFFSET.x, ParadiseConfig.SCREEN_OFFSET.y, ParadiseConfig.SCREEN_WIDTH, ParadiseConfig.SCREEN_HEIGHT)); _local1.floodFill(0, 0, 0); return (_local1); } public function show():void{ _timeline.visible = true; } } }//package com.workinman.paradise2.view
Section 78
//BaseCamera (com.workinman.paradise2.world.camera.BaseCamera) package com.workinman.paradise2.world.camera { import com.workinman.lib.math.*; import com.workinman.paradise2.world.entitys.*; public class BaseCamera extends Element { protected var _screenCenter:WorkinPoint; protected var _focusY:Number; protected var _focusZ:Number; protected var _dimensions:WorkinPoint; protected var _focusPoint:WorkinPoint; protected var _halfDimensions:WorkinPoint; public function BaseCamera(_arg1:Object){ super(_arg1); if ((((_arg1.fx == undefined)) || ((_arg1.fy == undefined)))){ _focusPoint = new WorkinPoint(); } else { _focusPoint = new WorkinPoint(_arg1.fx, _arg1.fy); }; } public function getRelativePos(_arg1:WorkinPoint):WorkinPoint{ return (new WorkinPoint((_pos.x + (_arg1.x - _pos.x)), (_pos.y + (_arg1.y - _pos.y)))); } public function get fx():Number{ return (_pos.x); } public function get fy():Number{ return (_pos.y); } public function get fz():Number{ return (_pos.z); } public function get center():WorkinPoint{ return (_screenCenter); } function setDimensions(_arg1:WorkinPoint):void{ _dimensions = _arg1; _screenCenter = _dimensions.divideCopy(2); _halfDimensions = _dimensions.divideCopy(2); } public function isOnscreen(_arg1:Renderable):Boolean{ if (((((Math.abs((_pos.x - (_arg1.pos.x + _arg1.displayCenter.x))) - _arg1.halfDisplayWidth) > _halfDimensions.x)) || (((Math.abs((_pos.y - (_arg1.pos.y + _arg1.displayCenter.y))) - _arg1.halfDisplayHeight) > _halfDimensions.y)))){ return (false); }; return (true); } public function set fx(_arg1:Number):void{ _pos.x = _arg1; } public function set fy(_arg1:Number):void{ _pos.y = _arg1; } public function set fz(_arg1:Number):void{ _pos.z = _arg1; } override public function set x(_arg1:Number):void{ _pos.x = _arg1; } override public function set y(_arg1:Number):void{ _pos.y = _arg1; } override public function get x():Number{ return (_pos.x); } override public function get y():Number{ return (_pos.y); } } }//package com.workinman.paradise2.world.camera
Section 79
//CameraManager (com.workinman.paradise2.world.camera.CameraManager) package com.workinman.paradise2.world.camera { import flash.events.*; import com.workinman.paradise2.*; import com.workinman.lib.math.*; import com.workinman.lib.utils.*; import com.workinman.paradise2.events.*; public class CameraManager { private var _activeCameraID:String; private var _activeCamera:BaseCamera; private var _dimensions:WorkinPoint; private var _worldRoom:EventDispatcher; private var _cameras:Object; public function CameraManager():void{ _registerEventRooms(); _dimensions = ParadiseConfig.DIMENSIONS.addPointCopy(ParadiseConfig.SCREEN_OFFSET); _cameras = {}; _activeCameraID = ""; } public function renderCameraView():void{ _worldRoom.dispatchEvent(new ECamera(ParadiseConfig.EVENT_RENDER_FROM_CAMERA, _activeCamera)); } public function cleanUp():void{ clear(); } protected function _setActiveCamera(_arg1:String):void{ if ((((_activeCameraID == _arg1)) || (!(_cameras.hasOwnProperty(_arg1))))){ return; }; _activeCameraID = _arg1; _activeCamera = _cameras[_arg1]; _worldRoom.dispatchEvent(new ECamera(ParadiseConfig.EVENT_CAMERA_CHANGE, _activeCamera)); } protected function _registerEventRooms():void{ _worldRoom = WorkinDispatcher.getInstance().getRoom(ParadiseConfig.ROOM_WORLD); } public function clear():void{ _activeCamera = null; _worldRoom = null; } public function getRelativePos(_arg1:WorkinPoint):WorkinPoint{ return (_activeCamera.getRelativePos(_arg1)); } public function changeCamera(_arg1:String):void{ _setActiveCamera(_arg1); } public function addCustomCamera(_arg1:BaseCamera, _arg2:String="custom", _arg3:Boolean=true):void{ if ((((_arg2 == "custom")) && (!((_cameras[_arg2] == undefined))))){ }; _cameras[_arg2] = _arg1; _cameras[_arg2].setDimensions(_dimensions); if (((_arg3) || ((_activeCameraID == "")))){ _setActiveCamera(_arg2); }; } public function get camera():BaseCamera{ return (_activeCamera); } public function addSimpleCamera(_arg1:String, _arg2:Boolean=true, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0):void{ _cameras[_arg1] = new BaseCamera({x:_arg3, y:_arg4, z:_arg5, fx:_arg6, fy:_arg7, fz:_arg8}); _cameras[_arg1].setDimensions(_dimensions); if (((_arg2) || ((_activeCameraID == "")))){ _setActiveCamera(_arg1); }; } } }//package com.workinman.paradise2.world.camera
Section 80
//Element (com.workinman.paradise2.world.entitys.Element) package com.workinman.paradise2.world.entitys { import com.workinman.lib.math.*; import com.workinman.paradise2.math.*; import com.workinman.lib.display.*; public class Element extends WorkinMovieClip { protected var _driveTarget:WorkinPoint; protected var _loop:Number; protected var _pos:WorkinPoint; protected var _lastMotionLine:WorkinLine; protected var _nextPos:WorkinPoint; protected var _lastPos:WorkinPoint; protected var _driveVector:WorkinPoint; protected var _overdrive:Boolean; protected var _velocity:WorkinPoint; protected var _isDriving:Boolean; protected var _frictionRate:Number; protected var _terminalRate:Number; protected var _accelerationRate:Number; protected var _motionLine:WorkinLine; protected var _paths:Array; protected var _decelerationRate:Number; public function Element(_arg1:Object){ _validateData(_arg1); if (_pos == null){ _pos = new WorkinPoint(_arg1.x, _arg1.y, _arg1.z); }; _lastPos = _pos.copy(); _nextPos = _pos.copy(); _motionLine = new WorkinLine(new WorkinPoint(), new WorkinPoint()); _lastMotionLine = new WorkinLine(new WorkinPoint(), new WorkinPoint()); _setInitialVelocity(); _setInitialPath(); _setInitialRates(); } public function get lastMotionLine():WorkinLine{ return (_lastMotionLine); } public function _updateDrive(_arg1:Number):void{ _driveVector = _pos.diff(_driveTarget); var _local2:WorkinPoint = _driveVector.normalizeCopy(); if ((((_driveVector.length < (_local2.multiplyCopy((_decelerationRate * _arg1)).length / 2))) && (((!(_overdrive)) || (((_overdrive) && ((_velocity.length < 4)))))))){ _velocity.to(0, 0, 0); completeDrive(); return; }; if (_driveVector.length < ((_velocity.length / 2) * (_velocity.length / _decelerationRate))){ if (_overdrive){ _local2.multiply((_frictionRate * _arg1)); } else { _local2.multiply((_decelerationRate * _arg1)); }; _local2.reverse(); } else { _local2.multiply((_accelerationRate * _arg1)); }; if ((_velocity.x * _local2.x) < 0){ _local2.x = (_local2.x + ((_frictionRate * _arg1) * ((_local2.x > 0)) ? 1 : -1)); }; if ((_velocity.y * _local2.y) < 0){ _local2.y = (_local2.y + ((_frictionRate * _arg1) * ((_local2.y > 0)) ? 1 : -1)); }; _velocity.addPoint(_local2); if (_velocity.length > _terminalRate){ _velocity.length = _terminalRate; }; } public function get accelerationRate(){ return (_accelerationRate); } public function get terminalRate(){ return (_terminalRate); } public function set accelerationRate(_arg1:Number){ _accelerationRate = _arg1; } public function updatePosition(_arg1:Number):void{ _lastPos.toPoint(_pos); _pos.toPoint(_nextPos); _lastMotionLine.toLine(_motionLine.copy()); _calculateMotion(); } public function get isPathing():Boolean{ return ((_paths.length > 0)); } public function get motionVector():WorkinPoint{ return (_motionLine.vector); } protected function _onPathComplete():void{ } protected function _setInitialVelocity():void{ _velocity = new WorkinPoint(0, 0); _isDriving = false; _driveTarget = new WorkinPoint(0, 0); _overdrive = false; } public function clearPaths():void{ if (_paths.length == 0){ return; }; _paths = []; _onPathCancelled(); } public function driveTo(_arg1:WorkinPoint, _arg2:Boolean=false):void{ if (_arg1.equals(_pos)){ return; }; _driveTarget = _arg1.copy(); _isDriving = true; _overdrive = _arg2; } public function setPath(_arg1:WorkinPoint, _arg2:Number=-1, _arg3:String="linear"):void{ clearPaths(); addPath(_arg1, _arg2, _arg3); } protected function _updatePath(_arg1:Number):void{ _paths[0].update(_arg1); if (_paths[0].hasPosition){ _nextPos.toPoint(_paths[0].current); _velocity.to((_nextPos.x - _lastPos.x), (_nextPos.y - _lastPos.y), (_nextPos.z - _lastPos.z)); _velocity.multiply((1 / _arg1)); }; if (_paths[0].isComplete){ _paths.splice(0, 1); if (_paths.length == 0){ _onPathComplete(); } else { if (_paths[0].hasPosition){ _paths[0].startToPoint(_nextPos); }; }; }; } public function clearCurrentPath():void{ if (_paths.length == 0){ return; }; _paths.shift(); if (_paths.length == 0){ _onPathCancelled(); }; } protected function _onPathBegin():void{ } public function updatePrediction(_arg1:Number):void{ if (_paths.length > 0){ _updatePath(_arg1); } else { _updateVelocity(_arg1); }; _calculateMotion(); } public function get isDriving():Boolean{ return (_isDriving); } private function _validateData(_arg1:Object):void{ if (_arg1.x == undefined){ _arg1.x = 0; }; if (_arg1.y == undefined){ _arg1.y = 0; }; if (_arg1.z == undefined){ _arg1.z = 0; }; } public function get decelerationRate(){ return (_decelerationRate); } public function predictionToPoint(_arg1:WorkinPoint):void{ _nextPos.toPoint(_arg1); _calculateMotion(); } public function setDelay(_arg1:Number):void{ clearPaths(); addDelay(_arg1); } public function update(_arg1:Number):void{ updatePrediction(_arg1); updatePosition(_arg1); } public function get motionLine():WorkinLine{ return (_motionLine); } protected function _clearVelocity():void{ _velocity.to(0, 0); } public function clearDrive(_arg1:Boolean=false):void{ _driveTarget = _pos.copy(); if (!_arg1){ _velocity.to(0, 0, 0); }; _isDriving = false; } public function addCurve(_arg1:WorkinPoint, _arg2:WorkinPoint, _arg3:WorkinPoint, _arg4:Number=-1, _arg5:String="linear"):void{ if (_arg4 < 0){ _arg4 = (_pos.diff(_arg1).length / _terminalRate); }; _paths.push(new MotionCurve(_pos, _arg1, _arg2, _arg3, _arg4, _arg5)); if (_paths.length > 1){ _onPathBegin(); }; } public function get lastMotionVector():WorkinPoint{ return (_lastMotionLine.vector); } public function completeDrive():void{ _nextPos.toPoint(_driveTarget); _isDriving = false; } public function get pos():WorkinPoint{ return (_pos); } public function toPoint(_arg1:WorkinPoint):void{ _lastPos.toPoint(_pos); _pos.toPoint(_arg1); _nextPos.toPoint(_pos); } public function get velocity():WorkinPoint{ return (_velocity); } public function get lastPos():WorkinPoint{ return (_lastPos); } public function set decelerationRate(_arg1:Number){ _decelerationRate = _arg1; } public function addDelay(_arg1:Number):void{ _paths.push(new MotionDelay(_arg1)); } protected function _setInitialPath():void{ _paths = []; } public function predictionTo(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _nextPos.to(_arg1, _arg2, _arg3); _calculateMotion(); } protected function _updateVelocity(_arg1:Number):void{ if (_isDriving){ _updateDrive(_arg1); }; _nextPos.add((_velocity.x * _arg1), (_velocity.y * _arg1), (_velocity.z * _arg1)); } public function addPath(_arg1:WorkinPoint, _arg2:Number=-1, _arg3:String="linear"):void{ if (_arg2 < 0){ _arg2 = (_pos.diff(_arg1).length / _terminalRate); }; _paths.push(new MotionLine(_pos, _arg1, _arg2, _arg3)); if (_paths.length > 1){ _onPathBegin(); }; } protected function _onPathCancelled():void{ } protected function _setInitialRates():void{ decelerationRate = 260; accelerationRate = 200; terminalRate = 300; frictionRate = 150; } override public function toString():String{ return (((("[Element] " + _pos) + " -> ") + _nextPos)); } public function set frictionRate(_arg1:Number){ _frictionRate = _arg1; } public function set terminalRate(_arg1:Number){ _terminalRate = _arg1; } public function get frictionRate(){ return (_frictionRate); } public function to(_arg1:Number, _arg2:Number, _arg3:Number=0):void{ _lastPos.toPoint(_pos); _pos.to(_arg1, _arg2, _arg3); _nextPos.toPoint(_pos); _calculateMotion(); } public function get predictedPos():WorkinPoint{ return (_nextPos); } protected function _calculateMotion():void{ _motionLine.to(_pos, _nextPos); } } }//package com.workinman.paradise2.world.entitys
Section 81
//ParaSprite (com.workinman.paradise2.world.entitys.ParaSprite) package com.workinman.paradise2.world.entitys { import flash.display.*; import com.workinman.lib.display.*; import com.workinman.paradise2.assets.*; public class ParaSprite extends Renderable { protected var _assetClass:Class; protected var _isAssetComplex:Boolean; protected var _asset:MovieClip; protected var _isAssetWorkinMC:Boolean; protected var _isAssetMC:Boolean; public function ParaSprite(_arg1:Object){ super(_arg1); if (_arg1.asset == null){ _assetClass = _defaultAsset; } else { _assetClass = _arg1.asset; }; _asset = new _assetClass(); _isAssetWorkinMC = false; _isAssetComplex = false; _isAssetMC = false; if ((_asset is WorkinMovieClip)){ _isAssetWorkinMC = true; } else { if ((_asset is BasicAsset)){ _isAssetComplex = true; } else { _isAssetMC = true; }; }; addChild(_asset); _onGenerateAsset(); _recalculateDimensions(); } override public function onDrawn():void{ _mcVisible = true; } protected function _onGenerateAsset():void{ } public function get assetClass():Class{ return (_assetClass); } protected function _animate(_arg1:String):void{ if (!_isAssetComplex){ _asset.gotoAndStop(_arg1); return; }; _asset.animate(_arg1); } public function get asset():MovieClip{ return (_asset); } protected function get _defaultAsset():Class{ return (BasicAsset); } override public function cleanUp():void{ super.cleanUp(); if (_isAssetMC){ return; }; _asset.cleanUp(); } } }//package com.workinman.paradise2.world.entitys
Section 82
//Renderable (com.workinman.paradise2.world.entitys.Renderable) package com.workinman.paradise2.world.entitys { import flash.events.*; import com.workinman.paradise2.*; import com.workinman.lib.math.*; import com.workinman.paradise2.world.camera.*; import com.workinman.lib.utils.*; import com.workinman.paradise2.events.*; public class Renderable extends Element { protected var _displayWidth:Number; protected var _displayHeight:Number; protected var _worldRoom:EventDispatcher; protected var _halfDisplayHeight:Number; protected var _renderVisibility:Function; protected var _displayCenter:WorkinPoint; protected var _depth:Number; protected var _halfDisplayWidth:Number; protected var _isOnscreen:Boolean; protected var _mcVisible:Boolean; protected var _viewRoom:EventDispatcher; public function Renderable(_arg1:Object){ super(_arg1); _registerEventRooms(); _isOnscreen = false; _mcVisible = false; _displayWidth = 0; _displayHeight = 0; _halfDisplayWidth = 0; _halfDisplayHeight = 0; _displayCenter = new WorkinPoint(); _worldRoom.addEventListener(ParadiseConfig.EVENT_RENDER_FROM_CAMERA, _onRender); _worldRoom.addEventListener(ParadiseConfig.EVENT_CAMERA_CHANGE, _onCameraChange); WorkinDispatcher.instance.addEventListener(ParadiseConfig.EVENT_CLEAN_UP_WORLD, _onCleanUpEvent); _assignRenderVisibility(); } public function get displayHeight():Number{ return (_displayHeight); } public function onDrawn():void{ _mcVisible = true; } protected function get _padDisplayDimensionsForNonCenteredAssets():Boolean{ return (false); } protected function get _isAlwaysVisible():Boolean{ return (false); } public function get halfDisplayHeight():Number{ return (_halfDisplayHeight); } protected function _registerEventRooms():void{ _viewRoom = WorkinDispatcher.getInstance().getRoom(ParadiseConfig.ROOM_VIEW); _worldRoom = WorkinDispatcher.getInstance().getRoom(ParadiseConfig.ROOM_WORLD); } public function get group():String{ return (""); } protected function _draw():void{ _updateDepth(); _viewRoom.dispatchEvent(new EView(ParadiseConfig.EVENT_VIEW_DRAW, this)); } public function get displayWidth():Number{ return (_displayWidth); } public function get isDrawn():Boolean{ return (_mcVisible); } protected function _onRender(_arg1:ECamera):void{ _renderPosition(_arg1.camera); _renderVisibility(_arg1.camera); } public function get doDepthRender():Boolean{ return (false); } protected function _erase():void{ if (_mcVisible){ _viewRoom.dispatchEvent(new EView(ParadiseConfig.EVENT_VIEW_ERASE, this)); }; } public function get displayCenter():WorkinPoint{ return (_displayCenter); } protected function _renderCustomVisibility(_arg1:BaseCamera):void{ } protected function _updateDepth():void{ _depth = _pos.z; } public function onErased():void{ _mcVisible = false; } protected function _recalculateDimensions():void{ if (_automaticallyDetermineDisplayDimensions){ _displayWidth = width; _displayHeight = height; if (_padDisplayDimensionsForNonCenteredAssets){ _halfDisplayWidth = width; _halfDisplayHeight = height; } else { _halfDisplayWidth = (width / 2); _halfDisplayHeight = (height / 2); }; } else { _halfDisplayWidth = (_displayWidth / 2); _halfDisplayHeight = (_displayHeight / 2); }; _recalculateDisplayCenter(); } public function get depth():Number{ return (_depth); } protected function _recalculateDisplayCenter(_arg1:String=""):void{ switch (((_arg1)!="") ? _arg1 : _assetRegistrationPoint){ case "br": _displayCenter.to(-(_halfDisplayWidth), -(_halfDisplayHeight)); break; case "bc": _displayCenter.to(0, -(_halfDisplayHeight)); break; case "bl": _displayCenter.to(_halfDisplayWidth, -(_halfDisplayHeight)); break; case "cr": _displayCenter.to(-(_halfDisplayWidth), 0); break; case "cl": _displayCenter.to(_halfDisplayWidth, 0); break; case "tr": _displayCenter.to(-(_halfDisplayWidth), _halfDisplayHeight); break; case "tc": _displayCenter.to(0, _halfDisplayHeight); break; case "tl": _displayCenter.to(_halfDisplayWidth, _halfDisplayHeight); break; case "cc": default: _displayCenter.to(0, 0); break; }; } protected function get _useCustomVisibility():Boolean{ return (false); } override public function cleanUp():void{ super.cleanUp(); _erase(); _worldRoom.removeEventListener(ParadiseConfig.EVENT_CAMERA_CHANGE, _onCameraChange); _worldRoom.removeEventListener(ParadiseConfig.EVENT_RENDER_FROM_CAMERA, _onRender); WorkinDispatcher.instance.removeEventListener(ParadiseConfig.EVENT_CLEAN_UP_WORLD, _onCleanUpEvent); } private function _onCleanUpEvent(_arg1:Event):void{ cleanUp(); } protected function _onCameraChange(_arg1:ECamera):void{ _onRender(_arg1); } private function _renderAlwaysVisibility(_arg1:BaseCamera):void{ if (!_mcVisible){ _draw(); }; } protected function get _automaticallyDetermineDisplayDimensions():Boolean{ return (true); } protected function get _assetRegistrationPoint():String{ return ("cc"); } private function _renderCameraVisibility(_arg1:BaseCamera):void{ _isOnscreen = _arg1.isOnscreen(this); if (((_isOnscreen) && (!(_mcVisible)))){ _draw(); } else { if (((!(_isOnscreen)) && (_mcVisible))){ _erase(); }; }; } protected function _assignRenderVisibility():void{ if (_isAlwaysVisible){ _renderVisibility = _renderAlwaysVisibility; } else { if (_useCustomVisibility){ _renderVisibility = _renderCustomVisibility; } else { _renderVisibility = _renderCameraVisibility; }; }; } public function get halfDisplayWidth():Number{ return (_halfDisplayWidth); } protected function _renderPosition(_arg1:BaseCamera):void{ x = (_arg1.center.x + (_pos.x - _arg1.x)); y = (_arg1.center.y + (_pos.y - _arg1.y)); } } }//package com.workinman.paradise2.world.entitys
Section 83
//BaseController (com.workinman.paradise2.BaseController) package com.workinman.paradise2 { import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import com.workinman.lib.utils.*; import flash.geom.*; import flash.ui.*; public class BaseController { private var _timeline:MovieClip; private var _mouseRectangle:Rectangle; public function BaseController(_arg1:MovieClip){ _timeline = _arg1; } private function _onMouseClick(_arg1:Event):void{ if (mouseInPlayArea){ WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_MOUSE_CLICK, {x:_timeline.stage.mouseX, y:_timeline.stage.mouseY})); }; } private function _onMouseUp(_arg1:Event):void{ if (mouseInPlayArea){ WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_MOUSE_UP, {x:_timeline.stage.mouseX, y:_timeline.stage.mouseY})); }; } public function activateKeyboardControl(_arg1:MovieClip=null):void{ if (_arg1 == null){ _arg1 = _timeline; }; _arg1.stage.addEventListener(KeyboardEvent.KEY_DOWN, _onKeyDown); _arg1.stage.addEventListener(KeyboardEvent.KEY_UP, _onKeyUp); } private function _onMouseDown(_arg1:Event):void{ if (mouseInPlayArea){ WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_MOUSE_DOWN, {x:_timeline.stage.mouseX, y:_timeline.stage.mouseY})); }; } private function _onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.SPACE){ WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_SPACEBAR, {keyCode:_arg1.keyCode, charCode:_arg1.charCode, ctrlKey:_arg1.ctrlKey, shiftKey:_arg1.shiftKey, altKey:_arg1.altKey})); }; WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_KEY_DOWN, {keyCode:_arg1.keyCode, charCode:_arg1.charCode, ctrlKey:_arg1.ctrlKey, shiftKey:_arg1.shiftKey, altKey:_arg1.altKey})); } public function activateMouseControl(_arg1:MovieClip=null, _arg2:Boolean=false):void{ if (_arg1 == null){ _arg1 = _timeline; }; _mouseRectangle = new Rectangle(ParadiseConfig.SCREEN_OFFSET.x, ParadiseConfig.SCREEN_OFFSET.y, ParadiseConfig.DIMENSIONS.x, ParadiseConfig.DIMENSIONS.y); _arg1.stage.addEventListener(MouseEvent.CLICK, _onMouseClick); if (_arg2){ return; }; _arg1.stage.addEventListener(MouseEvent.MOUSE_UP, _onMouseUp); _arg1.stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown); } public function get mouseInPlayArea():Boolean{ return (_mouseRectangle.contains(_timeline.mouseX, _timeline.mouseY)); } private function _onKeyUp(_arg1:KeyboardEvent):void{ WorkinDispatcher.getInstance().dispatchEvent(new EData(ParadiseConfig.EVENT_KEY_UP, {keyCode:_arg1.keyCode, charCode:_arg1.charCode, ctrlKey:_arg1.ctrlKey, shiftKey:_arg1.shiftKey, altKey:_arg1.altKey})); } } }//package com.workinman.paradise2
Section 84
//BaseEngine (com.workinman.paradise2.BaseEngine) package com.workinman.paradise2 { import com.workinman.lib.sound.*; import com.workinman.paradise2.view.*; import flash.display.*; import flash.text.*; public class BaseEngine { protected var _view:ViewManager; protected var _sound:SoundManager; protected var _control:BaseController; protected var _timeline:BaseTimeline; protected var _debugText:TextField; protected var _configXMLURL:String; protected var _configXML:XML; public function BaseEngine(_arg1:BaseTimeline){ _generate(_arg1); } public function clearDebug():void{ _debugText.text = ""; } protected function _addEventListeners():void{ } protected function _beginEngine():void{ } public function get sound():SoundManager{ return (_sound); } public function debug(_arg1:String):void{ if (!_DEBUG){ return; }; if (_debugText == null){ _generateDebugField(); _debugText.text = "<[[ Debugger initialized ]]>"; }; _debugText.appendText("\n"); _debugText.appendText(_arg1); } protected function _generate(_arg1:BaseTimeline):void{ _timeline = _arg1; _addEventListeners(); if (_timeline.configurl != null){ _configXMLURL = _timeline.configurl; } else { _configXMLURL = ""; }; _generateState(); _generateSounds(); _generateControls(); _generateView(); _generateUI(); } protected function _removeEventListeners():void{ } protected function _generateView():void{ var _local1:MovieClip = new MovieClip(); _view = new ViewManager(_local1); _timeline.addChild(_local1); } protected function _generateDebugField():void{ _debugText = new TextField(); _debugText.width = (ParadiseConfig.SCREEN_WIDTH - 70); _debugText.height = (ParadiseConfig.SCREEN_HEIGHT - 70); _debugText.x = 50; _debugText.y = 50; _debugText.textColor = 0xFFFFFF; _timeline.addChild(_debugText); } protected function _generateState():void{ } public function get control():BaseController{ return (_control); } public function get view():ViewManager{ return (_view); } protected function _generateControls():void{ _control = new BaseController(_timeline); _control.activateMouseControl(); _control.activateKeyboardControl(); } protected function _generateUI():void{ } protected function get _DEBUG():Boolean{ return (false); } protected function _generateSounds():void{ _sound = GlobalSound.getInstance(); } } }//package com.workinman.paradise2
Section 85
//BaseTimeline (com.workinman.paradise2.BaseTimeline) package com.workinman.paradise2 { import flash.display.*; public class BaseTimeline extends MovieClip { public var game_container:MovieClip; public var ui_container:MovieClip; public var transition_container:MovieClip; public var configurl:String; public function BaseTimeline():void{ _generate(); } protected function _begin():void{ transition_container = new MovieClip(); ui_container = new MovieClip(); game_container = new MovieClip(); addChild(game_container); addChild(ui_container); addChild(transition_container); } protected function _generate():void{ } } }//package com.workinman.paradise2
Section 86
//ParadiseConfig (com.workinman.paradise2.ParadiseConfig) package com.workinman.paradise2 { import com.workinman.lib.math.*; public class ParadiseConfig { public static var EVENT_KEY_UP:String = "paraOnKeyUp"; public static var EVENT_MOUSE_DOWN:String = "paraOnMouseDown"; public static var EVENT_CAMERA_CHANGE:String = "paraCameraChange"; public static var ROOM_VIEW:String = "view"; public static var EVENT_Z_SORT_ALL:String = "paraZSortAll"; protected static var _SCREEN_CENTER:WorkinPoint; public static var ROOM_WORLD:String = "world"; public static var EVENT_RENDER_FROM_CAMERA:String = "paraCameraRender"; public static var EVENT_CLEAN_UP_WORLD:String = "paraCleanUpWorld"; public static var EVENT_VIEW_DRAW:String = "paraViewDraw"; public static var ROOM_ENGINE:String = "engine"; public static var EVENT_Z_SORT_GROUP:String = "paraZSortGroup"; public static var EVENT_MOUSE_UP:String = "paraOnMouseUp"; protected static var _SCREEN_OFFSET:WorkinPoint; public static var EVENT_KEY_DOWN:String = "paraOnKeyDown"; public static var EVENT_VIEW_ERASE:String = "paraViewErase"; public static var ROOM_CONTROL:String = "control"; protected static var _SCREEN_HEIGHT:Number = 400; protected static var _DIMENSIONS:WorkinPoint; public static var EVENT_MOUSE_CLICK:String = "paraOnMouseClick"; protected static var _SCREEN_WIDTH:Number = 600; public static var EVENT_SPACEBAR:String = "paraOnSpacebar"; public function ParadiseConfig():void{ } public static function get SCREEN_CENTER():WorkinPoint{ if (_SCREEN_CENTER == null){ _SCREEN_CENTER = new WorkinPoint(((_SCREEN_WIDTH / 2) + _SCREEN_OFFSET.x), ((_SCREEN_HEIGHT / 2) + _SCREEN_OFFSET.y)); }; return (_SCREEN_CENTER); } public static function set SCREEN_OFFSET(_arg1:WorkinPoint):void{ _SCREEN_OFFSET = _arg1.copy(); } public static function get SCREEN_WIDTH():Number{ return (_SCREEN_WIDTH); } public static function set SCREEN_CENTER(_arg1:WorkinPoint):void{ _SCREEN_CENTER = _arg1.copy(); } public static function set DIMENSIONS(_arg1:WorkinPoint):void{ _SCREEN_WIDTH = _arg1.x; _SCREEN_HEIGHT = _arg1.y; _SCREEN_OFFSET = new WorkinPoint(0, 0, 0); } public static function get SCREEN_OFFSET():WorkinPoint{ return (_SCREEN_OFFSET); } public static function get DIMENSIONS():WorkinPoint{ if (_DIMENSIONS == null){ _DIMENSIONS = new WorkinPoint(_SCREEN_WIDTH, _SCREEN_HEIGHT); }; return (_DIMENSIONS); } public static function get SCREEN_HEIGHT():Number{ return (_SCREEN_HEIGHT); } public static function get SCREEN_BOTTOM():Number{ return ((_SCREEN_OFFSET.y + _SCREEN_HEIGHT)); } public static function get SCREEN_TOP():Number{ return (_SCREEN_OFFSET.y); } public static function get SCREEN_RIGHT():Number{ return ((_SCREEN_OFFSET.x + _SCREEN_WIDTH)); } public static function get SCREEN_LEFT():Number{ return (_SCREEN_OFFSET.x); } } }//package com.workinman.paradise2
Section 87
//_preload_1 (spongebob_ghostly_gold_fla._preload_1) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class _preload_1 extends MovieClip { public function _preload_1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 88
//bob_down_squish_67 (spongebob_ghostly_gold_fla.bob_down_squish_67) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class bob_down_squish_67 extends MovieClip { public function bob_down_squish_67(){ addFrameScript(4, frame5); } function frame5(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 89
//bob_up_squish_65 (spongebob_ghostly_gold_fla.bob_up_squish_65) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class bob_up_squish_65 extends MovieClip { public function bob_up_squish_65(){ addFrameScript(3, frame4); } function frame4(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 90
//copper_dubloon_vanish_70 (spongebob_ghostly_gold_fla.copper_dubloon_vanish_70) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class copper_dubloon_vanish_70 extends MovieClip { public function copper_dubloon_vanish_70(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 91
//ghost_pirate_body_36 (spongebob_ghostly_gold_fla.ghost_pirate_body_36) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class ghost_pirate_body_36 extends MovieClip { public function ghost_pirate_body_36(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 92
//gold_dubloon_vanish_74 (spongebob_ghostly_gold_fla.gold_dubloon_vanish_74) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class gold_dubloon_vanish_74 extends MovieClip { public function gold_dubloon_vanish_74(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 93
//intro_sponge_scare_loop_33 (spongebob_ghostly_gold_fla.intro_sponge_scare_loop_33) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class intro_sponge_scare_loop_33 extends MovieClip { public function intro_sponge_scare_loop_33(){ addFrameScript(122, frame123); } function frame123(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 94
//MainTimeline (spongebob_ghostly_gold_fla.MainTimeline) package spongebob_ghostly_gold_fla { import com.nick.spongebob.pirate_bounce.*; import com.workinman.lib.events.*; import flash.events.*; import flash.display.*; import com.workinman.lib.utils.*; public dynamic class MainTimeline extends MovieClip { public var tTimeline:GameTimeline; public var tLoader:MovieClip; public var tRatio:Number; public function MainTimeline(){ addFrameScript(0, frame1, 4, frame5); } function frame1(){ tLoader = new AssetLoader(); addChild(tLoader); Updater.instance.addEventListener(Updater.EVENT_UPDATE, _update); stop(); } public function _update(_arg1:EUpdate):void{ tRatio = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal); if (tRatio == 0){ tRatio = 0.01; }; tLoader.gotoAndStop(Math.ceil((tRatio * 100))); if (tRatio == 1){ gotoAndStop(5); Updater.instance.removeEventListener(Updater.EVENT_UPDATE, _update); removeChild(tLoader); }; } function frame5(){ tTimeline = new GameTimeline(); addChild(tTimeline); WorkinDispatcher.instance.dispatchEvent(new Event(GameConfig.EVENT_ENGINE_INIT_REQUEST)); stop(); } } }//package spongebob_ghostly_gold_fla
Section 95
//patrick_downsquish_112 (spongebob_ghostly_gold_fla.patrick_downsquish_112) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class patrick_downsquish_112 extends MovieClip { public function patrick_downsquish_112(){ addFrameScript(2, frame3); } function frame3(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 96
//patrick_up_squish_110 (spongebob_ghostly_gold_fla.patrick_up_squish_110) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class patrick_up_squish_110 extends MovieClip { public function patrick_up_squish_110(){ addFrameScript(3, frame4); } function frame4(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 97
//silver_dubloon_vanish_72 (spongebob_ghostly_gold_fla.silver_dubloon_vanish_72) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class silver_dubloon_vanish_72 extends MovieClip { public function silver_dubloon_vanish_72(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 98
//special_dubloon_vanish_77 (spongebob_ghostly_gold_fla.special_dubloon_vanish_77) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class special_dubloon_vanish_77 extends MovieClip { public function special_dubloon_vanish_77(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 99
//timer_anim_98 (spongebob_ghostly_gold_fla.timer_anim_98) package spongebob_ghostly_gold_fla { import flash.display.*; public dynamic class timer_anim_98 extends MovieClip { public function timer_anim_98(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package spongebob_ghostly_gold_fla
Section 100
//AssetBackground (AssetBackground) package { import flash.display.*; public dynamic class AssetBackground extends MovieClip { } }//package
Section 101
//AssetBoat (AssetBoat) package { import flash.display.*; public dynamic class AssetBoat extends MovieClip { } }//package
Section 102
//AssetForeground (AssetForeground) package { import flash.display.*; public dynamic class AssetForeground extends MovieClip { } }//package
Section 103
//AssetGhost (AssetGhost) package { import flash.display.*; public dynamic class AssetGhost extends MovieClip { public function AssetGhost(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 104
//AssetLoader (AssetLoader) package { import flash.display.*; public dynamic class AssetLoader extends MovieClip { public function AssetLoader(){ addFrameScript(99, frame100); } function frame100(){ stop(); } } }//package
Section 105
//AssetParticleCoin (AssetParticleCoin) package { import flash.display.*; public dynamic class AssetParticleCoin extends MovieClip { public function AssetParticleCoin(){ addFrameScript(6, frame7); } function frame7(){ stop(); } } }//package
Section 106
//AssetParticleGhost (AssetParticleGhost) package { import flash.display.*; public dynamic class AssetParticleGhost extends MovieClip { public function AssetParticleGhost(){ addFrameScript(12, frame13); } function frame13(){ stop(); } } }//package
Section 107
//AssetParticleSparkle (AssetParticleSparkle) package { import flash.display.*; public dynamic class AssetParticleSparkle extends MovieClip { public function AssetParticleSparkle(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package
Section 108
//AssetPatrick (AssetPatrick) package { import flash.display.*; public dynamic class AssetPatrick extends MovieClip { public var anim:MovieClip; public function AssetPatrick(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 109
//AssetPickup (AssetPickup) package { import flash.display.*; public dynamic class AssetPickup extends MovieClip { } }//package
Section 110
//AssetPickupCopper (AssetPickupCopper) package { import flash.display.*; public dynamic class AssetPickupCopper extends MovieClip { public var anim:MovieClip; } }//package
Section 111
//AssetPickupGold (AssetPickupGold) package { import flash.display.*; public dynamic class AssetPickupGold extends MovieClip { public var anim:MovieClip; } }//package
Section 112
//AssetPickupSilver (AssetPickupSilver) package { import flash.display.*; public dynamic class AssetPickupSilver extends MovieClip { public var anim:MovieClip; } }//package
Section 113
//AssetPickupSpecial (AssetPickupSpecial) package { import flash.display.*; public dynamic class AssetPickupSpecial extends MovieClip { public var anim:MovieClip; } }//package
Section 114
//AssetScore (AssetScore) package { import flash.display.*; import flash.text.*; public dynamic class AssetScore extends MovieClip { public var txt:TextField; } }//package
Section 115
//AssetSpongebob (AssetSpongebob) package { import flash.display.*; public dynamic class AssetSpongebob extends MovieClip { public var anim:MovieClip; public function AssetSpongebob(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 116
//AssetTimeBonusGreen (AssetTimeBonusGreen) package { import flash.display.*; import flash.text.*; public dynamic class AssetTimeBonusGreen extends MovieClip { public var txt:TextField; } }//package
Section 117
//AssetTimeBonusRed (AssetTimeBonusRed) package { import flash.display.*; import flash.text.*; public dynamic class AssetTimeBonusRed extends MovieClip { public var txt:TextField; } }//package
Section 118
//AssetTimer (AssetTimer) package { import flash.display.*; public dynamic class AssetTimer extends MovieClip { public var timer_mc:MovieClip; } }//package
Section 119
//AssetTimeUp (AssetTimeUp) package { import flash.display.*; public dynamic class AssetTimeUp extends MovieClip { public function AssetTimeUp(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package
Section 120
//buttondown (buttondown) package { import flash.media.*; public dynamic class buttondown extends Sound { } }//package
Section 121
//buttonover (buttonover) package { import flash.media.*; public dynamic class buttonover extends Sound { } }//package
Section 122
//coin1 (coin1) package { import flash.media.*; public dynamic class coin1 extends Sound { } }//package
Section 123
//coin2 (coin2) package { import flash.media.*; public dynamic class coin2 extends Sound { } }//package
Section 124
//coin3 (coin3) package { import flash.media.*; public dynamic class coin3 extends Sound { } }//package
Section 125
//coin4 (coin4) package { import flash.media.*; public dynamic class coin4 extends Sound { } }//package
Section 126
//floorcreak06 (floorcreak06) package { import flash.media.*; public dynamic class floorcreak06 extends Sound { } }//package
Section 127
//floorcreak08 (floorcreak08) package { import flash.media.*; public dynamic class floorcreak08 extends Sound { } }//package
Section 128
//GameScoreUI (GameScoreUI) package { import com.nick.spongebob.pirate_bounce.ui.displays.*; public dynamic class GameScoreUI extends ScoreDisplay { } }//package
Section 129
//ghost_screecher_01 (ghost_screecher_01) package { import flash.media.*; public dynamic class ghost_screecher_01 extends Sound { } }//package
Section 130
//monster_laugh01 (monster_laugh01) package { import flash.media.*; public dynamic class monster_laugh01 extends Sound { } }//package
Section 131
//PayoffScore (PayoffScore) package { import com.nick.spongebob.pirate_bounce.ui.displays.*; public dynamic class PayoffScore extends ScoreDisplay { } }//package
Section 132
//power_up (power_up) package { import flash.media.*; public dynamic class power_up extends Sound { } }//package

Library Items

Symbol 1 Sound {coin3}Used by:297
Symbol 2 Sound {buttondown}Used by:297
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:5
Symbol 5 MovieClipUses:4Used by:15
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:15 67
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClipUses:8Used by:11 12 13 14
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:9 10Used by:15 214 215 235
Symbol 12 MovieClipUses:9Used by:15 163 205 206
Symbol 13 MovieClipUses:9Used by:15 163 208 209
Symbol 14 MovieClipUses:9Used by:15 163 211 212
Symbol 15 MovieClip {AssetLoader}Uses:5 7 11 12 13 14
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18 22
Symbol 18 MovieClipUses:17Used by:22
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClipUses:19Used by:22 154 162
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle}Uses:18 17 20 21Used by:225
Symbol 23 BitmapUsed by:24
Symbol 24 GraphicUses:23Used by:25
Symbol 25 MovieClipUses:24Used by:46
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:46
Symbol 28 FontUsed by:29 30 33 72 160 221 236 238 241 243
Symbol 29 TextUses:28Used by:46
Symbol 30 TextUses:28Used by:46
Symbol 31 FontUsed by:32 34 35 74 75 161 222
Symbol 32 TextUses:31Used by:46
Symbol 33 TextUses:28Used by:46
Symbol 34 TextUses:31Used by:46
Symbol 35 TextUses:31Used by:46
Symbol 36 GraphicUsed by:40
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:40
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:36 38 39Used by:43 44 45
Symbol 41 GraphicUsed by:42 84
Symbol 42 MovieClipUses:41Used by:44 45
Symbol 43 MovieClipUses:40Used by:44 45
Symbol 44 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SplashPlayButton}Uses:40 42 43Used by:46 162
Symbol 45 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.HelpPlayButton}Uses:40 42 43Used by:46
Symbol 46 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Help}Uses:25 27 29 30 32 33 34 35 44 45Used by:298
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:53 87
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:51
Symbol 51 MovieClipUses:50Used by:52
Symbol 52 MovieClipUses:51Used by:53 162
Symbol 53 MovieClip {AssetBackground}Uses:48 52Used by:86
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:56
Symbol 56 MovieClipUses:55Used by:86 162
Symbol 57 GraphicUsed by:86
Symbol 58 MovieClipUsed by:86
Symbol 59 BitmapUsed by:60
Symbol 60 GraphicUses:59Used by:61
Symbol 61 MovieClipUses:60Used by:86 220
Symbol 62 GraphicUsed by:86
Symbol 63 GraphicUsed by:66
Symbol 64 GraphicUsed by:66
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:63 64 65Used by:86
Symbol 67 MovieClipUses:7Used by:86
Symbol 68 GraphicUsed by:71
Symbol 69 GraphicUsed by:71
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:68 69 70Used by:86
Symbol 72 TextUses:28Used by:73
Symbol 73 MovieClipUses:72Used by:86
Symbol 74 EditableTextUses:31Used by:76
Symbol 75 TextUses:31Used by:76
Symbol 76 MovieClip {PayoffScore}Uses:74 75Used by:86
Symbol 77 GraphicUsed by:81
Symbol 78 BitmapUsed by:79
Symbol 79 GraphicUses:78Used by:81
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClipUses:77 79 80Used by:85
Symbol 82 FontUsed by:83
Symbol 83 TextUses:82Used by:84
Symbol 84 MovieClipUses:41 83Used by:85
Symbol 85 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.PayoffPlayAgainButton}Uses:81 84Used by:86
Symbol 86 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Results}Uses:53 56 57 58 61 62 66 67 71 73 76 85Used by:298
Symbol 87 MovieClipUses:48Used by:162
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClipUses:88Used by:90
Symbol 90 MovieClipUses:89Used by:91
Symbol 91 MovieClipUses:90Used by:162
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClipUses:92Used by:95 145
Symbol 94 GraphicUsed by:95 145
Symbol 95 MovieClipUses:93 94Used by:145
Symbol 96 Sound {ghost_screecher_01}Used by:145 297
Symbol 97 GraphicUsed by:100
Symbol 98 GraphicUsed by:100
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClip {spongebob_ghostly_gold_fla.ghost_pirate_body_36}Uses:97 98 99Used by:145 228
Symbol 101 GraphicUsed by:145 228
Symbol 102 GraphicUsed by:145 228
Symbol 103 GraphicUsed by:145
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:104Used by:145
Symbol 106 GraphicUsed by:145
Symbol 107 GraphicUsed by:145
Symbol 108 GraphicUsed by:145
Symbol 109 GraphicUsed by:145
Symbol 110 GraphicUsed by:145
Symbol 111 GraphicUsed by:145
Symbol 112 GraphicUsed by:145
Symbol 113 GraphicUsed by:145
Symbol 114 GraphicUsed by:145
Symbol 115 GraphicUsed by:145
Symbol 116 GraphicUsed by:145
Symbol 117 GraphicUsed by:145
Symbol 118 GraphicUsed by:145
Symbol 119 GraphicUsed by:145 228
Symbol 120 GraphicUsed by:121
Symbol 121 MovieClipUses:120Used by:145
Symbol 122 GraphicUsed by:145
Symbol 123 GraphicUsed by:145
Symbol 124 GraphicUsed by:145
Symbol 125 GraphicUsed by:145
Symbol 126 GraphicUsed by:145
Symbol 127 GraphicUsed by:145
Symbol 128 GraphicUsed by:145
Symbol 129 GraphicUsed by:145
Symbol 130 GraphicUsed by:145
Symbol 131 GraphicUsed by:145
Symbol 132 GraphicUsed by:145
Symbol 133 GraphicUsed by:145
Symbol 134 ShapeTweeningUsed by:145
Symbol 135 GraphicUsed by:143
Symbol 136 GraphicUsed by:138
Symbol 137 GraphicUsed by:138
Symbol 138 MovieClipUses:136 137Used by:143
Symbol 139 GraphicUsed by:140
Symbol 140 MovieClipUses:139Used by:143
Symbol 141 GraphicUsed by:142
Symbol 142 MovieClipUses:141Used by:143
Symbol 143 MovieClipUses:135 138 140 142Used by:145
Symbol 144 Sound {monster_laugh01}Used by:145 297
Symbol 145 MovieClip {spongebob_ghostly_gold_fla.intro_sponge_scare_loop_33}Uses:95 93 94 96 100 101 102 103 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 122 123 124 125 126 127 128 129 130 131 132 133 134 143 144Used by:162
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClipUses:146Used by:162
Symbol 148 FontUsed by:149 155 156 157 158
Symbol 149 TextUses:148Used by:150
Symbol 150 MovieClipUses:149Used by:162
Symbol 151 GraphicUsed by:152
Symbol 152 MovieClipUses:151Used by:162
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClipUses:153 20Used by:162
Symbol 155 TextUses:148Used by:159
Symbol 156 TextUses:148Used by:159
Symbol 157 TextUses:148Used by:159
Symbol 158 TextUses:148Used by:159
Symbol 159 MovieClipUses:155 156 157 158Used by:162
Symbol 160 TextUses:28Used by:162
Symbol 161 TextUses:31Used by:162
Symbol 162 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Splash}Uses:87 52 56 91 20 145 147 150 152 154 159 44 160 161Used by:298
Symbol 163 MovieClip {com.nick.spongebob.pirate_bounce.ui.displays.ResultCoin}Uses:14 13 12Used by:298
Symbol 164 GraphicUsed by:169
Symbol 165 BitmapUsed by:166
Symbol 166 GraphicUses:165Used by:167
Symbol 167 MovieClipUses:166Used by:169
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:164 167 168Used by:180
Symbol 170 GraphicUsed by:180
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:173
Symbol 173 MovieClipUses:172Used by:180
Symbol 174 GraphicUsed by:180
Symbol 175 GraphicUsed by:176
Symbol 176 MovieClipUses:175Used by:179
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:177Used by:179
Symbol 179 MovieClipUses:176 178Used by:180
Symbol 180 MovieClipUses:169 170 173 174 179Used by:181
Symbol 181 MovieClip {AssetBoat}Uses:180Used by:298
Symbol 182 GraphicUsed by:183
Symbol 183 MovieClipUses:182Used by:203
Symbol 184 GraphicUsed by:188
Symbol 185 GraphicUsed by:188
Symbol 186 GraphicUsed by:188
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClipUses:184 185 186 187Used by:203
Symbol 189 GraphicUsed by:190
Symbol 190 MovieClipUses:189Used by:203
Symbol 191 GraphicUsed by:194
Symbol 192 GraphicUsed by:194
Symbol 193 GraphicUsed by:194
Symbol 194 MovieClip {spongebob_ghostly_gold_fla.bob_up_squish_65}Uses:191 192 193Used by:203
Symbol 195 GraphicUsed by:196
Symbol 196 MovieClipUses:195Used by:203
Symbol 197 GraphicUsed by:202
Symbol 198 GraphicUsed by:202
Symbol 199 GraphicUsed by:202
Symbol 200 GraphicUsed by:202
Symbol 201 GraphicUsed by:202
Symbol 202 MovieClip {spongebob_ghostly_gold_fla.bob_down_squish_67}Uses:197 198 199 200 201Used by:203
Symbol 203 MovieClip {AssetSpongebob}Uses:183 188 190 194 196 202Used by:298
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClip {spongebob_ghostly_gold_fla.copper_dubloon_vanish_70}Uses:12 204Used by:206
Symbol 206 MovieClip {AssetPickupCopper}Uses:12 205Used by:216
Symbol 207 GraphicUsed by:208
Symbol 208 MovieClip {spongebob_ghostly_gold_fla.silver_dubloon_vanish_72}Uses:13 207Used by:209
Symbol 209 MovieClip {AssetPickupSilver}Uses:13 208Used by:216
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClip {spongebob_ghostly_gold_fla.gold_dubloon_vanish_74}Uses:14 210Used by:212
Symbol 212 MovieClip {AssetPickupGold}Uses:14 211Used by:216
Symbol 213 GraphicUsed by:214
Symbol 214 MovieClip {spongebob_ghostly_gold_fla.special_dubloon_vanish_77}Uses:11 213Used by:215
Symbol 215 MovieClip {AssetPickupSpecial}Uses:11 214Used by:216 224
Symbol 216 MovieClip {AssetPickup}Uses:206 209 212 215Used by:298
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:219
Symbol 219 MovieClipUses:218Used by:220
Symbol 220 MovieClip {AssetForeground}Uses:61 219Used by:298
Symbol 221 TextUses:28Used by:225
Symbol 222 EditableTextUses:31Used by:223
Symbol 223 MovieClip {GameScoreUI}Uses:222Used by:225
Symbol 224 MovieClip {com.nick.spongebob.pirate_bounce.ui.displays.TokenDisplay}Uses:215Used by:225
Symbol 225 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Gameplay}Uses:22 221 223 224Used by:298
Symbol 226 GraphicUsed by:228
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClip {AssetGhost}Uses:100 226 102 101 227 119Used by:298
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:229Used by:231
Symbol 231 MovieClip {AssetParticleGhost}Uses:230Used by:298
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClipUses:232Used by:234
Symbol 234 MovieClip {AssetParticleSparkle}Uses:233Used by:298
Symbol 235 MovieClip {AssetParticleCoin}Uses:11Used by:298
Symbol 236 EditableTextUses:28Used by:237
Symbol 237 MovieClip {AssetScore}Uses:236Used by:298
Symbol 238 TextUses:28Used by:239
Symbol 239 MovieClipUses:238Used by:240
Symbol 240 MovieClip {AssetTimeUp}Uses:239Used by:298
Symbol 241 EditableTextUses:28Used by:242
Symbol 242 MovieClip {AssetTimeBonusGreen}Uses:241Used by:298
Symbol 243 EditableTextUses:28Used by:244
Symbol 244 MovieClip {AssetTimeBonusRed}Uses:243Used by:298
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:247
Symbol 247 MovieClipUses:246Used by:248
Symbol 248 MovieClip {spongebob_ghostly_gold_fla.timer_anim_98}Uses:247Used by:251
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClipUses:249Used by:251
Symbol 251 MovieClip {AssetTimer}Uses:248 250Used by:298
Symbol 252 GraphicUsed by:253
Symbol 253 MovieClipUses:252Used by:254
Symbol 254 MovieClipUses:253Used by:261 268 271 278 281 288
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClipUses:255Used by:257 259
Symbol 257 MovieClipUses:256Used by:261 268 271 278 281 288
Symbol 258 GraphicUsed by:261
Symbol 259 MovieClipUses:256Used by:261 268 271 278 281 288
Symbol 260 GraphicUsed by:261
Symbol 261 MovieClipUses:254 257 258 259 260Used by:289
Symbol 262 GraphicUsed by:268
Symbol 263 GraphicUsed by:268
Symbol 264 GraphicUsed by:268
Symbol 265 GraphicUsed by:268
Symbol 266 GraphicUsed by:268
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:257 254 262 259 263 264 265 266 267Used by:289
Symbol 269 GraphicUsed by:271
Symbol 270 GraphicUsed by:271
Symbol 271 MovieClipUses:257 254 269 259 270Used by:289
Symbol 272 GraphicUsed by:278
Symbol 273 GraphicUsed by:278
Symbol 274 GraphicUsed by:278
Symbol 275 GraphicUsed by:278
Symbol 276 GraphicUsed by:278
Symbol 277 GraphicUsed by:278
Symbol 278 MovieClip {spongebob_ghostly_gold_fla.patrick_up_squish_110}Uses:257 254 272 259 273 274 275 276 277Used by:289
Symbol 279 GraphicUsed by:281
Symbol 280 GraphicUsed by:281
Symbol 281 MovieClipUses:257 254 279 259 280Used by:289
Symbol 282 GraphicUsed by:288
Symbol 283 GraphicUsed by:288
Symbol 284 GraphicUsed by:288
Symbol 285 GraphicUsed by:288
Symbol 286 GraphicUsed by:288
Symbol 287 GraphicUsed by:288
Symbol 288 MovieClip {spongebob_ghostly_gold_fla.patrick_downsquish_112}Uses:257 254 282 259 283 284 285 286 287Used by:289
Symbol 289 MovieClip {AssetPatrick}Uses:261 268 271 278 281 288Used by:298
Symbol 290 Sound {power_up}Used by:297
Symbol 291 Sound {buttonover}Used by:297
Symbol 292 Sound {coin4}Used by:297
Symbol 293 Sound {coin2}Used by:297
Symbol 294 Sound {coin1}Used by:297
Symbol 295 Sound {floorcreak08}Used by:297
Symbol 296 Sound {floorcreak06}Used by:297
Symbol 297 MovieClipUses:290 291 2 144 96 292 1 293 294 295 296Used by:298  Timeline
Symbol 298 MovieClip {spongebob_ghostly_gold_fla._preload_1}Uses:46 86 162 163 181 203 216 220 225 228 231 234 235 237 240 242 244 251 289 297Used by:Timeline

Instance Names

"glow_mc"Symbol 22 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle} Frame 1Symbol 18 MovieClip
"icon_mc"Symbol 22 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle} Frame 1Symbol 17 MovieClip
"txt"Symbol 76 MovieClip {PayoffScore} Frame 1Symbol 74 EditableText
"farcontainer_mc"Symbol 86 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Results} Frame 1Symbol 58 MovieClip
"nearcontainer_mc"Symbol 86 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Results} Frame 1Symbol 58 MovieClip
"anim"Symbol 203 MovieClip {AssetSpongebob} Frame 2Symbol 188 MovieClip
"anim"Symbol 203 MovieClip {AssetSpongebob} Frame 4Symbol 194 MovieClip {spongebob_ghostly_gold_fla.bob_up_squish_65}
"anim"Symbol 203 MovieClip {AssetSpongebob} Frame 6Symbol 202 MovieClip {spongebob_ghostly_gold_fla.bob_down_squish_67}
"anim"Symbol 206 MovieClip {AssetPickupCopper} Frame 2Symbol 205 MovieClip {spongebob_ghostly_gold_fla.copper_dubloon_vanish_70}
"anim"Symbol 209 MovieClip {AssetPickupSilver} Frame 2Symbol 208 MovieClip {spongebob_ghostly_gold_fla.silver_dubloon_vanish_72}
"anim"Symbol 212 MovieClip {AssetPickupGold} Frame 2Symbol 211 MovieClip {spongebob_ghostly_gold_fla.gold_dubloon_vanish_74}
"anim"Symbol 215 MovieClip {AssetPickupSpecial} Frame 2Symbol 214 MovieClip {spongebob_ghostly_gold_fla.special_dubloon_vanish_77}
"txt"Symbol 223 MovieClip {GameScoreUI} Frame 1Symbol 222 EditableText
"txt"Symbol 237 MovieClip {AssetScore} Frame 1Symbol 236 EditableText
"txt"Symbol 242 MovieClip {AssetTimeBonusGreen} Frame 1Symbol 241 EditableText
"txt"Symbol 244 MovieClip {AssetTimeBonusRed} Frame 1Symbol 243 EditableText
"timer_mc"Symbol 251 MovieClip {AssetTimer} Frame 1Symbol 248 MovieClip {spongebob_ghostly_gold_fla.timer_anim_98}
"anim"Symbol 289 MovieClip {AssetPatrick} Frame 2Symbol 268 MovieClip
"anim"Symbol 289 MovieClip {AssetPatrick} Frame 4Symbol 278 MovieClip {spongebob_ghostly_gold_fla.patrick_up_squish_110}
"anim"Symbol 289 MovieClip {AssetPatrick} Frame 6Symbol 288 MovieClip {spongebob_ghostly_gold_fla.patrick_downsquish_112}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""

Labels

"off"Symbol 22 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle} Frame 1
"on"Symbol 22 MovieClip {com.nick.spongebob.pirate_bounce.ui.buttons.SoundToggle} Frame 2
"in"Symbol 86 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Results} Frame 1
"in"Symbol 162 MovieClip {com.nick.spongebob.pirate_bounce.ui.screens.Splash} Frame 1
"idle"Symbol 203 MovieClip {AssetSpongebob} Frame 1
"jump up"Symbol 203 MovieClip {AssetSpongebob} Frame 2
"up"Symbol 203 MovieClip {AssetSpongebob} Frame 3
"up squish"Symbol 203 MovieClip {AssetSpongebob} Frame 4
"down"Symbol 203 MovieClip {AssetSpongebob} Frame 5
"down squish"Symbol 203 MovieClip {AssetSpongebob} Frame 6
"idle"Symbol 206 MovieClip {AssetPickupCopper} Frame 1
"vanish"Symbol 206 MovieClip {AssetPickupCopper} Frame 2
"idle"Symbol 209 MovieClip {AssetPickupSilver} Frame 1
"vanish"Symbol 209 MovieClip {AssetPickupSilver} Frame 2
"idle"Symbol 212 MovieClip {AssetPickupGold} Frame 1
"vanish"Symbol 212 MovieClip {AssetPickupGold} Frame 2
"idle"Symbol 215 MovieClip {AssetPickupSpecial} Frame 1
"vanish"Symbol 215 MovieClip {AssetPickupSpecial} Frame 2
"idle"Symbol 289 MovieClip {AssetPatrick} Frame 1
"jump up"Symbol 289 MovieClip {AssetPatrick} Frame 2
"up"Symbol 289 MovieClip {AssetPatrick} Frame 3
"up squish"Symbol 289 MovieClip {AssetPatrick} Frame 4
"down"Symbol 289 MovieClip {AssetPatrick} Frame 5
"down squish"Symbol 289 MovieClip {AssetPatrick} Frame 6




http://swfchan.com/23/112360/info.shtml
Created: 12/3 -2019 10:21:14 Last modified: 12/3 -2019 10:21:14 Server time: 22/12 -2024 08:46:12