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

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

Bubble Shoot.swf

This is the info page for
Flash #131945

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


Text
?

Y

Y

Y


GAME WON

N

O

W

E

M

A

G

Play
Again

Submit
Score

Congratulations

level

score

life

timer

Instructions

Clear bubbles from the board by shooting
with water gun and reach the target
score before the timer runs out to
advance level.
Score as many points as possible.
As Level increases different colors of
bubbles also increases.
Control : Mouse

Back

Ok

Play

Help

More

Games

Sound
on

Sound
off

Leader

Board

s

h

a

r

e

g

m

s

h

a

r

e

g

m

Target Score

ok

ActionScript [AS3]

Section 1
//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 2
//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"; 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"; 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"; 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 3
//PreloaderMochi (com.csharks.juwalbose.cFlashtory.preloaders.PreloaderMochi) package com.csharks.juwalbose.cFlashtory.preloaders { import flash.events.*; import com.inruntime.utils.*; import flash.display.*; import mochi.as3.*; import flash.utils.*; public dynamic class PreloaderMochi extends MovieClip { private var gameVars:Global; private var did_load:Boolean; private static var GAME_OPTIONS:Object; public function PreloaderMochi(){ var k:String; Config.initialise(); gameVars = Global.getInstance(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; gameVars.mochiEnabled = true; GAME_OPTIONS = new Object(); GAME_OPTIONS = {id:"868390c58fda5c2c", res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString())}; super(); var f:Function = function (ev:IOErrorEvent):void{ }; loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var opts:Object = {}; for (k in GAME_OPTIONS) { opts[k] = GAME_OPTIONS[k]; }; opts.ad_started = function ():void{ did_load = true; }; opts.ad_finished = function ():void{ var app:Object; var mainClass:Class = Class(getDefinitionByName(gameVars.gameName)); if (mainClass){ app = new (mainClass); addChild((app as DisplayObject)); }; }; opts.clip = this; MochiAd.showPreGameAd(opts); } } }//package com.csharks.juwalbose.cFlashtory.preloaders
Section 4
//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 flash.media.*; import com.inruntime.utils.*; import com.senocular.utils.*; import net.hires.debug.*; import com.greensock.easing.*; import mochi.as3.*; 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:Sprite; 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{ 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; 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{ SceneManager.removeButton(helpDisplay_mc, "Back to Game", backToGame); helpDisplayed = false; removeChild(helpDisplay_mc); } protected function gameHelpInit(evnt:Object):void{ 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{ SceneManager.removeButton(levelUp_mc, "Next Level", levelUp2Game); setVariable("level", String((gameVars.level + 1)), "levelUpExit", "N"); removeChild(levelUp_mc); } protected function windowActive(evnt:Event):void{ 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{ 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; 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": 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"); 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 { 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; 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"); } protected function backBtnFn(evnt:MouseEvent):void{ if (((!((gameVars.showCredits == null))) && ((evnt.currentTarget.parent == templateMc)))){ evnt.currentTarget.parent.removeChild(finalCreditText); finalCreditText.removeEventListener(MouseEvent.CLICK, gotoSite); }; SceneManager.removeButton(evnt.currentTarget.parent, "Back to Menu", backBtnFn); gameSequence.changeState("Menu"); } protected function windowNotActive(evnt:Event):void{ var virtualClick:MouseEvent; 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{ 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.showCreditsOnLeaderBoard, 425, 70, UiBoxTypes.TextOnly, 30, 0x660033, 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, "Menu", backBtnFn); backButton.x = (gameVars.stageMiddleX - (backButton.width / 2)); backButton.y = (2 * gameVars.stageMiddleY); TweenLite.to(backButton, 1, {y:300, 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); } protected function gamewinInit(evnt:Object):void{ gameWin_mc = new GameWin(); gameWin_mc.addEventListener(Event.ENTER_FRAME, gameWinAdded); addChild(gameWin_mc); } protected function gamewinExit(evnt:Object):void{ 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{ 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{ 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 5
//cFlashtory_GameClip (com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_GameClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var flower3:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 6
//cFlashtory_GameOver (com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_GameOver extends MovieClipAsset { public var back_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var gameWonScene:DisplayObject; public var flower1:DisplayObject; public var submitScore_Btn:DisplayObject; public var boy:DisplayObject; public var flower2:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 7
//cFlashtory_GameWin (com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_GameWin extends MovieClipAsset { public var flower4:DisplayObject; public var gameOverScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var title:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var girl:DisplayObject; public var back_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var flower5:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var menuScene:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; public var help_Btn:DisplayObject; public var flower3:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 8
//cFlashtory_HelpClip (com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_HelpClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var flower3:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 9
//cFlashtory_HelpDisplay (com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_HelpDisplay extends SpriteAsset { public var back_Btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 10
//cFlashtory_LeveUp (com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_LeveUp extends MovieClipAsset { public var flower4:DisplayObject; public var bubbleTitle:DisplayObject; public var boy:DisplayObject; public var gameOverScene:DisplayObject; public var leaderboard_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var shootTitle:DisplayObject; public var more_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var girl:DisplayObject; public var ok_Btn:DisplayObject; public var playAgain_Btn:DisplayObject; public var back_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var gameWonScene:DisplayObject; public var menuScene:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower3:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 11
//cFlashtory_MenuClip (com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_MenuClip extends MovieClipAsset { public var flower4:DisplayObject; public var gameOverScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var girl:DisplayObject; public var back_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var flower5:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var menuScene:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; public var help_Btn:DisplayObject; public var flower3:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 12
//cFlashtory_Music (com.csharks.juwalbose.cFlashtory.cFlashtory_Music) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_Music extends SoundAsset { public var back_Btn:DisplayObject; public var gameWonScene:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 13
//cFlashtory_TemplateBg (com.csharks.juwalbose.cFlashtory.cFlashtory_TemplateBg) package com.csharks.juwalbose.cFlashtory { import mx.core.*; import flash.display.*; public class cFlashtory_TemplateBg extends MovieClipAsset { public var back_Btn:DisplayObject; public var gameWonScene:DisplayObject; } }//package com.csharks.juwalbose.cFlashtory
Section 14
//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 15
//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 16
//SceneManager (com.csharks.juwalbose.utils.ui.SceneManager) package com.csharks.juwalbose.utils.ui { import flash.events.*; 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 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 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 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 removeAllChildren(parent):void{ while (parent.numChildren) { parent.removeChildAt(0); }; } } }//package com.csharks.juwalbose.utils.ui
Section 17
//SceneManager_ButtonDownClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonDownClip) package com.csharks.juwalbose.utils.ui { import mx.core.*; import flash.display.*; public class SceneManager_ButtonDownClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 18
//SceneManager_ButtonOverClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonOverClip) package com.csharks.juwalbose.utils.ui { import mx.core.*; import flash.display.*; public class SceneManager_ButtonOverClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 19
//SceneManager_ButtonUpClip (com.csharks.juwalbose.utils.ui.SceneManager_ButtonUpClip) package com.csharks.juwalbose.utils.ui { import mx.core.*; import flash.display.*; public class SceneManager_ButtonUpClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.juwalbose.utils.ui
Section 20
//UiBox (com.csharks.juwalbose.utils.ui.UiBox) package com.csharks.juwalbose.utils.ui { import flash.events.*; import flash.display.*; 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 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:Class; private var increment:int; private var iHeight:uint; private var currentValue; private var barUpdating:Boolean;// = false public function UiBox(iheading:String="", iwidth:uint=50, iheight:uint=10, itype:uint=1, itextSize:uint=1, itextColor:uint=0, ilinkedVariable=null, ibgClip:Class=null, iitemClip:Class=null, ibarClip:Class=null, fontClass:Class=null){ MenuFont = (Config.MenuFont as Class); super(); boxType = itype; iWidth = iwidth; iHeight = iheight; textSize = itextSize; textColor = itextColor; bgClip = ibgClip; barClip = ibarClip; itemClip = iitemClip; heading = iheading; if (fontClass != null){ MenuFont = fontClass; }; if (heading != ""){ headingTxt = new LibraryFontTextField(new MenuFont().fontName, textSize, textColor, heading); headingTxt.selectable = false; headingTxt.mouseEnabled = false; headingTxt.width = iwidth; headingTxt.x = ((iWidth / 2) - (headingTxt.width / 2)); }; 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) - 20); 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.2; }; clip.x = ((((i * margin) / 2) + ((((i + 1) * margin) / 2) - (clip.width / 2))) + 30); 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); } 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(new MenuFont().fontName, (textSize = 12), 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 21
//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 22
//UiButton (com.csharks.juwalbose.utils.ui.UiButton) package com.csharks.juwalbose.utils.ui { import flash.display.*; public class UiButton extends SimpleButton { public var ButtonFont:Class; 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){ ButtonFont = (Config.ButtonFont as Class); super(); ButtonUpClip = buttonUpClip; ButtonOverClip = buttonOverClip; ButtonDownClip = buttonDownClip; textDownColor = itextDownColor; textOverColor = itextOverColor; textUpColor = itextUpColor; textSize = itextSize; title = text; var tmpTxt:LibraryFontTextField = new LibraryFontTextField(new ButtonFont().fontName, 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 23
//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 24
//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 25
//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 26
//Bubbles (com.csharks.marvil.Bubbles) package com.csharks.marvil { import flash.geom.*; import flash.display.*; public class Bubbles extends MovieClip { public var bubblesType:Number; public var blueBubble:Class; public var roseBubble:Class; public var point:Point; public var bubblesClip:MovieClip; public var orangeBubble:Class; public var flower:Class; public var brownBubble:Class; public var color:String; public var matched:Boolean;// = false public var violetBubble:Class; public var greenBubble:Class; public var canRemove:Boolean;// = false public var redBubble:Class; public function Bubbles(_x:Number, _y:Number, _color:Number):void{ blueBubble = Bubbles_blueBubble; greenBubble = Bubbles_greenBubble; redBubble = Bubbles_redBubble; violetBubble = Bubbles_violetBubble; orangeBubble = Bubbles_orangeBubble; roseBubble = Bubbles_roseBubble; brownBubble = Bubbles_brownBubble; flower = Bubbles_flower; point = new Point(0, 0); super(); matched = false; canRemove = false; x = _x; y = _y; color = _color.toString(); drawBall(color, 10); point.x = x; point.y = y; } public function updateBubbles(type:Number):void{ if (type == 10){ matched = true; bubblesClip.clip.gotoAndPlay(1); } else { color = type.toString(); bubblesClip.gotoAndStop(type); bubblesClip.clip.gotoAndStop(1); }; } private function drawBall(color:String, rad:int):void{ if (color == "1"){ bubblesClip = new blueBubble(); } else { if (color == "2"){ bubblesClip = new greenBubble(); } else { if (color == "3"){ bubblesClip = new redBubble(); } else { if (color == "4"){ bubblesClip = new violetBubble(); } else { if (color == "5"){ bubblesClip = new orangeBubble(); } else { if (color == "6"){ bubblesClip = new roseBubble(); } else { if (color == "7"){ bubblesClip = new brownBubble(); } else { if (color == "8"){ bubblesClip = new flower(); }; }; }; }; }; }; }; }; addChild(bubblesClip); bubblesClip.gotoAndStop(1); bubblesClip.width = (bubblesClip.width / 3); bubblesClip.height = (bubblesClip.height / 3); } } }//package com.csharks.marvil
Section 27
//Bubbles_blueBubble (com.csharks.marvil.Bubbles_blueBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_blueBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 28
//Bubbles_brownBubble (com.csharks.marvil.Bubbles_brownBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_brownBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 29
//Bubbles_flower (com.csharks.marvil.Bubbles_flower) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_flower extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 30
//Bubbles_greenBubble (com.csharks.marvil.Bubbles_greenBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_greenBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 31
//Bubbles_orangeBubble (com.csharks.marvil.Bubbles_orangeBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_orangeBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 32
//Bubbles_redBubble (com.csharks.marvil.Bubbles_redBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_redBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 33
//Bubbles_roseBubble (com.csharks.marvil.Bubbles_roseBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_roseBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 34
//Bubbles_violetBubble (com.csharks.marvil.Bubbles_violetBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class Bubbles_violetBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 35
//MovingBall (com.csharks.marvil.MovingBall) package com.csharks.marvil { import flash.events.*; import flash.geom.*; import flash.display.*; import com.inruntime.utils.*; public class MovingBall extends Sprite { public var maxWallHitsSound:Class; public var blueBubble:Class; public var point:Point; public var shootedBall:Boolean;// = false public var BorderHit:Class; public var maxWallHits:Number;// = 4 private var main:Game; public var roseBubble:Class; private var gameVars:Global; public var initialShoot:Boolean;// = true public var aloneArray:Array; private var speed:int; public var angle:Number; public var bubblesClip:MovieClip; public var xHits:Boolean;// = false public var yHits:Boolean;// = false public var orangeBubble:Class; public var flower:Class; public var Attaching:Class; public var color:String; public var bubbles:Class; public var brownBubble:Class; public var violetBubble:Class; public var greenBubble:Class; private var speedX:Number; private var speedY:Number; public var redBubble:Class; public function MovingBall(_x:Number, _y:Number, _angle:Number, _speed:int, _color:String, rad:int, _main:Game):void{ point = new Point(0, 0); bubbles = MovingBall_bubbles; blueBubble = MovingBall_blueBubble; greenBubble = MovingBall_greenBubble; redBubble = MovingBall_redBubble; violetBubble = MovingBall_violetBubble; orangeBubble = MovingBall_orangeBubble; roseBubble = MovingBall_roseBubble; brownBubble = MovingBall_brownBubble; flower = MovingBall_flower; Attaching = MovingBall_Attaching; BorderHit = MovingBall_BorderHit; maxWallHitsSound = MovingBall_maxWallHitsSound; aloneArray = new Array(); super(); gameVars = Global.getInstance(); initialShoot = true; main = _main; speed = _speed; color = _color; angle = _angle; drawBall(color, rad); x = _x; y = _y; shootedBall = false; bubblesClip.rotation = angle; speedX = (Math.cos(angle) * speed); speedY = (Math.sin(angle) * speed); updatePoint(); this.addEventListener(Event.ENTER_FRAME, loop); } private function checkHit():void{ var hitPoint:Point; var stepx:int; var stepy:int; var j:int; var loc_14:Number; var loc_15:Number; var loc_31:Number; var balls:Array = main.bubbleArray; var i:int; var powDist:int = ((main.padding + (main.rad * 2)) * (main.padding + (main.rad * 2))); i = 0; while (i < balls.length) { if (!balls[i].matched){ if (fastDist(balls[i].point, point) <= powDist){ stepx = (speedX / 8); stepy = (speedY / 8); j = 0; while (j < 8) { if (fastDist(balls[i].point, main.rotatingPlane.globalToLocal(new Point((x + (stepx * j)), (y + (stepy * j))))) <= powDist){ if (maxWallHits > 2){ gameVars.hits = true; }; maxWallHits = 4; main.playSound(Attaching, "shootBubble"); loc_14 = bubblesClip.rotation; loc_15 = ((Math.round(main.degreesToRadians(Math.atan2((bubblesClip.y - main.rotatingPlane.y), (bubblesClip.x - main.rotatingPlane.x)))) / 10) + 180); if ((loc_14 - loc_15) >= 180){ loc_14 = (loc_14 - 360); } else { if ((loc_14 - loc_15) <= -180){ loc_14 = (loc_14 + 360); }; }; if ((bubblesClip.x - main.rotatingPlane.x) != 0){ loc_31 = Math.round(((bubblesClip.x - main.rotatingPlane.x) / Math.cos(main.degreesToRadians((loc_15 - 180))))); main.gameVel = ((loc_14 - loc_15) / loc_31); if (((yHits) || (xHits))){ main.gameVel = ((main.gameVel * 10) * -1); } else { main.gameVel = (main.gameVel * 10); }; }; hitPoint = new Point((point.x + stepx), (point.y + stepy)); //unresolved jump }; j++; }; }; }; i++; }; if (hitPoint != null){ main.addBall(i, hitPoint, color); deleteThis(); }; } private function fastDist(Point1:Point, Point2:Point):int{ return ((((Point1.x - Point2.x) * (Point1.x - Point2.x)) + ((Point1.y - Point2.y) * (Point1.y - Point2.y)))); } private function loop(event:Event):void{ if (main.movingBalls.length == 0){ deleteThis(); } else { if ((((maxWallHits == 2)) && (!(shootedBall)))){ shootedBall = true; gameVars.hits = true; }; if (maxWallHits == 0){ main.playSound(maxWallHitsSound, "shootBubble"); deleteThis(); } else { checkBoundaries(); x = (x + speedX); y = (y + speedY); updatePoint(); checkHit(); }; }; } private function updatePoint():void{ point = main.rotatingPlane.globalToLocal(new Point(x, y)); } private function drawBall(color:String, rad:int):void{ if (color == "1"){ bubblesClip = new blueBubble(); } else { if (color == "2"){ bubblesClip = new greenBubble(); } else { if (color == "3"){ bubblesClip = new redBubble(); } else { if (color == "4"){ bubblesClip = new violetBubble(); } else { if (color == "5"){ bubblesClip = new orangeBubble(); } else { if (color == "6"){ bubblesClip = new roseBubble(); } else { if (color == "7"){ bubblesClip = new brownBubble(); } else { if (color == "8"){ bubblesClip = new flower(); }; }; }; }; }; }; }; }; addChild(bubblesClip); bubblesClip.gotoAndStop(1); bubblesClip.width = (bubblesClip.width / 3); bubblesClip.height = (bubblesClip.height / 3); } private function checkBoundaries():void{ var boundaries:Array = main.boundaries; if (((((x + speedX) < boundaries[0])) || (((x + speedX) > boundaries[2])))){ yHits = false; if (y < 100){ xHits = true; } else { xHits = false; }; maxWallHits--; main.playSound(BorderHit, "shootBubble"); speedX = (speedX * -1); bubblesClip.rotation = (360 - bubblesClip.rotation); }; if (((((y + speedY) < boundaries[1])) || (((y + speedY) > boundaries[3])))){ if (((((y + speedY) < boundaries[1])) && ((x < 475)))){ yHits = true; } else { yHits = false; }; xHits = false; maxWallHits--; main.playSound(BorderHit, "shootBubble"); speedY = (speedY * -1); bubblesClip.rotation = -(bubblesClip.rotation); }; } public function deleteThis():void{ this.removeEventListener(Event.ENTER_FRAME, loop); var index:int = main.movingBalls.indexOf(this); main.movingBalls.splice(index, 1); main.gameArea.removeChild(this); delete ??getglobalscope [this]; } } }//package com.csharks.marvil
Section 36
//MovingBall_Attaching (com.csharks.marvil.MovingBall_Attaching) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_Attaching extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 37
//MovingBall_blueBubble (com.csharks.marvil.MovingBall_blueBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_blueBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 38
//MovingBall_BorderHit (com.csharks.marvil.MovingBall_BorderHit) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_BorderHit extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 39
//MovingBall_brownBubble (com.csharks.marvil.MovingBall_brownBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_brownBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 40
//MovingBall_bubbles (com.csharks.marvil.MovingBall_bubbles) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_bubbles extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 41
//MovingBall_flower (com.csharks.marvil.MovingBall_flower) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_flower extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 42
//MovingBall_greenBubble (com.csharks.marvil.MovingBall_greenBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_greenBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 43
//MovingBall_maxWallHitsSound (com.csharks.marvil.MovingBall_maxWallHitsSound) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_maxWallHitsSound extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 44
//MovingBall_orangeBubble (com.csharks.marvil.MovingBall_orangeBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_orangeBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 45
//MovingBall_redBubble (com.csharks.marvil.MovingBall_redBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_redBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 46
//MovingBall_roseBubble (com.csharks.marvil.MovingBall_roseBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_roseBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 47
//MovingBall_violetBubble (com.csharks.marvil.MovingBall_violetBubble) package com.csharks.marvil { import mx.core.*; import flash.display.*; public class MovingBall_violetBubble extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package com.csharks.marvil
Section 48
//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 49
//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 50
//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 51
//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 52
//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 53
//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 54
//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 55
//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 56
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.system.*; 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 h:Number; 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]; h = 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 57
//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 58
//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 59
//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 60
//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 61
//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 62
//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 63
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.geom.*; 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 64
//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 65
//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 66
//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 67
//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 68
//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 69
//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 70
//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 71
//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 72
//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 73
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 74
//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 75
//IChildList (mx.core.IChildList) package mx.core { import flash.geom.*; import flash.display.*; 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 76
//IContainer (mx.core.IContainer) package mx.core { import flash.geom.*; import flash.display.*; 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 77
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 78
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.geom.*; import flash.display.*; 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 79
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 80
//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 81
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 82
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 83
//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 84
//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 85
//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 86
//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 87
//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 88
//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 89
//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 90
//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 91
//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 92
//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 93
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.geom.*; import flash.display.*; 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 94
//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 95
//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 96
//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 97
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import flash.geom.*; import mx.core.*; import flash.display.*; 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 98
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import flash.events.*; import mx.core.*; import flash.display.*; 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 99
//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 100
//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 101
//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 102
//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 103
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import flash.events.*; import flash.geom.*; import mx.core.*; import flash.display.*; 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 104
//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 105
//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 106
//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 mx.core.*; import flash.display.*; 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 107
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; public function ModuleManagerGlobals(){ super(); } } }//package mx.modules
Section 108
//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 109
//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 110
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 111
//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 112
//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 113
//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 114
//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 115
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; 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 116
//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 117
//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 118
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import flash.geom.*; import mx.core.*; import flash.display.*; import mx.styles.*; 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 119
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import flash.events.*; import flash.geom.*; import mx.core.*; import flash.display.*; import flash.utils.*; import mx.styles.*; import flash.system.*; 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 120
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.events.*; import mx.core.*; import flash.display.*; 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 121
//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 122
//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 123
//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 124
//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 125
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 126
//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 127
//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 128
//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 129
//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 130
//NameUtil (mx.utils.NameUtil) package mx.utils { import mx.core.*; import flash.display.*; 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 131
//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 132
//Stats (net.hires.debug.Stats) package net.hires.debug { import flash.events.*; import flash.geom.*; import flash.display.*; import flash.utils.*; import flash.system.*; 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 133
//IDispatcher (org.osflash.signals.IDispatcher) package org.osflash.signals { public interface IDispatcher { function dispatch(... _args):void; } }//package org.osflash.signals
Section 134
//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 135
//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 136
//_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 137
//_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 138
//_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 139
//_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 140
//_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 141
//_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 142
//_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 143
//_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 144
//_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 145
//_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 146
//_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 147
//_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 148
//_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 149
//_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 150
//_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 151
//_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 152
//_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 153
//_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 154
//_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 155
//_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 156
//_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 157
//_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 158
//Config (Config) package { import com.inruntime.utils.*; import flash.utils.*; public class Config { public static const ButtonFont:Class = Config_ButtonFont; public static const MenuFont:Class = Config_MenuFont; public function Config(){ super(); } public static function initialise():void{ var gameVars:Global = Global.getInstance(); gameVars.developerMode = false; gameVars.mochiEnabled = false; gameVars.showInterLevelAds = 3; gameVars.gameName = "Game"; gameVars.stageMiddleX = 325; gameVars.stageMiddleY = 275; gameVars.soundReady = true; gameVars.life = 5; gameVars.lifeMax = 3; gameVars.score = 0; gameVars.level = 1; gameVars.levelMax = 5; gameVars.timer = 0; gameVars.timerMax = 90; gameVars.currentlevelTimer = 0; gameVars.Paused = false; gameVars.startTime = getTimer(); gameVars.hits = true; gameVars.timeInterval = 10; gameVars.showShareButton = true; gameVars.brandUsed = "OIG"; gameVars.siteUrl = "http://www.onlineindiangames.com"; gameVars.showCreditsOnLeaderBoard = "Play more games at"; gameVars.showCredits = "www.csharks.com"; gameVars.buttonFontSize = 20; gameVars.buttonFontNormalColor = 0x660033; gameVars.buttonFontOverColor = 0x660033; gameVars.buttonFontDownColor = 0x660033; } } }//package
Section 159
//Config_ButtonFont (Config_ButtonFont) package { import mx.core.*; public class Config_ButtonFont extends FontAsset { } }//package
Section 160
//Config_MenuFont (Config_MenuFont) package { import mx.core.*; public class Config_MenuFont extends FontAsset { } }//package
Section 161
//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 162
//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 163
//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 164
//Game (Game) package { import flash.events.*; import flash.geom.*; import flash.display.*; import com.csharks.juwalbose.utils.ui.*; import com.greensock.*; import flash.utils.*; import flash.media.*; import com.csharks.juwalbose.cFlashtory.*; import com.csharks.marvil.*; import com.csharks.juwalbose.utils.*; import com.greensock.easing.*; import mochi.as3.*; import flash.filters.*; public class Game extends cFlashtory { private const angles:Array; public const padding:int = 3; public const rad:int = 10; public const midx:int = 325; public const midy:int = 275; private const speed:int = 8; private const maxBalls:int = 3; public const boundaries:Array; public var bubbleYSpeed:Number; public var gameScoreText:UiBox; public var levelUpSound:Class; public var ClickArea:Class; public var shooted:Boolean;// = false private var Ball:Class; public var nextBubbleYPos:Number; public var Gun:Class; public var gameWonSound:Class; public var bubbleArray:Array; protected var timerClip:Class; public var canShoot:Boolean; public var bubbleMaxX:Number;// = 384 public var clickArea:MovieClip; private var gameTimerText:UiBox; public var gun:MovieClip; private var planeSpeed:Number;// = 0.5 protected var largeBgClip:Class; public var gameVel:Number; public var shootedBubbleStop:Boolean;// = false protected var BgClip:Class; public var ButtonClick:Class; private var TargetBox:Class; private var gameLifeText:UiBox; public var targetClicked:Boolean;// = false public var shootedBubbleArray:Array; public var hits:Boolean;// = false public var bubbleXSpeed:Number; public var maxBubbleType:Number; public var targetBox:MovieClip; protected var ButtonUpClip:Class; private var greyBall:Bubbles; public var destroyArray:Array; public var targetScore:Number;// = 0 protected var ButtonDownClip:Class; public var newBubbleX:Number;// = 278 public var newBubbleY:Number;// = 152 public var maxLevel:Number;// = 15 public var point:Point; public var minMatch:Number;// = 3 public var gunRotationAngle:Number; public var gameArea:Sprite; private var gameIntervalText:UiBox; public var movingBalls:Array; public var nextBubble0:Bubbles; public var nextBubble1:Bubbles; public var nextBubble2:Bubbles; protected var ButtonOverClip:Class; public var gameCounter:Counter; public var currentLevelScore:Number;// = 0 public var gameOverSound:Class; public var nextBubbleXPos:Number; public var Removal:Class; public var GunSound:Class; public var newPoint:Point; private var fxChannel:SoundChannel; private var persistentData:Object; public var rotatingPlane:MovieClip; public var counterInterval:Counter; public var bubbleMinX:Number;// = 278 public var currentAngleForSpeed:Number; private var gameLevelText:UiBox; public function Game(){ BgClip = Game_BgClip; largeBgClip = Game_largeBgClip; timerClip = Game_timerClip; ButtonUpClip = Game_ButtonUpClip; ButtonDownClip = Game_ButtonDownClip; ButtonOverClip = Game_ButtonOverClip; ButtonClick = Game_ButtonClick; GunSound = Game_GunSound; Removal = Game_Removal; gameWonSound = Game_gameWonSound; levelUpSound = Game_levelUpSound; gameOverSound = Game_gameOverSound; Ball = Game_Ball; Gun = Game_Gun; ClickArea = Game_ClickArea; TargetBox = Game_TargetBox; destroyArray = new Array(); gameArea = new Sprite(); rotatingPlane = new MovieClip(); point = new Point(0, 0); movingBalls = new Array(); boundaries = new Array(125, 60, 550, 480); angles = new Array(new Point(((rad * 2) + padding), 0), new Point((((rad * 2) + padding) / 2), Math.sqrt((Math.pow(((rad * 2) + padding), 2) - Math.pow((((rad * 2) + padding) / 2), 2)))), new Point((((rad * 2) + padding) / -2), Math.sqrt((Math.pow(((rad * 2) + padding), 2) - Math.pow((((rad * 2) + padding) / 2), 2)))), new Point((-1 * ((rad * 2) + padding)), 0), new Point((((rad * 2) + padding) / -2), (-1 * Math.sqrt((Math.pow(((rad * 2) + padding), 2) - Math.pow((((rad * 2) + padding) / 2), 2))))), new Point((((rad * 2) + padding) / 2), (-1 * Math.sqrt((Math.pow(((rad * 2) + padding), 2) - Math.pow((((rad * 2) + padding) / 2), 2)))))); bubbleArray = new Array(); shootedBubbleArray = new Array(); super(); if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, init); }; } override protected function gameoverExit(evnt:Object):void{ super.gameoverExit(evnt); } private function closestAngle(point1:Point, point2:Point):Point{ var result:Point; var movement:Point; var angle:Number = Math.atan2((point2.y - point1.y), (point2.x - point1.x)); angle = Math.round(((angle / (Math.PI / 180)) / 60)); if (angle < 0){ angle = (angle + 6); }; result = new Point(0, 0); movement = angles[angle]; result.x = (movement.x + point1.x); result.y = (movement.y + point1.y); return (result); } public function getLinks(begins:Array, ballsA:Array, color:String="none"):Array{ var links:Array; var ig:int; var linked:Array = begins; var linkedF:Array = new Array(); while (linked.length != 0) { links = getSurroundingB(ballsA[linked[0]].point, ballsA, color, linkedF); ig = 0; while (ig < links.length) { if (linked.indexOf(links[ig]) < 0){ linked.push(links[ig]); }; ig++; }; linkedF.push(linked[0]); linked.splice(0, 1); }; return (linkedF); } override protected function clearCanvas():void{ var temp:Bubbles; var ii:Number = 0; while (ii < bubbleArray.length) { temp = bubbleArray[ii]; rotatingPlane.removeChild(temp); ii++; }; if (targetClicked){ gameArea.removeChild(rotatingPlane); bubbleArray.splice(0); movingBalls.splice(0); gameArea.removeChild(gun); removeChild(clickArea); removeChild(gameArea); clickArea.removeEventListener(MouseEvent.CLICK, shootBubble); }; SceneManager.removeItem(game_mc, "Level"); SceneManager.removeItem(game_mc, "Score"); SceneManager.removeItem(game_mc, "Life"); 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(); } public function toGame(e:MouseEvent):void{ gameCounter.start(1); counterInterval.start(1); game_mc.drop.alpha = 1; targetClicked = true; removeChild(targetBox); gameArea.addChild(rotatingPlane); rotatingPlane.x = midx; rotatingPlane.y = midy; rotatingPlane.width = (rotatingPlane.width / 20); rotatingPlane.height = (rotatingPlane.height / 20); TweenLite.to(rotatingPlane, 1, {scaleX:1, scaleY:1}); gameVel = (10 + (Math.random() * 5)); clickArea = new ClickArea(); addChild(clickArea); clickArea.x = 0; clickArea.y = 0; clickArea.addEventListener(MouseEvent.CLICK, shootBubble); super.levelInit(e.currentTarget.parent); } 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("868390c58fda5c2c", root); }; if (gameVars.developerMode){ gameSequence.initialState = "Menu"; } else { gameSequence.initialState = "Intro"; }; } override protected function levelUpAdded(evnt:Event):void{ var levelText:UiBox; var scoreText:UiBox; if (evnt.currentTarget.currentFrame == evnt.currentTarget.totalFrames){ evnt.currentTarget.stop(); evnt.currentTarget.levelUpScene.flower.gotoAndStop(25); evnt.currentTarget.levelUpScene.levelUpTitle.gotoAndStop(25); levelText = new UiBox("Level", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.level, BgClip); levelText.name = "Level"; evnt.currentTarget.addChild(levelText); scoreText = new UiBox("Score", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.score, BgClip); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); scoreText.y = (levelText.y = 285); levelText.x = 150; scoreText.x = 350; evnt.target.ok_Btn.addEventListener(MouseEvent.CLICK, super.levelUp2Game); evnt.currentTarget.removeEventListener(Event.ENTER_FRAME, levelUpAdded); }; } override protected function menuInit(evnt:Object):void{ var creditText:UiBox; super.menuInit(evnt); 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 = 75; logo.y = 490; }; 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); creditText.y = (((2 * gameVars.stageMiddleY) - creditText.height) + 10); 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) + 12); creditLogo.y = (((2 * gameVars.stageMiddleY) - creditLogo.height) + 5); }; }; } public function gameRandomValue(minVal:Number, maxVal:Number):Number{ var randVal:Number; randVal = (minVal + Math.floor((Math.random() * ((maxVal + 1) - minVal)))); return (randVal); } override protected function assignSubmitScore(evnt:Event):void{ var evnt = evnt; evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignSubmitScore); evnt.currentTarget.stop(); var o:Object = {n:[1, 13, 13, 13, 14, 8, 6, 2, 14, 13, 2, 15, 9, 1, 0, 12], f:function (i:Number, s:String):String{ if (s.length == 16){ return (s); }; return (this.f((i + 1), (s + this.n[i].toString(16)))); }}; var boardID:String = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:gameVars.score, res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), clip:evnt.currentTarget, onClose:function (){ templateMc.gotoAndPlay(2); }}); templateMc.addEventListener(Event.ENTER_FRAME, checkTemplate); } public function degreesToRadians(degrees:Number):Number{ return (((degrees * Math.PI) / 180)); } protected function forceGameWin(evnth:MouseEvent):void{ gameSequence.changeState("GameWin"); } 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"); } else { setVariable("level", "1", "gameEngineInit", "N"); setVariable("score", "0", "gameEngineInit", "N"); setVariable("life", String(gameVars.lifeMax), "gameEngineInit", "N"); }; gameEngine.initialState = "GameInit"; } public function playSound(which:Class, from:String):void{ var tempSound:Sound; var which = which; var from = from; if (gameVars.soundReady){ tempSound = new (which); fxChannel = tempSound.play(); //unresolved jump var _slot1 = e; }; } override protected function action(evnt:Event):void{ var limit:Number; var s:Number; var ballsRandom:MovingBall; var allSpliced:Boolean; var ii:int; var i:int; var links2:Array; var indexes:Array; var i2:int; if (targetClicked){ if ((((bubbleArray.length < 40)) && ((counterInterval.currentTime == 0)))){ limit = gameRandomValue(3, 4); s = 0; while (s < limit) { ballsRandom = new MovingBall(gameRandomValue(130, 160), 400, gameRandomValue(45, 90), 6, String(gameRandomValue(1, maxBubbleType)), rad, this); hits = false; gameArea.addChild(ballsRandom); movingBalls.push(ballsRandom); s++; }; shooted = true; setVariable("interval", String(gameVars.timeInterval), "action", "N"); counterInterval = new Counter(gameVars.timeInterval, 0, "down", timesUp); counterInterval.start(1); }; if (gameCounter.currentTime == 0){ gameVars.score = (gameVars.score + currentLevelScore); if (currentLevelScore >= targetScore){ if (gameVars.level == maxLevel){ playSound(gameWonSound, "action"); gameSequence.changeState("GameWin"); } else { if (currentLevelScore >= targetScore){ playSound(levelUpSound, "action"); gameEngine.changeState("LevelUp"); }; }; } else { playSound(gameOverSound, "action"); gameSequence.changeState("GameOver"); }; } else { if (gameVars.timer != gameCounter.currentTime){ setVariable("timer", String(gameCounter.currentTime), "action", "N"); }; gunRotationAngle = (Math.atan((((mouseY - gun.y) * -1) / (mouseX - gun.x))) / (Math.PI / 180)); if (gunRotationAngle < -40){ gunRotationAngle = -40; } else { if (gunRotationAngle > 40){ gunRotationAngle = 40; }; }; gun.rotation = (gunRotationAngle * -1); rotatingPlane.rotation = (rotatingPlane.rotation + gameVel); gameVel = (gameVel + (-(gameVel) / 25)); if ((((gameVel < 0.0125)) && ((gameVel > -0.0125)))){ gameVel = 0; }; allSpliced = false; ii = 1; while (ii < bubbleArray.length) { if (bubbleArray[ii] != null){ if (bubbleArray[ii].canRemove){ rotatingPlane.removeChild(bubbleArray[ii]); bubbleArray.splice(ii, 1); allSpliced = true; }; }; ii++; }; if (allSpliced){ links2 = getLinks(new Array([0]), bubbleArray); indexes = new Array(); trace(links2.length); i2 = 0; while (i2 < bubbleArray.length) { if (links2.indexOf(i2) < 0){ indexes.push(i2); }; i2++; }; if (indexes.length > 0){ deleteFreeBalls(indexes); }; }; i = 0; while (i < bubbleArray.length) { if ((((((((bubbleArray[i].point.x > 150)) || ((bubbleArray[i].point.x < -150)))) || ((bubbleArray[i].point.y > 150)))) || ((bubbleArray[i].point.y < -150)))){ bubbleArray[i].filters = [new GlowFilter(16737945, 1, 15, 15, 10, 10, false, false)]; }; if ((((((((bubbleArray[i].point.x > 175)) || ((bubbleArray[i].point.x < -175)))) || ((bubbleArray[i].point.y > 175)))) || ((bubbleArray[i].point.y < -175)))){ playSound(gameOverSound, "action"); gameVars.score = (gameVars.score + currentLevelScore); gameSequence.changeState("GameOver"); }; i++; }; if (bubbleArray.length < 2){ gameVars.score = (gameVars.score + currentLevelScore); if (currentLevelScore >= targetScore){ if (gameVars.level == maxLevel){ playSound(gameWonSound, "action"); gameSequence.changeState("GameWin"); } else { if (currentLevelScore >= targetScore){ playSound(levelUpSound, "action"); gameEngine.changeState("LevelUp"); }; }; } else { playSound(gameOverSound, "action"); gameSequence.changeState("GameOver"); }; }; if ((gameCounter.currentTime - 1) <= 0){ gameTimerText.update("0"); } else { gameTimerText.update(String((gameCounter.currentTime - 1))); }; super.action(evnt); }; }; } override protected function helpAdded(evnt:Event):void{ evnt.currentTarget.back_Btn.addEventListener(MouseEvent.CLICK, super.backToGame); evnt.target.removeEventListener(Event.ADDED_TO_STAGE, helpAdded); } override protected function pauseGame(evnt:Object=null):void{ super.pauseGame(evnt); var pausedText:UiBox = new UiBox("", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, "Game Paused", BgClip); pausedText.name = "PausedText"; pausedText.x = (gameVars.stageMiddleX - (pausedText.width / 2)); pausedText.y = (gameVars.stageMiddleY - (pausedText.height / 2)); game_mc.addChild(pausedText); gameCounter.pause(); counterInterval.pause(); setVariable("Paused", "1", "pauseGame", "B"); pauseTime = getTimer(); } private function newCoord(px:Number, py:Number, i:int, j:int):Point{ var movement:Point; var result:Point = new Point(0, 0); if (j == 0){ result = new Point((((rad * 2) + padding) * i), 0); } else { switch (Math.floor(((j - 1) / i))){ case 0: movement = angles[2]; break; case 1: movement = angles[3]; break; case 2: movement = angles[4]; break; case 3: movement = angles[5]; break; case 4: movement = angles[0]; break; case 5: movement = angles[1]; break; }; result.x = (movement.x + px); result.y = (movement.y + py); }; return (result); } 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); levelUp_mc.levelUpScene.levelUpTitle.gotoAndStop(24); MochiAd.showInterLevelAd({clip:root, id:"test", res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), ad_finished:showLevelUp}); } else { showLevelUp(); }; } private function getSurroundingB(point:Point, ballsA:Array, color:String="none", except:Array=null):Array{ var j:int; var results:Array = new Array(); var points:Array = new Array(); if (except == null){ except = new Array(); }; var i2:int; while (i2 < 6) { points[i2] = point.add(angles[i2]); i2++; }; var i3:int; while (i3 < ballsA.length) { if (except.indexOf(i3) < 0){ j = 0; while (j < points.length) { if ((((((((int((ballsA[i3].point.x / 4)) == int((points[j].x / 4)))) && ((int((ballsA[i3].point.y / 4)) == int((points[j].y / 4)))))) && ((color == "none")))) || ((((((int((ballsA[i3].point.x / 4)) == int((points[j].x / 4)))) && ((int((ballsA[i3].point.y / 4)) == int((points[j].y / 4)))))) && ((ballsA[i3].color == color)))))){ results.push(i3); }; j++; }; }; i3++; }; if (results.length == 0){ trace(color); }; return (results); } private function deleteBalls(idents:Array=null):void{ var id:int; var strength:Number; var id1:int; var point:Point; if (idents == null){ id = (bubbleArray.length - 1); while (id >= 0) { bubbleArray[idents[id]].rotation = -(rotatingPlane.rotation); bubbleArray[idents[id]].matched = true; bubbleArray[idents[id]].bubblesClip.gotoAndPlay(1); bubbleArray[id].addEventListener(Event.ENTER_FRAME, checkBurstEnd); id++; }; } else { strength = idents.length; idents.sort((16 | 2)); id1 = 0; while (id1 < idents.length) { point = rotatingPlane.localToGlobal(bubbleArray[idents[id1]].point); currentLevelScore = ((currentLevelScore + (gameVars.level * 2)) + int((strength * 0.4))); gameScoreText.update(String(currentLevelScore)); bubbleArray[idents[id1]].rotation = -(rotatingPlane.rotation); bubbleArray[idents[id1]].matched = true; bubbleArray[idents[id1]].bubblesClip.gotoAndPlay(1); bubbleArray[idents[id1]].addEventListener(Event.ENTER_FRAME, checkBurstEnd); id1++; }; }; } public function addBall(ice:int, hitPoint:Point, color:String):void{ var links:Array; hitPoint = closestAngle(bubbleArray[ice].point, hitPoint); var s:Array = getSurroundingB(hitPoint, bubbleArray, color); var b:Bubbles = new Bubbles(hitPoint.x, hitPoint.y, Number(color)); bubbleArray.push(b); rotatingPlane.addChild(b); if (s.length > 0){ links = getLinks(s, bubbleArray, color); if (links.length >= 3){ deleteBalls(links); }; }; } protected function timesUp():void{ } public function shootBubble(e:MouseEvent):void{ var angle:Number; var bubbleX:int; var bubbleY:int; var bubbleType:String; var nextBubble1Color:String; var nextBubble2Color:String; var b:MovingBall; if (gameVars.hits){ playSound(GunSound, "shootBubble"); gameVars.hits = false; gun.effect.alpha = 1; canShoot = false; angle = (gun.rotation - 2); bubbleX = ((gun.x - (130 * Math.cos(((angle * Math.PI) / 180)))) - 3); bubbleY = (gun.y - (130 * Math.sin(((angle * Math.PI) / 180)))); bubbleType = nextBubble0.color; nextBubble1Color = nextBubble1.color; nextBubble2Color = nextBubble2.color; gun.removeChild(nextBubble0); gun.removeChild(nextBubble1); gun.removeChild(nextBubble2); nextBubble0 = new Bubbles((nextBubbleXPos - 8), nextBubbleYPos, Number(nextBubble1Color)); nextBubble1 = new Bubbles(((nextBubbleXPos + nextBubble0.width) - 2), nextBubbleYPos, Number(nextBubble2Color)); nextBubble2 = new Bubbles(((nextBubbleXPos + (nextBubble0.width * 2)) + 4), nextBubbleYPos, gameRandomValue(1, maxBubbleType)); gun.addChild(nextBubble0); gun.addChild(nextBubble1); gun.addChild(nextBubble2); angle = Math.atan2((mouseY - gun.y), (mouseX - gun.x)); b = new MovingBall(bubbleX, bubbleY, angle, speed, bubbleType, rad, this); hits = false; movingBalls.push(b); gameArea.addChild(b); b.name = ("MovingBall" + movingBalls.length); shooted = true; gun.effect.alpha = 0; currentAngleForSpeed = gun.rotation; }; } public function checkFreeEnd(e:Event):void{ if (e.currentTarget.bubblesClip.currentFrame == 25){ e.currentTarget.bubblesClip.gotoAndStop(25); e.currentTarget.alpha = 0; e.currentTarget.canRemove = true; e.currentTarget.removeEventListener(Event.ENTER_FRAME, checkFreeEnd); }; } override protected function gameWinAdded(evnt:Event):void{ var levelText:UiBox; var scoreText:UiBox; var lastLevelScoreText:UiBox; var targetScoreText:UiBox; if (evnt.target.currentFrame == evnt.target.totalFrames){ evnt.target.stop(); evnt.target.gameWonScene.girl.title.gotoAndStop(26); evnt.target.gameWonScene.flower1.gotoAndStop(26); evnt.target.gameWonScene.flower2.gotoAndStop(26); evnt.target.playAgain_Btn.addEventListener(MouseEvent.CLICK, super.gameWin2Game); levelText = new UiBox("Level", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.level, largeBgClip); levelText.name = "Level"; evnt.currentTarget.addChild(levelText); scoreText = new UiBox("Total Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.score, largeBgClip); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); lastLevelScoreText = new UiBox("Level Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, currentLevelScore, largeBgClip); lastLevelScoreText.name = "lastLevelScore"; evnt.currentTarget.addChild(lastLevelScoreText); targetScoreText = new UiBox("Target Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, targetScore, largeBgClip); targetScoreText.name = "targetScore"; evnt.currentTarget.addChild(targetScoreText); levelText.y = 450; levelText.x = 50; targetScoreText.y = 450; targetScoreText.x = 190; lastLevelScoreText.y = (levelText.y + (levelText.height / 2)); lastLevelScoreText.x = 50; scoreText.y = (levelText.y + (levelText.height / 2)); scoreText.x = 190; evnt.target.removeEventListener(Event.ENTER_FRAME, gameWinAdded); if (gameVars.mochiEnabled){ }; }; } override protected function gameOverAdded(evnt:Event):void{ var levelText:UiBox; var scoreText:UiBox; var lastLevelScoreText:UiBox; var targetScoreText:UiBox; if (evnt.target.currentFrame == evnt.target.totalFrames){ evnt.target.stop(); evnt.target.gameOverScene.boy.gotoAndStop(24); evnt.target.gameOverScene.flower1.gotoAndStop(24); evnt.target.gameOverScene.flower2.gotoAndStop(24); levelText = new UiBox("Level", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.level, largeBgClip); levelText.name = "Level"; evnt.currentTarget.addChild(levelText); scoreText = new UiBox("Total Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.score, largeBgClip); scoreText.runningUpdate = true; scoreText.name = "Score"; evnt.currentTarget.addChild(scoreText); lastLevelScoreText = new UiBox("Level Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, currentLevelScore, largeBgClip); lastLevelScoreText.name = "lastLevelScore"; evnt.currentTarget.addChild(lastLevelScoreText); targetScoreText = new UiBox("Target Score", 200, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, targetScore, largeBgClip); targetScoreText.name = "targetScore"; evnt.currentTarget.addChild(targetScoreText); levelText.y = 220; levelText.x = 160; targetScoreText.y = 220; targetScoreText.x = 300; lastLevelScoreText.y = (levelText.y + (levelText.height / 2)); lastLevelScoreText.x = 160; scoreText.y = (levelText.y + (levelText.height / 2)); scoreText.x = 300; evnt.target.removeEventListener(Event.ENTER_FRAME, gameOverAdded); evnt.target.playAgain_Btn.addEventListener(MouseEvent.CLICK, super.gameOver2Game); if (gameVars.mochiEnabled){ evnt.target.submitScore_Btn.addEventListener(MouseEvent.CLICK, super.submitScore); }; }; } override protected function unpauseGame(evnt:Object=null):void{ gameCounter.unPause(); counterInterval.unPause(); Tick.reset(); super.unpauseGame(evnt); } override protected function assignHighScores(evnt:Event):void{ var evnt = evnt; evnt.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, assignHighScores); evnt.currentTarget.stop(); var o:Object = {n:[1, 13, 13, 13, 14, 8, 6, 2, 14, 13, 2, 15, 9, 1, 0, 12], f:function (i:Number, s:String):String{ if (s.length == 16){ return (s); }; return (this.f((i + 1), (s + this.n[i].toString(16)))); }}; var boardID:String = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, res:(((gameVars.stageMiddleX * 2).toString() + "x") + (gameVars.stageMiddleY * 2).toString()), clip:evnt.currentTarget, onClose:function (){ templateMc.gotoAndPlay(2); }}); templateMc.addEventListener(Event.ENTER_FRAME, checkTemplate); } override protected function levelInit(evnt:Object):void{ if (gameVars.mochiEnabled){ MochiSocial.hideLoginWidget(); }; currentLevelScore = 0; gameLevelText = new UiBox("Level", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.level, BgClip); gameLevelText.name = "Level"; game_mc.addChild(gameLevelText); gameScoreText = new UiBox("Score", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, currentLevelScore, BgClip); gameScoreText.runningUpdate = true; gameScoreText.name = "Score"; game_mc.addChild(gameScoreText); gameTimerText = new UiBox("Timer", 150, 40, UiBoxTypes.TextWithBackground, 15, 0xFFFFFF, gameVars.timer, timerClip); gameTimerText.name = "Timer"; game_mc.addChild(gameTimerText); gameLevelText.y = (gameScoreText.y = (gameTimerText.y = 500)); gameLevelText.x = 170; gameTimerText.x = 320; gameScoreText.x = 460; targetClicked = false; targetScore = (1000 * gameVars.level); game_mc.drop.alpha = 0; hits = false; shootedBubbleStop = false; shooted = false; newBubbleX = -100; newBubbleY = -25; bubbleMaxX = (374 - 325); bubbleMinX = (190 - 325); nextBubbleXPos = -90; nextBubbleYPos = -30; canShoot = true; maxLevel = 20; addChild(gameArea); gun = new Gun(); gameArea.addChild(gun); gun.effect.alpha = 0; gun.x = 650; gun.y = 275; if (gameVars.level == 1){ gameVars.score = 0; maxBubbleType = 3; targetScore = 100; gameVars.timer = 50; game_mc.colorLevel.gotoAndStop(1); }; if (gameVars.level == 2){ maxBubbleType = 3; targetScore = 200; gameVars.timer = 50; game_mc.colorLevel.gotoAndStop(1); }; if (gameVars.level == 3){ maxBubbleType = 3; targetScore = 300; gameVars.timer = 50; game_mc.colorLevel.gotoAndStop(1); }; if (gameVars.level == 4){ maxBubbleType = 4; targetScore = 400; gameVars.timer = 50; game_mc.colorLevel.gotoAndStop(2); }; if (gameVars.level == 5){ maxBubbleType = 4; targetScore = 500; gameVars.timer = 50; game_mc.colorLevel.gotoAndStop(2); }; if (gameVars.level == 6){ maxBubbleType = 4; gameVars.timer = 60; targetScore = 600; game_mc.colorLevel.gotoAndStop(2); }; if (gameVars.level == 7){ maxBubbleType = 4; targetScore = 700; gameVars.timer = 60; game_mc.colorLevel.gotoAndStop(2); }; if (gameVars.level == 8){ maxBubbleType = 5; targetScore = 800; gameVars.timer = 75; game_mc.colorLevel.gotoAndStop(3); }; if (gameVars.level == 9){ maxBubbleType = 5; targetScore = 1000; gameVars.timer = 75; game_mc.colorLevel.gotoAndStop(3); }; if (gameVars.level == 10){ maxBubbleType = 5; gameVars.timer = 75; targetScore = 1100; game_mc.colorLevel.gotoAndStop(3); }; if (gameVars.level == 11){ maxBubbleType = 5; gameVars.timer = 85; targetScore = 1200; game_mc.colorLevel.gotoAndStop(3); }; if (gameVars.level == 12){ maxBubbleType = 6; gameVars.timer = 100; targetScore = 1300; game_mc.colorLevel.gotoAndStop(4); }; if (gameVars.level == 13){ maxBubbleType = 6; gameVars.timer = 100; targetScore = 1500; game_mc.colorLevel.gotoAndStop(4); }; if (gameVars.level == 14){ maxBubbleType = 6; gameVars.timer = 100; targetScore = 1700; game_mc.colorLevel.gotoAndStop(4); }; if (gameVars.level == 15){ maxBubbleType = 6; gameVars.timer = 100; targetScore = 1800; game_mc.colorLevel.gotoAndStop(4); }; if (gameVars.level == 16){ maxBubbleType = 6; gameVars.timer = 100; targetScore = 1900; game_mc.colorLevel.gotoAndStop(4); }; if (gameVars.level >= 16){ maxBubbleType = 7; gameVars.timer = 100; targetScore = 2000; game_mc.colorLevel.gotoAndStop(5); }; gameCounter = new Counter(gameVars.timer, 1, "down", timesUp); setVariable("timer", String(gameVars.timer), "levelInit", "N"); gameTimerText.update(String(gameCounter.currentTime)); counterInterval = new Counter(gameVars.timeInterval, 1, "down", timesUp); setVariable("interval", String(gameVars.timeInterval), "levelInit", "N"); nextBubble0 = new Bubbles((nextBubbleXPos - 8), nextBubbleYPos, gameRandomValue(1, maxBubbleType)); nextBubble1 = new Bubbles(((nextBubbleXPos + nextBubble0.width) - 2), nextBubbleYPos, gameRandomValue(1, maxBubbleType)); nextBubble2 = new Bubbles(((nextBubbleXPos + (nextBubble0.width * 2)) + 4), nextBubbleYPos, gameRandomValue(1, maxBubbleType)); gun.addChild(nextBubble0); gun.addChild(nextBubble1); gun.addChild(nextBubble2); gameVars.hits = true; targetBox = new TargetBox(); addChild(targetBox); targetBox.x = 0; targetBox.y = 0; targetBox.targetScore_txt.text = targetScore; movingBalls.splice(0); targetBox.ok_Btn.addEventListener(MouseEvent.CLICK, toGame); createBubbles(); } public function createBubbles():void{ var j:int; var coords:Point = new Point(0, 0); var b:Bubbles = new Bubbles(coords.x, coords.y, 8); bubbleArray.push(b); rotatingPlane.addChild(b); var i = 1; while (i < 5) { j = 0; while (j < (i * 6)) { coords = newCoord(coords.x, coords.y, i, j); b = new Bubbles(coords.x, coords.y, gameRandomValue(1, maxBubbleType)); bubbleArray.push(b); rotatingPlane.addChild(b); j++; }; i++; }; } public function checkBurstEnd(e:Event):void{ if (e.currentTarget.bubblesClip.currentFrame == 5){ e.currentTarget.bubblesClip.gotoAndStop(5); e.currentTarget.canRemove = true; e.currentTarget.alpha = 0; e.currentTarget.removeEventListener(Event.ENTER_FRAME, checkBurstEnd); }; } override protected function assignHelp(evnt:Event):void{ evnt.currentTarget.back_Btn.addEventListener(MouseEvent.CLICK, super.backBtnFn); } protected function forceLevelUp(evnth:MouseEvent):void{ gameEngine.changeState("LevelUp"); } private function deleteFreeBalls(idents:Array=null):void{ var id:int; var strength:Number; var id1:int; var point:Point; if (idents == null){ id = (bubbleArray.length - 1); while (id >= 0) { bubbleArray[idents[id]].bubblesClip.gotoAndPlay(10); bubbleArray[idents[id]].rotation = -(rotatingPlane.rotation); bubbleArray[idents[id]].matched = true; bubbleArray[id].addEventListener(Event.ENTER_FRAME, checkFreeEnd); id++; }; } else { strength = idents.length; idents.sort((16 | 2)); id1 = 0; while (id1 < idents.length) { point = rotatingPlane.localToGlobal(bubbleArray[idents[id1]].point); currentLevelScore = ((currentLevelScore + (gameVars.level * 2)) + int((strength * 0.4))); gameScoreText.update(String(currentLevelScore)); bubbleArray[idents[id1]].rotation = -(rotatingPlane.rotation); bubbleArray[idents[id1]].matched = true; bubbleArray[idents[id1]].bubblesClip.gotoAndPlay(10); bubbleArray[idents[id1]].addEventListener(Event.ENTER_FRAME, checkFreeEnd); id1++; }; }; } override protected function assignMenu(event:Event):void{ if (event.currentTarget.currentFrame == event.currentTarget.totalFrames){ event.currentTarget.stop(); event.currentTarget.menuScene.flower1.gotoAndStop(29); event.currentTarget.menuScene.flower2.gotoAndStop(29); event.currentTarget.menuScene.flower3.gotoAndStop(29); event.currentTarget.menuScene.flower4.gotoAndStop(29); event.currentTarget.menuScene.flower5.gotoAndStop(29); event.currentTarget.menuScene.girl.bubbleTitle.gotoAndStop(24); event.currentTarget.menuScene.girl.shootTitle.gotoAndStop(28); event.currentTarget.sound_Mc.gotoAndStop(1); event.currentTarget.sound_Mc.buttonMode = true; event.currentTarget.play_Btn.addEventListener(MouseEvent.CLICK, gameStart); event.currentTarget.help_Btn.addEventListener(MouseEvent.CLICK, gotoHelpPage); event.currentTarget.sound_Mc.addEventListener(MouseEvent.CLICK, toggleGlobalSound); event.currentTarget.more_Btn.addEventListener(MouseEvent.CLICK, gotoSite); if (gameVars.mochiEnabled){ event.currentTarget.leaderboard_Btn.addEventListener(MouseEvent.CLICK, showHighScores); }; event.currentTarget.sound_Mc.addEventListener(MouseEvent.ROLL_OVER, soundRollOver); event.currentTarget.sound_Mc.addEventListener(MouseEvent.ROLL_OUT, soundRollOut); event.target.removeEventListener(Event.ENTER_FRAME, assignMenu); }; } override protected function gamewinExit(evnt:Object):void{ super.gamewinExit(evnt); } protected function forceGameOver(evnth:MouseEvent):void{ gameSequence.changeState("GameOver"); } override protected function levelUpExit(evnt:Object):void{ super.levelUpExit(evnt); } } }//package
Section 165
//Game_Ball (Game_Ball) package { import mx.core.*; import flash.display.*; public class Game_Ball extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 166
//Game_BgClip (Game_BgClip) package { import mx.core.*; import flash.display.*; public class Game_BgClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 167
//Game_ButtonClick (Game_ButtonClick) package { import mx.core.*; import flash.display.*; public class Game_ButtonClick extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 168
//Game_ButtonDownClip (Game_ButtonDownClip) package { import mx.core.*; import flash.display.*; public class Game_ButtonDownClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 169
//Game_ButtonOverClip (Game_ButtonOverClip) package { import mx.core.*; import flash.display.*; public class Game_ButtonOverClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var flower3:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 170
//Game_ButtonUpClip (Game_ButtonUpClip) package { import mx.core.*; import flash.display.*; public class Game_ButtonUpClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 171
//Game_ClickArea (Game_ClickArea) package { import mx.core.*; import flash.display.*; public class Game_ClickArea extends MovieClipAsset { public var shootTitle:DisplayObject; public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var flower3:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 172
//Game_gameOverSound (Game_gameOverSound) package { import mx.core.*; import flash.display.*; public class Game_gameOverSound extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 173
//Game_gameWonSound (Game_gameWonSound) package { import mx.core.*; import flash.display.*; public class Game_gameWonSound extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 174
//Game_Gun (Game_Gun) package { import mx.core.*; import flash.display.*; public class Game_Gun extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 175
//Game_GunSound (Game_GunSound) package { import mx.core.*; import flash.display.*; public class Game_GunSound extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 176
//Game_largeBgClip (Game_largeBgClip) package { import mx.core.*; import flash.display.*; public class Game_largeBgClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 177
//Game_levelUpSound (Game_levelUpSound) package { import mx.core.*; import flash.display.*; public class Game_levelUpSound extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 178
//Game_Removal (Game_Removal) package { import mx.core.*; import flash.display.*; public class Game_Removal extends SoundAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var play_Btn:DisplayObject; public var flower1:DisplayObject; public var flower2:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var flower3:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 179
//Game_TargetBox (Game_TargetBox) package { import mx.core.*; import flash.display.*; public class Game_TargetBox extends MovieClipAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var targetScore_txt:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 180
//Game_timerClip (Game_timerClip) package { import mx.core.*; import flash.display.*; public class Game_timerClip extends SpriteAsset { public var menuScene:DisplayObject; public var playAgain_Btn:DisplayObject; public var levelUpScene:DisplayObject; public var effect:DisplayObject; public var girl:DisplayObject; public var gameWonScene:DisplayObject; public var bubbleTitle:DisplayObject; public var gunClip:DisplayObject; public var play_Btn:DisplayObject; public var clickArea:DisplayObject; public var flower1:DisplayObject; public var flower3:DisplayObject; public var flower4:DisplayObject; public var flower5:DisplayObject; public var flower2:DisplayObject; public var help_Btn:DisplayObject; public var gameOverScene:DisplayObject; public var clip:DisplayObject; public var more_Btn:DisplayObject; public var boy:DisplayObject; public var title:DisplayObject; public var levelUpTitle:DisplayObject; public var flower:DisplayObject; public var menu_Btn:DisplayObject; public var colorLevel:DisplayObject; public var back_Btn:DisplayObject; public var submitScore_Btn:DisplayObject; public var ok_Btn:DisplayObject; public var sound_Mc:DisplayObject; public var drop:DisplayObject; public var shootTitle:DisplayObject; public var leaderboard_Btn:DisplayObject; } }//package
Section 181
//IntroCgs_mc (IntroCgs_mc) package { import flash.display.*; public dynamic class IntroCgs_mc extends MovieClip { } }//package
Section 182
//IntroOIG_mc (IntroOIG_mc) package { import flash.display.*; public dynamic class IntroOIG_mc extends MovieClip { } }//package
Section 183
//LogoCsharks (LogoCsharks) package { import flash.display.*; public dynamic class LogoCsharks extends Sprite { } }//package
Section 184
//LogoOIG (LogoOIG) package { import flash.display.*; public dynamic class LogoOIG extends Sprite { } }//package
Section 185
//ShareThis (ShareThis) package { import flash.display.*; public dynamic class ShareThis extends SimpleButton { } }//package

