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

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

Baby-Care-Game.swf

This is the info page for
Flash #119064

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


Text
<p align="left"><font face="_sans" size="14" color="#e883b1" letterSpacing="0.000000" kerning="1">Loading... 00%</font></p>

MENU

SOUND

OFF

ON

HELP

Created by Csharks

Are you good with babies? Your job is to
look after the babies and fulfill their needs
such as bath, nappy, food and medicine. If
you ignore or don’t satisfy them, you will
lose points. Do your best for getting the best
score.
You can use these points to upgrade the day
care center – it means to make your job
easy and achieve the targets!
Try to treat all the babies equally! Use your
mouse to move and interact.

CASH REQUIRED

TIME

TOTAL CASH

s

h

a

r

e

g

m

s

h

a

r

e

g

m

ActionScript [AS3]

Section 1
//Debug (com.carlcalderon.arthropod.Debug) package com.carlcalderon.arthropod { import flash.events.*; import flash.display.*; import flash.system.*; import flash.geom.*; import flash.net.*; public class Debug { private static const MEMORY_OPERATION:String = "debugMemory"; public static const NAME:String = "Debug"; private static const ERROR_OPERATION:String = "debugError"; private static const CLEAR_OPERATION:String = "debugClear"; private static const BITMAP_OPERATION:String = "debugBitmapData"; public static const VERSION:String = "0.74"; private static const TYPE:String = "app"; private static const ARRAY_OPERATION:String = "debugArray"; private static const DOMAIN:String = "com.carlcalderon.Arthropod"; private static const OBJECT_OPERATION:String = "debugObject"; private static const WARNING_OPERATION:String = "debugWarning"; private static const CONNECTION:String = "arthropod"; private static const CHECK:String = ".161E714B6C1A76DE7B9865F88B32FCCE8FABA7B5.1"; private static const LOG_OPERATION:String = "debug"; public static var LIGHT_BLUE:uint = 0xCCCC; public static var secureDomain:String = "*"; public static var password:String = "CDC309AF"; public static var allowLog:Boolean = true; public static var BLUE:uint = 6710988; public static var GREEN:uint = 0xCC00; public static var ignoreStatus:Boolean = true; public static var RED:uint = 0xCC0000; public static var secure:Boolean = false; public static var YELLOW:uint = 0xCCCC00; public static var PINK:uint = 0xCC00CC; private static var lc:LocalConnection = new LocalConnection(); private static var hasEventListeners:Boolean = false; public function Debug(){ super(); } public static function memory():Boolean{ return (send(MEMORY_OPERATION, System.totalMemory, null)); } public static function error(message):Boolean{ return (send(ERROR_OPERATION, String(message), 0xCC0000)); } public static function warning(message):Boolean{ return (send(WARNING_OPERATION, String(message), 0xCCCC00)); } private static function send(operation:String, value, prop):Boolean{ var operation = operation; var value = value; var prop = prop; if (!secure){ lc.allowInsecureDomain("*"); } else { lc.allowDomain(secureDomain); }; if (!hasEventListeners){ if (ignoreStatus){ lc.addEventListener(StatusEvent.STATUS, ignore); } else { lc.addEventListener(StatusEvent.STATUS, status); }; hasEventListeners = true; }; if (allowLog){ lc.send((((((TYPE + "#") + DOMAIN) + CHECK) + ":") + CONNECTION), operation, password, value, prop); return (true); //unresolved jump var _slot1 = e; return (false); }; return (false); } public static function bitmap(bmd, label:String=null):Boolean{ var bm:BitmapData = new BitmapData(100, 100, true, 0xFFFFFF); var mtx:Matrix = new Matrix(); var s:Number = (100 / ((bmd.width)>=bmd.height) ? bmd.width : bmd.height); mtx.scale(s, s); bm.draw(bmd, mtx, null, null, null, true); var bounds:Rectangle = new Rectangle(0, 0, Math.floor((bmd.width * s)), Math.floor((bmd.height * s))); return (send(BITMAP_OPERATION, bm.getPixels(bounds), {bounds:bounds, lbl:label})); } public static function object(obj):Boolean{ return (send(OBJECT_OPERATION, obj, null)); } public static function clear():Boolean{ return (send(CLEAR_OPERATION, 0, 0)); } private static function ignore(e:StatusEvent):void{ } public static function log(message, color:uint=0xFEFEFE):Boolean{ return (send(LOG_OPERATION, String(message), color)); } public static function array(arr:Array):Boolean{ return (send(ARRAY_OPERATION, arr, null)); } public static function snapshot(stage:Stage, label:String=null):Boolean{ if (stage){ return (bitmap(stage, label)); }; return (false); } private static function status(e:StatusEvent):void{ trace(("Arthropod status:\n" + e.toString())); } } }//package com.carlcalderon.arthropod
Section 2
//State (com.csharks.juwalbose.cFlashtory.core.State) package com.csharks.juwalbose.cFlashtory.core { public class State { public var exit:Function; public var _parent:State; public var from:Object; public var name:String; public var enter:Function; public var children:Array; public function State(name:String, from:Object=null, enter:Function=null, exit:Function=null, parent:State=null){ super(); this.name = name; if (!from){ from = "*"; }; this.from = from; this.enter = enter; this.exit = exit; this.children = []; if (parent){ _parent = parent; _parent.children.push(this); }; } public function get parents():Array{ var parentList:Array = []; var parentState:State = _parent; if (parentState){ parentList.push(parentState); while (parentState.parent) { parentState = parentState.parent; parentList.push(parentState); }; }; return (parentList); } public function get root():State{ var parentState:State = _parent; if (parentState){ while (parentState.parent) { parentState = parentState.parent; }; }; return (parentState); } public function toString():String{ return (this.name); } public function get parent():State{ return (_parent); } public function set parent(parent:State):void{ _parent = parent; _parent.children.push(this); } } }//package com.csharks.juwalbose.cFlashtory.core
Section 3
//StateMachine (com.csharks.juwalbose.cFlashtory.core.StateMachine) package com.csharks.juwalbose.cFlashtory.core { import flash.utils.*; import org.osflash.signals.*; public class StateMachine { public var response:Signal; public var path:Array; public var parentState:State; public var _states:Dictionary; public var parentStates:Array; public var _state:String; public var id:String; public function StateMachine(){ response = new Signal(); super(); _states = new Dictionary(); } public function changeState(stateTo:String):void{ var _exitCallbackEvent:Object; var i:int; var _enterCallbackEvent:Object; var k:int; if (!(stateTo in _states)){ trace("[StateMachine]", id, (("Cannot make transition: State " + stateTo) + " is not defined")); return; }; if (!canChangeStateTo(stateTo)){ trace("[StateMachine]", id, (("Transition to " + stateTo) + " denied")); response.dispatch("TRANSITION_DENIED", stateTo, _state, _states[stateTo].from); return; }; path = findPath(_state, stateTo); if (path[0] > 0){ _exitCallbackEvent = new Object(); _exitCallbackEvent.toState = stateTo; _exitCallbackEvent.fromState = _state; _exitCallbackEvent.event = "EXIT_CALLBACK"; _exitCallbackEvent.currentTarget = this; if (_states[_state].exit){ _exitCallbackEvent.currentState = _state; _states[_state].exit.call(null, _exitCallbackEvent); }; parentState = _states[_state]; i = 0; while (i < (path[0] - 1)) { parentState = parentState.parent; if (parentState.exit != null){ _exitCallbackEvent.currentState = parentState.name; parentState.exit.call(null, _exitCallbackEvent); }; i++; }; }; var oldState:String = _state; _state = stateTo; if (path[1] > 0){ _enterCallbackEvent = new Object(); _enterCallbackEvent.toState = stateTo; _enterCallbackEvent.fromState = oldState; _enterCallbackEvent.event = "ENTER_CALLBACK"; _enterCallbackEvent.currentTarget = this; if (_states[stateTo].root){ parentStates = _states[stateTo].parents; k = (path[1] - 2); while (k >= 0) { if (((parentStates[k]) && (parentStates[k].enter))){ _enterCallbackEvent.currentState = parentStates[k].name; parentStates[k].enter.call(null, _enterCallbackEvent); }; k--; }; }; if (_states[_state].enter){ _enterCallbackEvent.currentState = _state; _states[_state].enter.call(null, _enterCallbackEvent); }; }; trace("[StateMachine]", id, ("State Changed to " + _state)); response.dispatch("TRANSITION_COMPLETE", stateTo, oldState); } public function get states():Dictionary{ return (_states); } public function addState(stateName:String, stateData:Object=null):void{ if ((stateName in _states)){ trace("[StateMachine]", id, ("Overriding existing state " + stateName)); }; if (stateData == null){ stateData = {}; }; _states[stateName] = new State(stateName, stateData.from, stateData.enter, stateData.exit, _states[stateData.parent]); } public function get state():String{ return (_states[_state]); } public function canChangeStateTo(stateName:String):Boolean{ return (((!((stateName == _state))) && (((!((_states[stateName].from.indexOf(_state) == -1))) || ((_states[stateName].from == "*")))))); } public function set initialState(stateName:String):void{ var _callbackEvent:Object; var j:int; if ((((_state == null)) && ((stateName in _states)))){ _state = stateName; _callbackEvent = new Object(); _callbackEvent.toState = stateName; _callbackEvent.event = "ENTER_CALLBACK"; _callbackEvent.currentTarget = this; if (_states[_state].root){ parentStates = _states[_state].parents; j = (_states[_state].parents.length - 1); while (j >= 0) { if (parentStates[j].enter){ _callbackEvent.currentState = parentStates[j].name; parentStates[j].enter.call(null, _callbackEvent); }; j--; }; }; if (_states[_state].enter){ _callbackEvent.currentState = _state; _states[_state].enter.call(null, _callbackEvent); }; response.dispatch("TRANSITION_COMPLETE", stateName); }; } public function getStateByName(name:String):State{ var s:State; for each (s in _states) { if (s.name == name){ return (s); }; }; return (null); } public function findPath(stateFrom:String, stateTo:String):Array{ var toState:State; var fromState:State = _states[stateFrom]; var c:int; var d:int; while (fromState) { d = 0; toState = _states[stateTo]; while (toState) { if (fromState == toState){ return ([c, d]); }; d++; toState = toState.parent; }; c++; fromState = fromState.parent; }; return ([c, d]); } } }//package com.csharks.juwalbose.cFlashtory.core
Section 4
//PreloaderG2G (com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G) package com.csharks.juwalbose.cFlashtory.preloaders { import flash.events.*; import com.inruntime.utils.*; import flash.display.*; import flash.utils.*; import flash.net.*; public class PreloaderG2G extends MovieClip { private var PreloaderClip:Class; private var loaderFrames:Number; private var gameVars:Global; private var preloader_mc:MovieClip; public static const ButtonFont:Class = PreloaderG2G_ButtonFont; public static const MenuFont:Class = PreloaderG2G_MenuFont; public function PreloaderG2G(){ PreloaderClip = PreloaderG2G_PreloaderClip; super(); Config.initialise(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; gameVars = Global.getInstance(); gameVars.menuFont = new MenuFont().fontName; gameVars.buttonFont = new ButtonFont().fontName; addEventListener(Event.ENTER_FRAME, checkFrame); loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress); loaderInfo.addEventListener(Event.COMPLETE, proceed); preloader_mc = new PreloaderClip(); preloader_mc.x = (gameVars.stageMiddleX + 70); preloader_mc.y = (gameVars.stageMiddleY - 120); preloader_mc.addEventListener(Event.ADDED_TO_STAGE, addClick); addChild(preloader_mc); loaderFrames = preloader_mc.totalFrames; preloader_mc.gotoAndStop(1); } private function addClick(e:Event):void{ preloader_mc.removeEventListener(Event.ADDED_TO_STAGE, addClick); preloader_mc.fSitebutton.addEventListener(MouseEvent.CLICK, fSiteButtonClicked); } private function fSiteButtonClicked(e:MouseEvent):void{ var urlRequest:URLRequest; var e = e; urlRequest = new URLRequest("http://www.games2girls.com/"); navigateToURL(urlRequest, "_blank"); //unresolved jump var _slot1 = e; } private function progress(e:ProgressEvent):void{ var fLoaded:Number = e.target.bytesLoaded; var fTotal:Number = e.target.bytesTotal; var fPercent:Number = (fLoaded / fTotal); preloader_mc.loaderBase.loaderTxt.text = (("Loading... " + Math.round((fPercent * 100))) + "%"); preloader_mc.loaderBase.logoMask.y = (60 - (fPercent * 70)); } private function proceed(e:Event):void{ loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress); loaderInfo.removeEventListener(Event.COMPLETE, proceed); preloader_mc.loaderBase.loaderTxt.x = -3000; preloader_mc.loaderBase.loaderTxt.y = -3000; preloader_mc.gotoAndPlay(2); } private function checkFrame(e:Event):void{ if (preloader_mc.currentFrame == loaderFrames){ removeEventListener(Event.ENTER_FRAME, checkFrame); startup(); }; } private function startup():void{ var app:Object; removeChild(preloader_mc); nextFrame(); var mainClass:Class = Class(getDefinitionByName(gameVars.gameName)); if (mainClass){ app = new (mainClass); addChild((app as DisplayObject)); }; } } }//package com.csharks.juwalbose.cFlashtory.preloaders
Section 5
//PreloaderG2G_ButtonFont (com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_ButtonFont) package com.csharks.juwalbose.cFlashtory.preloaders { import mx.core.*; public class PreloaderG2G_ButtonFont extends FontAsset { } }//package com.csharks.juwalbose.cFlashtory.preloaders
Section 6
//PreloaderG2G_MenuFont (com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_MenuFont) package com.csharks.juwalbose.cFlashtory.preloaders { import mx.core.*; public class PreloaderG2G_MenuFont extends FontAsset { } }//package com.csharks.juwalbose.cFlashtory.preloaders
Section 7
//PreloaderG2G_PreloaderClip (com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_PreloaderClip) package com.csharks.juwalbose.cFlashtory.preloaders { import flash.display.*; import mx.core.*; public class PreloaderG2G_PreloaderClip extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var n12:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var logoMask:DisplayObject; public var help_Btn:DisplayObject; public var fSitebutton:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var loaderTxt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var loaderBase:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory.preloaders
Section 8
//cFlashtory (com.csharks.juwalbose.cFlashtory.cFlashtory) package com.csharks.juwalbose.cFlashtory { import flash.events.*; import flash.display.*; import com.csharks.juwalbose.utils.ui.*; import com.greensock.*; import flash.utils.*; import com.csharks.juwalbose.cFlashtory.core.*; import mochi.as3.*; import flash.media.*; import com.inruntime.utils.*; import com.senocular.utils.*; import net.hires.debug.*; import com.greensock.easing.*; import com.carlcalderon.arthropod.*; import flash.net.*; public dynamic class cFlashtory extends Sprite { protected var game_mc; protected var Music:Class; protected var GameOver:Class; protected var musicIsPlaying:Boolean;// = false protected var HelpDisplay:Class; protected var gameMusicChannel:SoundChannel; protected var gameVars:Global; protected var creditLogo:Sprite; protected var HelpClip:Class; protected var helpDisplay_mc; protected var help_mc:MovieClip; protected var key:KeyObject; protected var invincibleMode:Boolean;// = false protected var menu:MovieClip; protected var GameWin:Class; protected var gameWin_mc:MovieClip; protected var intro:MovieClip; protected var MenuClip:Class; protected var gameMusic_snd:Sound; protected var TemplateBg:Class; protected var GameClip:Class; protected var gameOver_mc:MovieClip; protected var levelUp_mc:MovieClip; protected var helpDisplayed:Boolean; protected var logo:Sprite; protected var templateMc:MovieClip; protected var LeveUp:Class; protected var gameStats:Stats; protected var focusSoundMute:Boolean; protected var gameSequence:StateMachine; protected var gameEngine:StateMachine; protected var finalCreditText:UiBox; protected var pauseTime:uint; protected var shareBtn:SimpleButton; public function cFlashtory():void{ MenuClip = cFlashtory_MenuClip; HelpClip = cFlashtory_HelpClip; Music = cFlashtory_Music; GameClip = cFlashtory_GameClip; HelpDisplay = cFlashtory_HelpDisplay; LeveUp = cFlashtory_LeveUp; GameOver = cFlashtory_GameOver; GameWin = cFlashtory_GameWin; TemplateBg = cFlashtory_TemplateBg; super(); } protected function highscoresExit(evnt:Object):void{ removeChild(templateMc); } protected function gotoHelpPage(evnth:MouseEvent):void{ gameSequence.changeState("Help"); } protected function levelUpAdded(evnt:Event):void{ } protected function gameoverExit(evnt:Object):void{ Debug.log("game over exit"); SceneManager.removeButton(gameOver_mc, "Play Again", gameOver2Game); if (gameVars.mochiEnabled){ SceneManager.removeButton(gameOver_mc, "Submit Score", submitScore); }; removeChild(gameOver_mc); } protected function menuInit(evnt:Object):void{ var evnt = evnt; Debug.log("menu init"); menu = new MenuClip(); menu.addEventListener(Event.ENTER_FRAME, assignMenu); addChild(menu); if (!musicIsPlaying){ musicIsPlaying = true; gameMusic_snd = new Music(); gameMusicChannel = gameMusic_snd.play(); //unresolved jump var _slot1 = e; gameMusicChannel.addEventListener(Event.SOUND_COMPLETE, musicCompleteHandler); }; } protected function gameHelpExit(evnt:Object=null):void{ Debug.log("game help exit"); SceneManager.removeButton(helpDisplay_mc, "Back to Game", backToGame); helpDisplayed = false; removeChild(helpDisplay_mc); } protected function gameHelpInit(evnt:Object):void{ Debug.log("game help init"); helpDisplayed = true; helpDisplay_mc = new HelpDisplay(); helpDisplay_mc.x = (gameVars.stageMiddleX - (helpDisplay_mc.width / 2)); helpDisplay_mc.y = (gameVars.stageMiddleY - (helpDisplay_mc.height / 2)); helpDisplay_mc.addEventListener(Event.ADDED_TO_STAGE, helpAdded); addChild(helpDisplay_mc); } protected function gameEngineInit(evnt:Object):void{ game_mc = new GameClip(); game_mc.addEventListener(Event.ADDED_TO_STAGE, initGameUI); addChild(game_mc); } protected function clearCanvas():void{ if (helpDisplayed){ gameHelpExit(); }; if (this.hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, action); }; if (stage.hasEventListener(Event.DEACTIVATE)){ stage.removeEventListener(Event.DEACTIVATE, windowNotActive); }; if (stage.hasEventListener(Event.ACTIVATE)){ stage.removeEventListener(Event.ACTIVATE, windowActive); }; key = null; if (gameVars.developerMode){ if (gameStats != null){ removeChild(gameStats); }; gameStats = null; }; SceneManager.removeAllChildren(game_mc); removeChild(game_mc); } protected function levelUpExit(evnt:Object):void{ Debug.log("level up exit"); SceneManager.removeButton(levelUp_mc, "Next Level", levelUp2Game); setVariable("level", String((gameVars.level + 1)), "levelUpExit", "N"); removeChild(levelUp_mc); } protected function windowActive(evnt:Event):void{ Debug.log("Window focus return", Debug.RED); if (!helpDisplayed){ unpauseGame(); }; } protected function pauseGame(evnt:Object=null):void{ removeEventListener(Event.ENTER_FRAME, action); key = null; if (gameVars.developerMode){ removeChild(gameStats); gameStats = null; }; } protected function gameWin2Game(evnt:MouseEvent):void{ gameSequence.changeState("Game"); } protected function menuExit(event:Object):void{ Debug.log("menu exit"); if (logo){ logo.removeEventListener(MouseEvent.CLICK, gotoSite); SceneManager.removeItem(menu, "Logo"); }; if (gameVars.brandUsed != "Csharks"){ if (gameVars.showCredits != null){ SceneManager.removeItem(menu, "CreditText"); creditLogo.removeEventListener(MouseEvent.CLICK, gotoCsharksSite); SceneManager.removeItem(menu, "Credit Logo"); }; }; if (shareBtn){ shareBtn.removeEventListener(MouseEvent.CLICK, postToStream); SceneManager.removeItem(menu, "Share"); }; SceneManager.removeButton(menu, "Start Game", gameStart); SceneManager.removeButton(menu, "Game Help", gotoHelpPage); SceneManager.removeButton(menu, "More Games", gotoSite); if (gameVars.mochiEnabled){ SceneManager.removeButton(menu, "Leaderboard", showHighScores); }; SceneManager.removeMultiStateButton(menu, "Toggle Sound", toggleGlobalSound); removeChild(menu); } protected function gameInit(evnt:Object):void{ gameEngine = new StateMachine(); gameEngine.addState("GameInit", {enter:gameEngineInit}); gameEngine.addState("LevelInit", {enter:levelInit, from:["LevelUp", "GameInit"]}); gameEngine.addState("Action", {enter:unpauseGame, exit:pauseGame, from:["Paused", "LevelInit", "GameHelp"]}); gameEngine.addState("GameHelp", {enter:gameHelpInit, exit:gameHelpExit, from:"Action"}); gameEngine.addState("Paused", {enter:unpauseGame, exit:pauseGame, from:"Action"}); gameEngine.addState("LevelUp", {enter:levelUpInit, exit:levelUpExit, from:"Action"}); gameEngine.response.add(transitionFunction); } protected function gameOver2Game(evnt:MouseEvent):void{ gameSequence.changeState("Game"); } protected function checkAddMochiAds(evnt:Event):void{ } protected function setVariable(which:String, to:String, from:String, type:String):void{ if (((invincibleMode) && ((which == "life")))){ return; }; if (type == "N"){ gameVars[which] = Number(to); } else { if (type == "S"){ gameVars[which] = String(to); } else { if (type == "B"){ gameVars[which] = Boolean(to); }; }; }; } protected function soundRollOver(evntsrov:MouseEvent):void{ if (gameVars.soundReady){ evntsrov.currentTarget.gotoAndStop(4); } else { evntsrov.currentTarget.gotoAndStop(3); }; } protected function action(evnt:Event):void{ } protected function gameExit(evnt:Object=null):void{ clearCanvas(); gameEngine = null; } protected function toggleGlobalSound(evnt:MouseEvent=null):void{ var btn:MultiStateUiButton; var sTransform:SoundTransform = new SoundTransform(); if (gameVars.soundReady){ gameVars.soundReady = false; sTransform.volume = 0; if (evnt != null){ if (getQualifiedClassName(evnt.currentTarget).split("::")[1] == "MovieClip"){ evnt.currentTarget.gotoAndStop(2); } else { btn = (evnt.currentTarget as MultiStateUiButton); btn.label = "Sound On"; }; }; } else { gameVars.soundReady = true; sTransform.volume = 1; if (evnt != null){ if (getQualifiedClassName(evnt.currentTarget).split("::")[1] == "MovieClip"){ evnt.currentTarget.gotoAndStop(1); } else { btn = (evnt.currentTarget as MultiStateUiButton); btn.label = "Sound Off"; }; }; }; SoundMixer.soundTransform = sTransform; } protected function initGameUI(evt:Event):void{ evt.currentTarget.sound_Mc.buttonMode = true; if (gameVars.soundReady){ evt.currentTarget.sound_Mc.gotoAndStop(2); } else { evt.currentTarget.sound_Mc.gotoAndStop(1); }; helpDisplayed = false; pauseTime = getTimer(); evt.currentTarget.sound_Mc.addEventListener(MouseEvent.CLICK, toggleGlobalSound); evt.currentTarget.sound_Mc.addEventListener(MouseEvent.ROLL_OVER, soundRollOver); evt.currentTarget.sound_Mc.addEventListener(MouseEvent.ROLL_OUT, soundRollOut); evt.currentTarget.help_Btn.addEventListener(MouseEvent.CLICK, helpDisplay); evt.currentTarget.menu_Btn.addEventListener(MouseEvent.CLICK, menuDisplay); evt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, initGameUI); gameEngine.changeState("LevelInit"); } protected function helpAdded(evnt:Event):void{ } protected function helpDisplay(evnt:MouseEvent):void{ if (!helpDisplayed){ gameEngine.changeState("GameHelp"); }; } protected function showHighScores(evnt:MouseEvent):void{ if (!MochiServices.connected){ return; }; gameSequence.changeState("Highscores"); } protected function removeIntro(evt:Event):void{ if (evt.currentTarget.currentFrame == evt.currentTarget.totalFrames){ evt.currentTarget.removeEventListener(Event.ENTER_FRAME, removeIntro); gameSequence.changeState("Menu"); }; } protected function gotoSite(evntm:MouseEvent):void{ var evntm = evntm; Debug.log(("Checking " + gameVars.siteUrl)); var request:URLRequest = new URLRequest(gameVars.siteUrl); navigateToURL(request, "_blank"); //unresolved jump var _slot1 = e; } protected function transitionFunction():void{ switch (arguments[0]){ case "TRANSITION_DENIED": Debug.error(((((("Tried change to " + arguments[1]) + " from ") + arguments[2]) + ". Can only transition from the following state/s: ") + arguments[3])); break; case "TRANSITION_COMPLETE": break; }; } protected function submitScore(evnt:MouseEvent):void{ if (!MochiServices.connected){ return; }; gameSequence.changeState("SubmitScore"); } protected function menuDisplay(evnt:MouseEvent):void{ setVariable("level", "1", "menuDisplay", "N"); Debug.log("back"); gameSequence.changeState("Menu"); } protected function levelUp2Game(evnt:MouseEvent):void{ gameEngine.changeState("GameInit"); } protected function showLevelUp():void{ levelUp_mc.gotoAndPlay(1); levelUp_mc.addEventListener(Event.ENTER_FRAME, levelUpAdded); } protected function cFlashtoryInit():void{ gameVars = Global.getInstance(); if (gameVars.developerMode){ gameStats = new Stats(); }; gameSequence = new StateMachine(); gameSequence.addState("Intro", {enter:introInit, exit:introExit}); gameSequence.addState("Help", {enter:helpInit, exit:helpExit, from:"Menu"}); gameSequence.addState("Menu", {enter:menuInit, exit:menuExit, from:["Intro", "Help", "Game", "GameWin", "GameOver", "Highscores", "SubmitScore"]}); gameSequence.addState("Game", {enter:gameInit, exit:gameExit, from:["Menu", "LevelUp", "GameWin", "GameOver"]}); gameSequence.addState("GameWin", {enter:gamewinInit, exit:gamewinExit, from:"Game"}); gameSequence.addState("GameOver", {enter:gameoverInit, exit:gameoverExit, from:"Game"}); if (gameVars.mochiEnabled){ gameSequence.addState("Highscores", {enter:highscoresInit, exit:highscoresExit, from:"Menu"}); gameSequence.addState("SubmitScore", {enter:submitscoreInit, exit:highscoresExit, from:["GameWin", "GameOver"]}); }; gameSequence.response.add(transitionFunction); } protected function gameStart(evntp:MouseEvent):void{ gameSequence.changeState("Game"); } protected function soundRollOut(evntsrot:MouseEvent):void{ if (gameVars.soundReady){ evntsrot.currentTarget.gotoAndStop(2); } else { evntsrot.currentTarget.gotoAndStop(1); }; } protected function introInit(evnt:Object):void{ if (gameVars.brandUsed == "Csharks"){ intro = (new IntroCgs_mc() as MovieClip); } else { if (gameVars.brandUsed == "OIG"){ intro = (new IntroOIG_mc() as MovieClip); } else { Debug.error("No Custom Intro found, skipping intro"); gameSequence.changeState("Menu"); return; }; }; intro.x = gameVars.stageMiddleX; intro.y = gameVars.stageMiddleY; intro.addEventListener(Event.ENTER_FRAME, removeIntro); addChild(intro); } protected function gameWinAdded(evnt:Event):void{ } protected function unpauseGame(evnt:Object=null):void{ var virtualClick:MouseEvent; Debug.log("action"); addEventListener(Event.ENTER_FRAME, action); key = new KeyObject(this.stage); stage.focus = stage; if (gameVars.developerMode){ if (gameStats == null){ gameStats = new Stats(); }; addChild(gameStats); }; if ((((evnt == null)) || (((!((evnt == null))) && ((((evnt.fromState == "Paused")) || ((evnt.fromState == "GameHelp")))))))){ SceneManager.removeItem(game_mc, "PausedText"); }; if (focusSoundMute){ virtualClick = new MouseEvent(MouseEvent.CLICK); game_mc.sound_Mc.dispatchEvent(virtualClick); focusSoundMute = false; }; setVariable("Paused", "", "unpauseGame", "B"); Debug.log((("Game was paused for " + (getTimer() - pauseTime)) + " Millisecs"), Debug.PINK); } protected function backBtnFn(evnt:MouseEvent):void{ if (((!((gameVars.showCredits == null))) && ((evnt.currentTarget.parent == templateMc)))){ evnt.currentTarget.parent.removeChild(finalCreditText); finalCreditText.removeEventListener(MouseEvent.CLICK, gotoSite); }; Debug.log("back to menu after submit"); SceneManager.removeButton(evnt.currentTarget.parent, "Back to Menu", backBtnFn); gameSequence.changeState("Menu"); } protected function windowNotActive(evnt:Event):void{ var virtualClick:MouseEvent; Debug.log("Window focus lost", Debug.RED); if (!helpDisplayed){ if (((musicIsPlaying) && (gameVars.soundReady))){ virtualClick = new MouseEvent(MouseEvent.CLICK); game_mc.sound_Mc.dispatchEvent(virtualClick); focusSoundMute = true; }; pauseGame(); }; } protected function introExit(evnt:Object):void{ if (intro){ removeChild(intro); }; } protected function submitscoreInit(evnt:Object):void{ templateMc = new TemplateBg(); templateMc.addEventListener(Event.ADDED_TO_STAGE, assignSubmitScore); addChild(templateMc); } protected function assignHighScores(evnt:Event):void{ } protected function levelInit(evnt:Object):void{ Debug.log("level init"); stage.addEventListener(Event.DEACTIVATE, windowNotActive); stage.addEventListener(Event.ACTIVATE, windowActive); focusSoundMute = false; gameEngine.changeState("Action"); } protected function gameOverAdded(evnt:Event):void{ } protected function checkTemplate(evt:Event):void{ var backButton:UiButton; var link:String; if (evt.currentTarget.currentFrame == evt.currentTarget.totalFrames){ if (gameVars.showCredits != null){ link = gameVars.siteUrl.toString().split("//")[1]; finalCreditText = new UiBox(gameVars.showCredits, 300, 70, UiBoxTypes.TextOnly, 25, 0xFFFFFF, link); finalCreditText.name = "CreditText"; finalCreditText.x = (gameVars.stageMiddleX - (finalCreditText.width / 2)); finalCreditText.y = (gameVars.stageMiddleY - (finalCreditText.height / 2)); evt.currentTarget.addChild(finalCreditText); finalCreditText.addEventListener(MouseEvent.CLICK, gotoSite); finalCreditText.buttonMode = true; }; evt.currentTarget.removeEventListener(Event.ENTER_FRAME, checkTemplate); backButton = SceneManager.addButton(evt.currentTarget, "Back to Menu", backBtnFn); backButton.x = (gameVars.stageMiddleX - (backButton.width / 2)); backButton.y = (2 * gameVars.stageMiddleY); TweenLite.to(backButton, 1, {y:350, ease:Elastic.easeOut}); }; } protected function gotoCsharksSite(evntm:MouseEvent):void{ var evntm = evntm; var request:URLRequest = new URLRequest("http://www.csharks.com"); navigateToURL(request, "_blank"); //unresolved jump var _slot1 = e; } protected function assignHelp(evnt:Event):void{ evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignHelp); var backButton:UiButton = SceneManager.addButton(evnt.currentTarget, "Back to Menu", backBtnFn); backButton.x = (gameVars.stageMiddleX - (backButton.width / 2)); backButton.y = (2 * gameVars.stageMiddleY); TweenLite.to(backButton, 1, {y:500, ease:Elastic.easeOut}); } protected function gamewinInit(evnt:Object):void{ Debug.log("game win init"); gameWin_mc = new GameWin(); gameWin_mc.addEventListener(Event.ENTER_FRAME, gameWinAdded); addChild(gameWin_mc); } protected function gamewinExit(evnt:Object):void{ Debug.log("game win exit"); SceneManager.removeButton(gameWin_mc, "Play Again", gameWin2Game); if (gameVars.mochiEnabled){ SceneManager.removeButton(gameWin_mc, "Submit Score", submitScore); }; removeChild(gameWin_mc); } protected function assignSubmitScore(evnt:Event):void{ } protected function backToGame(evnt:MouseEvent):void{ gameEngine.changeState("Action"); stage.focus = stage; } protected function assignMenu(event:Event):void{ } protected function levelUpInit(evnt:Object):void{ Debug.log("level up init"); clearCanvas(); levelUp_mc = new LeveUp(); levelUp_mc.addEventListener(Event.ADDED_TO_STAGE, checkAddMochiAds); addChild(levelUp_mc); } protected function helpInit(evnt:Object):void{ help_mc = new HelpClip(); help_mc.addEventListener(Event.ADDED_TO_STAGE, assignHelp); addChild(help_mc); } protected function highscoresInit(evnt:Object):void{ templateMc = new TemplateBg(); templateMc.addEventListener(Event.ADDED_TO_STAGE, assignHighScores); addChild(templateMc); } protected function gameoverInit(evnt:Object):void{ Debug.log("game over init"); gameOver_mc = new GameOver(); gameOver_mc.addEventListener(Event.ENTER_FRAME, gameOverAdded); addChild(gameOver_mc); } protected function musicCompleteHandler(evnt:Event):void{ var evnt = evnt; gameMusic_snd = new Music(); gameMusicChannel = gameMusic_snd.play(); //unresolved jump var _slot1 = e; gameMusicChannel.addEventListener(Event.SOUND_COMPLETE, musicCompleteHandler); } protected function helpExit(evnt:Object):void{ removeChild(help_mc); } protected static function postToStream(e=null):void{ MochiSocial.postToStream({message:"Enjoying this awesome game, check it out!"}); MochiSocial.addEventListener(MochiSocial.ACTION_COMPLETE, actionComplete); MochiSocial.addEventListener(MochiSocial.ACTION_CANCELED, actionCanceled); } protected static function actionCanceled(e:Object):void{ MochiSocial.removeEventListener(MochiSocial.ACTION_COMPLETE, actionComplete); MochiSocial.removeEventListener(MochiSocial.ACTION_CANCELED, actionCanceled); } protected static function actionComplete(e:Object):void{ MochiSocial.removeEventListener(MochiSocial.ACTION_COMPLETE, actionComplete); MochiSocial.removeEventListener(MochiSocial.ACTION_CANCELED, actionCanceled); } } }//package com.csharks.juwalbose.cFlashtory
Section 9
//cFlashtory_GameClip (com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_GameClip extends SpriteAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 10
//cFlashtory_GameOver (com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_GameOver extends MovieClipAsset { public var back_btn:DisplayObject; public var frame_mc:DisplayObject; public var games2girls_button:DisplayObject; public var continue_btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 11
//cFlashtory_GameWin (com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_GameWin extends MovieClipAsset { public var back_btn:DisplayObject; public var frame_mc:DisplayObject; public var games2girls_button:DisplayObject; public var play_btn:DisplayObject; public var continue_btn:DisplayObject; public var help_btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 12
//cFlashtory_HelpClip (com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_HelpClip extends MovieClipAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 13
//cFlashtory_HelpDisplay (com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_HelpDisplay extends MovieClipAsset { public var back_btn:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 14
//cFlashtory_LeveUp (com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_LeveUp extends MovieClipAsset { public var back_btn:DisplayObject; public var games2girls_button:DisplayObject; public var play_btn:DisplayObject; public var frame_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var continue_btn:DisplayObject; public var help_btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 15
//cFlashtory_MenuClip (com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_MenuClip extends MovieClipAsset { public var back_btn:DisplayObject; public var frame_mc:DisplayObject; public var games2girls_button:DisplayObject; public var play_btn:DisplayObject; public var continue_btn:DisplayObject; public var help_btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 16
//cFlashtory_Music (com.csharks.juwalbose.cFlashtory.cFlashtory_Music) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_Music extends SoundAsset { public var back_btn:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 17
//cFlashtory_TemplateBg (com.csharks.juwalbose.cFlashtory.cFlashtory_TemplateBg) package com.csharks.juwalbose.cFlashtory { import flash.display.*; import mx.core.*; public class cFlashtory_TemplateBg extends SpriteAsset { public var back_btn:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 18
//LibraryFontTextField (com.csharks.juwalbose.utils.ui.LibraryFontTextField) package com.csharks.juwalbose.utils.ui { import flash.text.*; public class LibraryFontTextField extends TextField { private var formatting:TextFormat; public function LibraryFontTextField(fontName:String, iSize:uint=8, iColor:int=0, iText:String=""){ super(); formatting = new TextFormat(); formatting.font = fontName; formatting.align = TextFormatAlign.CENTER; formatting.size = iSize; formatting.color = iColor; defaultTextFormat = formatting; embedFonts = true; antiAliasType = AntiAliasType.ADVANCED; text = iText; } public function set size(iSize:uint):void{ var currentText:String = this.text; var currentColor:int = this.textColor; formatting.size = iSize; defaultTextFormat = formatting; this.text = currentText; this.textColor = currentColor; } } }//package com.csharks.juwalbose.utils.ui
Section 19
//MultiStateUiButton (com.csharks.juwalbose.utils.ui.MultiStateUiButton) package com.csharks.juwalbose.utils.ui { import flash.display.*; public class MultiStateUiButton extends UiButton { private var newTextUpColor:uint; private var newText:String; private var newTextSize:uint; public function MultiStateUiButton(buttonUpClip:Class, buttonOverClip:Class, buttonDownClip:Class, iSizeX:int, iSizeY:int, itext:String="Button", itextSize:uint=20, itextUpColor:uint=0, itextOverColor:uint=0xFFFFFF, itextDownColor:uint=0xFF00FF){ super(buttonUpClip, buttonOverClip, buttonDownClip, iSizeX, iSizeY, itext, itextSize, itextUpColor, itextOverColor, itextDownColor); newText = itext; newTextSize = itextSize; newTextUpColor = itextUpColor; } public function changeButton(stateClip:Class, itext:String="", itextSize:uint=0, itextUpColor=-1):void{ setState("up", stateClip, itext, itextSize, itextUpColor); setState("over", stateClip, itext, itextSize, itextUpColor); setState("down", stateClip, itext, itextSize, itextUpColor); enabled = true; } override public function set enabled(value:Boolean):void{ super.enabled = value; this.mouseEnabled = enabled; if (enabled){ this.alpha = 1; } else { this.alpha = 0.5; }; } public function setState(flag:String, stateClip:Class, itext:String="", itextSize:uint=0, itextUpColor=-1):void{ var clipSX:uint; var clipSY:uint; var tSize:uint; var _local11:Sprite; if (itext != ""){ newText = itext; }; if (itextSize != 0){ newTextSize = itextSize; }; if (itextUpColor > -1){ newTextUpColor = itextUpColor; }; clipSX = super.sizeX; clipSY = super.sizeY; tSize = newTextSize; var tOffset:uint = 2; var offset:uint = 5; switch (flag){ case "up": upState = (hitTestState = (new UiBox("", super.sizeX, super.sizeY, UiBoxTypes.TextWithBackground, newTextSize, newTextUpColor, newText, stateClip, null, null, super.ButtonFont) as Sprite)); break; case "down": tSize = (newTextSize - tOffset); clipSX = (super.sizeX - offset); clipSY = (super.sizeY - offset); _local11 = (new UiBox("", clipSX, clipSY, UiBoxTypes.TextWithBackground, tSize, newTextUpColor, newText, stateClip, null, null, super.ButtonFont) as Sprite); _local11.x = ((super.sizeX / 2) - (clipSX / 2)); _local11.y = ((super.sizeY / 2) - (clipSY / 2)); downState = _local11; break; case "over": clipSX = (super.sizeX + offset); clipSY = (super.sizeY + offset); tSize = (newTextSize + tOffset); _local11 = (new UiBox("", clipSX, clipSY, UiBoxTypes.TextWithBackground, tSize, newTextUpColor, newText, stateClip, null, null, super.ButtonFont) as Sprite); _local11.x = ((super.sizeX / 2) - (clipSX / 2)); _local11.y = ((super.sizeY / 2) - (clipSY / 2)); overState = _local11; break; }; } } }//package com.csharks.juwalbose.utils.ui
Section 20
//Scale9Helper (com.csharks.juwalbose.utils.ui.Scale9Helper) package com.csharks.juwalbose.utils.ui { import flash.display.*; import flash.geom.*; public class Scale9Helper { public function Scale9Helper(){ super(); } public static function showScaleGrid(target:Sprite, lineColor:uint=0xFF00):void{ var targetScaleRect:Rectangle = target.scale9Grid; target.graphics.lineStyle(2, lineColor); target.graphics.moveTo(0, targetScaleRect.y); target.graphics.lineTo(target.width, targetScaleRect.y); target.graphics.moveTo(targetScaleRect.x, 0); target.graphics.lineTo(targetScaleRect.x, target.height); target.graphics.moveTo(0, (targetScaleRect.y + targetScaleRect.height)); target.graphics.lineTo(target.width, (targetScaleRect.y + targetScaleRect.height)); target.graphics.moveTo((targetScaleRect.x + targetScaleRect.width), 0); target.graphics.lineTo((targetScaleRect.x + targetScaleRect.width), target.height); } public static function setScaleGrid(target:Sprite, offset:uint):void{ var grid:Rectangle = new Rectangle(offset, offset, (target.width - (offset << 1)), (target.height - (offset << 1))); target.scale9Grid = grid; } } }//package com.csharks.juwalbose.utils.ui
Section 21
//SceneManager (com.csharks.juwalbose.utils.ui.SceneManager) package com.csharks.juwalbose.utils.ui { import flash.events.*; import flash.display.*; import com.inruntime.utils.*; public class SceneManager { private static var ButtonDownClip:Class = SceneManager_ButtonDownClip; private static var ButtonUpClip:Class = SceneManager_ButtonUpClip; private static var ButtonOverClip:Class = SceneManager_ButtonOverClip; public function SceneManager(){ super(); } public static function getCircle(radius:uint, color:uint=0, lineWidth:uint=1):Sprite{ var mS:Sprite = new Sprite(); mS.graphics.lineStyle(lineWidth, color); mS.graphics.drawCircle(0, 0, radius); return (mS); } public static function addMultiStateButton(parent, btnName:String="Button", callback:Function=null, staticMode:Boolean=false, buttonWidth:uint=130, buttonHeight:uint=45):MultiStateUiButton{ var button:MultiStateUiButton; var gameVars:Global = Global.getInstance(); if (staticMode){ button = new MultiStateUiButton(ButtonUpClip, ButtonOverClip, ButtonDownClip, buttonWidth, buttonHeight, btnName, gameVars.buttonFontSize, gameVars.buttonFontNormalColor, gameVars.buttonFontOverColor, gameVars.buttonFontDownColor); } else { button = new MultiStateUiButton(ButtonUpClip, ButtonOverClip, ButtonDownClip, -1, -1, btnName, gameVars.buttonFontSize, gameVars.buttonFontNormalColor, gameVars.buttonFontOverColor, gameVars.buttonFontDownColor); }; button.name = btnName; if (callback != null){ button.addEventListener(MouseEvent.CLICK, callback); }; parent.addChild(button); return (button); } public static function removeMultiStateButton(parent, btnName:String="Button", callback:Function=null):void{ var button:UiButton; if (parent.getChildByName(btnName)){ button = (parent.getChildByName(btnName) as UiButton); if (callback != null){ button.removeEventListener(MouseEvent.CLICK, callback); }; parent.removeChild(button); }; } public static function resizeThis(mc:DisplayObject, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true):void{ maxH = ((maxH == 0)) ? maxW : maxH; mc.width = maxW; mc.height = maxH; if (constrainProportions){ if ((mc.scaleX < mc.scaleY)){ mc.scaleY = mc.scaleX; } else { mc.scaleX = mc.scaleY; }; }; } public static function addButton(parent, btnName:String="Button", callback:Function=null, staticMode:Boolean=false, buttonWidth:uint=130, buttonHeight:uint=45):UiButton{ var button:UiButton; var gameVars:Global = Global.getInstance(); if (staticMode){ button = new UiButton(ButtonUpClip, ButtonOverClip, ButtonDownClip, buttonWidth, buttonHeight, btnName, gameVars.buttonFontSize, gameVars.buttonFontNormalColor, gameVars.buttonFontOverColor, gameVars.buttonFontDownColor); } else { button = new UiButton(ButtonUpClip, ButtonOverClip, ButtonDownClip, -1, -1, btnName, gameVars.buttonFontSize, gameVars.buttonFontNormalColor, gameVars.buttonFontOverColor, gameVars.buttonFontDownColor); }; button.name = btnName; if (callback != null){ button.addEventListener(MouseEvent.CLICK, callback); }; parent.addChild(button); return (button); } public static function addTitleBox(parent, type:uint=1, btnName:String="Title", boxWidth:uint=130, boxHeight:uint=45):UiBox{ var gameVars:Global = Global.getInstance(); var title:String = btnName; var button:UiBox = new UiBox("", boxWidth, boxHeight, type, gameVars.buttonFontSize, gameVars.buttonFontNormalColor, title, ButtonUpClip); button.name = btnName; parent.addChild(button); return (button); } public static function removeButton(parent, btnName:String="Button", callback:Function=null):void{ var button:UiButton; if (parent.getChildByName(btnName)){ button = (parent.getChildByName(btnName) as UiButton); if (callback != null){ button.removeEventListener(MouseEvent.CLICK, callback); }; parent.removeChild(button); }; } public static function removeItem(parent, name:String="Button"):void{ var item:*; if (parent.getChildByName(name)){ item = parent.getChildByName(name); parent.removeChild(item); }; } public static function getRectangle(radius:uint, color:uint=0, lineWidth:uint=1):Sprite{ var mS:Sprite = new Sprite(); mS.graphics.lineStyle(lineWidth, color); mS.graphics.drawRect(-(radius), (-(radius) / 2), (radius * 2), radius); return (mS); } public static function removeAllChildren(parent):void{ while (parent.numChildren) { parent.removeChildAt(0); }; } } }//package com.csharks.juwalbose.utils.ui
Section 22
//SceneManager_ButtonDownClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonDownClip) package com.csharks.juwalbose.utils.ui { import flash.display.*; import mx.core.*; public class SceneManager_ButtonDownClip extends SpriteAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 23
//SceneManager_ButtonOverClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonOverClip) package com.csharks.juwalbose.utils.ui { import flash.display.*; import mx.core.*; public class SceneManager_ButtonOverClip extends SpriteAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 24
//SceneManager_ButtonUpClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonUpClip) package com.csharks.juwalbose.utils.ui { import flash.display.*; import mx.core.*; public class SceneManager_ButtonUpClip extends SpriteAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 25
//UiBox (com.csharks.juwalbose.utils.ui.UiBox) package com.csharks.juwalbose.utils.ui { import flash.events.*; import flash.display.*; import com.inruntime.utils.*; public class UiBox extends Sprite { private var heading:String; private var itemClip:Class; private var barClip:Class; private var myBg:Sprite; private var destinationValue:Number; private var offset:Number; private var headingTxt:LibraryFontTextField; private var myClip:Sprite; private var myTxt:LibraryFontTextField; private var boxType:uint; private var maxBarValue; private var bgClip:Class; private var textColor:uint; private var updating:Boolean;// = false private var myBar:MovieClip; private var textSize:uint; private var iWidth:uint; public var runningUpdate:Boolean;// = false private var MenuFont:String; private var increment:int; private var iHeight:uint; private var currentValue; private var barUpdating:Boolean;// = false public function UiBox(iheading:String="", iwidth:uint=100, iheight:uint=20, itype:uint=1, itextSize:uint=8, itextColor:uint=0, ilinkedVariable=null, ibgClip:Class=null, iitemClip:Class=null, ibarClip:Class=null, fontName:String=null, ioffset:Number=0){ super(); var gameVars:Global = Global.getInstance(); MenuFont = (gameVars.menuFont as String); boxType = itype; iWidth = iwidth; iHeight = iheight; textSize = itextSize; textColor = itextColor; bgClip = ibgClip; barClip = ibarClip; itemClip = iitemClip; heading = iheading; offset = ioffset; if (fontName != null){ MenuFont = fontName; }; if (heading != ""){ headingTxt = new LibraryFontTextField(MenuFont, textSize, textColor, heading); headingTxt.selectable = false; headingTxt.mouseEnabled = false; headingTxt.width = iwidth; headingTxt.x = ((iWidth / 2) - (headingTxt.width / 2)); headingTxt.y = offset; }; switch (itype){ case UiBoxTypes.BackgroundOnly: addBG(); if (heading != ""){ addChild(headingTxt); }; break; case UiBoxTypes.BarOnly: addBar(ilinkedVariable); break; case UiBoxTypes.BarWithBackground: addBG(); addBar(ilinkedVariable); break; case UiBoxTypes.ClipOnly: myClip = new Sprite(); addChild(myClip); addClip(ilinkedVariable); break; case UiBoxTypes.ClipWithBackground: addBG(); myClip = new Sprite(); addChild(myClip); addClip(ilinkedVariable.toString()); break; case UiBoxTypes.TextOnly: addText(ilinkedVariable); break; case UiBoxTypes.TextWithBackground: addBG(); addText(ilinkedVariable.toString()); break; }; } private function clearSprite(clip:Sprite):void{ while (clip.numChildren) { clip.removeChildAt(0); }; } private function addClip(linkedVar=null):void{ var clip:Sprite; if (linkedVar <= 0){ return; }; if (isNaN(linkedVar)){ linkedVar = 1; } else { linkedVar = int(linkedVar); }; if (maxBarValue == null){ maxBarValue = linkedVar; if (heading != ""){ addChild(headingTxt); }; }; var margin:Number = (iWidth / maxBarValue); var i:uint; while (i < maxBarValue) { clip = (new itemClip() as Sprite); myClip.addChild(clip); if (heading != ""){ clip.y = ((headingTxt.y + headingTxt.textHeight) + 5); } else { clip.y = ((iHeight / 2) - (clip.height / 2)); }; if ((i + 1) > linkedVar){ clip.alpha = 0.5; }; clip.x = (((i * margin) / 2) + ((((i + 1) * margin) / 2) - (clip.width / 2))); i++; }; } private function updateBar(e:Event):void{ currentValue = myBar.currentFrame; myBar.gotoAndStop((currentValue + increment)); if ((((((myBar.currentFrame == destinationValue)) || ((((increment > 0)) && ((destinationValue < currentValue)))))) || ((((increment < 0)) && ((destinationValue > currentValue)))))){ currentValue = null; barUpdating = false; myBar.gotoAndStop(destinationValue); removeEventListener(Event.ENTER_FRAME, updateBar); }; } private function addBG():void{ myBg = (new bgClip() as Sprite); addChild(myBg); Scale9Helper.setScaleGrid(myBg, 12); myBg.width = iWidth; myBg.height = iHeight; } private function updateField(e:Event):void{ var oldIncrement:int = increment; increment = int(((destinationValue - currentValue) / 2)); currentValue = Number(myTxt.text); myTxt.text = String((currentValue + increment)); if ((((currentValue == destinationValue)) || (!(((increment / oldIncrement) == Math.abs((increment / oldIncrement))))))){ currentValue = null; updating = false; myTxt.text = destinationValue.toString(); removeEventListener(Event.ENTER_FRAME, updateField); }; myTxt.x = ((iWidth / 2) - (myTxt.width / 2)); } private function addBar(linkedVar=null):void{ if (linkedVar <= 0){ return; }; if (isNaN(linkedVar)){ linkedVar = 1; }; if (maxBarValue == null){ maxBarValue = linkedVar; }; myBar = (new barClip() as MovieClip); addChild(myBar); if (heading != ""){ addChild(headingTxt); myBar.y = ((headingTxt.y + headingTxt.textHeight) + 5); } else { myBar.y = ((iHeight / 2) - (myBar.height / 2)); }; myBar.x = ((iWidth / 2) - (myBar.width / 2)); myBar.addEventListener(Event.ADDED_TO_STAGE, initBar); } public function update(linkedVariable):void{ if ((((boxType == UiBoxTypes.TextOnly)) || ((boxType == UiBoxTypes.TextWithBackground)))){ if (((((runningUpdate) && (!(isNaN(linkedVariable))))) && (!((Number(myTxt.text) == Number(linkedVariable)))))){ if (!updating){ updating = true; if (currentValue == null){ currentValue = Number(myTxt.text); destinationValue = Number(linkedVariable); increment = int(((destinationValue - currentValue) / 2)); addEventListener(Event.ENTER_FRAME, updateField); }; } else { destinationValue = Number(linkedVariable); currentValue = Number(myTxt.text); increment = int(((destinationValue - currentValue) / 2)); }; } else { myTxt.text = linkedVariable; myTxt.x = ((iWidth / 2) - (myTxt.width / 2)); }; } else { if ((((((boxType == UiBoxTypes.BarOnly)) || ((boxType == UiBoxTypes.BarWithBackground)))) && (!(isNaN(linkedVariable))))){ if (((runningUpdate) && (!(isNaN(linkedVariable))))){ if (!barUpdating){ barUpdating = true; if (currentValue == null){ currentValue = myBar.currentFrame; destinationValue = (1 + int(((linkedVariable / maxBarValue) * (myBar.totalFrames - 1)))); if (Math.max(destinationValue, currentValue) == destinationValue){ increment = 1; } else { increment = -1; }; addEventListener(Event.ENTER_FRAME, updateBar); }; } else { destinationValue = (1 + int(((linkedVariable / maxBarValue) * (myBar.totalFrames - 1)))); if (Math.max(destinationValue, currentValue) == destinationValue){ increment = 1; } else { increment = -1; }; }; } else { myBar.gotoAndStop((1 + int(((linkedVariable / maxBarValue) * (myBar.totalFrames - 1))))); }; } else { if ((((boxType == UiBoxTypes.ClipOnly)) || ((boxType == UiBoxTypes.ClipWithBackground)))){ clearSprite(myClip); addClip(linkedVariable); }; }; }; } private function initBar(e:Event):void{ e.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, initBar); e.currentTarget.gotoAndStop(e.currentTarget.totalFrames); } private function addText(itext:String):void{ myTxt = new LibraryFontTextField(MenuFont, textSize, textColor, itext); addChild(myTxt); myTxt.selectable = false; myTxt.mouseEnabled = false; myTxt.multiline = true; myTxt.wordWrap = true; myTxt.width = (iWidth - 5); myTxt.height = (iHeight - 5); myTxt.x = ((iWidth / 2) - (myTxt.width / 2)); if (heading != ""){ addChild(headingTxt); myTxt.y = (((iHeight - (headingTxt.y + headingTxt.textHeight)) / 2) - (myTxt.textHeight / 2)); if ((headingTxt.y + headingTxt.textHeight) > myTxt.y){ myTxt.y = (headingTxt.y + headingTxt.textHeight); }; } else { myTxt.y = ((iHeight / 2) - (myTxt.textHeight / 2)); }; } } }//package com.csharks.juwalbose.utils.ui
Section 26
//UiBoxTypes (com.csharks.juwalbose.utils.ui.UiBoxTypes) package com.csharks.juwalbose.utils.ui { public class UiBoxTypes { public static const TextWithBackground:uint = 3; public static const ClipWithBackground:uint = 7; public static const BarWithBackground:uint = 5; public static const TextOnly:uint = 1; public static const BackgroundOnly:uint = 2; public static const ClipOnly:uint = 6; public static const BarOnly:uint = 4; public function UiBoxTypes(){ super(); } } }//package com.csharks.juwalbose.utils.ui
Section 27
//UiButton (com.csharks.juwalbose.utils.ui.UiButton) package com.csharks.juwalbose.utils.ui { import flash.display.*; import com.inruntime.utils.*; public class UiButton extends SimpleButton { public var ButtonFont:String; private var ButtonDownClip:Class; private var textOverColor:uint; private var ButtonUpClip:Class; private var textSize:uint; private var title:String; private var textUpColor:uint; private var textDownColor:uint; public var sizeY:uint; private var ButtonOverClip:Class; public var sizeX:uint; public function UiButton(buttonUpClip:Class, buttonOverClip:Class, buttonDownClip:Class, iSizeX:int=-1, iSizeY:int=-1, text:String="Button", itextSize:uint=20, itextUpColor:uint=0, itextOverColor:uint=0xFFFFFF, itextDownColor:uint=0xFF00FF){ super(); var gameVars:Global = Global.getInstance(); ButtonFont = (gameVars.buttonFont as String); ButtonUpClip = buttonUpClip; ButtonOverClip = buttonOverClip; ButtonDownClip = buttonDownClip; textDownColor = itextDownColor; textOverColor = itextOverColor; textUpColor = itextUpColor; textSize = itextSize; title = text; var tmpTxt:LibraryFontTextField = new LibraryFontTextField(ButtonFont, textSize, itextUpColor, text); if (iSizeX == -1){ sizeX = (tmpTxt.textWidth + 30); } else { sizeX = iSizeX; }; if (iSizeY == -1){ sizeY = (tmpTxt.textHeight + 15); } else { sizeY = iSizeY; }; tmpTxt = null; upState = (hitTestState = setGraphics(ButtonUpClip, textUpColor)); overState = setGraphics(ButtonOverClip, textOverColor); downState = setGraphics(ButtonDownClip, textDownColor); } private function setGraphics(ButtonClip:Class, textColor:uint):Sprite{ var clipSX:uint; var clipSY:uint; var tSize:uint = textSize; var tOffset:uint = 2; var offset:uint = 5; if (ButtonClip == ButtonUpClip){ clipSX = sizeX; clipSY = sizeY; } else { if (ButtonClip == ButtonOverClip){ clipSX = (sizeX + offset); clipSY = (sizeY + offset); tSize = (tSize + tOffset); } else { if (ButtonClip == ButtonDownClip){ clipSX = (sizeX - offset); clipSY = (sizeY - offset); tSize = (tSize - tOffset); }; }; }; var gSprite:Sprite = (new UiBox("", clipSX, clipSY, UiBoxTypes.TextWithBackground, tSize, textColor, title, ButtonClip, null, null, ButtonFont) as Sprite); gSprite.x = ((sizeX / 2) - (clipSX / 2)); gSprite.y = ((sizeY / 2) - (clipSY / 2)); return (gSprite); } public function set label(text:String):void{ title = text; upState = (hitTestState = setGraphics(ButtonUpClip, textUpColor)); overState = setGraphics(ButtonOverClip, textOverColor); downState = setGraphics(ButtonDownClip, textDownColor); } } }//package com.csharks.juwalbose.utils.ui
Section 28
//Counter (com.csharks.juwalbose.utils.Counter) package com.csharks.juwalbose.utils { import flash.events.*; import flash.utils.*; public class Counter { private var callbackFunction:Function; private var counterType:String; private var _timer:Timer; private var counterMax:uint; public var currentTime:uint; private var counterMin:uint; private var range:uint; public function Counter(maxValue:uint, minValue:uint=0, type:String="down", callback:Function=null){ super(); counterMax = maxValue; counterMin = 0; counterType = type; callbackFunction = callback; range = (counterMax - counterMin); if (counterType == "up"){ currentTime = 0; } else { currentTime = range; }; } public function start(delay:Number=1):void{ _timer = new Timer((delay * 1000)); _timer.addEventListener(TimerEvent.TIMER, timerTick); _timer.start(); } private function timerTick(evnt:TimerEvent):void{ counterMin++; if (counterType == "up"){ currentTime = counterMin; if (currentTime >= counterMax){ timerComplete(); }; } else { currentTime = (range - counterMin); if (currentTime <= 0){ timerComplete(); }; }; } public function unPause():void{ _timer.start(); } public function pause():void{ _timer.stop(); } private function timerComplete():void{ _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, timerTick); _timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerComplete); if (callbackFunction != null){ callbackFunction.call(); }; } public function dispose():void{ _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, timerTick); _timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerComplete); } } }//package com.csharks.juwalbose.utils
Section 29
//Environment (com.csharks.juwalbose.utils.Environment) package com.csharks.juwalbose.utils { import flash.system.*; import flash.net.*; public class Environment { public function Environment(){ super(); } public static function get IS_IN_BROWSER():Boolean{ return ((((Capabilities.playerType == "PlugIn")) || ((Capabilities.playerType == "ActiveX")))); } public static function get DOMAIN():String{ return (new LocalConnection().domain); } public static function get IS_IN_AIR():Boolean{ return ((Capabilities.playerType == "Desktop")); } public static function get IS_OIG():Boolean{ return ((DOMAIN == "onlineindiangames.com")); } public static function get IS_CSHARKS():Boolean{ return ((((((((DOMAIN == "www.csharks.com")) || ((DOMAIN == "csharks.com")))) || ((DOMAIN == "www.csharksgames.com")))) || ((DOMAIN == "csharksgames.com")))); } public static function get IS_ON_SERVER():Boolean{ return ((Security.sandboxType == Security.REMOTE)); } } }//package com.csharks.juwalbose.utils
Section 30
//RandomHelper (com.csharks.juwalbose.utils.RandomHelper) package com.csharks.juwalbose.utils { public class RandomHelper { public function RandomHelper(){ super(); } public static function randomSign():int{ var temp:int = ((2 * int((Math.random() * 2))) - 1); return (temp); } public static function randomIntTill(max:uint):int{ var temp:int = int((Math.random() * max)); return (temp); } public static function randomWithProbability(sectionsArray:Array, probabilityArray:Array, length:uint):Array{ var i:uint; var j:uint; var temp:Array = new Array(); var sections:uint = (sectionsArray.length - 1); var totalProbability:Number = 0; var finalProbability:Number = 0; i = 0; while (i < probabilityArray.length) { totalProbability = (totalProbability + probabilityArray[i]); i++; }; if (totalProbability < 1){ finalProbability = (1 - totalProbability); if (probabilityArray.length < sections){ j = 0; while (j < (sections - probabilityArray.length)) { probabilityArray.push(finalProbability); j++; }; trace("recalculated result: ", probabilityArray); }; } else { if (totalProbability > 1){ i = 0; while (i < probabilityArray.length) { probabilityArray[i] = (probabilityArray[i] / totalProbability); i++; }; trace("recalculated result: ", probabilityArray); }; }; var currentSection:uint = 1; var currentProbability:int = int((length * probabilityArray[(currentSection - 1)])); var iterator:uint; i = 0; while (i < length) { if (iterator == currentProbability){ currentSection++; iterator = 0; currentProbability = int((length * probabilityArray[(currentSection - 1)])); }; temp.push(randomBetween(sectionsArray[(currentSection - 1)], sectionsArray[currentSection])); iterator++; i++; }; return (temp); } public static function randomBetween(min:Number, max:Number):Number{ var temp:Number; if (max < min){ temp = min; min = max; max = temp; }; temp = (min + (Math.random() * (max - min))); return (temp); } public static function randomSignWithZero():int{ var temp:int = (int((Math.random() * 3)) - 1); return (temp); } } }//package com.csharks.juwalbose.utils
Section 31
//Tick (com.csharks.juwalbose.utils.Tick) package com.csharks.juwalbose.utils { import flash.utils.*; public class Tick { public static var fps:uint = 0; public static var timeMultiplier:Number = 0; public static var secs:uint = getTimer(); public static var fps_txt:uint = 0; private static var oldtime:int = 0; public function Tick(){ super(); } public static function run():void{ timeMultiplier = ((getTimer() - oldtime) / 1000); fps++; if ((getTimer() - secs) > 1000){ secs = getTimer(); fps_txt = fps; fps = 0; }; oldtime = getTimer(); } public static function reset():void{ oldtime = getTimer(); } } }//package com.csharks.juwalbose.utils
Section 32
//Grid (com.csharks.vinod.pathfinding.Grid) package com.csharks.vinod.pathfinding { import flash.geom.*; public class Grid { private var _nodes:Object; public function Grid(){ super(); _nodes = new Object(); } public function findPath(startId:String, goalId:String):Path{ var searchPath:Path; var searchNode:Node; var j:int; var priority:Function; var branch:Path; var expandNode:String; var prevCoord:Node; var currentCoord:Node; var goalCoord:Node; var shortest:Number; var startId = startId; var goalId = goalId; var stack:Array = new Array(new Path(0, 0, [startId])); var best:Path = new Path(); var reachedNodes:Object = new Object(); var cyc:int; while (stack.length > 0) { searchPath = (stack.shift() as Path); searchNode = getNodeById(searchPath.lastElement); j = 0; while (j < searchNode.numNeighbors) { branch = searchPath.clone(); expandNode = searchNode.getNeighbor(j); if (!branch.containsNode(expandNode)){ prevCoord = getNodeById(branch.lastElement); currentCoord = getNodeById(expandNode); goalCoord = getNodeById(goalId); branch.addNode(expandNode); branch.length = (branch.length + Point.distance(prevCoord, currentCoord)); branch.bestCase = (branch.length + Point.distance(currentCoord, goalCoord)); shortest = reachedNodes[expandNode]; if (isNaN(shortest)){ shortest = branch.length; }; if ((((branch.length <= shortest)) && (((!(best.hasLength)) || ((branch.bestCase < best.length)))))){ reachedNodes[expandNode] = branch.length; if (expandNode == goalId){ best = branch; } else { stack.push(branch); }; }; }; j = (j + 1); }; priority = function (a:Path, b:Path):int{ if (a.bestCase < b.bestCase){ return (-1); }; if (a.bestCase > b.bestCase){ return (1); }; return (0); }; stack.sort(priority); cyc = (cyc + 1); }; return (best); } public function getNodeById(id:String):Node{ if (_nodes[id] != undefined){ return ((_nodes[id] as Node)); }; return (null); } public function parseXML(xml:XML):void{ var nodeXML:*; var node:Node; for each (nodeXML in xml.children()) { node = new Node(nodeXML.@id, nodeXML.@x, nodeXML.@y); node.parseNeighbors(nodeXML.@join); _nodes[node.id] = node; }; } public function getPathPoints(startId:String, goalId:String):Array{ var p:Object; var thisPath:Path = findPath(startId, goalId); var pointArray:Array = []; var k:int; while (k < thisPath.computedPath.length) { p = {id:thisPath.computedPath[k], x:getNodeById(thisPath.computedPath[k]).x, y:getNodeById(thisPath.computedPath[k]).y}; pointArray.push(p); k++; }; return (pointArray); } } }//package com.csharks.vinod.pathfinding
Section 33
//Node (com.csharks.vinod.pathfinding.Node) package com.csharks.vinod.pathfinding { import flash.geom.*; public class Node extends Point { private var _neighbors:Array; public var id:String;// = "" public function Node(key:String="", x:int=0, y:int=0){ super(x, y); id = key; _neighbors = new Array(); } public function expandNamespace(key:String):void{ var j:String; id = (id + key); for each (j in _neighbors) { j = (j + key); }; } public function getNeighbor(index:int):String{ if ((((index >= 0)) && ((index < _neighbors.length)))){ return (_neighbors[index]); }; return (null); } public function get numNeighbors():int{ return (_neighbors.length); } override public function toString():String{ return ((((((((("[Node] id:" + id) + ", x:") + x) + ", y:") + y) + ", neighbors:(") + _neighbors) + ")")); } public function parseNeighbors(csv:String):void{ var j:String; for each (j in csv.split(",")) { addNeighbor(j); }; } public function containsNeighbor(id:String):Boolean{ return ((_neighbors.indexOf(id) > -1)); } public function addNeighbor(id:String):void{ if (((!(containsNeighbor(id))) && (!((id == ""))))){ _neighbors.push(id); }; } public function cloneNode():Node{ var node:Node = new Node(id, x, y); node.parseNeighbors(_neighbors.join(",")); return (node); } } }//package com.csharks.vinod.pathfinding
Section 34
//Path (com.csharks.vinod.pathfinding.Path) package com.csharks.vinod.pathfinding { public class Path { private var _path:Array; public var length:int;// = -1 public var nodes:Array; public var bestCase:int;// = -1 public function Path(thislength:Number=-1, thisBestCase:Number=-1, thisPath:Array=null){ super(); length = thislength; bestCase = thisBestCase; _path = thisPath; } public function get hasLength():Boolean{ return (((length + bestCase) >= 0)); } public function containsNode(id:String):Boolean{ return ((_path.indexOf(id) > -1)); } public function addNode(id:String):void{ if (!containsNode(id)){ _path.push(id); }; } public function get lastElement():String{ return (_path.slice(-1)[0]); } public function get computedPath():Array{ return (_path); } public function destroy():void{ _path = null; nodes = null; } public function toString():String{ return ((((("[Path] length:" + length) + ", nodes:(") + _path) + ")")); } public function clone():Path{ return (new Path(length, bestCase, _path.slice())); } } }//package com.csharks.vinod.pathfinding
Section 35
//Baby (com.csharks.vinod.Baby) package com.csharks.vinod { import flash.events.*; import flash.display.*; import com.greensock.*; import flash.utils.*; import com.csharks.juwalbose.cFlashtory.core.*; import com.inruntime.utils.*; import com.csharks.juwalbose.utils.*; import com.greensock.easing.*; import com.carlcalderon.arthropod.*; public class Baby extends MovieClip { private var BlondeBaby:Class; private var _need:String; private var AfricanBaby:Class; private var clock:MovieClip; private var _direction:String; private var HairlessBaby:Class; private var tempDelay:Number; private var askOnce:Boolean; private var _clip:MovieClip; private var cryTimerInitiated:Boolean; public var onJobComplete:Function; private var childPlacedOnBedAfter:Boolean; public var playSound:Function; private var needsArray:Array; private var gameVars:Global; private var AsianBaby:Class; public var levelInstanceId:uint; public var babyState:StateMachine; public var locationState:StateMachine; private var AskFX:Class; public var stopWatch:Counter; private var Clock:Class; private var cryTimer:Number; private var RequestBox:Class; public function Baby(childType:uint=1){ var childType = childType; HairlessBaby = Baby_HairlessBaby; AsianBaby = Baby_AsianBaby; AfricanBaby = Baby_AfricanBaby; BlondeBaby = Baby_BlondeBaby; RequestBox = Baby_RequestBox; Clock = Baby_Clock; AskFX = Baby_AskFX; super(); gameVars = Global.getInstance(); needsArray = Utils.randomFromArray(gameVars.needs, true, gameVars.childRequirementsMin[(gameVars.level - 1)], gameVars.childRequirementsMax[(gameVars.level - 1)]); Debug.log(needsArray); switch (childType){ case ChildTypes.HAIRLESS: _clip = new HairlessBaby(); break; case ChildTypes.ASIAN: _clip = new AsianBaby(); break; case ChildTypes.AFRICAN: _clip = new AfricanBaby(); break; default: _clip = new BlondeBaby(); break; }; _clip.addFrameScript(6, function ():void{ _clip.gotoAndPlay("idle"); }); _clip.addFrameScript(18, function ():void{ _clip.gotoAndPlay("crying"); }); babyState = new StateMachine(); babyState.addState("idle"); babyState.addState("crying"); babyState.addState("ready"); babyState.initialState = "idle"; _direction = "Front"; locationState = new StateMachine(); locationState.addState("inCradle"); locationState.addState("inHand"); locationState.addState("inBed"); locationState.addState("inTable"); locationState.initialState = "inCradle"; _clip.scaleX = (_clip.scaleY = 0.6); alignChildPosition(locationState.state); } public function get needsComplete():Boolean{ return (((needsArray.length)==0) ? true : false); } public function changeLocationState(state:String):void{ locationState.changeState(state); alignChildPosition(state); } public function set direction(value:String):void{ _direction = value; } public function get need():String{ return (_need); } public function resumeTimer():void{ if (stopWatch != null){ stopWatch.unPause(); }; if (tempDelay > 0){ cryTimer = (cryTimer + tempDelay); }; } override public function set scaleX(value:Number):void{ _clip.scaleX = value; } private function showDialog():void{ var requirement:String = _need; if (needsComplete){ requirement = "done"; }; var dialog:MovieClip = new RequestBox(); _clip.addChild(dialog); playSound(AskFX, "showDialog"); Debug.log(("Requirement==>" + requirement), 0xFF00); if (requirement != "done"){ if (stopWatch != null){ clock.visible = true; stopWatch.unPause(); } else { stopWatch = new Counter(40, 0, "up", timerReached); clock = new Clock(); _clip.addChild(clock); clock.x = 50; clock.y = -80; stopWatch.start(); }; Utils.setDepthOf(clock, "above", dialog); }; dialog.name = "dialog"; dialog.gotoAndStop(requirement); dialog.x = (x - 50); dialog.y = (y - 120); dialog.scaleX = 0.1; dialog.scaleY = 0.1; clock.scaleX = (clock.scaleY = 0); TweenLite.to(dialog, 0.5, {scaleX:0.7, scaleY:0.7, ease:Bounce.easeInOut}); TweenLite.to(clock, 0.5, {delay:0.5, scaleX:1, scaleY:1, ease:Bounce.easeInOut}); } public function dispose():void{ if (stopWatch != null){ stopWatch.dispose(); stopWatch = null; }; } private function hideDialog():void{ if (_clip.getChildByName("dialog") != null){ _clip.removeChild(_clip.getChildByName("dialog")); hideStopWatch(); }; } public function set need(value:String):void{ if (value == null){ _need = null; cryTimerInitiated = false; needsArray.splice(0, 1); }; } override public function set scaleY(value:Number):void{ _clip.scaleY = value; } public function update():void{ if (stopWatch){ clock.gotoAndStop(stopWatch.currentTime); }; alignChildPosition(locationState.state); switch (babyState.state){ case "idle": if ((((_direction == "Left")) || ((_direction == "Right")))){ _clip.gotoAndStop("idleSide"); if (_direction == "Left"){ _clip.scaleX = -0.6; } else { if (_direction == "Right"){ _clip.scaleX = 0.6; }; }; } else { if ((((_direction == "Front")) || ((_direction == "Back")))){ _clip.scaleX = 0.6; if (_clip.currentLabel != "idle"){ _clip.gotoAndPlay("idle"); }; }; }; break; case "crying": _clip.scaleX = 0.6; if (_clip.currentLabel != "crying"){ _clip.gotoAndPlay("crying"); }; break; case "ready": _clip.scaleX = 0.6; if ((((_direction == "Left")) || ((_direction == "Right")))){ _clip.gotoAndStop("idleSide"); if (_direction == "Left"){ _clip.scaleX = -0.6; } else { if (_direction == "Right"){ _clip.scaleX = 0.6; }; }; } else { if ((((_direction == "Front")) || ((_direction == "Back")))){ _clip.scaleX = 0.6; if (_clip.currentLabel != "idle"){ _clip.gotoAndPlay("idle"); }; }; }; break; }; _clip.scaleX = 0.6; } private function hideStopWatch():void{ if (stopWatch != null){ clock.visible = false; stopWatch.pause(); }; } public function timerReached():void{ Debug.log("Job failed"); dispatchEvent(new Event("jobFailure")); if (babyState.state == "crying"){ babyState.changeState("idle"); }; resetStopWatch(); hideDialog(); _need = null; cryTimerInitiated = false; needsArray.splice(0, 1); } override public function get scaleX():Number{ return (_clip.scaleX); } override public function get scaleY():Number{ return (_clip.scaleY); } public function get clip():MovieClip{ return (_clip); } private function alignChildPosition(state:String):void{ switch (state){ case "inCradle": _clip.x = 0; _clip.y = -60; direction = "Front"; break; case "inBed": _clip.x = 43; _clip.y = 23; direction = "Front"; if (!cryTimerInitiated){ cryTimer = getTimer(); cryTimerInitiated = true; }; if ((getTimer() - cryTimer) > gameVars.childCryIntervals[(gameVars.level - 1)]){ if (needsComplete){ if (!askOnce){ askOnce = true; childPlacedOnBedAfter = true; babyState.changeState("ready"); showDialog(); }; } else { if (_need == null){ _need = needsArray[0]; }; if (babyState.state != "crying"){ babyState.changeState("crying"); showDialog(); }; }; }; break; case "inHand": askOnce = false; hideDialog(); _clip.x = 0; _clip.y = -20; if ((((babyState.state == "crying")) || ((babyState.state == "ready")))){ babyState.changeState("idle"); }; if (((needsComplete) && (childPlacedOnBedAfter))){ babyState.changeState("ready"); onJobComplete(this); }; break; case "inTable": _clip.x = 0; _clip.y = -70; direction = "Front"; break; }; } public function resetStopWatch():void{ stopWatch.dispose(); stopWatch = null; _clip.removeChild(clock); } public function pauseTimer():void{ if (stopWatch != null){ stopWatch.pause(); }; tempDelay = (getTimer() - cryTimer); } override public function set x(value:Number):void{ _clip.x = value; } override public function set y(value:Number):void{ _clip.y = value; } override public function get y():Number{ return (_clip.y); } override public function get x():Number{ return (_clip.x); } } }//package com.csharks.vinod
Section 36
//Baby_AfricanBaby (com.csharks.vinod.Baby_AfricanBaby) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_AfricanBaby extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 37
//Baby_AsianBaby (com.csharks.vinod.Baby_AsianBaby) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_AsianBaby extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 38
//Baby_AskFX (com.csharks.vinod.Baby_AskFX) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_AskFX extends SoundAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 39
//Baby_BlondeBaby (com.csharks.vinod.Baby_BlondeBaby) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_BlondeBaby extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 40
//Baby_Clock (com.csharks.vinod.Baby_Clock) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_Clock extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 41
//Baby_HairlessBaby (com.csharks.vinod.Baby_HairlessBaby) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_HairlessBaby extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 42
//Baby_RequestBox (com.csharks.vinod.Baby_RequestBox) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Baby_RequestBox extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 43
//Bed (com.csharks.vinod.Bed) package com.csharks.vinod { import flash.events.*; import flash.display.*; import flash.utils.*; import com.csharks.juwalbose.cFlashtory.core.*; import com.inruntime.utils.*; public class Bed extends MovieClip { private var BedClip:Class; public var state:StateMachine; private var _child:Baby; private var clickCallback:Function; private var _clip:MovieClip; public var levelInstanceId:uint; private var gameVars:Global; public function Bed(){ BedClip = Bed_BedClip; super(); gameVars = Global.getInstance(); _clip = new BedClip(); _clip.stop(); _clip.buttonMode = true; _clip.bedTopWood_mc.gotoAndStop(gameVars.bedUpdateState); _clip.bedBottomWood_mc.gotoAndStop(gameVars.bedUpdateState); state = new StateMachine(); state.addState("noChild"); state.addState("child"); state.initialState = "noChild"; } public function disableClick():void{ _clip.removeEventListener(MouseEvent.CLICK, tmpListener); } public function enableClick(callBack:Function):void{ clickCallback = callBack; _clip.addEventListener(MouseEvent.CLICK, tmpListener, false, 0, true); } public function update():void{ switch (state.state){ case "noChild": break; case "child": break; }; } public function get clip():MovieClip{ return (_clip); } public function get child():Baby{ return (_child); } public function tmpListener(e:MouseEvent):void{ var u:uint; var e = e; disableClick(); clickCallback(this); u = setTimeout(function ():void{ clearTimeout(u); enableClick(clickCallback); }, 2000); } override public function set x(value:Number):void{ _clip.x = value; } override public function set y(value:Number):void{ _clip.y = value; } override public function get x():Number{ return (_clip.x); } override public function get y():Number{ return (_clip.y); } public function set child(value:Baby):void{ _child = value; if (value != null){ _clip.addChild(_child.clip); }; } } }//package com.csharks.vinod
Section 44
//Bed_BedClip (com.csharks.vinod.Bed_BedClip) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Bed_BedClip extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 45
//ChildTypes (com.csharks.vinod.ChildTypes) package com.csharks.vinod { public class ChildTypes { public static const AFRICAN:uint = 3; public static const ASIAN:uint = 2; public static const NONE:uint = 0; public static const BLONDE:uint = 4; public static const HAIRLESS:uint = 1; public function ChildTypes(){ super(); } } }//package com.csharks.vinod
Section 46
//Player (com.csharks.vinod.Player) package com.csharks.vinod { import flash.events.*; import flash.display.*; import com.csharks.juwalbose.cFlashtory.core.*; import com.csharks.vinod.pathfinding.*; public class Player extends MovieClip { private var grid:Grid; private var _direction:String; public var _speed:Number;// = 10 private var Character:Class; public var state:StateMachine; public var currentNodeId:String; public var nextNodeId:String; private var currentIndex:Number; private var _onBendFinishState:String; private var targetNodeId:String; private var _clip:MovieClip; private var _childInHand:Baby; public var levelInstanceId:uint; private var _oldDirection:String; private var currentPath:Array; public function Player(initNodeId:String, wayPoints:XML){ var initNodeId = initNodeId; var wayPoints = wayPoints; Character = Player_Character; grid = new Grid(); super(); _clip = new Character(); grid.parseXML(wayPoints); x = grid.getNodeById(initNodeId).x; y = grid.getNodeById(initNodeId).y; currentNodeId = initNodeId; _direction = "Right"; _clip.addFrameScript(6, function ():void{ _clip.gotoAndPlay(1); }); _clip.addFrameScript(62, function ():void{ _clip.gotoAndPlay(57); }); state = new StateMachine(); state.addState("stand"); state.addState("walk"); state.addState("standChild"); state.addState("walkChild"); state.addState("takeChildLeft"); state.addState("takeChildRight"); state.addState("placeChildLeft"); state.addState("placeChildRight"); state.addState("work"); state.initialState = "stand"; _childInHand = null; } override public function set y(value:Number):void{ _clip.y = (value - 55); } public function set onBendFinishState(value:String):void{ var value = value; _onBendFinishState = value; _clip.addFrameScript(55, function ():void{ state.changeState(_onBendFinishState); }); } private function walk():void{ if (Utils.distBetween(this, currentPath[currentIndex]) < 10){ currentNodeId = currentPath[currentIndex].id; currentIndex++; if (currentIndex >= currentPath.length){ if (_childInHand == null){ state.changeState("stand"); } else { state.changeState("standChild"); }; x = currentPath[(currentIndex - 1)].x; y = currentPath[(currentIndex - 1)].y; dispatchEvent(new Event("walkCompleted")); return; }; nextNodeId = currentPath[currentIndex].id; dispatchEvent(new Event("nodeReached")); }; var xDist:Number = (currentPath[currentIndex].x - x); var yDist:Number = (currentPath[currentIndex].y - y); var angle:Number = Math.atan2(yDist, xDist); x = (x + (Math.cos(angle) * _speed)); y = (y + (Math.sin(angle) * _speed)); if (Utils.isBetween(Utils.toDegrees(angle), 60, 120) == true){ turn("Front"); } else { if (Utils.isBetween(Utils.toDegrees(angle), 150, 210) == true){ turn("Left"); } else { if (Utils.isBetween(Utils.toDegrees(angle), 240, 300) == true){ turn("Back"); } else { if (Utils.isBetween(Utils.toDegrees(angle), 330, 30) == true){ turn("Right"); }; }; }; }; } public function set onNextBend(value:Function):void{ _clip.addFrameScript(52, value); } public function get clip():MovieClip{ return (_clip); } public function update():void{ if (_oldDirection != _direction){ if (_childInHand != null){ _childInHand.direction = _direction; }; _oldDirection = _direction; }; switch (state.state){ case "stand": if (_clip.currentLabel != "stand"){ _clip.gotoAndPlay("stand"); }; _direction = "Front"; break; case "walk": if (_childInHand != null){ state.changeState("walkChild"); break; }; if ((((_direction == "Left")) || ((_direction == "Right")))){ _clip.scaleX = ((_direction)=="Left") ? -1 : 1; if (_clip.currentLabel != "walkSide"){ _clip.gotoAndPlay("walkSide"); }; } else { _clip.scaleX = 1; if (_clip.currentLabel != ("walk" + _direction)){ _clip.gotoAndPlay(("walk" + _direction)); }; }; walk(); break; case "walkChild": if ((((_direction == "Left")) || ((_direction == "Right")))){ _clip.scaleX = ((_direction)=="Left") ? -1 : 1; if (_clip.currentLabel != "walkSideChild"){ _clip.gotoAndPlay("walkSideChild"); }; } else { _clip.scaleX = 1; if (_clip.currentLabel != (("walk" + _direction) + "Child")){ _clip.gotoAndPlay((("walk" + _direction) + "Child")); }; }; walk(); break; case "standChild": _clip.scaleX = 1; if (_clip.currentLabel != "standFrontChild"){ _clip.gotoAndPlay("standFrontChild"); }; _direction = "Front"; break; case "takeChildLeft": _clip.scaleX = -1; if (_clip.currentLabel != "bendSide"){ _clip.gotoAndPlay("bendSide"); }; _direction = "Left"; break; case "takeChildRight": _clip.scaleX = 1; if (_clip.currentLabel != "bendSide"){ _clip.gotoAndPlay("bendSide"); }; _direction = "Right"; break; case "placeChildLeft": _clip.scaleX = -1; if (_clip.currentLabel != "bendSide"){ _clip.gotoAndPlay("bendSide"); }; _direction = "Left"; break; case "placeChildRight": _clip.scaleX = 1; if (_clip.currentLabel != "bendSide"){ _clip.gotoAndPlay("bendSide"); }; _direction = "Right"; break; case "work": _clip.scaleX = 1; if (_clip.currentLabel != "work"){ _clip.gotoAndPlay("work"); }; _direction = "Front"; break; }; } public function goto(nodeId:String):void{ targetNodeId = nodeId; if (currentNodeId == targetNodeId){ if (_childInHand == null){ state.changeState("stand"); } else { state.changeState("standChild"); }; dispatchEvent(new Event("walkCompleted")); return; }; currentPath = grid.getPathPoints(currentNodeId, targetNodeId); currentIndex = 0; state.changeState("walk"); } public function get child():Baby{ return (_childInHand); } override public function set x(value:Number):void{ _clip.x = (value - 15); } public function set child(value:Baby):void{ _childInHand = value; if (_childInHand != null){ MovieClip(_clip.getChildByName("childHolder_mc")).addChild(_childInHand.clip); }; } override public function get y():Number{ return ((_clip.y + 55)); } private function turn(direction:String):void{ _direction = direction; } override public function get x():Number{ return ((_clip.x + 15)); } } }//package com.csharks.vinod
Section 47
//Player_Character (com.csharks.vinod.Player_Character) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class Player_Character extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var childHolder_mc:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 48
//WorkingTable (com.csharks.vinod.WorkingTable) package com.csharks.vinod { import flash.events.*; import flash.display.*; import flash.utils.*; import com.csharks.juwalbose.cFlashtory.core.*; import com.inruntime.utils.*; public class WorkingTable extends MovieClip { private var DressTable:Class; private var _afterWork:Function; private var WashTable:Class; public var state:StateMachine; private var MedicineTable:Class; private var _child:Baby; private var clickCallback:Function; public var tableType:String; private var FoodTable:Class; public var levelInstanceId:uint; private var _clip:MovieClip; private var gameVars:Global; public function WorkingTable(tableType:String){ WashTable = WorkingTable_WashTable; DressTable = WorkingTable_DressTable; FoodTable = WorkingTable_FoodTable; MedicineTable = WorkingTable_MedicineTable; super(); gameVars = Global.getInstance(); this.tableType = tableType; switch (tableType){ case "wash": _clip = new WashTable(); break; case "food": _clip = new FoodTable(); break; case "dress": _clip = new DressTable(); break; case "medicine": _clip = new MedicineTable(); break; }; _clip.buttonMode = true; state = new StateMachine(); state.addState("idle"); state.addState("busy"); state.initialState = "idle"; } public function disableClick():void{ _clip.removeEventListener(MouseEvent.CLICK, tmpListener); } public function enableClick(callBack:Function):void{ clickCallback = callBack; _clip.addEventListener(MouseEvent.CLICK, tmpListener, false, 0, true); } override public function set x(value:Number):void{ _clip.x = value; } public function update():void{ switch (state.state){ case "idle": if (_clip.currentLabel != "idle"){ _clip.gotoAndStop("idle"); }; break; case "busy": if (_clip.currentLabel != "busy"){ _clip.gotoAndStop("busy"); }; break; }; } public function get clip():MovieClip{ return (_clip); } public function work():void{ var d:uint; state.changeState("busy"); d = setTimeout(function ():void{ clearTimeout(d); state.changeState("idle"); if (_afterWork != null){ _afterWork(); }; }, gameVars.workTime[tableType]); } public function set afterWork(value:Function):void{ _afterWork = value; } public function get child():Baby{ return (_child); } public function tmpListener(e:MouseEvent):void{ disableClick(); clickCallback(this); } override public function set y(value:Number):void{ _clip.y = value; } public function set child(value:Baby):void{ _child = value; if (value != null){ _clip.addChild(_child.clip); }; } override public function get y():Number{ return (_clip.y); } override public function get x():Number{ return (_clip.x); } } }//package com.csharks.vinod
Section 49
//WorkingTable_DressTable (com.csharks.vinod.WorkingTable_DressTable) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class WorkingTable_DressTable extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 50
//WorkingTable_FoodTable (com.csharks.vinod.WorkingTable_FoodTable) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class WorkingTable_FoodTable extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 51
//WorkingTable_MedicineTable (com.csharks.vinod.WorkingTable_MedicineTable) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class WorkingTable_MedicineTable extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 52
//WorkingTable_WashTable (com.csharks.vinod.WorkingTable_WashTable) package com.csharks.vinod { import flash.display.*; import mx.core.*; public class WorkingTable_WashTable extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var bedUnlock_txt:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var pillow_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var bedTopWood_mc:DisplayObject; public var bedBottomWood_mc:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package com.csharks.vinod
Section 53
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var priority:int; public var start:Number; public var prevNode:PropTween; public var change:Number; public var target:Object; public var name:String; public var property:String; public var nextNode:PropTween; public var isPlugin:Boolean; public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween=null, priority:int=0){ super(); this.target = target; this.property = property; this.start = start; this.change = change; this.name = name; this.isPlugin = isPlugin; if (nextNode){ nextNode.prevNode = this; this.nextNode = nextNode; }; this.priority = priority; } } }//package com.greensock.core
Section 54
//SimpleTimeline (com.greensock.core.SimpleTimeline) package com.greensock.core { public class SimpleTimeline extends TweenCore { public var autoRemoveChildren:Boolean; protected var _lastChild:TweenCore; protected var _firstChild:TweenCore; public function SimpleTimeline(vars:Object=null){ super(0, vars); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var dur:Number; var next:TweenCore; var tween:TweenCore = _firstChild; this.cachedTotalTime = time; this.cachedTime = time; while (tween) { next = tween.nextNode; if (((tween.active) || ((((((time >= tween.cachedStartTime)) && (!(tween.cachedPaused)))) && (!(tween.gc)))))){ if (!tween.cachedReversed){ tween.renderTime(((time - tween.cachedStartTime) * tween.cachedTimeScale), suppressEvents, false); } else { dur = (tween.cacheIsDirty) ? tween.totalDuration : tween.cachedTotalDuration; tween.renderTime((dur - ((time - tween.cachedStartTime) * tween.cachedTimeScale)), suppressEvents, false); }; }; tween = next; }; } public function addChild(tween:TweenCore):void{ if (((!(tween.gc)) && (tween.timeline))){ tween.timeline.remove(tween, true); }; tween.timeline = this; if (tween.gc){ tween.setEnabled(true, true); }; if (_firstChild){ _firstChild.prevNode = tween; }; tween.nextNode = _firstChild; _firstChild = tween; tween.prevNode = null; } public function remove(tween:TweenCore, skipDisable:Boolean=false):void{ if (tween.gc){ return; }; if (!skipDisable){ tween.setEnabled(false, true); }; if (tween.nextNode){ tween.nextNode.prevNode = tween.prevNode; } else { if (_lastChild == tween){ _lastChild = tween.prevNode; }; }; if (tween.prevNode){ tween.prevNode.nextNode = tween.nextNode; } else { if (_firstChild == tween){ _firstChild = tween.nextNode; }; }; } public function get rawTime():Number{ return (this.cachedTotalTime); } } }//package com.greensock.core
Section 55
//TweenCore (com.greensock.core.TweenCore) package com.greensock.core { import com.greensock.*; public class TweenCore { public var initted:Boolean; protected var _hasUpdate:Boolean; public var active:Boolean; protected var _delay:Number; public var cachedTime:Number; public var cachedReversed:Boolean; public var nextNode:TweenCore; protected var _rawPrevTime:Number;// = -1 public var vars:Object; public var cachedTotalTime:Number; public var timeline:SimpleTimeline; public var data; public var cachedStartTime:Number; public var prevNode:TweenCore; public var cachedDuration:Number; public var gc:Boolean; protected var _pauseTime:Number; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var cachedTimeScale:Number; public var cachedTotalDuration:Number; public static const version:Number = 1.13; protected static var _classInitted:Boolean; public function TweenCore(duration:Number=0, vars:Object=null){ super(); this.vars = ((vars) || ({})); this.cachedDuration = (this.cachedTotalDuration = ((duration) || (0))); _delay = ((this.vars.delay) || (0)); this.cachedTimeScale = ((this.vars.timeScale) || (1)); this.active = Boolean((((((duration == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false))))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; var tl:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (tl.cachedTotalTime + _delay); tl.addChild(this); if (this.vars.reversed){ this.cachedReversed = true; }; if (this.vars.paused){ this.paused = true; }; } public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ } public function get delay():Number{ return (_delay); } public function get duration():Number{ return (this.cachedDuration); } public function restart(includeDelay:Boolean=false, suppressEvents:Boolean=true):void{ this.reversed = false; this.paused = false; this.setTotalTime((includeDelay) ? -(_delay) : 0, suppressEvents); } public function set reversed(b:Boolean):void{ if (b != this.cachedReversed){ this.cachedReversed = b; setTotalTime(this.cachedTotalTime, true); }; } public function set startTime(n:Number):void{ var adjust:Boolean = Boolean(((!((this.timeline == null))) && (((!((n == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = n; if (adjust){ this.timeline.addChild(this); }; } public function set delay(n:Number):void{ this.startTime = (this.startTime + (n - _delay)); _delay = n; } public function resume():void{ this.paused = false; } public function get paused():Boolean{ return (this.cachedPaused); } public function play():void{ this.reversed = false; this.paused = false; } public function set duration(n:Number):void{ this.cachedDuration = (this.cachedTotalDuration = n); setDirtyCache(false); } public function complete(skipRender:Boolean=false, suppressEvents:Boolean=false):void{ if (!skipRender){ renderTime(this.cachedTotalDuration, suppressEvents, false); return; }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (!suppressEvents){ if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); } else { if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){ this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams); }; }; }; } public function invalidate():void{ } public function get totalTime():Number{ return (this.cachedTotalTime); } public function get reversed():Boolean{ return (this.cachedReversed); } public function get startTime():Number{ return (this.cachedStartTime); } public function set currentTime(n:Number):void{ setTotalTime(n, false); } protected function setDirtyCache(includeSelf:Boolean=true):void{ var tween:TweenCore = (includeSelf) ? this : this.timeline; while (tween) { tween.cacheIsDirty = true; tween = tween.timeline; }; } public function reverse(forceResume:Boolean=true):void{ this.reversed = true; if (forceResume){ this.paused = false; } else { if (this.gc){ this.setEnabled(true, false); }; }; } public function set paused(b:Boolean):void{ if (((!((b == this.cachedPaused))) && (this.timeline))){ if (b){ _pauseTime = this.timeline.rawTime; } else { this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime)); _pauseTime = NaN; setDirtyCache(false); }; this.cachedPaused = b; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(b)) && (this.gc))){ this.setTotalTime(this.cachedTotalTime, false); this.setEnabled(true, false); }; } public function kill():void{ setEnabled(false, false); } public function set totalTime(n:Number):void{ setTotalTime(n, false); } public function get currentTime():Number{ return (this.cachedTime); } protected function setTotalTime(time:Number, suppressEvents:Boolean=false):void{ var tlTime:Number; var dur:Number; if (this.timeline){ tlTime = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed){ dur = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = (tlTime - ((dur - time) / this.cachedTimeScale)); } else { this.cachedStartTime = (tlTime - (time / this.cachedTimeScale)); }; if (!this.timeline.cacheIsDirty){ setDirtyCache(false); }; if (this.cachedTotalTime != time){ renderTime(time, suppressEvents, false); }; }; } public function pause():void{ this.paused = true; } public function set totalDuration(n:Number):void{ this.duration = n; } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):Boolean{ if (enabled){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (((!(ignoreTimeline)) && (this.gc))){ this.timeline.addChild(this); }; } else { this.active = false; if (!ignoreTimeline){ this.timeline.remove(this, true); }; }; this.gc = !(enabled); return (false); } } }//package com.greensock.core
Section 56
//Back (com.greensock.easing.Back) package com.greensock.easing { public class Back { public function Back(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number, s:Number=1.70158):Number{ t = ((t / d) - 1); return (((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number, s:Number=1.70158):Number{ t = (t / d); return (((((c * t) * t) * (((s + 1) * t) - s)) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number, s:Number=1.70158):Number{ t = (t / (d * 0.5)); if (t < 1){ s = (s * 1.525); return ((((c * 0.5) * ((t * t) * (((s + 1) * t) - s))) + b)); }; t = (t - 2); s = (s * 1.525); return ((((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b)); } } }//package com.greensock.easing
Section 57
//Bounce (com.greensock.easing.Bounce) package com.greensock.easing { public class Bounce { public function Bounce(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ t = (t / d); if (t < (1 / 2.75)){ return (((c * ((7.5625 * t) * t)) + b)); }; if (t < (2 / 2.75)){ t = (t - (1.5 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.75)) + b)); }; if (t < (2.5 / 2.75)){ t = (t - (2.25 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.9375)) + b)); }; t = (t - (2.625 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.984375)) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{ return (((c - easeOut((d - t), 0, c, d)) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{ if (t < (d * 0.5)){ return (((easeIn((t * 2), 0, c, d) * 0.5) + b)); }; return ((((easeOut(((t * 2) - d), 0, c, d) * 0.5) + (c * 0.5)) + b)); } } }//package com.greensock.easing
Section 58
//Elastic (com.greensock.easing.Elastic) package com.greensock.easing { public class Elastic { private static const _2PI:Number = (Math.PI * 2); public function Elastic(){ super(); } public static function easeIn(t:Number, b:Number, c:Number, d:Number, a:Number=0, p:Number=0):Number{ var s:Number; if (t == 0){ return (b); }; t = (t / d); if (t == 1){ return ((b + c)); }; if (!p){ p = (d * 0.3); }; if (((((!(a)) || ((((c > 0)) && ((a < c)))))) || ((((c < 0)) && ((a < -(c))))))){ a = c; s = (p / 4); } else { s = ((p / _2PI) * Math.asin((c / a))); }; --t; return ((-(((a * Math.pow(2, (10 * t))) * Math.sin(((((t * d) - s) * _2PI) / p)))) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number, a:Number=0, p:Number=0):Number{ var s:Number; if (t == 0){ return (b); }; t = (t / (d * 0.5)); if (t == 2){ return ((b + c)); }; if (!p){ p = (d * (0.3 * 1.5)); }; if (((((!(a)) || ((((c > 0)) && ((a < c)))))) || ((((c < 0)) && ((a < -(c))))))){ a = c; s = (p / 4); } else { s = ((p / _2PI) * Math.asin((c / a))); }; if (t < 1){ --t; return (((-0.5 * ((a * Math.pow(2, (10 * t))) * Math.sin(((((t * d) - s) * _2PI) / p)))) + b)); }; --t; return ((((((a * Math.pow(2, (-10 * t))) * Math.sin(((((t * d) - s) * _2PI) / p))) * 0.5) + c) + b)); } public static function easeOut(t:Number, b:Number, c:Number, d:Number, a:Number=0, p:Number=0):Number{ var s:Number; if (t == 0){ return (b); }; t = (t / d); if (t == 1){ return ((b + c)); }; if (!p){ p = (d * 0.3); }; if (((((!(a)) || ((((c > 0)) && ((a < c)))))) || ((((c < 0)) && ((a < -(c))))))){ a = c; s = (p / 4); } else { s = ((p / _2PI) * Math.asin((c / a))); }; return (((((a * Math.pow(2, (-10 * t))) * Math.sin(((((t * d) - s) * _2PI) / p))) + c) + b)); } } }//package com.greensock.easing
Section 59
//Linear (com.greensock.easing.Linear) package com.greensock.easing { public class Linear { public static const power:uint = 0; public function Linear(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeNone(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{ return ((((c * t) / d) + b)); } } }//package com.greensock.easing
Section 60
//TweenLite (com.greensock.TweenLite) package com.greensock { import flash.events.*; import flash.display.*; import flash.utils.*; import com.greensock.core.*; import com.greensock.plugins.*; public class TweenLite extends TweenCore { protected var _hasPlugins:Boolean; public var propTweenLookup:Object; public var cachedPT1:PropTween; protected var _overwrite:uint; protected var _ease:Function; public var target:Object; public var ratio:Number;// = 0 protected var _overwrittenProps:Object; protected var _notifyPluginsOfEnabled:Boolean; public static const version:Number = 11.32; public static var rootTimeline:SimpleTimeline; public static var fastEaseLookup:Dictionary = new Dictionary(false); public static var onPluginEvent:Function; public static var rootFramesTimeline:SimpleTimeline; public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var masterList:Dictionary = new Dictionary(false); public static var overwriteManager:Object; public static var rootFrame:Number; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _shape:Shape = new Shape(); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1}; public function TweenLite(target:Object, duration:Number, vars:Object){ var sibling:TweenLite; super(duration, vars); this.target = target; if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){ this.cachedTimeScale = 1; }; propTweenLookup = {}; _ease = defaultEase; _overwrite = (((!((Number(vars.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((vars.overwrite > 1)))))) ? overwriteManager.mode : int(vars.overwrite); var a:Array = masterList[target]; if (!a){ masterList[target] = [this]; } else { if (_overwrite == 1){ for each (sibling in a) { if (!sibling.gc){ sibling.setEnabled(false, false); }; }; masterList[target] = [this]; } else { a[a.length] = this; }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } protected function easeProxy(t:Number, b:Number, c:Number, d:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var isComplete:Boolean; var prevTime:Number = this.cachedTime; if (time >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); this.ratio = 1; isComplete = true; if (this.cachedDuration == 0){ if ((((((time == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == time))))){ force = true; }; _rawPrevTime = time; }; } else { if (time <= 0){ this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (time < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ force = true; isComplete = true; }; _rawPrevTime = time; }; }; if (((this.cachedReversed) && (!((prevTime == 0))))){ isComplete = true; }; } else { this.cachedTotalTime = (this.cachedTime = time); this.ratio = _ease(time, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == prevTime)) && (!(force)))){ return; }; if (!this.initted){ init(); if (((!(isComplete)) && (this.cachedTime))){ this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if ((((((((prevTime == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(suppressEvents)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; var pt:PropTween = this.cachedPT1; while (pt) { pt.target[pt.property] = (pt.start + (this.ratio * pt.change)); pt = pt.nextNode; }; if (((_hasUpdate) && (!(suppressEvents)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (isComplete){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, suppressEvents); }; } override public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):Boolean{ var a:Array; if (enabled){ a = TweenLite.masterList[this.target]; if (!a){ TweenLite.masterList[this.target] = [this]; } else { a[a.length] = this; }; }; super.setEnabled(enabled, ignoreTimeline); if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ return (onPluginEvent((enabled) ? "onEnable" : "onDisable", this)); }; return (false); } protected function init():void{ var p:String; var i:int; var plugin:*; var prioritize:Boolean; var siblings:Array; var pt:PropTween; if (this.vars.onInit){ this.vars.onInit.apply(null, this.vars.onInitParams); }; if (typeof(this.vars.ease) == "function"){ _ease = this.vars.ease; }; if (this.vars.easeParams){ this.vars.proxiedEase = _ease; _ease = easeProxy; }; this.cachedPT1 = null; this.propTweenLookup = {}; for (p in this.vars) { if ((((p in _reservedProps)) && (!((((p == "timeScale")) && ((this.target is TweenCore))))))){ } else { if ((((p in plugins)) && (new ((plugins[p] as Class)).onInitTween(this.target, this.vars[p], this)))){ this.cachedPT1 = new PropTween(plugin, "changeFactor", 0, 1, ((plugin.overwriteProps.length)==1) ? plugin.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); if (this.cachedPT1.name == "_MULTIPLE_"){ i = plugin.overwriteProps.length; while (--i > -1) { this.propTweenLookup[plugin.overwriteProps[i]] = this.cachedPT1; }; } else { this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; }; if (plugin.priority){ this.cachedPT1.priority = plugin.priority; prioritize = true; }; if (((plugin.onDisable) || (plugin.onEnable))){ _notifyPluginsOfEnabled = true; }; _hasPlugins = true; } else { this.cachedPT1 = new PropTween(this.target, p, Number(this.target[p]), ((typeof(this.vars[p]))=="number") ? (Number(this.vars[p]) - this.target[p]) : Number(this.vars[p]), p, false, this.cachedPT1); this.propTweenLookup[p] = this.cachedPT1; }; }; }; if (prioritize){ onPluginEvent("onInit", this); }; if (this.vars.runBackwards){ pt = this.cachedPT1; while (pt) { pt.start = (pt.start + pt.change); pt.change = -(pt.change); pt = pt.nextNode; }; }; _hasUpdate = Boolean(!((this.vars.onUpdate == null))); if (_overwrittenProps){ killVars(_overwrittenProps); if (this.cachedPT1 == null){ this.setEnabled(false, false); }; }; if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((siblings.length > 1)))){ if (overwriteManager.manageOverwrites(this, this.propTweenLookup, siblings, _overwrite)){ init(); }; }; this.initted = true; } public function killVars(vars:Object, permanent:Boolean=true):Boolean{ var p:String; var pt:PropTween; var changed:Boolean; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (p in vars) { if ((p in propTweenLookup)){ pt = propTweenLookup[p]; if (((pt.isPlugin) && ((pt.name == "_MULTIPLE_")))){ pt.target.killProps(vars); if (pt.target.overwriteProps.length == 0){ pt.name = ""; }; }; if (pt.name != "_MULTIPLE_"){ if (pt.nextNode){ pt.nextNode.prevNode = pt.prevNode; }; if (pt.prevNode){ pt.prevNode.nextNode = pt.nextNode; } else { if (this.cachedPT1 == pt){ this.cachedPT1 = pt.nextNode; }; }; if (((pt.isPlugin) && (pt.target.onDisable))){ pt.target.onDisable(); if (pt.target.activeDisable){ changed = true; }; }; delete propTweenLookup[p]; }; }; if (((permanent) && (!((vars == _overwrittenProps))))){ _overwrittenProps[p] = 1; }; }; return (changed); } override public function invalidate():void{ if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ onPluginEvent("onDisable", this); }; this.cachedPT1 = null; _overwrittenProps = null; _hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false))); this.propTweenLookup = {}; } public static function initClass():void{ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.cachedStartTime = (getTimer() * 0.001); rootFramesTimeline.cachedStartTime = rootFrame; rootTimeline.autoRemoveChildren = true; rootFramesTimeline.autoRemoveChildren = true; _shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function killTweensOf(target:Object, complete:Boolean=false, vars:Object=null):void{ var a:Array; var i:int; var tween:TweenLite; if ((target in masterList)){ a = masterList[target]; i = a.length; while (--i > -1) { tween = a[i]; if (!tween.gc){ if (complete){ tween.complete(false, false); }; if (vars != null){ tween.killVars(vars); }; if ((((vars == null)) || ((((tween.cachedPT1 == null)) && (tween.initted))))){ tween.setEnabled(false, false); }; }; }; if (vars == null){ delete masterList[target]; }; }; } public static function from(target:Object, duration:Number, vars:Object):TweenLite{ vars.runBackwards = true; if (!("immediateRender" in vars)){ vars.immediateRender = true; }; return (new TweenLite(target, duration, vars)); } protected static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ t = (1 - (t / d)); return ((1 - (t * t))); } public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array=null, useFrames:Boolean=false):TweenLite{ return (new TweenLite(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, immediateRender:false, useFrames:useFrames, overwrite:0})); } protected static function updateAll(e:Event=null):void{ var ml:Dictionary; var tgt:Object; var a:Array; var i:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false); rootFrame++; rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false); if (!(rootFrame % 60)){ ml = masterList; for (tgt in ml) { a = ml[tgt]; i = a.length; while (--i > -1) { if (TweenLite(a[i]).gc){ a.splice(i, 1); }; }; if (a.length == 0){ delete ml[tgt]; }; }; }; } public static function to(target:Object, duration:Number, vars:Object):TweenLite{ return (new TweenLite(target, duration, vars)); } } }//package com.greensock
Section 61
//Global (com.inruntime.utils.Global) package com.inruntime.utils { import flash.events.*; import flash.utils.*; public dynamic class Global extends Proxy implements IEventDispatcher { private var globalKeychain:GlobalHashMap; private var globalIncrement:int;// = 1 private var globalRepository:GlobalHashMap; private var dispatcher:EventDispatcher; private static var allowInstantiation:Boolean = false; private static var instance:Global = null; public function Global(useWeakReferences:Boolean=true){ super(); if (!allowInstantiation){ throw (new Error("Error: Instantiation failed: Use Global.getInstance() instead of new Global().")); }; globalRepository = new GlobalHashMap(useWeakReferences); globalKeychain = new GlobalHashMap(useWeakReferences); dispatcher = new EventDispatcher(this); } public function containsKey(name:String):Boolean{ var retval:Boolean = globalRepository.containsKey(name); return (retval); } public function remove(name:String):void{ globalRepository.remove(name); globalKeychain.remove(name); } public function willTrigger(type:String):Boolean{ return (dispatcher.willTrigger(type)); } public function take(name){ return (globalRepository.getValue(name)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ return (globalRepository.getValue(name)); } public function put(name:String, value):void{ globalRepository.put(name, value); } public function getId(name:String):int{ return (globalKeychain.getValue(name)); } public function containsValue(value):Boolean{ var retval:Boolean = globalRepository.containsValue(value); return (retval); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(methodName, ... _args){ var result:*; switch (methodName.toString()){ default: result = globalRepository.getValue(methodName).apply(globalRepository, _args); break; }; return (result); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(index:int):int{ if (index < (globalIncrement - 1)){ if (containsId((index + 1))){ return ((index + 1)); }; return (nextNameIndex((index + 1))); //unresolved jump }; return (0); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(name, value):void{ var oldValue:* = globalRepository.getValue(name); if (!oldValue){ globalKeychain.put(name, globalIncrement.toString()); globalIncrement++; }; globalRepository.put(name, value); if (oldValue !== value){ dispatchEvent(new GlobalEvent(GlobalEvent.PROPERTY_CHANGED, name)); }; } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ dispatcher.removeEventListener(type, listener, useCapture); } public function containsId(id:int):Boolean{ var retval:Boolean = globalKeychain.containsValue(id); return (retval); } public function clear():void{ globalRepository.clear(); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(index:int):String{ return (getKey(index)); } public function dispatchEvent(evt:Event):Boolean{ return (dispatcher.dispatchEvent(evt)); } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ dispatcher.addEventListener(type, listener, useCapture, priority); } public function get length():int{ var retval:int = globalRepository.size(); return (retval); } public function getKey(id:int):String{ return (globalKeychain.getKey(id)); } public function toString():String{ var key:*; var temp:Array = new Array(); for (key in globalRepository) { if (globalRepository[key] != null){ temp.push((((("{" + key) + ":") + globalRepository[key]) + "}")); }; }; return (temp.join(",")); } public function hasEventListener(type:String):Boolean{ return (dispatcher.hasEventListener(type)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(index:int){ var prop:String = getKey(index); return (globalRepository.getValue(prop)); } public static function getInstance(useWeakReferences:Boolean=true):Global{ if (Global.instance == null){ Global.allowInstantiation = true; Global.instance = new Global(useWeakReferences); Global.allowInstantiation = false; }; return (Global.instance); } } }//package com.inruntime.utils import flash.utils.*; dynamic class GlobalHashMap extends Dictionary { private function GlobalHashMap(useWeakReferences:Boolean=true){ super(useWeakReferences); } public function containsKey(key:String):Boolean{ return (!((this[key] == null))); } public function size():int{ var prop:String; var size:int; for (prop in this) { if (this[prop] != null){ size++; }; }; return (size); } public function containsValue(value):Boolean{ var prop:String; for (prop in this) { if (this[prop] == value){ return (true); }; }; return (false); } public function remove(key:String):void{ this[key] = null; } public function getKey(value):String{ var prop:String; for (prop in this) { if (this[prop] == value){ return (prop); }; }; return (null); } public function isEmpty():Boolean{ var prop:String; var size:int; for (prop in this) { if (this[prop] != null){ size++; }; }; return ((size <= 0)); } public function getValue(key:String){ if (this[key] != null){ return (this[key]); }; } public function clear():void{ var prop:String; for (prop in this) { this[prop] = null; }; } public function put(key:String, value):void{ this[key] = value; } }
Section 62
//GlobalEvent (com.inruntime.utils.GlobalEvent) package com.inruntime.utils { import flash.events.*; public class GlobalEvent extends Event { public var property; public static const PROPERTY_CHANGED:String = "globalPropertyChanged"; public function GlobalEvent(type:String, property, bubbles:Boolean=false, cancelable:Boolean=false){ this.property = property; super(type, bubbles, cancelable); } override public function clone():Event{ return (new GlobalEvent(type, property, bubbles, cancelable)); } } }//package com.inruntime.utils
Section 63
//KeyObject (com.senocular.utils.KeyObject) package com.senocular.utils { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.ui.*; public dynamic class KeyObject extends Proxy { private static var keysDown:Object; private static var stage:Stage; public function KeyObject(stage:Stage){ super(); construct(stage); } private function keyReleased(evt:KeyboardEvent):void{ delete keysDown[evt.keyCode]; } public function deconstruct():void{ stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased); keysDown = new Object(); KeyObject.stage = null; } public function construct(stage:Stage):void{ KeyObject.stage = stage; keysDown = new Object(); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased); } private function keyPressed(evt:KeyboardEvent):void{ keysDown[evt.keyCode] = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ return (((name in Keyboard)) ? Keyboard[name] : -1); } public function isDown(keyCode:uint):Boolean{ return (Boolean((keyCode in keysDown))); } } }//package com.senocular.utils
Section 64
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public function MochiAd(){ super(); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showClickAwayAd(options:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = options; var DEFAULTS:Object = {ad_timeout:5500, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (width:Number, height:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (callbackID:Number, arg:Object):void{ MochiAd.rpc(clip, callbackID, arg); }; chk["onEnterFrame"] = function ():void{ var total:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var ad_clip:Object = this.parent._mochiad_ctr; var elapsed:Number = (getTimer() - this.started); var finished:Boolean; if (!chk.showing){ total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (total > 0){ chk.showing = true; finished = true; chk.started = getTimer(); } else { if (elapsed > chk.ad_timeout){ options.ad_failed(); finished = true; }; }; }; if (this.root == null){ finished = true; }; if (finished){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(server:String):String{ var hostname:String = server.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (hostname); }; Security.allowDomain("*"); Security.allowDomain(hostname); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(hostname); return (hostname); } public static function unload(clip:Object):Boolean{ if (((clip.clip) && (clip.clip._mochiad))){ clip = clip.clip; }; if (clip.origFrameRate != undefined){ clip.stage.frameRate = clip.origFrameRate; }; if (!clip._mochiad){ return (false); }; if (clip._mochiad._containerLCName != undefined){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"}); }; if (clip._mochiad.onUnload){ clip._mochiad.onUnload(); }; delete clip._mochiad_loaded; delete clip._mochiad; return (true); } public static function showInterLevelAd(options:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = options; var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (width:Number, height:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var p:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (p > 0){ this.parent.alpha = (p * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (msec:Number):void{ var _chk:Object = mc._mochiad_wait; _chk.server_control = true; _chk.showing = true; _chk.started = getTimer(); _chk.ad_msec = (msec - 250); }; mc.rpc = function (callbackID:Number, arg:Object):void{ MochiAd.rpc(clip, callbackID, arg); }; chk["onEnterFrame"] = function ():void{ var total:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var ad_clip:Object = this.parent._mochiad_ctr; var elapsed:Number = (getTimer() - this.started); var finished:Boolean; if (!chk.showing){ total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (total > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (elapsed > chk.ad_timeout){ options.ad_failed(); finished = true; }; }; }; if (elapsed > chk.ad_msec){ finished = true; }; if (finished){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(options:Object, defaults:Object):Object{ var k:String; var pairs:Array; var i:Number; var kv:Array; var optcopy:Object = {}; for (k in defaults) { optcopy[k] = defaults[k]; }; if (options){ for (k in options) { optcopy[k] = options[k]; }; }; if (optcopy.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; options = optcopy.clip.loaderInfo.parameters.mochiad_options; if (options){ pairs = options.split("&"); i = 0; while (i < pairs.length) { kv = pairs[i].split("="); optcopy[unescape(kv[0])] = unescape(kv[1]); i++; }; }; if (optcopy.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (optcopy); } public static function _cleanup(mc:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = mc; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ lc.client = null; lc.close(); //unresolved jump var _slot1 = e; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(options:Object):MovieClip{ var clip:Object; var mc:MovieClip; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = options; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!(clip is DisplayObject)){ trace("Warning: Object passed as container clip not a descendant of the DisplayObject type"); return (null); }; if (MovieClip(clip).stage == null){ trace("Warning: Container clip for ad is not attached to the stage"); return (null); }; if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip._mochiad_loaded){ return (null); }; //unresolved jump var _slot1 = e; throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); var depth:Number = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); mc.regContLC = function (lc_name:String):void{ mc._containerLCName = lc_name; }; loader = new Loader(); g = function (ev:Object):void{ ev.target.removeEventListener(ev.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (io:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); if (!options.skip){ loader.load(req); }; mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(base:Object, methodName:String, argsArray:Array):Object{ var nameArray:Array = methodName.split("."); var i:Number = 0; while (i < (nameArray.length - 1)) { if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){ return (undefined); }; base = base[nameArray[i]]; i++; }; if (typeof(base[nameArray[i]]) == "function"){ return (base[nameArray[i]].apply(base, argsArray)); }; return (undefined); } public static function createEmptyMovieClip(parent:Object, name:String, depth:Number):MovieClip{ var mc:MovieClip = new MovieClip(); if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; parent[name] = mc; mc["_name"] = name; return (mc); } public static function _getRes(options:Object, clip:Object):Array{ var xy:Array; var b:Object = clip.getBounds(clip.root); var w:Number = 0; var h:Number = 0; if (typeof(options.res) != "undefined"){ xy = options.res.split("x"); w = parseFloat(xy[0]); h = parseFloat(xy[1]); } else { w = (b.right - b.left); h = (b.top - b.bottom); }; if ((((w == 0)) || ((h == 0)))){ w = clip.stage.stageWidth; h = clip.stage.stageHeight; }; return ([w, h]); } public static function adShowing(mc:Object):void{ mc.origFrameRate = mc.stage.frameRate; mc.stage.frameRate = 30; } public static function getValue(base:Object, objectName:String):Object{ var nameArray:Array = objectName.split("."); var i:Number = 0; while (i < (nameArray.length - 1)) { if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){ return (undefined); }; base = base[nameArray[i]]; i++; }; return (base[nameArray[i]]); } public static function rpc(clip:Object, callbackID:Number, arg:Object):void{ var _local4:Object; var _local5:Object; switch (arg.id){ case "setValue": MochiAd.setValue(clip, arg.objectName, arg.value); break; case "getValue": _local4 = MochiAd.getValue(clip, arg.objectName); clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(clip, arg.method, arg.args); clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + arg.id)); }; } public static function setValue(base:Object, objectName:String, value:Object):void{ var nameArray:Array = objectName.split("."); var i:Number = 0; while (i < (nameArray.length - 1)) { if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){ return; }; base = base[nameArray[i]]; i++; }; base[nameArray[i]] = value; } public static function showPreGameAd(options:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = options; var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (width:Number, height:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (percent:Number):void{ }, progress_override:function (_clip:Object):Number{ return (NaN); }, bar_offset:0}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; if (options.skip){ ad_timeout = 0; }; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = (10 + options.bar_offset); bar.y = (h - 20); }; var bar_w:Number = ((w - bar.x) - 10); var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo(bar_w, 0); backing.lineTo(bar_w, 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo(bar_w, 0); inside.lineTo(bar_w, 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo(bar_w, 0); outline.lineTo(bar_w, 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var p:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (p > 0){ this.parent.alpha = (p * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var progress:Number = Math.min(1, options.progress_override(clip)); var f:Function = function (ev:Event):void{ ev.target.removeEventListener(ev.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (msec:Number):void{ var _chk:Object = mc._mochiad_wait; _chk.server_control = true; _chk.showing = true; _chk.started = getTimer(); _chk.ad_msec = msec; }; mc.rpc = function (callbackID:Number, arg:Object):void{ MochiAd.rpc(clip, callbackID, arg); }; mc.rpcTestFn = function (s:String):Object{ trace(("[MOCHIAD rpcTestFn] " + s)); return (s); }; sendHostProgress = false; mc.sendHostLoadProgress = function (lc_name:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var total:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _clip:Object = this.parent.parent.root; var ad_clip:Object = this.parent._mochiad_ctr; var elapsed:Number = (getTimer() - this.started); var finished:Boolean; var clip_total:Number = _clip.loaderInfo.bytesTotal; var clip_loaded:Number = _clip.loaderInfo.bytesLoaded; var clip_progress:Number = Math.min(1, options.progress_override(_clip)); if (clip_progress == 1){ complete = true; }; if (complete){ clip_loaded = Math.max(1, clip_loaded); clip_total = clip_loaded; }; var clip_pcnt:Number = ((100 * clip_loaded) / clip_total); if (!isNaN(clip_progress)){ clip_pcnt = (100 * clip_progress); }; var ad_pcnt:Number = ((100 * elapsed) / chk.ad_msec); var _inside:Object = this._mochiad_bar._inside; var pcnt:Number = Math.min(100, Math.min(((clip_pcnt) || (0)), ad_pcnt)); pcnt = Math.max(this.last_pcnt, pcnt); this.last_pcnt = pcnt; _inside.scaleX = (pcnt * 0.01); options.ad_progress(pcnt); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:clip_pcnt}); if (clip_pcnt >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (total > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((elapsed > chk.ad_timeout)) && ((clip_pcnt == 100)))){ options.ad_failed(); finished = true; }; }; }; if (elapsed > chk.ad_msec){ finished = true; }; if (((complete) && (finished))){ if (unloaded){ MochiAd.unload(_clip); } else { if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(options:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(options); } public static function showTimedAd(options:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(options); } public static function doOnEnterFrame(mc:MovieClip):void{ var mc = mc; var f:Function = function (ev:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { ev.target.removeEventListener(ev.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 65
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _inventory:MochiInventory; public function MochiCoins(){ super(); } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(options:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:options}, null, null); } public static function requestFunding(properties:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFunding", properties); } public static function showItem(options:Object=null):void{ if (((!(options)) || (!((typeof(options.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:options}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(options:Object=null):void{ if (((!(options)) || (!((typeof(options.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:options}, null, null); } addEventListener(MochiSocial.LOGGED_IN, function (args:Object):void{ _inventory = new MochiInventory(); }); addEventListener(MochiSocial.LOGGED_OUT, function (args:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 66
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(digit:Number=0, index:uint=0):void{ super(); Encoder = 0; setValue(digit, index); } public function reencode():void{ var newEncode:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (newEncode ^ Encoder)); Encoder = newEncode; } public function set value(v:Number):void{ setValue(v); } public function toString():String{ var s:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ s = (s + Sibling.toString()); }; return (s); } public function setValue(digit:Number=0, index:uint=0):void{ var s:String = digit.toString(); var _temp1 = index; index = (index + 1); Fragment = (s.charCodeAt(_temp1) ^ Encoder); if (index < s.length){ Sibling = new MochiDigits(digit, index); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(inc:Number):void{ value = (value + inc); } } }//package mochi.as3
Section 67
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ super(); eventTable = {}; } public function triggerEvent(event:String, args:Object):void{ var i:Object; if (eventTable[event] == undefined){ return; }; for (i in eventTable[event]) { var _local6 = eventTable[event]; _local6[i](args); }; } public function removeEventListener(event:String, delegate:Function):void{ var s:Object; if (eventTable[event] == undefined){ eventTable[event] = []; return; }; for (s in eventTable[event]) { if (eventTable[event][s] != delegate){ } else { eventTable[event].splice(Number(s), 1); }; }; } public function addEventListener(event:String, delegate:Function):void{ removeEventListener(event, delegate); eventTable[event].push(delegate); } } }//package mochi.as3
Section 68
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public function MochiEvents(){ super(); } public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } public static function trackEvent(tag:String, value=null):void{ MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function startSession(achievementID:String):void{ MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null); } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function setNotifications(clip:MovieClip, style:Object):void{ var s:Object; var args:Object = {}; for (s in style) { args[s] = style[s]; }; args.clip = clip; MochiServices.send("events_setNotifications", args, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(tag:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null); } } }//package mochi.as3
Section 69
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _syncID:Number; private var _consumableProperties:Object; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ super(); MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(event:Object):void{ if (!this[(event.id + KEY_SALT)]){ this[(event.id + KEY_SALT)] = 0; }; if (!this[event.id]){ this[event.id] = 0; }; this[(event.id + KEY_SALT)] = (this[(event.id + KEY_SALT)] + event.count); this[event.id] = (this[event.id] + event.count); if (((event.privateProperties) && (event.privateProperties.consumable))){ if (!this[event.privateProperties.tag]){ this[event.privateProperties.tag] = 0; }; this[event.privateProperties.tag] = (this[event.privateProperties.tag] + (event.privateProperties.inc * event.count)); }; } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[name]){ return (MochiDigits(_consumableProperties[name]).value); }; return (undefined); } private function loggedIn(args:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(name):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[name] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(index:int):int{ return (((index)>=_names.length) ? 0 : (index + 1)); } private function putConsumableBag(userData:MochiUserData):void{ _syncPending = false; if (userData.error){ triggerEvent(ERROR, {type:IO_ERROR, error:userData.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(name, value):void{ var d:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(value is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:value}); return; }; if (_consumableProperties[name]){ d = MochiDigits(_consumableProperties[name]); if (d.value == value){ return; }; d.value = value; } else { _names.push(name); _consumableProperties[name] = new MochiDigits(value); }; _syncID++; } private function itemOwned(event:Object):void{ _storeSync[event.id] = {properties:event.properties, count:event.count}; } private function sync(e:Event=null):void{ var key:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; var output:Object = {}; for (key in _consumableProperties) { output[key] = MochiDigits(_consumableProperties[key]).value; }; MochiUserData.put(CONSUMER_KEY, output, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(index:int):String{ return (_names[(index - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(name):Boolean{ if (!_consumableProperties[name]){ return (false); }; _names.splice(_names.indexOf(name), 1); delete _consumableProperties[name]; return (true); } private function getConsumableBag(userData:MochiUserData):void{ var key:String; var unsynced:Number; if (userData.error){ triggerEvent(ERROR, {type:IO_ERROR, error:userData.error}); return; }; _consumableProperties = {}; _names = new Array(); if (userData.data){ for (key in userData.data) { _names.push(key); _consumableProperties[key] = new MochiDigits(userData.data[key]); }; }; for (key in _storeSync) { unsynced = _storeSync[key].count; if (_consumableProperties[(key + KEY_SALT)]){ unsynced = (unsynced - _consumableProperties[(key + KEY_SALT)].value); }; if (unsynced == 0){ } else { newItems({id:key, count:unsynced, properties:_storeSync[key].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(args:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } } }//package mochi.as3
Section 70
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public function MochiScores(){ super(); } public static function showLeaderboard(options:Object=null):void{ var n:Number; var options = options; if (options != null){ delete options.clip; MochiServices.setContainer(); MochiServices.bringToTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.warnID(options.boardID, true); trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(callbackObj:Object, callbackMethod:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod); } public static function requestList(callbackObj:Object, callbackMethod:Object=null):void{ MochiServices.send("scores_requestList", null, callbackObj, callbackMethod); } public static function scoresArrayToObjects(scores:Object):Object{ var i:Number; var j:Number; var o:Object; var row_obj:Object; var item:String; var param:String; var so:Object = {}; for (item in scores) { if (typeof(scores[item]) == "object"){ if (((!((scores[item].cols == null))) && (!((scores[item].rows == null))))){ so[item] = []; o = scores[item]; j = 0; while (j < o.rows.length) { row_obj = {}; i = 0; while (i < o.cols.length) { row_obj[o.cols[i]] = o.rows[j][i]; i++; }; so[item].push(row_obj); j++; }; } else { so[item] = {}; for (param in scores[item]) { so[item][param] = scores[item][param]; }; }; } else { so[item] = scores[item]; }; }; return (so); } public static function submit(score:Number, name:String, callbackObj:Object=null, callbackMethod:Object=null):void{ score = Number(score); if (isNaN(score)){ trace((("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((score == Number.NEGATIVE_INFINITY)) || ((score == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(score) != score){ trace((("WARNING: Submitted score '" + String(score)) + "' will be truncated")); }; score = Number(score); }; }; MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod); } public static function onClose(args:Object=null):void{ if (((((args) && ((args.error == true)))) && (onErrorHandler))){ if (args.errorCode == null){ args.errorCode = "IOError"; }; onErrorHandler(args.errorCode); MochiServices.doClose(); return; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(boardID:String):void{ MochiServices.warnID(boardID, true); MochiScores.boardID = boardID; MochiServices.send("scores_setBoardID", {boardID:boardID}); } } }//package mochi.as3
Section 71
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.geom.*; import flash.net.*; public class MochiServices { public static const CONNECTED:String = "onConnected"; private static var _container:Object; private static var _connected:Boolean = false; private static var _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var _callbacks:Object; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public function MochiServices(){ super(); } public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(pkg:Object):void{ var methodName:String; var pkg = pkg; var cb:String = pkg.callbackID; var cblst:Object = _callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ method.apply(obj, pkg.args); //unresolved jump var _slot1 = error; trace(((("Error invoking callback method '" + methodName) + "': ") + _slot1.toString())); } else { if (obj != null){ obj(pkg.args); //unresolved jump var _slot1 = error; trace(("Error invoking method on object: " + _slot1.toString())); }; }; delete _callbacks[cb]; } public static function send(methodName:String, args:Object=null, callbackObject:Object=null, callbackMethod:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName)); handleError(args, callbackObject, callbackMethod); flush(true); return; }; _queue.push({methodName:methodName, args:args, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod}; _nextCallbackID++; }; }; } private static function init(id:String, clip:Object):void{ _id = id; if (clip != null){ _container = clip; loadCommunicator(id, _container); }; } private static function clickMovie(url:String, cb:Function):MovieClip{ var b:int; var loader:Loader; var avm1_bytecode:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var header:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var footer:Array = [0, 64, 0, 0, 0]; var mc:MovieClip = new MovieClip(); var lc:LocalConnection = new LocalConnection(); var lc_name:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); lc = new LocalConnection(); mc.lc = lc; mc.click = cb; lc.client = mc; lc.connect(lc_name); var ba:ByteArray = new ByteArray(); var cpool:ByteArray = new ByteArray(); cpool.endian = Endian.LITTLE_ENDIAN; cpool.writeShort(1); cpool.writeUTFBytes(((url + " ") + lc_name)); cpool.writeByte(0); var actionLength:uint = ((avm1_bytecode.length + cpool.length) + 4); var fileLength:uint = (actionLength + 35); ba.endian = Endian.LITTLE_ENDIAN; ba.writeUTFBytes("FWS"); ba.writeByte(8); ba.writeUnsignedInt(fileLength); for each (b in header) { ba.writeByte(b); }; ba.writeUnsignedInt(actionLength); ba.writeByte(136); ba.writeShort(cpool.length); ba.writeBytes(cpool); for each (b in avm1_bytecode) { ba.writeByte(b); }; for each (b in footer) { ba.writeByte(b); }; loader = new Loader(); loader.loadBytes(ba); mc.addChild(loader); return (mc); } private static function detach(event:Event):void{ var loader:LoaderInfo = LoaderInfo(event.target); loader.removeEventListener(Event.COMPLETE, detach); loader.removeEventListener(IOErrorEvent.IO_ERROR, detach); loader.removeEventListener(Event.COMPLETE, loadLCBridgeComplete); loader.removeEventListener(IOErrorEvent.IO_ERROR, loadError); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } private static function loadLCBridgeComplete(e:Event):void{ var loader:Loader = LoaderInfo(e.target).loader; _mochiLocalConnection = MovieClip(loader.content); listen(); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); _mochiLocalConnection.close(); //unresolved jump var _slot1 = error; }; if (_timer != null){ _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; //unresolved jump var _slot1 = error; }; } public static function allowDomains(server:String):String{ var hostname:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (server.indexOf("http://") != -1){ hostname = server.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(hostname); Security.allowInsecureDomain(hostname); }; }; return (hostname); } public static function getVersion():String{ return ("3.9.1 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } public static function warnID(bid:String, leaderboard:Boolean):void{ bid = bid.toLowerCase(); if (bid.length != 16){ trace((("WARNING: " + (leaderboard) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (bid == "1e113c7239048b3f"){ if (leaderboard){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (bid == "84993a1de4031cd8"){ if (leaderboard){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; var i:Number = 0; while (i < bid.length) { switch (bid.charAt(i)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + bid)); return; }; i++; }; } private static function flush(error:Boolean):void{ var request:Object; var callback:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { request = _queue.shift(); callback = null; if (request != null){ if (request.callbackID != null){ callback = _callbacks[request.callbackID]; }; delete _callbacks[request.callbackID]; if (((error) && (!((callback == null))))){ handleError(request.args, callback.callbackObject, callback.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(pkg:Object):void{ var target:String = pkg.target; var event:String = pkg.event; switch (target){ case "services": MochiServices.triggerEvent(pkg.event, pkg.args); break; case "events": MochiEvents.triggerEvent(pkg.event, pkg.args); break; case "coins": MochiCoins.triggerEvent(pkg.event, pkg.args); break; case "social": MochiSocial.triggerEvent(pkg.event, pkg.args); break; }; } private static function urlOptions(clip:Object):Object{ var options:String; var pairs:Array; var i:Number; var kv:Array; var opts:Object = {}; if (clip.stage){ options = clip.stage.loaderInfo.parameters.mochiad_options; } else { options = clip.loaderInfo.parameters.mochiad_options; }; if (options){ pairs = options.split("&"); i = 0; while (i < pairs.length) { kv = pairs[i].split("="); opts[unescape(kv[0])] = unescape(kv[1]); i++; }; }; return (opts); } public static function addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = url; var burl = burl; var btn = btn; var onClick = onClick; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://link.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (url:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(url, onClick); var rect:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = rect.x; avm1Click.y = rect.y; avm1Click.scaleX = (0.01 * rect.width); avm1Click.scaleY = (0.01 * rect.height); }; err = function (ev:Object):void{ netup = false; ev.target.removeEventListener(ev.type, arguments.callee); setURL(burl); }; complete = function (ev:Object):void{ ev.target.removeEventListener(ev.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function setContainer(container:Object=null, doAdd:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (container != null){ if ((container is DisplayObjectContainer)){ _container = container; }; }; if (doAdd){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_container).addChild(_clip); }; }; } private static function handleError(args:Object, callbackObject:Object, callbackMethod:Object):void{ var args = args; var callbackObject = callbackObject; var callbackMethod = callbackMethod; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ var _local5 = callbackObject; _local5[callbackMethod](args); //unresolved jump var _slot1 = error; } else { if (callbackMethod != null){ callbackMethod.apply(args); //unresolved jump var _slot1 = error; }; }; }; } private static function loadError(ev:Object):void{ if (_clip != null){ _clip._mochiad_ctr_failed = true; }; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } public static function get childClip():Object{ return (_clip); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (args:Object):void{ MochiServices.comChannelName = args.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } private static function loadLCBridge(clip:Object):void{ var loader:Loader = new Loader(); var mochiLCURL:String = (_servURL + _mochiLC); var req:URLRequest = new URLRequest(mochiLCURL); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } public static function set comChannelName(val:String):void{ if (val != null){ if (val.length > 3){ _sendChannelName = (val + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(id:String, clip:Object):MovieClip{ if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servURL){ _servURL = urlOptions(clip).servURL; }; var servicesURL:String = (_servURL + _services); if (urlOptions(clip).servicesURL){ servicesURL = urlOptions(clip).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(servicesURL); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var req:URLRequest = new URLRequest(servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; vars.api_version = getVersion(); if (widget){ vars.widget = true; }; req.data = vars; _loader.load(req); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function connect(id:String, clip:Object, onError:Object=null):void{ var id = id; var clip = clip; var onError = onError; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (errorCode:String):void{ trace(errorCode); }; }; }; } public static function bringToTop(e:Event=null):void{ var e = e; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; //unresolved jump var _slot1 = errorObject; trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; } public static function connectWait(e:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); } else { _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; }; } } }//package mochi.as3
Section 72
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const ACTION_CANCELED:String = "onCancel"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const NO_USER:String = "NoUser"; public static const FRIEND_LIST:String = "FriendsList"; public static const PROFILE_DATA:String = "ProfileData"; public static const GAMEPLAY_DATA:String = "GameplayData"; public static const ACTION_COMPLETE:String = "onComplete"; public static const LOGIN_SHOW:String = "LoginShow"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const USER_INFO:String = "UserInfo"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const ERROR:String = "Error"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_HIDE:String = "LoginHide"; public static const LOGIN_SHOWN:String = "LoginShown"; public static var _user_info:Object = null; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiSocial(){ super(); } public static function requestFan(properties:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFan", properties); } public static function postToStream(properties:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_postToStream", properties); } public static function getFriendsList(properties:Object=null):void{ MochiServices.send("social_getFriendsList", properties); } public static function requestLogin(properties:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestLogin", properties); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(properties:Object):void{ MochiServices.send("social_saveUserProperties", properties); } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function inviteFriends(properties:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_inviteFriends", properties); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } public static function showLoginWidget(options:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_showLoginWidget", {options:options}); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("social_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (args:Object):void{ _user_info = args; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (args:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 73
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var operation:String;// = null public var error:Event;// = null public var data;// = null public var _loader:URLLoader; public var key:String;// = null public function MochiUserData(key:String="", callback:Function=null){ super(); this.key = key; this.callback = callback; } public function serialize(obj):ByteArray{ var arr:ByteArray = new ByteArray(); arr.objectEncoding = ObjectEncoding.AMF3; arr.writeObject(obj); arr.compress(); return (arr); } public function errorHandler(event:IOErrorEvent):void{ data = null; error = event; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function putEvent(obj):void{ request("put", serialize(obj)); } public function deserialize(arr:ByteArray){ arr.objectEncoding = ObjectEncoding.AMF3; arr.uncompress(); return (arr.readObject()); } public function securityErrorHandler(event:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + event.toString()))); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function performCallback():void{ callback(this); //unresolved jump var _slot1 = e; trace(("[MochiUserData] exception during callback: " + _slot1)); } public function request(_operation:String, _data:ByteArray):void{ var _operation = _operation; var _data = _data; operation = _operation; var api_url:String = MochiSocial.getAPIURL(); var api_token:String = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); var args:URLVariables = new URLVariables(); args.op = _operation; args.key = key; var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.load(req); //unresolved jump var _slot1 = e; errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _slot1.toString()))); } public function completeHandler(event:Event):void{ var event = event; if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; //unresolved jump var _slot1 = e; errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + _slot1.toString()))); return; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public static function get(key:String, callback:Function):void{ var userData:MochiUserData = new MochiUserData(key, callback); userData.getEvent(); } public static function put(key:String, obj, callback:Function):void{ var userData:MochiUserData = new MochiUserData(key, callback); userData.putEvent(obj); } } }//package mochi.as3
Section 74
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.3.0.4852"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){ super(); this.left = left; this.top = top; this.right = right; this.bottom = bottom; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 75
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.3.0.4852"; public function FlexLoader(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 76
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.3.0.4852"; public function FlexMovieClip(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 77
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.3.0.4852"; public function FlexShape(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 78
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.3.0.4852"; public function FlexSprite(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 79
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.3.0.4852"; private static var compatibilityVersionChanged:Boolean = false; private static var _compatibilityErrorFunction:Function; private static var _compatibilityVersion:uint = 50331648; private static var compatibilityVersionRead:Boolean = false; public function FlexVersion(){ super(); } mx_internal static function changeCompatibilityVersionString(value:String):void{ var pieces:Array = value.split("."); var major:uint = parseInt(pieces[0]); var minor:uint = parseInt(pieces[1]); var update:uint = parseInt(pieces[2]); _compatibilityVersion = (((major << 24) + (minor << 16)) + update); } public static function set compatibilityVersion(value:uint):void{ var s:String; if (value == _compatibilityVersion){ return; }; if (compatibilityVersionChanged){ if (compatibilityErrorFunction == null){ s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET); throw (new Error(s)); }; compatibilityErrorFunction(value, VERSION_ALREADY_SET); }; if (compatibilityVersionRead){ if (compatibilityErrorFunction == null){ s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ); throw (new Error(s)); }; compatibilityErrorFunction(value, VERSION_ALREADY_READ); }; _compatibilityVersion = value; compatibilityVersionChanged = true; } public static function get compatibilityVersion():uint{ compatibilityVersionRead = true; return (_compatibilityVersion); } public static function set compatibilityErrorFunction(value:Function):void{ _compatibilityErrorFunction = value; } public static function set compatibilityVersionString(value:String):void{ var pieces:Array = value.split("."); var major:uint = parseInt(pieces[0]); var minor:uint = parseInt(pieces[1]); var update:uint = parseInt(pieces[2]); compatibilityVersion = (((major << 24) + (minor << 16)) + update); } public static function get compatibilityErrorFunction():Function{ return (_compatibilityErrorFunction); } public static function get compatibilityVersionString():String{ var major:uint = ((compatibilityVersion >> 24) & 0xFF); var minor:uint = ((compatibilityVersion >> 16) & 0xFF); var update:uint = (compatibilityVersion & 0xFFFF); return (((((major.toString() + ".") + minor.toString()) + ".") + update.toString())); } } }//package mx.core
Section 80
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.3.0.4852"; public function FontAsset(){ super(); } } }//package mx.core
Section 81
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 82
//IButton (mx.core.IButton) package mx.core { public interface IButton extends IUIComponent { function get emphasized():Boolean; function set emphasized(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IButton.as:Boolean):void; function callLater(_arg1:Function, _arg2:Array=null):void; } }//package mx.core
Section 83
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function removeChild(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function getChildByName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:String):DisplayObject; function removeChildAt(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject; function getChildIndex(:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(child:Point):Array; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function getChildAt(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject; function addChild(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function contains(flash.display:DisplayObject):Boolean; } }//package mx.core
Section 84
//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; import flash.media.*; import flash.text.*; public interface IContainer extends IUIComponent { function set hitArea(mx.core:IContainer/mx.core:IContainer:graphics/get:Sprite):void; function swapChildrenAt(_arg1:int, _arg2:int):void; function getChildByName(Graphics:String):DisplayObject; function get doubleClickEnabled():Boolean; function get graphics():Graphics; function get useHandCursor():Boolean; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function set mouseChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function set creatingContentPane(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get textSnapshot():TextSnapshot; function getChildIndex(value:DisplayObject):int; function set doubleClickEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function getObjectsUnderPoint(lockCenter:Point):Array; function get creatingContentPane():Boolean; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function get soundTransform():SoundTransform; function set useHandCursor(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get numChildren():int; function contains(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:DisplayObject):Boolean; function get verticalScrollPosition():Number; function set defaultButton(mx.core:IContainer/mx.core:IContainer:graphics/get:IFlexDisplayObject):void; function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void; function set horizontalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void; function get focusManager():IFocusManager; function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void; function set mouseEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function getChildAt(Graphics:int):DisplayObject; function set soundTransform(mx.core:IContainer/mx.core:IContainer:graphics/get:SoundTransform):void; function get tabChildren():Boolean; function get tabIndex():int; function set focusRect(mx.core:IContainer/mx.core:IContainer:graphics/get:Object):void; function get hitArea():Sprite; function get mouseChildren():Boolean; function removeChildAt(Graphics:int):DisplayObject; function get defaultButton():IFlexDisplayObject; function stopDrag():void; function set tabEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get horizontalScrollPosition():Number; function get focusRect():Object; function get viewMetrics():EdgeMetrics; function set verticalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void; function get dropTarget():DisplayObject; function get mouseEnabled():Boolean; function set tabChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function set buttonMode(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void; function get tabEnabled():Boolean; function get buttonMode():Boolean; function removeChild(Graphics:DisplayObject):DisplayObject; function set tabIndex(mx.core:IContainer/mx.core:IContainer:graphics/get:int):void; function addChild(Graphics:DisplayObject):DisplayObject; function areInaccessibleObjectsUnderPoint(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:Point):Boolean; } }//package mx.core
Section 85
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 86
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(void:Point):Point; function get name():String; function set width(flash.display:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(flash.display:String):void; function set scaleX(flash.display:Number):void; function set scaleY(flash.display:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(flash.display:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(void:Point):Point; function get height():Number; function set blendMode(flash.display:String):void; function get parent():DisplayObjectContainer; function getBounds(String:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(flash.display:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(flash.display:Number):void; function set accessibilityProperties(flash.display:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(flash.display:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(flash.display:Number):void; function set mask(flash.display:DisplayObject):void; function getRect(String:DisplayObject):Rectangle; function get alpha():Number; function set transform(flash.display:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean; function set opaqueBackground(flash.display:Object):void; function set visible(flash.display:Boolean):void; function get mask():DisplayObject; function set x(flash.display:Number):void; function set y(flash.display:Number):void; function get transform():Transform; function set filters(flash.display:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(flash.display:Number):void; function get stage():Stage; } }//package mx.core
Section 87
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 88
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateSize():void; function invalidateDisplayList():void; function invalidateProperties():void; } }//package mx.core
Section 89
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 90
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 91
//IRectangularBorder (mx.core.IRectangularBorder) package mx.core { import flash.geom.*; public interface IRectangularBorder extends IBorder { function get backgroundImageBounds():Rectangle; function get hasBackgroundImage():Boolean; function set backgroundImageBounds(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRectangularBorder.as:Rectangle):void; function layoutBackgroundImage():void; } }//package mx.core
Section 92
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get isDocument():Boolean; function set repeaters(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function initializeRepeaterArrays(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 93
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup) package mx.core { import flash.events.*; public interface ISWFBridgeGroup { function getChildBridgeProvider(mx.core:ISWFBridgeGroup/mx.core:ISWFBridgeGroup:parentBridge/get:IEventDispatcher):ISWFBridgeProvider; function removeChildBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void; function get parentBridge():IEventDispatcher; function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void; function set parentBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void; function containsBridge(IEventDispatcher:IEventDispatcher):Boolean; function getChildBridges():Array; } }//package mx.core
Section 94
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider) package mx.core { import flash.events.*; public interface ISWFBridgeProvider { function get childAllowsParent():Boolean; function get swfBridge():IEventDispatcher; function get parentAllowsChild():Boolean; } }//package mx.core
Section 95
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set focusPane(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Sprite):void; function get enabled():Boolean; function set enabled(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function set isPopUp(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function get explicitMinHeight():Number; function get percentWidth():Number; function get isPopUp():Boolean; function get owner():DisplayObjectContainer; function get percentHeight():Number; function get baselinePosition():Number; function owns(Number:DisplayObject):Boolean; function initialize():void; function get maxWidth():Number; function get minWidth():Number; function getExplicitOrMeasuredWidth():Number; function get explicitMaxWidth():Number; function get explicitMaxHeight():Number; function set percentHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get minHeight():Number; function set percentWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get document():Object; function get focusPane():Sprite; function getExplicitOrMeasuredHeight():Number; function set tweeningProperties(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Array):void; function set explicitWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function set measuredMinHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get explicitMinWidth():Number; function get tweeningProperties():Array; function get maxHeight():Number; function set owner(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void; function set includeInLayout(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function parentChanged(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void; function get explicitWidth():Number; function get measuredMinHeight():Number; function set measuredMinWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function set explicitHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void; function get includeInLayout():Boolean; function get measuredMinWidth():Number; function get explicitHeight():Number; function set systemManager(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:ISystemManager):void; function set document(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Object):void; function get systemManager():ISystemManager; } }//package mx.core
Section 96
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.3.0.4852"; public function MovieClipAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 97
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 98
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.3.0.4852"; private static var classMap:Object = {}; public function Singleton(){ super(); } public static function registerClass(interfaceName:String, clazz:Class):void{ var c:Class = classMap[interfaceName]; if (!c){ classMap[interfaceName] = clazz; }; } public static function getClass(interfaceName:String):Class{ return (classMap[interfaceName]); } public static function getInstance(interfaceName:String):Object{ var c:Class = classMap[interfaceName]; if (!c){ throw (new Error((("No class registered for interface '" + interfaceName) + "'."))); }; return (c["getInstance"]()); } } }//package mx.core
Section 99
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.3.0.4852"; public function SoundAsset(){ super(); } } }//package mx.core
Section 100
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.3.0.4852"; public function SpriteAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 101
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; private static var _catchCallLaterExceptions:Boolean = false; public function UIComponentGlobals(){ super(); } public static function set catchCallLaterExceptions(value:Boolean):void{ _catchCallLaterExceptions = value; } public static function get designMode():Boolean{ return (designTime); } public static function set designMode(value:Boolean):void{ designTime = value; } public static function get catchCallLaterExceptions():Boolean{ return (_catchCallLaterExceptions); } } }//package mx.core
Section 102
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; private var _module:IModuleInfo; public static const READY:String = "ready"; public static const ERROR:String = "error"; public static const PROGRESS:String = "progress"; mx_internal static const VERSION:String = "3.3.0.4852"; public static const SETUP:String = "setup"; public static const UNLOAD:String = "unload"; public function ModuleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null, module:IModuleInfo=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; this._module = module; } public function get module():IModuleInfo{ if (_module){ return (_module); }; return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module)); } } }//package mx.events
Section 103
//ResourceEvent (mx.events.ResourceEvent) package mx.events { import flash.events.*; public class ResourceEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.3.0.4852"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function ResourceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; } override public function clone():Event{ return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 104
//StyleEvent (mx.events.StyleEvent) package mx.events { import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.3.0.4852"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){ super(type, bubbles, cancelable, bytesLoaded, bytesTotal); this.errorText = errorText; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 105
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import flash.display.*; import mx.core.*; import flash.geom.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _trRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "3.3.0.4852"; public function RectangularDropShadow(){ super(); } public function get blRadius():Number{ return (_blRadius); } public function set brRadius(value:Number):void{ if (_brRadius != value){ _brRadius = value; changed = true; }; } public function set color(value:int):void{ if (_color != value){ _color = value; changed = true; }; } public function drawShadow(g:Graphics, x:Number, y:Number, width:Number, height:Number):void{ var tlWidth:Number; var tlHeight:Number; var trWidth:Number; var trHeight:Number; var blWidth:Number; var blHeight:Number; var brWidth:Number; var brHeight:Number; if (changed){ createShadowBitmaps(); changed = false; }; width = Math.ceil(width); height = Math.ceil(height); var leftThickness:int = (leftShadow) ? leftShadow.width : 0; var rightThickness:int = (rightShadow) ? rightShadow.width : 0; var topThickness:int = (topShadow) ? topShadow.height : 0; var bottomThickness:int = (bottomShadow) ? bottomShadow.height : 0; var widthThickness:int = (leftThickness + rightThickness); var heightThickness:int = (topThickness + bottomThickness); var maxCornerHeight:Number = ((height + heightThickness) / 2); var maxCornerWidth:Number = ((width + widthThickness) / 2); var matrix:Matrix = new Matrix(); if (((leftShadow) || (topShadow))){ tlWidth = Math.min((tlRadius + widthThickness), maxCornerWidth); tlHeight = Math.min((tlRadius + heightThickness), maxCornerHeight); matrix.tx = (x - leftThickness); matrix.ty = (y - topThickness); g.beginBitmapFill(shadow, matrix); g.drawRect((x - leftThickness), (y - topThickness), tlWidth, tlHeight); g.endFill(); }; if (((rightShadow) || (topShadow))){ trWidth = Math.min((trRadius + widthThickness), maxCornerWidth); trHeight = Math.min((trRadius + heightThickness), maxCornerHeight); matrix.tx = (((x + width) + rightThickness) - shadow.width); matrix.ty = (y - topThickness); g.beginBitmapFill(shadow, matrix); g.drawRect((((x + width) + rightThickness) - trWidth), (y - topThickness), trWidth, trHeight); g.endFill(); }; if (((leftShadow) || (bottomShadow))){ blWidth = Math.min((blRadius + widthThickness), maxCornerWidth); blHeight = Math.min((blRadius + heightThickness), maxCornerHeight); matrix.tx = (x - leftThickness); matrix.ty = (((y + height) + bottomThickness) - shadow.height); g.beginBitmapFill(shadow, matrix); g.drawRect((x - leftThickness), (((y + height) + bottomThickness) - blHeight), blWidth, blHeight); g.endFill(); }; if (((rightShadow) || (bottomShadow))){ brWidth = Math.min((brRadius + widthThickness), maxCornerWidth); brHeight = Math.min((brRadius + heightThickness), maxCornerHeight); matrix.tx = (((x + width) + rightThickness) - shadow.width); matrix.ty = (((y + height) + bottomThickness) - shadow.height); g.beginBitmapFill(shadow, matrix); g.drawRect((((x + width) + rightThickness) - brWidth), (((y + height) + bottomThickness) - brHeight), brWidth, brHeight); g.endFill(); }; if (leftShadow){ matrix.tx = (x - leftThickness); matrix.ty = 0; g.beginBitmapFill(leftShadow, matrix); g.drawRect((x - leftThickness), ((y - topThickness) + tlHeight), leftThickness, ((((height + topThickness) + bottomThickness) - tlHeight) - blHeight)); g.endFill(); }; if (rightShadow){ matrix.tx = (x + width); matrix.ty = 0; g.beginBitmapFill(rightShadow, matrix); g.drawRect((x + width), ((y - topThickness) + trHeight), rightThickness, ((((height + topThickness) + bottomThickness) - trHeight) - brHeight)); g.endFill(); }; if (topShadow){ matrix.tx = 0; matrix.ty = (y - topThickness); g.beginBitmapFill(topShadow, matrix); g.drawRect(((x - leftThickness) + tlWidth), (y - topThickness), ((((width + leftThickness) + rightThickness) - tlWidth) - trWidth), topThickness); g.endFill(); }; if (bottomShadow){ matrix.tx = 0; matrix.ty = (y + height); g.beginBitmapFill(bottomShadow, matrix); g.drawRect(((x - leftThickness) + blWidth), (y + height), ((((width + leftThickness) + rightThickness) - blWidth) - brWidth), bottomThickness); g.endFill(); }; } public function get brRadius():Number{ return (_brRadius); } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var roundRectWidth:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); var roundRectHeight:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((roundRectWidth < 0)) || ((roundRectHeight < 0)))){ return; }; var roundRect:Shape = new FlexShape(); var g:Graphics = roundRect.graphics; g.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(g, 0, 0, roundRectWidth, roundRectHeight, tlRadius, trRadius, blRadius, brRadius); g.endFill(); var roundRectBitmap:BitmapData = new BitmapData(roundRectWidth, roundRectHeight, true, 0); roundRectBitmap.draw(roundRect, new Matrix()); var filter:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha); filter.knockout = true; var inputRect:Rectangle = new Rectangle(0, 0, roundRectWidth, roundRectHeight); var outputRect:Rectangle = roundRectBitmap.generateFilterRect(inputRect, filter); var leftThickness:Number = (inputRect.left - outputRect.left); var rightThickness:Number = (outputRect.right - inputRect.right); var topThickness:Number = (inputRect.top - outputRect.top); var bottomThickness:Number = (outputRect.bottom - inputRect.bottom); shadow = new BitmapData(outputRect.width, outputRect.height); shadow.applyFilter(roundRectBitmap, inputRect, new Point(leftThickness, topThickness), filter); var origin:Point = new Point(0, 0); var rect:Rectangle = new Rectangle(); if (leftThickness > 0){ rect.x = 0; rect.y = ((tlRadius + topThickness) + bottomThickness); rect.width = leftThickness; rect.height = 1; leftShadow = new BitmapData(leftThickness, 1); leftShadow.copyPixels(shadow, rect, origin); } else { leftShadow = null; }; if (rightThickness > 0){ rect.x = (shadow.width - rightThickness); rect.y = ((trRadius + topThickness) + bottomThickness); rect.width = rightThickness; rect.height = 1; rightShadow = new BitmapData(rightThickness, 1); rightShadow.copyPixels(shadow, rect, origin); } else { rightShadow = null; }; if (topThickness > 0){ rect.x = ((tlRadius + leftThickness) + rightThickness); rect.y = 0; rect.width = 1; rect.height = topThickness; topShadow = new BitmapData(1, topThickness); topShadow.copyPixels(shadow, rect, origin); } else { topShadow = null; }; if (bottomThickness > 0){ rect.x = ((blRadius + leftThickness) + rightThickness); rect.y = (shadow.height - bottomThickness); rect.width = 1; rect.height = bottomThickness; bottomShadow = new BitmapData(1, bottomThickness); bottomShadow.copyPixels(shadow, rect, origin); } else { bottomShadow = null; }; } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(value:Number):void{ if (_angle != value){ _angle = value; changed = true; }; } public function set trRadius(value:Number):void{ if (_trRadius != value){ _trRadius = value; changed = true; }; } public function set tlRadius(value:Number):void{ if (_tlRadius != value){ _tlRadius = value; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(value:Number):void{ if (_distance != value){ _distance = value; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(value:Number):void{ if (_alpha != value){ _alpha = value; changed = true; }; } public function set blRadius(value:Number):void{ if (_blRadius != value){ _blRadius = value; changed = true; }; } } }//package mx.graphics
Section 106
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import flash.events.*; import flash.display.*; import mx.core.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function set defaultButton(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IButton):void; function set focusPane(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Sprite):void; function set showFocusIndicator(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void; function moveFocus(_arg1:String, _arg2:DisplayObject=null):void; function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function removeSWFBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IEventDispatcher):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(value:InteractiveObject):IFocusManagerComponent; function get nextTabIndex():int; function get defaultButton():IButton; function get showFocusIndicator():Boolean; function setFocus(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IFocusManagerComponent):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void; function hideFocus():void; function getNextFocusManagerComponent(value:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 107
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.managers { public interface IFocusManagerComponent { function set focusEnabled(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void; function drawFocus(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package mx.managers
Section 108
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.events.*; import flash.display.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerContainer.as:IFocusManager):void; function get focusManager():IFocusManager; function get systemManager():ISystemManager; function contains(mx.managers:DisplayObject):Boolean; } }//package mx.managers
Section 109
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function validateNow():void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function isInvalid():Boolean; function invalidateDisplayList(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function set usePhasedInstantiation(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:Boolean):void; function invalidateSize(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; function invalidateProperties(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; } }//package mx.managers
Section 110
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function get updateCompletePendingFlag():Boolean; function set updateCompletePendingFlag(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; function set initialized(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; function validateProperties():void; function validateDisplayList():void; function get nestLevel():int; function get initialized():Boolean; function get processedDescriptors():Boolean; function validateSize(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean=false):void; function set nestLevel(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:int):void; function set processedDescriptors(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; } }//package mx.managers
Section 111
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import flash.events.*; import flash.display.*; import mx.core.*; import flash.geom.*; import flash.text.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function set focusPane(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Sprite):void; function get toolTipChildren():IChildList; function useSWFBridge():Boolean; function isFontFaceEmbedded(flash.display:TextFormat):Boolean; function deployMouseShields(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Boolean):void; function get rawChildren():IChildList; function get topLevelSystemManager():ISystemManager; function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void; function getSandboxRoot():DisplayObject; function get swfBridgeGroup():ISWFBridgeGroup; function removeFocusManager(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function get document():Object; function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function getTopLevelRoot():DisplayObject; function removeChildBridge(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IEventDispatcher):void; function isDisplayObjectInABridgedApplication(flash.display:DisplayObject):Boolean; function get popUpChildren():IChildList; function get screen():Rectangle; function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function getDefinitionByName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ISystemManager.as:String):Object; function activate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function deactivate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Object):void; function get embeddedFontList():Object; function set numModalWindows(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:int):void; function isTopLevel():Boolean; function isTopLevelRoot():Boolean; function get numModalWindows():int; function addFocusManager(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void; function get stage():Stage; function getVisibleApplicationRect(value:Rectangle=null):Rectangle; } }//package mx.managers
Section 112
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var changingListenersInOtherSystemManagers:Boolean; public static var bootstrapLoaderInfoURL:String; public static var showMouseCursor:Boolean; public function SystemManagerGlobals(){ super(); } } }//package mx.managers
Section 113
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void; function release():void; function get error():Boolean; function get data():Object; function publish(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:IFlexModuleFactory):void; function get factory():IFlexModuleFactory; function set data(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:Object):void; function get url():String; function get setup():Boolean; function unload():void; } }//package mx.modules
Section 114
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.3.0.4852"; public function ModuleManager(){ super(); } public static function getModule(url:String):IModuleInfo{ return (getSingleton().getModule(url)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(object:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(object)); } } }//package mx.modules import flash.events.*; import flash.display.*; import mx.core.*; import flash.utils.*; import flash.system.*; import mx.events.*; import flash.net.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(info:ModuleInfo){ super(); this.info = info; info.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true); info.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true); } public function get loaded():Boolean{ return (info.loaded); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get error():Boolean{ return (info.error); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function publish(factory:IFlexModuleFactory):void{ info.publish(factory); } public function set data(value:Object):void{ _data = value; } public function get ready():Boolean{ return (info.ready); } public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{ var moduleEvent:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ moduleEvent = new ModuleEvent(ModuleEvent.PROGRESS); moduleEvent.bytesLoaded = info.size; moduleEvent.bytesTotal = info.size; dispatchEvent(moduleEvent); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(applicationDomain, securityDomain, bytes); }; }; } private function moduleEventHandler(event:ModuleEvent):void{ dispatchEvent(event); } public function get url():String{ return (info.url); } public function get data():Object{ return (_data); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(url:String):IModuleInfo{ var info:ModuleInfo = (moduleList[url] as ModuleInfo); if (!info){ info = new ModuleInfo(url); moduleList[url] = info; }; return (new ModuleInfoProxy(info)); } public function getAssociatedFactory(object:Object):IFlexModuleFactory{ var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = object; var className:String = getQualifiedClassName(object); for each (m in moduleList) { info = (m as ModuleInfo); if (!info.ready){ } else { domain = info.applicationDomain; cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; //unresolved jump var _slot1 = error; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var _setup:Boolean;// = false private function ModuleInfo(url:String){ super(); _url = url; } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; if (loader.content){ loader.content.removeEventListener("ready", readyHandler); loader.content.removeEventListener("error", moduleErrorHandler); }; //unresolved jump var _slot1 = error; if (_loaded){ loader.close(); //unresolved jump var _slot1 = error; }; loader.unload(); //unresolved jump var _slot1 = error; loader = null; }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function completeHandler(event:Event):void{ var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(moduleEvent); } public function publish(factory:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = factory; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(event:Event):void{ var moduleEvent:ModuleEvent; var event = event; factoryInfo = new FactoryInfo(); factoryInfo.factory = (loader.content as IFlexModuleFactory); //unresolved jump var _slot1 = error; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); loader.content.addEventListener("error", moduleErrorHandler); factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; //unresolved jump var _slot1 = error; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var f:Object; if (((!(factoryInfo)) && (limbo))){ for (f in limbo) { factoryInfo = (f as FactoryInfo); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(event:ErrorEvent):void{ _error = true; var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = event.text; dispatchEvent(moduleEvent); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } private function loadBytes(applicationDomain:ApplicationDomain, bytes:ByteArray):void{ var c:LoaderContext = new LoaderContext(); c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in c)){ c["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.loadBytes(bytes, c); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function progressHandler(event:ProgressEvent):void{ var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = event.bytesLoaded; moduleEvent.bytesTotal = event.bytesTotal; dispatchEvent(moduleEvent); } public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{ if (_loaded){ return; }; _loaded = true; limbo = null; if (bytes){ loadBytes(applicationDomain, bytes); return; }; if (_url.indexOf("published://") == 0){ return; }; var r:URLRequest = new URLRequest(_url); var c:LoaderContext = new LoaderContext(); c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain); c.securityDomain = securityDomain; if ((((securityDomain == null)) && ((Security.sandboxType == Security.REMOTE)))){ c.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(r, c); } public function get url():String{ return (_url); } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function moduleErrorHandler(event:Event):void{ var errorEvent:ModuleEvent; _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); if ((event is ModuleEvent)){ errorEvent = ModuleEvent(event); } else { errorEvent = new ModuleEvent(ModuleEvent.ERROR); }; dispatchEvent(errorEvent); } public function readyHandler(event:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ super(); } }
Section 115
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; public function ModuleManagerGlobals(){ super(); } } }//package mx.modules
Section 116
//IResourceBundle (mx.resources.IResourceBundle) package mx.resources { public interface IResourceBundle { function get content():Object; function get locale():String; function get bundleName():String; } }//package mx.resources
Section 117
//IResourceManager (mx.resources.IResourceManager) package mx.resources { import flash.events.*; import flash.system.*; public interface IResourceManager extends IEventDispatcher { function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean; function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class; function getLocales():Array; function removeResourceBundlesForLocale(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:String):void; function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle; function get localeChain():Array; function getInt(_arg1:String, _arg2:String, _arg3:String=null):int; function update():void; function set localeChain(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void; function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint; function addResourceBundle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:IResourceBundle):void; function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array; function getBundleNamesForLocale(:String):Array; function removeResourceBundle(_arg1:String, _arg2:String):void; function getObject(_arg1:String, _arg2:String, _arg3:String=null); function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String; function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void; function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void; function getPreferredLocaleChain():Array; function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle; function initializeLocaleChain(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resources
Section 118
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 119
//LocaleSorter (mx.resources.LocaleSorter) package mx.resources { public class LocaleSorter { mx_internal static const VERSION:String = "3.3.0.4852"; public function LocaleSorter(){ super(); } private static function normalizeLocale(locale:String):String{ return (locale.toLowerCase().replace(/-/g, "_")); } public static function sortLocalesByPreference(appLocales:Array, systemPreferences:Array, ultimateFallbackLocale:String=null, addAll:Boolean=false):Array{ var result:Array; var hasLocale:Object; var i:int; var j:int; var k:int; var l:int; var locale:String; var plocale:LocaleID; var appLocales = appLocales; var systemPreferences = systemPreferences; var ultimateFallbackLocale = ultimateFallbackLocale; var addAll = addAll; var promote:Function = function (locale:String):void{ if (typeof(hasLocale[locale]) != "undefined"){ result.push(appLocales[hasLocale[locale]]); delete hasLocale[locale]; }; }; result = []; hasLocale = {}; var locales:Array = trimAndNormalize(appLocales); var preferenceLocales:Array = trimAndNormalize(systemPreferences); addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale); j = 0; while (j < locales.length) { hasLocale[locales[j]] = j; j = (j + 1); }; i = 0; l = preferenceLocales.length; while (i < l) { plocale = LocaleID.fromString(preferenceLocales[i]); promote(preferenceLocales[i]); promote(plocale.toString()); while (plocale.transformToParent()) { promote(plocale.toString()); }; plocale = LocaleID.fromString(preferenceLocales[i]); j = 0; while (j < l) { locale = preferenceLocales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; j = 0; k = locales.length; while (j < k) { locale = locales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; i = (i + 1); }; if (addAll){ j = 0; k = locales.length; while (j < k) { promote(locales[j]); j = (j + 1); }; }; return (result); } private static function addUltimateFallbackLocale(preferenceLocales:Array, ultimateFallbackLocale:String):void{ var locale:String; if (((!((ultimateFallbackLocale == null))) && (!((ultimateFallbackLocale == ""))))){ locale = normalizeLocale(ultimateFallbackLocale); if (preferenceLocales.indexOf(locale) == -1){ preferenceLocales.push(locale); }; }; } private static function trimAndNormalize(list:Array):Array{ var resultList:Array = []; var i:int; while (i < list.length) { resultList.push(normalizeLocale(list[i])); i++; }; return (resultList); } } }//package mx.resources class LocaleID { private var privateLangs:Boolean;// = false private var script:String;// = "" private var variants:Array; private var privates:Array; private var extensions:Object; private var lang:String;// = "" private var region:String;// = "" private var extended_langs:Array; public static const STATE_PRIMARY_LANGUAGE:int = 0; public static const STATE_REGION:int = 3; public static const STATE_EXTENDED_LANGUAGES:int = 1; public static const STATE_EXTENSIONS:int = 5; public static const STATE_SCRIPT:int = 2; public static const STATE_VARIANTS:int = 4; public static const STATE_PRIVATES:int = 6; private function LocaleID(){ extended_langs = []; variants = []; extensions = {}; privates = []; super(); } public function equals(locale:LocaleID):Boolean{ return ((toString() == locale.toString())); } public function canonicalize():void{ var i:String; for (i in extensions) { if (extensions.hasOwnProperty(i)){ if (extensions[i].length == 0){ delete extensions[i]; } else { extensions[i] = extensions[i].sort(); }; }; }; extended_langs = extended_langs.sort(); variants = variants.sort(); privates = privates.sort(); if (script == ""){ script = LocaleRegistry.getScriptByLang(lang); }; if ((((script == "")) && (!((region == ""))))){ script = LocaleRegistry.getScriptByLangAndRegion(lang, region); }; if ((((region == "")) && (!((script == ""))))){ region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); }; } public function toString():String{ var i:String; var stack:Array = [lang]; Array.prototype.push.apply(stack, extended_langs); if (script != ""){ stack.push(script); }; if (region != ""){ stack.push(region); }; Array.prototype.push.apply(stack, variants); for (i in extensions) { if (extensions.hasOwnProperty(i)){ stack.push(i); Array.prototype.push.apply(stack, extensions[i]); }; }; if (privates.length > 0){ stack.push("x"); Array.prototype.push.apply(stack, privates); }; return (stack.join("_")); } public function isSiblingOf(other:LocaleID):Boolean{ return ((((lang == other.lang)) && ((script == other.script)))); } public function transformToParent():Boolean{ var i:String; var lastExtension:Array; var defaultRegion:String; if (privates.length > 0){ privates.splice((privates.length - 1), 1); return (true); }; var lastExtensionName:String; for (i in extensions) { if (extensions.hasOwnProperty(i)){ lastExtensionName = i; }; }; if (lastExtensionName){ lastExtension = extensions[lastExtensionName]; if (lastExtension.length == 1){ delete extensions[lastExtensionName]; return (true); }; lastExtension.splice((lastExtension.length - 1), 1); return (true); }; if (variants.length > 0){ variants.splice((variants.length - 1), 1); return (true); }; if (script != ""){ if (LocaleRegistry.getScriptByLang(lang) != ""){ script = ""; return (true); }; if (region == ""){ defaultRegion = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); if (defaultRegion != ""){ region = defaultRegion; script = ""; return (true); }; }; }; if (region != ""){ if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){ region = ""; return (true); }; }; if (extended_langs.length > 0){ extended_langs.splice((extended_langs.length - 1), 1); return (true); }; return (false); } public static function fromString(str:String):LocaleID{ var last_extension:Array; var subtag:String; var subtag_length:int; var firstChar:String; var localeID:LocaleID = new (LocaleID); var state:int = STATE_PRIMARY_LANGUAGE; var subtags:Array = str.replace(/-/g, "_").split("_"); var i:int; var l:int = subtags.length; while (i < l) { subtag = subtags[i].toLowerCase(); if (state == STATE_PRIMARY_LANGUAGE){ if (subtag == "x"){ localeID.privateLangs = true; } else { if (subtag == "i"){ localeID.lang = (localeID.lang + "i-"); } else { localeID.lang = (localeID.lang + subtag); state = STATE_EXTENDED_LANGUAGES; }; }; } else { subtag_length = subtag.length; if (subtag_length == 0){ } else { firstChar = subtag.charAt(0).toLowerCase(); if ((((state <= STATE_EXTENDED_LANGUAGES)) && ((subtag_length == 3)))){ localeID.extended_langs.push(subtag); if (localeID.extended_langs.length == 3){ state = STATE_SCRIPT; }; } else { if ((((state <= STATE_SCRIPT)) && ((subtag_length == 4)))){ localeID.script = subtag; state = STATE_REGION; } else { if ((((state <= STATE_REGION)) && ((((subtag_length == 2)) || ((subtag_length == 3)))))){ localeID.region = subtag; state = STATE_VARIANTS; } else { if ((((state <= STATE_VARIANTS)) && ((((((((firstChar >= "a")) && ((firstChar <= "z")))) && ((subtag_length >= 5)))) || ((((((firstChar >= "0")) && ((firstChar <= "9")))) && ((subtag_length >= 4)))))))){ localeID.variants.push(subtag); state = STATE_VARIANTS; } else { if ((((state < STATE_PRIVATES)) && ((subtag_length == 1)))){ if (subtag == "x"){ state = STATE_PRIVATES; last_extension = localeID.privates; } else { state = STATE_EXTENSIONS; last_extension = ((localeID.extensions[subtag]) || ([])); localeID.extensions[subtag] = last_extension; }; } else { if (state >= STATE_EXTENSIONS){ last_extension.push(subtag); }; }; }; }; }; }; }; }; i++; }; localeID.canonicalize(); return (localeID); } } class LocaleRegistry { private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28}; private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"]; private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}}; private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32}; private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}}; private function LocaleRegistry(){ super(); } public static function getScriptByLangAndRegion(lang:String, region:String):String{ var langRegions:Object = SCRIPT_ID_BY_LANG_AND_REGION[lang]; if (langRegions == null){ return (""); }; var scriptID:Object = langRegions[region]; if (scriptID == null){ return (""); }; return (SCRIPTS[int(scriptID)].toLowerCase()); } public static function getScriptByLang(lang:String):String{ var scriptID:Object = SCRIPT_ID_BY_LANG[lang]; if (scriptID == null){ return (""); }; return (SCRIPTS[int(scriptID)].toLowerCase()); } public static function getDefaultRegionForLangAndScript(lang:String, script:String):String{ var langObj:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[lang]; var scriptID:Object = SCRIPT_BY_ID[script]; if ((((langObj == null)) || ((scriptID == null)))){ return (""); }; return (((langObj[int(scriptID)]) || (""))); } }
Section 120
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle implements IResourceBundle { mx_internal var _locale:String; private var _content:Object; mx_internal var _bundleName:String; mx_internal static const VERSION:String = "3.3.0.4852"; mx_internal static var backupApplicationDomain:ApplicationDomain; mx_internal static var locale:String; public function ResourceBundle(locale:String=null, bundleName:String=null){ _content = {}; super(); mx_internal::_locale = locale; mx_internal::_bundleName = bundleName; _content = getContent(); } protected function getContent():Object{ return ({}); } public function getString(key:String):String{ return (String(_getObject(key))); } public function get content():Object{ return (_content); } public function getBoolean(key:String, defaultValue:Boolean=true):Boolean{ var temp:String = _getObject(key).toLowerCase(); if (temp == "false"){ return (false); }; if (temp == "true"){ return (true); }; return (defaultValue); } public function getStringArray(key:String):Array{ var array:Array = _getObject(key).split(","); var n:int = array.length; var i:int; while (i < n) { array[i] = StringUtil.trim(array[i]); i++; }; return (array); } public function getObject(key:String):Object{ return (_getObject(key)); } private function _getObject(key:String):Object{ var value:Object = content[key]; if (!value){ throw (new Error(((("Key " + key) + " was not found in resource bundle ") + bundleName))); }; return (value); } public function get locale():String{ return (mx_internal::_locale); } public function get bundleName():String{ return (mx_internal::_bundleName); } public function getNumber(key:String):Number{ return (Number(_getObject(key))); } private static function getClassByName(name:String, domain:ApplicationDomain):Class{ var c:Class; if (domain.hasDefinition(name)){ c = (domain.getDefinition(name) as Class); }; return (c); } public static function getResourceBundle(baseName:String, currentDomain:ApplicationDomain=null):ResourceBundle{ var className:String; var bundleClass:Class; var bundleObj:Object; var bundle:ResourceBundle; if (!currentDomain){ currentDomain = ApplicationDomain.currentDomain; }; className = (((mx_internal::locale + "$") + baseName) + "_properties"); bundleClass = getClassByName(className, currentDomain); if (!bundleClass){ className = (baseName + "_properties"); bundleClass = getClassByName(className, currentDomain); }; if (!bundleClass){ className = baseName; bundleClass = getClassByName(className, currentDomain); }; if (((!(bundleClass)) && (mx_internal::backupApplicationDomain))){ className = (baseName + "_properties"); bundleClass = getClassByName(className, mx_internal::backupApplicationDomain); if (!bundleClass){ className = baseName; bundleClass = getClassByName(className, mx_internal::backupApplicationDomain); }; }; if (bundleClass){ bundleObj = new (bundleClass); if ((bundleObj is ResourceBundle)){ bundle = ResourceBundle(bundleObj); return (bundle); }; }; throw (new Error(("Could not find resource bundle " + baseName))); } } }//package mx.resources
Section 121
//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.3.0.4852"; private static var implClassDependency:ResourceManagerImpl; private static var instance:IResourceManager; public function ResourceManager(){ super(); } public static function getInstance():IResourceManager{ if (!instance){ instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager")); //unresolved jump var _slot1 = e; instance = new ResourceManagerImpl(); }; return (instance); } } }//package mx.resources
Section 122
//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.utils.*; public class ResourceManagerImpl extends EventDispatcher implements IResourceManager { private var resourceModules:Object; private var initializedForNonFrameworkApp:Boolean;// = false private var localeMap:Object; private var _localeChain:Array; mx_internal static const VERSION:String = "3.3.0.4852"; private static var instance:IResourceManager; public function ResourceManagerImpl(){ localeMap = {}; resourceModules = {}; super(); } public function get localeChain():Array{ return (_localeChain); } public function set localeChain(value:Array):void{ _localeChain = value; update(); } public function getStringArray(bundleName:String, resourceName:String, locale:String=null):Array{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:* = resourceBundle.content[resourceName]; var array:Array = String(value).split(","); var n:int = array.length; var i:int; while (i < n) { array[i] = StringUtil.trim(array[i]); i++; }; return (array); } mx_internal function installCompiledResourceBundle(applicationDomain:ApplicationDomain, locale:String, bundleName:String):void{ var packageName:String; var localName:String = bundleName; var colonIndex:int = bundleName.indexOf(":"); if (colonIndex != -1){ packageName = bundleName.substring(0, colonIndex); localName = bundleName.substring((colonIndex + 1)); }; if (getResourceBundle(locale, bundleName)){ return; }; var resourceBundleClassName = (((locale + "$") + localName) + "_properties"); if (packageName != null){ resourceBundleClassName = ((packageName + ".") + resourceBundleClassName); }; var bundleClass:Class; if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; if (!bundleClass){ resourceBundleClassName = bundleName; if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; }; if (!bundleClass){ resourceBundleClassName = (bundleName + "_properties"); if (applicationDomain.hasDefinition(resourceBundleClassName)){ bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName)); }; }; if (!bundleClass){ throw (new Error((((("Could not find compiled resource bundle '" + bundleName) + "' for locale '") + locale) + "'."))); }; var resourceBundle:ResourceBundle = ResourceBundle(new (bundleClass)); resourceBundle.mx_internal::_locale = locale; resourceBundle.mx_internal::_bundleName = bundleName; addResourceBundle(resourceBundle); } public function getString(bundleName:String, resourceName:String, parameters:Array=null, locale:String=null):String{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:String = String(resourceBundle.content[resourceName]); if (parameters){ value = StringUtil.substitute(value, parameters); }; return (value); } public function loadResourceModule(url:String, updateFlag:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ var moduleInfo:IModuleInfo; var resourceEventDispatcher:ResourceEventDispatcher; var timer:Timer; var timerHandler:Function; var url = url; var updateFlag = updateFlag; var applicationDomain = applicationDomain; var securityDomain = securityDomain; moduleInfo = ModuleManager.getModule(url); resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo); var readyHandler:Function = function (event:ModuleEvent):void{ var resourceModule:* = event.module.factory.create(); resourceModules[event.module.url].resourceModule = resourceModule; if (updateFlag){ update(); }; }; moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); var errorHandler:Function = function (event:ModuleEvent):void{ var resourceEvent:ResourceEvent; var message:String = ("Unable to load resource module from " + url); if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){ resourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = 0; resourceEvent.bytesTotal = 0; resourceEvent.errorText = message; resourceEventDispatcher.dispatchEvent(resourceEvent); } else { throw (new Error(message)); }; }; moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (event:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); moduleInfo.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (resourceEventDispatcher); } public function getLocales():Array{ var p:String; var locales:Array = []; for (p in localeMap) { locales.push(p); }; return (locales); } public function removeResourceBundlesForLocale(locale:String):void{ delete localeMap[locale]; } public function getResourceBundle(locale:String, bundleName:String):IResourceBundle{ var bundleMap:Object = localeMap[locale]; if (!bundleMap){ return (null); }; return (bundleMap[bundleName]); } private function dumpResourceModule(resourceModule):void{ var bundle:ResourceBundle; var p:String; for each (bundle in resourceModule.resourceBundles) { trace(bundle.locale, bundle.bundleName); for (p in bundle.content) { }; }; } public function addResourceBundle(resourceBundle:IResourceBundle):void{ var locale:String = resourceBundle.locale; var bundleName:String = resourceBundle.bundleName; if (!localeMap[locale]){ localeMap[locale] = {}; }; localeMap[locale][bundleName] = resourceBundle; } public function getObject(bundleName:String, resourceName:String, locale:String=null){ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (undefined); }; return (resourceBundle.content[resourceName]); } public function getInt(bundleName:String, resourceName:String, locale:String=null):int{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (0); }; var value:* = resourceBundle.content[resourceName]; return (int(value)); } private function findBundle(bundleName:String, resourceName:String, locale:String):IResourceBundle{ supportNonFrameworkApps(); return (((locale)!=null) ? getResourceBundle(locale, bundleName) : findResourceBundleWithResource(bundleName, resourceName)); } private function supportNonFrameworkApps():void{ if (initializedForNonFrameworkApp){ return; }; initializedForNonFrameworkApp = true; if (getLocales().length > 0){ return; }; var applicationDomain:ApplicationDomain = ApplicationDomain.currentDomain; if (!applicationDomain.hasDefinition("_CompiledResourceBundleInfo")){ return; }; var c:Class = Class(applicationDomain.getDefinition("_CompiledResourceBundleInfo")); var locales:Array = c.compiledLocales; var bundleNames:Array = c.compiledResourceBundleNames; installCompiledResourceBundles(applicationDomain, locales, bundleNames); localeChain = locales; } public function getBundleNamesForLocale(locale:String):Array{ var p:String; var bundleNames:Array = []; for (p in localeMap[locale]) { bundleNames.push(p); }; return (bundleNames); } public function getPreferredLocaleChain():Array{ return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true)); } public function getNumber(bundleName:String, resourceName:String, locale:String=null):Number{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (NaN); }; var value:* = resourceBundle.content[resourceName]; return (Number(value)); } public function update():void{ dispatchEvent(new Event(Event.CHANGE)); } public function getClass(bundleName:String, resourceName:String, locale:String=null):Class{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (null); }; var value:* = resourceBundle.content[resourceName]; return ((value as Class)); } public function removeResourceBundle(locale:String, bundleName:String):void{ delete localeMap[locale][bundleName]; if (getBundleNamesForLocale(locale).length == 0){ delete localeMap[locale]; }; } public function initializeLocaleChain(compiledLocales:Array):void{ localeChain = LocaleSorter.sortLocalesByPreference(compiledLocales, getSystemPreferredLocales(), null, true); } public function findResourceBundleWithResource(bundleName:String, resourceName:String):IResourceBundle{ var locale:String; var bundleMap:Object; var bundle:ResourceBundle; if (!_localeChain){ return (null); }; var n:int = _localeChain.length; var i:int; while (i < n) { locale = localeChain[i]; bundleMap = localeMap[locale]; if (!bundleMap){ } else { bundle = bundleMap[bundleName]; if (!bundle){ } else { if ((resourceName in bundle.content)){ return (bundle); }; }; }; i++; }; return (null); } public function getUint(bundleName:String, resourceName:String, locale:String=null):uint{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (0); }; var value:* = resourceBundle.content[resourceName]; return (uint(value)); } private function getSystemPreferredLocales():Array{ var systemPreferences:Array; if (Capabilities["languages"]){ systemPreferences = Capabilities["languages"]; } else { systemPreferences = [Capabilities.language]; }; return (systemPreferences); } public function installCompiledResourceBundles(applicationDomain:ApplicationDomain, locales:Array, bundleNames:Array):void{ var locale:String; var j:int; var bundleName:String; var n:int = (locales) ? locales.length : 0; var m:int = (bundleNames) ? bundleNames.length : 0; var i:int; while (i < n) { locale = locales[i]; j = 0; while (j < m) { bundleName = bundleNames[j]; mx_internal::installCompiledResourceBundle(applicationDomain, locale, bundleName); j++; }; i++; }; } public function getBoolean(bundleName:String, resourceName:String, locale:String=null):Boolean{ var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale); if (!resourceBundle){ return (false); }; var value:* = resourceBundle.content[resourceName]; return ((String(value).toLowerCase() == "true")); } public function unloadResourceModule(url:String, update:Boolean=true):void{ throw (new Error("unloadResourceModule() is not yet implemented.")); } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.modules.*; import mx.events.*; class ResourceModuleInfo { public var resourceModule:IResourceModule; public var errorHandler:Function; public var readyHandler:Function; public var moduleInfo:IModuleInfo; private function ResourceModuleInfo(moduleInfo:IModuleInfo, readyHandler:Function, errorHandler:Function){ super(); this.moduleInfo = moduleInfo; this.readyHandler = readyHandler; this.errorHandler = errorHandler; } } class ResourceEventDispatcher extends EventDispatcher { private function ResourceEventDispatcher(moduleInfo:IModuleInfo){ super(); moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = event.bytesLoaded; resourceEvent.bytesTotal = event.bytesTotal; dispatchEvent(resourceEvent); } private function moduleInfo_readyHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE); dispatchEvent(resourceEvent); } private function moduleInfo_errorHandler(event:ModuleEvent):void{ var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable); resourceEvent.bytesLoaded = event.bytesLoaded; resourceEvent.bytesTotal = event.bytesTotal; resourceEvent.errorText = event.errorText; dispatchEvent(resourceEvent); } }
Section 123
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import flash.display.*; import mx.core.*; import mx.styles.*; import mx.skins.*; import mx.graphics.*; import mx.utils.*; public class HaloBorder extends RectangularBorder { mx_internal var radiusObj:Object; mx_internal var backgroundHole:Object; mx_internal var radius:Number; mx_internal var bRoundedCorners:Boolean; mx_internal var backgroundColor:Object; private var dropShadow:RectangularDropShadow; protected var _borderMetrics:EdgeMetrics; mx_internal var backgroundAlphaName:String; mx_internal static const VERSION:String = "3.3.0.4852"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ super(); BORDER_WIDTHS["default"] = 3; } override public function styleChanged(styleProp:String):void{ if ((((((((((styleProp == null)) || ((styleProp == "styleName")))) || ((styleProp == "borderStyle")))) || ((styleProp == "borderThickness")))) || ((styleProp == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(w:Number, h:Number):void{ if (((isNaN(w)) || (isNaN(h)))){ return; }; super.updateDisplayList(w, h); backgroundColor = getBackgroundColor(); bRoundedCorners = false; backgroundAlphaName = "backgroundAlpha"; backgroundHole = null; radius = 0; radiusObj = null; drawBorder(w, h); drawBackground(w, h); } mx_internal function drawBorder(w:Number, h:Number):void{ var backgroundAlpha:Number; var borderCapColor:uint; var borderColor:uint; var borderSides:String; var borderThickness:Number; var buttonColor:uint; var docked:Boolean; var dropdownBorderColor:uint; var fillColors:Array; var footerColors:Array; var highlightColor:uint; var shadowCapColor:uint; var shadowColor:uint; var themeColor:uint; var translucent:Boolean; var hole:Object; var borderColorDrk1:Number; var borderColorDrk2:Number; var borderColorLt1:Number; var borderInnerColor:Object; var contentAlpha:Number; var br:Number; var parentContainer:IContainer; var vm:EdgeMetrics; var showChrome:Boolean; var borderAlpha:Number; var fillAlphas:Array; var backgroundColorNum:uint; var bHasAllSides:Boolean; var holeRadius:Number; var borderStyle:String = getStyle("borderStyle"); var highlightAlphas:Array = getStyle("highlightAlphas"); var drawTopHighlight:Boolean; var g:Graphics = graphics; g.clear(); if (borderStyle){ switch (borderStyle){ case "none": break; case "inset": borderColor = getStyle("borderColor"); borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40); borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, 25); borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40); borderInnerColor = backgroundColor; if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){ borderInnerColor = borderColor; }; draw3dBorder(borderColorDrk2, borderColorDrk1, borderColorLt1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor)); break; case "outset": borderColor = getStyle("borderColor"); borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40); borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, -25); borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40); borderInnerColor = backgroundColor; if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){ borderInnerColor = borderColor; }; draw3dBorder(borderColorDrk2, borderColorLt1, borderColorDrk1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor)); break; case "alert": case "default": if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ contentAlpha = getStyle("backgroundAlpha"); backgroundAlpha = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); br = (bRoundedCorners) ? radius : 0; drawDropShadow(0, 0, w, h, radius, radius, br, br); if (!bRoundedCorners){ radiusObj = {}; }; parentContainer = (parent as IContainer); if (parentContainer){ vm = parentContainer.viewMetrics; backgroundHole = {x:vm.left, y:vm.top, w:Math.max(0, ((w - vm.left) - vm.right)), h:Math.max(0, ((h - vm.top) - vm.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (contentAlpha != backgroundAlpha){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; g.beginFill(Number(backgroundColor), contentAlpha); g.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); g.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; break; case "dropdown": dropdownBorderColor = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, w, h, 4, 0, 0, 4); drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, w, h)); drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3))); if (!isNaN(dropdownBorderColor)){ drawRoundRect(0, 0, (w + 1), h, {tl:4, tr:0, br:0, bl:4}, dropdownBorderColor, 0.5); drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3))); }; backgroundColor = null; break; case "menuBorder": borderColor = getStyle("borderColor"); drawRoundRect(0, 0, w, h, 0, borderColor, 1); drawDropShadow(1, 1, (w - 2), (h - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((w == 0)) || ((h == 0)))){ backgroundColor = null; break; }; footerColors = getStyle("footerColors"); showChrome = !((footerColors == null)); borderAlpha = getStyle("borderAlpha"); if (showChrome){ g.lineStyle(0, ((footerColors.length > 0)) ? footerColors[1] : footerColors[0], borderAlpha); g.moveTo(0, 0); g.lineTo(w, 0); g.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ radius = IStyleClient(parent.parent).getStyle("cornerRadius"); borderAlpha = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(radius)){ radius = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ radius = 0; }; drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h)); if ((((footerColors.length > 1)) && (!((footerColors[0] == footerColors[1]))))){ drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, h)); drawRoundRect(1, 2, (w - 2), (h - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h)); }; }; backgroundColor = null; break; case "applicationControlBar": fillColors = getStyle("fillColors"); backgroundAlpha = getStyle("backgroundAlpha"); highlightAlphas = getStyle("highlightAlphas"); fillAlphas = getStyle("fillAlphas"); docked = getStyle("docked"); backgroundColorNum = uint(backgroundColor); radius = getStyle("cornerRadius"); if (!radius){ radius = 0; }; drawDropShadow(0, 1, w, (h - 1), radius, radius, radius, radius); if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){ drawRoundRect(0, 1, w, (h - 1), radius, backgroundColorNum, backgroundAlpha, verticalGradientMatrix(0, 0, w, h)); }; drawRoundRect(0, 1, w, (h - 1), radius, fillColors, fillAlphas, verticalGradientMatrix(0, 0, w, h)); drawRoundRect(0, 1, w, ((h / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, ((h / 2) - 1))); drawRoundRect(0, 1, w, (h - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:w, h:(h - 2), r:{tl:radius, tr:radius, bl:0, br:0}}); backgroundColor = null; break; default: borderColor = getStyle("borderColor"); borderThickness = getStyle("borderThickness"); borderSides = getStyle("borderSides"); bHasAllSides = true; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); holeRadius = Math.max((radius - borderThickness), 0); hole = {x:borderThickness, y:borderThickness, w:(w - (borderThickness * 2)), h:(h - (borderThickness * 2)), r:holeRadius}; if (!bRoundedCorners){ radiusObj = {tl:radius, tr:radius, bl:0, br:0}; hole.r = {tl:holeRadius, tr:holeRadius, bl:0, br:0}; }; if (borderSides != "left top right bottom"){ hole.r = {tl:holeRadius, tr:holeRadius, bl:(bRoundedCorners) ? holeRadius : 0, br:(bRoundedCorners) ? holeRadius : 0}; radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0}; borderSides = borderSides.toLowerCase(); if (borderSides.indexOf("left") == -1){ hole.x = 0; hole.w = (hole.w + borderThickness); hole.r.tl = 0; hole.r.bl = 0; radiusObj.tl = 0; radiusObj.bl = 0; bHasAllSides = false; }; if (borderSides.indexOf("top") == -1){ hole.y = 0; hole.h = (hole.h + borderThickness); hole.r.tl = 0; hole.r.tr = 0; radiusObj.tl = 0; radiusObj.tr = 0; bHasAllSides = false; }; if (borderSides.indexOf("right") == -1){ hole.w = (hole.w + borderThickness); hole.r.tr = 0; hole.r.br = 0; radiusObj.tr = 0; radiusObj.br = 0; bHasAllSides = false; }; if (borderSides.indexOf("bottom") == -1){ hole.h = (hole.h + borderThickness); hole.r.bl = 0; hole.r.br = 0; radiusObj.bl = 0; radiusObj.br = 0; bHasAllSides = false; }; }; if ((((radius == 0)) && (bHasAllSides))){ drawDropShadow(0, 0, w, h, 0, 0, 0, 0); g.beginFill(borderColor); g.drawRect(0, 0, w, h); g.drawRect(borderThickness, borderThickness, (w - (2 * borderThickness)), (h - (2 * borderThickness))); g.endFill(); } else { if (radiusObj){ drawDropShadow(0, 0, w, h, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl); drawRoundRect(0, 0, w, h, radiusObj, borderColor, 1, null, null, null, hole); radiusObj.tl = Math.max((radius - borderThickness), 0); radiusObj.tr = Math.max((radius - borderThickness), 0); radiusObj.bl = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0; radiusObj.br = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0; } else { drawDropShadow(0, 0, w, h, radius, radius, radius, radius); drawRoundRect(0, 0, w, h, radius, borderColor, 1, null, null, null, hole); radius = Math.max((getStyle("cornerRadius") - borderThickness), 0); }; }; }; }; } mx_internal function drawBackground(w:Number, h:Number):void{ var nd:Number; var alpha:Number; var bm:EdgeMetrics; var g:Graphics; var bottom:Number; var bottomRadius:Number; var highlightAlphas:Array; var highlightAlpha:Number; if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ nd = Number(backgroundColor); alpha = 1; bm = getBackgroundColorMetrics(); g = graphics; if (((((isNaN(nd)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){ alpha = 0; nd = 0xFFFFFF; } else { alpha = getStyle(backgroundAlphaName); }; if (((!((radius == 0))) || (backgroundHole))){ bottom = bm.bottom; if (radiusObj){ bottomRadius = (bRoundedCorners) ? radius : 0; radiusObj = {tl:radius, tr:radius, bl:bottomRadius, br:bottomRadius}; drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radiusObj, nd, alpha, null, GradientType.LINEAR, null, backgroundHole); } else { drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radius, nd, alpha, null, GradientType.LINEAR, null, backgroundHole); }; } else { g.beginFill(nd, alpha); g.drawRect(bm.left, bm.top, ((w - bm.right) - bm.left), ((h - bm.bottom) - bm.top)); g.endFill(); }; }; var borderStyle:String = getStyle("borderStyle"); if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((borderStyle == "alert")) || ((borderStyle == "default")))))) && ((getStyle("headerColors") == null)))){ highlightAlphas = getStyle("highlightAlphas"); highlightAlpha = (highlightAlphas) ? highlightAlphas[0] : 0.3; drawRoundRect(0, 0, w, h, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, highlightAlpha, null, GradientType.LINEAR, null, {x:0, y:1, w:w, h:(h - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } mx_internal function drawDropShadow(x:Number, y:Number, width:Number, height:Number, tlRadius:Number, trRadius:Number, brRadius:Number, blRadius:Number):void{ var angle:Number; var docked:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((width == 0)))) || ((height == 0)))){ return; }; var distance:Number = getStyle("shadowDistance"); var direction:String = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ docked = getStyle("docked"); angle = (docked) ? 90 : getDropShadowAngle(distance, direction); distance = Math.abs(distance); } else { angle = getDropShadowAngle(distance, direction); distance = (Math.abs(distance) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = distance; dropShadow.angle = angle; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = tlRadius; dropShadow.trRadius = trRadius; dropShadow.blRadius = blRadius; dropShadow.brRadius = brRadius; dropShadow.drawShadow(graphics, x, y, width, height); } mx_internal function getBackgroundColor():Object{ var color:Object; var p:IUIComponent = (parent as IUIComponent); if (((p) && (!(p.enabled)))){ color = getStyle("backgroundDisabledColor"); if (((!((color === null))) && (StyleManager.isValidStyleValue(color)))){ return (color); }; }; return (getStyle("backgroundColor")); } mx_internal function draw3dBorder(c1:Number, c2:Number, c3:Number, c4:Number, c5:Number, c6:Number):void{ var w:Number = width; var h:Number = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); var g:Graphics = graphics; g.beginFill(c1); g.drawRect(0, 0, w, h); g.drawRect(1, 0, (w - 2), h); g.endFill(); g.beginFill(c2); g.drawRect(1, 0, (w - 2), 1); g.endFill(); g.beginFill(c3); g.drawRect(1, (h - 1), (w - 2), 1); g.endFill(); g.beginFill(c4); g.drawRect(1, 1, (w - 2), 1); g.endFill(); g.beginFill(c5); g.drawRect(1, (h - 2), (w - 2), 1); g.endFill(); g.beginFill(c6); g.drawRect(1, 2, (w - 2), (h - 4)); g.drawRect(2, 2, (w - 4), (h - 4)); g.endFill(); } mx_internal function getBackgroundColorMetrics():EdgeMetrics{ return (borderMetrics); } mx_internal function getDropShadowAngle(distance:Number, direction:String):Number{ if (direction == "left"){ return (((distance >= 0)) ? 135 : 225); } else { if (direction == "right"){ return (((distance >= 0)) ? 45 : 315); //unresolved jump }; }; return (!NULL!); } override public function get borderMetrics():EdgeMetrics{ var borderThickness:Number; var borderSides:String; if (_borderMetrics){ return (_borderMetrics); }; var borderStyle:String = getStyle("borderStyle"); if ((((borderStyle == "default")) || ((borderStyle == "alert")))){ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { return (EdgeMetrics.EMPTY); }; } else { if ((((borderStyle == "controlBar")) || ((borderStyle == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (borderStyle == "solid"){ borderThickness = getStyle("borderThickness"); if (isNaN(borderThickness)){ borderThickness = 0; }; _borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness); borderSides = getStyle("borderSides"); if (borderSides != "left top right bottom"){ if (borderSides.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (borderSides.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (borderSides.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (borderSides.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { borderThickness = BORDER_WIDTHS[borderStyle]; if (isNaN(borderThickness)){ borderThickness = 0; }; _borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness); }; }; }; return (_borderMetrics); } } }//package mx.skins.halo
Section 124
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.skins.*; import mx.utils.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "3.3.0.4852"; public function HaloFocusRect(){ super(); } public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function set inheritingStyles(value:Object):void{ } public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void{ } public function registerEffects(effects:Array):void{ } public function regenerateStyleCache(recursive:Boolean):void{ } public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function getClassStyleDeclarations():Array{ return ([]); } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(styleProp:String):void{ if (styleProp == "focusColor"){ _focusColor = NaN; }; } public function setStyle(styleProp:String, newValue):void{ if (styleProp == "focusColor"){ _focusColor = newValue; }; } public function set nonInheritingStyles(value:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } override protected function updateDisplayList(w:Number, h:Number):void{ var tl:Number; var bl:Number; var tr:Number; var br:Number; var nr:Number; var ellipseSize:Number; super.updateDisplayList(w, h); var focusBlendMode:String = getStyle("focusBlendMode"); var focusAlpha:Number = getStyle("focusAlpha"); var focusColor:Number = getStyle("focusColor"); var cornerRadius:Number = getStyle("cornerRadius"); var focusThickness:Number = getStyle("focusThickness"); var focusRoundedCorners:String = getStyle("focusRoundedCorners"); var themeColor:Number = getStyle("themeColor"); var rectColor:Number = focusColor; if (isNaN(rectColor)){ rectColor = themeColor; }; var g:Graphics = graphics; g.clear(); if (focusBlendMode){ blendMode = focusBlendMode; }; if (((!((focusRoundedCorners == "tl tr bl br"))) && ((cornerRadius > 0)))){ tl = 0; bl = 0; tr = 0; br = 0; nr = (cornerRadius + focusThickness); if (focusRoundedCorners.indexOf("tl") >= 0){ tl = nr; }; if (focusRoundedCorners.indexOf("tr") >= 0){ tr = nr; }; if (focusRoundedCorners.indexOf("bl") >= 0){ bl = nr; }; if (focusRoundedCorners.indexOf("br") >= 0){ br = nr; }; g.beginFill(rectColor, focusAlpha); GraphicsUtil.drawRoundRectComplex(g, 0, 0, w, h, tl, tr, bl, br); tl = (tl) ? cornerRadius : 0; tr = (tr) ? cornerRadius : 0; bl = (bl) ? cornerRadius : 0; br = (br) ? cornerRadius : 0; GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br); g.endFill(); nr = (cornerRadius + (focusThickness / 2)); tl = (tl) ? nr : 0; tr = (tr) ? nr : 0; bl = (bl) ? nr : 0; br = (br) ? nr : 0; g.beginFill(rectColor, focusAlpha); GraphicsUtil.drawRoundRectComplex(g, (focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), tl, tr, bl, br); tl = (tl) ? cornerRadius : 0; tr = (tr) ? cornerRadius : 0; bl = (bl) ? cornerRadius : 0; br = (br) ? cornerRadius : 0; GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br); g.endFill(); } else { g.beginFill(rectColor, focusAlpha); ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + focusThickness) : 0 * 2); g.drawRoundRect(0, 0, w, h, ellipseSize, ellipseSize); ellipseSize = (cornerRadius * 2); g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize); g.endFill(); g.beginFill(rectColor, focusAlpha); ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + (focusThickness / 2)) : 0 * 2); g.drawRoundRect((focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), ellipseSize, ellipseSize); ellipseSize = (cornerRadius * 2); g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize); g.endFill(); }; } override public function getStyle(styleProp:String){ return (((styleProp == "focusColor")) ? _focusColor : super.getStyle(styleProp)); } public function set styleDeclaration(value:CSSStyleDeclaration):void{ } } }//package mx.skins.halo
Section 125
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.3.0.4852"; public function Border(){ super(); } public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 126
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import flash.display.*; import mx.core.*; import mx.styles.*; import flash.geom.*; import mx.managers.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin { private var _initialized:Boolean;// = false private var _height:Number; private var invalidateDisplayListFlag:Boolean;// = false private var _styleName:IStyleClient; private var _nestLevel:int;// = 0 private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; mx_internal static const VERSION:String = "3.3.0.4852"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ super(); _width = measuredWidth; _height = measuredHeight; } public function getStyle(styleProp:String){ return ((_styleName) ? _styleName.getStyle(styleProp) : null); } protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(value:int):void{ _nestLevel = value; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{ return (rotatedGradientMatrix(x, y, width, height, 90)); } public function validateSize(recursive:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(value:Boolean):void{ _updateCompletePendingFlag = value; } protected function horizontalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{ return (rotatedGradientMatrix(x, y, width, height, 0)); } override public function set height(value:Number):void{ _height = value; invalidateDisplayList(); } public function set processedDescriptors(value:Boolean):void{ _processedDescriptors = value; } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } override public function set width(value:Number):void{ _width = value; invalidateDisplayList(); } public function get measuredHeight():Number{ return (0); } public function set initialized(value:Boolean):void{ _initialized = value; } protected function drawRoundRect(x:Number, y:Number, width:Number, height:Number, cornerRadius:Object=null, color:Object=null, alpha:Object=null, gradientMatrix:Matrix=null, gradientType:String="linear", gradientRatios:Array=null, hole:Object=null):void{ var ellipseSize:Number; var alphas:Array; var holeR:Object; var g:Graphics = graphics; if ((((width == 0)) || ((height == 0)))){ return; }; if (color !== null){ if ((color is uint)){ g.beginFill(uint(color), Number(alpha)); } else { if ((color is Array)){ alphas = ((alpha is Array)) ? (alpha as Array) : [alpha, alpha]; if (!gradientRatios){ gradientRatios = [0, 0xFF]; }; g.beginGradientFill(gradientType, (color as Array), alphas, gradientRatios, gradientMatrix); }; }; }; if (!cornerRadius){ g.drawRect(x, y, width, height); } else { if ((cornerRadius is Number)){ ellipseSize = (Number(cornerRadius) * 2); g.drawRoundRect(x, y, width, height, ellipseSize, ellipseSize); } else { GraphicsUtil.drawRoundRectComplex(g, x, y, width, height, cornerRadius.tl, cornerRadius.tr, cornerRadius.bl, cornerRadius.br); }; }; if (hole){ holeR = hole.r; if ((holeR is Number)){ ellipseSize = (Number(holeR) * 2); g.drawRoundRect(hole.x, hole.y, hole.w, hole.h, ellipseSize, ellipseSize); } else { GraphicsUtil.drawRoundRectComplex(g, hole.x, hole.y, hole.w, hole.h, holeR.tl, holeR.tr, holeR.bl, holeR.br); }; }; if (color !== null){ g.endFill(); }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(value:Object):void{ if (_styleName != value){ _styleName = (value as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(newWidth:Number, newHeight:Number):void{ var changed:Boolean; if (_width != newWidth){ _width = newWidth; changed = true; }; if (_height != newHeight){ _height = newHeight; changed = true; }; if (changed){ invalidateDisplayList(); }; } public function styleChanged(styleProp:String):void{ invalidateDisplayList(); } override public function get width():Number{ return (_width); } public function invalidateProperties():void{ } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(x:Number, y:Number, width:Number, height:Number, rotation:Number):Matrix{ tempMatrix.createGradientBox(width, height, ((rotation * Math.PI) / 180), x, y); return (tempMatrix); } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get styleName():Object{ return (_styleName); } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } public function invalidateSize():void{ } public function validateProperties():void{ } } }//package mx.skins
Section 127
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import flash.events.*; import flash.display.*; import mx.core.*; import flash.utils.*; import mx.styles.*; import flash.system.*; import flash.geom.*; import mx.resources.*; import flash.net.*; public class RectangularBorder extends Border implements IRectangularBorder { private var backgroundImage:DisplayObject; private var backgroundImageHeight:Number; private var _backgroundImageBounds:Rectangle; private var backgroundImageStyle:Object; private var backgroundImageWidth:Number; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.3.0.4852"; public function RectangularBorder(){ resourceManager = ResourceManager.getInstance(); super(); addEventListener(Event.REMOVED, removedHandler); } public function layoutBackgroundImage():void{ var sW:Number; var sH:Number; var sX:Number; var sY:Number; var scale:Number; var g:Graphics; var p:DisplayObject = parent; var bm:EdgeMetrics = ((p is IContainer)) ? IContainer(p).viewMetrics : borderMetrics; var scrollableBk = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageBounds){ sW = _backgroundImageBounds.width; sH = _backgroundImageBounds.height; } else { sW = ((width - bm.left) - bm.right); sH = ((height - bm.top) - bm.bottom); }; var percentage:Number = getBackgroundSize(); if (isNaN(percentage)){ sX = 1; sY = 1; } else { scale = (percentage * 0.01); sX = ((scale * sW) / backgroundImageWidth); sY = ((scale * sH) / backgroundImageHeight); }; backgroundImage.scaleX = sX; backgroundImage.scaleY = sY; var offsetX:Number = Math.round((0.5 * (sW - (backgroundImageWidth * sX)))); var offsetY:Number = Math.round((0.5 * (sH - (backgroundImageHeight * sY)))); backgroundImage.x = bm.left; backgroundImage.y = bm.top; var backgroundMask:Shape = Shape(backgroundImage.mask); backgroundMask.x = bm.left; backgroundMask.y = bm.top; if (((scrollableBk) && ((p is IContainer)))){ offsetX = (offsetX - IContainer(p).horizontalScrollPosition); offsetY = (offsetY - IContainer(p).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + offsetX); backgroundImage.y = (backgroundImage.y + offsetY); var maskWidth:Number = ((width - bm.left) - bm.right); var maskHeight:Number = ((height - bm.top) - bm.bottom); if (((!((backgroundMask.width == maskWidth))) || (!((backgroundMask.height == maskHeight))))){ g = backgroundMask.graphics; g.clear(); g.beginFill(0xFFFFFF); g.drawRect(0, 0, maskWidth, maskHeight); g.endFill(); }; } public function set backgroundImageBounds(value:Rectangle):void{ _backgroundImageBounds = value; invalidateDisplayList(); } private function getBackgroundSize():Number{ var index:int; var percentage:Number = NaN; var backgroundSize:Object = getStyle("backgroundSize"); if (((backgroundSize) && ((backgroundSize is String)))){ index = backgroundSize.indexOf("%"); if (index != -1){ percentage = Number(backgroundSize.substr(0, index)); }; }; return (percentage); } private function removedHandler(event:Event):void{ var childrenList:IChildList; if (backgroundImage){ childrenList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); childrenList.removeChild(backgroundImage.mask); childrenList.removeChild(backgroundImage); backgroundImage = null; }; } private function initBackgroundImage(image:DisplayObject):void{ backgroundImage = image; if ((image is Loader)){ backgroundImageWidth = Loader(image).contentLoaderInfo.width; backgroundImageHeight = Loader(image).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((image is ISimpleStyleClient)){ ISimpleStyleClient(image).styleName = styleName; }; }; var childrenList:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); var backgroundMask:Shape = new FlexShape(); backgroundMask.name = "backgroundMask"; backgroundMask.x = 0; backgroundMask.y = 0; childrenList.addChild(backgroundMask); var myIndex:int = childrenList.getChildIndex(this); childrenList.addChildAt(backgroundImage, (myIndex + 1)); backgroundImage.mask = backgroundMask; } public function get backgroundImageBounds():Rectangle{ return (_backgroundImageBounds); } public function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function completeEventHandler(event:Event):void{ if (!parent){ return; }; var target:DisplayObject = DisplayObject(LoaderInfo(event.target).loader); initBackgroundImage(target); layoutBackgroundImage(); dispatchEvent(event.clone()); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var message:String; var unscaledWidth = unscaledWidth; var unscaledHeight = unscaledHeight; if (!parent){ return; }; var newStyle:Object = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ removedHandler(null); backgroundImageStyle = newStyle; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ cls = Class(getDefinitionByName(String(newStyle))); //unresolved jump var _slot1 = e; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ message = resourceManager.getString("skins", "notLoaded", [newStyle]); throw (new Error(message)); }; }; }; }; if (backgroundImage){ layoutBackgroundImage(); }; } private function errorEventHandler(event:Event):void{ } } }//package mx.skins
Section 128
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.events.*; import flash.display.*; import mx.core.*; import flash.utils.*; import mx.managers.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; protected var overrides:Object; public var defaultFactory:Function; public var factory:Function; mx_internal var selectorRefCount:int;// = 0 private var styleManager:IStyleManager2; private var clones:Dictionary; mx_internal static const VERSION:String = "3.3.0.4852"; private static const NOT_A_COLOR:uint = 4294967295; private static const FILTERMAP_PROP:String = "__reserved__filterMap"; public function CSSStyleDeclaration(selector:String=null){ clones = new Dictionary(true); super(); if (selector){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); styleManager.setStyleDeclaration(selector, this, false); }; } mx_internal function addStyleToProtoChain(chain:Object, target:DisplayObject, filterMap:Object=null):Object{ var p:String; var emptyObjectFactory:Function; var filteredChain:Object; var filterObjectFactory:Function; var i:String; var chain = chain; var target = target; var filterMap = filterMap; var nodeAddedToChain:Boolean; var originalChain:Object = chain; if (filterMap){ chain = {}; }; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (filterMap){ if (nodeAddedToChain){ filteredChain = {}; filterObjectFactory = function ():void{ }; filterObjectFactory.prototype = originalChain; filteredChain = new (filterObjectFactory); for (i in chain) { if (filterMap[i] != null){ filteredChain[filterMap[i]] = chain[i]; }; }; chain = filteredChain; chain[FILTERMAP_PROP] = filterMap; } else { chain = originalChain; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(styleProp:String){ var o:*; var v:*; if (overrides){ if ((((styleProp in overrides)) && ((overrides[styleProp] === undefined)))){ return (undefined); }; v = overrides[styleProp]; if (v !== undefined){ return (v); }; }; if (factory != null){ factory.prototype = {}; o = new factory(); v = o[styleProp]; if (v !== undefined){ return (v); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; o = new defaultFactory(); v = o[styleProp]; if (v !== undefined){ return (v); }; }; return (undefined); } public function clearStyle(styleProp:String):void{ setStyle(styleProp, undefined); } public function setStyle(styleProp:String, newValue):void{ var i:int; var sm:Object; var oldValue:Object = getStyle(styleProp); var regenerate:Boolean; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((oldValue === newValue))))){ regenerate = true; }; if (newValue !== undefined){ setStyle(styleProp, newValue); } else { if (newValue == oldValue){ return; }; setStyle(styleProp, newValue); }; var sms:Array = SystemManagerGlobals.topLevelSystemManagers; var n:int = sms.length; if (regenerate){ i = 0; while (i < n) { sm = sms[i]; sm.regenerateStyleCache(true); i++; }; }; i = 0; while (i < n) { sm = sms[i]; sm.notifyStyleChangeInChildren(styleProp, true); i++; }; } private function clearStyleAttr(styleProp:String):void{ var clone:*; if (!overrides){ overrides = {}; }; overrides[styleProp] = undefined; for (clone in clones) { delete clone[styleProp]; }; } mx_internal function createProtoChainRoot():Object{ var root:Object = {}; if (defaultFactory != null){ defaultFactory.prototype = root; root = new defaultFactory(); }; if (factory != null){ factory.prototype = root; root = new factory(); }; clones[root] = 1; return (root); } mx_internal function clearOverride(styleProp:String):void{ if (((overrides) && (overrides[styleProp]))){ delete overrides[styleProp]; }; } mx_internal function setStyle(styleProp:String, value):void{ var o:Object; var clone:*; var colorNumber:Number; var cloneFilter:Object; if (value === undefined){ clearStyleAttr(styleProp); return; }; if ((value is String)){ if (!styleManager){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); }; colorNumber = styleManager.getColorName(value); if (colorNumber != NOT_A_COLOR){ value = colorNumber; }; }; if (defaultFactory != null){ o = new defaultFactory(); if (o[styleProp] !== value){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; } else { if (overrides){ delete overrides[styleProp]; }; }; }; if (factory != null){ o = new factory(); if (o[styleProp] !== value){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; } else { if (overrides){ delete overrides[styleProp]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[styleProp] = value; }; for (clone in clones) { cloneFilter = clone[FILTERMAP_PROP]; if (cloneFilter){ if (cloneFilter[styleProp] != null){ clone[cloneFilter[styleProp]] = value; }; } else { clone[styleProp] = value; }; }; } } }//package mx.styles
Section 129
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function set styleName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:Object):void; function styleChanged(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:String):void; function get styleName():Object; } }//package mx.styles
Section 130
//IStyleClient (mx.styles.IStyleClient) package mx.styles { public interface IStyleClient extends ISimpleStyleClient { function regenerateStyleCache(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Boolean):void; function get className():String; function clearStyle(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:String):void; function getClassStyleDeclarations():Array; function get inheritingStyles():Object; function set nonInheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void; function setStyle(_arg1:String, _arg2):void; function get styleDeclaration():CSSStyleDeclaration; function set styleDeclaration(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:CSSStyleDeclaration):void; function get nonInheritingStyles():Object; function set inheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void; function getStyle(*:String); function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void; function registerEffects(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Array):void; } }//package mx.styles
Section 131
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isColorName(value:String):Boolean; function registerParentDisplayListInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerInheritingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function set stylesRoot(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function get typeSelectorCache():Object; function styleDeclarationsChanged():void; function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void; function isParentDisplayListInvalidatingStyle(value:String):Boolean; function isSizeInvalidatingStyle(value:String):Boolean; function get inheritingStyles():Object; function isValidStyleValue(value):Boolean; function isParentSizeInvalidatingStyle(value:String):Boolean; function getColorName(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/set:Object):uint; function set typeSelectorCache(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function getColorNames(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Array):void; function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher; function isInheritingStyle(value:String):Boolean; function set inheritingStyles(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function get stylesRoot():Object; function initProtoChainRoots():void; function registerColorName(_arg1:String, _arg2:uint):void; function registerParentSizeInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerSizeInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void; function isInheritingTextFormatStyle(value:String):Boolean; function getStyleDeclaration(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/get:String):CSSStyleDeclaration; } }//package mx.styles
Section 132
//IStyleManager2 (mx.styles.IStyleManager2) package mx.styles { import flash.events.*; import flash.system.*; public interface IStyleManager2 extends IStyleManager { function get selectors():Array; function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; } }//package mx.styles
Section 133
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 134
//StyleManager (mx.styles.StyleManager) package mx.styles { import flash.events.*; import mx.core.*; import flash.system.*; public class StyleManager { mx_internal static const VERSION:String = "3.3.0.4852"; public static const NOT_A_COLOR:uint = 4294967295; private static var _impl:IStyleManager2; private static var implClassDependency:StyleManagerImpl; public function StyleManager(){ super(); } public static function isParentSizeInvalidatingStyle(styleName:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(styleName)); } public static function registerInheritingStyle(styleName:String):void{ impl.registerInheritingStyle(styleName); } mx_internal static function set stylesRoot(value:Object):void{ impl.stylesRoot = value; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{ impl.setStyleDeclaration(selector, styleDeclaration, update); } public static function registerParentDisplayListInvalidatingStyle(styleName:String):void{ impl.registerParentDisplayListInvalidatingStyle(styleName); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(value:Object):void{ impl.inheritingStyles = value; } public static function isColorName(colorName:String):Boolean{ return (impl.isColorName(colorName)); } public static function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(styleName)); } public static function isSizeInvalidatingStyle(styleName:String):Boolean{ return (impl.isSizeInvalidatingStyle(styleName)); } public static function getColorName(colorName:Object):uint{ return (impl.getColorName(colorName)); } mx_internal static function set typeSelectorCache(value:Object):void{ impl.typeSelectorCache = value; } public static function unloadStyleDeclarations(url:String, update:Boolean=true):void{ impl.unloadStyleDeclarations(url, update); } public static function getColorNames(colors:Array):void{ impl.getColorNames(colors); } public static function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ return (impl.loadStyleDeclarations2(url, update, applicationDomain, securityDomain)); } private static function get impl():IStyleManager2{ if (!_impl){ _impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2")); }; return (_impl); } public static function isValidStyleValue(value):Boolean{ return (impl.isValidStyleValue(value)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(styleName:String):Boolean{ return (impl.isInheritingStyle(styleName)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(styleName:String):void{ impl.registerParentSizeInvalidatingStyle(styleName); } public static function get selectors():Array{ return (impl.selectors); } public static function registerSizeInvalidatingStyle(styleName:String):void{ impl.registerSizeInvalidatingStyle(styleName); } public static function clearStyleDeclaration(selector:String, update:Boolean):void{ impl.clearStyleDeclaration(selector, update); } public static function registerColorName(colorName:String, colorValue:uint):void{ impl.registerColorName(colorName, colorValue); } public static function isInheritingTextFormatStyle(styleName:String):Boolean{ return (impl.isInheritingTextFormatStyle(styleName)); } public static function getStyleDeclaration(selector:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(selector)); } } }//package mx.styles
Section 135
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.resources.*; import mx.managers.*; public class StyleManagerImpl implements IStyleManager2 { private var _stylesRoot:Object; private var _selectors:Object; private var styleModules:Object; private var _inheritingStyles:Object; private var resourceManager:IResourceManager; private var _typeSelectorCache:Object; mx_internal static const VERSION:String = "3.3.0.4852"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager2; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ _selectors = {}; styleModules = {}; resourceManager = ResourceManager.getInstance(); _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{ styleDeclaration.selectorRefCount++; _selectors[selector] = styleDeclaration; typeSelectorCache = {}; if (update){ styleDeclarationsChanged(); }; } public function registerParentDisplayListInvalidatingStyle(styleName:String):void{ parentDisplayListInvalidatingStyles[styleName] = true; } public function getStyleDeclaration(selector:String):CSSStyleDeclaration{ var index:int; if (selector.charAt(0) != "."){ index = selector.lastIndexOf("."); if (index != -1){ selector = selector.substr((index + 1)); }; }; return (_selectors[selector]); } public function set typeSelectorCache(value:Object):void{ _typeSelectorCache = value; } public function isColorName(colorName:String):Boolean{ return (!((colorNames[colorName.toLowerCase()] === undefined))); } public function set inheritingStyles(value:Object):void{ _inheritingStyles = value; } public function getColorNames(colors:Array):void{ var colorNumber:uint; if (!colors){ return; }; var n:int = colors.length; var i:int; while (i < n) { if (((!((colors[i] == null))) && (isNaN(colors[i])))){ colorNumber = getColorName(colors[i]); if (colorNumber != StyleManager.NOT_A_COLOR){ colors[i] = colorNumber; }; }; i++; }; } public function isInheritingTextFormatStyle(styleName:String):Boolean{ return ((inheritingTextFormatStyles[styleName] == true)); } public function registerParentSizeInvalidatingStyle(styleName:String):void{ parentSizeInvalidatingStyles[styleName] = true; } public function registerColorName(colorName:String, colorValue:uint):void{ colorNames[colorName.toLowerCase()] = colorValue; } public function isParentSizeInvalidatingStyle(styleName:String):Boolean{ return ((parentSizeInvalidatingStyles[styleName] == true)); } public function registerInheritingStyle(styleName:String):void{ inheritingStyles[styleName] = true; } public function set stylesRoot(value:Object):void{ _stylesRoot = value; } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{ return ((parentDisplayListInvalidatingStyles[styleName] == true)); } public function isSizeInvalidatingStyle(styleName:String):Boolean{ return ((sizeInvalidatingStyles[styleName] == true)); } public function styleDeclarationsChanged():void{ var sm:Object; var sms:Array = SystemManagerGlobals.topLevelSystemManagers; var n:int = sms.length; var i:int; while (i < n) { sm = sms[i]; sm.regenerateStyleCache(true); sm.notifyStyleChangeInChildren(null, true); i++; }; } public function isValidStyleValue(value):Boolean{ return (!((value === undefined))); } public function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false):IEventDispatcher{ return (loadStyleDeclarations2(url, update)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function unloadStyleDeclarations(url:String, update:Boolean=true):void{ var module:IModuleInfo; var styleModuleInfo:StyleModuleInfo = styleModules[url]; if (styleModuleInfo){ styleModuleInfo.styleModule.unload(); module = styleModuleInfo.module; module.unload(); module.removeEventListener(ModuleEvent.READY, styleModuleInfo.readyHandler); module.removeEventListener(ModuleEvent.ERROR, styleModuleInfo.errorHandler); styleModules[url] = null; }; if (update){ styleDeclarationsChanged(); }; } public function getColorName(colorName:Object):uint{ var n:Number; var c:*; if ((colorName is String)){ if (colorName.charAt(0) == "#"){ n = Number(("0x" + colorName.slice(1))); return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n)); }; if ((((colorName.charAt(1) == "x")) && ((colorName.charAt(0) == "0")))){ n = Number(colorName); return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n)); }; c = colorNames[colorName.toLowerCase()]; if (c === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(c)); }; return (uint(colorName)); } public function isInheritingStyle(styleName:String):Boolean{ return ((inheritingStyles[styleName] == true)); } public function get stylesRoot():Object{ return (_stylesRoot); } public function initProtoChainRoots():void{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ delete _inheritingStyles["textDecoration"]; delete _inheritingStyles["leading"]; }; if (!stylesRoot){ stylesRoot = _selectors["global"].addStyleToProtoChain({}, null); }; } public function loadStyleDeclarations2(url:String, update:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{ var module:IModuleInfo; var styleEventDispatcher:StyleEventDispatcher; var timer:Timer; var timerHandler:Function; var url = url; var update = update; var applicationDomain = applicationDomain; var securityDomain = securityDomain; module = ModuleManager.getModule(url); var readyHandler:Function = function (moduleEvent:ModuleEvent):void{ var styleModule:IStyleModule = IStyleModule(moduleEvent.module.factory.create()); styleModules[moduleEvent.module.url].styleModule = styleModule; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); var errorHandler:Function = function (moduleEvent:ModuleEvent):void{ var styleEvent:StyleEvent; var errorText:String = resourceManager.getString("styles", "unableToLoad", [moduleEvent.errorText, url]); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ styleEvent = new StyleEvent(StyleEvent.ERROR, moduleEvent.bubbles, moduleEvent.cancelable); styleEvent.bytesLoaded = 0; styleEvent.bytesTotal = 0; styleEvent.errorText = errorText; styleEventDispatcher.dispatchEvent(styleEvent); } else { throw (new Error(errorText)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (event:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); module.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerSizeInvalidatingStyle(styleName:String):void{ sizeInvalidatingStyles[styleName] = true; } public function clearStyleDeclaration(selector:String, update:Boolean):void{ var styleDeclaration:CSSStyleDeclaration = getStyleDeclaration(selector); if (((styleDeclaration) && ((styleDeclaration.selectorRefCount > 0)))){ styleDeclaration.selectorRefCount--; }; delete _selectors[selector]; if (update){ styleDeclarationsChanged(); }; } public function get selectors():Array{ var i:String; var theSelectors:Array = []; for (i in _selectors) { theSelectors.push(i); }; return (theSelectors); } public static function getInstance():IStyleManager2{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.modules.*; import mx.events.*; class StyleEventDispatcher extends EventDispatcher { private function StyleEventDispatcher(moduleInfo:IModuleInfo){ super(); moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_progressHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, event.bubbles, event.cancelable); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; dispatchEvent(styleEvent); } private function moduleInfo_readyHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.COMPLETE); dispatchEvent(styleEvent); } private function moduleInfo_errorHandler(event:ModuleEvent):void{ var styleEvent:StyleEvent = new StyleEvent(StyleEvent.ERROR, event.bubbles, event.cancelable); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; styleEvent.errorText = event.errorText; dispatchEvent(styleEvent); } } class StyleModuleInfo { public var errorHandler:Function; public var readyHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; private function StyleModuleInfo(module:IModuleInfo, readyHandler:Function, errorHandler:Function){ super(); this.module = module; this.readyHandler = readyHandler; this.errorHandler = errorHandler; } }
Section 136
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "3.3.0.4852"; public function ColorUtil(){ super(); } public static function adjustBrightness2(rgb:uint, brite:Number):uint{ var r:Number; var g:Number; var b:Number; if (brite == 0){ return (rgb); }; if (brite < 0){ brite = ((100 + brite) / 100); r = (((rgb >> 16) & 0xFF) * brite); g = (((rgb >> 8) & 0xFF) * brite); b = ((rgb & 0xFF) * brite); } else { brite = (brite / 100); r = ((rgb >> 16) & 0xFF); g = ((rgb >> 8) & 0xFF); b = (rgb & 0xFF); r = (r + ((0xFF - r) * brite)); g = (g + ((0xFF - g) * brite)); b = (b + ((0xFF - b) * brite)); r = Math.min(r, 0xFF); g = Math.min(g, 0xFF); b = Math.min(b, 0xFF); }; return ((((r << 16) | (g << 8)) | b)); } public static function rgbMultiply(rgb1:uint, rgb2:uint):uint{ var r1:Number = ((rgb1 >> 16) & 0xFF); var g1:Number = ((rgb1 >> 8) & 0xFF); var b1:Number = (rgb1 & 0xFF); var r2:Number = ((rgb2 >> 16) & 0xFF); var g2:Number = ((rgb2 >> 8) & 0xFF); var b2:Number = (rgb2 & 0xFF); return ((((((r1 * r2) / 0xFF) << 16) | (((g1 * g2) / 0xFF) << 8)) | ((b1 * b2) / 0xFF))); } public static function adjustBrightness(rgb:uint, brite:Number):uint{ var r:Number = Math.max(Math.min((((rgb >> 16) & 0xFF) + brite), 0xFF), 0); var g:Number = Math.max(Math.min((((rgb >> 8) & 0xFF) + brite), 0xFF), 0); var b:Number = Math.max(Math.min(((rgb & 0xFF) + brite), 0xFF), 0); return ((((r << 16) | (g << 8)) | b)); } } }//package mx.utils
Section 137
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.3.0.4852"; public function GraphicsUtil(){ super(); } public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void{ var xw:Number = (x + width); var yh:Number = (y + height); var minSize:Number = ((width < height)) ? (width * 2) : (height * 2); topLeftRadius = ((topLeftRadius < minSize)) ? topLeftRadius : minSize; topRightRadius = ((topRightRadius < minSize)) ? topRightRadius : minSize; bottomLeftRadius = ((bottomLeftRadius < minSize)) ? bottomLeftRadius : minSize; bottomRightRadius = ((bottomRightRadius < minSize)) ? bottomRightRadius : minSize; var a:Number = (bottomRightRadius * 0.292893218813453); var s:Number = (bottomRightRadius * 0.585786437626905); graphics.moveTo(xw, (yh - bottomRightRadius)); graphics.curveTo(xw, (yh - s), (xw - a), (yh - a)); graphics.curveTo((xw - s), yh, (xw - bottomRightRadius), yh); a = (bottomLeftRadius * 0.292893218813453); s = (bottomLeftRadius * 0.585786437626905); graphics.lineTo((x + bottomLeftRadius), yh); graphics.curveTo((x + s), yh, (x + a), (yh - a)); graphics.curveTo(x, (yh - s), x, (yh - bottomLeftRadius)); a = (topLeftRadius * 0.292893218813453); s = (topLeftRadius * 0.585786437626905); graphics.lineTo(x, (y + topLeftRadius)); graphics.curveTo(x, (y + s), (x + a), (y + a)); graphics.curveTo((x + s), y, (x + topLeftRadius), y); a = (topRightRadius * 0.292893218813453); s = (topRightRadius * 0.585786437626905); graphics.lineTo((xw - topRightRadius), y); graphics.curveTo((xw - s), y, (xw - a), (y + a)); graphics.curveTo(xw, (y + s), xw, (y + topRightRadius)); graphics.lineTo(xw, (yh - bottomRightRadius)); } } }//package mx.utils
Section 138
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.3.0.4852"; private static var counter:int = 0; public function NameUtil(){ super(); } public static function displayObjectToString(displayObject:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = displayObject; o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; //unresolved jump var _slot1 = e; return (result); } public static function createUniqueName(object:Object):String{ if (!object){ return (null); }; var name:String = getQualifiedClassName(object); var index:int = name.indexOf("::"); if (index != -1){ name = name.substr((index + 2)); }; var charCode:int = name.charCodeAt((name.length - 1)); if ((((charCode >= 48)) && ((charCode <= 57)))){ name = (name + "_"); }; return ((name + counter++)); } } }//package mx.utils
Section 139
//StringUtil (mx.utils.StringUtil) package mx.utils { public class StringUtil { mx_internal static const VERSION:String = "3.3.0.4852"; public function StringUtil(){ super(); } public static function trim(str:String):String{ if (str == null){ return (""); }; var startIndex:int; while (isWhitespace(str.charAt(startIndex))) { startIndex++; }; var endIndex:int = (str.length - 1); while (isWhitespace(str.charAt(endIndex))) { endIndex--; }; if (endIndex >= startIndex){ return (str.slice(startIndex, (endIndex + 1))); }; return (""); } public static function isWhitespace(character:String):Boolean{ switch (character){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(str:String, ... _args):String{ var args:Array; if (str == null){ return (""); }; var len:uint = _args.length; if ((((len == 1)) && ((_args[0] is Array)))){ args = (_args[0] as Array); len = args.length; } else { args = _args; }; var i:int; while (i < len) { str = str.replace(new RegExp((("\\{" + i) + "\\}"), "g"), args[i]); i++; }; return (str); } public static function trimArrayElements(value:String, delimiter:String):String{ var items:Array; var len:int; var i:int; if (((!((value == ""))) && (!((value == null))))){ items = value.split(delimiter); len = items.length; i = 0; while (i < len) { items[i] = StringUtil.trim(items[i]); i++; }; if (len > 0){ value = items.join(delimiter); }; }; return (value); } } }//package mx.utils
Section 140
//Stats (net.hires.debug.Stats) package net.hires.debug { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.geom.*; import flash.text.*; public class Stats extends Sprite { protected const WIDTH:uint = 70; protected const HEIGHT:uint = 100; protected var timer:uint; protected var mem_max_graph:uint; protected var theme:Object; protected var mem:Number; protected var xml:XML; protected var graph:Bitmap; protected var mem_graph:uint; protected var fps:uint; protected var ms_prev:uint; protected var text:TextField; protected var rectangle:Rectangle; protected var style:StyleSheet; protected var ms:uint; protected var fps_graph:uint; protected var mem_max:Number; public function Stats(_theme:Object=null):void{ theme = {bg:51, fps:0xFFFF00, ms:0xFF00, mem:0xFFFF, memmax:0xFF0070}; super(); if (_theme){ if (_theme.bg != null){ theme.bg = _theme.bg; }; if (_theme.fps != null){ theme.fps = _theme.fps; }; if (_theme.ms != null){ theme.ms = _theme.ms; }; if (_theme.mem != null){ theme.mem = _theme.mem; }; if (_theme.memmax != null){ theme.memmax = _theme.memmax; }; }; mem_max = 0; xml = <xml><fps>FPS:</fps><ms>MS:</ms><mem>MEM:</mem><memMax>MAX:</memMax></xml> ; style = new StyleSheet(); style.setStyle("xml", {fontSize:"9px", fontFamily:"_sans", leading:"-2px"}); style.setStyle("fps", {color:hex2css(theme.fps)}); style.setStyle("ms", {color:hex2css(theme.ms)}); style.setStyle("mem", {color:hex2css(theme.mem)}); style.setStyle("memMax", {color:hex2css(theme.memmax)}); text = new TextField(); text.width = WIDTH; text.height = 50; text.styleSheet = style; text.condenseWhite = true; text.selectable = false; text.mouseEnabled = false; graph = new Bitmap(); graph.y = 50; rectangle = new Rectangle((WIDTH - 1), 0, 1, (HEIGHT - 50)); addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, destroy, false, 0, true); } private function destroy(e:Event):void{ graphics.clear(); while (numChildren > 0) { removeChildAt(0); }; graph.bitmapData.dispose(); removeEventListener(MouseEvent.CLICK, onClick); removeEventListener(Event.ENTER_FRAME, update); } private function onClick(e:MouseEvent):void{ if (((mouseY / height) > 0.5)){ stage.frameRate--; } else { stage.frameRate++; }; xml.fps = ((("FPS: " + fps) + " / ") + stage.frameRate); text.htmlText = xml; } private function init(e:Event):void{ graphics.beginFill(theme.bg); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); addChild(text); graph.bitmapData = new BitmapData(WIDTH, (HEIGHT - 50), false, theme.bg); addChild(graph); addEventListener(MouseEvent.CLICK, onClick); addEventListener(Event.ENTER_FRAME, update); } private function update(e:Event):void{ timer = getTimer(); if ((timer - 1000) > ms_prev){ ms_prev = timer; mem = Number((System.totalMemory * 9.54E-7).toFixed(3)); mem_max = ((mem_max > mem)) ? mem_max : mem; fps_graph = Math.min(graph.height, ((fps / stage.frameRate) * graph.height)); mem_graph = (Math.min(graph.height, Math.sqrt(Math.sqrt((mem * 5000)))) - 2); mem_max_graph = (Math.min(graph.height, Math.sqrt(Math.sqrt((mem_max * 5000)))) - 2); graph.bitmapData.scroll(-1, 0); graph.bitmapData.fillRect(rectangle, theme.bg); graph.bitmapData.setPixel((graph.width - 1), (graph.height - fps_graph), theme.fps); graph.bitmapData.setPixel((graph.width - 1), (graph.height - ((timer - ms) >> 1)), theme.ms); graph.bitmapData.setPixel((graph.width - 1), (graph.height - mem_graph), theme.mem); graph.bitmapData.setPixel((graph.width - 1), (graph.height - mem_max_graph), theme.memmax); xml.fps = ((("FPS: " + fps) + " / ") + stage.frameRate); xml.mem = ("MEM: " + mem); xml.memMax = ("MAX: " + mem_max); fps = 0; }; fps++; xml.ms = ("MS: " + (timer - ms)); ms = timer; text.htmlText = xml; } private function hex2css(color:int):String{ return (("#" + color.toString(16))); } } }//package net.hires.debug
Section 141
//IDispatcher (org.osflash.signals.IDispatcher) package org.osflash.signals { public interface IDispatcher { function dispatch(... _args):void; } }//package org.osflash.signals
Section 142
//ISignal (org.osflash.signals.ISignal) package org.osflash.signals { public interface ISignal { function add(org.osflash.signals:ISignal/org.osflash.signals:ISignal:valueClasses/get:Function):Function; function addOnce(org.osflash.signals:ISignal/org.osflash.signals:ISignal:valueClasses/get:Function):Function; function remove(org.osflash.signals:ISignal/org.osflash.signals:ISignal:valueClasses/get:Function):Function; function get valueClasses():Array; function get numListeners():uint; } }//package org.osflash.signals
Section 143
//Signal (org.osflash.signals.Signal) package org.osflash.signals { import flash.utils.*; import flash.errors.*; public class Signal implements ISignal, IDispatcher { protected var listenersNeedCloning:Boolean;// = false protected var onceListeners:Dictionary; protected var _valueClasses:Array; protected var listeners:Array; public function Signal(... _args){ super(); listeners = []; onceListeners = new Dictionary(); if ((((_args.length == 1)) && ((_args[0] is Array)))){ var valueClasses:Array = _args[0]; }; setValueClasses(_args); } public function add(listener:Function):Function{ registerListener(listener); return (listener); } public function addOnce(listener:Function):Function{ registerListener(listener, true); return (listener); } public function remove(listener:Function):Function{ var index:int = listeners.indexOf(listener); if (index == -1){ return (listener); }; if (listenersNeedCloning){ listeners = listeners.slice(); listenersNeedCloning = false; }; listeners.splice(index, 1); delete onceListeners[listener]; return (listener); } protected function registerListener(listener:Function, once:Boolean=false):void{ var argumentString:String; if (listener.length < _valueClasses.length){ argumentString = ((listener.length)==1) ? "argument" : "arguments"; throw (new ArgumentError((((((("Listener has " + listener.length) + " ") + argumentString) + " but it needs at least ") + _valueClasses.length) + " to match the given value classes."))); }; if (!listeners.length){ listeners[0] = listener; if (once){ onceListeners[listener] = true; }; return; }; if (listeners.indexOf(listener) >= 0){ if (((onceListeners[listener]) && (!(once)))){ throw (new IllegalOperationError("You cannot addOnce() then add() the same listener without removing the relationship first.")); }; if (((!(onceListeners[listener])) && (once))){ throw (new IllegalOperationError("You cannot add() then addOnce() the same listener without removing the relationship first.")); }; return; }; if (listenersNeedCloning){ listeners = listeners.slice(); listenersNeedCloning = false; }; listeners[listeners.length] = listener; if (once){ onceListeners[listener] = true; }; } protected function setValueClasses(valueClasses:Array):void{ _valueClasses = ((valueClasses) || ([])); var i:int = _valueClasses.length; while (i--) { if (!(_valueClasses[i] is Class)){ throw (new ArgumentError((((("Invalid valueClasses argument: item at index " + i) + " should be a Class but was:<") + _valueClasses[i]) + ">."))); }; }; } public function get numListeners():uint{ return (listeners.length); } public function dispatch(... _args):void{ var valueObject:Object; var valueClass:Class; var listener:Function; var numValueClasses:int = _valueClasses.length; if (_args.length < numValueClasses){ throw (new ArgumentError((((("Incorrect number of arguments. Expected at least " + numValueClasses) + " but received ") + _args.length) + "."))); }; var i:int; while (i < numValueClasses) { valueObject = _args[i]; if ((((valueObject === null)) || ((valueObject is _valueClasses[i])))){ } else { throw (new ArgumentError((((("Value object <" + valueObject) + "> is not an instance of <") + valueClass) + ">."))); }; i++; }; if (!listeners.length){ return; }; listenersNeedCloning = true; switch (_args.length){ case 0: for each (listener in listeners) { if (onceListeners[listener]){ remove(listener); }; listener(); }; break; case 1: for each (listener in listeners) { if (onceListeners[listener]){ remove(listener); }; listener(_args[0]); }; break; default: for each (listener in listeners) { if (onceListeners[listener]){ remove(listener); }; listener.apply(null, _args); }; }; listenersNeedCloning = false; } public function get valueClasses():Array{ return (_valueClasses); } public function removeAll():void{ var i:uint = listeners.length; while (i--) { remove((listeners[i] as Function)); }; } } }//package org.osflash.signals
Section 144
//_activeButtonStyleStyle (_activeButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeButtonStyleStyle { public static function init(_activeButtonStyleStyle:IFlexModuleFactory):void{ var fbs = _activeButtonStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 145
//_activeTabStyleStyle (_activeTabStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeTabStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeTabStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 146
//_alertButtonStyleStyle (_alertButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _alertButtonStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".alertButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 734012; }; }; } } }//package
Section 147
//_comboDropdownStyle (_comboDropdownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropdownStyle { public static function init(leading:IFlexModuleFactory):void{ var fbs = leading; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropdown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.leading = 0; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; this.paddingLeft = 5; this.paddingRight = 5; }; }; } } }//package
Section 148
//_dataGridStylesStyle (_dataGridStylesStyle) package { import mx.core.*; import mx.styles.*; public class _dataGridStylesStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dataGridStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 149
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_dateFieldPopupStyle.as$3:IFlexModuleFactory):void{ var fbs = _dateFieldPopupStyle.as$3; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 150
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(borderColor:IFlexModuleFactory):void{ var fbs = borderColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 151
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(horizontalGridLines:IFlexModuleFactory):void{ var fbs = horizontalGridLines; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.iconColor = 0x111111; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.textDecoration = "none"; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.modalTransparencyColor = 0xDDDDDD; this.cornerRadius = 0; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.version = "3.0.0"; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.disabledIconColor = 0x999999; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 152
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 153
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle) package { import mx.core.*; import mx.styles.*; public class _headerDragProxyStyleStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 154
//_linkButtonStyleStyle (_linkButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _linkButtonStyleStyle { public static function init(http://adobe.com/AS3/2006/builtin:IFlexModuleFactory):void{ var fbs = http://adobe.com/AS3/2006/builtin; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".linkButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.paddingLeft = 2; this.paddingBottom = 2; this.paddingRight = 2; }; }; } } }//package
Section 155
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(Object:IFlexModuleFactory):void{ var fbs = Object; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 156
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(backgroundImage:IFlexModuleFactory):void{ var fbs = backgroundImage; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 157
//_popUpMenuStyle (_popUpMenuStyle) package { import mx.core.*; import mx.styles.*; public class _popUpMenuStyle { public static function init(normal:IFlexModuleFactory):void{ var fbs = normal; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".popUpMenu", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "normal"; this.textAlign = "left"; }; }; } } }//package
Section 158
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle) package { import mx.core.*; import mx.styles.*; public class _richTextEditorTextAreaStyleStyle { public static function init(_richTextEditorTextAreaStyleStyle:IFlexModuleFactory):void{ var fbs = _richTextEditorTextAreaStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 159
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle) package { import mx.core.*; import mx.styles.*; public class _swatchPanelTextFieldStyle { public static function init(shadowCapColor:IFlexModuleFactory):void{ var fbs = shadowCapColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "inset"; this.borderColor = 14015965; this.highlightColor = 12897484; this.backgroundColor = 0xFFFFFF; this.shadowCapColor = 14015965; this.shadowColor = 14015965; this.paddingLeft = 5; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.paddingRight = 5; }; }; } } }//package
Section 160
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaHScrollBarStyleStyle { public static function init(_textAreaHScrollBarStyleStyle:IFlexModuleFactory):void{ var fbs = _textAreaHScrollBarStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 161
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaVScrollBarStyleStyle { public static function init(_textAreaVScrollBarStyleStyle:IFlexModuleFactory):void{ var fbs = _textAreaVScrollBarStyleStyle; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 162
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(color:IFlexModuleFactory):void{ var fbs = color; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 163
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 164
//_windowStatusStyle (_windowStatusStyle) package { import mx.core.*; import mx.styles.*; public class _windowStatusStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStatus", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0x666666; }; }; } } }//package
Section 165
//_windowStylesStyle (_windowStylesStyle) package { import mx.core.*; import mx.styles.*; public class _windowStylesStyle { public static function init(:IFlexModuleFactory):void{ var fbs = ; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 166
//BabyCare (BabyCare) package { import flash.events.*; import flash.display.*; import com.csharks.vinod.*; import com.csharks.juwalbose.utils.ui.*; import com.greensock.*; import flash.utils.*; import mochi.as3.*; import flash.media.*; import com.csharks.juwalbose.cFlashtory.*; import com.csharks.juwalbose.utils.*; import com.greensock.easing.*; import com.carlcalderon.arthropod.*; import flash.filters.*; public class BabyCare extends cFlashtory { private var gameScoreText:UiBox; private var spawnPauseDelay:Number; private var foodTable:WorkingTable; private var TargetMessage:Class; private var DoorOpenSFX:Class; private var levelInstanceId:uint; private var uuuuu:uint; private var gameTimerText:UiBox; private var timeOver:Boolean; private var PauseMessage:Class; protected var BgClip:Class; private var DoorCloseSFX:Class; private var upgradeShown:Boolean; private var TakeSFX:Class; private var gameLifeText:UiBox; private var childOnScreen:Number; private var levelScore:Number; private var washTable:WorkingTable; private var targetBox:MovieClip; protected var ButtonUpClip:Class; protected var ButtonDownClip:Class; private var bonusTime:Number; private var upgrade_mc:MovieClip; private var tempSound:Sound; private var pausedClip:MovieClip; private var oldScore:Number; private var ScoreSFX:Class; private var medicineTable:WorkingTable; private var nodes:XML; private var gameCounter:Counter; protected var ButtonOverClip:Class; private var doorBusy:Boolean; private var childNum:Number; private var bed1:Bed; private var gameReady:Boolean; private var bed3:Bed; private var bed4:Bed; private var childSent:Number; private var ClickSFX2:Class; private var dressTable:WorkingTable; private var bed2:Bed; private var persistentData:Object; private var LevelUpSFX:Class; private var player:Player; private var fxChannel:SoundChannel; private var Cradle:Class; private var extraChild:Boolean; private var lastSpawnTime:Number; private var commandBusy:Boolean; private var kidsArray:Array; private var Upgrade:Class; private var ClickSFX:Class; private var gameLevelText:UiBox; public function BabyCare(){ tempSound = new Sound(); BgClip = BabyCare_BgClip; ButtonUpClip = BabyCare_ButtonUpClip; ButtonDownClip = BabyCare_ButtonDownClip; ButtonOverClip = BabyCare_ButtonOverClip; Upgrade = BabyCare_Upgrade; Cradle = BabyCare_Cradle; PauseMessage = BabyCare_PauseMessage; TargetMessage = BabyCare_TargetMessage; ClickSFX = BabyCare_ClickSFX; ScoreSFX = BabyCare_ScoreSFX; DoorOpenSFX = BabyCare_DoorOpenSFX; DoorCloseSFX = BabyCare_DoorCloseSFX; TakeSFX = BabyCare_TakeSFX; ClickSFX2 = BabyCare_ClickSFX2; LevelUpSFX = BabyCare_LevelUpSFX; super(); if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, init); }; } protected function forceGameOver(evnth:MouseEvent):void{ gameSequence.changeState("GameOver"); } override protected function gotoHelpPage(evnth:MouseEvent):void{ playSound(ClickSFX, "gotoHelpPage"); super.gotoHelpPage(evnth); } override protected function assignSubmitScore(evnt:Event):void{ var evnt = evnt; evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignSubmitScore); evnt.currentTarget.stop(); MochiScores.showLeaderboard({boardID:"1e113c7239048b3f", score:gameVars.score, res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), clip:evnt.currentTarget, onClose:function ():void{ templateMc.gotoAndPlay(2); }}); templateMc.addEventListener(Event.ENTER_FRAME, checkTemplate); } override protected function levelUpExit(evnt:Object):void{ levelUp_mc.frame_mc.continue_btn.removeEventListener(MouseEvent.CLICK, levelUp2Game); levelUp_mc.frame_mc.upgrade_btn.removeEventListener(MouseEvent.CLICK, showUpgrade); super.levelUpExit(evnt); } override protected function gameoverInit(evnt:Object):void{ gameVars.score = oldScore; super.gameoverInit(evnt); gameOver_mc.x = gameVars.stageMiddleX; gameOver_mc.y = gameVars.stageMiddleY; gameOver_mc.frame_mc.addFrameScript((gameOver_mc.frame_mc.totalFrames - 1), gameOver_mc.frame_mc.stop); } override protected function helpExit(evnt:Object):void{ help_mc.frame_mc.back_btn.removeEventListener(MouseEvent.CLICK, backBtnFn); super.helpExit(evnt); } private function onOut(e:MouseEvent):void{ e.currentTarget.scaleX = (e.currentTarget.scaleY = 1); } private function cradleClicked(e:MouseEvent):void{ showClickedEffect((e.currentTarget as MovieClip)); bed1.enableClick(bedClicked); bed2.enableClick(bedClicked); bed3.enableClick(bedClicked); bed4.enableClick(bedClicked); dressTable.enableClick(tableClicked); washTable.enableClick(tableClicked); foodTable.enableClick(tableClicked); medicineTable.enableClick(tableClicked); playSound(ClickSFX2, "cradleClicked"); e.currentTarget.removeEventListener(MouseEvent.CLICK, cradleClicked); gameVars.commands.push("goto|n1", ("cradleAction|" + e.currentTarget.name)); displayAddedCommand(("goto|n1, cradleAction|" + e.currentTarget.name)); } private function gameLoop():void{ var kid:Baby; player.update(); for each (kid in kidsArray) { kid.update(); }; washTable.update(); dressTable.update(); medicineTable.update(); foodTable.update(); if ((getTimer() - lastSpawnTime) > gameVars.minSpawnInterval[(gameVars.level - 1)]){ Debug.log(((("doorBusy=" + doorBusy) + "\ntimeOver=") + timeOver), 0xCCCCCC); lastSpawnTime = getTimer(); if ((((childNum < gameVars.maxChildren[(gameVars.level - 1)])) && ((childOnScreen < gameVars.maxChildrenAtOnce)))){ if (((!(doorBusy)) && (!(timeOver)))){ spawnChild(); }; }; }; if (gameCounter.currentTime < 7){ if ((((((((extraChild == false)) && (!(doorBusy)))) && (!(timeOver)))) && ((childOnScreen < gameVars.maxChildrenAtOnce)))){ extraChild = true; spawnChild(); }; }; if ((((commandBusy == false)) && ((gameVars.commands.length > 0)))){ commandBusy = true; runCommand(gameVars.commands[0]); gameVars.commands.splice(0, 1); }; } override protected function gameoverExit(evnt:Object):void{ gameOver_mc.frame_mc.continue_btn.removeEventListener(MouseEvent.CLICK, gameOver2Game); super.gameoverExit(evnt); } override protected function clearCanvas():void{ var baby:Baby; gameCounter.dispose(); gameCounter = null; gameReady = false; if (targetBox != null){ game_mc.removeChild(targetBox); targetBox = null; }; bed1.disableClick(); bed2.disableClick(); bed3.disableClick(); bed4.disableClick(); washTable.disableClick(); dressTable.disableClick(); foodTable.disableClick(); medicineTable.disableClick(); washTable.afterWork = null; dressTable.afterWork = null; foodTable.afterWork = null; medicineTable.afterWork = null; for each (baby in kidsArray) { baby.removeEventListener("jobFailure", jobFailed); baby.clip.parent.removeChild(baby.clip); baby.dispose(); baby = null; }; kidsArray = []; game_mc.main_mc.removeChild(bed1.clip); game_mc.main_mc.removeChild(bed2.clip); game_mc.main_mc.removeChild(bed3.clip); game_mc.main_mc.removeChild(bed4.clip); bed1 = null; bed2 = null; bed3 = null; bed4 = null; player.onNextBend = null; game_mc.main_mc.removeChild(player.clip); player = null; game_mc.main_mc.removeChild(washTable.clip); game_mc.main_mc.removeChild(dressTable.clip); game_mc.main_mc.removeChild(foodTable.clip); game_mc.main_mc.removeChild(medicineTable.clip); washTable = null; dressTable = null; medicineTable = null; foodTable = null; childNum = 0; childOnScreen = 0; childSent = 0; kidsArray = []; timeOver = false; extraChild = false; commandBusy = false; SceneManager.removeItem(game_mc, "Score"); SceneManager.removeItem(game_mc, "Timer"); SceneManager.removeButton(game_mc, "Force Level Up", forceLevelUp); SceneManager.removeButton(game_mc, "Force Game Over", forceGameOver); SceneManager.removeButton(game_mc, "Force Game Win", forceGameWin); super.clearCanvas(); } override protected function gameHelpExit(evnt:Object=null):void{ helpDisplay_mc.frame_mc.back_btn.removeEventListener(MouseEvent.CLICK, backToGame); super.gameHelpExit(evnt); } override protected function gameWin2Game(evnt:MouseEvent):void{ setVariable("level", "1", "gameEngineInit", "N"); setVariable("score", "0", "gameEngineInit", "N"); setVariable("life", String(gameVars.lifeMax), "gameEngineInit", "N"); oldScore = 0; super.gameWin2Game(evnt); } private function displayAddedCommand(str:String):void{ } override protected function levelUpAdded(evnt:Event):void{ var levelText:UiBox; var scoreText:UiBox; if (evnt.currentTarget.currentFrame == evnt.currentTarget.totalFrames){ evnt.currentTarget.stop(); levelText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 25, 14222938, gameVars.level); levelText.name = "Level"; evnt.currentTarget.addChild(levelText); scoreText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 25, 14222938, gameVars.score); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); scoreText.y = 18; levelText.y = 57; levelText.x = (scoreText.x = 130); levelUp_mc.frame_mc.continue_btn.addEventListener(MouseEvent.CLICK, levelUp2Game); levelUp_mc.frame_mc.upgrade_btn.addEventListener(MouseEvent.CLICK, showUpgrade); }; } override protected function menuExit(event:Object):void{ super.menuExit(event); menu.frame_mc.play_btn.removeEventListener(MouseEvent.CLICK, gameStart); menu.frame_mc.help_btn.removeEventListener(MouseEvent.CLICK, gotoHelpPage); } override protected function menuInit(evnt:Object):void{ var creditText:UiBox; super.menuInit(evnt); menu.x = gameVars.stageMiddleX; menu.y = gameVars.stageMiddleY; menu.frame_mc.addFrameScript((menu.frame_mc.totalFrames - 1), menu.frame_mc.stop); if (gameVars.mochiEnabled){ MochiSocial.showLoginWidget(); }; if (gameVars.brandUsed == "Csharks"){ logo = (new LogoCsharks() as Sprite); } else { if (gameVars.brandUsed == "OIG"){ logo = (new LogoOIG() as Sprite); }; }; if (logo){ logo.buttonMode = true; logo.name = "Logo"; menu.addChild(logo); logo.addEventListener(MouseEvent.CLICK, gotoSite); logo.x = 90; logo.y = 520; }; if (((gameVars.mochiEnabled) && (gameVars.showShareButton))){ shareBtn = new ShareThis(); shareBtn.name = "Share"; menu.addChild(shareBtn); shareBtn.addEventListener(MouseEvent.CLICK, postToStream); shareBtn.x = 5; shareBtn.y = 40; }; if (gameVars.brandUsed != "Csharks"){ if (gameVars.showCredits != null){ creditText = new UiBox("", 200, 70, UiBoxTypes.TextOnly, 18, 0xFFFFFF, gameVars.showCredits); creditText.name = "CreditText"; creditText.x = (((2 * gameVars.stageMiddleX) - creditText.width) - 20); creditText.y = (((2 * gameVars.stageMiddleY) - creditText.height) - 80); menu.addChild(creditText); creditLogo = (new LogoCsharks() as Sprite); creditLogo.buttonMode = true; creditLogo.name = "Credit Logo"; menu.addChild(creditLogo); creditLogo.addEventListener(MouseEvent.CLICK, gotoCsharksSite); creditLogo.x = (((2 * gameVars.stageMiddleX) - creditLogo.width) - 5); creditLogo.y = (((2 * gameVars.stageMiddleY) - creditLogo.height) - 5); }; }; } private function init(e:Event=null):void{ if (hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, init); }; stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; if (Environment.IS_CSHARKS){ }; if (Environment.IS_OIG){ }; super.cFlashtoryInit(); if (gameVars.mochiEnabled){ MochiServices.connect("84993a1de4031cd8", root); }; if (gameVars.developerMode){ gameSequence.initialState = "Menu"; } else { gameSequence.initialState = "Intro"; }; } override protected function gameInit(evnt:Object):void{ super.gameInit(evnt); if ((((gameVars.level == gameVars.levelMax)) || ((gameVars.level == 1)))){ setVariable("level", "1", "gameEngineInit", "N"); setVariable("score", "0", "gameEngineInit", "N"); setVariable("life", String(gameVars.lifeMax), "gameEngineInit", "N"); oldScore = 0; }; gameEngine.initialState = "GameInit"; game_mc.logo_mc.addEventListener(MouseEvent.CLICK, gotoSite, false, 0, true); } override protected function assignHelp(evnt:Event):void{ evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignHelp); help_mc.frame_mc.back_btn.addEventListener(MouseEvent.CLICK, backBtnFn); } protected function forceGameWin(evnth:MouseEvent):void{ gameSequence.changeState("GameWin"); } override protected function checkAddMochiAds(evnt:Event):void{ levelUp_mc.removeEventListener(Event.ADDED_TO_STAGE, checkAddMochiAds); if (((((gameVars.mochiEnabled) && ((gameVars.showInterLevelAds < gameVars.levelMax)))) && (((gameVars.level % gameVars.showInterLevelAds) == 0)))){ levelUp_mc.gotoAndStop(1); MochiAd.showInterLevelAd({clip:root, id:"test", res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), ad_finished:showLevelUp}); } else { showLevelUp(); }; } protected function forceLevelUp(evnth:MouseEvent):void{ gameEngine.changeState("LevelUp"); } override protected function pauseGame(evnt:Object=null):void{ var kid:Baby; super.pauseGame(evnt); gameReady = false; player.clip.stop(); for each (kid in kidsArray) { kid.pauseTimer(); }; pausedClip = new PauseMessage(); game_mc.addChild(pausedClip); pausedClip.stop(); pausedClip.x = gameVars.stageMiddleX; pausedClip.y = gameVars.stageMiddleY; pausedClip.continue_btn.addEventListener(MouseEvent.CLICK, continueClicked); gameCounter.pause(); setVariable("Paused", "1", "pauseGame", "B"); pauseTime = getTimer(); spawnPauseDelay = (getTimer() - lastSpawnTime); } override protected function gameExit(evnt:Object=null):void{ game_mc.logo_mc.removeEventListener(MouseEvent.CLICK, gotoSite); super.gameExit(evnt); } protected function playSound(which:Class, from:String):void{ var which = which; var from = from; if (gameVars.soundReady){ tempSound = null; tempSound = new (which); fxChannel = tempSound.play(); //unresolved jump var _slot1 = e; }; } override protected function action(evnt:Event):void{ gameLoop(); if (gameVars.timer != gameCounter.currentTime){ setVariable("timer", String(gameCounter.currentTime), "action", "N"); }; gameTimerText.update(String(gameCounter.currentTime)); super.action(evnt); } override protected function helpAdded(evnt:Event):void{ evnt.target.x = gameVars.stageMiddleX; evnt.target.y = gameVars.stageMiddleY; evnt.target.frame_mc.addFrameScript((evnt.target.frame_mc.totalFrames - 1), evnt.target.frame_mc.stop); evnt.target.frame_mc.back_btn.addEventListener(MouseEvent.CLICK, backToGame); evnt.target.removeEventListener(Event.ADDED_TO_STAGE, helpAdded); } public function checkSameInstance():Boolean{ if (player.levelInstanceId == levelInstanceId){ return (true); }; return (false); } private function runCommand(command:String):void{ var action:String = command.split("|")[0]; var actionTarget:String = command.split("|")[1]; switch (action){ case "goto": player.addEventListener("walkCompleted", actionCompleted, false, 0, true); player.goto(actionTarget); break; case "cradleAction": if (MovieClip(game_mc.main_mc.getChildByName(actionTarget)) == null){ commandBusy = false; return; }; if (player.child == null){ if (game_mc.main_mc.getChildByName(actionTarget).getChildByName("kid") != null){ takeChild(game_mc.main_mc.getChildByName(actionTarget)); } else { commandBusy = false; return; }; } else { if ((((MovieClip(game_mc.main_mc.getChildByName(actionTarget)).getChildByName("kid") == null)) && (player.child.needsComplete))){ placeChild(game_mc.main_mc.getChildByName(actionTarget)); } else { gameVars.commands = []; MovieClip(game_mc.main_mc.getChildByName(actionTarget)).addEventListener(MouseEvent.CLICK, cradleClicked, false, 0, true); commandBusy = false; }; }; break; case "action": doAction(actionTarget); break; }; } override protected function helpDisplay(evnt:MouseEvent):void{ playSound(ClickSFX, "helpDisplay"); super.helpDisplay(evnt); } private function makeCradleForChild(targetChild:Baby):void{ var targetChild = targetChild; if (doorBusy){ return; }; doorBusy = true; game_mc.main_mc.door_mc.gotoAndPlay("open"); playSound(DoorOpenSFX, "makeCradleForChild"); game_mc.main_mc.door_mc.addFrameScript(6, function ():void{ if (player.levelInstanceId != levelInstanceId){ return; }; game_mc.main_mc.door_mc.stop(); var kidCradle:MovieClip = new Cradle(); game_mc.main_mc.addChild(kidCradle); Utils.setDepthOf(kidCradle, "below", player.clip); kidCradle.buttonMode = true; kidCradle.addEventListener(MouseEvent.CLICK, cradleClicked, false, 0, true); kidCradle.stop(); kidCradle.name = "kidCradle_mc"; kidCradle.x = 70; kidCradle.y = 170; kidCradle.scaleX = (kidCradle.scaleY = 0.9); TweenLite.to(kidCradle, 0.8, {scaleX:1, scaleY:1, x:70, y:220}); }); } private function upgradeItem(e:MouseEvent):void{ var currentClickedUpgrade:String; switch (e.currentTarget.name){ case "table_btn": currentClickedUpgrade = "table"; break; case "curtain_btn": currentClickedUpgrade = "window"; break; case "carpet_btn": currentClickedUpgrade = "carpet"; break; case "bed_btn": currentClickedUpgrade = "bed"; break; case "ac_btn": currentClickedUpgrade = "ac"; break; }; if (gameVars.score >= gameVars.cost[currentClickedUpgrade]){ e.currentTarget.removeEventListener(MouseEvent.CLICK, upgradeItem); e.currentTarget.gotoAndStop("bought"); gameVars.score = (gameVars.score - gameVars.cost[currentClickedUpgrade]); upgrade_mc.total_txt.text = String(gameVars.score); switch (currentClickedUpgrade){ case "table": gameVars.tableUpdateState = "new"; break; case "window": gameVars.windowUpdateState = "new"; break; case "carpet": gameVars.carpetUpdateState = "new"; break; case "ac": gameVars.acUpdateState = "new"; break; case "bed": gameVars.bedUpdateState = "new"; break; }; }; } private function onOver(e:MouseEvent):void{ e.currentTarget.scaleX = (e.currentTarget.scaleY = 1.05); } private function createScorePopup(score:Number, xPos:Number, yPos:Number):void{ var scorePopup:UiBox; var score = score; var xPos = xPos; var yPos = yPos; scorePopup = new UiBox("", 50, 50, UiBoxTypes.TextOnly, 18, 0xFFFFFF, score, null, null, null); scorePopup.x = xPos; scorePopup.y = yPos; scorePopup.update(score); game_mc.addChild(scorePopup); playSound(ScoreSFX, "createScorePopup"); TweenLite.to(scorePopup, 1, {alpha:0, x:xPos, y:(yPos - 50), onComplete:function ():void{ levelScore = (levelScore + score); if (levelScore < 0){ levelScore = 0; }; gameScoreText.update(levelScore); game_mc.removeChild(scorePopup); }, ease:Linear.easeInOut}); } protected function showUpgrade(evnt:Object):void{ var evnt = evnt; if (upgradeShown == true){ return; }; upgradeShown = true; upgrade_mc = new Upgrade(); addChild(upgrade_mc); upgrade_mc.x = gameVars.stageMiddleX; upgrade_mc.y = (gameVars.stageMiddleY - 50); upgrade_mc.addFrameScript(9, function ():void{ upgrade_mc.stop(); upgrade_mc.tableCost_txt.text = gameVars.cost["table"]; upgrade_mc.curtainCost_txt.text = gameVars.cost["window"]; upgrade_mc.carpetCost_txt.text = gameVars.cost["carpet"]; upgrade_mc.bedCost_txt.text = gameVars.cost["bed"]; upgrade_mc.acCost_txt.text = gameVars.cost["ac"]; upgrade_mc.total_txt.text = String(gameVars.score); upgrade_mc.tableUnlock_txt.text = (("Finish Level " + Number((gameVars.upgrades.indexOf("table") + 1))) + " to unlock"); upgrade_mc.windowUnlock_txt.text = (("Finish Level " + Number((gameVars.upgrades.indexOf("window") + 1))) + " to unlock"); upgrade_mc.bedUnlock_txt.text = (("Finish Level " + Number((gameVars.upgrades.indexOf("bed") + 1))) + " to unlock"); upgrade_mc.acUnlock_txt.text = (("Finish Level " + Number((gameVars.upgrades.indexOf("ac") + 1))) + " to unlock"); upgrade_mc.carpetUnlock_txt.text = (("Finish Level " + Number((gameVars.upgrades.indexOf("carpet") + 1))) + " to unlock"); upgrade_mc.tableUnlock_txt.visible = true; upgrade_mc.windowUnlock_txt.visible = true; upgrade_mc.bedUnlock_txt.visible = true; upgrade_mc.acUnlock_txt.visible = true; upgrade_mc.carpetUnlock_txt.visible = true; upgrade_mc.tableUnlock_txt.mouseEnabled = false; upgrade_mc.windowUnlock_txt.mouseEnabled = false; upgrade_mc.bedUnlock_txt.mouseEnabled = false; upgrade_mc.acUnlock_txt.mouseEnabled = false; upgrade_mc.carpetUnlock_txt.mouseEnabled = false; if (gameVars.tableUpdateState == "new"){ upgrade_mc.tableUnlock_txt.visible = false; }; if (gameVars.windowUpdateState == "new"){ upgrade_mc.windowUnlock_txt.visible = false; }; if (gameVars.bedUpdateState == "new"){ upgrade_mc.bedUnlock_txt.visible = false; }; if (gameVars.acUpdateState == "new"){ upgrade_mc.acUnlock_txt.visible = false; }; if (gameVars.carpetUpdateState == "new"){ upgrade_mc.carpetUnlock_txt.visible = false; }; var i:uint; while (i < gameVars.level) { if ((((gameVars.upgrades[i] == "window")) && ((gameVars.windowUpdateState == "old")))){ upgrade_mc.curtain_btn.alpha = 1; upgrade_mc.curtain_btn.buttonMode = true; upgrade_mc.windowUnlock_txt.visible = false; upgrade_mc.curtain_btn.addEventListener(MouseEvent.CLICK, upgradeItem, false, 0, true); upgrade_mc.curtain_btn.addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); upgrade_mc.curtain_btn.addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); }; if ((((gameVars.upgrades[i] == "carpet")) && ((gameVars.carpetUpdateState == "old")))){ upgrade_mc.carpet_btn.alpha = 1; upgrade_mc.carpet_btn.buttonMode = true; upgrade_mc.carpetUnlock_txt.visible = false; upgrade_mc.carpet_btn.addEventListener(MouseEvent.CLICK, upgradeItem, false, 0, true); upgrade_mc.carpet_btn.addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); upgrade_mc.carpet_btn.addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); }; if ((((gameVars.upgrades[i] == "bed")) && ((gameVars.bedUpdateState == "old")))){ upgrade_mc.bed_btn.alpha = 1; upgrade_mc.bed_btn.buttonMode = true; upgrade_mc.bedUnlock_txt.visible = false; upgrade_mc.bed_btn.addEventListener(MouseEvent.CLICK, upgradeItem, false, 0, true); upgrade_mc.bed_btn.addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); upgrade_mc.bed_btn.addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); }; if ((((gameVars.upgrades[i] == "ac")) && ((gameVars.acUpdateState == "old")))){ upgrade_mc.ac_btn.alpha = 1; upgrade_mc.ac_btn.buttonMode = true; upgrade_mc.acUnlock_txt.visible = false; upgrade_mc.ac_btn.addEventListener(MouseEvent.CLICK, upgradeItem, false, 0, true); upgrade_mc.ac_btn.addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); upgrade_mc.ac_btn.addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); }; if ((((gameVars.upgrades[i] == "table")) && ((gameVars.tableUpdateState == "old")))){ upgrade_mc.table_btn.alpha = 1; upgrade_mc.table_btn.buttonMode = true; upgrade_mc.tableUnlock_txt.visible = false; upgrade_mc.table_btn.addEventListener(MouseEvent.CLICK, upgradeItem, false, 0, true); upgrade_mc.table_btn.addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); upgrade_mc.table_btn.addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); }; i++; }; upgrade_mc.back_btn.addEventListener(MouseEvent.CLICK, hideUpgrade); }); upgrade_mc.curtain_btn.alpha = 0.7; upgrade_mc.table_btn.alpha = 0.7; upgrade_mc.ac_btn.alpha = 0.7; upgrade_mc.carpet_btn.alpha = 0.7; upgrade_mc.bed_btn.alpha = 0.7; upgrade_mc.curtain_btn.buttonMode = false; upgrade_mc.table_btn.buttonMode = false; upgrade_mc.ac_btn.buttonMode = false; upgrade_mc.carpet_btn.buttonMode = false; upgrade_mc.bed_btn.buttonMode = false; if (gameVars.windowUpdateState == "new"){ upgrade_mc.curtain_btn.gotoAndStop("bought"); } else { upgrade_mc.curtain_btn.gotoAndStop("new"); }; if (gameVars.bedUpdateState == "new"){ upgrade_mc.bed_btn.gotoAndStop("bought"); } else { upgrade_mc.bed_btn.gotoAndStop("new"); }; if (gameVars.tableUpdateState == "new"){ upgrade_mc.table_btn.gotoAndStop("bought"); } else { upgrade_mc.table_btn.gotoAndStop("new"); }; if (gameVars.acUpdateState == "new"){ upgrade_mc.ac_btn.gotoAndStop("bought"); } else { upgrade_mc.ac_btn.gotoAndStop("new"); }; if (gameVars.carpetUpdateState == "new"){ upgrade_mc.carpet_btn.gotoAndStop("bought"); } else { upgrade_mc.carpet_btn.gotoAndStop("new"); }; } private function spawnChild():void{ if (gameReady == false){ return; }; childNum++; childOnScreen++; doorBusy = true; game_mc.main_mc.door_mc.gotoAndPlay("open"); playSound(DoorOpenSFX, "spawnChild"); game_mc.main_mc.door_mc.addFrameScript(6, function ():void{ game_mc.main_mc.door_mc.stop(); var kidCradle:MovieClip = new Cradle(); game_mc.main_mc.addChild(kidCradle); Utils.setDepthOf(kidCradle, "below", player.clip); kidCradle.buttonMode = true; kidCradle.addEventListener(MouseEvent.CLICK, cradleClicked, false, 0, true); kidCradle.stop(); kidCradle.name = "kidCradle_mc"; kidCradle.x = 70; kidCradle.y = 170; kidCradle.scaleX = (kidCradle.scaleY = 0.9); var baby:Baby = new Baby((1 + RandomHelper.randomIntTill(5))); baby.playSound = playSound; kidCradle.addChild(baby.clip); baby.clip.name = "kid"; baby.onJobComplete = makeCradleForChild; baby.addEventListener("jobFailure", jobFailed, false, 0, true); kidsArray.push(baby); TweenLite.to(kidCradle, 0.8, {scaleX:1, scaleY:1, x:70, y:220, onComplete:childWaiting}); }); } override protected function menuDisplay(evnt:MouseEvent):void{ playSound(ClickSFX, "menuDisplay"); super.menuDisplay(evnt); } private function placeChild(cradle:MovieClip):void{ var cradle = cradle; game_mc.main_mc.door_mc.gotoAndPlay("open"); playSound(DoorOpenSFX, "placeChild"); game_mc.main_mc.door_mc.addFrameScript(6, function ():void{ game_mc.main_mc.door_mc.stop(); player.onBendFinishState = "stand"; player.onNextBend = function ():void{ var baby:Baby; var d:uint; if (checkSameInstance() == false){ player.onNextBend = null; return; }; baby = player.child; player.child = null; baby.changeLocationState("inCradle"); cradle.addChild(baby.clip); TweenLite.to(cradle, 0.3, {delay:0.5, ease:Linear.easeIn, scaleX:0.8, scaleY:0.8, x:70, y:170, onComplete:function ():void{ cradle.removeChild(cradle.getChildByName("kid")); kidsArray.splice(kidsArray.indexOf(baby), 1); baby.removeEventListener("jobFailure", jobFailed); baby.dispose(); baby = null; game_mc.main_mc.removeChild(cradle); cradle = null; game_mc.main_mc.door_mc.gotoAndPlay("close"); playSound(DoorCloseSFX, "placeChild--"); lastSpawnTime = getTimer(); doorBusy = false; childSent++; childOnScreen--; if ((((childOnScreen == 0)) && ((timeOver == true)))){ if (levelScore >= gameVars.levelUpTarget[(gameVars.level - 1)]){ Debug.log("LEVEL COMPLETE!!"); if (gameVars.level >= gameVars.levelMax){ gameReset(); gameSequence.changeState("GameWin"); } else { playSound(LevelUpSFX, "placeChild---"); gameEngine.changeState("LevelUp"); }; } else { Debug.log("GAME OVER!!"); gameSequence.changeState("GameOver"); }; }; }}); d = setTimeout(function ():void{ clearTimeout(d); commandBusy = false; }, 200); player.onNextBend = null; }; var dir:String = ((player.x)<cradle.x) ? "Right" : "Left"; player.state.changeState(("placeChild" + dir)); }); } private function bedClicked(target:Object):void{ showClickedEffect(target.clip); Debug.log("bedClicked", 0); playSound(ClickSFX2, "bedClicked"); dressTable.enableClick(tableClicked); washTable.enableClick(tableClicked); foodTable.enableClick(tableClicked); medicineTable.enableClick(tableClicked); if (game_mc.main_mc.getChildByName("kidCradle_mc") != null){ game_mc.main_mc.getChildByName("kidCradle_mc").addEventListener(MouseEvent.CLICK, cradleClicked, false, 0, true); }; switch (target){ case bed1: gameVars.commands.push("goto|n6", "action|bed1"); displayAddedCommand("goto|n6,action|bed1"); break; case bed2: gameVars.commands.push("goto|n8", "action|bed2"); displayAddedCommand("goto|n8,action|bed2"); break; case bed3: gameVars.commands.push("goto|n9", "action|bed3"); displayAddedCommand("goto|n9,action|bed3"); break; case bed4: gameVars.commands.push("goto|n12", "action|bed4"); displayAddedCommand("goto|n12,action|bed4"); break; }; } private function jobFailed(e:Event):void{ } private function tableClicked(target:Object):void{ showClickedEffect(target.clip); bed1.enableClick(bedClicked); bed2.enableClick(bedClicked); bed3.enableClick(bedClicked); bed4.enableClick(bedClicked); playSound(ClickSFX2, "tableClicked"); switch (target){ case washTable: gameVars.commands.push("goto|n5", "action|washTable"); displayAddedCommand("goto|n5,action|washTable"); break; case dressTable: gameVars.commands.push("goto|n4", "action|dressTable"); displayAddedCommand("goto|n4,action|dressTable"); break; case foodTable: gameVars.commands.push("goto|n14", "action|foodTable"); displayAddedCommand("goto|n14,action|foodTable"); break; case medicineTable: gameVars.commands.push("goto|n13", "action|medicineTable"); displayAddedCommand("goto|n13,action|medicineTable"); break; }; } protected function hideUpgrade(evnt:Object):void{ var evnt = evnt; upgrade_mc.back_btn.removeEventListener(MouseEvent.CLICK, hideUpgrade); upgrade_mc.tableCost_txt.text = ""; upgrade_mc.curtainCost_txt.text = ""; upgrade_mc.carpetCost_txt.text = ""; upgrade_mc.bedCost_txt.text = ""; upgrade_mc.acCost_txt.text = ""; upgrade_mc.total_txt.text = ""; upgrade_mc.tableUnlock_txt.text = ""; upgrade_mc.windowUnlock_txt.text = ""; upgrade_mc.bedUnlock_txt.text = ""; upgrade_mc.acUnlock_txt.text = ""; upgrade_mc.carpetUnlock_txt.text = ""; upgrade_mc.curtain_btn.removeEventListener(MouseEvent.CLICK, upgradeItem); upgrade_mc.table_btn.removeEventListener(MouseEvent.CLICK, upgradeItem); upgrade_mc.carpet_btn.removeEventListener(MouseEvent.CLICK, upgradeItem); upgrade_mc.bed_btn.removeEventListener(MouseEvent.CLICK, upgradeItem); upgrade_mc.ac_btn.removeEventListener(MouseEvent.CLICK, upgradeItem); upgrade_mc.curtain_btn.removeEventListener(MouseEvent.ROLL_OVER, onOver); upgrade_mc.table_btn.removeEventListener(MouseEvent.ROLL_OVER, onOver); upgrade_mc.carpet_btn.removeEventListener(MouseEvent.ROLL_OVER, onOver); upgrade_mc.bed_btn.removeEventListener(MouseEvent.ROLL_OVER, onOver); upgrade_mc.ac_btn.removeEventListener(MouseEvent.ROLL_OVER, onOver); upgrade_mc.curtain_btn.removeEventListener(MouseEvent.ROLL_OUT, onOut); upgrade_mc.table_btn.removeEventListener(MouseEvent.ROLL_OUT, onOut); upgrade_mc.carpet_btn.removeEventListener(MouseEvent.ROLL_OUT, onOut); upgrade_mc.bed_btn.removeEventListener(MouseEvent.ROLL_OUT, onOut); upgrade_mc.ac_btn.removeEventListener(MouseEvent.ROLL_OUT, onOut); upgrade_mc.curtain_btn.alpha = 0; upgrade_mc.table_btn.alpha = 0; upgrade_mc.ac_btn.alpha = 0; upgrade_mc.carpet_btn.alpha = 0; upgrade_mc.bed_btn.alpha = 0; upgrade_mc.play(); upgrade_mc.addFrameScript((upgrade_mc.totalFrames - 1), function ():void{ upgrade_mc.stop(); removeChild(upgrade_mc); upgrade_mc = null; upgradeShown = false; }); } private function continueClicked(e:MouseEvent):void{ unpauseGame(); } protected function timesUp():void{ timeOver = true; } override protected function unpauseGame(evnt:Object=null):void{ var kid:Baby; var evnt = evnt; if (pausedClip != null){ pausedClip.continue_btn.removeEventListener(MouseEvent.CLICK, continueClicked); game_mc.removeChild(pausedClip); //unresolved jump var _slot1 = e; pausedClip = null; }; player.clip.play(); gameCounter.unPause(); Tick.reset(); super.unpauseGame(evnt); for each (kid in kidsArray) { kid.resumeTimer(); }; gameReady = true; lastSpawnTime = (getTimer() + spawnPauseDelay); } override protected function gameStart(evntp:MouseEvent):void{ playSound(ClickSFX, "gameStart"); super.gameStart(evntp); } private function childWaiting():void{ game_mc.main_mc.door_mc.gotoAndPlay("close"); playSound(DoorCloseSFX, "childWaiting"); game_mc.main_mc.door_mc.addFrameScript((game_mc.main_mc.door_mc.totalFrames - 1), function ():void{ game_mc.main_mc.door_mc.gotoAndStop("closed"); }); } private function gameReset():void{ gameVars.windowUpdateState = "old"; gameVars.carpetUpdateState = "old"; gameVars.tableUpdateState = "old"; gameVars.acUpdateState = "old"; gameVars.bedUpdateState = "old"; } override protected function gameWinAdded(evnt:Event):void{ var scoreText:UiBox; var submitScoreButton:UiButton; if (evnt.target.currentFrame == evnt.target.totalFrames){ evnt.target.stop(); evnt.target.removeEventListener(Event.ENTER_FRAME, gameWinAdded); scoreText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 25, 14222938, gameVars.score); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); scoreText.y = 18; scoreText.x = 130; if (gameVars.mochiEnabled){ submitScoreButton = SceneManager.addButton(evnt.currentTarget, "Submit Score", submitScore); submitScoreButton.x = ((gameVars.stageMiddleX - (submitScoreButton.width / 2)) - 8); submitScoreButton.y = (2 * gameVars.stageMiddleY); TweenLite.to(submitScoreButton, 1, {y:500, ease:Elastic.easeOut}); }; gameWin_mc.frame_mc.continue_btn.addEventListener(MouseEvent.CLICK, gameWin2Game); }; } override protected function backBtnFn(evnt:MouseEvent):void{ playSound(ClickSFX, "backBtnFn"); super.backBtnFn(evnt); } private function doAction(actionTarget:String):void{ switch (actionTarget){ case "bed1": takeOrPlaceChild(bed1); break; case "bed2": takeOrPlaceChild(bed2); break; case "bed3": takeOrPlaceChild(bed3); break; case "bed4": takeOrPlaceChild(bed4); break; case "washTable": workChildinTable(washTable); break; case "dressTable": workChildinTable(dressTable); break; case "foodTable": workChildinTable(foodTable); break; case "medicineTable": workChildinTable(medicineTable); break; }; } override protected function assignHighScores(evnt:Event):void{ var evnt = evnt; evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignHighScores); evnt.currentTarget.stop(); MochiScores.showLeaderboard({boardID:"1e113c7239048b3f", res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), clip:evnt.currentTarget, onClose:function ():void{ templateMc.gotoAndPlay(2); }}); templateMc.addEventListener(Event.ENTER_FRAME, checkTemplate); } private function actionCompleted(e:Event):void{ commandBusy = false; if (player.hasEventListener("walkCompleted")){ player.removeEventListener("walkCompleted", actionCompleted); }; } override protected function levelInit(evnt:Object):void{ levelInstanceId = new Date().time; if (gameVars.mochiEnabled){ MochiSocial.hideLoginWidget(); }; levelScore = 0; gameScoreText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 15, 0xFFFFFF, levelScore, BgClip); gameScoreText.runningUpdate = true; gameScoreText.name = "Score"; game_mc.addChild(gameScoreText); bonusTime = 0; if (gameVars.windowUpdateState == "new"){ bonusTime = (bonusTime + gameVars.timeIncrement["window"]); }; if (gameVars.carpetUpdateState == "new"){ bonusTime = (bonusTime + gameVars.timeIncrement["carpet"]); }; if (gameVars.tableUpdateState == "new"){ bonusTime = (bonusTime + gameVars.timeIncrement["table"]); }; if (gameVars.acUpdateState == "new"){ bonusTime = (bonusTime + gameVars.timeIncrement["ac"]); }; if (gameVars.bedUpdateState == "new"){ bonusTime = (bonusTime + gameVars.timeIncrement["bed"]); }; setVariable("timer", String((gameVars.levelTimer[(gameVars.level - 1)] + bonusTime)), "levelInit", "N"); gameCounter = new Counter(gameVars.timer, 0, "down", timesUp); gameCounter.start(); gameTimerText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 15, 0xFFFFFF, gameVars.timer, BgClip); gameTimerText.name = "Timer"; game_mc.addChild(gameTimerText); gameLevelText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 15, 0xFFFFFF, gameVars.level, BgClip); gameTimerText.name = "Level"; game_mc.addChild(gameLevelText); gameScoreText.y = (gameTimerText.y = (gameLevelText.y = 567)); gameScoreText.x = 170; gameTimerText.x = 350; gameLevelText.x = 520; oldScore = gameVars.score; initArea(); super.levelInit(evnt); gameCounter.pause(); Debug.log(("Current Main Score===" + gameVars.score)); } private function workChildinTable(table:WorkingTable):void{ var table = table; if (player.child != null){ player.child.changeLocationState("inTable"); table.child = player.child; player.child = null; table.afterWork = function ():void{ player.state.changeState("standChild"); table.afterWork = null; table.child.changeLocationState("inHand"); player.child = table.child; var currScore:int; currScore = gameVars.curtainScore[gameVars.windowUpdateState]; currScore = (currScore + gameVars.tableScore[gameVars.tableUpdateState]); currScore = (currScore + gameVars.acScore[gameVars.acUpdateState]); currScore = (currScore + gameVars.matScore[gameVars.carpetUpdateState]); currScore = (currScore + gameVars.bedScore[gameVars.bedUpdateState]); var perc:Number = 0; if (player.child.stopWatch == null){ perc = 40; } else { perc = player.child.stopWatch.currentTime; }; currScore = Utils.minMaxPerc(40, 0, perc, 10, currScore); if (player.child.need == table.tableType){ player.child.need = null; createScorePopup(currScore, (table.x - 30), (table.y - 80)); player.child.resetStopWatch(); } else { createScorePopup(int((-(currScore) / 2)), (table.x - 30), (table.y - 80)); }; table.child = null; commandBusy = false; table.enableClick(tableClicked); }; table.work(); player.state.changeState("work"); } else { commandBusy = false; table.enableClick(tableClicked); }; } private function takeOrPlaceChild(bed:Bed):void{ var bed = bed; var dir:String = ((player.x)<bed.x) ? "Right" : "Left"; if (bed.state.state == "noChild"){ if (player.child == null){ gameVars.commands = []; commandBusy = false; bed1.enableClick(bedClicked); bed2.enableClick(bedClicked); bed3.enableClick(bedClicked); bed4.enableClick(bedClicked); if (game_mc.main_mc.getChildByName("kidCradle_mc") != null){ if (!game_mc.main_mc.getChildByName("kidCradle_mc").hasEventListener(MouseEvent.CLICK)){ game_mc.main_mc.getChildByName("kidCradle_mc").addEventListener(MouseEvent.CLICK, cradleClicked); }; }; return; } else { if (player.child != null){ player.onBendFinishState = "stand"; player.onNextBend = function ():void{ var d:uint; if (player == null){ return; }; if (player.levelInstanceId != levelInstanceId){ player.onNextBend = null; return; }; player.onNextBend = null; player.child.changeLocationState("inBed"); bed.child = player.child; bed.state.changeState("child"); player.child = null; playSound(TakeSFX, "takeOrPlaceChild"); d = setTimeout(function ():void{ clearTimeout(d); commandBusy = false; bed.enableClick(bedClicked); }, 200); }; player.state.changeState(("placeChild" + dir)); return; }; }; } else { if (bed.state.state == "child"){ if (player.child == null){ player.onBendFinishState = "standChild"; player.onNextBend = function ():void{ var d2:uint; if (player == null){ return; }; if (player.levelInstanceId != levelInstanceId){ player.onNextBend = null; return; }; player.onNextBend = null; bed.child.changeLocationState("inHand"); player.child = bed.child; bed.child = null; bed.state.changeState("noChild"); playSound(TakeSFX, "takeOrPlaceChild"); d2 = setTimeout(function ():void{ clearTimeout(d2); commandBusy = false; bed.enableClick(bedClicked); }, 200); }; player.state.changeState(("takeChild" + dir)); return; }; if (player.child != null){ gameVars.commands = []; commandBusy = false; bed1.enableClick(bedClicked); bed2.enableClick(bedClicked); bed3.enableClick(bedClicked); bed4.enableClick(bedClicked); return; }; }; }; } override protected function gameOverAdded(evnt:Event):void{ var levelText:UiBox; var scoreText:UiBox; var submitScoreButton:UiButton; if (evnt.target.currentFrame == evnt.target.totalFrames){ evnt.target.stop(); levelText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 25, 14222938, gameVars.level); levelText.name = "Level"; evnt.currentTarget.addChild(levelText); scoreText = new UiBox("", 150, 40, UiBoxTypes.TextOnly, 25, 14222938, gameVars.score); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); scoreText.y = 18; levelText.y = 57; levelText.x = (scoreText.x = 130); evnt.target.removeEventListener(Event.ENTER_FRAME, gameOverAdded); if (gameVars.mochiEnabled){ submitScoreButton = SceneManager.addButton(evnt.currentTarget, "Submit Score", submitScore); submitScoreButton.x = ((gameVars.stageMiddleX - (submitScoreButton.width / 2)) - 8); submitScoreButton.y = (2 * gameVars.stageMiddleY); TweenLite.to(submitScoreButton, 1, {y:500, ease:Elastic.easeOut}); }; gameOver_mc.frame_mc.continue_btn.addEventListener(MouseEvent.CLICK, gameOver2Game); }; } override protected function gamewinInit(evnt:Object):void{ gameVars.score = (gameVars.score + levelScore); super.gamewinInit(evnt); gameWin_mc.x = gameVars.stageMiddleX; gameWin_mc.y = gameVars.stageMiddleY; gameWin_mc.frame_mc.addFrameScript((gameWin_mc.frame_mc.totalFrames - 1), gameWin_mc.frame_mc.stop); } override protected function backToGame(evnt:MouseEvent):void{ playSound(ClickSFX, "backToGame"); super.backToGame(evnt); } private function initArea():void{ nodes = new XML(<nodes> <node id="n1" x="133" y="231" join="n2"/> <node id="n2" x="102" y="382" join="n1,n3"/> <node id="n3" x="321" y="382" join="n2,n4,n6"/> <node id="n4" x="311" y="550" join="n5,n3,n14"/> <node id="n5" x="134" y="550" join="n4"/> <node id="n6" x="340" y="272" join="n3,n7"/> <node id="n7" x="430" y="272" join="n6,n8,n10"/> <node id="n8" x="440" y="232" join="n7,n9"/> <node id="n9" x="515" y="232" join="n8,n11"/> <node id="n10" x="472" y="272" join="n7,n11,n14"/> <node id="n11" x="519" y="272" join="n9,n10,n12"/> <node id="n12" x="618" y="272" join="n11,n13"/> <node id="n13" x="676" y="550" join="n12,n14"/> <node id="n14" x="497" y="550" join="n4,n13,n10"/> </nodes> ); gameVars.commands = []; game_mc.main_mc.door_mc.gotoAndStop("closed"); game_mc.main_mc.window1_mc.gotoAndStop(gameVars.windowUpdateState); game_mc.main_mc.window2_mc.gotoAndStop(gameVars.windowUpdateState); game_mc.main_mc.carpet_mc.gotoAndStop(gameVars.carpetUpdateState); game_mc.main_mc.table1_mc.gotoAndStop(gameVars.tableUpdateState); game_mc.main_mc.table2_mc.gotoAndStop(gameVars.tableUpdateState); game_mc.main_mc.ac_mc.gotoAndStop(gameVars.acUpdateState); bed1 = new Bed(); bed2 = new Bed(); bed3 = new Bed(); bed4 = new Bed(); bed1.levelInstanceId = levelInstanceId; bed2.levelInstanceId = levelInstanceId; bed3.levelInstanceId = levelInstanceId; bed4.levelInstanceId = levelInstanceId; game_mc.main_mc.addChild(bed3.clip); game_mc.main_mc.addChild(bed2.clip); game_mc.main_mc.addChild(bed1.clip); game_mc.main_mc.addChild(bed4.clip); bed1.x = 200; bed1.y = 200; bed2.x = 312; bed2.y = 140; bed3.x = 543; bed3.y = 140; bed4.x = 649; bed4.y = 200; player = new Player("n3", nodes); player.levelInstanceId = levelInstanceId; game_mc.main_mc.addChild(player.clip); player.clip.mouseEnabled = false; washTable = new WorkingTable("wash"); dressTable = new WorkingTable("dress"); foodTable = new WorkingTable("food"); medicineTable = new WorkingTable("medicine"); washTable.levelInstanceId = levelInstanceId; dressTable.levelInstanceId = levelInstanceId; foodTable.levelInstanceId = levelInstanceId; medicineTable.levelInstanceId = levelInstanceId; game_mc.main_mc.addChild(washTable.clip); game_mc.main_mc.addChild(dressTable.clip); game_mc.main_mc.addChild(foodTable.clip); game_mc.main_mc.addChild(medicineTable.clip); washTable.x = 130; dressTable.x = 307; foodTable.x = 491; medicineTable.x = 671; washTable.y = (dressTable.y = (foodTable.y = (medicineTable.y = 540))); bed1.enableClick(bedClicked); bed2.enableClick(bedClicked); bed3.enableClick(bedClicked); bed4.enableClick(bedClicked); washTable.enableClick(tableClicked); dressTable.enableClick(tableClicked); foodTable.enableClick(tableClicked); medicineTable.enableClick(tableClicked); lastSpawnTime = getTimer(); Debug.log(("LSTinitarea==>" + lastSpawnTime), 0xCCCCCC); childNum = 0; childOnScreen = 0; childSent = 0; kidsArray = []; timeOver = false; extraChild = false; commandBusy = false; targetBox = new TargetMessage(); game_mc.addChild(targetBox); targetBox.x = gameVars.stageMiddleX; targetBox.y = gameVars.stageMiddleY; targetBox.scaleX = (targetBox.scaleY = 0.7); targetBox.children_txt.text = gameVars.levelUpTarget[(gameVars.level - 1)]; targetBox.time_txt.text = gameVars.levelTimer[(gameVars.level - 1)]; targetBox.bonus_txt.text = ((bonusTime)==0) ? "NO BONUS TIME" : ("BONUS TIME " + bonusTime); game_mc.mouseChildren = false; TweenLite.to(targetBox, 0.5, {delay:3, ease:Back.easeIn, scaleX:0, scaleY:0, onComplete:function ():void{ if (targetBox != null){ game_mc.removeChild(targetBox); targetBox = null; gameReady = true; spawnChild(); gameCounter.unPause(); game_mc.mouseChildren = true; }; }}); } private function takeChild(cradle:MovieClip):void{ var newKid:Baby; var cradle = cradle; newKid = kidsArray[(kidsArray.length - 1)]; player.onBendFinishState = "standChild"; player.onNextBend = function ():void{ var d:uint; if (player == null){ return; }; if (checkSameInstance() == false){ commandBusy = false; player.onNextBend = null; return; }; player.onNextBend = null; game_mc.main_mc.door_mc.gotoAndPlay("open"); playSound(DoorOpenSFX, "takeChild"); game_mc.main_mc.door_mc.addFrameScript(6, function ():void{ game_mc.main_mc.door_mc.stop(); TweenLite.to(cradle, 0.3, {ease:Linear.easeIn, scaleX:0.8, scaleY:0.8, x:70, y:170, onComplete:function ():void{ game_mc.main_mc.removeChild(cradle); cradle = null; game_mc.main_mc.door_mc.gotoAndPlay("close"); playSound(DoorCloseSFX, "takeChild--"); lastSpawnTime = getTimer(); doorBusy = false; }}); }); player.child = newKid; d = setTimeout(function ():void{ clearTimeout(d); commandBusy = false; }, 200); newKid.changeLocationState("inHand"); }; var dir:String = ((player.x)<cradle.x) ? "Right" : "Left"; player.state.changeState(("takeChild" + dir)); } override protected function assignMenu(event:Event):void{ if (event.currentTarget.currentFrame == event.currentTarget.totalFrames){ event.currentTarget.stop(); event.target.removeEventListener(Event.ENTER_FRAME, assignMenu); menu.frame_mc.play_btn.addEventListener(MouseEvent.CLICK, gameStart); menu.frame_mc.help_btn.addEventListener(MouseEvent.CLICK, gotoHelpPage); }; } private function showClickedEffect(target:MovieClip):void{ var filter:GlowFilter; var target = target; filter = new GlowFilter(16751001, 1, 6, 6, 5, 1); TweenLite.to(filter, 1, {alpha:0, onUpdate:function ():void{ target.filters = [filter]; }, onComplete:function ():void{ target.filters = []; }}); } override protected function helpInit(evnt:Object):void{ super.helpInit(evnt); help_mc.x = gameVars.stageMiddleX; help_mc.y = gameVars.stageMiddleY; help_mc.frame_mc.addFrameScript((help_mc.frame_mc.totalFrames - 1), help_mc.frame_mc.stop); } override protected function levelUpInit(evnt:Object):void{ gameVars.score = (gameVars.score + levelScore); super.levelUpInit(evnt); levelUp_mc.x = gameVars.stageMiddleX; levelUp_mc.y = gameVars.stageMiddleY; levelUp_mc.frame_mc.addFrameScript((levelUp_mc.frame_mc.totalFrames - 1), levelUp_mc.frame_mc.stop); } override protected function gamewinExit(evnt:Object):void{ gameWin_mc.frame_mc.continue_btn.removeEventListener(MouseEvent.CLICK, gameWin2Game); super.gamewinExit(evnt); } } }//package
Section 167
//BabyCare_BgClip (BabyCare_BgClip) package { import flash.display.*; import mx.core.*; public class BabyCare_BgClip extends SpriteAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 168
//BabyCare_ButtonDownClip (BabyCare_ButtonDownClip) package { import flash.display.*; import mx.core.*; public class BabyCare_ButtonDownClip extends SpriteAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 169
//BabyCare_ButtonOverClip (BabyCare_ButtonOverClip) package { import flash.display.*; import mx.core.*; public class BabyCare_ButtonOverClip extends SpriteAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 170
//BabyCare_ButtonUpClip (BabyCare_ButtonUpClip) package { import flash.display.*; import mx.core.*; public class BabyCare_ButtonUpClip extends SpriteAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 171
//BabyCare_ClickSFX (BabyCare_ClickSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_ClickSFX extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 172
//BabyCare_ClickSFX2 (BabyCare_ClickSFX2) package { import flash.display.*; import mx.core.*; public class BabyCare_ClickSFX2 extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 173
//BabyCare_Cradle (BabyCare_Cradle) package { import flash.display.*; import mx.core.*; public class BabyCare_Cradle extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 174
//BabyCare_DoorCloseSFX (BabyCare_DoorCloseSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_DoorCloseSFX extends SoundAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 175
//BabyCare_DoorOpenSFX (BabyCare_DoorOpenSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_DoorOpenSFX extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 176
//BabyCare_LevelUpSFX (BabyCare_LevelUpSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_LevelUpSFX extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 177
//BabyCare_PauseMessage (BabyCare_PauseMessage) package { import flash.display.*; import mx.core.*; public class BabyCare_PauseMessage extends MovieClipAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 178
//BabyCare_ScoreSFX (BabyCare_ScoreSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_ScoreSFX extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 179
//BabyCare_TakeSFX (BabyCare_TakeSFX) package { import flash.display.*; import mx.core.*; public class BabyCare_TakeSFX extends SoundAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 180
//BabyCare_TargetMessage (BabyCare_TargetMessage) package { import flash.display.*; import mx.core.*; public class BabyCare_TargetMessage extends MovieClipAsset { public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n5:DisplayObject; public var n7:DisplayObject; public var n9:DisplayObject; public var n4:DisplayObject; public var n6:DisplayObject; public var n8:DisplayObject; public var back_btn:DisplayObject; public var n11:DisplayObject; public var table2_mc:DisplayObject; public var carpet_mc:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n13:DisplayObject; public var logo_mc:DisplayObject; public var games2girls_button:DisplayObject; public var frame_mc:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var upgrade_btn:DisplayObject; public var window2_mc:DisplayObject; public var help_Btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var n14:DisplayObject; public var bonus_txt:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var help_btn:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 181
//BabyCare_Upgrade (BabyCare_Upgrade) package { import flash.display.*; import mx.core.*; public class BabyCare_Upgrade extends MovieClipAsset { public var back_btn:DisplayObject; public var windowUnlock_txt:DisplayObject; public var n10:DisplayObject; public var n12:DisplayObject; public var n11:DisplayObject; public var n14:DisplayObject; public var n13:DisplayObject; public var carpetUnlock_txt:DisplayObject; public var buy_btn:DisplayObject; public var games2girls_button:DisplayObject; public var curtain_btn:DisplayObject; public var children_txt:DisplayObject; public var table1_mc:DisplayObject; public var help_Btn:DisplayObject; public var acCost_txt:DisplayObject; public var bedUnlock_txt:DisplayObject; public var bonus_txt:DisplayObject; public var window1_mc:DisplayObject; public var menu_Btn:DisplayObject; public var tableUnlock_txt:DisplayObject; public var help_btn:DisplayObject; public var table_btn:DisplayObject; public var n1:DisplayObject; public var n2:DisplayObject; public var n3:DisplayObject; public var n4:DisplayObject; public var n5:DisplayObject; public var n6:DisplayObject; public var n7:DisplayObject; public var carpet_mc:DisplayObject; public var n9:DisplayObject; public var n8:DisplayObject; public var table2_mc:DisplayObject; public var bed_btn:DisplayObject; public var bedCost_txt:DisplayObject; public var frame_mc:DisplayObject; public var logo_mc:DisplayObject; public var curtainCost_txt:DisplayObject; public var window2_mc:DisplayObject; public var acUnlock_txt:DisplayObject; public var upgrade_btn:DisplayObject; public var ac_btn:DisplayObject; public var continue_btn:DisplayObject; public var door_mc:DisplayObject; public var play_btn:DisplayObject; public var ac_mc:DisplayObject; public var main_mc:DisplayObject; public var sound_Mc:DisplayObject; public var carpet_btn:DisplayObject; public var carpetCost_txt:DisplayObject; public var tableCost_txt:DisplayObject; public var total_txt:DisplayObject; public var time_txt:DisplayObject; } }//package
Section 182
//Config (Config) package { import com.inruntime.utils.*; import flash.utils.*; public class Config { public function Config(){ super(); } public static function initialise():void{ var gameVars:Global = Global.getInstance(); gameVars.developerMode = false; gameVars.mochiEnabled = false; gameVars.showInterLevelAds = 2; gameVars.gameName = "BabyCare"; gameVars.stageMiddleX = 400; gameVars.stageMiddleY = 300; gameVars.soundReady = true; gameVars.life = 5; gameVars.lifeMax = 5; gameVars.score = 0; gameVars.level = 1; gameVars.levelMax = 10; gameVars.timer = 0; gameVars.timerMax = 90; gameVars.Paused = false; gameVars.startTime = getTimer(); gameVars.commands = []; gameVars.upgrades = ["", "", "table", "", "carpet", "window", "", "bed", "ac", ""]; gameVars.cost = {table:400, carpet:500, window:600, bed:1200, ac:1500}; gameVars.timeIncrement = {table:10, carpet:20, window:30, bed:50, ac:50}; gameVars.windowUpdateState = "old"; gameVars.carpetUpdateState = "old"; gameVars.tableUpdateState = "old"; gameVars.acUpdateState = "old"; gameVars.bedUpdateState = "old"; gameVars.workTime = {wash:4000, dress:4000, food:4000, medicine:2000}; gameVars.needs = ["wash", "dress", "medicine", "food"]; gameVars.levelTimer = [50, 70, 80, 80, 120, 120, 140, 150, 160, 170]; gameVars.minSpawnInterval = [7000, 7000, 7000, 7000, 5000, 5000, 5000, 5000, 5000, 5000]; gameVars.maxChildren = [99, 99, 99, 99, 99, 99, 99, 99, 99, 99]; gameVars.levelUpTarget = [120, 150, 200, 320, 400, 500, 800, 900, 1000, 1200]; gameVars.maxChildrenAtOnce = 4; gameVars.childRequirementsMin = [1, 1, 1, 2, 2, 2, 3, 3, 4, 4]; gameVars.childRequirementsMax = [2, 2, 3, 3, 4, 4, 4, 4, 4, 4]; gameVars.childCryIntervals = [7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000]; gameVars.curtainScore = {old:15, new:20}; gameVars.acScore = {old:15, new:20}; gameVars.matScore = {old:15, new:20}; gameVars.bedScore = {old:15, new:20}; gameVars.tableScore = {old:15, new:20}; gameVars.showShareButton = true; gameVars.brandUsed = "G2G"; gameVars.siteUrl = "http://www.games2girls.com"; gameVars.showCredits = "Developed by Csharks"; gameVars.buttonFontSize = 20; gameVars.buttonFontNormalColor = 0xFFFFFF; gameVars.buttonFontOverColor = 0xFFFF00; gameVars.buttonFontDownColor = 0; } } }//package
Section 183
//en_US$core_properties (en_US$core_properties) package { import mx.resources.*; public class en_US$core_properties extends ResourceBundle { public function en_US$core_properties(){ super("en_US", "core"); } override protected function getContent():Object{ var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."}; return (_local1); } } }//package
Section 184
//en_US$skins_properties (en_US$skins_properties) package { import mx.resources.*; public class en_US$skins_properties extends ResourceBundle { public function en_US$skins_properties(){ super("en_US", "skins"); } override protected function getContent():Object{ var _local1:Object = {notLoaded:"Unable to load '{0}'."}; return (_local1); } } }//package
Section 185
//en_US$styles_properties (en_US$styles_properties) package { import mx.resources.*; public class en_US$styles_properties extends ResourceBundle { public function en_US$styles_properties(){ super("en_US", "styles"); } override protected function getContent():Object{ var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."}; return (_local1); } } }//package
Section 186
//IntroCgs_mc (IntroCgs_mc) package { import flash.display.*; public dynamic class IntroCgs_mc extends MovieClip { } }//package
Section 187
//IntroOIG_mc (IntroOIG_mc) package { import flash.display.*; public dynamic class IntroOIG_mc extends MovieClip { } }//package
Section 188
//LogoCsharks (LogoCsharks) package { import flash.display.*; public dynamic class LogoCsharks extends Sprite { } }//package
Section 189
//LogoOIG (LogoOIG) package { import flash.display.*; public dynamic class LogoOIG extends Sprite { } }//package
Section 190
//ShareThis (ShareThis) package { import flash.display.*; public dynamic class ShareThis extends SimpleButton { } }//package
Section 191
//Utils (Utils) package { import flash.display.*; public class Utils { public function Utils(){ super(); } public static function shuffleArray(array:Array):Array{ return (randomFromArray(array, true, array.length, array.length)); } public static function distBetween(objA, objB):Number{ var dx:Number = (objA.x - objB.x); var dy:Number = (objA.y - objB.y); return (Math.sqrt(((dx * dx) + (dy * dy)))); } public static function toDegrees(angleInRadians:Number):Number{ return (((((angleInRadians * 180) / Math.PI) + 360) % 360)); } public static function randomFromArray(sourceArray:Array, unique:Boolean, min:Number=-1, max:Number=-1):Array{ min = ((min)==-1) ? 1 : min; if ((((unique == true)) || ((max == -1)))){ if (max > sourceArray.length){ max = sourceArray.length; }; }; if (min > max){ return (null); }; var returnArray:Array = new Array(); var rN:Number = (min + int((Math.random() * (max - min)))); while (returnArray.length < rN) { if (unique == true){ returnArray.push(randomExclude(sourceArray, returnArray)); } else { returnArray.push(randomExclude(sourceArray, [])); }; }; return (returnArray); } public static function almostEqual(num1:Number, num2:Number, range:Number):Boolean{ return ((Math.abs((num1 - num2)) < range)); } public static function randomExclude(sourceArray:Array, exclusionArray:Array){ var randomIndex:uint; var randomItem:*; var item:*; var excludedArray:Array = new Array(); for each (item in sourceArray) { if (exclusionArray.indexOf(item) == -1){ excludedArray.push(item); }; }; randomIndex = Math.floor((Math.random() * excludedArray.length)); randomItem = excludedArray[randomIndex]; return (randomItem); } public static function minMaxPerc(fromMin:Number, fromMax:Number, fromVal:Number, toMin:Number, toMax:Number):Number{ var perc:Number; var temp:Number; var reverse:Boolean; var tmpFMin:Number = fromMin; var tmpFMax:Number = fromMax; if (tmpFMin > tmpFMax){ reverse = true; temp = tmpFMax; tmpFMax = tmpFMin; tmpFMin = temp; }; tmpFMax = (tmpFMax - tmpFMin); fromVal = (fromVal - tmpFMin); tmpFMin = 0; perc = (fromVal / tmpFMax); if (reverse){ perc = (1 - perc); }; perc = Number(perc.toFixed(2)); reverse = false; tmpFMin = toMin; tmpFMax = toMax; if (tmpFMin > tmpFMax){ reverse = true; temp = tmpFMax; tmpFMax = tmpFMin; tmpFMin = temp; }; tmpFMax = (tmpFMax - tmpFMin); if (reverse){ perc = (1 - perc); }; perc = (perc * tmpFMax); perc = (perc + tmpFMin); return (perc); } public static function zeroPad(number:int, width:int):String{ var ret:String = ("" + number); while (ret.length < width) { ret = ("0" + ret); }; return (ret); } public static function toRadian(angleInDegrees:Number):Number{ return (((angleInDegrees * Math.PI) / 180)); } public static function isBetween(value:Number, lowerRange:Number, upperRange:Number):Boolean{ if (lowerRange > upperRange){ if ((((value >= lowerRange)) || ((value <= upperRange)))){ return (true); }; }; if ((((value >= lowerRange)) && ((value <= upperRange)))){ return (true); }; return (false); } public static function setDepthOf(object1, position:String, object2):void{ var parentObj:DisplayObjectContainer = object1.parent; if (position == "below"){ if (parentObj.getChildIndex(object1) > parentObj.getChildIndex(object2)){ parentObj.setChildIndex(object1, parentObj.getChildIndex(object2)); }; } else { if (parentObj.getChildIndex(object1) < parentObj.getChildIndex(object2)){ parentObj.swapChildren(object1, object2); }; }; } } }//package

Library Items

Symbol 1 GraphicUsed by:10 23
Symbol 2 FontUsed by:3
Symbol 3 EditableTextUses:2Used by:7
Symbol 4 GraphicUsed by:7
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:7
Symbol 7 MovieClipUses:3 4 6Used by:23
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClipUses:8Used by:23
Symbol 10 ButtonUses:1Used by:23
Symbol 11 GraphicUsed by:23
Symbol 12 GraphicUsed by:23
Symbol 13 GraphicUsed by:23
Symbol 14 GraphicUsed by:23
Symbol 15 GraphicUsed by:23
Symbol 16 GraphicUsed by:18
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClipUses:16 17Used by:23
Symbol 19 GraphicUsed by:23
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:23
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip {com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_PreloaderClip} [preloaderg2g]Uses:1 7 9 10 11 12 13 14 15 18 19 21 22
Symbol 24 Font {com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_ButtonFont}
Symbol 25 Font {com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_MenuFont}
Symbol 26 BitmapUsed by:27
Symbol 27 GraphicUses:26Used by:51
Symbol 28 GraphicUsed by:51
Symbol 29 BitmapUsed by:31
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:29 30Used by:51
Symbol 32 BitmapUsed by:33
Symbol 33 GraphicUses:32Used by:51
Symbol 34 GraphicUsed by:51
Symbol 35 GraphicUsed by:51
Symbol 36 GraphicUsed by:51
Symbol 37 GraphicUsed by:51
Symbol 38 GraphicUsed by:51
Symbol 39 GraphicUsed by:51
Symbol 40 GraphicUsed by:51
Symbol 41 GraphicUsed by:51
Symbol 42 GraphicUsed by:51
Symbol 43 GraphicUsed by:51
Symbol 44 GraphicUsed by:51
Symbol 45 GraphicUsed by:51
Symbol 46 GraphicUsed by:51
Symbol 47 GraphicUsed by:51
Symbol 48 GraphicUsed by:51
Symbol 49 GraphicUsed by:51
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClip {IntroOIG_mc} [IntroOIG_mc]Uses:27 28 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
Symbol 52 GraphicUsed by:79
Symbol 53 GraphicUsed by:79 113 267 397 419
Symbol 54 GraphicUsed by:79
Symbol 55 GraphicUsed by:57 114
Symbol 56 GraphicUsed by:57 249
Symbol 57 MovieClipUses:55 56Used by:79
Symbol 58 GraphicUsed by:60 114
Symbol 59 GraphicUsed by:60 246
Symbol 60 MovieClipUses:58 59Used by:79
Symbol 61 GraphicUsed by:66 114
Symbol 62 GraphicUsed by:66 114
Symbol 63 GraphicUsed by:66
Symbol 64 GraphicUsed by:66
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:61 62 63 64 65Used by:79
Symbol 67 GraphicUsed by:70 114
Symbol 68 GraphicUsed by:70 251
Symbol 69 GraphicUsed by:70 251
Symbol 70 MovieClipUses:67 68 69Used by:79
Symbol 71 GraphicUsed by:74 254
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:74
Symbol 74 MovieClipUses:71 73Used by:79
Symbol 75 GraphicUsed by:78
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClipUses:76Used by:78
Symbol 78 MovieClipUses:75 77Used by:79
Symbol 79 MovieClipUses:52 53 54 57 60 66 70 74 78Used by:107
Symbol 80 GraphicUsed by:84
Symbol 81 GraphicUsed by:84 128 163 200
Symbol 82 GraphicUsed by:84
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:80 81 82 83Used by:107
Symbol 85 GraphicUsed by:90 97 101
Symbol 86 GraphicUsed by:90
Symbol 87 FontUsed by:88 93 94 96 99
Symbol 88 TextUses:87Used by:90
Symbol 89 GraphicUsed by:90
Symbol 90 ButtonUses:85 86 88 89Used by:107
Symbol 91 GraphicUsed by:97
Symbol 92 GraphicUsed by:97
Symbol 93 TextUses:87Used by:97
Symbol 94 TextUses:87Used by:97
Symbol 95 GraphicUsed by:97
Symbol 96 TextUses:87Used by:97
Symbol 97 MovieClipUses:85 91 92 93 94 95 96Used by:107
Symbol 98 GraphicUsed by:101
Symbol 99 TextUses:87Used by:101
Symbol 100 GraphicUsed by:101
Symbol 101 ButtonUses:85 98 99 100Used by:107
Symbol 102 GraphicUsed by:105
Symbol 103 GraphicUsed by:105
Symbol 104 GraphicUsed by:105
Symbol 105 ButtonUses:102 103 104Used by:106
Symbol 106 MovieClipUses:105Used by:107 146 154 156 165 197 220 222
Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc]Uses:79 84 90 97 101 106
Symbol 108 GraphicUsed by:114
Symbol 109 GraphicUsed by:114
Symbol 110 GraphicUsed by:114
Symbol 111 GraphicUsed by:113
Symbol 112 GraphicUsed by:113 267 397 419
Symbol 113 MovieClipUses:111 112 53Used by:114 253
Symbol 114 MovieClipUses:108 55 109 61 62 67 58 110 113Used by:146 154 156 165 197 220 222
Symbol 115 GraphicUsed by:128 152 163 195 200
Symbol 116 GraphicUsed by:117 158
Symbol 117 ButtonUses:116Used by:128 200
Symbol 118 GraphicUsed by:128 163 195 200 230 235 262
Symbol 119 GraphicUsed by:125
Symbol 120 GraphicUsed by:125 357 445
Symbol 121 GraphicUsed by:125
Symbol 122 ShapeTweeningUsed by:125
Symbol 123 ShapeTweeningUsed by:125
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:119 120 121 122 123 124Used by:128 163 195 200 230 235 262
Symbol 126 GraphicUsed by:128 163 195 200 230 235 262
Symbol 127 GraphicUsed by:128
Symbol 128 MovieClipUses:115 117 118 125 126 127 81Used by:146
Symbol 129 GraphicUsed by:142
Symbol 130 GraphicUsed by:142
Symbol 131 GraphicUsed by:142
Symbol 132 GraphicUsed by:142
Symbol 133 GraphicUsed by:142
Symbol 134 GraphicUsed by:142
Symbol 135 GraphicUsed by:142
Symbol 136 GraphicUsed by:142
Symbol 137 GraphicUsed by:142
Symbol 138 GraphicUsed by:142
Symbol 139 GraphicUsed by:142
Symbol 140 GraphicUsed by:142
Symbol 141 GraphicUsed by:142
Symbol 142 MovieClipUses:129 130 131 132 133 134 135 136 137 138 139 140 141Used by:146 154 156 165 197 222
Symbol 143 GraphicUsed by:146
Symbol 144 FontUsed by:145
Symbol 145 TextUses:144Used by:146 154 156 165 197 220 222
Symbol 146 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin} [GameWin_mc]Uses:114 128 142 143 106 145
Symbol 147 GraphicUsed by:148
Symbol 148 ButtonUses:147Used by:152 262
Symbol 149 GraphicUsed by:152
Symbol 150 FontUsed by:151 257
Symbol 151 TextUses:150Used by:152
Symbol 152 MovieClipUses:115 148 149 151Used by:154 156 222
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip} [Help_mc]Uses:114 152 142 153 106 145
Symbol 155 GraphicUsed by:156
Symbol 156 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay} [HelpDisplay_mc]Uses:114 152 142 155 106 145
Symbol 157 GraphicUsed by:158 262
Symbol 158 ButtonUses:157 116Used by:163
Symbol 159 GraphicUsed by:163
Symbol 160 GraphicUsed by:163 200
Symbol 161 GraphicUsed by:162 234
Symbol 162 ButtonUses:161Used by:163
Symbol 163 MovieClipUses:115 158 159 81 160 162 118 125 126Used by:165
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp} [LevelUp_mc]Uses:114 163 142 164 106 145
Symbol 166 GraphicUsed by:187
Symbol 167 GraphicUsed by:187
Symbol 168 GraphicUsed by:187
Symbol 169 GraphicUsed by:187
Symbol 170 GraphicUsed by:187
Symbol 171 GraphicUsed by:187
Symbol 172 GraphicUsed by:187
Symbol 173 GraphicUsed by:187
Symbol 174 GraphicUsed by:187
Symbol 175 GraphicUsed by:183
Symbol 176 GraphicUsed by:183
Symbol 177 GraphicUsed by:183
Symbol 178 GraphicUsed by:183
Symbol 179 GraphicUsed by:183
Symbol 180 GraphicUsed by:183
Symbol 181 GraphicUsed by:183
Symbol 182 GraphicUsed by:183
Symbol 183 MovieClipUses:175 176 177 178 179 180 181 182Used by:187
Symbol 184 GraphicUsed by:187
Symbol 185 GraphicUsed by:187
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClip {IntroCgs_mc} [IntroCgs_mc]Uses:166 167 168 169 170 171 172 173 174 183 184 185 186
Symbol 188 GraphicUsed by:189
Symbol 189 ButtonUses:188Used by:195
Symbol 190 GraphicUsed by:191
Symbol 191 ButtonUses:190Used by:195
Symbol 192 GraphicUsed by:195
Symbol 193 GraphicUsed by:195
Symbol 194 GraphicUsed by:195
Symbol 195 MovieClipUses:115 189 191 192 193 118 125 126 194Used by:197
Symbol 196 GraphicUsed by:197
Symbol 197 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc]Uses:114 195 196 106 145 142
Symbol 198 Sound {com.csharks.juwalbose.cFlashtory.cFlashtory_Music} [Music]
Symbol 199 GraphicUsed by:200
Symbol 200 MovieClipUses:115 117 118 125 126 199 81 160Used by:220
Symbol 201 GraphicUsed by:218
Symbol 202 GraphicUsed by:218
Symbol 203 GraphicUsed by:218
Symbol 204 ShapeTweeningUsed by:211
Symbol 205 ShapeTweeningUsed by:211
Symbol 206 ShapeTweeningUsed by:211
Symbol 207 ShapeTweeningUsed by:211
Symbol 208 ShapeTweeningUsed by:211
Symbol 209 ShapeTweeningUsed by:211
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClipUses:204 205 206 207 208 209 210Used by:218 417 428 436 445
Symbol 212 GraphicUsed by:218
Symbol 213 GraphicUsed by:216
Symbol 214 ShapeTweeningUsed by:216
Symbol 215 GraphicUsed by:216
Symbol 216 MovieClipUses:213 214 215Used by:218 417 428 436 445
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClipUses:201 202 203 211 212 216 217Used by:220
Symbol 219 GraphicUsed by:220
Symbol 220 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc]Uses:114 200 218 219 106 145
Symbol 221 GraphicUsed by:222
Symbol 222 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_TemplateBg} [Template]Uses:114 152 142 221 106 145
Symbol 223 GraphicUsed by:230 235
Symbol 224 FontUsed by:225 226 227 228 229 256 258 259 261
Symbol 225 TextUses:224Used by:230
Symbol 226 TextUses:224Used by:230
Symbol 227 EditableTextUses:224Used by:230
Symbol 228 EditableTextUses:224Used by:230
Symbol 229 EditableTextUses:224Used by:230
Symbol 230 MovieClip {BabyCare_TargetMessage} [targetMessage]Uses:223 118 125 126 225 226 227 228 229
Symbol 231 Sound {BabyCare_ClickSFX} [clickSound]
Symbol 232 GraphicUsed by:235
Symbol 233 GraphicUsed by:234 244
Symbol 234 ButtonUses:161 233Used by:235
Symbol 235 MovieClip {BabyCare_PauseMessage} [pauseMessage]Uses:223 118 125 126 232 234
Symbol 236 Sound {BabyCare_TakeSFX} [takeFx]
Symbol 237 Sound {BabyCare_ClickSFX2} [clickFX2]
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClip {BabyCare_BgClip} [BgClip]Uses:238
Symbol 240 Sound {BabyCare_DoorOpenSFX} [doorOpenFx]
Symbol 241 Sound {BabyCare_DoorCloseSFX} [doorCloseFx]
Symbol 242 Sound {BabyCare_LevelUpSFX} [levelupSound]
Symbol 243 GraphicUsed by:262
Symbol 244 ButtonUses:233Used by:262
Symbol 245 GraphicUsed by:248 250 252 253 255
Symbol 246 MovieClipUses:59Used by:248
Symbol 247 GraphicUsed by:248 250 252 253 255
Symbol 248 MovieClipUses:245 246 247Used by:262
Symbol 249 MovieClipUses:56Used by:250
Symbol 250 MovieClipUses:245 249 247Used by:262
Symbol 251 MovieClipUses:68 69Used by:252
Symbol 252 MovieClipUses:245 251 247Used by:262
Symbol 253 MovieClipUses:245 113 247Used by:262
Symbol 254 MovieClipUses:71Used by:255
Symbol 255 MovieClipUses:245 254 247Used by:262
Symbol 256 EditableTextUses:224Used by:262
Symbol 257 EditableTextUses:150Used by:262
Symbol 258 EditableTextUses:224Used by:262
Symbol 259 EditableTextUses:224Used by:262
Symbol 260 GraphicUsed by:262
Symbol 261 TextUses:224Used by:262
Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc]Uses:243 118 125 126 157 244 148 248 250 252 253 255 256 257 258 259 260 261
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:265
Symbol 265 MovieClip {LogoOIG} [LogoOIG]Uses:264
Symbol 266 GraphicUsed by:267 419
Symbol 267 MovieClip {BabyCare_Cradle} [cradle]Uses:266 112 53
Symbol 268 Sound {BabyCare_ScoreSFX} [scoreFx]
Symbol 269 GraphicUsed by:287
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:287
Symbol 272 FontUsed by:273 274 275 276 277 278 279 280 281 282 283 284 285 286
Symbol 273 TextUses:272Used by:287
Symbol 274 TextUses:272Used by:287
Symbol 275 TextUses:272Used by:287
Symbol 276 TextUses:272Used by:287
Symbol 277 TextUses:272Used by:287
Symbol 278 TextUses:272Used by:287
Symbol 279 TextUses:272Used by:287
Symbol 280 TextUses:272Used by:287
Symbol 281 TextUses:272Used by:287
Symbol 282 TextUses:272Used by:287
Symbol 283 TextUses:272Used by:287
Symbol 284 TextUses:272Used by:287
Symbol 285 TextUses:272Used by:287
Symbol 286 TextUses:272Used by:287
Symbol 287 Button {ShareThis} [ShareThis]Uses:269 271 273 274 275 276 277 278 279 280 281 282 283 284 285 286
Symbol 288 BitmapUsed by:289
Symbol 289 GraphicUses:288Used by:290
Symbol 290 MovieClip {LogoCsharks} [LogoCsharks]Uses:289
Symbol 291 GraphicUsed by:292
Symbol 292 MovieClip {com.csharks.juwalbose.utils.ui.SceneManager_ButtonDownClip} [ButtonDownClip]Uses:291
Symbol 293 GraphicUsed by:294
Symbol 294 MovieClip {BabyCare_ButtonUpClip} [ButtonUpClip]Uses:293
Symbol 295 GraphicUsed by:296
Symbol 296 MovieClip {com.csharks.juwalbose.utils.ui.SceneManager_ButtonOverClip} [ButtonOverClip]Uses:295
Symbol 297 ShapeTweeningUsed by:364
Symbol 298 GraphicUsed by:364
Symbol 299 GraphicUsed by:364
Symbol 300 GraphicUsed by:364
Symbol 301 GraphicUsed by:364
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:302Used by:364
Symbol 304 GraphicUsed by:364
Symbol 305 GraphicUsed by:364
Symbol 306 GraphicUsed by:364
Symbol 307 GraphicUsed by:364
Symbol 308 ShapeTweeningUsed by:364
Symbol 309 GraphicUsed by:364
Symbol 310 ShapeTweeningUsed by:364
Symbol 311 GraphicUsed by:364
Symbol 312 ShapeTweeningUsed by:364
Symbol 313 ShapeTweeningUsed by:364
Symbol 314 GraphicUsed by:364
Symbol 315 GraphicUsed by:364
Symbol 316 GraphicUsed by:364
Symbol 317 GraphicUsed by:364
Symbol 318 GraphicUsed by:364
Symbol 319 GraphicUsed by:364
Symbol 320 GraphicUsed by:364
Symbol 321 ShapeTweeningUsed by:364
Symbol 322 ShapeTweeningUsed by:364
Symbol 323 GraphicUsed by:364
Symbol 324 GraphicUsed by:364
Symbol 325 GraphicUsed by:364
Symbol 326 GraphicUsed by:364
Symbol 327 ShapeTweeningUsed by:364
Symbol 328 ShapeTweeningUsed by:364
Symbol 329 GraphicUsed by:364
Symbol 330 ShapeTweeningUsed by:364
Symbol 331 ShapeTweeningUsed by:364
Symbol 332 GraphicUsed by:364
Symbol 333 ShapeTweeningUsed by:364
Symbol 334 ShapeTweeningUsed by:364
Symbol 335 GraphicUsed by:357 445
Symbol 336 GraphicUsed by:357 445
Symbol 337 GraphicUsed by:357 445
Symbol 338 GraphicUsed by:357 445
Symbol 339 GraphicUsed by:357 417 428 436 445
Symbol 340 GraphicUsed by:357 436
Symbol 341 GraphicUsed by:357 436
Symbol 342 GraphicUsed by:357 436
Symbol 343 GraphicUsed by:357 436
Symbol 344 GraphicUsed by:357 436
Symbol 345 GraphicUsed by:357 417
Symbol 346 GraphicUsed by:357 417
Symbol 347 GraphicUsed by:357 417
Symbol 348 GraphicUsed by:357 417
Symbol 349 GraphicUsed by:357 417
Symbol 350 GraphicUsed by:357 417
Symbol 351 GraphicUsed by:357 428
Symbol 352 GraphicUsed by:357 428
Symbol 353 GraphicUsed by:357 428
Symbol 354 GraphicUsed by:357 428
Symbol 355 GraphicUsed by:357 428
Symbol 356 GraphicUsed by:357 428
Symbol 357 MovieClipUses:335 336 337 338 339 120 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356Used by:364
Symbol 358 GraphicUsed by:364
Symbol 359 ShapeTweeningUsed by:364
Symbol 360 ShapeTweeningUsed by:364
Symbol 361 GraphicUsed by:364
Symbol 362 ShapeTweeningUsed by:364
Symbol 363 ShapeTweeningUsed by:364
Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character]Uses:297 298 299 300 301 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 357 358 359 360 361 362 363
Symbol 365 GraphicUsed by:384 386 388 390
Symbol 366 GraphicUsed by:384 419
Symbol 367 GraphicUsed by:383
Symbol 368 ShapeTweeningUsed by:383
Symbol 369 ShapeTweeningUsed by:383
Symbol 370 ShapeTweeningUsed by:383
Symbol 371 ShapeTweeningUsed by:383
Symbol 372 ShapeTweeningUsed by:383
Symbol 373 ShapeTweeningUsed by:383
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:383
Symbol 376 ShapeTweeningUsed by:383
Symbol 377 ShapeTweeningUsed by:383
Symbol 378 ShapeTweeningUsed by:383
Symbol 379 ShapeTweeningUsed by:383
Symbol 380 ShapeTweeningUsed by:383
Symbol 381 ShapeTweeningUsed by:383
Symbol 382 GraphicUsed by:383
Symbol 383 MovieClipUses:367 368 369 370 371 372 373 375 376 377 378 379 380 381 382Used by:384 386 388 390
Symbol 384 MovieClip {com.csharks.vinod.WorkingTable_DressTable} [dressTable]Uses:365 366 383
Symbol 385 GraphicUsed by:386 419
Symbol 386 MovieClip {com.csharks.vinod.WorkingTable_MedicineTable} [medicineTable]Uses:365 385 383
Symbol 387 GraphicUsed by:388 419
Symbol 388 MovieClip {com.csharks.vinod.WorkingTable_FoodTable} [foodTable]Uses:365 387 383
Symbol 389 GraphicUsed by:390 419
Symbol 390 MovieClip {com.csharks.vinod.WorkingTable_WashTable} [washTable]Uses:365 389 383
Symbol 391 GraphicUsed by:398
Symbol 392 GraphicUsed by:395
Symbol 393 GraphicUsed by:395
Symbol 394 GraphicUsed by:395
Symbol 395 MovieClipUses:392 393 394Used by:398
Symbol 396 GraphicUsed by:398
Symbol 397 MovieClipUses:112 53Used by:398
Symbol 398 MovieClip {com.csharks.vinod.Bed_BedClip} [bed]Uses:391 395 396 397
Symbol 399 GraphicUsed by:409
Symbol 400 GraphicUsed by:409
Symbol 401 GraphicUsed by:409
Symbol 402 GraphicUsed by:409
Symbol 403 GraphicUsed by:409
Symbol 404 GraphicUsed by:409
Symbol 405 GraphicUsed by:409
Symbol 406 GraphicUsed by:409
Symbol 407 GraphicUsed by:409
Symbol 408 GraphicUsed by:409
Symbol 409 MovieClip {com.csharks.vinod.Baby_Clock} [timer]Uses:399 400 401 402 403 404 405 406 407 408
Symbol 410 GraphicUsed by:417
Symbol 411 GraphicUsed by:417
Symbol 412 GraphicUsed by:417
Symbol 413 GraphicUsed by:417
Symbol 414 GraphicUsed by:417
Symbol 415 GraphicUsed by:417
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClip {com.csharks.vinod.Baby_AfricanBaby} [baby3]Uses:345 346 347 348 339 349 350 410 411 211 412 216 413 414 415 416
Symbol 418 GraphicUsed by:419
Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox]Uses:418 389 366 387 385 266 112 53
Symbol 420 GraphicUsed by:428
Symbol 421 GraphicUsed by:428
Symbol 422 GraphicUsed by:428
Symbol 423 GraphicUsed by:428
Symbol 424 GraphicUsed by:428
Symbol 425 GraphicUsed by:428
Symbol 426 GraphicUsed by:428
Symbol 427 GraphicUsed by:428
Symbol 428 MovieClip {com.csharks.vinod.Baby_BlondeBaby} [baby4]Uses:351 352 353 354 339 355 356 420 421 422 423 211 424 216 425 426 427
Symbol 429 GraphicUsed by:436
Symbol 430 GraphicUsed by:436
Symbol 431 GraphicUsed by:436
Symbol 432 GraphicUsed by:436
Symbol 433 GraphicUsed by:436
Symbol 434 GraphicUsed by:436
Symbol 435 GraphicUsed by:436
Symbol 436 MovieClip {com.csharks.vinod.Baby_AsianBaby} [baby2]Uses:340 341 342 343 339 344 429 430 431 432 211 433 216 434 435
Symbol 437 Sound {com.csharks.vinod.Baby_AskFX} [askFx]
Symbol 438 GraphicUsed by:445
Symbol 439 GraphicUsed by:445
Symbol 440 GraphicUsed by:445
Symbol 441 GraphicUsed by:445
Symbol 442 GraphicUsed by:445
Symbol 443 GraphicUsed by:445
Symbol 444 GraphicUsed by:445
Symbol 445 MovieClip {com.csharks.vinod.Baby_HairlessBaby} [baby1]Uses:335 336 337 338 339 120 438 439 440 441 211 442 216 443 444

Instance Names

"loaderTxt"Symbol 7 MovieClip Frame 1Symbol 3 EditableText
"logoMask"Symbol 7 MovieClip Frame 1Symbol 6 MovieClip
"loaderBase"Symbol 23 MovieClip {com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_PreloaderClip} [preloaderg2g] Frame 1Symbol 7 MovieClip
"fSitebutton"Symbol 23 MovieClip {com.csharks.juwalbose.cFlashtory.preloaders.PreloaderG2G_PreloaderClip} [preloaderg2g] Frame 1Symbol 10 Button
"n5"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n4"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n14"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n13"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n6"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n8"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n9"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n12"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n11"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n7"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n10"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n1"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n2"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"n3"Symbol 78 MovieClip Frame 1Symbol 77 MovieClip
"carpet_mc"Symbol 79 MovieClip Frame 1Symbol 57 MovieClip
"table1_mc"Symbol 79 MovieClip Frame 1Symbol 60 MovieClip
"table2_mc"Symbol 79 MovieClip Frame 1Symbol 60 MovieClip
"door_mc"Symbol 79 MovieClip Frame 1Symbol 66 MovieClip
"window1_mc"Symbol 79 MovieClip Frame 1Symbol 70 MovieClip
"window2_mc"Symbol 79 MovieClip Frame 1Symbol 70 MovieClip
"ac_mc"Symbol 79 MovieClip Frame 1Symbol 74 MovieClip
"games2girls_button"Symbol 106 MovieClip Frame 1Symbol 105 Button
"main_mc"Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 79 MovieClip
"menu_Btn"Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 90 Button
"sound_Mc"Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 97 MovieClip
"help_Btn"Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 101 Button
"logo_mc"Symbol 107 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 106 MovieClip
"continue_btn"Symbol 128 MovieClip Frame 1Symbol 117 Button
"frame_mc"Symbol 146 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin} [GameWin_mc] Frame 1Symbol 128 MovieClip
"back_btn"Symbol 152 MovieClip Frame 1Symbol 148 Button
"frame_mc"Symbol 154 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip} [Help_mc] Frame 1Symbol 152 MovieClip
"frame_mc"Symbol 156 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay} [HelpDisplay_mc] Frame 1Symbol 152 MovieClip
"upgrade_btn"Symbol 163 MovieClip Frame 1Symbol 158 Button
"continue_btn"Symbol 163 MovieClip Frame 1Symbol 162 Button
"frame_mc"Symbol 165 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp} [LevelUp_mc] Frame 1Symbol 163 MovieClip
"play_btn"Symbol 195 MovieClip Frame 1Symbol 189 Button
"help_btn"Symbol 195 MovieClip Frame 1Symbol 191 Button
"frame_mc"Symbol 197 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 1Symbol 195 MovieClip
"continue_btn"Symbol 200 MovieClip Frame 1Symbol 117 Button
"frame_mc"Symbol 220 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc] Frame 1Symbol 200 MovieClip
"children_txt"Symbol 230 MovieClip {BabyCare_TargetMessage} [targetMessage] Frame 1Symbol 227 EditableText
"time_txt"Symbol 230 MovieClip {BabyCare_TargetMessage} [targetMessage] Frame 1Symbol 228 EditableText
"bonus_txt"Symbol 230 MovieClip {BabyCare_TargetMessage} [targetMessage] Frame 1Symbol 229 EditableText
"continue_btn"Symbol 235 MovieClip {BabyCare_PauseMessage} [pauseMessage] Frame 1Symbol 234 Button
"buy_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 244 Button
"back_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 148 Button
"table_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 248 MovieClip
"carpet_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 250 MovieClip
"curtain_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 252 MovieClip
"bed_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 253 MovieClip
"ac_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 255 MovieClip
"tableCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 256 EditableText
"carpetCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 256 EditableText
"curtainCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 256 EditableText
"bedCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 256 EditableText
"acCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 256 EditableText
"total_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 257 EditableText
"tableUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 258 EditableText
"carpetUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 258 EditableText
"windowUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 258 EditableText
"bedUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 259 EditableText
"acUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 1Symbol 259 EditableText
"tableCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 256 EditableText
"carpetCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 256 EditableText
"curtainCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 256 EditableText
"bedCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 256 EditableText
"acCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 256 EditableText
"total_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 257 EditableText
"tableUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 258 EditableText
"carpetUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 258 EditableText
"windowUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 258 EditableText
"bedUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 259 EditableText
"acUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 5Symbol 259 EditableText
"buy_btn"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 244 Button
"tableCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 256 EditableText
"carpetCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 256 EditableText
"curtainCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 256 EditableText
"bedCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 256 EditableText
"acCost_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 256 EditableText
"total_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 257 EditableText
"tableUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 258 EditableText
"carpetUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 258 EditableText
"windowUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 258 EditableText
"bedUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 259 EditableText
"acUnlock_txt"Symbol 262 MovieClip {BabyCare_Upgrade} [Upgrade_mc] Frame 11Symbol 259 EditableText
"childHolder_mc"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 1Symbol 303 MovieClip
"bedTopWood_mc"Symbol 398 MovieClip {com.csharks.vinod.Bed_BedClip} [bed] Frame 1Symbol 395 MovieClip
"pillow_mc"Symbol 398 MovieClip {com.csharks.vinod.Bed_BedClip} [bed] Frame 1Symbol 397 MovieClip
"bedBottomWood_mc"Symbol 398 MovieClip {com.csharks.vinod.Bed_BedClip} [bed] Frame 1Symbol 395 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 23 as "preloaderg2g"
ExportAssets (56)Timeline Frame 2Symbol 51 as "IntroOIG_mc"
ExportAssets (56)Timeline Frame 2Symbol 107 as "Game_mc"
ExportAssets (56)Timeline Frame 2Symbol 146 as "GameWin_mc"
ExportAssets (56)Timeline Frame 2Symbol 154 as "Help_mc"
ExportAssets (56)Timeline Frame 2Symbol 156 as "HelpDisplay_mc"
ExportAssets (56)Timeline Frame 2Symbol 165 as "LevelUp_mc"
ExportAssets (56)Timeline Frame 2Symbol 187 as "IntroCgs_mc"
ExportAssets (56)Timeline Frame 2Symbol 197 as "Menu_mc"
ExportAssets (56)Timeline Frame 2Symbol 198 as "Music"
ExportAssets (56)Timeline Frame 2Symbol 220 as "GameOver_mc"
ExportAssets (56)Timeline Frame 2Symbol 222 as "Template"
ExportAssets (56)Timeline Frame 2Symbol 230 as "targetMessage"
ExportAssets (56)Timeline Frame 2Symbol 231 as "clickSound"
ExportAssets (56)Timeline Frame 2Symbol 235 as "pauseMessage"
ExportAssets (56)Timeline Frame 2Symbol 236 as "takeFx"
ExportAssets (56)Timeline Frame 2Symbol 237 as "clickFX2"
ExportAssets (56)Timeline Frame 2Symbol 239 as "BgClip"
ExportAssets (56)Timeline Frame 2Symbol 240 as "doorOpenFx"
ExportAssets (56)Timeline Frame 2Symbol 241 as "doorCloseFx"
ExportAssets (56)Timeline Frame 2Symbol 242 as "levelupSound"
ExportAssets (56)Timeline Frame 2Symbol 262 as "Upgrade_mc"
ExportAssets (56)Timeline Frame 2Symbol 265 as "LogoOIG"
ExportAssets (56)Timeline Frame 2Symbol 267 as "cradle"
ExportAssets (56)Timeline Frame 2Symbol 268 as "scoreFx"
ExportAssets (56)Timeline Frame 2Symbol 287 as "ShareThis"
ExportAssets (56)Timeline Frame 2Symbol 290 as "LogoCsharks"
ExportAssets (56)Timeline Frame 2Symbol 292 as "ButtonDownClip"
ExportAssets (56)Timeline Frame 2Symbol 294 as "ButtonUpClip"
ExportAssets (56)Timeline Frame 2Symbol 296 as "ButtonOverClip"
ExportAssets (56)Timeline Frame 2Symbol 364 as "character"
ExportAssets (56)Timeline Frame 2Symbol 384 as "dressTable"
ExportAssets (56)Timeline Frame 2Symbol 386 as "medicineTable"
ExportAssets (56)Timeline Frame 2Symbol 388 as "foodTable"
ExportAssets (56)Timeline Frame 2Symbol 390 as "washTable"
ExportAssets (56)Timeline Frame 2Symbol 398 as "bed"
ExportAssets (56)Timeline Frame 2Symbol 409 as "timer"
ExportAssets (56)Timeline Frame 2Symbol 417 as "baby3"
ExportAssets (56)Timeline Frame 2Symbol 419 as "requestBox"
ExportAssets (56)Timeline Frame 2Symbol 428 as "baby4"
ExportAssets (56)Timeline Frame 2Symbol 436 as "baby2"
ExportAssets (56)Timeline Frame 2Symbol 437 as "askFx"
ExportAssets (56)Timeline Frame 2Symbol 445 as "baby1"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$VZ$nfRK2Bk21VOMPD.RptmaX/."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"com_csharks_juwalbose_cFlashtory_preloaders_PreloaderG2G"Frame 1
"BabyCare"Frame 2
"old"Symbol 57 MovieClip Frame 1
"new"Symbol 57 MovieClip Frame 2
"old"Symbol 60 MovieClip Frame 1
"new"Symbol 60 MovieClip Frame 2
"open"Symbol 66 MovieClip Frame 1
"opened"Symbol 66 MovieClip Frame 7
"close"Symbol 66 MovieClip Frame 8
"closed"Symbol 66 MovieClip Frame 14
"old"Symbol 70 MovieClip Frame 1
"new"Symbol 70 MovieClip Frame 2
"old"Symbol 74 MovieClip Frame 1
"new"Symbol 74 MovieClip Frame 2
"new"Symbol 248 MovieClip Frame 1
"bought"Symbol 248 MovieClip Frame 2
"new"Symbol 250 MovieClip Frame 1
"bought"Symbol 250 MovieClip Frame 2
"new"Symbol 252 MovieClip Frame 1
"bought"Symbol 252 MovieClip Frame 2
"new"Symbol 253 MovieClip Frame 1
"bought"Symbol 253 MovieClip Frame 2
"new"Symbol 255 MovieClip Frame 1
"bought"Symbol 255 MovieClip Frame 2
"stand"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 1
"walkFront"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 8
"walkSide"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 15
"walkBack"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 22
"walkFrontChild"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 29
"walkSideChild"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 36
"walkBackChild"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 43
"bendSide"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 50
"standFrontChild"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 57
"work"Symbol 364 MovieClip {com.csharks.vinod.Player_Character} [character] Frame 64
"idle"Symbol 384 MovieClip {com.csharks.vinod.WorkingTable_DressTable} [dressTable] Frame 1
"busy"Symbol 384 MovieClip {com.csharks.vinod.WorkingTable_DressTable} [dressTable] Frame 2
"idle"Symbol 386 MovieClip {com.csharks.vinod.WorkingTable_MedicineTable} [medicineTable] Frame 1
"busy"Symbol 386 MovieClip {com.csharks.vinod.WorkingTable_MedicineTable} [medicineTable] Frame 2
"idle"Symbol 388 MovieClip {com.csharks.vinod.WorkingTable_FoodTable} [foodTable] Frame 1
"busy"Symbol 388 MovieClip {com.csharks.vinod.WorkingTable_FoodTable} [foodTable] Frame 2
"idle"Symbol 390 MovieClip {com.csharks.vinod.WorkingTable_WashTable} [washTable] Frame 1
"busy"Symbol 390 MovieClip {com.csharks.vinod.WorkingTable_WashTable} [washTable] Frame 2
"old"Symbol 395 MovieClip Frame 1
"new"Symbol 395 MovieClip Frame 2
"idle"Symbol 417 MovieClip {com.csharks.vinod.Baby_AfricanBaby} [baby3] Frame 1
"crying"Symbol 417 MovieClip {com.csharks.vinod.Baby_AfricanBaby} [baby3] Frame 8
"idleSide"Symbol 417 MovieClip {com.csharks.vinod.Baby_AfricanBaby} [baby3] Frame 20
"wash"Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox] Frame 1
"dress"Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox] Frame 2
"food"Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox] Frame 3
"medicine"Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox] Frame 4
"done"Symbol 419 MovieClip {com.csharks.vinod.Baby_RequestBox} [requestBox] Frame 5
"idle"Symbol 428 MovieClip {com.csharks.vinod.Baby_BlondeBaby} [baby4] Frame 1
"crying"Symbol 428 MovieClip {com.csharks.vinod.Baby_BlondeBaby} [baby4] Frame 8
"idleSide"Symbol 428 MovieClip {com.csharks.vinod.Baby_BlondeBaby} [baby4] Frame 20
"idle"Symbol 436 MovieClip {com.csharks.vinod.Baby_AsianBaby} [baby2] Frame 1
"crying"Symbol 436 MovieClip {com.csharks.vinod.Baby_AsianBaby} [baby2] Frame 8
"idleSide"Symbol 436 MovieClip {com.csharks.vinod.Baby_AsianBaby} [baby2] Frame 20
"idle"Symbol 445 MovieClip {com.csharks.vinod.Baby_HairlessBaby} [baby1] Frame 1
"crying"Symbol 445 MovieClip {com.csharks.vinod.Baby_HairlessBaby} [baby1] Frame 8
"idleSide"Symbol 445 MovieClip {com.csharks.vinod.Baby_HairlessBaby} [baby1] Frame 20




http://swfchan.com/24/119064/info.shtml
Created: 6/3 -2019 03:36:46 Last modified: 6/3 -2019 03:36:46 Server time: 26/04 -2024 03:03:04