Library Items

Symbol 1 Font {Config_MenuFont}
Symbol 2 Font {Config_ButtonFont}
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:28
Symbol 5 GraphicUsed by:28
Symbol 6 BitmapUsed by:8
Symbol 7 BitmapUsed by:8
Symbol 8 GraphicUses:6 7Used by:28
Symbol 9 BitmapUsed by:10
Symbol 10 GraphicUses:9Used by:28
Symbol 11 GraphicUsed by:28
Symbol 12 GraphicUsed by:28
Symbol 13 GraphicUsed by:28
Symbol 14 GraphicUsed by:28
Symbol 15 GraphicUsed by:28
Symbol 16 GraphicUsed by:28
Symbol 17 GraphicUsed by:28
Symbol 18 GraphicUsed by:28
Symbol 19 GraphicUsed by:28
Symbol 20 GraphicUsed by:28
Symbol 21 GraphicUsed by:28
Symbol 22 GraphicUsed by:28
Symbol 23 GraphicUsed by:28
Symbol 24 GraphicUsed by:28
Symbol 25 GraphicUsed by:28
Symbol 26 GraphicUsed by:28
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClip {IntroOIG_mc} [IntroOIG_mc]Uses:4 5 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Symbol 29 GraphicUsed by:150
Symbol 30 GraphicUsed by:111
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:111
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:111
Symbol 35 GraphicUsed by:111
Symbol 36 GraphicUsed by:41
Symbol 37 GraphicUsed by:40
Symbol 38 GraphicUsed by:40
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:37 38 39Used by:41
Symbol 41 MovieClipUses:36 40Used by:42 281
Symbol 42 MovieClipUses:41Used by:111
Symbol 43 GraphicUsed by:111
Symbol 44 GraphicUsed by:111
Symbol 45 GraphicUsed by:111
Symbol 46 GraphicUsed by:111
Symbol 47 GraphicUsed by:105
Symbol 48 GraphicUsed by:65
Symbol 49 GraphicUsed by:54 164
Symbol 50 GraphicUsed by:54
Symbol 51 GraphicUsed by:54
Symbol 52 GraphicUsed by:54
Symbol 53 GraphicUsed by:54 179
Symbol 54 MovieClipUses:49 50 51 52 53Used by:65
Symbol 55 GraphicUsed by:59
Symbol 56 GraphicUsed by:59
Symbol 57 GraphicUsed by:59
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:55 56 57 58Used by:65 179
Symbol 60 GraphicUsed by:65
Symbol 61 GraphicUsed by:65
Symbol 62 GraphicUsed by:65 179
Symbol 63 GraphicUsed by:65
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClipUses:48 54 59 60 61 62 63 64Used by:105
Symbol 66 GraphicUsed by:105
Symbol 67 GraphicUsed by:105 202 236 328
Symbol 68 GraphicUsed by:103
Symbol 69 GraphicUsed by:103
Symbol 70 GraphicUsed by:103
Symbol 71 GraphicUsed by:103
Symbol 72 GraphicUsed by:103
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClipUses:73Used by:103
Symbol 75 GraphicUsed by:103
Symbol 76 GraphicUsed by:80
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClipUses:77Used by:80 83 84 103 149 176
Symbol 79 GraphicUsed by:80 83 84
Symbol 80 MovieClipUses:76 78 79Used by:103 177
Symbol 81 GraphicUsed by:103
Symbol 82 GraphicUsed by:83 84
Symbol 83 MovieClipUses:82 78 79Used by:103 177
Symbol 84 MovieClipUses:82 78 79Used by:103 177
Symbol 85 GraphicUsed by:86 98 102
Symbol 86 MovieClipUses:85Used by:99 103 149
Symbol 87 GraphicUsed by:103
Symbol 88 GraphicUsed by:89 458
Symbol 89 MovieClipUses:88Used by:103 149 459
Symbol 90 GraphicUsed by:99
Symbol 91 GraphicUsed by:99
Symbol 92 GraphicUsed by:99
Symbol 93 GraphicUsed by:99 102
Symbol 94 GraphicUsed by:99
Symbol 95 GraphicUsed by:98
Symbol 96 GraphicUsed by:98
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClipUses:85 95 96 97Used by:99
Symbol 99 MovieClip {com.csharks.marvil.MovingBall_redBubble} [RedBubble3]Uses:90 91 92 93 94 98 86Used by:103 487
Symbol 100 GraphicUsed by:102
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClipUses:85 100 101 93Used by:103
Symbol 103 MovieClipUses:68 69 70 71 72 74 75 80 81 78 83 84 86 87 89 99 102Used by:105
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:47 65 66 67 103 104Used by:111 383
Symbol 106 GraphicUsed by:111
Symbol 107 GraphicUsed by:111
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:111
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClipUses:30 32 34 35 42 43 44 45 46 105 106 107 109 110Used by:150
Symbol 112 GraphicUsed by:118
Symbol 113 GraphicUsed by:118
Symbol 114 GraphicUsed by:118
Symbol 115 GraphicUsed by:118
Symbol 116 GraphicUsed by:118
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:112 113 114 115 116 117Used by:150
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClipUses:119Used by:150
Symbol 121 FontUsed by:122
Symbol 122 TextUses:121Used by:124
Symbol 123 GraphicUsed by:124
Symbol 124 ButtonUses:122 123Used by:150
Symbol 125 GraphicUsed by:132
Symbol 126 FontUsed by:127 129 131
Symbol 127 TextUses:126Used by:132
Symbol 128 GraphicUsed by:132
Symbol 129 TextUses:126Used by:132
Symbol 130 GraphicUsed by:132
Symbol 131 TextUses:126Used by:132
Symbol 132 MovieClipUses:125 127 128 129 130 131Used by:150
Symbol 133 GraphicUsed by:135
Symbol 134 GraphicUsed by:135
Symbol 135 ButtonUses:133 134Used by:150
Symbol 136 FontUsed by:137
Symbol 137 EditableTextUses:136Used by:149 150
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClipUses:138Used by:140 388
Symbol 140 MovieClip {Game_BgClip} [BgClip]Uses:139Used by:149
Symbol 141 GraphicUsed by:142 467
Symbol 142 MovieClipUses:141Used by:149 468
Symbol 143 GraphicUsed by:144 450
Symbol 144 MovieClipUses:143Used by:149 451
Symbol 145 GraphicUsed by:146 476
Symbol 146 MovieClipUses:145Used by:149 477
Symbol 147 GraphicUsed by:148 485
Symbol 148 MovieClipUses:147Used by:149 486
Symbol 149 MovieClipUses:140 137 78 89 86 142 144 146 148Used by:150
Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc]Uses:29 111 118 120 124 132 135 137 149
Symbol 151 GraphicUsed by:212 257 282 338 383 385
Symbol 152 GraphicUsed by:212 257 282 338 383 385
Symbol 153 GraphicUsed by:212 282 385
Symbol 154 GraphicUsed by:212 282 383 385
Symbol 155 GraphicUsed by:212 282 383 385
Symbol 156 GraphicUsed by:158
Symbol 157 GraphicUsed by:158 160 213 215 217 259 284 340 342 345 351 441 442 443
Symbol 158 MovieClipUses:156 157Used by:212 282 383 385
Symbol 159 GraphicUsed by:160
Symbol 160 MovieClipUses:159 157Used by:212 257 282 338 383 385
Symbol 161 GraphicUsed by:202 236 328
Symbol 162 GraphicUsed by:202 236 328
Symbol 163 GraphicUsed by:179
Symbol 164 MovieClipUses:49Used by:179
Symbol 165 GraphicUsed by:179
Symbol 166 GraphicUsed by:179
Symbol 167 GraphicUsed by:179
Symbol 168 GraphicUsed by:179
Symbol 169 GraphicUsed by:176
Symbol 170 GraphicUsed by:176
Symbol 171 GraphicUsed by:175 176
Symbol 172 GraphicUsed by:175 176
Symbol 173 GraphicUsed by:175 176 435
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClipUses:173 174 171 172Used by:176
Symbol 176 MovieClip {com.csharks.marvil.Bubbles_blueBubble} [BlueBubble1]Uses:169 170 171 172 173 175 78Used by:177 487
Symbol 177 MovieClipUses:176 80 83 84Used by:179 383
Symbol 178 GraphicUsed by:179
Symbol 179 MovieClipUses:163 164 59 165 166 167 62 168 177 53 178Used by:202 236 328
Symbol 180 GraphicUsed by:202 236 328
Symbol 181 GraphicUsed by:183
Symbol 182 GraphicUsed by:183 271
Symbol 183 MovieClipUses:181 182Used by:201 317 327
Symbol 184 GraphicUsed by:201
Symbol 185 FontUsed by:186 189 190 191 192 193 194 195 214 216 258 283 339 341 343 344 346 347 349 350
Symbol 186 TextUses:185Used by:201
Symbol 187 GraphicUsed by:201
Symbol 188 GraphicUsed by:201
Symbol 189 TextUses:185Used by:201
Symbol 190 TextUses:185Used by:201
Symbol 191 TextUses:185Used by:201
Symbol 192 TextUses:185Used by:201
Symbol 193 TextUses:185Used by:201
Symbol 194 TextUses:185Used by:201
Symbol 195 TextUses:185Used by:201
Symbol 196 GraphicUsed by:201
Symbol 197 GraphicUsed by:201
Symbol 198 GraphicUsed by:201
Symbol 199 GraphicUsed by:200
Symbol 200 MovieClipUses:199Used by:201
Symbol 201 MovieClipUses:183 184 186 187 188 189 190 191 192 193 194 195 196 197 198 200Used by:202
Symbol 202 MovieClipUses:161 162 179 67 180 201Used by:212
Symbol 203 GraphicUsed by:211
Symbol 204 GraphicUsed by:211
Symbol 205 GraphicUsed by:211
Symbol 206 GraphicUsed by:211
Symbol 207 GraphicUsed by:211
Symbol 208 GraphicUsed by:211
Symbol 209 GraphicUsed by:211
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClipUses:203 204 205 206 207 208 209 210Used by:212 282 383
Symbol 212 MovieClipUses:151 152 153 154 155 158 160 202 211Used by:229
Symbol 213 MovieClipUses:157Used by:215 217 259 284 340 342 345 348 351
Symbol 214 TextUses:185Used by:215
Symbol 215 ButtonUses:213 214 157Used by:229 384
Symbol 216 TextUses:185Used by:217
Symbol 217 ButtonUses:213 216 157Used by:229 384
Symbol 218 FontUsed by:219
Symbol 219 TextUses:218Used by:229
Symbol 220 FontUsed by:221 222 223 224 225 226 227 228
Symbol 221 EditableTextUses:220Used by:229 285
Symbol 222 EditableTextUses:220Used by:229 285
Symbol 223 EditableTextUses:220Used by:229 285
Symbol 224 EditableTextUses:220Used by:229 285
Symbol 225 TextUses:220Used by:229 285
Symbol 226 TextUses:220Used by:229 285
Symbol 227 TextUses:220Used by:229 285
Symbol 228 TextUses:220Used by:229 285
Symbol 229 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin} [GameWin_mc]Uses:212 215 217 219 221 222 223 224 225 226 227 228
Symbol 230 GraphicUsed by:257 338 383
Symbol 231 GraphicUsed by:257 338
Symbol 232 GraphicUsed by:257 338 383
Symbol 233 GraphicUsed by:257
Symbol 234 GraphicUsed by:257
Symbol 235 GraphicUsed by:257
Symbol 236 MovieClipUses:161 162 179 67 180Used by:257 282
Symbol 237 FontUsed by:238
Symbol 238 TextUses:237Used by:257
Symbol 239 GraphicUsed by:251 268 408
Symbol 240 GraphicUsed by:246
Symbol 241 GraphicUsed by:244
Symbol 242 GraphicUsed by:244
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClipUses:241 242 243Used by:246
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClipUses:240 244 245Used by:251
Symbol 247 GraphicUsed by:248
Symbol 248 MovieClipUses:247Used by:250 268
Symbol 249 GraphicUsed by:250 268
Symbol 250 MovieClipUses:248 249Used by:251 408
Symbol 251 MovieClipUses:239 246 250Used by:257 338
Symbol 252 GraphicUsed by:253
Symbol 253 MovieClipUses:252Used by:254 337
Symbol 254 MovieClipUses:253Used by:257
Symbol 255 FontUsed by:256
Symbol 256 TextUses:255Used by:257
Symbol 257 MovieClipUses:151 152 230 231 232 233 234 160 235 236 238 251 254 256Used by:260 261
Symbol 258 TextUses:185Used by:259
Symbol 259 ButtonUses:213 258 157Used by:260 261
Symbol 260 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip} [Help_mc]Uses:257 259
Symbol 261 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay} [HelpDisplay_mc]Uses:257 259
Symbol 262 GraphicUsed by:281
Symbol 263 GraphicUsed by:266 361
Symbol 264 GraphicUsed by:266
Symbol 265 GraphicUsed by:266 361
Symbol 266 MovieClipUses:263 264 265Used by:281
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:267 239 248 249Used by:281 382
Symbol 269 GraphicUsed by:270
Symbol 270 MovieClipUses:269Used by:271 281 382
Symbol 271 MovieClipUses:270 182Used by:281 382
Symbol 272 GraphicUsed by:281 382
Symbol 273 GraphicUsed by:281
Symbol 274 GraphicUsed by:281
Symbol 275 GraphicUsed by:281
Symbol 276 GraphicUsed by:281
Symbol 277 GraphicUsed by:281
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClipUses:278Used by:281
Symbol 280 GraphicUsed by:281
Symbol 281 MovieClipUses:262 266 268 271 270 41 272 273 274 275 276 277 279 280Used by:282
Symbol 282 MovieClipUses:151 152 281 153 236 154 155 158 160 211Used by:285
Symbol 283 TextUses:185Used by:284
Symbol 284 ButtonUses:213 283 157Used by:285
Symbol 285 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp} [LevelUp_mc]Uses:282 284 221 222 223 224 225 226 227 228
Symbol 286 GraphicUsed by:307
Symbol 287 GraphicUsed by:307
Symbol 288 GraphicUsed by:307
Symbol 289 GraphicUsed by:307
Symbol 290 GraphicUsed by:307
Symbol 291 GraphicUsed by:307
Symbol 292 GraphicUsed by:307
Symbol 293 GraphicUsed by:307
Symbol 294 GraphicUsed by:307
Symbol 295 GraphicUsed by:303
Symbol 296 GraphicUsed by:303
Symbol 297 GraphicUsed by:303
Symbol 298 GraphicUsed by:303
Symbol 299 GraphicUsed by:303
Symbol 300 GraphicUsed by:303
Symbol 301 GraphicUsed by:303
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:295 296 297 298 299 300 301 302Used by:307
Symbol 304 GraphicUsed by:307
Symbol 305 GraphicUsed by:307
Symbol 306 GraphicUsed by:307
Symbol 307 MovieClip {IntroCgs_mc} [IntroCgs_mc]Uses:286 287 288 289 290 291 292 293 294 303 304 305 306
Symbol 308 Sound {com.csharks.juwalbose.cFlashtory.cFlashtory_Music} [Music]
Symbol 309 GraphicUsed by:338
Symbol 310 GraphicUsed by:338
Symbol 311 GraphicUsed by:317
Symbol 312 GraphicUsed by:317
Symbol 313 GraphicUsed by:317
Symbol 314 GraphicUsed by:317
Symbol 315 GraphicUsed by:316
Symbol 316 MovieClipUses:315Used by:317
Symbol 317 MovieClipUses:183 311 312 313 314 316Used by:328
Symbol 318 GraphicUsed by:327
Symbol 319 GraphicUsed by:327
Symbol 320 GraphicUsed by:327
Symbol 321 GraphicUsed by:327
Symbol 322 GraphicUsed by:327
Symbol 323 GraphicUsed by:327
Symbol 324 GraphicUsed by:327
Symbol 325 GraphicUsed by:326
Symbol 326 MovieClipUses:325Used by:327
Symbol 327 MovieClipUses:318 183 319 320 321 322 323 324 326Used by:328
Symbol 328 MovieClipUses:161 162 179 67 180 317 327Used by:338
Symbol 329 GraphicUsed by:337
Symbol 330 GraphicUsed by:337
Symbol 331 GraphicUsed by:337
Symbol 332 GraphicUsed by:337
Symbol 333 GraphicUsed by:337
Symbol 334 GraphicUsed by:337
Symbol 335 GraphicUsed by:337
Symbol 336 GraphicUsed by:337
Symbol 337 MovieClipUses:329 330 331 332 333 334 335 336 253Used by:338
Symbol 338 MovieClipUses:151 152 230 231 232 309 160 310 328 251 337Used by:352
Symbol 339 TextUses:185Used by:340
Symbol 340 ButtonUses:213 339 157Used by:352
Symbol 341 TextUses:185Used by:342
Symbol 342 ButtonUses:213 341 157Used by:352
Symbol 343 TextUses:185Used by:345
Symbol 344 TextUses:185Used by:345
Symbol 345 ButtonUses:213 343 344 157Used by:352
Symbol 346 TextUses:185Used by:348
Symbol 347 TextUses:185Used by:348
Symbol 348 MovieClipUses:213 346 347Used by:352
Symbol 349 TextUses:185Used by:351
Symbol 350 TextUses:185Used by:351
Symbol 351 ButtonUses:213 349 350 157Used by:352
Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc]Uses:338 340 342 345 348 351
Symbol 353 GraphicUsed by:383
Symbol 354 BitmapUsed by:355
Symbol 355 GraphicUses:354Used by:383
Symbol 356 GraphicUsed by:382
Symbol 357 GraphicUsed by:360
Symbol 358 GraphicUsed by:360
Symbol 359 GraphicUsed by:360
Symbol 360 MovieClipUses:357 358 359Used by:361
Symbol 361 MovieClipUses:263 360 265Used by:382
Symbol 362 ShapeTweeningUsed by:382
Symbol 363 ShapeTweeningUsed by:382
Symbol 364 ShapeTweeningUsed by:382
Symbol 365 ShapeTweeningUsed by:382
Symbol 366 GraphicUsed by:382
Symbol 367 GraphicUsed by:382
Symbol 368 GraphicUsed by:377
Symbol 369 GraphicUsed by:371
Symbol 370 GraphicUsed by:371
Symbol 371 MovieClipUses:369 370Used by:377
Symbol 372 GraphicUsed by:377
Symbol 373 ShapeTweeningUsed by:376
Symbol 374 ShapeTweeningUsed by:376
Symbol 375 GraphicUsed by:376
Symbol 376 MovieClipUses:373 374 375Used by:377
Symbol 377 MovieClipUses:368 371 372 376Used by:382
Symbol 378 GraphicUsed by:382
Symbol 379 GraphicUsed by:382
Symbol 380 GraphicUsed by:381
Symbol 381 MovieClipUses:380Used by:382
Symbol 382 MovieClipUses:356 361 268 271 270 362 363 272 364 365 366 367 377 378 379 381Used by:383
Symbol 383 MovieClipUses:151 152 230 232 105 353 177 355 382 154 155 158 160 211Used by:384
Symbol 384 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc]Uses:383 215 217
Symbol 385 MovieClipUses:151 152 153 154 155 158 160Used by:386
Symbol 386 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_TemplateBg} [Template]Uses:385
Symbol 387 Sound {Game_Removal} [Removal]
Symbol 388 MovieClip {Game_largeBgClip} [largeBgClip]Uses:139
Symbol 389 Sound {Game_GunSound} [GunSound]
Symbol 390 GraphicUsed by:391
Symbol 391 MovieClip {com.csharks.marvil.Bubbles_flower} [Flower8]Uses:390Used by:392 487
Symbol 392 MovieClip {Game_Ball} [Ball]Uses:391
Symbol 393 GraphicUsed by:394
Symbol 394 MovieClip {Game_timerClip} [timerClip]Uses:393
Symbol 395 GraphicUsed by:396
Symbol 396 MovieClipUses:395Used by:397
Symbol 397 MovieClip {Game_ClickArea} [clickArea]Uses:396
Symbol 398 Sound {Game_levelUpSound} [levelUpSound]
Symbol 399 BitmapUsed by:400
Symbol 400 GraphicUses:399Used by:401
Symbol 401 MovieClip {LogoOIG} [LogoOIG]Uses:400
Symbol 402 Sound {Game_gameOverSound} [gameOverSound]
Symbol 403 Sound {Game_ButtonClick} [ButtonClick]
Symbol 404 Sound {Game_gameWonSound} [gameWonSound]
Symbol 405 GraphicUsed by:406
Symbol 406 MovieClipUses:405Used by:408
Symbol 407 GraphicUsed by:408
Symbol 408 MovieClip {Game_Gun} [gameGun]Uses:406 407 239 250
Symbol 409 GraphicUsed by:427
Symbol 410 BitmapUsed by:411
Symbol 411 GraphicUses:410Used by:427
Symbol 412 FontUsed by:413 414 415 416 417 418 419 420 421 422 423 424 425 426
Symbol 413 TextUses:412Used by:427
Symbol 414 TextUses:412Used by:427
Symbol 415 TextUses:412Used by:427
Symbol 416 TextUses:412Used by:427
Symbol 417 TextUses:412Used by:427
Symbol 418 TextUses:412Used by:427
Symbol 419 TextUses:412Used by:427
Symbol 420 TextUses:412Used by:427
Symbol 421 TextUses:412Used by:427
Symbol 422 TextUses:412Used by:427
Symbol 423 TextUses:412Used by:427
Symbol 424 TextUses:412Used by:427
Symbol 425 TextUses:412Used by:427
Symbol 426 TextUses:412Used by:427
Symbol 427 Button {ShareThis} [ShareThis]Uses:409 411 413 414 415 416 417 418 419 420 421 422 423 424 425 426
Symbol 428 GraphicUsed by:437
Symbol 429 GraphicUsed by:437
Symbol 430 FontUsed by:431 436
Symbol 431 TextUses:430Used by:437
Symbol 432 FontUsed by:433
Symbol 433 TextUses:432Used by:435
Symbol 434 GraphicUsed by:435
Symbol 435 ButtonUses:173 433 434Used by:437
Symbol 436 EditableTextUses:430Used by:437
Symbol 437 MovieClip {Game_TargetBox} [targetBox]Uses:428 429 431 435 436
Symbol 438 BitmapUsed by:439
Symbol 439 GraphicUses:438Used by:440
Symbol 440 MovieClip {LogoCsharks} [LogoCsharks]Uses:439
Symbol 441 MovieClip {com.csharks.juwalbose.utils.ui.SceneManager_ButtonDownClip} [ButtonDownClip]Uses:157
Symbol 442 MovieClip {com.csharks.juwalbose.utils.ui.SceneManager_ButtonUpClip} [ButtonUpClip]Uses:157
Symbol 443 MovieClip {com.csharks.juwalbose.utils.ui.SceneManager_ButtonOverClip} [ButtonOverClip]Uses:157
Symbol 444 GraphicUsed by:451
Symbol 445 GraphicUsed by:451
Symbol 446 GraphicUsed by:450 451
Symbol 447 GraphicUsed by:450 451
Symbol 448 GraphicUsed by:451
Symbol 449 GraphicUsed by:450
Symbol 450 MovieClipUses:143 449 446 447Used by:451
Symbol 451 MovieClip {com.csharks.marvil.Bubbles_orangeBubble} [OrangeBubble5]Uses:444 445 446 447 448 450 144Used by:487
Symbol 452 GraphicUsed by:459
Symbol 453 GraphicUsed by:458 459
Symbol 454 GraphicUsed by:458 459
Symbol 455 GraphicUsed by:459
Symbol 456 GraphicUsed by:459
Symbol 457 GraphicUsed by:458
Symbol 458 MovieClipUses:88 453 454 457Used by:459
Symbol 459 MovieClip {com.csharks.marvil.Bubbles_greenBubble} [GreenBubble2]Uses:452 453 454 455 456 458 89Used by:487
Symbol 460 GraphicUsed by:468
Symbol 461 GraphicUsed by:468
Symbol 462 GraphicUsed by:467 468
Symbol 463 GraphicUsed by:468
Symbol 464 GraphicUsed by:468
Symbol 465 GraphicUsed by:467
Symbol 466 GraphicUsed by:467
Symbol 467 MovieClipUses:141 465 462 466Used by:468
Symbol 468 MovieClip {com.csharks.marvil.MovingBall_violetBubble} [VioletBubble4]Uses:460 461 462 463 464 467 142Used by:487
Symbol 469 GraphicUsed by:477
Symbol 470 GraphicUsed by:477
Symbol 471 GraphicUsed by:477
Symbol 472 GraphicUsed by:476 477
Symbol 473 GraphicUsed by:477
Symbol 474 GraphicUsed by:476
Symbol 475 GraphicUsed by:476
Symbol 476 MovieClipUses:145 474 475 472Used by:477
Symbol 477 MovieClip {com.csharks.marvil.MovingBall_roseBubble} [RoseBubble6]Uses:469 470 471 472 473 476 146Used by:487
Symbol 478 GraphicUsed by:486
Symbol 479 GraphicUsed by:486
Symbol 480 GraphicUsed by:486
Symbol 481 GraphicUsed by:485 486
Symbol 482 GraphicUsed by:486
Symbol 483 GraphicUsed by:485
Symbol 484 GraphicUsed by:485
Symbol 485 MovieClipUses:147 483 484 481Used by:486
Symbol 486 MovieClip {com.csharks.marvil.Bubbles_brownBubble} [BrownBubble7]Uses:478 479 480 481 482 485 148Used by:487
Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass]Uses:176 459 99 468 451 477 486 391
Symbol 488 Sound {com.csharks.marvil.MovingBall_BorderHit} [BorderHit]
Symbol 489 Sound {com.csharks.marvil.MovingBall_Attaching} [Attaching]
Symbol 490 Sound {com.csharks.marvil.MovingBall_maxWallHitsSound} [maxWallHits]

Instance Names

"girl"Symbol 111 MovieClip Frame 1Symbol 105 MovieClip
"clip"Symbol 149 MovieClip Frame 1Symbol 78 MovieClip
"clip"Symbol 149 MovieClip Frame 1Symbol 89 MovieClip
"clip"Symbol 149 MovieClip Frame 1Symbol 86 MovieClip
"clip"Symbol 149 MovieClip Frame 2Symbol 142 MovieClip
"clip"Symbol 149 MovieClip Frame 3Symbol 144 MovieClip
"clip"Symbol 149 MovieClip Frame 4Symbol 146 MovieClip
"clip"Symbol 149 MovieClip Frame 5Symbol 148 MovieClip
"drop"Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 120 MovieClip
"help_Btn"Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 124 Button
"sound_Mc"Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 132 MovieClip
"menu_Btn"Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 135 Button
"colorLevel"Symbol 150 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameClip} [Game_mc] Frame 1Symbol 149 MovieClip
"title"Symbol 202 MovieClip Frame 1Symbol 201 MovieClip
"girl"Symbol 212 MovieClip Frame 1Symbol 202 MovieClip
"flower2"Symbol 212 MovieClip Frame 1Symbol 211 MovieClip
"flower1"Symbol 212 MovieClip Frame 1Symbol 211 MovieClip
"gameWonScene"Symbol 229 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin} [GameWin_mc] Frame 1Symbol 212 MovieClip
"playAgain_Btn"Symbol 229 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameWin} [GameWin_mc] Frame 1Symbol 215 Button
"back_Btn"Symbol 260 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpClip} [Help_mc] Frame 1Symbol 259 Button
"back_Btn"Symbol 261 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_HelpDisplay} [HelpDisplay_mc] Frame 1Symbol 259 Button
"levelUpTitle"Symbol 282 MovieClip Frame 1Symbol 281 MovieClip
"flower"Symbol 282 MovieClip Frame 1Symbol 211 MovieClip
"levelUpScene"Symbol 285 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp} [LevelUp_mc] Frame 1Symbol 282 MovieClip
"ok_Btn"Symbol 285 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_LeveUp} [LevelUp_mc] Frame 1Symbol 284 Button
"bubbleTitle"Symbol 328 MovieClip Frame 1Symbol 317 MovieClip
"shootTitle"Symbol 328 MovieClip Frame 1Symbol 327 MovieClip
"girl"Symbol 338 MovieClip Frame 1Symbol 328 MovieClip
"flower5"Symbol 338 MovieClip Frame 1Symbol 337 MovieClip
"flower4"Symbol 338 MovieClip Frame 1Symbol 337 MovieClip
"flower1"Symbol 338 MovieClip Frame 1Symbol 337 MovieClip
"flower3"Symbol 338 MovieClip Frame 1Symbol 337 MovieClip
"flower2"Symbol 338 MovieClip Frame 1Symbol 337 MovieClip
"menuScene"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 1Symbol 338 MovieClip
"play_Btn"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 29Symbol 340 Button
"help_Btn"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 29Symbol 342 Button
"more_Btn"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 29Symbol 345 Button
"sound_Mc"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 29Symbol 348 MovieClip
"leaderboard_Btn"Symbol 352 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_MenuClip} [Menu_mc] Frame 29Symbol 351 Button
"boy"Symbol 383 MovieClip Frame 1Symbol 382 MovieClip
"flower2"Symbol 383 MovieClip Frame 1Symbol 211 MovieClip
"flower1"Symbol 383 MovieClip Frame 1Symbol 211 MovieClip
"gameOverScene"Symbol 384 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc] Frame 1Symbol 383 MovieClip
"playAgain_Btn"Symbol 384 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc] Frame 1Symbol 215 Button
"submitScore_Btn"Symbol 384 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_GameOver} [GameOver_mc] Frame 1Symbol 217 Button
"gameWonScene"Symbol 386 MovieClip {com.csharks.juwalbose.cFlashtory.cFlashtory_TemplateBg} [Template] Frame 1Symbol 385 MovieClip
"clip"Symbol 392 MovieClip {Game_Ball} [Ball] Frame 1Symbol 391 MovieClip {com.csharks.marvil.Bubbles_flower} [Flower8]
"clickArea"Symbol 397 MovieClip {Game_ClickArea} [clickArea] Frame 1Symbol 396 MovieClip
"effect"Symbol 408 MovieClip {Game_Gun} [gameGun] Frame 1Symbol 406 MovieClip
"gunClip"Symbol 408 MovieClip {Game_Gun} [gameGun] Frame 1Symbol 250 MovieClip
"ok_Btn"Symbol 437 MovieClip {Game_TargetBox} [targetBox] Frame 1Symbol 435 Button
"targetScore_txt"Symbol 437 MovieClip {Game_TargetBox} [targetBox] Frame 1Symbol 436 EditableText
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 1Symbol 176 MovieClip {com.csharks.marvil.Bubbles_blueBubble} [BlueBubble1]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 2Symbol 459 MovieClip {com.csharks.marvil.Bubbles_greenBubble} [GreenBubble2]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 3Symbol 99 MovieClip {com.csharks.marvil.MovingBall_redBubble} [RedBubble3]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 4Symbol 468 MovieClip {com.csharks.marvil.MovingBall_violetBubble} [VioletBubble4]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 5Symbol 451 MovieClip {com.csharks.marvil.Bubbles_orangeBubble} [OrangeBubble5]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 6Symbol 477 MovieClip {com.csharks.marvil.MovingBall_roseBubble} [RoseBubble6]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 7Symbol 486 MovieClip {com.csharks.marvil.Bubbles_brownBubble} [BrownBubble7]
"clip"Symbol 487 MovieClip {com.csharks.marvil.MovingBall_bubbles} [bubblesClass] Frame 8Symbol 391 MovieClip {com.csharks.marvil.Bubbles_flower} [Flower8]

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1462 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 2Symbol 28 as "IntroOIG_mc"
ExportAssets (56)Timeline Frame 2Symbol 150 as "Game_mc"
ExportAssets (56)Timeline Frame 2Symbol 229 as "GameWin_mc"
ExportAssets (56)Timeline Frame 2Symbol 260 as "Help_mc"
ExportAssets (56)Timeline Frame 2Symbol 261 as "HelpDisplay_mc"
ExportAssets (56)Timeline Frame 2Symbol 285 as "LevelUp_mc"
ExportAssets (56)Timeline Frame 2Symbol 307 as "IntroCgs_mc"
ExportAssets (56)Timeline Frame 2Symbol 308 as "Music"
ExportAssets (56)Timeline Frame 2Symbol 352 as "Menu_mc"
ExportAssets (56)Timeline Frame 2Symbol 384 as "GameOver_mc"
ExportAssets (56)Timeline Frame 2Symbol 386 as "Template"
ExportAssets (56)Timeline Frame 2Symbol 387 as "Removal"
ExportAssets (56)Timeline Frame 2Symbol 388 as "largeBgClip"
ExportAssets (56)Timeline Frame 2Symbol 389 as "GunSound"
ExportAssets (56)Timeline Frame 2Symbol 392 as "Ball"
ExportAssets (56)Timeline Frame 2Symbol 394 as "timerClip"
ExportAssets (56)Timeline Frame 2Symbol 397 as "clickArea"
ExportAssets (56)Timeline Frame 2Symbol 398 as "levelUpSound"
ExportAssets (56)Timeline Frame 2Symbol 401 as "LogoOIG"
ExportAssets (56)Timeline Frame 2Symbol 402 as "gameOverSound"
ExportAssets (56)Timeline Frame 2Symbol 403 as "ButtonClick"
ExportAssets (56)Timeline Frame 2Symbol 404 as "gameWonSound"
ExportAssets (56)Timeline Frame 2Symbol 408 as "gameGun"
ExportAssets (56)Timeline Frame 2Symbol 427 as "ShareThis"
ExportAssets (56)Timeline Frame 2Symbol 437 as "targetBox"
ExportAssets (56)Timeline Frame 2Symbol 140 as "BgClip"
ExportAssets (56)Timeline Frame 2Symbol 440 as "LogoCsharks"
ExportAssets (56)Timeline Frame 2Symbol 441 as "ButtonDownClip"
ExportAssets (56)Timeline Frame 2Symbol 442 as "ButtonUpClip"
ExportAssets (56)Timeline Frame 2Symbol 443 as "ButtonOverClip"
ExportAssets (56)Timeline Frame 2Symbol 451 as "OrangeBubble5"
ExportAssets (56)Timeline Frame 2Symbol 487 as "bubblesClass"
ExportAssets (56)Timeline Frame 2Symbol 391 as "Flower8"
ExportAssets (56)Timeline Frame 2Symbol 486 as "BrownBubble7"
ExportAssets (56)Timeline Frame 2Symbol 99 as "RedBubble3"
ExportAssets (56)Timeline Frame 2Symbol 488 as "BorderHit"
ExportAssets (56)Timeline Frame 2Symbol 489 as "Attaching"
ExportAssets (56)Timeline Frame 2Symbol 468 as "VioletBubble4"
ExportAssets (56)Timeline Frame 2Symbol 490 as "maxWallHits"
ExportAssets (56)Timeline Frame 2Symbol 477 as "RoseBubble6"
ExportAssets (56)Timeline Frame 2Symbol 176 as "BlueBubble1"
ExportAssets (56)Timeline Frame 2Symbol 459 as "GreenBubble2"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$hZ$Dsl6PatMDxTD9aFEKlN101."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"com_csharks_juwalbose_cFlashtory_preloaders_PreloaderMochi"Frame 1
"Game"Frame 2

Dynamic Text Variables

levelSymbol 221 EditableText""
scoreSymbol 222 EditableText""
lifeSymbol 223 EditableText""
timerSymbol 224 EditableText""




http://swfchan.com/27/131945/info.shtml
Created: 20/2 -2019 19:53:43 Last modified: 20/2 -2019 19:53:43 Server time: 22/12 -2024 09:53:50