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/76810645?noj=FRM76810645-22DC" width="1" height="1"></div>

QrossFire - match with three or more blocks of the same color.swf

This is the info page for
Flash #90600

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


Text
qrossfire

is loading...

<p align="left"><font face="Bebas" size="18" color="#ffffff" letterSpacing="0.000000" kerning="1">60</font></p>

BOMB BLITZ

QROSSFIRE

Bowler Hat Games Presents

<p align="left"><font face="Bebas" size="18" color="#ffffff" letterSpacing="0.500000" kerning="1">score: 9999999</font></p>

<p align="center"><font face="Bebas" size="18" color="#ffffff" letterSpacing="0.500000" kerning="1">level 1</font></p>

<p align="center"><font face="Bebas" size="36" color="#ffffff" letterSpacing="0.500000" kerning="1">game over!</font></p>

<p align="center"><font face="Bebas" size="36" color="#ffffff" letterSpacing="0.500000" kerning="1">game Paused</font></p>

QROSSFIRE

CREATED BY BOWLER HAT GAMES

music

Sound Fx

Help Screen

Difficulty

Settings

<p align="left"><font face="Bebas" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">flame powerup </font></p>

<p align="left"><font face="Bebas" size="12" color="#ffffff" letterSpacing="0.500000" kerning="1">match five in a row to create. <sbr />match the <font color="#00ff00">flame</font> with two or <sbr />more blocks for big points!</font></p>

<p align="left"><font face="Bebas" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">skull powerup</font></p>

<p align="left"><font face="Bebas" size="12" color="#ffffff" letterSpacing="0.500000" kerning="1">destroy three or more bombs in <sbr />a cascade, then use the <font color="#00ff00">skull<font color="#ff9900"> </font></font>to <sbr />start an explosive <font color="#00ff00">bomb blitz</font>.</font></p>

<p align="left"><font face="Bebas" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">bomb powerup </font></p>

<p align="left"><font face="Bebas" size="12" color="#ffffff" letterSpacing="0.500000" kerning="1">match four in a row to create a <font color="#00ff00">bomb</font>. bombs explode when matched with the same <sbr />color, and they destroy all neighboring blocks.</font></p>

<p align="left"><font face="Bebas" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">basics </font></p>

<p align="left"><font face="Bebas" size="12" color="#00ff00" letterSpacing="0.500000" kerning="1">match three or more<font color="#ffcc00"> <font color="#ffffff">blocks in a row to <sbr />clear them from the board, to earn points, <sbr />and to add more time to the game.</font></font></font></p>

click a block to select it, and then click
another block to slide to a match.

watch the timer at the bottom. when
time runs out, the game is over!

how to play

<p align="center"><font face="Bebas" size="21" color="#ffffff" letterSpacing="0.500000" kerning="1">loading scores</font></p>

High Scores

Back to Menu

<p align="left"><font face="Bebas" size="20" color="#ffffff" letterSpacing="0.500000" kerning="1">1. name</font></p>

<p align="right"><font face="Bebas" size="20" color="#ffffff" letterSpacing="0.500000" kerning="1">9999999999</font></p>

<p align="center"><font face="Bebas" size="16" color="#ffffff" letterSpacing="0.500000" kerning="1">qrossfire will continue in 5 seconds... one moment</font></p>

ActionScript [AS3]

Section 1
//GameRoot (com.bowlerhatgames.display.GameRoot) package com.bowlerhatgames.display { import flash.display.*; import flash.events.*; import flash.net.*; import net.hires.debug.*; import flash.ui.*; public class GameRoot extends Sprite { private var _stats:Stats; public function GameRoot(){ this.createContextMenuItems(); this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler, false, 10000); } protected function playMoreItemSelectHandler(_arg1:ContextMenuEvent):void{ navigateToURL(new URLRequest("http://bowlerhatgames.com/"), "_blank"); } private function removedFromStageHandler(_arg1:Event):void{ if (this._stats){ this.stage.removeChild(this._stats); this._stats = null; }; if (this.loaderInfo.parentAllowsChild){ this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.createDebugDashboard(); this.addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if ((((((Keyboard.UP == _arg1.keyCode)) && (_arg1.altKey))) && (_arg1.ctrlKey))){ if (this._stats){ this._stats.visible = !(this._stats.visible); }; }; } protected function createdByItemSelectHandler(_arg1:ContextMenuEvent):void{ navigateToURL(new URLRequest("http://bowlerhatgames.com/"), "_blank"); } protected function createDebugDashboard():void{ if (!this.loaderInfo.parentAllowsChild){ return; }; this._stats = new Stats(); this._stats.visible = false; this.stage.addChildAt(this._stats, 1); this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, false, 0, true); } protected function createContextMenuItems():void{ var _local1:ContextMenu = new ContextMenu(); _local1.hideBuiltInItems(); var _local2:ContextMenuItem = new ContextMenuItem("Play More Games!", true); _local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, playMoreItemSelectHandler); var _local3:ContextMenuItem = new ContextMenuItem("Created by Bowler Hat Games"); _local3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, createdByItemSelectHandler); _local1.customItems = [_local2, _local3]; this.contextMenu = _local1; } } }//package com.bowlerhatgames.display
Section 2
//ScreenNavigator (com.bowlerhatgames.display.ScreenNavigator) package com.bowlerhatgames.display { import flash.display.*; import flash.events.*; import gs.*; import gs.events.*; import flash.errors.*; public class ScreenNavigator extends Sprite { private var _screenEvents:Object; private var _screenFadeIn:TweenMax; private var _screens:Object; private var _activeScreen:DisplayObject; public var defaultScreenID:String; private var _activeScreenID:String; public function ScreenNavigator(){ _screens = {}; _screenEvents = {}; super(); } private function clearScreenHandler(_arg1:TweenEvent):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); var _local3:TweenMax = TweenMax(_arg1.currentTarget); var _local4:DisplayObject = DisplayObject(_local3.target); this.removeChild(_local4); } public function removeScreen(_arg1:String):void{ if (!this._screens.hasOwnProperty(_arg1)){ throw (new IllegalOperationError((("Screen '" + _arg1) + "' cannot be removed because it has not been added."))); }; delete this._screens[_arg1]; } private function screenFadeInComplete():void{ this._screenFadeIn = null; } public function showScreen(_arg1:String):void{ var _local5:String; var _local6:Object; var _local7:Function; if (!this._screens.hasOwnProperty(_arg1)){ throw (new IllegalOperationError((("Screen with id '" + _arg1) + "' cannot be shown because it has not been defined."))); }; if (this._screenFadeIn){ TweenMax.removeTween(this._screenFadeIn); this._screenFadeIn = null; }; if (this._activeScreen){ this.clearScreen(); }; var _local2:ScreenNavigatorItem = ScreenNavigatorItem(this._screens[_arg1]); this._activeScreen = _local2.getScreen(); this._activeScreenID = _arg1; this._activeScreen.alpha = 0; var _local3:Object = _local2.events; var _local4:Object = {}; for (_local5 in _local3) { _local6 = _local3[_local5]; if ((_local6 is Function)){ this._activeScreen.addEventListener(_local5, (_local6 as Function)); } else { if ((_local6 is String)){ _local7 = this.createScreenListener((_local6 as String)); this._activeScreen.addEventListener(_local5, _local7); _local4[_local5] = _local7; } else { throw (new TypeError("Unknown event action defined for screen:", _local6.toString())); }; }; }; this._screenEvents[_arg1] = _local4; this._screenFadeIn = TweenMax.to(this._activeScreen, 0.15, {alpha:1, onComplete:screenFadeInComplete}); this.addChild(this._activeScreen); this.dispatchEvent(new Event(Event.CHANGE)); } public function get activeScreenID():String{ return (this._activeScreenID); } public function get activeScreen():DisplayObject{ return (this._activeScreen); } public function addScreen(_arg1:String, _arg2:ScreenNavigatorItem):void{ if (this._screens.hasOwnProperty(_arg1)){ throw (new IllegalOperationError((("Screen with id '" + _arg1) + "' already defined. Cannot add two screens with the same id."))); }; if (!this.defaultScreenID){ this.defaultScreenID = _arg1; }; this._screens[_arg1] = _arg2; } public function showDefaultScreen():void{ if (!this.defaultScreenID){ throw (new IllegalOperationError("Cannot show default screen because the default screen ID has not been defined.")); }; this.showScreen(this.defaultScreenID); } public function clearScreen():void{ var _local4:String; var _local5:TweenMax; var _local6:Object; var _local7:Function; if (!this._activeScreen){ return; }; var _local1:ScreenNavigatorItem = ScreenNavigatorItem(this._screens[this._activeScreenID]); var _local2:Object = _local1.events; var _local3:Object = this._screenEvents[this._activeScreenID]; for (_local4 in _local2) { _local6 = _local2[_local4]; if ((_local6 is Function)){ this._activeScreen.removeEventListener(_local4, (_local6 as Function)); } else { if ((_local6 is String)){ _local7 = (_local3[_local4] as Function); this._activeScreen.removeEventListener(_local4, _local7); }; }; }; _local5 = TweenMax.to(this._activeScreen, 0.15, {alpha:0}); _local5.addEventListener(TweenEvent.COMPLETE, clearScreenHandler); this._activeScreen = null; this._activeScreenID = null; } private function createScreenListener(_arg1:String):Function{ var screenID = _arg1; var eventListener:Function = function (_arg1:Event):void{ showScreen(screenID); }; return (eventListener); } } }//package com.bowlerhatgames.display
Section 3
//ScreenNavigatorItem (com.bowlerhatgames.display.ScreenNavigatorItem) package com.bowlerhatgames.display { import flash.display.*; import flash.errors.*; public class ScreenNavigatorItem { public var initializer:Object; public var events:Object; public var screen:Object; public function ScreenNavigatorItem(_arg1:Object, _arg2:Object=null, _arg3:Object=null){ this.screen = _arg1; this.events = (_arg2) ? _arg2 : {}; this.initializer = (_arg3) ? _arg3 : {}; } function getScreen():DisplayObject{ var _local1:DisplayObject; var _local2:String; var _local3:Class; if ((this.screen is Class)){ _local3 = Class(this.screen); _local1 = new (_local3); } else { if ((this.screen is DisplayObject)){ _local1 = DisplayObject(this.screen); } else { throw (new IllegalOperationError("ScreenNavigatorItem \"screen\" must be a Class or a display object.")); }; }; for (_local2 in this.initializer) { _local1[_local2] = this.initializer[_local2]; }; return (_local1); } } }//package com.bowlerhatgames.display
Section 4
//TextBurst (com.bowlerhatgames.display.TextBurst) package com.bowlerhatgames.display { import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import gs.easing.*; import flash.text.*; public class TextBurst extends Sprite { private var _ease:Function; private var _text:String;// = "undefined" private var _duration:Number;// = 0.5 private var _tween:TweenMax; public var textField:TextField; public function TextBurst(){ _ease = Quad.easeOut; super(); this.textField = new TextField(); this.textField.gridFitType = GridFitType.NONE; this.textField.selectable = false; this.textField.autoSize = TextFieldAutoSize.LEFT; this.textField.defaultTextFormat = new TextFormat("_sans", 16, 0xFFFFFF, true); this.textField.filters = [new DropShadowFilter(0, 0, 0, 0)]; this.addChild(this.textField); this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } private function effectCompleteHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); if (this.parent){ this.parent.removeChild(this); }; this._tween = null; this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } public function set ease(_arg1:Function):void{ this._ease = _arg1; if (this._tween){ this._tween.ease = this._ease; }; } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.visible = true; this.alpha = 1; this.scaleX = 1; this.scaleY = 1; this._tween = new TweenMax(this, this._duration, {autoAlpha:0, scaleX:2, scaleY:2}); this._tween.ease = this._ease; this._tween.addEventListener(Event.COMPLETE, effectCompleteHandler); } public function set duration(_arg1:Number):void{ this._duration = _arg1; if (this._tween){ this._tween.duration = _arg1; }; } public function refresh():void{ this.textField.x = (-(this.textField.width) / 2); this.textField.y = (-(this.textField.height) / 2); } public function get text():String{ return (this._text); } public function get ease():Function{ return (this._ease); } public function get duration():Number{ return (this._duration); } public function set text(_arg1:String):void{ this._text = _arg1; this.textField.text = _arg1; this.refresh(); } public static function create(_arg1:String, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number):TextBurst{ var _local5:TextBurst = new (TextBurst); _local5.text = _arg1; _local5.x = _arg3; _local5.y = _arg4; _arg2.addChild(_local5); return (_local5); } } }//package com.bowlerhatgames.display
Section 5
//ColorFlash (com.bowlerhatgames.effects.gs.ColorFlash) package com.bowlerhatgames.effects.gs { import gs.*; import gs.plugins.*; import org.josht.utils.*; public class ColorFlash extends TweenMax { public function ColorFlash(_arg1:Object, _arg2:uint=0xFFFFFF, _arg3:Number=1, _arg4:int=1, _arg5:Number=0.05){ _arg3 = Math.max(Math.min(_arg3, 1), 0); var _local6:Number = (1 - _arg3); var _local7:uint = (ColorUtil.red(_arg2) * _arg3); var _local8:uint = (ColorUtil.green(_arg2) * _arg3); var _local9:uint = (ColorUtil.blue(_arg2) * _arg3); super(_arg1, _arg5, {colorTransform:{redMultiplier:_local6, greenMultiplier:_local6, blueMultiplier:_local6, redOffset:_local7, greenOffset:_local8, blueOffset:_local9}, repeat:((_arg4 * 2) - 1), yoyo:true}); } TweenPlugin.activate([ColorTransformPlugin]); } }//package com.bowlerhatgames.effects.gs
Section 6
//BombExplodeSound (com.bowlerhatgames.qrossfire.assets.audio.BombExplodeSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class BombExplodeSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 7
//ButtonClickSound (com.bowlerhatgames.qrossfire.assets.audio.ButtonClickSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class ButtonClickSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 8
//DeselectNodeSound (com.bowlerhatgames.qrossfire.assets.audio.DeselectNodeSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class DeselectNodeSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 9
//FlamePowerUpSound (com.bowlerhatgames.qrossfire.assets.audio.FlamePowerUpSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class FlamePowerUpSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 10
//LevelUpSound (com.bowlerhatgames.qrossfire.assets.audio.LevelUpSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class LevelUpSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 11
//MatchSound (com.bowlerhatgames.qrossfire.assets.audio.MatchSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class MatchSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 12
//MenuBackgroundMusic (com.bowlerhatgames.qrossfire.assets.audio.MenuBackgroundMusic) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class MenuBackgroundMusic extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 13
//SelectNodeSound (com.bowlerhatgames.qrossfire.assets.audio.SelectNodeSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class SelectNodeSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 14
//SlideReverseSound (com.bowlerhatgames.qrossfire.assets.audio.SlideReverseSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class SlideReverseSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 15
//SlideSound (com.bowlerhatgames.qrossfire.assets.audio.SlideSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class SlideSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 16
//TimerWarningSound (com.bowlerhatgames.qrossfire.assets.audio.TimerWarningSound) package com.bowlerhatgames.qrossfire.assets.audio { import mx.core.*; public class TimerWarningSound extends SoundAsset { } }//package com.bowlerhatgames.qrossfire.assets.audio
Section 17
//EndLevelDialog (com.bowlerhatgames.qrossfire.controls.EndLevelDialog) package com.bowlerhatgames.qrossfire.controls { import fl.controls.*; import flash.display.*; import flash.events.*; import fl.events.*; import mochi.as3.*; import flash.text.*; public class EndLevelDialog extends Sprite { public var moreGamesButton:Button; private var _message:String;// = "game over!" public var submitScoreButton:Button; public var messageField:TextField; public var playAgainButton:Button; public static const OPTION_MORE_GAMES:String = "moreGames"; public static const OPTION_SUBMIT_SCORE:String = "submitScore"; public static const OPTION_PLAY_AGAIN:String = "playAgain"; public function EndLevelDialog(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); __setProp_moreGamesButton_EndLevelDialog_uicontrols_0(); __setProp_submitScoreButton_EndLevelDialog_uicontrols_0(); __setProp_playAgainButton_EndLevelDialog_uicontrols_0(); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ this.submitScoreButton.enabled = MochiServices.connected; }; } public function get message():String{ return (this._message); } private function moreGamesButtonDownHandler(_arg1:ComponentEvent):void{ this.dispatchEvent(new Event(OPTION_MORE_GAMES)); } private function submitScoreButtonDownHandler(_arg1:ComponentEvent):void{ this.dispatchEvent(new Event(OPTION_SUBMIT_SCORE)); } public function set message(_arg1:String):void{ this._message = _arg1; this.messageField.text = this._message; } private function playAgainButtonDownHandler(_arg1:ComponentEvent):void{ this.dispatchEvent(new Event(OPTION_PLAY_AGAIN)); } function __setProp_submitScoreButton_EndLevelDialog_uicontrols_0(){ try { submitScoreButton["componentInspectorSetting"] = true; } catch(e:Error) { }; submitScoreButton.emphasized = false; submitScoreButton.enabled = true; submitScoreButton.label = "submit high score"; submitScoreButton.labelPlacement = "right"; submitScoreButton.selected = false; submitScoreButton.toggle = false; submitScoreButton.visible = true; try { submitScoreButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_moreGamesButton_EndLevelDialog_uicontrols_0(){ try { moreGamesButton["componentInspectorSetting"] = true; } catch(e:Error) { }; moreGamesButton.emphasized = false; moreGamesButton.enabled = true; moreGamesButton.label = "more games"; moreGamesButton.labelPlacement = "right"; moreGamesButton.selected = false; moreGamesButton.toggle = false; moreGamesButton.visible = true; try { moreGamesButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function addedToStageHandler(_arg1:Event):void{ var _local4:Button; _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); var _local3:Array = [this.moreGamesButton, this.submitScoreButton, this.playAgainButton]; for each (_local4 in _local3) { _local4.buttonMode = true; _local4.useHandCursor = true; _local4.setStyle("embedFonts", true); _local4.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); _local4.setStyle("disabledTextFormat", new TextFormat("Bebas", 18, 0x999999)); _local4.setStyle("upSkin", "flash.display.Shape"); _local4.setStyle("overSkin", "flash.display.Shape"); _local4.setStyle("downSkin", "flash.display.Shape"); _local4.setStyle("disabledSkin", "flash.display.Shape"); }; this.moreGamesButton.addEventListener(ComponentEvent.BUTTON_DOWN, moreGamesButtonDownHandler); this.submitScoreButton.addEventListener(ComponentEvent.BUTTON_DOWN, submitScoreButtonDownHandler); this.playAgainButton.addEventListener(ComponentEvent.BUTTON_DOWN, playAgainButtonDownHandler); } function __setProp_playAgainButton_EndLevelDialog_uicontrols_0(){ try { playAgainButton["componentInspectorSetting"] = true; } catch(e:Error) { }; playAgainButton.emphasized = false; playAgainButton.enabled = true; playAgainButton.label = "play again?"; playAgainButton.labelPlacement = "right"; playAgainButton.selected = false; playAgainButton.toggle = false; playAgainButton.visible = true; try { playAgainButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package com.bowlerhatgames.qrossfire.controls
Section 18
//PauseDialog (com.bowlerhatgames.qrossfire.controls.PauseDialog) package com.bowlerhatgames.qrossfire.controls { import fl.controls.*; import flash.display.*; import flash.events.*; import fl.events.*; import flash.text.*; public class PauseDialog extends Sprite { public var messageField:TextField; public var moreGamesButton:Button; public var resumeButton:Button; public static const OPTION_MORE_GAMES:String = "moreGames"; public static const OPTION_RESUME:String = "resume"; public function PauseDialog(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); __setProp_moreGamesButton_PauseDialog_uicontrols_0(); __setProp_resumeButton_PauseDialog_uicontrols_0(); } private function moreGamesButtonDownHandler(_arg1:ComponentEvent):void{ this.dispatchEvent(new Event(OPTION_MORE_GAMES)); } function __setProp_resumeButton_PauseDialog_uicontrols_0(){ try { resumeButton["componentInspectorSetting"] = true; } catch(e:Error) { }; resumeButton.emphasized = false; resumeButton.enabled = true; resumeButton.label = "resume game"; resumeButton.labelPlacement = "right"; resumeButton.selected = false; resumeButton.toggle = false; resumeButton.visible = true; try { resumeButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_moreGamesButton_PauseDialog_uicontrols_0(){ try { moreGamesButton["componentInspectorSetting"] = true; } catch(e:Error) { }; moreGamesButton.emphasized = false; moreGamesButton.enabled = true; moreGamesButton.label = "more games"; moreGamesButton.labelPlacement = "right"; moreGamesButton.selected = false; moreGamesButton.toggle = false; moreGamesButton.visible = true; try { moreGamesButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function addedToStageHandler(_arg1:Event):void{ var _local4:Button; _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); var _local3:Array = [this.moreGamesButton, this.resumeButton]; for each (_local4 in _local3) { _local4.buttonMode = true; _local4.useHandCursor = true; _local4.setStyle("embedFonts", true); _local4.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); _local4.setStyle("upSkin", "flash.display.Shape"); _local4.setStyle("overSkin", "flash.display.Shape"); _local4.setStyle("downSkin", "flash.display.Shape"); _local4.setStyle("disabledSkin", "flash.display.Shape"); }; this.moreGamesButton.addEventListener(ComponentEvent.BUTTON_DOWN, moreGamesButtonDownHandler); this.resumeButton.addEventListener(ComponentEvent.BUTTON_DOWN, resumeButtonDownHandler); } private function resumeButtonDownHandler(_arg1:ComponentEvent):void{ this.dispatchEvent(new Event(OPTION_RESUME)); } } }//package com.bowlerhatgames.qrossfire.controls
Section 19
//PieTimer (com.bowlerhatgames.qrossfire.controls.PieTimer) package com.bowlerhatgames.qrossfire.controls { import flash.display.*; import flash.events.*; import org.josht.display.*; import flash.utils.*; import org.josht.utils.*; import flash.text.*; public class PieTimer extends InvalidatingSprite { public var digitalField:TextField; public var base:Sprite; public var warning:Boolean;// = false private var _lastUpdate:int; private var _active:Boolean;// = false private var _value:Number;// = 1 public var warningValue:Number;// = 0.15 private var _duration:int;// = 60000 public static const WARNING_CHANGE:String = "warningChange"; public function PieTimer(){ this.digitalField.visible = false; this._lastUpdate = getTimer(); } override protected function draw():void{ this.base.graphics.clear(); this.base.graphics.beginFill(0x990000); GraphicsUtil.drawWedge(this.base.graphics, (this.base.width / 2), (this.base.width / 2), 0, (this.value * 360), (this.base.width / 2)); this.base.graphics.endFill(); this.digitalField.text = Math.ceil(((this.value * this.duration) / 1000)).toString(); } public function reset():void{ this.pause(); if (this.warning){ this.warning = false; this.dispatchEvent(new Event(PieTimer.WARNING_CHANGE)); }; this.value = 1; } public function get duration():int{ return (this._duration); } private function enterFrameHandler(_arg1:Event):void{ var _local2:int = getTimer(); var _local3:int = (_local2 - this._lastUpdate); this.value = (this.value - (_local3 / this._duration)); this._lastUpdate = _local2; if (((!(this.warning)) && ((this._value < this.warningValue)))){ this.warning = true; this.dispatchEvent(new Event(WARNING_CHANGE)); } else { if (((this.warning) && ((this._value > this.warningValue)))){ this.warning = false; this.dispatchEvent(new Event(WARNING_CHANGE)); }; }; if (this.value == 0){ this.pause(); this.dispatchEvent(new Event(Event.COMPLETE)); }; } public function start():void{ if (this._active){ return; }; this._active = true; this._lastUpdate = getTimer(); this.addEventListener(Event.ENTER_FRAME, enterFrameHandler); } public function set duration(_arg1:int):void{ this._duration = _arg1; } public function set value(_arg1:Number):void{ this._value = MathUtil.clamp(_arg1, 0, 1); this.invalidate(); } public function get value():Number{ return (this._value); } public function pause():void{ if (!this._active){ return; }; this._active = false; this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package com.bowlerhatgames.qrossfire.controls
Section 20
//GameModeEvent (com.bowlerhatgames.qrossfire.events.GameModeEvent) package com.bowlerhatgames.qrossfire.events { import flash.events.*; public class GameModeEvent extends Event { public static const GAME_MODE_CHANGE:String = "gameModeChange"; public function GameModeEvent(_arg1:String){ super(_arg1, false, false); } override public function clone():Event{ return (new GameModeEvent(this.type)); } } }//package com.bowlerhatgames.qrossfire.events
Section 21
//GameOverEvent (com.bowlerhatgames.qrossfire.events.GameOverEvent) package com.bowlerhatgames.qrossfire.events { import flash.events.*; public class GameOverEvent extends Event { public var message:String; public static const GAME_OVER:String = "gameOver"; public function GameOverEvent(_arg1:String, _arg2:String){ super(_arg1, false, false); this.message = _arg2; } override public function clone():Event{ return (new GameOverEvent(this.type, this.message)); } } }//package com.bowlerhatgames.qrossfire.events
Section 22
//MatchEvent (com.bowlerhatgames.qrossfire.events.MatchEvent) package com.bowlerhatgames.qrossfire.events { import flash.events.*; import com.bowlerhatgames.qrossfire.*; public class MatchEvent extends Event { public var data:MatchData; public static const MATCH:String = "match"; public function MatchEvent(_arg1:String, _arg2:MatchData){ super(_arg1, false, false); this.data = _arg2; } override public function clone():Event{ return (new MatchEvent(this.type, this.data)); } } }//package com.bowlerhatgames.qrossfire.events
Section 23
//BombNode (com.bowlerhatgames.qrossfire.nodes.BombNode) package com.bowlerhatgames.qrossfire.nodes { import flash.display.*; import flash.events.*; import gs.*; public class BombNode extends Node { public var detonated:Boolean;// = false public var light:Sprite; private var _tween:TweenMax; public function BombNode(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this._tween = TweenMax.to(this.light, 1, {alpha:0, repeat:-1, yoyo:true}); this.addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler); } private function removedFromStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); TweenMax.removeTween(this._tween); this._tween = null; } } }//package com.bowlerhatgames.qrossfire.nodes
Section 24
//Node (com.bowlerhatgames.qrossfire.nodes.Node) package com.bowlerhatgames.qrossfire.nodes { import gs.*; import org.josht.display.*; import flash.utils.*; public class Node extends InvalidatingSprite { private var _enabled:Boolean;// = true protected var brightnessChanged:Boolean;// = false public var matched:Boolean;// = false public var colorName:String; private var _highlighted:Boolean;// = false private var _brightnessTween:TweenLite; public function Node(){ this.tabEnabled = (this.tabChildren = false); var _local1:String = getQualifiedClassName(this); this.colorName = _local1.substr((_local1.indexOf(":") + 5)); this.buttonMode = true; } public function get enabled():Boolean{ return (this._enabled); } private function clearBrightnessTween():void{ this._brightnessTween = null; } public function set enabled(_arg1:Boolean):void{ this._enabled = _arg1; this.brightnessChanged = true; this.invalidate(); } override public function toString():String{ return ((((("[object " + getQualifiedClassName(this)) + " ") + this.name) + "]")); } public function set highlighted(_arg1:Boolean):void{ this._highlighted = _arg1; this.brightnessChanged = true; this.invalidate(); } override protected function draw():void{ var _local1:Number; if (this.brightnessChanged){ if (this._brightnessTween){ TweenLite.removeTween(this._brightnessTween); }; _local1 = (this.enabled) ? (this.highlighted) ? 1.5 : 1 : (this.highlighted) ? 1 : 0.5; this._brightnessTween = TweenMax.to(this, 0.2, {colorTransform:{brightness:_local1}, onComplete:clearBrightnessTween}); this.buttonMode = (this.mouseEnabled = (this.mouseChildren = this._enabled)); this.brightnessChanged = false; }; } public function get highlighted():Boolean{ return (this._highlighted); } } }//package com.bowlerhatgames.qrossfire.nodes
Section 25
//PowerUpNode (com.bowlerhatgames.qrossfire.nodes.PowerUpNode) package com.bowlerhatgames.qrossfire.nodes { public class PowerUpNode extends Node { public var type:String; public static const TYPE_SKULL:String = "Skull"; public static const TYPE_FIRE:String = "Fire"; } }//package com.bowlerhatgames.qrossfire.nodes
Section 26
//AdvertisementScreen (com.bowlerhatgames.qrossfire.screens.AdvertisementScreen) package com.bowlerhatgames.qrossfire.screens { import flash.display.*; import flash.events.*; import gs.*; import mochi.as3.*; import flash.utils.*; import flash.text.*; public class AdvertisementScreen extends Sprite { public var timerField:TextField; private var _timer:Timer; private var _mochiContainer:MovieClip; public function AdvertisementScreen(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } private function timer_completeHandler(_arg1:TimerEvent):void{ this.timerField.text = "qrossfire will continue in 0 seconds..."; this.dispatchEvent(new Event(Event.COMPLETE)); } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.timerField.text = "one moment"; this._mochiContainer = new MovieClip(); this._mochiContainer.alpha = 0; this._mochiContainer.visible = false; this.addChild(this._mochiContainer); var _local3:Object = {id:"20c08cf2db70379b", clip:this._mochiContainer, ad_loaded:mochiAd_loaded, ad_skipped:mochiAd_skippedOrFailed, ad_failed:mochiAd_skippedOrFailed}; MochiAd.showClickAwayAd(_local3); } private function timer_updateHandler(_arg1:TimerEvent):void{ var _local2:int = (this._timer.repeatCount - this._timer.currentCount); this.timerField.text = (("qrossfire will continue in " + _local2) + " seconds..."); } private function mochiAd_skippedOrFailed():void{ this.dispatchEvent(new Event(Event.COMPLETE)); } private function mochiAd_loaded(_arg1:Number, _arg2:Number):void{ this._mochiContainer.x = ((this.loaderInfo.width - _arg1) / 2); this._mochiContainer.y = ((this.loaderInfo.height - _arg2) / 2); TweenMax.to(this._mochiContainer, 0.15, {autoAlpha:1}); this.timerField.text = "qrossfire will continue in 5 seconds..."; this._timer = new Timer(1000, 5); this._timer.addEventListener(TimerEvent.TIMER, timer_updateHandler); this._timer.addEventListener(TimerEvent.TIMER_COMPLETE, timer_completeHandler); this._timer.start(); } } }//package com.bowlerhatgames.qrossfire.screens
Section 27
//GameScreen (com.bowlerhatgames.qrossfire.screens.GameScreen) package com.bowlerhatgames.qrossfire.screens { import flash.display.*; import flash.geom.*; import flash.events.*; import gs.*; import com.bowlerhatgames.qrossfire.*; import com.bowlerhatgames.qrossfire.events.*; import org.josht.fl.controls.*; import com.bowlerhatgames.display.*; import mochi.as3.*; import com.bowlerhatgames.qrossfire.utils.*; import com.yahoo.astra.utils.*; import org.josht.media.*; import flash.media.*; import com.bowlerhatgames.effects.gs.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import com.bowlerhatgames.qrossfire.controls.*; import flash.text.*; import com.bowlerhatgames.qrossfire.skins.*; import flash.ui.*; public class GameScreen extends Sprite { public var backButton:Button; private var _settings:GameSettings; private var _level:int;// = 1 public var scoreField:TextField; public var endLevelDialog:EndLevelDialog; private var _score:MochiDigits; private var _gameBoard:GameBoard; public var pieTimer:PieTimer; public var blitzTimer:PieTimer; private var _objective:uint; public var blitzTitle:Sprite; private var _paused:Boolean;// = true private var _gameOverFlag:Boolean;// = true public var levelField:TextField; public var pauseDialog:PauseDialog; private var _baseObjectiveModifier:Number;// = 0.5 public var sponsorLogo:Sprite; private var _warningChannel:SoundChannel; private static const BASE_DURATION_NORMAL:int = 60000; private static const BASE_DURATION_EASY:int = 75000; private static const FIRST_OBJECTIVE:uint = 2500; public static const LINK_MORE_GAMES:String = "linkMoreGames"; private static const BASE_DURATION_HARD:int = 45000; public function GameScreen(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); __setProp_backButton_GameScreen_ui_0(); } private function endLevelDialogSubmitScoreHandler(_arg1:Event):void{ var _local2:String = LeaderboardUtil.getLeaderboardID(this._settings.difficulty); MochiScores.showLeaderboard({boardID:_local2, score:this._score.value, res:"600x500", onClose:mochiScoresEventListener}); (this.endLevelDialog.alpha = 0); (this.endLevelDialog.visible = false); } private function stageKeyHandler(_arg1:KeyboardEvent):void{ switch (String.fromCharCode(_arg1.charCode).toLowerCase()){ case "p": if (!this._gameOverFlag){ this.paused = !(this.paused); }; break; case "m": this._settings.musicOn = !(this._settings.musicOn); break; case "s": this._settings.soundEffectsOn = !(this._settings.soundEffectsOn); break; }; } private function get level():int{ return (this._level); } private function pauseItemSelectHandler(_arg1:ContextMenuEvent):void{ if (!this._gameOverFlag){ (this.paused = !(this.paused)); }; } private function set level(_arg1:int):void{ this._level = _arg1; this.levelField.text = ("level " + _arg1); this._gameBoard.stats.levelReached = _arg1; this._objective = this.calculateObjective(this._level); var _local2:Object = {}; _local2[GameSettings.DIFFICULTY_EASY] = BASE_DURATION_EASY; _local2[GameSettings.DIFFICULTY_NORMAL] = BASE_DURATION_NORMAL; _local2[GameSettings.DIFFICULTY_HARD] = BASE_DURATION_HARD; var _local3:int = _local2[this._settings.difficulty]; var _local4:Number = (Math.min(20, (this._level - 1)) / 24); this.pieTimer.reset(); this.pieTimer.duration = (_local3 - (_local3 * _local4)); if (!this._paused){ this.pieTimer.start(); }; } public function get score():uint{ return (this._score.value); } private function initialize():void{ var _local1:ContextMenu = new ContextMenu(); var _local2:ContextMenuItem = new ContextMenuItem("Pause / Resume (P)"); _local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, pauseItemSelectHandler); var _local3:ContextMenuItem = new ContextMenuItem("Toggle Music (M)"); _local3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, musicItemSelectHandler); var _local4:ContextMenuItem = new ContextMenuItem("Toggle Sound FX (S)"); _local4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, soundFxItemSelectHandler); _local1.hideBuiltInItems(); _local1.customItems = [_local2, _local3, _local4]; this.contextMenu = _local1; this.graphics.beginFill(0xFF00FF, 0); this.graphics.drawRect(0, 0, this.loaderInfo.width, this.loaderInfo.height); this.graphics.endFill(); this.initializeChildren(); this._score = new MochiDigits(); if (this.loaderInfo.parentAllowsChild){ this.stage.addEventListener(KeyboardEvent.KEY_UP, stageKeyHandler, false, 0, true); }; this.reset(); } private function blitzTimerCompleteHandler(_arg1:Event):void{ (this._gameBoard.blitzMode = false); } private function gameBoardMatchHandler(_arg1:MatchEvent):void{ var _local2:Number = 0; switch (this._settings.difficulty){ case GameSettings.DIFFICULTY_EASY: _local2 = 0.045; _local2; break; case GameSettings.DIFFICULTY_HARD: _local2 = 0.025; _local2; break; default: _local2 = 0.035; _local2; }; (this.pieTimer.value = (this.pieTimer.value + _local2)); (this.score = (this.score + _arg1.data.score)); } private function pauseDialogResumeHandler(_arg1:Event):void{ (this.paused = false); } private function soundFxItemSelectHandler(_arg1:ContextMenuEvent):void{ (this._settings.soundEffectsOn = !(this._settings.soundEffectsOn)); } public function get settings():GameSettings{ return (this._settings); } public function set score(_arg1:uint):void{ var _local2:TextBurst; var _local3:TextFormat; this._score.setValue(_arg1); this.scoreField.text = ("score: " + StringUtil.padFront(this._score.value.toString(), 7, "0")); if (_arg1 >= this._objective){ this.level++; new ColorFlash(this.pieTimer, 0xFFFFFF, 1, 2); this._gameBoard.playLevelUpEffect(); _local2 = TextBurst.create(("Level " + level), this, (this.loaderInfo.width / 2), (this.loaderInfo.height / 2)); _local2.duration = 1.25; _local3 = _local2.textField.getTextFormat(); _local3.size = 36; _local3.font = "Bebas"; _local2.textField.setTextFormat(_local3); _local2.refresh(); if (this._settings.soundEffectsOn){ new LevelUpSound().play(); }; }; } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.initialize(); } private function mochiScoresEventListener():void{ this.dispatchEvent(new Event(Event.COMPLETE)); } public function get paused():Boolean{ return (this._paused); } private function initializeChildren():void{ this._gameBoard = new GameBoard(8); this._gameBoard.settings = this.settings; this._gameBoard.addEventListener(GameOverEvent.GAME_OVER, gameBoardNoMovesLeftHandler); this._gameBoard.addEventListener(MatchEvent.MATCH, gameBoardMatchHandler); this._gameBoard.addEventListener(GameModeEvent.GAME_MODE_CHANGE, gameBoardModeChangeHandler); this.addChild(this._gameBoard); this.setChildIndex(this.pauseDialog, (this.numChildren - 1)); this.setChildIndex(this.endLevelDialog, (this.numChildren - 1)); this.backButton.setStyle("contentAlign", "left"); this.backButton.setStyle("textPadding", 0); this.backButton.setStyle("embedFonts", true); this.backButton.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); this.backButton.setStyle("upIcon", "BackButtonUpIcon"); this.backButton.setStyle("overIcon", "BackButtonOverIcon"); this.backButton.setStyle("downIcon", "BackButtonUpIcon"); this.backButton.setStyle("upSkin", "flash.display.Shape"); this.backButton.setStyle("overSkin", "flash.display.Shape"); this.backButton.setStyle("downSkin", "flash.display.Shape"); this.backButton.setStyle("focusRectSkin", DashedRectangleSkin); this.backButton.addEventListener(MouseEvent.CLICK, backButtonClickListener); SoundEventManager.attachSoundToEvent(this.backButton, MouseEvent.CLICK, ButtonClickSound); this.pauseDialog.addEventListener(PauseDialog.OPTION_MORE_GAMES, dialogLinkMoreGamesHandler); this.pauseDialog.addEventListener(PauseDialog.OPTION_RESUME, pauseDialogResumeHandler); this.endLevelDialog.addEventListener(EndLevelDialog.OPTION_MORE_GAMES, dialogLinkMoreGamesHandler); this.endLevelDialog.addEventListener(EndLevelDialog.OPTION_SUBMIT_SCORE, endLevelDialogSubmitScoreHandler); this.endLevelDialog.addEventListener(EndLevelDialog.OPTION_PLAY_AGAIN, endLevelDialogPlayAgainHandler); this.blitzTimer.duration = 20000; this.blitzTimer.alpha = 0; this.blitzTimer.visible = false; this.blitzTimer.base.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 250, 150); this.blitzTimer.addEventListener(Event.COMPLETE, blitzTimerCompleteHandler); this.blitzTitle.alpha = 0; this.blitzTitle.visible = false; this.pieTimer.addEventListener(Event.COMPLETE, pieTimerCompleteListener); this.pieTimer.addEventListener(PieTimer.WARNING_CHANGE, pieTimerWarningChangeHandler); this.sponsorLogo.buttonMode = true; this.sponsorLogo.addEventListener(MouseEvent.CLICK, sponsorLogo_clickHandler); SoundEventManager.attachSoundToEvent(this.sponsorLogo, MouseEvent.CLICK, ButtonClickSound); } private function musicItemSelectHandler(_arg1:ContextMenuEvent):void{ (this._settings.musicOn = !(this._settings.musicOn)); } private function gameBoardNoMovesLeftHandler(_arg1:GameOverEvent):void{ (this.endLevelDialog.message = _arg1.message); this.gameOver(); } private function sponsorLogo_clickHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(LINK_MORE_GAMES)); } public function set settings(_arg1:GameSettings):void{ this._settings = _arg1; if (this._gameBoard){ this._gameBoard.settings = this._settings; }; } private function removedFromStageListener(_arg1:Event):void{ if (this.loaderInfo.parentAllowsChild){ this.stage.removeEventListener(KeyboardEvent.KEY_UP, stageKeyHandler); }; } public function reset():void{ var _local1:Number; var _local2:int; this._gameBoard.reset(); this._gameBoard.x = (this.loaderInfo.width / 2); this._gameBoard.y = (this.loaderInfo.height / 2); this.endLevelDialog.alpha = 0; this.endLevelDialog.visible = false; this.pauseDialog.alpha = 0; this.pauseDialog.visible = false; this.level = 1; this.score = 0; this._score.reencode(); switch (this._settings.difficulty){ case GameSettings.DIFFICULTY_EASY: _local1 = 0.6; _local2 = BASE_DURATION_EASY; break; case GameSettings.DIFFICULTY_HARD: _local1 = 0.4; _local2 = BASE_DURATION_HARD; break; default: _local1 = 0.5; _local2 = BASE_DURATION_NORMAL; break; }; this.pieTimer.duration = _local2; this._baseObjectiveModifier = _local1; NodeUtil.lastMatchTime = 0; NodeUtil.comboCount = 0; this.pieTimer.reset(); this.gameOverFlag = false; } private function pieTimerCompleteListener(_arg1:Event):void{ (this.endLevelDialog.message = "game over: time up!"); this.gameOver(); } private function dialogLinkMoreGamesHandler(_arg1:Event):void{ this.dispatchEvent(new Event(LINK_MORE_GAMES)); } public function set paused(_arg1:Boolean):void{ if (this._paused == _arg1){ return; }; this._paused = _arg1; this._gameBoard.paused = this._paused; if (this._paused){ this.pieTimer.pause(); if (this.blitzTimer.visible){ this.blitzTimer.pause(); }; if (!this._gameOverFlag){ new TweenMax(this.pauseDialog, 0.15, {autoAlpha:1}); }; } else { this.pieTimer.start(); if (this.blitzTimer.visible){ this.blitzTimer.start(); }; new TweenMax(this.pauseDialog, 0.1, {autoAlpha:0}); }; } private function backButtonClickListener(_arg1:MouseEvent):void{ this.paused = true; this._gameBoard.stopWarningEffect(); if (this._warningChannel){ this._warningChannel.stop(); this._warningChannel = null; }; this.dispatchEvent(new Event(Event.CANCEL)); } private function set gameOverFlag(_arg1:Boolean):void{ this._gameOverFlag = _arg1; this.paused = this._gameOverFlag; this._gameBoard.gameOver = _arg1; if (this._gameOverFlag){ }; } private function endLevelDialogPlayAgainHandler(_arg1:Event):void{ this.dispatchEvent(new Event(Event.COMPLETE)); } private function gameBoardModeChangeHandler(_arg1:GameModeEvent):void{ var _local2:TextBurst; var _local3:TextFormat; if (this._gameBoard.blitzMode){ _local2 = TextBurst.create("bomb blitz", this, (this.loaderInfo.width / 2), (this.loaderInfo.height / 2)); (_local2.duration = 1.25); _local3 = _local2.textField.getTextFormat(); (_local3.size = 36); (_local3.font = "Bebas"); (_local3.color = 0); _local2.textField.setTextFormat(_local3); _local2.refresh(); TweenMax.to(this.blitzTimer, 0.15, {autoAlpha:1}); TweenMax.to(this.blitzTitle, 0.15, {autoAlpha:1}); this.blitzTimer.reset(); this.blitzTimer.start(); } else { this.blitzTimer.pause(); TweenMax.to(this.blitzTimer, 0.15, {autoAlpha:0}); TweenMax.to(this.blitzTitle, 0.15, {autoAlpha:0}); }; } private function calculateObjective(_arg1:int):int{ if (_arg1 <= 1){ return (FIRST_OBJECTIVE); }; var _local2:Number = (0.4 + ((0.55 * Math.min(12, (_arg1 - 1))) / 12)); return ((this.calculateObjective((_arg1 - 1)) / _local2)); } private function gameOver():void{ this.gameOverFlag = true; this._gameBoard.stopWarningEffect(); if (this._warningChannel){ this._warningChannel.stop(); this._warningChannel = null; }; this.setChildIndex(this.endLevelDialog, (this.numChildren - 1)); new TweenMax(this.endLevelDialog, 0.15, {autoAlpha:1}); } private function pieTimerWarningChangeHandler(_arg1:Event):void{ if (((!(this.paused)) && (this.pieTimer.warning))){ this._gameBoard.playWarningEffect(); (this._warningChannel = new TimerWarningSound().play(0, int.MAX_VALUE)); } else { this._gameBoard.stopWarningEffect(); if (this._warningChannel){ this._warningChannel.stop(); (this._warningChannel = null); }; }; } private function get gameOverFlag():Boolean{ return (this._gameOverFlag); } function __setProp_backButton_GameScreen_ui_0(){ try { (backButton["componentInspectorSetting"] = true); } catch(e:Error) { }; (backButton.emphasized = false); (backButton.enabled = true); (backButton.label = "back to menu"); (backButton.labelPlacement = "right"); (backButton.selected = false); (backButton.toggle = false); (backButton.visible = true); try { (backButton["componentInspectorSetting"] = false); } catch(e:Error) { }; } } }//package com.bowlerhatgames.qrossfire.screens
Section 28
//HighScoreItem (com.bowlerhatgames.qrossfire.screens.HighScoreItem) package com.bowlerhatgames.qrossfire.screens { import flash.filters.*; import org.josht.display.*; import flash.text.*; public class HighScoreItem extends InvalidatingSprite { private var _index:uint;// = 1 public var scoreField:TextField; public var nameField:TextField; private var _score:Object; public function HighScoreItem(){ _score = {}; super(); this.nameField.filters = [new DropShadowFilter(0, 0, 0, 0, 0, 0)]; this.scoreField.filters = [new DropShadowFilter(0, 0, 0, 0, 0, 0)]; } public function set score(_arg1:Object):void{ this._score = _arg1; this.invalidate(); } public function set index(_arg1:uint):void{ this._index = _arg1; this.invalidate(); } public function get score():Object{ return (this._score); } public function get index():uint{ return (this._index); } override protected function draw():void{ this.nameField.text = ((this._index + ". ") + this._score.name.toLowerCase()); this.scoreField.text = this._score.score.toString(); } } }//package com.bowlerhatgames.qrossfire.screens
Section 29
//HighScoresScreen (com.bowlerhatgames.qrossfire.screens.HighScoresScreen) package com.bowlerhatgames.qrossfire.screens { import fl.controls.*; import flash.display.*; import flash.events.*; import gs.*; import com.bowlerhatgames.qrossfire.*; import org.josht.fl.controls.*; import mochi.as3.*; import com.bowlerhatgames.qrossfire.utils.*; import org.josht.media.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import flash.text.*; import com.bowlerhatgames.qrossfire.skins.*; public class HighScoresScreen extends Sprite { public var backButton:Button; private var _items:Array; private var _settings:GameSettings; public var allRadio:RadioButton; private var _scoreData:Object; public var dailyRadio:RadioButton; public var statusField:TextField; public var monthlyRadio:RadioButton; private var _timePeriodGroup:RadioButtonGroup; public var weeklyRadio:RadioButton; private static const MAX_SCORES:int = 10; public function HighScoresScreen(){ _items = []; super(); this.addEventListener(Event.ADDED_TO_STAGE, addedToStageListener); __setProp_dailyRadio_HighScoresScreen_uicontrols_0(); __setProp_weeklyRadio_HighScoresScreen_uicontrols_0(); __setProp_monthlyRadio_HighScoresScreen_uicontrols_0(); __setProp_allRadio_HighScoresScreen_uicontrols_0(); __setProp_backButton_HighScoresScreen_uicontrols_0(); } public function set settings(_arg1:GameSettings):void{ this._settings = _arg1; } private function updateScoreList():void{ var _local7:Object; var _local8:HighScoreItem; this.removeOldItems(); if (!this._scoreData){ return; }; var _local1:Array = (this.dailyRadio.selected) ? this._scoreData.daily : (this.weeklyRadio.selected) ? this._scoreData.weekly : (this.monthlyRadio.selected) ? this._scoreData.monthly : this._scoreData.alltime; var _local2:int = Math.min(MAX_SCORES, _local1.length); if (_local2 == 0){ this.statusField.text = "no scores for this time period."; } else { this.statusField.text = ""; }; var _local3:Number = 100; var _local4:Number = 112; var _local5:Number = 0.25; var _local6:int; while (_local6 < _local2) { _local7 = _local1[_local6]; _local8 = new HighScoreItem(); _local8.score = _local7; _local8.index = (_local6 + 1); _local8.x = _local3; _local8.y = _local4; _local8.alpha = 0; this.addChild(_local8); this._items.push(_local8); _local8.validate(); _local4 = (_local4 + _local8.height); new TweenLite(_local8, _local5, {alpha:1, delay:(_local5 * _local6)}); _local6++; }; } function __setProp_dailyRadio_HighScoresScreen_uicontrols_0(){ try { dailyRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; dailyRadio.enabled = true; dailyRadio.groupName = "RadioButtonGroup"; dailyRadio.label = "day"; dailyRadio.labelPlacement = "right"; dailyRadio.selected = false; dailyRadio.value = ""; dailyRadio.visible = true; try { dailyRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_allRadio_HighScoresScreen_uicontrols_0(){ try { allRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; allRadio.enabled = true; allRadio.groupName = "RadioButtonGroup"; allRadio.label = "all time"; allRadio.labelPlacement = "right"; allRadio.selected = false; allRadio.value = ""; allRadio.visible = true; try { allRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function initializeRadio(_arg1:RadioButton):void{ _arg1.setStyle("embedFonts", true); _arg1.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); _arg1.setStyle("upIcon", "ScreenRadioUpSkin"); _arg1.setStyle("overIcon", "ScreenRadioOverSkin"); _arg1.setStyle("downIcon", "ScreenRadioSelectedOverSkin"); _arg1.setStyle("selectedUpIcon", "ScreenRadioSelectedUpSkin"); _arg1.setStyle("selectedOverIcon", "ScreenRadioSelectedOverSkin"); _arg1.setStyle("selectedDownIcon", "ScreenRadioOverSkin"); _arg1.setStyle("focusRectSkin", DashedRectangleSkin); } function __setProp_monthlyRadio_HighScoresScreen_uicontrols_0(){ try { monthlyRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; monthlyRadio.enabled = true; monthlyRadio.groupName = "RadioButtonGroup"; monthlyRadio.label = "month"; monthlyRadio.labelPlacement = "right"; monthlyRadio.selected = false; monthlyRadio.value = ""; monthlyRadio.visible = true; try { monthlyRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function initialize():void{ this._timePeriodGroup = new RadioButtonGroup("timePeriod"); this.dailyRadio.group = this._timePeriodGroup; this.weeklyRadio.group = this._timePeriodGroup; this.monthlyRadio.group = this._timePeriodGroup; this.allRadio.group = this._timePeriodGroup; this._timePeriodGroup.addEventListener(Event.CHANGE, timePeriodGroupChangeHandler); this.initializeRadio(this.dailyRadio); this.initializeRadio(this.weeklyRadio); this.initializeRadio(this.monthlyRadio); this.initializeRadio(this.allRadio); var _local1:String = LeaderboardUtil.getLeaderboardID(this._settings.difficulty); MochiScores.setBoardID(_local1); MochiScores.requestList(this, "receiveMochiScores"); this.backButton.setStyle("contentAlign", "left"); this.backButton.setStyle("textPadding", 0); this.backButton.setStyle("embedFonts", true); this.backButton.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); this.backButton.setStyle("upIcon", "BackButtonUpIcon"); this.backButton.setStyle("overIcon", "BackButtonOverIcon"); this.backButton.setStyle("downIcon", "BackButtonUpIcon"); this.backButton.setStyle("upSkin", "flash.display.Shape"); this.backButton.setStyle("overSkin", "flash.display.Shape"); this.backButton.setStyle("downSkin", "flash.display.Shape"); this.backButton.setStyle("focusRectSkin", DashedRectangleSkin); this.backButton.addEventListener(MouseEvent.CLICK, backButtonClickListener); SoundEventManager.attachSoundToEvent(this.backButton, MouseEvent.CLICK, ButtonClickSound); } private function timePeriodGroupChangeHandler(_arg1:Event):void{ this.updateScoreList(); } function __setProp_backButton_HighScoresScreen_uicontrols_0(){ try { backButton["componentInspectorSetting"] = true; } catch(e:Error) { }; backButton.emphasized = false; backButton.enabled = true; backButton.label = "back to menu"; backButton.labelPlacement = "right"; backButton.selected = false; backButton.toggle = false; backButton.visible = true; try { backButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function receiveMochiScores(_arg1:Object):void{ if (((_arg1.error) || (!(_arg1.scores)))){ this.statusField.text = "unable to retrieve scores. please try again later."; return; }; this._scoreData = MochiScores.scoresArrayToObjects(_arg1.scores); if (this._scoreData.daily.length >= 3){ this.dailyRadio.selected = true; } else { if (this._scoreData.weekly.length >= 3){ this.weeklyRadio.selected = true; } else { if (this._scoreData.monthly.length >= 3){ this.monthlyRadio.selected = true; } else { this.allRadio.selected = true; }; }; }; SoundEventManager.attachSoundToEvent(this._timePeriodGroup, Event.CHANGE, ButtonClickSound); } public function get settings():GameSettings{ return (this._settings); } private function backButtonClickListener(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Event.COMPLETE)); } function __setProp_weeklyRadio_HighScoresScreen_uicontrols_0(){ try { weeklyRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; weeklyRadio.enabled = true; weeklyRadio.groupName = "RadioButtonGroup"; weeklyRadio.label = "week"; weeklyRadio.labelPlacement = "right"; weeklyRadio.selected = false; weeklyRadio.value = ""; weeklyRadio.visible = true; try { weeklyRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function addedToStageListener(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, addedToStageListener); this.initialize(); } private function removeOldItems():void{ var item:HighScoreItem; var fadeOutDuration:int = 0.25; var itemCount:int = this._items.length; var i:int; while (i < itemCount) { item = HighScoreItem(this._items.shift()); new TweenLite(item, fadeOutDuration, {alpha:0, delay:(fadeOutDuration * i), onComplete:function ():void{ removeChild(item); }}); i = (i + 1); }; } } }//package com.bowlerhatgames.qrossfire.screens
Section 30
//InstructionsScreen (com.bowlerhatgames.qrossfire.screens.InstructionsScreen) package com.bowlerhatgames.qrossfire.screens { import com.bowlerhatgames.qrossfire.nodes.*; import fl.controls.*; import flash.display.*; import flash.geom.*; import flash.events.*; import gs.*; import com.bowlerhatgames.qrossfire.*; import flash.filters.*; import com.bowlerhatgames.qrossfire.utils.*; import org.josht.media.*; import flash.utils.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import flash.text.*; import com.bowlerhatgames.qrossfire.skins.*; public class InstructionsScreen extends Sprite { public var demoMouse:Sprite; private var _settings:GameSettings; public var exampleSkull:Node; private var _gameBoard:GameBoard; private var _demoTimeline:TimelineMax; public var exampleFlame:Node; private var _lastDemoRollOverNode:Node; public var exampleBomb:Node; public var continueButton:Button; public function InstructionsScreen(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageListener); __setProp_continueButton_InstructionsScreen_content_0(); } private function moveFirstNode():void{ this._gameBoard.moveSelectedNodeTo(2, 1); } private function continueButtonClickListener(_arg1:MouseEvent):void{ this._demoTimeline.stop(); this._demoTimeline = null; this.dispatchEvent(new Event(Event.COMPLETE)); } function __setProp_continueButton_InstructionsScreen_content_0(){ try { continueButton["componentInspectorSetting"] = true; } catch(e:Error) { }; continueButton.emphasized = false; continueButton.enabled = true; continueButton.label = "continue"; continueButton.labelPlacement = "right"; continueButton.selected = false; continueButton.toggle = false; continueButton.visible = true; try { continueButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function set settings(_arg1:GameSettings):void{ this._settings = _arg1; } private function initialize():void{ var _local1:Array = ["Red", "Blue", "Yellow", "Green", "Yellow", "Pink", "Cyan", "Gray", "Blue", "Cyan", "Yellow", "Red", "Green", "Gray", "Blue", "Pink", "Blue", "Red", "Green"]; this._gameBoard = new GameBoard(4, true, _local1); this._gameBoard.settings = settings; this.addChild(this._gameBoard); this._gameBoard.reset(); this._gameBoard.x = ((this.loaderInfo.width - (this._gameBoard.width / 2)) - 15); this._gameBoard.y = (2 + (this._gameBoard.height / 2)); this.exampleBomb.mouseEnabled = (this.exampleBomb.mouseChildren = (this.exampleFlame.mouseEnabled = (this.exampleFlame.mouseChildren = (this.exampleSkull.mouseEnabled = (this.exampleSkull.mouseChildren = false))))); this.continueButton.buttonMode = true; this.continueButton.useHandCursor = true; this.continueButton.setStyle("embedFonts", true); this.continueButton.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); this.continueButton.setStyle("upSkin", "flash.display.Shape"); this.continueButton.setStyle("overSkin", "flash.display.Shape"); this.continueButton.setStyle("downSkin", "flash.display.Shape"); this.continueButton.setStyle("focusRectSkin", DashedRectangleSkin); this.continueButton.textField.filters = [new DropShadowFilter(2, 45, 0, 1, 0, 0, 2, 3)]; this.continueButton.addEventListener(MouseEvent.CLICK, continueButtonClickListener); this.continueButton.addEventListener(MouseEvent.ROLL_OVER, continueButtonRollOverHandler); SoundEventManager.attachSoundToEvent(this.continueButton, MouseEvent.CLICK, ButtonClickSound); this.setChildIndex(this.demoMouse, (this.numChildren - 1)); if (!this._settings.showHelp){ this.skipHelp(); return; }; var _local2:Point = new Point(this.demoMouse.x, this.demoMouse.y); var _local3:Point = new Point((this._gameBoard.x - (this._gameBoard.width / 2)), this._gameBoard.y); var _local4:Number = ((NodeUtil.NODE_SIZE * Math.SQRT2) / 2); _local3.x = (_local3.x + _local4); _local3.y = (_local3.y + _local4); var _local5:Point = this._gameBoard.getPositionOfColumnAndRow(0, 1); _local5 = _local5.add(_local3); var _local6:Point = this._gameBoard.getPositionOfColumnAndRow(0, 0); _local6 = _local6.add(_local3); var _local7:Point = this._gameBoard.getPositionOfColumnAndRow(0, 3); _local7 = _local7.add(_local3); var _local8:Point = this._gameBoard.getPositionOfColumnAndRow(3, 1); _local8 = _local8.add(_local3); var _local9:Point = this._gameBoard.getPositionOfColumnAndRow(2, 1); _local9 = _local9.add(_local3); this._demoTimeline = new TimelineMax(); this._demoTimeline.append(TweenMax.to(this.demoMouse, 1, {x:_local5.x, y:_local5.y, delay:0.5, onUpdate:handleMouseEvents, onComplete:selectFirstNode})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 0.5, {x:_local6.x, y:_local6.y, delay:0.25, onUpdate:handleMouseEvents})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 1, {x:_local7.x, y:_local7.y, delay:0.5, onUpdate:handleMouseEvents})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 1, {x:_local5.x, y:_local5.y, delay:0.5, onUpdate:handleMouseEvents})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 1, {x:_local8.x, y:_local8.y, delay:0.5, onUpdate:handleMouseEvents})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 0.5, {x:_local9.x, y:_local9.y, delay:0.5, onUpdate:handleMouseEvents, onComplete:moveFirstNode})); this._demoTimeline.append(TweenMax.to(this.demoMouse, 1, {x:_local2.x, y:_local2.y, delay:0.75, onUpdate:handleMouseEvents, onComplete:timelineComplete})); } private function returnToStart():void{ this._gameBoard.reset(); this._demoTimeline.restart(); } private function continueButtonRollOutHandler(_arg1:MouseEvent):void{ this.continueButton.removeEventListener(MouseEvent.ROLL_OUT, continueButtonRollOutHandler); var _local2:TextField = this.continueButton.textField; var _local3:DropShadowFilter = _local2.filters[0]; _local3.color = 0; _local2.filters = [_local3]; } private function timelineComplete():void{ setTimeout(returnToStart, 0.25); } private function handleMouseEvents():void{ var _local4:DisplayObject; var _local5:Node; var _local1:Point = new Point(this.demoMouse.x, this.demoMouse.y); _local1 = this.localToGlobal(_local1); var _local2:Array = this._gameBoard.getObjectsUnderPoint(_local1); var _local3:Boolean; for each (_local4 in _local2) { if ((_local4.parent is Node)){ _local3 = true; _local5 = Node(_local4.parent); if (this._lastDemoRollOverNode != _local4){ if (this._lastDemoRollOverNode){ this._lastDemoRollOverNode.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT)); }; _local5.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OVER)); this._lastDemoRollOverNode = _local5; }; break; }; }; if (((!(_local3)) && (this._lastDemoRollOverNode))){ this._lastDemoRollOverNode.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT)); this._lastDemoRollOverNode = null; }; } private function skipHelp():void{ this.dispatchEvent(new Event(Event.COMPLETE)); } private function continueButtonRollOverHandler(_arg1:MouseEvent):void{ var _local2:TextField = this.continueButton.textField; var _local3:DropShadowFilter = _local2.filters[0]; _local3.color = 0x990000; _local2.filters = [_local3]; this.continueButton.addEventListener(MouseEvent.ROLL_OUT, continueButtonRollOutHandler); } private function selectFirstNode():void{ this._gameBoard.selectNode(0, 1); } private function addedToStageListener(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.initialize(); } public function get settings():GameSettings{ return (this._settings); } } }//package com.bowlerhatgames.qrossfire.screens
Section 31
//SettingsScreen (com.bowlerhatgames.qrossfire.screens.SettingsScreen) package com.bowlerhatgames.qrossfire.screens { import fl.controls.*; import flash.display.*; import flash.events.*; import com.bowlerhatgames.qrossfire.*; import org.josht.fl.controls.*; import org.josht.media.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import flash.text.*; import com.bowlerhatgames.qrossfire.skins.*; import flash.errors.*; public class SettingsScreen extends Sprite { private var _settings:GameSettings; public var hardRadio:RadioButton; public var musicOffRadio:RadioButton; public var normalRadio:RadioButton; public var sfxOnRadio:RadioButton; public var easyRadio:RadioButton; public var helpOnRadio:RadioButton; public var helpOffRadio:RadioButton; public var sfxOffRadio:RadioButton; public var musicOnRadio:RadioButton; public var backButton:Button; private var _controlsInitialized:Boolean;// = false public function SettingsScreen(_arg1:GameSettings=null){ this._settings = _arg1; this.addEventListener(Event.ADDED_TO_STAGE, addedToStageListener); __setProp_easyRadio_SettingsScreen_uicontrols_0(); __setProp_normalRadio_SettingsScreen_uicontrols_0(); __setProp_hardRadio_SettingsScreen_uicontrols_0(); __setProp_musicOnRadio_SettingsScreen_uicontrols_0(); __setProp_musicOffRadio_SettingsScreen_uicontrols_0(); __setProp_sfxOnRadio_SettingsScreen_uicontrols_0(); __setProp_sfxOffRadio_SettingsScreen_uicontrols_0(); __setProp_helpOnRadio_SettingsScreen_uicontrols_0(); __setProp_helpOffRadio_SettingsScreen_uicontrols_0(); __setProp_backButton_SettingsScreen_uicontrols_0(); } function __setProp_musicOffRadio_SettingsScreen_uicontrols_0(){ try { musicOffRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; musicOffRadio.enabled = true; musicOffRadio.groupName = "RadioButtonGroup"; musicOffRadio.label = "off"; musicOffRadio.labelPlacement = "right"; musicOffRadio.selected = false; musicOffRadio.value = ""; musicOffRadio.visible = true; try { musicOffRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function set settings(_arg1:GameSettings):void{ this._settings = _arg1; } function __setProp_hardRadio_SettingsScreen_uicontrols_0(){ try { hardRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; hardRadio.enabled = true; hardRadio.groupName = "RadioButtonGroup"; hardRadio.label = "hard"; hardRadio.labelPlacement = "right"; hardRadio.selected = false; hardRadio.value = ""; hardRadio.visible = true; try { hardRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function initializeRadio(_arg1:RadioButton, _arg2:String, _arg3:Object):void{ var radio = _arg1; var name = _arg2; var value = _arg3; radio.setStyle("embedFonts", true); radio.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); radio.setStyle("upIcon", "ScreenRadioUpSkin"); radio.setStyle("overIcon", "ScreenRadioOverSkin"); radio.setStyle("downIcon", "ScreenRadioSelectedOverSkin"); radio.setStyle("selectedUpIcon", "ScreenRadioSelectedUpSkin"); radio.setStyle("selectedOverIcon", "ScreenRadioSelectedOverSkin"); radio.setStyle("selectedDownIcon", "ScreenRadioOverSkin"); radio.setStyle("focusRectSkin", DashedRectangleSkin); radio.addEventListener(Event.CHANGE, function (_arg1:Event):void{ if (radio.selected){ _settings[name] = value; }; }); } function __setProp_normalRadio_SettingsScreen_uicontrols_0(){ try { normalRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; normalRadio.enabled = true; normalRadio.groupName = "RadioButtonGroup"; normalRadio.label = "normal"; normalRadio.labelPlacement = "right"; normalRadio.selected = false; normalRadio.value = ""; normalRadio.visible = true; try { normalRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function addedToStageListener(_arg1:Event):void{ if (!this._settings){ throw (new IllegalOperationError("SettingsScreen requires \"settings\" property to be set before it is added to the display list!")); }; if (!this._controlsInitialized){ this.initialize(); }; var _local2:Object = {}; _local2[GameSettings.DIFFICULTY_EASY] = this.easyRadio; _local2[GameSettings.DIFFICULTY_NORMAL] = this.normalRadio; _local2[GameSettings.DIFFICULTY_HARD] = this.hardRadio; var _local3:RadioButton = RadioButton(_local2[this._settings.difficulty]); _local3.selected = true; this.musicOnRadio.selected = this._settings.musicOn; this.sfxOnRadio.selected = this._settings.soundEffectsOn; this.helpOnRadio.selected = this._settings.showHelp; } function __setProp_easyRadio_SettingsScreen_uicontrols_0(){ try { easyRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; easyRadio.enabled = true; easyRadio.groupName = "RadioButtonGroup"; easyRadio.label = "easy"; easyRadio.labelPlacement = "right"; easyRadio.selected = false; easyRadio.value = ""; easyRadio.visible = true; try { easyRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_helpOffRadio_SettingsScreen_uicontrols_0(){ try { helpOffRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; helpOffRadio.enabled = true; helpOffRadio.groupName = "RadioButtonGroup"; helpOffRadio.label = "hide"; helpOffRadio.labelPlacement = "right"; helpOffRadio.selected = false; helpOffRadio.value = ""; helpOffRadio.visible = true; try { helpOffRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_helpOnRadio_SettingsScreen_uicontrols_0(){ try { helpOnRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; helpOnRadio.enabled = true; helpOnRadio.groupName = "RadioButtonGroup"; helpOnRadio.label = "show"; helpOnRadio.labelPlacement = "right"; helpOnRadio.selected = false; helpOnRadio.value = ""; helpOnRadio.visible = true; try { helpOnRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_musicOnRadio_SettingsScreen_uicontrols_0(){ try { musicOnRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; musicOnRadio.enabled = true; musicOnRadio.groupName = "RadioButtonGroup"; musicOnRadio.label = "on"; musicOnRadio.labelPlacement = "right"; musicOnRadio.selected = false; musicOnRadio.value = ""; musicOnRadio.visible = true; try { musicOnRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } protected function initialize():void{ this.backButton.setStyle("contentAlign", "left"); this.backButton.setStyle("textPadding", 0); this.backButton.setStyle("embedFonts", true); this.backButton.setStyle("textFormat", new TextFormat("Bebas", 18, 0xFFFFFF)); this.backButton.setStyle("upIcon", "BackButtonUpIcon"); this.backButton.setStyle("overIcon", "BackButtonOverIcon"); this.backButton.setStyle("downIcon", "BackButtonUpIcon"); this.backButton.setStyle("upSkin", "flash.display.Shape"); this.backButton.setStyle("overSkin", "flash.display.Shape"); this.backButton.setStyle("downSkin", "flash.display.Shape"); this.backButton.setStyle("focusRectSkin", DashedRectangleSkin); this.backButton.addEventListener(MouseEvent.CLICK, backButtonClickListener); SoundEventManager.attachSoundToEvent(this.backButton, MouseEvent.CLICK, ButtonClickSound); var _local1:RadioButtonGroup = this.initializeRadioGroup([easyRadio, normalRadio, hardRadio], "difficulty", [GameSettings.DIFFICULTY_EASY, GameSettings.DIFFICULTY_NORMAL, GameSettings.DIFFICULTY_HARD]); this.initializeRadioGroup([musicOnRadio, musicOffRadio], "musicOn", [true, false]); this.initializeRadioGroup([sfxOnRadio, sfxOffRadio], "soundEffectsOn", [true, false]); this.initializeRadioGroup([helpOnRadio, helpOffRadio], "showHelp", [true, false]); this._controlsInitialized = true; } public function get settings():GameSettings{ return (this._settings); } function __setProp_backButton_SettingsScreen_uicontrols_0(){ try { backButton["componentInspectorSetting"] = true; } catch(e:Error) { }; backButton.emphasized = false; backButton.enabled = true; backButton.label = "back to menu"; backButton.labelPlacement = "right"; backButton.selected = false; backButton.toggle = false; backButton.visible = true; try { backButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function backButtonClickListener(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Event.COMPLETE)); } private function initializeRadioGroup(_arg1:Array, _arg2:String, _arg3:Array):RadioButtonGroup{ var _local7:RadioButton; var _local8:Object; if (_arg1.length != _arg3.length){ throw (new IllegalOperationError((((("Invalid data set. Received " + _arg1.length) + "radio buttons. Expected the same number of values, but received ") + _arg3.length) + "instead."))); }; var _local4:RadioButtonGroup = new RadioButtonGroup(_arg2); SoundEventManager.attachSoundToEvent(_local4, MouseEvent.CLICK, ButtonClickSound); var _local5:int = _arg1.length; var _local6:int; while (_local6 < _local5) { _local7 = RadioButton(_arg1[_local6]); _local8 = _arg3[_local6]; _local7.group = _local4; _local7.selected = (_local8 == this._settings[_arg2]); this.initializeRadio(_local7, _arg2, _local8); _local6++; }; return (_local4); } function __setProp_sfxOffRadio_SettingsScreen_uicontrols_0(){ try { sfxOffRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; sfxOffRadio.enabled = true; sfxOffRadio.groupName = "RadioButtonGroup"; sfxOffRadio.label = "off"; sfxOffRadio.labelPlacement = "right"; sfxOffRadio.selected = false; sfxOffRadio.value = ""; sfxOffRadio.visible = true; try { sfxOffRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_sfxOnRadio_SettingsScreen_uicontrols_0(){ try { sfxOnRadio["componentInspectorSetting"] = true; } catch(e:Error) { }; sfxOnRadio.enabled = true; sfxOnRadio.groupName = "RadioButtonGroup"; sfxOnRadio.label = "on"; sfxOnRadio.labelPlacement = "right"; sfxOnRadio.selected = false; sfxOnRadio.value = ""; sfxOnRadio.visible = true; try { sfxOnRadio["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package com.bowlerhatgames.qrossfire.screens
Section 32
//TitleScreen (com.bowlerhatgames.qrossfire.screens.TitleScreen) package com.bowlerhatgames.qrossfire.screens { import flash.display.*; import flash.events.*; import flash.filters.*; import org.josht.fl.controls.*; import org.josht.media.*; import flash.utils.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import flash.text.*; import com.bowlerhatgames.qrossfire.skins.*; public class TitleScreen extends Sprite { public var moreGamesOption:Button; public var sponsorLogo:Sprite; public var settingsOption:Button; public var createdByLink:Sprite; public var playGameOption:Button; public var highScoresOption:Button; public static const LINK_AUTHOR:String = "linkAuthor"; public static const LINK_MORE_GAMES:String = "linkMoreGames"; public static const SHOW_SETTINGS:String = "showSettings"; public static const SHOW_HIGH_SCORES:String = "showHighScores"; public static const PLAY_GAME:String = "playGame"; public function TitleScreen(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); __setProp_playGameOption_TitleScreen_controls_0(); __setProp_settingsOption_TitleScreen_controls_0(); __setProp_highScoresOption_TitleScreen_controls_0(); __setProp_moreGamesOption_TitleScreen_controls_0(); } private function initializeMenuOption(_arg1:Button):void{ var _local2:TextFormat = new TextFormat("Bebas", 36, 0xFFFFFF); _local2.letterSpacing = 0.5; _arg1.setStyle("embedFonts", true); _arg1.setStyle("textFormat", _local2); _arg1.setStyle("upSkin", "flash.display.Shape"); _arg1.setStyle("overSkin", "flash.display.Shape"); _arg1.setStyle("downSkin", "flash.display.Shape"); _arg1.setStyle("focusRectSkin", DashedRectangleSkin); _arg1.textField.filters = [new DropShadowFilter(3, 45, 0, 1, 0, 0, 2, 3)]; _arg1.addEventListener(MouseEvent.ROLL_OVER, buttonRollOverHandler); _arg1.addEventListener(MouseEvent.CLICK, optionClickHandler); SoundEventManager.attachSoundToEvent(_arg1, MouseEvent.CLICK, ButtonClickSound); } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.initialize(); } private function initialize():void{ var _local2:Button; this.createdByLink.buttonMode = true; this.createdByLink.mouseChildren = false; this.createdByLink.addEventListener(MouseEvent.CLICK, optionClickHandler); SoundEventManager.attachSoundToEvent(this.createdByLink, MouseEvent.CLICK, ButtonClickSound); this.sponsorLogo.buttonMode = true; this.sponsorLogo.addEventListener(MouseEvent.CLICK, optionClickHandler); SoundEventManager.attachSoundToEvent(this.sponsorLogo, MouseEvent.CLICK, ButtonClickSound); var _local1:Array = [this.playGameOption, this.settingsOption, this.highScoresOption, this.moreGamesOption]; for each (_local2 in _local1) { this.initializeMenuOption(_local2); }; } private function buttonRollOutHandler(_arg1:MouseEvent):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); var _local3:Button = Button(_arg1.currentTarget); var _local4:DropShadowFilter = _local3.textField.filters[0]; _local4.color = 0; _local3.textField.filters = [_local4]; } function __setProp_playGameOption_TitleScreen_controls_0(){ try { playGameOption["componentInspectorSetting"] = true; } catch(e:Error) { }; playGameOption.emphasized = false; playGameOption.enabled = true; playGameOption.label = "play game"; playGameOption.labelPlacement = "right"; playGameOption.selected = false; playGameOption.toggle = false; playGameOption.visible = true; try { playGameOption["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function buttonRollOverHandler(_arg1:MouseEvent):void{ var _local2:Button = Button(_arg1.currentTarget); var _local3:DropShadowFilter = _local2.textField.filters[0]; _local3.color = 0x990000; _local2.textField.filters = [_local3]; _local2.addEventListener(MouseEvent.ROLL_OUT, buttonRollOutHandler); } function __setProp_settingsOption_TitleScreen_controls_0(){ try { settingsOption["componentInspectorSetting"] = true; } catch(e:Error) { }; settingsOption.emphasized = false; settingsOption.enabled = true; settingsOption.label = "settings"; settingsOption.labelPlacement = "right"; settingsOption.selected = false; settingsOption.toggle = false; settingsOption.visible = true; try { settingsOption["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_highScoresOption_TitleScreen_controls_0(){ try { highScoresOption["componentInspectorSetting"] = true; } catch(e:Error) { }; highScoresOption.emphasized = false; highScoresOption.enabled = true; highScoresOption.label = "high scores"; highScoresOption.labelPlacement = "right"; highScoresOption.selected = false; highScoresOption.toggle = false; highScoresOption.visible = true; try { highScoresOption["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_moreGamesOption_TitleScreen_controls_0(){ try { moreGamesOption["componentInspectorSetting"] = true; } catch(e:Error) { }; moreGamesOption.emphasized = false; moreGamesOption.enabled = true; moreGamesOption.label = "more games"; moreGamesOption.labelPlacement = "right"; moreGamesOption.selected = false; moreGamesOption.toggle = false; moreGamesOption.visible = true; try { moreGamesOption["componentInspectorSetting"] = false; } catch(e:Error) { }; } private function optionClickHandler(_arg1:MouseEvent):void{ var _local2:Dictionary = new Dictionary(true); _local2[this.playGameOption] = TitleScreen.PLAY_GAME; _local2[this.settingsOption] = TitleScreen.SHOW_SETTINGS; _local2[this.highScoresOption] = TitleScreen.SHOW_HIGH_SCORES; _local2[this.moreGamesOption] = TitleScreen.LINK_MORE_GAMES; _local2[this.createdByLink] = TitleScreen.LINK_AUTHOR; _local2[this.sponsorLogo] = TitleScreen.LINK_MORE_GAMES; var _local3:String = _local2[_arg1.currentTarget]; this.dispatchEvent(new Event(_local3)); } } }//package com.bowlerhatgames.qrossfire.screens
Section 33
//DashedRectangleSkin (com.bowlerhatgames.qrossfire.skins.DashedRectangleSkin) package com.bowlerhatgames.qrossfire.skins { import flash.display.*; import org.josht.utils.*; public class DashedRectangleSkin extends Sprite { private var _height:Number;// = 0 private var _width:Number;// = 0 private function draw():void{ var _local1:Number = 2; var _local2:Number = 4; this.graphics.clear(); this.graphics.lineStyle(2, 0xFFFFFF, 1, true, LineScaleMode.NORMAL, CapsStyle.SQUARE, JointStyle.MITER); GraphicsUtil.drawDashedLine(this.graphics, 0, 0, this._width, 0, _local1, _local2); GraphicsUtil.drawDashedLine(this.graphics, this._width, 0, this._width, this._height, _local1, _local2); GraphicsUtil.drawDashedLine(this.graphics, this._width, this._height, 0, this._height, _local1, _local2); GraphicsUtil.drawDashedLine(this.graphics, 0, this._height, 0, 0, _local1, _local2); } override public function set height(_arg1:Number):void{ this._height = _arg1; this.draw(); } override public function set width(_arg1:Number):void{ this._width = _arg1; this.draw(); } override public function get width():Number{ return (this._width); } override public function get height():Number{ return (this._height); } } }//package com.bowlerhatgames.qrossfire.skins
Section 34
//LeaderboardUtil (com.bowlerhatgames.qrossfire.utils.LeaderboardUtil) package com.bowlerhatgames.qrossfire.utils { import com.bowlerhatgames.qrossfire.*; public class LeaderboardUtil { public static function getLeaderboardID(_arg1:String):String{ var difficulty = _arg1; var leaderboards:Object = {}; leaderboards[GameSettings.DIFFICULTY_NORMAL] = {n:[8, 0, 10, 5, 5, 6, 13, 5, 12, 13, 12, 0, 4, 2, 9, 3], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; leaderboards[GameSettings.DIFFICULTY_EASY] = {n:[14, 11, 4, 12, 2, 3, 3, 7, 15, 5, 3, 5, 11, 2, 11, 6], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; leaderboards[GameSettings.DIFFICULTY_HARD] = {n:[5, 13, 5, 4, 2, 8, 0, 1, 15, 6, 2, 7, 3, 11, 6, 13], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; var o:Object = leaderboards[difficulty]; return (o.f(0, "")); } } }//package com.bowlerhatgames.qrossfire.utils
Section 35
//NodeUtil (com.bowlerhatgames.qrossfire.utils.NodeUtil) package com.bowlerhatgames.qrossfire.utils { import com.bowlerhatgames.qrossfire.nodes.*; import flash.geom.*; import flash.utils.*; import org.josht.utils.*; import flash.errors.*; public class NodeUtil { public static const COLOR_NAME_TO_BOMB_CLASS:Object = {}; private static const POWERUP_TYPES:Array = [PowerUpNode.TYPE_SKULL, PowerUpNode.TYPE_FIRE]; public static const NODE_SIZE:Number = 40; private static const EXTRA_NODE_BONUS:uint = 50; private static const DISTANCE_BONUS:uint = 25; public static const TYPE_TO_POWERUP_CLASS:Object = {}; public static const NODE_SPACING:Number = 1.5; private static const BASE_MATCH_SCORE:uint = 100; public static const COLOR_NAME_TO_NODE_CLASS:Object = {}; public static const NODE_OFFSET:Number = 41.5; private static const NODE_COLOR_NAMES:Array = ["Red", "Blue", "Green", "Yellow", "Pink", "Gray", "Cyan"]; public static var comboCount:int = 0; public static var lastMatchTime:int = 0; public static var nodeXOffset:Number; public static var sampleNode:Node; public static var gridSize:Number = 7; public static function calculateDistance(_arg1:Node, _arg2:Node, _arg3:Array):int{ var _local4:int = nodeToColumnIndex(_arg1, _arg3); var _local5:int = nodeToRowIndex(_arg1, _arg3); var _local6:int = nodeToColumnIndex(_arg2, _arg3); var _local7:int = nodeToRowIndex(_arg2, _arg3); var _local8:int = Math.abs((_local5 - _local7)); var _local9:int = Math.abs((_local4 - _local6)); if (_local4 == _local6){ return (_local8); }; if (_local5 == _local7){ return (_local9); }; return (Math.min(_local8, _local9)); } public static function columnAndRowToNode(_arg1:int, _arg2:int, _arg3:Array):Node{ var _local4:int = columnAndRowToNodeIndex(_arg1, _arg2); if (_local4 < 0){ return (null); }; return (Node(_arg3[_local4])); } public static function hasPossibleMatches(_arg1:Array):Boolean{ var _local3:int; var _local4:Node; var _local2:int; while (_local2 < gridSize) { _local3 = 0; while (_local3 < gridSize) { _local4 = columnAndRowToNode(_local2, _local3, _arg1); if (isNodeAtColumnAndRowOfColor((_local2 + 2), _local3, _local4.colorName, _arg1)){ if (columnContainsNodeOfColor((_local2 + 1), _local4.colorName, _arg1)){ return (true); }; }; if (isNodeAtColumnAndRowOfColor(_local2, (_local3 + 2), _local4.colorName, _arg1)){ if (rowContainsNodeOfColor((_local3 + 1), _local4.colorName, _arg1)){ return (true); }; }; if (isNodeAtColumnAndRowOfColor((_local2 + 1), _local3, _local4.colorName, _arg1)){ if (((columnContainsNodeOfColor((_local2 + 2), _local4.colorName, _arg1)) || (columnContainsNodeOfColor((_local2 - 1), _local4.colorName, _arg1)))){ return (true); }; }; if (isNodeAtColumnAndRowOfColor(_local2, (_local3 + 1), _local4.colorName, _arg1)){ if (((rowContainsNodeOfColor((_local3 + 2), _local4.colorName, _arg1)) || (rowContainsNodeOfColor((_local3 - 1), _local4.colorName, _arg1)))){ return (true); }; }; _local3++; }; _local2++; }; return (false); } public static function isValidNodeColorForColumn(_arg1:String, _arg2:Array, _arg3:int, _arg4:Array):Boolean{ var _local6:int; var _local5:int; for each (_local6 in _arg2) { if (isNodeAtColumnAndRowOfColor(_local6, _arg3, _arg1, _arg4)){ _local5++; if (_local5 > 1){ return (false); }; }; }; return (true); } public static function rowContainsNodeOfColor(_arg1:int, _arg2:String, _arg3:Array):Boolean{ var _local4:int; while (_local4 < gridSize) { if (isNodeAtColumnAndRowOfColor(_local4, _arg1, _arg2, _arg3)){ return (true); }; _local4++; }; return (false); } public static function columnContainsNodeOfColor(_arg1:int, _arg2:String, _arg3:Array):Boolean{ var _local4:int; while (_local4 < gridSize) { if (isNodeAtColumnAndRowOfColor(_arg1, _local4, _arg2, _arg3)){ return (true); }; _local4++; }; return (false); } public static function findNodesAdjacentToUndetonatedBombs(_arg1:Array, _arg2:Array):Array{ var _local4:Node; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:Node; var _local3:Array = []; for each (_local4 in _arg1) { if ((((_local4 is BombNode)) && (!(BombNode(_local4).detonated)))){ _local5 = NodeUtil.nodeToColumnIndex(_local4, _arg2); _local6 = NodeUtil.nodeToRowIndex(_local4, _arg2); _local7 = (_local5 - 1); while (_local7 <= (_local5 + 1)) { _local8 = (_local6 - 1); while (_local8 <= (_local6 + 1)) { if ((((_local7 == _local5)) && ((_local8 == _local6)))){ } else { _local9 = NodeUtil.columnAndRowToNode(_local7, _local8, _arg2); if (((((_local9) && (!(_local9.matched)))) && ((_local3.indexOf(_local9) < 0)))){ _local3.push(_local9); }; }; _local8++; }; _local7++; }; }; }; return (_local3); } private static function findMatchesOnColumn(_arg1:Node, _arg2:Array):Array{ var _local11:Node; var _local3:Array = []; var _local4:int = nodeToColumnIndex(_arg1, _arg2); var _local5:int = nodeToRowIndex(_arg1, _arg2); var _local6:int = _arg2.indexOf(_arg1); var _local7:int = (_local6 % gridSize); var _local8:int = (_local6 + (gridSize - _local7)); var _local9:int = (_local6 + 1); while (_local9 < _local8) { _local11 = Node(_arg2[_local9]); if (((!(_local11.matched)) && ((((_local11 is PowerUpNode)) || ((_local11.colorName == _arg1.colorName)))))){ _local3.push(_local11); } else { break; }; _local9++; }; var _local10:int = (_local8 - gridSize); _local9 = (_local6 - 1); while (_local9 >= _local10) { _local11 = Node(_arg2[_local9]); if (((!(_local11.matched)) && ((((_local11 is PowerUpNode)) || ((_local11.colorName == _arg1.colorName)))))){ _local3.push(_local11); } else { break; }; _local9--; }; return (_local3); } private static function findPowerUpMatches(_arg1:PowerUpNode, _arg2:Array):Array{ var secondSet:Array; var node = _arg1; var nodes = _arg2; var colIndex:int = NodeUtil.nodeToColumnIndex(node, nodes); var rowIndex:int = NodeUtil.nodeToRowIndex(node, nodes); var nodesToCheck:Array = []; var prevNodeInRow:Node = columnAndRowToNode(colIndex, (rowIndex - 1), nodes); var nextNodeInRow:Node = columnAndRowToNode(colIndex, (rowIndex + 1), nodes); var prevNodeInCol:Node = columnAndRowToNode((colIndex - 1), rowIndex, nodes); var nextNodeInCol:Node = columnAndRowToNode((colIndex + 1), rowIndex, nodes); if (prevNodeInRow){ nodesToCheck.push(prevNodeInRow); }; if (nextNodeInRow){ nodesToCheck.push(nextNodeInRow); }; if (prevNodeInCol){ nodesToCheck.push(prevNodeInCol); }; if (nextNodeInCol){ nodesToCheck.push(nextNodeInCol); }; nodesToCheck = nodesToCheck.map(function (_arg1:Node, _arg2:int, _arg3:Array):Array{ if ((_arg1 is PowerUpNode)){ return ([]); }; return (findMatches(_arg1, nodes)); }); nodesToCheck = nodesToCheck.sortOn("length", Array.DESCENDING); var firstSet:Array = (nodesToCheck[0] as Array); if (nodesToCheck.length > 1){ secondSet = (nodesToCheck[1] as Array); if ((((((firstSet.length > 0)) && ((secondSet.length > 0)))) && ((Node(firstSet[0]).colorName == Node(firstSet[1]).colorName)))){ return (firstSet.concat(secondSet)); }; }; return (firstSet); } private static function initializeLookupTables():void{ var _local1:String; var _local2:String; for each (_local1 in NODE_COLOR_NAMES) { COLOR_NAME_TO_NODE_CLASS[_local1] = getDefinitionByName(("Node" + _local1)); COLOR_NAME_TO_BOMB_CLASS[_local1] = getDefinitionByName(("Bomb" + _local1)); }; for each (_local2 in POWERUP_TYPES) { TYPE_TO_POWERUP_CLASS[_local2] = getDefinitionByName(("PowerUp" + _local2)); }; sampleNode = new (COLOR_NAME_TO_NODE_CLASS[NODE_COLOR_NAMES[0]]); nodeXOffset = (((NODE_SIZE * Math.SQRT2) - sampleNode.width) / 2); } public static function isValidNodeColor(_arg1:String, _arg2:int, _arg3:int, _arg4:Array):Boolean{ if (!isValidNodeColorForColumn(_arg1, wrapIndices([(_arg2 - 1), (_arg2 - 2)]), _arg3, _arg4)){ return (false); }; if (!isValidNodeColorForColumn(_arg1, wrapIndices([(_arg2 + 1), (_arg2 + 2)]), _arg3, _arg4)){ return (false); }; if (!isValidNodeColorForColumn(_arg1, wrapIndices([(_arg2 - 1), (_arg2 + 1)]), _arg3, _arg4)){ return (false); }; if (!isValidNodeColorForRow(_arg1, _arg2, wrapIndices([(_arg3 - 1), (_arg3 - 2)]), _arg4)){ return (false); }; if (!isValidNodeColorForRow(_arg1, _arg2, wrapIndices([(_arg3 + 1), (_arg3 + 2)]), _arg4)){ return (false); }; if (!isValidNodeColorForRow(_arg1, _arg2, wrapIndices([(_arg3 - 1), (_arg3 + 1)]), _arg4)){ return (false); }; return (true); } public static function findNodesInSameRowOrColumnAsFlame(_arg1:PowerUpNode, _arg2:Array):Array{ var _local7:Node; var _local3:Array = []; var _local4:int = nodeToColumnIndex(_arg1, _arg2); var _local5:int = nodeToRowIndex(_arg1, _arg2); var _local6:int; while (_local6 < gridSize) { if (_local6 != _local4){ _local7 = columnAndRowToNode(_local6, _local5, _arg2); if (!_local7.matched){ _local3.push(_local7); }; }; if (_local6 != _local5){ _local7 = columnAndRowToNode(_local4, _local6, _arg2); if (!_local7.matched){ _local3.push(_local7); }; }; _local6++; }; return (_local3); } public static function findMatches(_arg1:Node, _arg2:Array):Array{ var _local8:Node; var _local9:Node; if (_arg1.matched){ return ([]); }; if ((_arg1 is PowerUpNode)){ return (findPowerUpMatches(PowerUpNode(_arg1), _arg2)); }; var _local3:Array = [_arg1]; var _local4:Array = NodeUtil.findMatchesOnRow(_arg1, _arg2); var _local5:Array = NodeUtil.findMatchesOnColumn(_arg1, _arg2); var _local6:Array = ((_local4.length < _local5.length)) ? _local5 : _local4; for each (_local8 in _local6) { if (_local3.indexOf(_local8) < 0){ _local3.push(_local8); }; }; if (_local3.length < 3){ return ([]); }; var _local7:Array = NodeUtil.findNodesAdjacentToUndetonatedBombs(_local3, _arg2); for each (_local8 in _local3) { if ((_local8 is BombNode)){ BombNode(_local8).detonated = true; }; }; for each (_local9 in _local7) { if (((_local9) && ((_local3.indexOf(_local9) < 0)))){ _local3.push(_local9); }; }; for each (_local8 in _local3) { if ((((_local8 is PowerUpNode)) && ((PowerUpNode(_local8).type == PowerUpNode.TYPE_FIRE)))){ _local7 = findNodesInSameRowOrColumnAsFlame(PowerUpNode(_local8), _arg2); for each (_local9 in _local7) { if (((_local9) && ((_local3.indexOf(_local9) < 0)))){ _local3.push(_local9); }; }; break; }; }; return (_local3); } public static function nodeToColumnIndex(_arg1:Node, _arg2:Array):int{ var _local3:int = _arg2.indexOf(_arg1); return ((_local3 % gridSize)); } public static function nodeToRowIndex(_arg1:Node, _arg2:Array):int{ var _local3:int = _arg2.indexOf(_arg1); return ((_local3 / gridSize)); } public static function calculateMatchScore(_arg1:Array, _arg2:int):uint{ var _local3:int = _arg1.length; var _local4:uint = ((_local3 - 3) * EXTRA_NODE_BONUS); var _local5:uint = (_arg2 * DISTANCE_BONUS); var _local6:int = getTimer(); if ((_local6 - lastMatchTime) < 450){ comboCount++; } else { comboCount = 1; }; lastMatchTime = _local6; var _local7:uint = (((BASE_MATCH_SCORE + _local4) + _local5) * comboCount); return (_local7); } public static function columnAndRowToXY(_arg1:int, _arg2:int):Point{ var _local3:Point = new Point((_arg1 * NODE_OFFSET), (_arg2 * NODE_OFFSET)); _local3 = PointUtil.rotate(_local3, ((45 * Math.PI) / 180)); _local3.x = (_local3.x + nodeXOffset); _local3.y = (_local3.y - (sampleNode.height / 2)); return (_local3); } public static function isValidNodeColorForRow(_arg1:String, _arg2:int, _arg3:Array, _arg4:Array):Boolean{ var _local6:int; var _local5:int; for each (_local6 in _arg3) { if (isNodeAtColumnAndRowOfColor(_arg2, _local6, _arg1, _arg4)){ _local5++; if (_local5 > 1){ return (false); }; }; }; return (true); } private static function findMatchesOnRow(_arg1:Node, _arg2:Array):Array{ var _local9:Node; var _local3:Array = []; var _local4:int = nodeToColumnIndex(_arg1, _arg2); var _local5:int = nodeToRowIndex(_arg1, _arg2); var _local6:int = _arg2.indexOf(_arg1); var _local7:int = _arg2.length; var _local8:int = (_local6 + gridSize); while (_local8 < _local7) { _local9 = Node(_arg2[_local8]); if (((!(_local9.matched)) && ((((_local9 is PowerUpNode)) || ((_local9.colorName == _arg1.colorName)))))){ _local3.push(_local9); } else { break; }; _local8 = (_local8 + gridSize); }; _local8 = (_local6 - gridSize); while (_local8 >= 0) { _local9 = Node(_arg2[_local8]); if (((!(_local9.matched)) && ((((_local9 is PowerUpNode)) || ((_local9.colorName == _arg1.colorName)))))){ _local3.push(_local9); } else { break; }; _local8 = (_local8 - gridSize); }; return (_local3); } public static function randomColorForColumnAndRow(_arg1:int, _arg2:int, _arg3:Array):String{ var _local5:String; var _local6:*; var _local4:Array = NODE_COLOR_NAMES.concat(); do { if (_local5){ _local6 = _local4.indexOf(_local5); if (_local4.length == 0){ throw (new IllegalOperationError("No valid color name is available!")); }; }; _local5 = _local4[Math.floor((Math.random() * _local4.length))]; } while (!(NodeUtil.isValidNodeColor(_local5, _arg1, _arg2, _arg3))); return (_local5); } public static function randomColor():String{ return (NODE_COLOR_NAMES[Math.floor((Math.random() * NODE_COLOR_NAMES.length))]); } public static function containsPowerUpOfType(_arg1:String, _arg2:Array):Boolean{ var _local3:Node; for each (_local3 in _arg2) { if ((((_local3 is PowerUpNode)) && ((PowerUpNode(_local3).type == _arg1)))){ return (true); }; }; return (false); } public static function isNodeAtColumnAndRowOfColor(_arg1:int, _arg2:int, _arg3:String, _arg4:Array):Boolean{ var _local5:Node = columnAndRowToNode(_arg1, _arg2, _arg4); return (((_local5) && ((_local5.colorName == _arg3)))); } public static function columnAndRowToNodeIndex(_arg1:int, _arg2:int):int{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= gridSize)))) || ((_arg2 >= gridSize)))){ return (-1); }; return (((_arg2 * gridSize) + _arg1)); } public static function wrapIndices(_arg1:Array):Array{ var indices = _arg1; return (indices.map(function (_arg1:int, _arg2:int, _arg3:Array):int{ return (((_arg1 < 0)) ? (gridSize + _arg1) : ((_arg1 >= gridSize)) ? (_arg1 - gridSize) : _arg1); })); } initializeLookupTables(); } }//package com.bowlerhatgames.qrossfire.utils
Section 36
//Game (com.bowlerhatgames.qrossfire.Game) package com.bowlerhatgames.qrossfire { import flash.display.*; import flash.events.*; import gs.*; import com.bowlerhatgames.display.*; import mochi.as3.*; import org.josht.media.*; import gs.plugins.*; import flash.media.*; import flash.net.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import com.bowlerhatgames.qrossfire.screens.*; public class Game extends GameRoot { private var _settings:GameSettings; private var _musicFade:TweenMax; private var _mochiContainer:MovieClip; private var _backgroundMusic:SoundChannel; private var _screenNav:ScreenNavigator; private var _gameActive:Boolean;// = false private static const ADVERTISEMENT:String = "advertisement"; private static const INSTRUCTIONS_SCREEN:String = "instructionsScreen"; private static const SETTINGS_SCREEN:String = "settingsScreen"; public static const GAME_ID:String = "Qrossfire"; private static const TITLE_SCREEN:String = "titleScreen"; private static const HIGH_SCORE_SCREEN:String = "highScoreScreen"; private static const GAME_BOARD:String = "gameBoard"; public function Game(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } private function stopMusic():void{ if (this._musicFade){ TweenMax.removeTween(this._musicFade); this._musicFade = null; }; if (this._backgroundMusic){ this._musicFade = TweenMax.to(this._backgroundMusic, 0.5, {volume:0, onComplete:musicFadeOutComplete}); }; } private function get gameActive():Boolean{ return (this._gameActive); } private function initialize():void{ this._mochiContainer = new MovieClip(); this.addChild(this._mochiContainer); MochiServices.connect("20c08cf2db70379b", this._mochiContainer); this.graphics.beginFill(0xFF00FF, 0); this.graphics.drawRect(0, 0, this.loaderInfo.width, this.loaderInfo.height); this.graphics.endFill(); this._settings = new GameSettings(GAME_ID); this._settings.addEventListener(GameSettings.MUSIC_CHANGE, musicChangeHandler); this._settings.addEventListener(GameSettings.SOUND_FX_CHANGE, soundFxChangeHandler); SoundEventManager.mute = !(this._settings.soundEffectsOn); this._screenNav = new ScreenNavigator(); this._screenNav.addEventListener(Event.CHANGE, screenNavChangeHandler); this.addChild(this._screenNav); var _local1:Object = {}; _local1[TitleScreen.PLAY_GAME] = _slot1.INSTRUCTIONS_SCREEN; _local1[TitleScreen.SHOW_HIGH_SCORES] = _slot1.HIGH_SCORE_SCREEN; _local1[TitleScreen.SHOW_SETTINGS] = _slot1.SETTINGS_SCREEN; _local1[TitleScreen.LINK_MORE_GAMES] = moreGamesLinkHandler; _local1[TitleScreen.LINK_AUTHOR] = authorLinkHandler; var _local2:ScreenNavigatorItem = new ScreenNavigatorItem(TitleScreen, _local1); this._screenNav.addScreen(_slot1.TITLE_SCREEN, _local2); var _local3:ScreenNavigatorItem = new ScreenNavigatorItem(SettingsScreen, {complete:_slot1.TITLE_SCREEN}, {settings:this._settings}); this._screenNav.addScreen(_slot1.SETTINGS_SCREEN, _local3); var _local4:ScreenNavigatorItem = new ScreenNavigatorItem(HighScoresScreen, {complete:_slot1.TITLE_SCREEN}, {settings:this._settings}); this._screenNav.addScreen(_slot1.HIGH_SCORE_SCREEN, _local4); var _local5:ScreenNavigatorItem = new ScreenNavigatorItem(InstructionsScreen, {complete:_slot1.GAME_BOARD}, {settings:this._settings}); this._screenNav.addScreen(_slot1.INSTRUCTIONS_SCREEN, _local5); var _local6:Object = {}; _local6[Event.COMPLETE] = _slot1.GAME_BOARD; var _local7:ScreenNavigatorItem = new ScreenNavigatorItem(AdvertisementScreen, _local6); this._screenNav.addScreen(_slot1.ADVERTISEMENT, _local7); var _local8:Object = {}; _local8[Event.CANCEL] = _slot1.TITLE_SCREEN; _local8[Event.COMPLETE] = _slot1.ADVERTISEMENT; _local8[GameScreen.LINK_MORE_GAMES] = moreGamesLinkHandler; var _local9:ScreenNavigatorItem = new ScreenNavigatorItem(GameScreen, _local8, {settings:this._settings}); this._screenNav.addScreen(_slot1.GAME_BOARD, _local9); this._screenNav.showDefaultScreen(); this.startMusic(); this.setChildIndex(this._mochiContainer, (this.numChildren - 1)); } private function musicChangeHandler(_arg1:Event):void{ if (((((!(this._gameActive)) && (this._settings.musicOn))) && (!(this._backgroundMusic)))){ this.startMusic(); } else { if (((!(this._settings.musicOn)) && (this._backgroundMusic))){ this.stopMusic(); }; }; } private function titleScreenPlayGameListener(_arg1:Event):void{ this._screenNav.clearScreen(); } private function musicFadeInComplete():void{ this._musicFade = null; } private function startMusic():void{ if (this._musicFade){ TweenMax.removeTween(this._musicFade); this._musicFade = null; }; if (this._backgroundMusic){ this._backgroundMusic.stop(); this._backgroundMusic = null; }; if (this._settings.musicOn){ this._backgroundMusic = new MenuBackgroundMusic().play(0, int.MAX_VALUE, new SoundTransform(0)); this._musicFade = TweenMax.to(this._backgroundMusic, 0.15, {volume:1, onComplete:musicFadeInComplete}); }; } private function moreGamesLinkHandler(_arg1:Event):void{ navigateToURL(new URLRequest(this._settings.moreGamesURL), "_blank"); } private function authorLinkHandler(_arg1:Event):void{ navigateToURL(new URLRequest(this._settings.authorURL), "_blank"); } private function musicFadeOutComplete():void{ this._musicFade = null; this._backgroundMusic.stop(); this._backgroundMusic = null; } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.initialize(); } private function screenNavChangeHandler(_arg1:Event):void{ if ((this._screenNav.activeScreen is GameScreen)){ this.gameActive = true; } else { this.gameActive = false; }; } private function set gameActive(_arg1:Boolean):void{ if (this._gameActive == _arg1){ return; }; this._gameActive = _arg1; if (this._gameActive){ this.stopMusic(); } else { this.startMusic(); }; } private function soundFxChangeHandler(_arg1:Event):void{ SoundEventManager.mute = !(this._settings.soundEffectsOn); } TweenPlugin.activate([ColorTransformPlugin]); } }//package com.bowlerhatgames.qrossfire
Section 37
//GameBoard (com.bowlerhatgames.qrossfire.GameBoard) package com.bowlerhatgames.qrossfire { import com.bowlerhatgames.qrossfire.nodes.*; import flash.display.*; import flash.geom.*; import flash.events.*; import gs.*; import flash.filters.*; import gs.events.*; import com.bowlerhatgames.qrossfire.events.*; import com.bowlerhatgames.display.*; import com.bowlerhatgames.qrossfire.utils.*; import com.yahoo.astra.utils.*; import gs.easing.*; import flash.utils.*; import com.bowlerhatgames.effects.gs.*; import com.bowlerhatgames.qrossfire.assets.audio.*; import flash.errors.*; public class GameBoard extends Sprite { private var _matchEffectTargets:Array; private var _lastMatchSoundTime:int;// = 0 private var _removedNodes:Array; private var _selectedNode:Node; private var _nodesToReplace:Array; private var _selectionFade:TweenMax; private var _nodeToMatchData:Dictionary; private var _gameOver:Boolean;// = true private var _paused:Boolean; private var _fillFromLeft:Boolean;// = false private var _slideStartColumn:int; private var _movedNodes:Array; private var _lastMatchDistance:int;// = 0 private var _warningEffect:TweenMax; private var _automaticSlide:Boolean;// = false private var _nodeMask:Sprite; private var _boardBackground:Sprite; private var _settings:GameSettings; private var _demoMode:Boolean;// = false private var _bombComboCount:int;// = 0 private var _lastBombSoundTime:int;// = 0 public var stats:SessionStatistics; private var _nodeContainer:Sprite; private var _slide:TweenMax; private var _delayedBombs:Array; private var _nodes:Array; private var _lastRolledOverNode:Node;// = null private var _demoTypes:Array; public var selectionIndicator:Sprite; private var _blitzMode:Boolean;// = false private var _slideStartRow:int; private var _slideStartNode:Node; private static const BOMB_MINIMUM_MATCH_COUNT:int = 4; private static const FLAME_MINIMUM_MATCH_COUNT:int = 5; private static const POWERUP_BOMB_MINIMUM_COMBO_COUNT:int = 3; public function GameBoard(_arg1:int=8, _arg2:Boolean=false, _arg3:Array=null){ _nodes = []; _removedNodes = []; _matchEffectTargets = []; _nodeToMatchData = new Dictionary(true); _delayedBombs = []; _movedNodes = []; _nodesToReplace = []; super(); this._demoMode = _arg2; this._demoTypes = _arg3; this.mouseChildren = false; NodeUtil.gridSize = _arg1; this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); } private function continueAfterMatchEffect():void{ var _local1:Array; var _local2:BombNode; this._automaticSlide = false; if (this._delayedBombs.length > 0){ _local1 = NodeUtil.findNodesAdjacentToUndetonatedBombs(this._delayedBombs, this._nodes); for each (_local2 in this._delayedBombs) { _local2.detonated = true; }; _local1 = _local1.concat(this._delayedBombs); this._delayedBombs = []; this.handleMatches(_local1, 0); } else { if (NodeUtil.hasPossibleMatches(this._nodes)){ this.mouseChildren = ((!(this._demoMode)) && (true)); this._bombComboCount = 0; } else { this.dispatchEvent(new GameOverEvent(GameOverEvent.GAME_OVER, "game over: no moves left!")); }; }; } private function levelUpEffectCompleteHandler(_arg1:Event):void{ if (((!(this._gameOver)) && (this._warningEffect))){ this._warningEffect.resume(); }; } private function showSelection(_arg1:Node):void{ var _local2:Point = new Point(0, 0); _local2 = DisplayObjectUtil.localToLocal(_local2, _arg1, this); this.selectionIndicator.x = _local2.x; this.selectionIndicator.y = _local2.y; if (this._selectionFade){ TweenMax.removeTween(this._selectionFade); this._selectionFade = null; }; this._selectionFade = TweenMax.to(this.selectionIndicator, 0.15, {autoAlpha:1, onComplete:selectionIndicatorFadeCompleteHandler}); } private function nodeContainer_rollOutHandler(_arg1:MouseEvent):void{ this.selectionIndicator.graphics.clear(); } private function createMatchEffect(_arg1:Node, _arg2:MatchData):void{ var _local3:PowerUpNode; var _local4:PowerUpNode; var _local5:int; this._nodeContainer.setChildIndex(_arg1, (this._nodeContainer.numChildren - 1)); if (_arg2.containsFlamePowerUp){ for each (_local4 in _arg2.powerups) { if (_local4.type == PowerUpNode.TYPE_FIRE){ _local3 = _local4; break; }; }; _local5 = NodeUtil.calculateDistance(_local3, _arg1, this._nodes); this.createFlameMatchEffect(_arg1, _local5); } else { if (_arg2.bombs.length > 0){ this.createBombMatchEffect(_arg1); } else { this.createNormalMatchEffect(_arg1); }; }; this._nodeToMatchData[_arg1] = _arg2; this._matchEffectTargets.push(_arg1); } private function nodeRollOutHandler(_arg1:MouseEvent):void{ var _local9:Node; this.selectionIndicator.graphics.clear(); this._lastRolledOverNode = null; var _local2:Node = Node(_arg1.currentTarget); if (!this._selectedNode){ _local2.highlighted = false; return; }; if (this._selectedNode == _local2){ return; }; var _local3:int = NodeUtil.nodeToRowIndex(_local2, this._nodes); var _local4:int = NodeUtil.nodeToColumnIndex(_local2, this._nodes); var _local5:int = NodeUtil.nodeToRowIndex(this._selectedNode, this._nodes); var _local6:int = NodeUtil.nodeToColumnIndex(this._selectedNode, this._nodes); var _local7:int = this._nodes.length; var _local8:int; while (_local8 < _local7) { _local9 = Node(this._nodes[_local8]); if (_local9 == _local2){ } else { if (((((!((_local3 == _local5))) && ((_local3 == NodeUtil.nodeToRowIndex(_local9, this._nodes))))) || (((!((_local4 == _local6))) && ((_local4 == NodeUtil.nodeToColumnIndex(_local9, this._nodes))))))){ _local9.highlighted = false; }; }; _local8++; }; } public function selectNode(_arg1:int, _arg2:int):void{ var _local3:Node = NodeUtil.columnAndRowToNode(_arg1, _arg2, this._nodes); _local3.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_DOWN)); } private function createBombMatchEffect(_arg1:Node):void{ var _local2:Number = 0.3; var _local3:TweenMax = TweenMax.to(_arg1, _local2, {colorTransform:{redMultiplier:0.5, greenMultiplier:0.5, blueMultiplier:0.5, redOffset:0xFF, greenOffset:153, blueOffset:0}}); _local3.ease = Quad.easeOut; var _local4:TweenMax = TweenMax.to(_arg1, _local2, {alpha:0, blurFilter:{blurX:50, blurY:50}}); _local4.ease = Quad.easeIn; _local4.addEventListener(Event.COMPLETE, nodeMatchEffectCompleteHandler); } private function createRandomBomb(_arg1:int, _arg2:int, _arg3:Boolean=false):Node{ var _local7:String; var _local4:Boolean = (((_arg1 >= 0)) && ((_arg2 >= 0))); if (_arg3){ _local7 = NodeUtil.randomColorForColumnAndRow(_arg1, _arg2, this._nodes); } else { _local7 = NodeUtil.randomColor(); }; var _local5:Class = Class(NodeUtil.COLOR_NAME_TO_BOMB_CLASS[_local7]); var _local6:Node = this.createNode(_local5); if ((((_arg1 >= 0)) && ((_arg2 >= 0)))){ _local6.name = ((("bomb-" + _arg1) + "x") + _arg2); }; return (_local6); } public function get settings():GameSettings{ return (this._settings); } private function createNode(_arg1:Class):Node{ var _local2:Node = new (_arg1); _local2.addEventListener(MouseEvent.MOUSE_DOWN, nodeMouseDownHandler); _local2.addEventListener(MouseEvent.CLICK, nodeClickListener); _local2.addEventListener(MouseEvent.ROLL_OVER, nodeRollOverHandler); _local2.addEventListener(MouseEvent.ROLL_OUT, nodeRollOutHandler); this._nodeContainer.addChild(_local2); return (_local2); } private function createDuplicateNode(_arg1:Node):Node{ var _local2:Class = Object(_arg1).constructor; var _local3:Node = this.createNode(_local2); _local3.name = _arg1.name; return (_local3); } private function destroyNode(_arg1:Node):void{ if (!this._nodeContainer.contains(_arg1)){ throw (new IllegalOperationError(("unable to destroy node: " + _arg1))); }; _arg1.removeEventListener(MouseEvent.MOUSE_DOWN, nodeMouseDownHandler); _arg1.removeEventListener(MouseEvent.CLICK, nodeClickListener); _arg1.removeEventListener(MouseEvent.ROLL_OVER, nodeRollOverHandler); _arg1.removeEventListener(MouseEvent.ROLL_OUT, nodeRollOutHandler); this._nodeContainer.removeChild(_arg1); } public function get paused():Boolean{ return (this._paused); } private function fillGapsFromTopRight():void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Node; var _local8:Point; var _local9:int; var _local10:int; var _local11:int; var _local12:Point; this._movedNodes = []; var _local1:int; while (_local1 < NodeUtil.gridSize) { _local2 = 0; while (_local2 < NodeUtil.gridSize) { _local3 = NodeUtil.columnAndRowToNodeIndex(_local2, _local1); if (!this._nodes[_local3]){ _local4 = -1; _local5 = (_local2 + 1); while (_local5 < NodeUtil.gridSize) { _local6 = NodeUtil.columnAndRowToNodeIndex(_local5, _local1); if (!this._nodes[_local6]){ _local4--; } else { _local7 = (this._nodes[(_local6 + _local4)] = this._nodes[_local6]); this._nodes[_local6] = null; _local8 = NodeUtil.columnAndRowToXY((_local5 + _local4), _local1); this._slide = TweenMax.to(_local7, 0.25, {x:_local8.x, y:_local8.y}); this._slide.ease = Quad.easeOut; this._movedNodes.push(_local7); }; _local5++; }; _local5 = _local4; while (_local5 < 0) { _local7 = Node(this._nodesToReplace.shift()); _local9 = (NodeUtil.gridSize + _local5); _local10 = _local1; _local6 = NodeUtil.columnAndRowToNodeIndex(_local9, _local10); _local7 = this.replaceNode(_local7); this._nodes[_local6] = _local7; _local11 = (NodeUtil.gridSize - (_local4 + _local5)); _local12 = NodeUtil.columnAndRowToXY(_local11, _local10); _local7.x = _local12.x; _local7.y = _local12.y; _local8 = NodeUtil.columnAndRowToXY(_local9, _local10); this._slide = TweenMax.to(_local7, 0.25, {x:_local8.x, y:_local8.y}); this._slide.ease = Quad.easeOut; this._movedNodes.push(_local7); _local5++; }; }; _local2++; }; _local1++; }; } private function slideAsMove(_arg1:Node, _arg2:Node):void{ if (this._settings.soundEffectsOn){ new SlideSound().play(); }; this.selectedNode = null; var _local3:int = NodeUtil.nodeToColumnIndex(_arg1, this._nodes); var _local4:int = NodeUtil.nodeToRowIndex(_arg1, this._nodes); var _local5:int = NodeUtil.nodeToColumnIndex(_arg2, this._nodes); var _local6:int = NodeUtil.nodeToRowIndex(_arg2, this._nodes); var _local7:int = ((_local3 == _local5)) ? (_local6 - _local4) : (_local5 - _local3); this._lastMatchDistance = Math.abs(_local7); this.slide(_arg1, _arg2); if (this._slide){ this._slide.addEventListener(TweenEvent.COMPLETE, slideAsMoveCompleteHandler); }; } private function slideWithoutMatch(_arg1:Node, _arg2:Node):void{ this.slide(_arg1, _arg2); this._lastMatchDistance = 0; if (this._slide){ this._slide.addEventListener(TweenEvent.COMPLETE, slideWithoutMatchCompleteHandler); }; } public function get selectedNode():Node{ return (this._selectedNode); } public function set settings(_arg1:GameSettings):void{ this._settings = _arg1; } public function reset():void{ var _local1:Node; var _local3:int; var _local4:Point; var _local5:Node; for each (_local1 in this._nodes) { this.destroyNode(_local1); }; this._nodes = []; this._selectedNode = null; if (this._slide){ TweenMax.removeTween(this._slide); this._slide = null; }; if (this._selectionFade){ TweenMax.removeTween(this._selectionFade); this._selectionFade = null; }; this.selectionIndicator.visible = false; this.selectionIndicator.alpha = 0; this.selectionIndicator.x = 10; this.selectionIndicator.y = 10; this.selectionIndicator.mouseEnabled = (this.selectionIndicator.mouseChildren = false); var _local2:int; while (_local2 < NodeUtil.gridSize) { _local3 = 0; while (_local3 < NodeUtil.gridSize) { _local4 = NodeUtil.columnAndRowToXY(_local3, _local2); _local5 = this.createRandomNode(_local3, _local2, true); _local5.x = _local4.x; _local5.y = _local4.y; this._nodes.push(_local5); _local3++; }; _local2++; }; this.blitzMode = false; this._bombComboCount = 0; this._delayedBombs = []; NodeUtil.lastMatchTime = 0; NodeUtil.comboCount = 0; this.stats = new SessionStatistics(); if (this.loaderInfo.url.indexOf("file://") < 0){ MochiBot.track(this, "5494d678"); }; } private function fillGapsFromTopLeft():void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Node; var _local9:Point; var _local10:int; var _local11:Point; this._movedNodes = []; var _local1:int; while (_local1 < NodeUtil.gridSize) { _local2 = (NodeUtil.gridSize - 1); while (_local2 >= 0) { _local3 = NodeUtil.columnAndRowToNodeIndex(_local1, _local2); if (!this._nodes[_local3]){ _local4 = 1; _local5 = (_local2 - 1); while (_local5 >= 0) { _local6 = NodeUtil.columnAndRowToNodeIndex(_local1, _local5); if (!this._nodes[_local6]){ _local4++; } else { _local7 = NodeUtil.columnAndRowToNodeIndex(_local1, (_local5 + _local4)); _local8 = (this._nodes[_local7] = this._nodes[_local6]); this._nodes[_local6] = null; _local9 = NodeUtil.columnAndRowToXY(_local1, (_local5 + _local4)); this._slide = TweenMax.to(_local8, 0.25, {x:_local9.x, y:_local9.y}); this._slide.ease = Quad.easeOut; this._movedNodes.push(_local8); }; _local5--; }; _local5 = 0; while (_local5 < _local4) { _local8 = Node(this._nodesToReplace.shift()); _local6 = NodeUtil.columnAndRowToNodeIndex(_local1, _local5); _local8 = this.replaceNode(_local8); this._nodes[_local6] = _local8; _local10 = -((_local5 + 1)); _local11 = NodeUtil.columnAndRowToXY(_local1, _local10); _local8.x = _local11.x; _local8.y = _local11.y; _local9 = NodeUtil.columnAndRowToXY(_local1, _local5); this._slide = TweenMax.to(_local8, 0.25, {x:_local9.x, y:_local9.y}); this._slide.ease = Quad.easeOut; this._movedNodes.push(_local8); _local5++; }; }; _local2--; }; _local1++; }; } public function set paused(_arg1:Boolean):void{ this._paused = _arg1; this.mouseChildren = ((!(this._demoMode)) && (!(this._paused))); this._nodeContainer.visible = ((this._gameOver) || (!(this._paused))); } public function get blitzMode():Boolean{ return (this._blitzMode); } private function hideSelection():void{ if (this._selectionFade){ TweenMax.removeTween(this._selectionFade); this._selectionFade = null; }; this._selectionFade = TweenMax.to(this.selectionIndicator, 0.15, {autoAlpha:0, onComplete:selectionIndicatorFadeCompleteHandler}); } public function stopWarningEffect():void{ if (this._warningEffect){ this._warningEffect.pause(); TweenMax.removeTween(this._warningEffect); this._warningEffect = null; this._boardBackground.transform.colorTransform = new ColorTransform(); }; } public function getPositionOfColumnAndRow(_arg1:int, _arg2:int):Point{ var _local3:Point = NodeUtil.columnAndRowToXY(_arg1, _arg2); _local3.x = (_local3.x + (this._nodeContainer.x - this._boardBackground.x)); _local3.y = (_local3.y + (this._nodeContainer.y - this._boardBackground.y)); return (_local3); } private function showMatches(_arg1:MatchData):void{ var _local3:Node; if (((_arg1.containsFlamePowerUp) && (this._settings.soundEffectsOn))){ new FlamePowerUpSound().play(); }; var _local2:int = getTimer(); if (_arg1.bombs.length > 0){ if ((_local2 - this._lastBombSoundTime) > 250){ if (this._settings.soundEffectsOn){ new BombExplodeSound().play(); }; this._lastBombSoundTime = _local2; }; } else { if ((_local2 - this._lastMatchSoundTime) > 250){ if (this._settings.soundEffectsOn){ new MatchSound().play(); }; this._lastMatchSoundTime = _local2; }; }; for each (_local3 in _arg1.nodes) { if (this._matchEffectTargets.indexOf(_local3) >= 0){ throw (new IllegalOperationError("Cannot match an already matched node")); }; if ((_local3 is BombNode)){ if (BombNode(_local3).detonated){ this._bombComboCount++; this.createMatchEffect(_local3, _arg1); } else { this._delayedBombs.push(_local3); }; } else { this.createMatchEffect(_local3, _arg1); }; }; } public function playWarningEffect():void{ this._warningEffect = TweenMax.to(this._boardBackground, 0.35, {repeat:-1, yoyo:true, colorTransform:{redOffset:153}}); } public function set selectedNode(_arg1:Node):void{ var _local6:Node; this._selectedNode = _arg1; var _local2:int = NodeUtil.nodeToRowIndex(this._selectedNode, this._nodes); var _local3:int = NodeUtil.nodeToColumnIndex(this._selectedNode, this._nodes); var _local4:int = this._nodes.length; var _local5:int; while (_local5 < _local4) { _local6 = Node(this._nodes[_local5]); if (_local6 != this._selectedNode){ if (this._selectedNode){ _local6.enabled = (((NodeUtil.nodeToRowIndex(_local6, this._nodes) == _local2)) || ((NodeUtil.nodeToColumnIndex(_local6, this._nodes) == _local3))); } else { _local6.enabled = true; _local6.highlighted = false; }; }; _local5++; }; if (this._selectedNode){ this.showSelection(this._selectedNode); } else { this.hideSelection(); }; } private function fillGaps():void{ var _local1:Node; var _local2:int; for each (_local1 in this._nodesToReplace) { _local2 = this._nodes.indexOf(_local1); this._nodes[_local2] = null; }; if (this._fillFromLeft){ this.fillGapsFromTopLeft(); } else { this.fillGapsFromTopRight(); }; if (this._slide){ for each (_local1 in this._movedNodes) { _local1.cacheAsBitmap = true; }; this._fillFromLeft = !(this._fillFromLeft); this._automaticSlide = true; this._slide.addEventListener(Event.COMPLETE, slideAsMoveCompleteHandler); } else { this.continueAfterMatchEffect(); }; } private function createRandomNode(_arg1:int=-1, _arg2:int=-1, _arg3:Boolean=false):Node{ var _local6:Class; var _local7:String; var _local8:String; var _local4:Boolean = (((_arg1 >= 0)) && ((_arg2 >= 0))); if (((!(this._demoMode)) || (!(this._demoTypes)))){ if (_arg3){ _local7 = NodeUtil.randomColorForColumnAndRow(_arg1, _arg2, this._nodes); } else { _local7 = NodeUtil.randomColor(); }; _local6 = Class(NodeUtil.COLOR_NAME_TO_NODE_CLASS[_local7]); } else { _local8 = this._demoTypes.shift(); this._demoTypes.push(_local8); _local6 = Class(NodeUtil.COLOR_NAME_TO_NODE_CLASS[_local8]); }; var _local5:Node = this.createNode(_local6); if ((((_arg1 >= 0)) && ((_arg2 >= 0)))){ _local5.name = ((("node-" + _arg1) + "x") + _arg2); }; return (_local5); } private function initialize():void{ var _local1:Number = ((20 + (NodeUtil.NODE_OFFSET * (NodeUtil.gridSize - 1))) + NodeUtil.NODE_SIZE); var _local2:Number = ((20 + (NodeUtil.NODE_OFFSET * (NodeUtil.gridSize - 1))) + NodeUtil.NODE_SIZE); this._boardBackground = new Sprite(); this._boardBackground.graphics.beginFill(0); this._boardBackground.graphics.drawRoundRect(0, 0, _local1, _local2, 30); this._boardBackground.graphics.endFill(); this.addChild(this._boardBackground); DynamicRegistration.rotate(this._boardBackground, new Point((_local1 / 2), (_local2 / 2)), -45); this._boardBackground.x = (this._boardBackground.x - (_local1 / 2)); this._boardBackground.y = (this._boardBackground.y - (_local2 / 2)); var _local3:Number = (_local1 - 20); var _local4:Number = (_local2 - 20); var _local5:Number = ((_local1 - _local3) / 2); var _local6:Number = ((_local2 - _local4) / 2); this._nodeMask = new Sprite(); this._nodeMask.x = _local5; this._nodeMask.y = _local6; this._nodeMask.graphics.beginFill(0xFF00FF); this._nodeMask.graphics.drawRect(0, 0, _local3, _local4); this._nodeMask.graphics.endFill(); this.addChild(this._nodeMask); DynamicRegistration.rotate(this._nodeMask, new Point((_local3 / 2), (_local4 / 2)), -45); this._nodeMask.x = (this._nodeMask.x - (_local1 / 2)); this._nodeMask.y = (this._nodeMask.y - (_local2 / 2)); var _local7:Number = (_local1 - 10); var _local8:Number = (_local2 - 10); var _local9:Number = ((_local1 - _local7) / 2); var _local10:Number = ((_local2 - _local8) / 2); var _local11:Shape = new Shape(); _local11.x = _local9; _local11.y = _local10; _local11.graphics.beginFill(0); _local11.graphics.drawRoundRect(0, 0, _local7, _local8, 20); _local11.graphics.endFill(); this.addChild(_local11); DynamicRegistration.rotate(_local11, new Point((_local7 / 2), (_local8 / 2)), -45); _local11.x = (_local11.x - (_local1 / 2)); _local11.y = (_local11.y - (_local2 / 2)); this._nodeContainer = new Sprite(); this._nodeContainer.x = this._nodeMask.x; this._nodeContainer.y = this._nodeMask.y; this.addChild(this._nodeContainer); this._nodeContainer.mask = this._nodeMask; this._nodeContainer.graphics.beginFill(0xFF00FF, 0); this._nodeContainer.graphics.drawRect(0, (-(this._nodeMask.height) / 2), this._nodeMask.width, this._nodeMask.height); this._nodeContainer.graphics.endFill(); this._nodeContainer.addEventListener(MouseEvent.ROLL_OUT, nodeContainer_rollOutHandler); this.setChildIndex(this.selectionIndicator, (this.numChildren - 1)); this.selectionIndicator.alpha = 0; this.selectionIndicator.visible = false; } private function nodeClickListener(_arg1:MouseEvent):void{ var _local2:Node = Node(_arg1.currentTarget); if (!this._selectedNode){ return; }; if (_local2 != this._selectedNode){ this.slideAsMove(this._selectedNode, _local2); }; } private function showScore(_arg1:MatchData):void{ var _local6:Node; var _local7:Number; var _local8:Number; var _local9:TextBurst; var _local10:Rectangle; var _local2:Number = NaN; var _local3:Number = NaN; var _local4:Number = NaN; var _local5:Number = NaN; for each (_local6 in _arg1.nodes) { _local10 = _local6.getRect(this); _local2 = (isNaN(_local2)) ? _local10.x : Math.min(_local2, _local10.x); _local3 = (isNaN(_local3)) ? (_local10.x + _local10.width) : Math.max(_local3, (_local10.x + _local10.width)); _local4 = (isNaN(_local4)) ? _local10.y : Math.min(_local4, _local10.y); _local5 = (isNaN(_local5)) ? (_local10.y + _local10.height) : Math.max(_local5, (_local10.y + _local10.height)); }; _local7 = (_local2 + ((_local3 - _local2) / 2)); _local8 = (_local4 + ((_local5 - _local4) / 2)); _local9 = TextBurst.create(_arg1.score.toString(), this, _local7, _local8); _local9.filters = [new GlowFilter(0xFFFFFF, 0.5)]; } private function nodeMouseDownHandler(_arg1:MouseEvent):void{ var _local2:Node = Node(_arg1.currentTarget); if (this._selectedNode){ if (this._selectedNode == _local2){ if (this._settings.soundEffectsOn){ new DeselectNodeSound().play(); }; this.selectedNode = null; } else { return; }; } else { if (this._settings.soundEffectsOn){ new SelectNodeSound().play(); }; this.selectedNode = _local2; _local2.highlighted = false; if (!this._demoMode){ this.stage.addEventListener(MouseEvent.MOUSE_UP, stageMouseUpHandler, false, 0, true); }; }; } private function replaceNodesEffectCompleteHandler(_arg1:Event):void{ this.continueAfterMatchEffect(); } private function addedToStageHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.initialize(); } private function stageMouseUpHandler(_arg1:MouseEvent):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); if (this._lastRolledOverNode){ if (this._lastRolledOverNode != this._selectedNode){ this.slideAsMove(this._selectedNode, this._lastRolledOverNode); }; } else { if (this._settings.soundEffectsOn){ new DeselectNodeSound().play(); }; this.selectedNode = null; }; } private function slide(_arg1:Node, _arg2:Node):void{ var _local11:int; var _local12:Node; var _local13:int; var _local14:int; var _local15:NodeData; var _local16:Node; var _local17:Point; var _local18:NodeData; this.mouseChildren = false; var _local3:int = NodeUtil.nodeToColumnIndex(_arg1, this._nodes); var _local4:int = NodeUtil.nodeToRowIndex(_arg1, this._nodes); var _local5:int = NodeUtil.nodeToColumnIndex(_arg2, this._nodes); var _local6:int = NodeUtil.nodeToRowIndex(_arg2, this._nodes); this._slideStartNode = _arg1; this._slideStartColumn = _local3; this._slideStartRow = _local4; var _local7:Array = []; var _local8:int = ((_local3 == _local5)) ? (_local6 - _local4) : (_local5 - _local3); var _local9:int; while (_local9 < NodeUtil.gridSize) { _local11 = ((_local3 == _local5)) ? ((NodeUtil.gridSize * _local9) + _local3) : ((_local4 * NodeUtil.gridSize) + _local9); _local12 = Node(this._nodes[_local11]); _local13 = NodeUtil.nodeToRowIndex(_local12, this._nodes); _local14 = NodeUtil.nodeToColumnIndex(_local12, this._nodes); if ((((_local8 < 0)) && ((_local9 < Math.abs(_local8))))){ this._removedNodes.push(new NodeData(_local12, _local13, _local14)); } else { if ((((_local8 > 0)) && ((_local9 >= (NodeUtil.gridSize - _local8))))){ this._removedNodes.unshift(new NodeData(_local12, _local13, _local14)); } else { _local7.push(_local12); }; }; _local9++; }; var _local10:int = this._removedNodes.length; _local9 = 0; while (_local9 < _local10) { _local15 = NodeData(this._removedNodes[_local9]); _local16 = this.createDuplicateNode(_local15.node); if (_local8 < 0){ _local13 = ((_local4 == _local6)) ? _local4 : ((NodeUtil.gridSize - 1) + (_local9 + 1)); _local14 = ((_local3 == _local5)) ? _local3 : ((NodeUtil.gridSize - 1) + (_local9 + 1)); _local7.push(_local16); } else { _local13 = ((_local3 == _local5)) ? -((_local9 + 1)) : _local4; _local14 = ((_local4 == _local6)) ? -((_local9 + 1)) : _local3; _local7.unshift(_local16); }; _local17 = NodeUtil.columnAndRowToXY(_local14, _local13); _local16.x = _local17.x; _local16.y = _local17.y; _local9++; }; _local10 = _local7.length; _local9 = 0; while (_local9 < _local10) { _local12 = Node(_local7[_local9]); _local11 = ((_local3 == _local5)) ? ((NodeUtil.gridSize * _local9) + _local3) : ((_local4 * NodeUtil.gridSize) + _local9); this._nodes[_local11] = _local12; _local13 = NodeUtil.nodeToRowIndex(_local12, this._nodes); _local14 = NodeUtil.nodeToColumnIndex(_local12, this._nodes); _local17 = NodeUtil.columnAndRowToXY(_local14, _local13); this._slide = TweenMax.to(_local12, 0.5, {x:_local17.x, y:_local17.y}); this._slide.ease = Quad.easeOut; _local9++; }; _local10 = this._removedNodes.length; _local9 = 0; while (_local9 < _local10) { _local18 = NodeData(this._removedNodes[_local9]); _local12 = _local18.node; _local13 = _local18.rowIndex; _local14 = _local18.colIndex; _local13 = ((_local4 == _local6)) ? _local13 : (_local13 + _local8); _local14 = ((_local3 == _local5)) ? _local14 : (_local14 + _local8); _local17 = NodeUtil.columnAndRowToXY(_local14, _local13); this._slide = TweenMax.to(_local12, 0.5, {x:_local17.x, y:_local17.y}); this._slide.ease = Quad.easeOut; _local9++; }; this._movedNodes = _local7; for each (_local12 in this._movedNodes) { _local12.cacheAsBitmap = true; }; } private function createNormalMatchEffect(_arg1:Node):void{ var _local2:Number = 0.25; var _local3:TweenMax = TweenMax.to(_arg1, _local2, {colorTransform:{redOffset:0xFF, greenOffset:0xFF, blueOffset:0xFF}}); _local3.ease = Quad.easeOut; var _local4:TweenMax = TweenMax.to(_arg1, _local2, {alpha:0, blurFilter:{blurX:30, blurY:30}}); _local4.ease = Quad.easeIn; _local4.addEventListener(Event.COMPLETE, nodeMatchEffectCompleteHandler); } private function createFlameMatchEffect(_arg1:Node, _arg2:int):void{ var _local3:Number = 0.25; var _local4:TweenMax = TweenMax.to(_arg1, _local3, {delay:(0.08 * _arg2), colorTransform:{redMultiplier:0.5, greenMultiplier:0.5, blueMultiplier:0.5, redOffset:0xFF, greenOffset:0, blueOffset:0}}); _local4.ease = Quad.easeOut; var _local5:TweenMax = TweenMax.to(_arg1, _local3, {delay:(0.1 * _arg2), alpha:0, blurFilter:{blurX:50, blurY:50}}); _local5.ease = Quad.easeIn; _local5.addEventListener(Event.COMPLETE, nodeMatchEffectCompleteHandler); } private function nodeRollOverHandler(_arg1:MouseEvent):void{ var _local11:Node; var _local2:Node = Node(_arg1.currentTarget); this._lastRolledOverNode = _local2; if (!this._selectedNode){ _local2.highlighted = true; return; }; if (this._selectedNode == _local2){ this.selectionIndicator.graphics.clear(); return; }; var _local3:int = NodeUtil.nodeToRowIndex(_local2, this._nodes); var _local4:int = NodeUtil.nodeToColumnIndex(_local2, this._nodes); var _local5:int = NodeUtil.nodeToRowIndex(this._selectedNode, this._nodes); var _local6:int = NodeUtil.nodeToColumnIndex(this._selectedNode, this._nodes); var _local7:Point = new Point((this._selectedNode.width / 2), (this._selectedNode.height / 2)); _local7 = DisplayObjectUtil.localToLocal(_local7, this._selectedNode, this.selectionIndicator); var _local8:Point = new Point((this._lastRolledOverNode.width / 2), (this._lastRolledOverNode.height / 2)); _local8 = DisplayObjectUtil.localToLocal(_local8, this._lastRolledOverNode, this.selectionIndicator); this.selectionIndicator.graphics.clear(); this.selectionIndicator.graphics.beginFill(0xFFFFFF); this.selectionIndicator.graphics.drawCircle(_local7.x, _local7.y, 4); this.selectionIndicator.graphics.endFill(); this.selectionIndicator.graphics.lineStyle(4, 0xFFFFFF); this.selectionIndicator.graphics.moveTo(_local7.x, _local7.y); this.selectionIndicator.graphics.lineTo(_local8.x, _local8.y); this.selectionIndicator.graphics.lineStyle(); this.selectionIndicator.graphics.beginFill(0xFFFFFF); this.selectionIndicator.graphics.drawCircle(_local8.x, _local8.y, 4); this.selectionIndicator.graphics.endFill(); var _local9:int = this._nodes.length; var _local10:int; while (_local10 < _local9) { _local11 = Node(this._nodes[_local10]); if (_local11 == _local2){ } else { if (((((!((_local3 == _local5))) && ((_local3 == NodeUtil.nodeToRowIndex(_local11, this._nodes))))) || (((!((_local4 == _local6))) && ((_local4 == NodeUtil.nodeToColumnIndex(_local11, this._nodes))))))){ _local11.highlighted = true; }; }; _local10++; }; } private function slideWithoutMatchCompleteHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.slideCompleteHandler(_arg1); this._slideStartNode = null; this.mouseChildren = ((!(this._demoMode)) && (true)); } private function match(_arg1:Node, _arg2:int):Boolean{ var _local3:Array = NodeUtil.findMatches(_arg1, this._nodes); if (_local3.length < 3){ return (false); }; this.handleMatches(_local3, _arg2, _arg1); return (true); } public function moveSelectedNodeTo(_arg1:int, _arg2:int):void{ var _local5:Node; if (!this.selectedNode){ throw (new IllegalOperationError("Cannot move selected node because no node is selected.")); }; var _local3:int = NodeUtil.nodeToColumnIndex(this.selectedNode, this._nodes); var _local4:int = NodeUtil.nodeToRowIndex(this.selectedNode, this._nodes); if ((((_arg1 == _local3)) || ((_arg2 == _local4)))){ _local5 = NodeUtil.columnAndRowToNode(_arg1, _arg2, this._nodes); _local5.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } else { throw (new IllegalOperationError((((("Cannot move selected node to position " + _arg1) + "x") + _arg2) + "."))); }; } public function set gameOver(_arg1:Boolean):void{ this._gameOver = _arg1; this._nodeContainer.visible = ((this._gameOver) || (!(this._paused))); } public function set blitzMode(_arg1:Boolean):void{ this._blitzMode = _arg1; this.dispatchEvent(new GameModeEvent(GameModeEvent.GAME_MODE_CHANGE)); } private function createBombNodeFromNode(_arg1:Node, _arg2:int, _arg3:int):Node{ var _local4:Class = Class(NodeUtil.COLOR_NAME_TO_BOMB_CLASS[_arg1.colorName]); var _local5:BombNode = BombNode(this.createNode(_local4)); _local5.name = ((("bomb-" + _arg2) + "x") + _arg3); return (_local5); } private function replaceNode(_arg1:Node, _arg2:Boolean=false):Node{ var _local3:MatchData = this._nodeToMatchData[_arg1]; if (!_local3){ return (null); }; delete this._nodeToMatchData[_arg1]; var _local4:int = NodeUtil.nodeToColumnIndex(_arg1, this._nodes); var _local5:int = NodeUtil.nodeToRowIndex(_arg1, this._nodes); this.destroyNode(_arg1); this.stats.nodesCleared++; if ((_arg1 is BombNode)){ this.stats.bombsDetonated++; }; if ((_arg1 is PowerUpNode)){ switch (PowerUpNode(_arg1).type){ case PowerUpNode.TYPE_FIRE: this.stats.flamePowerupCount++; break; case PowerUpNode.TYPE_SKULL: this.stats.skullPowerupCount++; break; }; }; if ((((_arg1 is PowerUpNode)) && ((PowerUpNode(_arg1).type == PowerUpNode.TYPE_SKULL)))){ this.blitzMode = true; _arg1 = this.createRandomBomb(_local4, _local5, _arg2); } else { if ((((((((((_arg1 is BombNode)) && (!(this.blitzMode)))) && ((this._bombComboCount >= POWERUP_BOMB_MINIMUM_COMBO_COUNT)))) && ((_local3.powerups.length == 0)))) && (!(NodeUtil.containsPowerUpOfType(PowerUpNode.TYPE_SKULL, this._nodes))))){ _arg1 = this.createPowerUp(PowerUpNode.TYPE_SKULL, _local4, _local5); } else { if ((((((((((_local3.sourceNode == _arg1)) && ((_local3.powerups.length == 0)))) && ((_local3.bombs.length == 0)))) && ((_local3.nodes.length >= FLAME_MINIMUM_MATCH_COUNT)))) && (!(NodeUtil.containsPowerUpOfType(PowerUpNode.TYPE_FIRE, this._nodes))))){ _arg1 = this.createPowerUp(PowerUpNode.TYPE_FIRE, _local4, _local5); } else { if ((((((_local3.sourceNode == _arg1)) && ((_local3.powerups.length == 0)))) && (((this.blitzMode) || ((((_local3.nodes.length >= BOMB_MINIMUM_MATCH_COUNT)) && ((_local3.bombs.length == 0)))))))){ _arg1 = this.createRandomBomb(_local4, _local5, _arg2); } else { _arg1 = this.createRandomNode(_local4, _local5, _arg2); }; }; }; }; return (_arg1); } private function selectionIndicatorFadeCompleteHandler():void{ this._selectionFade = null; } public function playLevelUpEffect():void{ if (this._warningEffect){ this._warningEffect.pause(); }; var _local1:TweenMax = new ColorFlash(this._boardBackground, 0xFFFFFF, 1, 1, 0.1); _local1.addEventListener(Event.COMPLETE, levelUpEffectCompleteHandler); } private function nodeMatchEffectCompleteHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); var _local3:Node = Node(_arg1.currentTarget.target); var _local4:int = this._nodes.indexOf(_local3); if (_local4 < 0){ return; }; var _local5:int = this._matchEffectTargets.indexOf(_local3); if (_local5 >= 0){ this._matchEffectTargets.splice(_local5, 1); this._nodesToReplace.push(_local3); }; if (this._matchEffectTargets.length == 0){ this.fillGaps(); }; } private function slideCompleteHandler(_arg1:Event):void{ var _local2:Node; var _local3:NodeData; this._slide = null; for each (_local2 in this._movedNodes) { _local2.cacheAsBitmap = false; }; for each (_local3 in this._removedNodes) { this.destroyNode(_local3.node); }; this._removedNodes = []; } public function get gameOver():Boolean{ return (this._gameOver); } private function handleMatches(_arg1:Array, _arg2:int, _arg3:Node=null):void{ var _local4:Node; var _local5:MatchData; for each (_local4 in _arg1) { _local4.matched = true; }; _local5 = new MatchData(_arg1, _arg2, _arg3); this.showScore(_local5); this.showMatches(_local5); this.stats.maximumCombo = Math.max(this.stats.maximumCombo, NodeUtil.comboCount); this.dispatchEvent(new MatchEvent(MatchEvent.MATCH, _local5)); } private function createPowerUp(_arg1:String, _arg2:int, _arg3:int):Node{ var _local4:Class = Class(NodeUtil.TYPE_TO_POWERUP_CLASS[_arg1]); var _local5:PowerUpNode = PowerUpNode(this.createNode(_local4)); _local5.type = _arg1; _local5.name = ((("powerup-" + _arg2) + "x") + _arg3); return (_local5); } private function slideAsMoveCompleteHandler(_arg1:TweenEvent):void{ var _local6:Node; var _local7:Boolean; var _local8:Node; _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.slideCompleteHandler(_arg1); if (this._paused){ return; }; var _local3:Boolean; var _local4:int = this._movedNodes.length; var _local5:int; while (_local5 < _local4) { _local6 = this._movedNodes.shift(); _local7 = this.match(_local6, this._lastMatchDistance); if (_local7){ this.stats.matchCount++; }; _local3 = ((_local7) || (_local3)); _local5++; }; this._lastMatchDistance = 0; if (((!(_local3)) && (!(this._automaticSlide)))){ _local8 = NodeUtil.columnAndRowToNode(this._slideStartColumn, this._slideStartRow, this._nodes); this.slideWithoutMatch(this._slideStartNode, _local8); if (this._settings.soundEffectsOn){ new SlideReverseSound().play(); }; } else { this._slideStartNode = null; if (((!(_local3)) && (this._automaticSlide))){ this.continueAfterMatchEffect(); }; }; } } }//package com.bowlerhatgames.qrossfire import com.bowlerhatgames.qrossfire.nodes.*; class NodeData { public var colIndex:int; public var rowIndex:int; public var node:Node; private function NodeData(_arg1:Node, _arg2:int, _arg3:int){ this.node = _arg1; this.rowIndex = _arg2; this.colIndex = _arg3; } }
Section 38
//GameSettings (com.bowlerhatgames.qrossfire.GameSettings) package com.bowlerhatgames.qrossfire { import flash.events.*; import flash.net.*; public class GameSettings extends EventDispatcher { private var _sharedObject:SharedObject; public static const DIFFICULTY_EASY:String = "easy"; public static const MUSIC_CHANGE:String = "musicChange"; public static const DIFFICULTY_NORMAL:String = "normal"; public static const SOUND_FX_CHANGE:String = "soundFxChange"; public static const DIFFICULTY_HARD:String = "hard"; public function GameSettings(_arg1:String){ this._sharedObject = SharedObject.getLocal(_arg1); if (this._sharedObject.data.difficulty === undefined){ this._sharedObject.data.difficulty = GameSettings.DIFFICULTY_NORMAL; }; if (this._sharedObject.data.showHelp === undefined){ this._sharedObject.data.showHelp = true; }; if (this._sharedObject.data.musicOn === undefined){ this._sharedObject.data.musicOn = true; }; if (this._sharedObject.data.soundEffectsOn === undefined){ this._sharedObject.data.soundEffectsOn = true; }; } public function get moreGamesURL():String{ return ("http://www.frosmo.com/uk/ui/?ref=qrossfire"); } public function get musicOn():Boolean{ return (this._sharedObject.data.musicOn); } public function set musicOn(_arg1:Boolean):void{ this._sharedObject.data.musicOn = _arg1; this.dispatchEvent(new Event(MUSIC_CHANGE)); } public function get authorURL():String{ return ("http://bowlerhatgames.com/"); } public function set soundEffectsOn(_arg1:Boolean):void{ this._sharedObject.data.soundEffectsOn = _arg1; this.dispatchEvent(new Event(SOUND_FX_CHANGE)); } public function get soundEffectsOn():Boolean{ return (this._sharedObject.data.soundEffectsOn); } public function set difficulty(_arg1:String):void{ this._sharedObject.data.difficulty = _arg1; } public function get difficulty():String{ return (this._sharedObject.data.difficulty); } public function set showHelp(_arg1:Boolean):void{ this._sharedObject.data.showHelp = _arg1; } public function get showHelp():Boolean{ return (this._sharedObject.data.showHelp); } } }//package com.bowlerhatgames.qrossfire
Section 39
//MatchData (com.bowlerhatgames.qrossfire.MatchData) package com.bowlerhatgames.qrossfire { import com.bowlerhatgames.qrossfire.nodes.*; import com.bowlerhatgames.qrossfire.utils.*; public class MatchData { public var powerups:Array; public var containsFlamePowerUp:Boolean;// = false public var nodes:Array; public var score:uint;// = 0 public var distance:int; public var bombs:Array; public var sourceNode:Node; public var containsBombPowerUp:Boolean;// = false public function MatchData(_arg1:Array, _arg2:int, _arg3:Node=null){ var _local4:Node; bombs = []; powerups = []; super(); this.sourceNode = _arg3; this.nodes = _arg1; for each (_local4 in _arg1) { if ((_local4 is BombNode)){ this.bombs.push(_local4); }; if ((_local4 is PowerUpNode)){ switch (PowerUpNode(_local4).type){ case PowerUpNode.TYPE_FIRE: this.containsFlamePowerUp = true; break; case PowerUpNode.TYPE_SKULL: this.containsBombPowerUp = true; break; }; this.powerups.push(_local4); }; }; this.distance = _arg2; this.score = NodeUtil.calculateMatchScore(this.nodes, _arg2); } } }//package com.bowlerhatgames.qrossfire
Section 40
//SessionStatistics (com.bowlerhatgames.qrossfire.SessionStatistics) package com.bowlerhatgames.qrossfire { public class SessionStatistics { public var flamePowerupCount:int;// = 0 public var matchCount:int;// = 0 public var skullPowerupCount:int;// = 0 public var levelReached:int;// = 0 public var bombsDetonated:int;// = 0 public var maximumCombo:int;// = 0 public var nodesCleared:int;// = 0 } }//package com.bowlerhatgames.qrossfire
Section 41
//DisplayObjectUtil (com.yahoo.astra.utils.DisplayObjectUtil) package com.yahoo.astra.utils { import flash.display.*; import flash.geom.*; public class DisplayObjectUtil { public static function align(_arg1:DisplayObject, _arg2:Rectangle, _arg3:String=null, _arg4:String=null):void{ var _local5:Number = (_arg2.width - _arg1.width); switch (_arg3){ case "left": _arg1.x = _arg2.x; break; case "center": _arg1.x = (_arg2.x + (_local5 / 2)); break; case "right": _arg1.x = (_arg2.x + _local5); break; }; var _local6:Number = (_arg2.height - _arg1.height); switch (_arg4){ case "top": _arg1.y = _arg2.y; break; case "middle": _arg1.y = (_arg2.y + (_local6 / 2)); break; case "bottom": _arg1.y = (_arg2.y + _local6); break; }; } public static function localToLocal(_arg1:Point, _arg2:DisplayObject, _arg3:DisplayObject):Point{ _arg1 = _arg2.localToGlobal(_arg1); return (_arg3.globalToLocal(_arg1)); } public static function resizeAndMaintainAspectRatio(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number=NaN):void{ var _local5:Number = (isNaN(_arg4)) ? (_arg1.width / _arg1.height) : _arg4; var _local6:Number = (_arg2 / _arg3); if (_local5 < _local6){ _arg1.width = Math.floor((_arg3 * _local5)); _arg1.height = _arg3; } else { _arg1.width = _arg2; _arg1.height = Math.floor((_arg2 / _local5)); }; } } }//package com.yahoo.astra.utils
Section 42
//DynamicRegistration (com.yahoo.astra.utils.DynamicRegistration) package com.yahoo.astra.utils { import flash.display.*; import flash.geom.*; public class DynamicRegistration { public static function move(_arg1:DisplayObject, _arg2:Point, _arg3:Number=0, _arg4:Number=0):void{ _arg2 = _arg1.localToGlobal(_arg2); _arg2 = _arg1.parent.globalToLocal(_arg2); _arg1.x = (_arg1.x + (_arg3 - _arg2.x)); _arg1.y = (_arg1.y + (_arg4 - _arg2.y)); } public static function rotate(_arg1:DisplayObject, _arg2:Point, _arg3:Number=0):void{ changePropertyOnRegistrationPoint(_arg1, _arg2, "rotation", _arg3); } public static function scale(_arg1:DisplayObject, _arg2:Point, _arg3:Number=0, _arg4:Number=0):void{ changePropertyOnRegistrationPoint(_arg1, _arg2, "scaleX", _arg3); changePropertyOnRegistrationPoint(_arg1, _arg2, "scaleY", _arg4); } private static function changePropertyOnRegistrationPoint(_arg1:DisplayObject, _arg2:Point, _arg3:String, _arg4:Number):void{ var _local5:Point = _arg2.clone(); _local5 = _arg1.localToGlobal(_local5); _local5 = _arg1.parent.globalToLocal(_local5); _arg1[_arg3] = _arg4; var _local6:Point = _arg2.clone(); _local6 = _arg1.localToGlobal(_local6); _local6 = _arg1.parent.globalToLocal(_local6); _arg1.x = (_arg1.x - (_local6.x - _local5.x)); _arg1.y = (_arg1.y - (_local6.y - _local5.y)); } } }//package com.yahoo.astra.utils
Section 43
//StringUtil (com.yahoo.astra.utils.StringUtil) package com.yahoo.astra.utils { public class StringUtil { public static function padFront(_arg1:String, _arg2:int, _arg3:String):String{ var _local4:int = (_arg2 - _arg1.length); if (_local4 <= 0){ return (_arg1); }; var _local5:int; while (_local5 < _local4) { _arg1 = (_arg3 + _arg1); _local5++; }; return (_arg1); } } }//package com.yahoo.astra.utils
Section 44
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.core.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var pressTimer:Timer; protected var _autoRepeat:Boolean;// = false protected var _selected:Boolean;// = false protected var background:DisplayObject; private var unlockedMouseState:String; protected var mouseState:String; private var _mouseStateLocked:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } override public function get enabled():Boolean{ return (super.enabled); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function drawLayout():void{ background.width = width; background.height = height; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } protected function drawBackground():void{ var _local1:String = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); var _local2:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public function get selected():Boolean{ return (_selected); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 45
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var _emphasized:Boolean;// = false protected var emphasizedBorder:DisplayObject; private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; var _local1:Object = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 46
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 47
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.core.*; import fl.events.*; import fl.managers.*; import flash.text.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _toggle:Boolean;// = false public var textField:TextField; protected var mode:String;// = "center" protected var _labelPlacement:String;// = "right" protected var oldMouseState:String; protected var _label:String;// = "Label" protected var icon:DisplayObject; private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override protected function drawLayout():void{ var _local7:Number; var _local8:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:String = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); var _local3:Number = (textField.textWidth + 4); var _local4:Number = (textField.textHeight + 4); var _local5:Number = ((icon)==null) ? 0 : (icon.width + _local1); var _local6:Number = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } public function get labelPlacement():String{ return (_labelPlacement); } public function get toggle():Boolean{ return (_toggle); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } protected function drawIcon():void{ var _local1:DisplayObject = icon; var _local2:String = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); var _local3:Object = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public function get label():String{ return (_label); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 48
//RadioButton (fl.controls.RadioButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.ui.*; public class RadioButton extends LabelButton implements IFocusManagerGroup { protected var _group:RadioButtonGroup; protected var defaultGroupName:String;// = "RadioButtonGroup" protected var _value:Object; private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public static var createAccessibilityImplementation:Function; public function RadioButton(){ mode = "border"; groupName = defaultGroupName; } override protected function draw():void{ super.draw(); } override public function set selected(_arg1:Boolean):void{ if ((((_arg1 == false)) || (selected))){ return; }; if (_group != null){ _group.selection = this; } else { super.selected = _arg1; }; } override protected function drawLayout():void{ super.drawLayout(); var _local1:Number = Number(getStyleValue("textPadding")); switch (_labelPlacement){ case ButtonLabelPlacement.RIGHT: icon.x = _local1; textField.x = (icon.x + (icon.width + _local1)); background.width = ((textField.x + textField.width) + _local1); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.LEFT: icon.x = ((width - icon.width) - _local1); textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width); background.width = ((textField.width + icon.width) + (_local1 * 3)); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: background.width = (Math.max(textField.width, icon.width) + (_local1 * 2)); background.height = ((textField.height + icon.height) + (_local1 * 3)); break; }; background.x = Math.min((icon.x - _local1), (textField.x - _local1)); background.y = Math.min((icon.y - _local1), (textField.y - _local1)); } protected function handleClick(_arg1:MouseEvent):void{ if (_group == null){ return; }; _group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true)); } protected function handleChange(_arg1:Event):void{ super.selected = (_group.selection == this); dispatchEvent(new Event(Event.CHANGE, true)); } public function set groupName(_arg1:String):void{ if (_group != null){ _group.removeRadioButton(this); _group.removeEventListener(Event.CHANGE, handleChange); }; _group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1); if (_group != null){ _group.addRadioButton(this); _group.addEventListener(Event.CHANGE, handleChange, false, 0, true); }; } override protected function configUI():void{ super.configUI(); super.toggle = true; var _local1:Shape = new Shape(); var _local2:Graphics = _local1.graphics; _local2.beginFill(0, 0); _local2.drawRect(0, 0, 100, 100); _local2.endFill(); background = (_local1 as DisplayObject); addChildAt(background, 0); addEventListener(MouseEvent.CLICK, handleClick, false, 0, true); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ super.keyUpHandler(_arg1); if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){ _toggle = true; }; } override protected function drawBackground():void{ } override public function get selected():Boolean{ return (super.selected); } override protected function initializeAccessibility():void{ if (RadioButton.createAccessibilityImplementation != null){ RadioButton.createAccessibilityImplementation(this); }; } private function setThis():void{ var _local1:RadioButtonGroup = _group; if (_local1 != null){ if (_local1.selection != this){ _local1.selection = this; }; } else { super.selected = true; }; } public function set value(_arg1:Object):void{ _value = _arg1; } override public function set autoRepeat(_arg1:Boolean):void{ } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a RadioButtons toggle.")); } override public function get autoRepeat():Boolean{ return (false); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.DOWN: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.UP: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.LEFT: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.RIGHT: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.SPACE: setThis(); _toggle = false; default: super.keyDownHandler(_arg1); break; }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = (background.x - _local2); uiFocusRect.y = (background.y - _local2); uiFocusRect.width = (background.width + (_local2 * 2)); uiFocusRect.height = (background.height + (_local2 * 2)); }; } private function setPrev(_arg1:Boolean=true):void{ var _local6:*; var _local2:RadioButtonGroup = _group; if (_local2 == null){ return; }; var _local3:IFocusManager = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; var _local4:int = _local2.getRadioButtonIndex(this); var _local5:int = _local4; if (_local4 != -1){ do { --_local5; _local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5; _local6 = _local2.getRadioButtonAt(_local5); if (((_local6) && (_local6.enabled))){ if (_arg1){ _local2.selection = _local6; }; _local6.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local5 != _local4); }; } override public function get toggle():Boolean{ return (true); } public function get value():Object{ return (_value); } public function get groupName():String{ return (((_group)==null) ? null : _group.name); } private function setNext(_arg1:Boolean=true):void{ var _local7:*; var _local2:RadioButtonGroup = _group; if (_local2 == null){ return; }; var _local3:IFocusManager = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; var _local4:int = _local2.getRadioButtonIndex(this); var _local5:Number = _local2.numRadioButtons; var _local6:int = _local4; if (_local4 != -1){ do { _local6++; _local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6; _local7 = _local2.getRadioButtonAt(_local6); if (((_local7) && (_local7.enabled))){ if (_arg1){ _local2.selection = _local7; }; _local7.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local6 != _local4); }; } public function set group(_arg1:RadioButtonGroup):void{ groupName = _arg1.name; } public function get group():RadioButtonGroup{ return (_group); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 49
//RadioButtonGroup (fl.controls.RadioButtonGroup) package fl.controls { import flash.events.*; public class RadioButtonGroup extends EventDispatcher { protected var radioButtons:Array; protected var _name:String; protected var _selection:RadioButton; private static var groups:Object; private static var groupCount:uint = 0; public function RadioButtonGroup(_arg1:String){ _name = _arg1; radioButtons = []; registerGroup(this); } public function getRadioButtonIndex(_arg1:RadioButton):int{ var _local3:RadioButton; var _local2:int; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3 == _arg1){ return (_local2); }; _local2++; }; return (-1); } public function addRadioButton(_arg1:RadioButton):void{ if (_arg1.groupName != name){ _arg1.groupName = name; return; }; radioButtons.push(_arg1); if (_arg1.selected){ selection = _arg1; }; } public function get selectedData():Object{ var _local1:RadioButton = _selection; return (((_local1)==null) ? null : _local1.value); } public function removeRadioButton(_arg1:RadioButton):void{ var _local2:int = getRadioButtonIndex(_arg1); if (_local2 != -1){ radioButtons.splice(_local2, 1); }; if (_selection == _arg1){ _selection = null; }; } public function get name():String{ return (_name); } public function get selection():RadioButton{ return (_selection); } public function get numRadioButtons():int{ return (radioButtons.length); } public function set selectedData(_arg1:Object):void{ var _local3:RadioButton; var _local2:int; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3.value == _arg1){ selection = _local3; return; }; _local2++; }; } public function set selection(_arg1:RadioButton):void{ if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){ return; }; _selection = _arg1; dispatchEvent(new Event(Event.CHANGE, true)); } public function getRadioButtonAt(_arg1:int):RadioButton{ return (RadioButton(radioButtons[_arg1])); } public static function getGroup(_arg1:String):RadioButtonGroup{ if (groups == null){ groups = {}; }; var _local2:RadioButtonGroup = (groups[_arg1] as RadioButtonGroup); if (_local2 == null){ _local2 = new RadioButtonGroup(_arg1); if ((++groupCount % 20) == 0){ cleanUpGroups(); }; }; return (_local2); } private static function registerGroup(_arg1:RadioButtonGroup):void{ if (groups == null){ groups = {}; }; groups[_arg1.name] = _arg1; } private static function cleanUpGroups():void{ var _local1:String; var _local2:RadioButtonGroup; for (_local1 in groups) { _local2 = (groups[_local1] as RadioButtonGroup); if (_local2.radioButtons.length == 0){ delete groups[_local1]; }; }; } } }//package fl.controls
Section 50
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 51
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 52
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import fl.events.*; import fl.managers.*; import flash.utils.*; import flash.text.*; import flash.system.*; public class UIComponent extends Sprite { protected var _x:Number; protected var _enabled:Boolean;// = true protected var callLaterMethods:Dictionary; private var _mouseFocusEnabled:Boolean;// = true private var tempText:TextField; private var _focusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var invalidateFlag:Boolean;// = false protected var _oldIMEMode:String;// = null protected var _inspector:Boolean;// = false protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var invalidHash:Object; protected var sharedStyles:Object; protected var uiFocusRect:DisplayObject; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var _width:Number; protected var instanceStyles:Object; public var version:String;// = "3.0.0.16" protected var isFocused:Boolean;// = false protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } private function callLaterDispatcher(_arg1:Event):void{ var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; var _local2:Dictionary = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } protected function validate():void{ invalidHash = {}; } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } override public function get height():Number{ return (_height); } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } override public function get scaleY():Number{ return ((height / startHeight)); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function configUI():void{ isLivePreview = checkLivePreview(); var _local1:Number = rotation; rotation = 0; var _local2:Number = super.width; var _local3:Number = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } override public function get scaleX():Number{ return ((width / startWidth)); } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var skin = _arg1; var classDef:Object; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } override public function set visible(_arg1:Boolean):void{ if (super.visible == _arg1){ return; }; super.visible = _arg1; var _local2:String = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set y(_arg1:Number):void{ move(_x, _arg1); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local5:Object; var _local6:String; var _local2:Object = {}; var _local3:uint = _args.length; var _local4:uint; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 53
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 54
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import flash.events.*; import fl.core.*; import flash.utils.*; import flash.text.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; var _local5:int = focusableCandidates.length; var _local6:int = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function setFocusToNextObject(_arg1:FocusEvent):void{ if (!hasFocusableObjects()){ return; }; var _local2:InteractiveObject = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local3:TextField; var _local4:SimpleButton; var _local2:DisplayObjectContainer = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } private function tabChildrenChangeHandler(_arg1:Event):void{ if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } public function getFocus():InteractiveObject{ var _local1:InteractiveObject = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } public function set defaultButton(_arg1:Button):void{ var _local2:Button = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int = focusableCandidates.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local4:InteractiveObject; var _local3:DisplayObject = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local5:int; var _local6:String; var _local7:String; var _local3 = ""; var _local4 = ""; var _local8 = "0000"; var _local9:DisplayObject = DisplayObject(_arg1); var _local10:DisplayObject = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; var _local2:DisplayObject = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); var _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; var _local4:int = getIndexOfFocusedObject(_local2); var _local5:Boolean; var _local6:int = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; var _local7:int = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; var _local2:InteractiveObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local3:Button; var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ calculateCandidates = true; var _local2:InteractiveObject = InteractiveObject(_arg1.target); var _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } } }//package fl.managers
Section 55
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import fl.controls.*; import flash.display.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function hideFocus():void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:InteractiveObject):void; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 56
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 57
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function get groupName():String; function get selected():Boolean; function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; } }//package fl.managers
Section 58
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.utils.*; import flash.text.*; public class StyleManager { private var classToInstancesDict:Dictionary; private var globalStyles:Object; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToDefaultStylesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class = getClassDef(_arg1); var _local5:Object = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local5:String; var _local2:StyleManager = getInstance(); var _local3:Class = getClassDef(_arg1); var _local4:Object = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local4:Object; var _local5:UIComponent; var _local3:Dictionary = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local3:Object; var _local2:Dictionary = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; var inst:StyleManager = getInstance(); var classDef:Class = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; if (inst.classToStylesDict[classDef] == null){ inst.classToStylesDict[classDef] = {}; }; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:StyleManager = getInstance(); var _local5:Object = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 59
//PropTween (gs.core.tween.PropTween) package gs.core.tween { 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(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; this.nextNode = _arg7; this.priority = _arg8; } } }//package gs.core.tween
Section 60
//SimpleTimeline (gs.core.tween.SimpleTimeline) package gs.core.tween { public class SimpleTimeline extends Tweenable { public var autoRemoveChildren:Boolean; protected var _lastChild:Tweenable; protected var _firstChild:Tweenable; public function SimpleTimeline(_arg1:Object=null){ super(0, _arg1); } override public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ this.cachedTotalTime = (this.cachedTime = _arg1); var _local3:Tweenable = _firstChild; while (_local3 != null) { if (((_local3.active) || ((((_arg1 >= _local3.startTime)) && (!(_local3.cachedPaused)))))){ _local3.renderTime(((_arg1 - _local3.startTime) * _local3.cachedTimeScale)); }; _local3 = _local3.nextNode; }; } public function addChild(_arg1:Tweenable):void{ if (((!((_arg1.timeline == null))) && (!(_arg1.gc)))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.enabled = true; return; }; if (_firstChild != null){ _firstChild.prevNode = _arg1; _arg1.nextNode = _firstChild; } else { _arg1.nextNode = null; }; _firstChild = _arg1; _arg1.prevNode = null; } public function remove(_arg1:Tweenable, _arg2:Boolean=false):void{ if (((!(_arg1.gc)) && (!(_arg2)))){ _arg1.enabled = false; return; }; if (_arg1.nextNode != null){ _arg1.nextNode.prevNode = _arg1.prevNode; } else { if (_lastChild == _arg1){ _lastChild = _arg1.prevNode; }; }; if (_arg1.prevNode != null){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_firstChild == _arg1){ _firstChild = _arg1.nextNode; }; }; } } }//package gs.core.tween
Section 61
//Tweenable (gs.core.tween.Tweenable) package gs.core.tween { import gs.*; public class Tweenable { public var timeline:SimpleTimeline; public var initted:Boolean; protected var _hasUpdate:Boolean; public var active:Boolean; protected var _delay:Number; public var startTime:Number; public var nextNode:Tweenable; public var cachedTime:Number; public var gc:Boolean; public var cachedDuration:Number; public var prevNode:Tweenable; public var cacheIsDirty:Boolean; public var vars:Object; public var cachedTotalTime:Number; public var cachedPaused:Boolean; public var cachedTotalDuration:Number; public var data; public var cachedTimeScale:Number; public static const version:Number = 0.49; protected static var _classInitted:Boolean; public function Tweenable(_arg1:Number=0, _arg2:Object=null){ this.vars = ((_arg2) || ({})); this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0))); _delay = ((this.vars.delay) || (0)); this.cachedTimeScale = ((this.vars.timeScale) || (1)); this.active = Boolean((((_arg1 == 0)) && ((_delay == 0)))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.startTime = (_local3.cachedTotalTime + _delay); _local3.addChild(this); } public function complete(_arg1:Boolean=false):void{ } public function set enabled(_arg1:Boolean):void{ if (_arg1 == this.gc){ this.gc = !(_arg1); if (_arg1){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); this.timeline.addChild(this); } else { this.active = false; this.timeline.remove(this); }; }; } public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ } public function get enabled():Boolean{ return (!(this.gc)); } public function get delay():Number{ return (_delay); } public function get duration():Number{ return (this.cachedDuration); } public function set delay(_arg1:Number):void{ this.startTime = (this.startTime + (_arg1 - _delay)); _delay = _arg1; } public function set totalDuration(_arg1:Number):void{ this.duration = _arg1; } public function set duration(_arg1:Number):void{ this.cachedDuration = (this.cachedTotalDuration = _arg1); } public function get totalDuration():Number{ return (this.cachedTotalDuration); } } }//package gs.core.tween
Section 62
//Quad (gs.easing.Quad) package gs.easing { public class Quad { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } } }//package gs.easing
Section 63
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public static const COMPLETE:String = "complete"; public static const START:String = "init"; public static const UPDATE:String = "change"; public static const REVERSE_COMPLETE:String = "reverseComplete"; public static const version:Number = 1; public static const REPEAT:String = "repeat"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new TweenEvent(this.type, this.bubbles, this.cancelable)); } } }//package gs.events
Section 64
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin) package gs.plugins { import flash.display.*; import gs.*; public class AutoAlphaPlugin extends VisiblePlugin { protected var _ignoreVisible:Boolean; public static const VERSION:Number = 2.1; public static const API:Number = 1; public function AutoAlphaPlugin(){ this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); _ignoreVisible = Boolean(("visible" in _arg1)); } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ init(_arg1, Boolean(!((_arg2 == 0))), _arg3); addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); if (!_ignoreVisible){ _target.visible = Boolean(!((_target.alpha == 0))); }; } } }//package gs.plugins
Section 65
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class BevelFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BevelFilterPlugin(){ this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BevelFilter; initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 66
//BezierPlugin (gs.plugins.BezierPlugin) package gs.plugins { import gs.core.tween.*; import gs.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orient:Boolean; protected var _orientData:Array; protected var _target:Object; protected var _beziers:Object; protected static const _RAD2DEG:Number = 57.2957795130823; public static const VERSION:Number = 2.01; public static const API:Number = 1; public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function killProps(_arg1:Object):void{ var _local2:String; for (_local2 in _beziers) { if ((_local2 in _arg1)){ delete _beziers[_local2]; }; }; super.killProps(_arg1); } protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{ var _local6:int; var _local7:String; var _local8:Object; _target = _arg1.target; var _local4:Object = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars; if (_local4.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0]]; _orient = true; } else { if ((_local4.orientToBezier is Array)){ _orientData = _local4.orientToBezier; _orient = true; }; }; var _local5:Object = {}; _local6 = 0; while (_local6 < _arg2.length) { for (_local7 in _arg2[_local6]) { if (_local5[_local7] == undefined){ _local5[_local7] = [_arg1.target[_local7]]; }; if (typeof(_arg2[_local6][_local7]) == "number"){ _local5[_local7].push(_arg2[_local6][_local7]); } else { _local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7]))); }; }; _local6++; }; for (_local7 in _local5) { this.overwriteProps[this.overwriteProps.length] = _local7; if (_local4[_local7] != undefined){ if (typeof(_local4[_local7]) == "number"){ _local5[_local7].push(_local4[_local7]); } else { _local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7]))); }; _local8 = {}; _local8[_local7] = true; _arg1.killVars(_local8, false); delete _local4[_local7]; }; }; _beziers = parseBeziers(_local5, _arg3); } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), false); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:String; var _local4:Object; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:int; var _local9:Object; var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:Number; if (_arg1 == 1){ for (_local3 in _beziers) { _local2 = (_beziers[_local3].length - 1); _target[_local3] = _beziers[_local3][_local2][2]; }; } else { for (_local3 in _beziers) { _local6 = _beziers[_local3].length; if (_arg1 < 0){ _local2 = 0; } else { if (_arg1 >= 1){ _local2 = (_local6 - 1); } else { _local2 = int((_local6 * _arg1)); }; }; _local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6); _local4 = _beziers[_local3][_local2]; if (this.round){ _local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); _local8 = ((_local7)<0) ? -1 : 1; _target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7); } else { _target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); }; }; }; if (_orient){ _local9 = _target; _local10 = this.round; _target = _future; this.round = false; _orient = false; this.changeFactor = (_arg1 + 0.01); _target = _local9; this.round = _local10; _orient = true; _local2 = 0; while (_local2 < _orientData.length) { _local13 = _orientData[_local2]; _local14 = ((_local13[3]) || (0)); _local11 = (_future[_local13[0]] - _target[_local13[0]]); _local12 = (_future[_local13[1]] - _target[_local13[1]]); _target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14); _local2++; }; }; } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } } }//package gs.plugins
Section 67
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin) package gs.plugins { import gs.*; public class BezierThroughPlugin extends BezierPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BezierThroughPlugin(){ this.propName = "bezierThrough"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), true); return (true); } } }//package gs.plugins
Section 68
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class BlurFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BlurFilterPlugin(){ this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BlurFilter; initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 69
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class ColorMatrixFilterPlugin extends FilterPlugin { protected var _matrix:Array; protected var _matrixTween:EndArrayPlugin; public static const API:Number = 1; public static const VERSION:Number = 1.1; protected static var _lumG:Number = 0.71516; protected static var _lumR:Number = 0.212671; protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; protected static var _lumB:Number = 0.072169; public function ColorMatrixFilterPlugin(){ this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = ColorMatrixFilter; var _local4:Object = _arg2; initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice())); _matrix = ColorMatrixFilter(_filter).matrix; var _local5:Array = []; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _local5 = _local4.matrix; } else { if (_local4.relative == true){ _local5 = _matrix.slice(); } else { _local5 = _idMatrix.slice(); }; _local5 = setBrightness(_local5, _local4.brightness); _local5 = setContrast(_local5, _local4.contrast); _local5 = setHue(_local5, _local4.hue); _local5 = setSaturation(_local5, _local4.saturation); _local5 = setThreshold(_local5, _local4.threshold); if (!isNaN(_local4.colorize)){ _local5 = colorize(_local5, _local4.colorize, _local4.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, _local5); return (true); } override public function set changeFactor(_arg1:Number):void{ _matrixTween.changeFactor = _arg1; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = _arg1; } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Number = (1 - _arg2); var _local4:Number = (_local3 * _lumR); var _local5:Number = (_local3 * _lumG); var _local6:Number = (_local3 * _lumB); var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); var _local3:Number = Math.cos(_arg2); var _local4:Number = Math.sin(_arg2); var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; var _local3:Array = []; var _local4:int; var _local5:int; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF); var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF); var _local6:Number = ((_arg2 & 0xFF) / 0xFF); var _local7:Number = (1 - _arg3); var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } } }//package gs.plugins
Section 70
//ColorTransformPlugin (gs.plugins.ColorTransformPlugin) package gs.plugins { import flash.display.*; import flash.geom.*; import gs.*; public class ColorTransformPlugin extends TintPlugin { public static const VERSION:Number = 1.5; public static const API:Number = 1; public function ColorTransformPlugin(){ this.propName = "colorTransform"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local5:String; var _local6:Number; if (!(_arg1 is DisplayObject)){ return (false); }; var _local4:ColorTransform = _arg1.transform.colorTransform; if (_arg2.isTV == true){ _arg2 = _arg2.exposedVars; }; for (_local5 in _arg2) { if ((((_local5 == "tint")) || ((_local5 == "color")))){ if (_arg2[_local5] != null){ _local4.color = int(_arg2[_local5]); }; } else { if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){ } else { _local4[_local5] = _arg2[_local5]; }; }; }; if (!isNaN(_arg2.tintAmount)){ _local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3))); _local4.redOffset = (_local4.redOffset * _local6); _local4.greenOffset = (_local4.greenOffset * _local6); _local4.blueOffset = (_local4.blueOffset * _local6); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount))); } else { if (!isNaN(_arg2.exposure)){ _local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1)))); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1)); } else { if (!isNaN(_arg2.brightness)){ _local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF)))); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1))))); }; }; }; _ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined)))); init((_arg1 as DisplayObject), _local4); return (true); } } }//package gs.plugins
Section 71
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class DropShadowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function DropShadowFilterPlugin(){ this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = DropShadowFilter; initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject)); return (true); } } }//package gs.plugins
Section 72
//EndArrayPlugin (gs.plugins.EndArrayPlugin) package gs.plugins { import flash.display.*; import gs.*; public class EndArrayPlugin extends TweenPlugin { protected var _a:Array; protected var _info:Array; public static const VERSION:Number = 1.5; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(_arg1:Array, _arg2:Array):void{ _a = _arg1; var _local3:int = (_arg2.length - 1); while (_local3 > -1) { if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){ _info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3])); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (false); }; init((_arg1 as Array), _arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:ArrayTweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _a[_local3.index] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } } }//package gs.plugins class ArrayTweenInfo { public var change:Number; public var start:Number; public var index:uint; private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){ this.index = _arg1; this.start = _arg2; this.change = _arg3; } }
Section 73
//FilterPlugin (gs.plugins.FilterPlugin) package gs.plugins { import flash.display.*; import gs.core.tween.*; import gs.*; import flash.filters.*; public class FilterPlugin extends TweenPlugin { protected var _remove:Boolean; protected var _target:Object; protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; public static const VERSION:Number = 1.03; public static const API:Number = 1; public function onCompleteTween():void{ var _local1:int; var _local2:Array; if (_remove){ _local2 = _target.filters; if (!(_local2[_index] is _type)){ _local1 = (_local2.length - 1); while (_local1 > -1) { if ((_local2[_local1] is _type)){ _local2.splice(_local1, 1); break; }; _local1--; }; } else { _local2.splice(_index, 1); }; _target.filters = _local2; }; } protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{ var _local4:String; var _local5:int; var _local6:HexColorsPlugin; var _local3:Array = _target.filters; _index = -1; if (_arg1.index != null){ _index = _arg1.index; } else { _local5 = (_local3.length - 1); while (_local5 > -1) { if ((_local3[_local5] is _type)){ _index = _local5; break; }; _local5--; }; }; if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){ _index = ((_arg1.index)!=null) ? _arg1.index : _local3.length; _local3[_index] = _arg2; _target.filters = _local3; }; _filter = _local3[_index]; _remove = Boolean((_arg1.remove == true)); if (_remove){ this.onComplete = onCompleteTween; }; var _local7:Object = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1; for (_local4 in _local7) { if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){ } else { if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){ _local6 = new HexColorsPlugin(); _local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]); _tweens[_tweens.length] = new PropTween(_local6, "changeFactor", 0, 1, _local4, false); } else { if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){ _filter[_local4] = _local7[_local4]; } else { addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4); }; }; }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:PropTween; var _local4:Array = _target.filters; _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; if (!(_local4[_index] is _type)){ _index = (_local4.length - 1); _local2 = (_local4.length - 1); while (_local2 > -1) { if ((_local4[_local2] is _type)){ _index = _local2; break; }; _local2--; }; }; _local4[_index] = _filter; _target.filters = _local4; } } }//package gs.plugins
Section 74
//FramePlugin (gs.plugins.FramePlugin) package gs.plugins { import flash.display.*; import gs.*; public class FramePlugin extends TweenPlugin { protected var _target:MovieClip; public var frame:int; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function FramePlugin(){ this.propName = "frame"; this.overwriteProps = ["frame", "frameLabel"]; this.round = true; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){ return (false); }; _target = (_arg1 as MovieClip); this.frame = _target.currentFrame; addTween(this, "frame", this.frame, _arg2, "frame"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.gotoAndStop(this.frame); } } }//package gs.plugins
Section 75
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class GlowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function GlowFilterPlugin(){ this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = GlowFilter; initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout)); return (true); } } }//package gs.plugins
Section 76
//HexColorsPlugin (gs.plugins.HexColorsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function HexColorsPlugin(){ this.propName = "hexColors"; this.overwriteProps = []; _colors = []; } override public function killProps(_arg1:Object):void{ var _local2:int = (_colors.length - 1); while (_local2 > -1) { if (_arg1[_colors[_local2][1]] != undefined){ _colors.splice(_local2, 1); }; _local2--; }; super.killProps(_arg1); } public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{ var _local5:Number; var _local6:Number; var _local7:Number; if (_arg3 != _arg4){ _local5 = (_arg3 >> 16); _local6 = ((_arg3 >> 8) & 0xFF); _local7 = (_arg3 & 0xFF); _colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)]; this.overwriteProps[this.overwriteProps.length] = _arg2; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:Array; _local2 = (_colors.length - 1); while (_local2 > -1) { _local3 = _colors[_local2]; _local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7]))); _local2--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; for (_local4 in _arg2) { initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4])); }; return (true); } } }//package gs.plugins
Section 77
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin) package gs.plugins { public class RemoveTintPlugin extends TintPlugin { public static const VERSION:Number = 1.01; public static const API:Number = 1; public function RemoveTintPlugin(){ this.propName = "removeTint"; } } }//package gs.plugins
Section 78
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class RoundPropsPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function RoundPropsPlugin(){ this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 79
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin) package gs.plugins { import flash.display.*; import gs.*; public class ShortRotationPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})"); return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number = ((_arg4 - _arg3) % 360); if (((_arg4 - _arg3) % 360) != (_local5 % 180)){ _local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360); }; addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 80
//TintPlugin (gs.plugins.TintPlugin) package gs.plugins { import flash.display.*; import flash.geom.*; import gs.core.tween.*; import gs.*; public class TintPlugin extends TweenPlugin { protected var _target:DisplayObject; protected var _ct:ColorTransform; protected var _ignoreAlpha:Boolean; public static const VERSION:Number = 1.1; public static const API:Number = 1; protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"]; public function TintPlugin(){ this.propName = "tint"; this.overwriteProps = ["tint"]; } public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{ var _local3:int; var _local4:String; _target = _arg1; _ct = _target.transform.colorTransform; _local3 = (_props.length - 1); while (_local3 > -1) { _local4 = _props[_local3]; if (_ct[_local4] != _arg2[_local4]){ _tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg1 is DisplayObject)){ return (false); }; var _local4:ColorTransform = new ColorTransform(); if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){ _local4.color = uint(_arg2); }; _ignoreAlpha = true; init((_arg1 as DisplayObject), _local4); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:ColorTransform; updateTweens(_arg1); if (_ignoreAlpha){ _local2 = _target.transform.colorTransform; _ct.alphaMultiplier = _local2.alphaMultiplier; _ct.alphaOffset = _local2.alphaOffset; }; _target.transform.colorTransform = _ct; } } }//package gs.plugins
Section 81
//TweenPlugin (gs.plugins.TweenPlugin) package gs.plugins { import gs.core.tween.*; import gs.*; public class TweenPlugin { public var onEnable:Function; public var priority:int;// = 0 public var overwriteProps:Array; protected var _tweens:Array; public var onDisable:Function; public var propName:String; public var round:Boolean; public var onComplete:Function; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.1; public static const API:Number = 1; public function TweenPlugin(){ _tweens = []; super(); } protected function updateTweens(_arg1:Number):void{ var _local2:int; var _local3:PropTween; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } public function get changeFactor():Number{ return (_changeFactor); } public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _changeFactor = _arg1; } protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{ var _local6:Number; if (_arg4 != null){ _local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4); if (_local6 != 0){ _tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false); }; }; } public function killProps(_arg1:Object):void{ var _local2:int; _local2 = (this.overwriteProps.length - 1); while (_local2 > -1) { if ((this.overwriteProps[_local2] in _arg1)){ this.overwriteProps.splice(_local2, 1); }; _local2--; }; _local2 = (_tweens.length - 1); while (_local2 > -1) { if ((_tweens[_local2].name in _arg1)){ _tweens.splice(_local2, 1); }; _local2--; }; } public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName); return (true); } public static function activate(_arg1:Array):Boolean{ var _local2:int; var _local3:Object; TweenLite.onPluginEvent = TweenPlugin.onTweenEvent; _local2 = (_arg1.length - 1); while (_local2 > -1) { _local3 = new (_arg1[_local2]); TweenLite.plugins[_local3.propName] = _arg1[_local2]; _local2--; }; return (true); } private static function onTweenEvent(_arg1:String, _arg2:PropTween):PropTween{ var _local4:Array; var _local5:int; var _local3:PropTween = _arg2; if (_arg1 == "onInit"){ _local4 = []; while (_local3 != null) { _local4[_local4.length] = _local3; _local3 = _local3.nextNode; }; _local4.sortOn("priority", (Array.NUMERIC | Array.DESCENDING)); _local5 = _local4.length; while (_local5-- > 0) { _local4[_local5].nextNode = _local4[(_local5 + 1)]; _local4[_local5].prevNode = _local4[(_local5 - 1)]; }; _local3 = _local4[0]; } else { while (_local3 != null) { if (((_local3.isPlugin) && (!((_local3.target[_arg1] == null))))){ var _local6 = _local3.target; _local6[_arg1](); }; _local3 = _local3.nextNode; }; }; return (_local3); } } }//package gs.plugins
Section 82
//VisiblePlugin (gs.plugins.VisiblePlugin) package gs.plugins { import flash.display.*; import gs.*; public class VisiblePlugin extends TweenPlugin { protected var _tween:TweenLite; protected var _hideAtStart:Boolean; protected var _target:Object; protected var _visible:Boolean; public static const VERSION:Number = 1.52; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; this.onComplete = onCompleteTween; } public function onCompleteTween():void{ if (((!(_hideAtStart)) && (((!((_tween.cachedTime == 0))) || ((_tween.duration == 0)))))){ _target.visible = _visible; }; } protected function init(_arg1:Object, _arg2:Boolean, _arg3:TweenLite):void{ _target = _arg1; _tween = _arg3; _visible = _arg2; if ((((((_tween.vars.runBackwards == true)) && (!((_tween.vars.renderOnStart == false))))) && ((_arg2 == false)))){ _hideAtStart = true; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ init(_arg1, Boolean(_arg2), _arg3); return (true); } override public function set changeFactor(_arg1:Number):void{ if (((_hideAtStart) && ((_tween.cachedTotalTime == 0)))){ _target.visible = false; } else { if (_target.visible != true){ _target.visible = true; }; }; } } }//package gs.plugins
Section 83
//VolumePlugin (gs.plugins.VolumePlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.media.*; public class VolumePlugin extends TweenPlugin { protected var _target:Object; protected var _st:SoundTransform; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package gs.plugins
Section 84
//OverwriteManager (gs.OverwriteManager) package gs { import gs.core.tween.*; import flash.utils.*; import flash.errors.*; public class OverwriteManager { public static const ALL:int = 1; public static const NONE:int = 0; public static const AUTO:int = 2; public static const CONCURRENT:int = 3; public static const version:Number = 5.01; public static var mode:int; public static var enabled:Boolean; public static function getGlobalActive(_arg1:Tweenable):Boolean{ var _local2:Tweenable = _arg1; while (_local2 != null) { if (!_local2.active){ return (false); }; _local2 = _local2.timeline; }; return (true); } public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array):void{ var _local9:int; var _local10:TweenLite; var _local11:Number; var _local12:Number; var _local13:Tweenable; var _local14:Number; var _local15:SimpleTimeline; var _local4:Object = _arg1.vars; var _local5:int = ((_local4.overwrite)==undefined) ? mode : int(_local4.overwrite); if ((((_local5 < 2)) || ((_arg3 == null)))){ return; }; var _local6:Number = _arg1.startTime; var _local7:Array = []; var _local8:Array = []; _local9 = (_arg3.length - 1); while (_local9 > -1) { _local10 = _arg3[_local9]; if ((((_local10 == _arg1)) || (_local10.gc))){ } else { if (_local10.timeline != _arg1.timeline){ _local8[_local8.length] = _local10; } else { if ((((((_local10.startTime <= _local6)) && (((_local10.startTime + _local10.totalDuration) > _local6)))) && (getGlobalActive(_local10)))){ _local7[_local7.length] = _local10; }; }; }; _local9--; }; if (_local8.length != 0){ _local11 = _arg1.cachedTimeScale; _local12 = _local6; _local15 = _arg1.timeline; while (_local15 != null) { _local11 = (_local11 * _local15.cachedTimeScale); _local12 = (_local12 + _local15.startTime); _local15 = _local15.timeline; }; _local6 = (_local11 * _local12); _local9 = (_local8.length - 1); while (_local9 > -1) { _local13 = _local8[_local9]; _local11 = _local13.cachedTimeScale; _local12 = _local13.startTime; _local15 = _local13.timeline; while (_local15 != null) { _local11 = (_local11 * _local15.cachedTimeScale); _local12 = (_local12 + _local15.startTime); _local15 = _local15.timeline; }; _local14 = (_local11 * _local12); if ((((_local14 <= _local6)) && (((_local14 + (_local13.totalDuration * _local11)) > _local6)))){ _local7[_local7.length] = _local13; }; _local9--; }; }; if (_local7.length == 0){ return; }; if (_local5 == AUTO){ _local9 = (_local7.length - 1); while (_local9 > -1) { _local7[_local9].killVars(_arg2); _local9--; }; } else { _local9 = (_local7.length - 1); while (_local9 > -1) { _local7[_local9].enabled = false; _local9--; }; }; } public static function init(_arg1:int=2):int{ if (TweenLite.version < 11.097){ trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."); }; TweenLite.overwriteManager = OverwriteManager; mode = _arg1; enabled = true; return (mode); } } }//package gs
Section 85
//TimelineLite (gs.TimelineLite) package gs { import gs.core.tween.*; import flash.utils.*; public class TimelineLite extends SimpleTimeline { protected var _labels:Object; protected var _reversed:Boolean; protected var _disabledChildren:Array; public static const ALIGN_START:String = "start"; public static const ALIGN_INIT:String = "init"; public static const version:Number = 0.55; public static const ALIGN_SEQUENCE:String = "sequence"; protected static var _defaultTweenClass:Class; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; public function TimelineLite(_arg1:Object=null){ var $vars = _arg1; super($vars); if (this.vars.paused == true){ this.paused = true; }; _labels = {}; this.autoRemoveChildren = Boolean((this.vars.autoRemoveChildren == true)); _hasUpdate = Boolean((typeof(this.vars.onUpdate) == "function")); if (_defaultTweenClass == null){ try { _defaultTweenClass = (getDefinitionByName("gs.TweenMax") as Class); } catch($e:Error) { _defaultTweenClass = TweenLite; }; }; if ((this.vars.tweens is Array)){ this.insertMultiple(this.vars.tweens, 0, ((this.vars.align) || (ALIGN_INIT)), ((this.vars.stagger) || (0)), this.vars.tweenClass); }; if (this.vars.reversed == true){ _reversed = true; }; } public function insert(_arg1:Tweenable, _arg2=0):void{ if (typeof(_arg2) == "string"){ if (!(_arg2 in _labels)){ addLabel(_arg2, this.duration); }; _arg2 = Number(_labels[_arg2]); }; _arg1.startTime = (Number(_arg2) + _arg1.delay); addChild(_arg1); } public function set timeScale(_arg1:Number):void{ if (_arg1 == 0){ _arg1 = 0.0001; }; this.startTime = (this.timeline.cachedTotalTime - (((this.timeline.cachedTotalTime - this.startTime) * this.cachedTimeScale) / _arg1)); this.cachedTimeScale = _arg1; setDirtyCache(false); } override public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ var _local5:Tweenable; var _local6:Boolean; var _local7:Boolean; var _local8:Boolean; if (this.gc){ this.enabled = true; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; var _local3:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; var _local4:Number = this.cachedTime; if (_arg1 >= _local3){ if (_reversed){ forceChildrenToBeginning(_local4); } else { forceChildrenToEnd(_local4); }; _local7 = true; _local6 = _local7; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; }; if (_reversed){ forceChildrenToEnd(_local4); } else { forceChildrenToBeginning(_local4); }; _local7 = true; } else { this.cachedTotalTime = (this.cachedTime = (_reversed) ? (_local3 - _arg1) : _arg1); }; }; if (!this.initted){ _local8 = true; this.initted = _local8; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; } else { if ((((this.cachedTime == _local4)) && (!(_arg2)))){ return; }; }; if (_local7){ } else { if ((this.cachedTime - _local4) > 0){ _local5 = _firstChild; while (_local5 != null) { if (((_local5.active) || (((((!(_local5.cachedPaused)) && ((_local5.startTime <= this.cachedTime)))) && (!((_local5.cachedDuration == 0))))))){ _local5.renderTime(((this.cachedTime - _local5.startTime) * _local5.cachedTimeScale)); } else { if ((((((((_local5.cachedDuration == 0)) && ((((_local5.startTime > _local4)) || (_local8))))) && ((_local5.startTime <= this.cachedTime)))) && (!(_local5.cachedPaused)))){ _local5.renderTime(0, true); }; }; _local5 = _local5.nextNode; }; } else { _local5 = _lastChild; while (_local5 != null) { if (((_local5.active) || (((((!(_local5.cachedPaused)) && ((_local5.startTime <= _local4)))) && (!((_local5.cachedDuration == 0))))))){ _local5.renderTime(((this.cachedTime - _local5.startTime) * _local5.cachedTimeScale)); } else { if ((((((((_local5.cachedDuration == 0)) && ((_local5.startTime < _local4)))) && ((_local5.startTime >= this.cachedTime)))) && (!(_local5.cachedPaused)))){ _local5.renderTime(0, true); }; }; _local5 = _local5.prevNode; }; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local6){ complete(true); }; } override public function remove(_arg1:Tweenable, _arg2:Boolean=false):void{ super.remove(_arg1, _arg2); setDirtyCache(true); } override public function set delay(_arg1:Number):void{ super.delay = _arg1; setDirtyCache(true); } public function set time(_arg1:Number):void{ this.totalTime = _arg1; } public function gotoAndPlay(_arg1):void{ goto(_arg1); this.paused = false; } public function stop():void{ this.paused = true; } override public function addChild(_arg1:Tweenable):void{ var _local2:Tweenable; var _local3:Number; if (((!((_arg1.timeline == null))) && (!(_arg1.gc)))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.enabled = true; return; }; setDirtyCache(true); if (_firstChild == null){ _firstChild = (_lastChild = _arg1); _arg1.nextNode = (_arg1.prevNode = null); } else { _local2 = _lastChild; _local3 = _arg1.startTime; while (((!((_local2 == null))) && ((_local3 < _local2.startTime)))) { _local2 = _local2.prevNode; }; if (_local2 == null){ _firstChild.prevNode = _arg1; _arg1.nextNode = _firstChild; _arg1.prevNode = null; _firstChild = _arg1; } else { if (_local2.nextNode != null){ _local2.nextNode.prevNode = _arg1; } else { if (_local2 == _lastChild){ _lastChild = _arg1; }; }; _arg1.prevNode = _local2; _arg1.nextNode = _local2.nextNode; _local2.nextNode = _arg1; }; }; } public function set reversed(_arg1:Boolean):void{ if (_arg1 != _reversed){ reverse(true); }; } public function get time():Number{ return (this.cachedTime); } public function prepend(_arg1:Tweenable, _arg2:Boolean=false):void{ var _local4:Number; var _local5:Tweenable; var _local6:String; var _local3:Number = 0; if (_firstChild != null){ _local3 = _firstChild.startTime; _local4 = ((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay); _local5 = _firstChild; while (_local5 != null) { _local5.startTime = (_local5.startTime + _local4); _local5 = _local5.nextNode; }; if (_arg2){ for (_local6 in _labels) { _labels[_local6] = (_labels[_local6] + _local4); }; }; }; insert(_arg1, _local3); } public function restart(_arg1:Boolean=false):void{ this.totalTime = (_arg1) ? -(_delay) : 0; this.paused = false; } public function get totalProgress():Number{ return ((_reversed) ? (1 - (this.cachedTotalTime / this.totalDuration)) : (this.cachedTotalTime / this.totalDuration)); } protected function setDirtyCache(_arg1:Boolean=true):void{ var _local2:Tweenable = (_arg1) ? this : this.timeline; while (_local2 != null) { _local2.cacheIsDirty = true; _local2 = _local2.timeline; }; } public function addLabel(_arg1:String, _arg2:Number):void{ _labels[_arg1] = _arg2; } override public function get duration():Number{ var _local1:Number; if (this.cacheIsDirty){ _local1 = this.totalDuration; }; return (this.cachedDuration); } public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{ var _local5:int; var _local3:Array = getChildren(_arg2, true, false); var _local4:Array = []; var _local6:uint = _local3.length; _local5 = 0; while (_local5 < _local6) { if (_local3[_local5].target == _arg1){ _local4[_local4.length] = _local3[_local5]; }; _local5++; }; return (_local4); } public function gotoAndStop(_arg1):void{ goto(_arg1); this.paused = true; } public function append(_arg1:Tweenable):void{ insert(_arg1, ((_lastChild)==null) ? 0 : (_lastChild.startTime + (_lastChild.totalDuration / _lastChild.cachedTimeScale))); } public function set totalTime(_arg1:Number):void{ this.startTime = (this.timeline.cachedTotalTime - (_arg1 / this.cachedTimeScale)); renderTime(_arg1); setDirtyCache(false); } public function set paused(_arg1:Boolean):void{ var _local2:Number; if (_arg1 != this.cachedPaused){ if (!_arg1){ _local2 = (_reversed) ? (this.totalDuration - this.cachedTotalTime) : this.cachedTotalTime; this.startTime = (this.timeline.cachedTotalTime - (_local2 / this.cachedTimeScale)); }; setDirtyCache(false); this.cachedPaused = _arg1; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(_arg1)) && (this.gc))){ this.enabled = true; }; } public function killTweensOf(_arg1:Object, _arg2:Boolean=true):void{ var _local4:int; var _local3:Array = getTweensOf(_arg1, _arg2); _local4 = (_local3.length - 1); while (_local4 > -1) { _local3[_local4].enabled = false; _local4--; }; } public function reverse(_arg1:Boolean=true):void{ this.startTime = (this.timeline.cachedTotalTime - (((1 - this.totalProgress) * this.totalDuration) / this.cachedTimeScale)); _reversed = !(_reversed); setDirtyCache(false); if (_arg1){ this.paused = false; if (this.progress == 1){ this.totalTime = 0; }; } else { if (this.gc){ this.enabled = true; }; }; } public function goto(_arg1):void{ if (typeof(_arg1) == "string"){ _arg1 = _labels[_arg1]; }; if (!isNaN(_arg1)){ this.totalTime = Number(_arg1); }; } public function get reversed():Boolean{ return (_reversed); } public function get useFrames():Boolean{ var _local1:SimpleTimeline = this.timeline; while (_local1.timeline != null) { _local1 = _local1.timeline; }; return (Boolean((_local1 == TweenLite.rootFramesTimeline))); } override public function set duration(_arg1:Number):void{ if (((!((this.duration == 0))) && (!((_arg1 == 0))))){ this.timeScale = (this.duration / _arg1); }; } public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="init", _arg4:Number=0, _arg5:Class=null):void{ var _local6:int; var _local7:Object; var _local8:Tweenable; if (_arg5 == null){ _arg5 = _defaultTweenClass; }; var _local9:Number = ((Number(_arg2)) || (0)); var _local10:uint = _arg1.length; if (typeof(_arg2) == "string"){ if (!(_arg2 in _labels)){ addLabel(_arg2, this.duration); }; _local9 = _labels[_arg2]; }; _local6 = 0; while (_local6 < _local10) { _local7 = _arg1[_local6]; if ((_local7 is Tweenable)){ _local8 = (_local7 as Tweenable); } else { if ((_local7 is Array)){ _local8 = new _arg5(_local7[0], _local7[1], _local7[2]); } else { if ((_local7 is Function)){ _local8 = new TweenLite(_local7, 0, {onComplete:_local7, overwrite:0, immediateRender:false}); } else { _local8 = new TimelineLite(_local7); }; }; }; insert(_local8, _local9); if (_arg3 == ALIGN_SEQUENCE){ _local9 = (_local8.startTime + _local8.totalDuration); } else { if (_arg3 == ALIGN_START){ _local8.startTime = (_local8.startTime - _local8.delay); }; }; _local9 = (_local9 + _arg4); _local6++; }; setDirtyCache(true); } public function get totalTime():Number{ return (this.cachedTotalTime); } public function get progress():Number{ return ((_reversed) ? (1 - (this.cachedTime / this.duration)) : (this.cachedTime / this.duration)); } public function get paused():Boolean{ return (this.cachedPaused); } override public function set enabled(_arg1:Boolean):void{ var _local2:Tweenable; if (_arg1 == this.gc){ _local2 = _firstChild; if (!_arg1){ _disabledChildren = []; while (_local2 != null) { _local2.enabled = _arg1; if (!_arg1){ _disabledChildren[_disabledChildren.length] = _local2; }; _local2 = _local2.nextNode; }; } else { for each (_local2 in _disabledChildren) { _local2.enabled = true; }; _disabledChildren = []; }; super.enabled = _arg1; }; } override public function set totalDuration(_arg1:Number):void{ if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){ this.timeScale = (this.totalDuration / _arg1); }; } public function set totalProgress(_arg1:Number):void{ this.totalTime = (_reversed) ? ((1 - _arg1) * this.totalDuration) : (this.totalDuration * _arg1); } public function set progress(_arg1:Number):void{ this.totalTime = (_reversed) ? ((1 - _arg1) * this.duration) : (this.duration * _arg1); } public function play():void{ this.paused = false; } public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true):Array{ var _local4:Array = []; var _local5:Tweenable = _firstChild; while (_local5 != null) { if ((_local5 is TweenLite)){ if (_arg2){ _local4[_local4.length] = _local5; }; } else { if (_arg3){ _local4[_local4.length] = _local5; }; if (_arg1){ _local4.concat((_local5 as TimelineLite).getChildren(true, _arg2, _arg3)); }; }; _local5 = _local5.nextNode; }; return (_local4); } protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):void{ this.cachedTotalTime = this.cachedTotalDuration; this.cachedTime = this.cachedDuration; var _local3:Tweenable = _firstChild; while (_local3 != null) { if (((_local3.active) || (((!(_local3.cachedPaused)) && (!((_local3.cachedTotalTime == _local3.cachedTotalDuration))))))){ _local3.renderTime(_local3.cachedTotalDuration); } else { if ((((((((_local3.cachedDuration == 0)) && (!(_arg2)))) && ((_local3.startTime > _arg1)))) && (!(_local3.cachedPaused)))){ _local3.renderTime(0, true); }; }; _local3 = _local3.nextNode; }; } protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):void{ this.cachedTotalTime = (this.cachedTime = 0); var _local3:Tweenable = _lastChild; while (_local3 != null) { if (((_local3.active) || (((!(_local3.cachedPaused)) && (!((_local3.cachedTotalTime == 0))))))){ _local3.renderTime(0); } else { if ((((((((((_local3.cachedDuration == 0)) && (!(_arg2)))) && ((_local3.startTime < _arg1)))) && ((_local3.startTime >= 0)))) && (!(_local3.cachedPaused)))){ _local3.renderTime(0, true); }; }; _local3 = _local3.prevNode; }; } override public function complete(_arg1:Boolean=false):void{ if (!_arg1){ renderTime(this.totalDuration); return; }; if (this.timeline.autoRemoveChildren){ this.enabled = false; } else { this.active = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public function get timeScale():Number{ return (this.cachedTimeScale); } override public function get totalDuration():Number{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Tweenable; var _local6:Number; var _local7:Tweenable; if (this.cacheIsDirty){ if (this.gc){ _local1 = true; this.enabled = _local1; }; _local2 = 0; _local3 = 0; _local5 = _firstChild; _local6 = -(Infinity); while (_local5 != null) { _local7 = _local5.nextNode; if (((!(_local5.cachedPaused)) || (this.cachedPaused))){ if (_local5.startTime < _local6){ this.addChild(_local5); _local6 = _local5.prevNode.startTime; } else { _local6 = _local5.startTime; }; if (_local5.startTime < _local2){ _local2 = _local5.startTime; }; _local4 = (_local5.startTime + (_local5.totalDuration / _local5.cachedTimeScale)); if (_local4 > _local3){ _local3 = _local4; }; }; _local5 = _local7; }; this.cachedDuration = (this.cachedTotalDuration = (_local3 - _local2)); this.cacheIsDirty = false; if (_local1){ this.enabled = false; }; }; return (this.cachedTotalDuration); } } }//package gs
Section 86
//TimelineMax (gs.TimelineMax) package gs { import flash.events.*; import gs.core.tween.*; import gs.events.*; import flash.utils.*; public class TimelineMax extends TimelineLite implements IEventDispatcher { protected var _cyclesComplete:uint; protected var _dispatcher:EventDispatcher; protected var _hasUpdateListener:Boolean; public var yoyo:Boolean; protected var _repeatDelay:Number; protected var _repeat:int; public static const version:Number = 0.53; public static const ALIGN_INIT:String = "init"; public static const ALIGN_SEQUENCE:String = "sequence"; public static const ALIGN_START:String = "start"; public function TimelineMax(_arg1:Object=null){ super(_arg1); _repeat = ((this.vars.repeat) || (0)); _repeatDelay = ((this.vars.repeatDelay) || (0)); _cyclesComplete = 0; this.yoyo = ((this.vars.yoyo) || (false)); this.cacheIsDirty = true; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); }; } public function dispatchEvent(_arg1:Event):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1)); } override public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ var _local5:Tweenable; var _local6:Boolean; var _local7:Boolean; var _local8:Boolean; var _local9:Boolean; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Boolean; if (this.gc){ this.enabled = true; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; var _local3:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; var _local4:Number = this.cachedTime; if (_arg1 >= _local3){ if (((_reversed) || (((this.yoyo) && (!(((_repeat % 2) == 0))))))){ forceChildrenToBeginning(_local4); } else { forceChildrenToEnd(_local4); }; _local7 = true; _local6 = _local7; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; }; if (((_reversed) || (((this.yoyo) && (!(((_repeat % 2) == 0))))))){ forceChildrenToEnd(_local4); _local6 = true; } else { forceChildrenToBeginning(_local4); }; _local7 = true; } else { this.cachedTotalTime = (this.cachedTime = (_reversed) ? (_local3 - _arg1) : _arg1); }; }; if (_repeat != 0){ _local10 = (this.cachedDuration + _repeatDelay); this.cachedTime = (((((this.yoyo) && ((((this.cachedTotalTime / _local10) % 2) >= 1)))) || (((!(this.yoyo)) && (!(((this.cachedTotalTime / _local10) % 1))))))) ? (this.cachedDuration - (this.cachedTotalTime % _local10)) : (this.cachedTotalTime % _local10); if (this.cachedTime >= this.cachedDuration){ this.cachedTime = this.cachedDuration; } else { if (this.cachedTime <= 0){ this.cachedTime = 0; }; }; if (((!((_cyclesComplete == int((this.cachedTotalTime / _local10))))) && (!(_local6)))){ _local8 = true; _cyclesComplete = int((this.cachedTotalTime / _local10)); _local11 = this.cachedTime; _local12 = this.cachedTotalTime; _local13 = Boolean(((!(this.yoyo)) || (((_cyclesComplete % 2) == 1)))); if (_reversed){ _local13 = !(_local13); }; if (_local13){ forceChildrenToEnd(_local4, false); if (!this.yoyo){ forceChildrenToBeginning(this.cachedDuration, true); }; } else { forceChildrenToBeginning(_local4, false); if (!this.yoyo){ forceChildrenToEnd(0, true); }; }; _local4 = this.cachedTime; this.cachedTime = _local11; this.cachedTotalTime = _local12; }; }; if (!this.initted){ _local9 = true; this.initted = _local9; if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); }; } else { if ((((this.cachedTime == _local4)) && (!(_arg2)))){ return; }; }; if (_local7){ } else { if ((this.cachedTime - _local4) > 0){ _local5 = _firstChild; while (_local5 != null) { if (((_local5.active) || (((((!(_local5.cachedPaused)) && ((_local5.startTime <= this.cachedTime)))) && (!((_local5.cachedDuration == 0))))))){ _local5.renderTime(((this.cachedTime - _local5.startTime) * _local5.cachedTimeScale)); } else { if ((((((((_local5.cachedDuration == 0)) && ((((_local5.startTime > _local4)) || (_local9))))) && ((_local5.startTime <= this.cachedTime)))) && (!(_local5.cachedPaused)))){ _local5.renderTime(0, true); }; }; _local5 = _local5.nextNode; }; } else { _local5 = _lastChild; while (_local5 != null) { if (((_local5.active) || (((((!(_local5.cachedPaused)) && ((_local5.startTime <= _local4)))) && (!((_local5.cachedDuration == 0))))))){ _local5.renderTime(((this.cachedTime - _local5.startTime) * _local5.cachedTimeScale)); } else { if ((((((((_local5.cachedDuration == 0)) && ((_local5.startTime < _local4)))) && ((_local5.startTime >= this.cachedTime)))) && (!(_local5.cachedPaused)))){ _local5.renderTime(0, true); }; }; _local5 = _local5.prevNode; }; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_hasUpdateListener){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); }; if (_local6){ if (!_reversed){ complete(true); } else { if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); }; }; } else { if (((_local8) && (!((_dispatcher == null))))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); }; }; } public function set repeatDelay(_arg1:Number):void{ _repeatDelay = _arg1; setDirtyCache(true); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if (_arg1 == TweenEvent.UPDATE){ _hasUpdateListener = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function addCallback(_arg1:Function, _arg2, _arg3:Array=null):TweenLite{ var _local4:TweenLite = new TweenLite(_arg1, 0, {onComplete:_arg1, onCompleteParams:_arg3, overwrite:0, immediateRender:false}); insert(_local4, _arg2); return (_local4); } public function hasEventListener(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1)); } protected function initDispatcher():void{ if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); _hasUpdateListener = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function get repeat():int{ return (_repeat); } public function willTrigger(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1)); } public function removeCallback(_arg1:Function, _arg2=null):Boolean{ var _local4:int; var _local5:Boolean; var _local3:Array = getTweensOf(_arg1, false); if (typeof(_arg2) == "string"){ if (!(_arg2 in _labels)){ return (false); }; _arg2 = ((_labels[_arg2]) || (0)); }; _local4 = (_local3.length - 1); while (_local4 > -1) { if ((((_arg2 == null)) || ((_local3[_local4].startTime == _arg2)))){ remove((_local3[_local4] as Tweenable)); _local5 = true; }; _local4--; }; return (_local5); } public function get repeatDelay():Number{ return (_repeatDelay); } public function set repeat(_arg1:int):void{ _repeat = _arg1; setDirtyCache(true); } override public function get totalDuration():Number{ var _local1:Number; if (this.cacheIsDirty){ _local1 = super.totalDuration; this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat)); }; return (this.cachedTotalDuration); } override public function complete(_arg1:Boolean=false):void{ super.complete(_arg1); if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); }; } public function getActive(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=false):Array{ var _local6:int; var _local4:Array = []; var _local5:Array = getChildren(_arg1, _arg2, _arg3); var _local7:uint = _local5.length; _local6 = 0; while (_local6 < _local7) { if (_local5[_local6].active){ _local4[_local4.length] = _local5[_local6]; }; _local6++; }; return (_local4); } } }//package gs
Section 87
//TweenLite (gs.TweenLite) package gs { import flash.display.*; import flash.events.*; import gs.core.tween.*; import flash.utils.*; import gs.plugins.*; public class TweenLite extends Tweenable { protected var _hasPlugins:Boolean; public var propTweenLookup:Object; protected var _overwrittenProps:Object; public var target:Object; protected var _notifyPluginsOfEnabled:Boolean; public var ease:Function; protected var _firstPropTween:PropTween; public static const version:Number = 11.097; public static var rootTimeline:SimpleTimeline; 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; public static var timingSprite:Sprite = new Sprite(); 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, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, persist:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1}; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local4:int; var _local5:Array; var _local6:TweenLite; super(_arg2, _arg3); this.ease = ((typeof(this.vars.ease))!="function") ? defaultEase : this.vars.ease; this.target = _arg1; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.ease; this.ease = easeProxy; }; propTweenLookup = {}; if (!(_arg1 in masterList)){ masterList[_arg1] = [this]; } else { _local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if (_local4 == 1){ _local5 = masterList[_arg1]; for each (_local6 in _local5) { if (!_local6.gc){ _local6.enabled = false; }; }; masterList[_arg1] = [this]; } else { masterList[_arg1].push(this); }; }; if (((((this.active) && (!((this.vars.immediateRender == false))))) || ((this.vars.immediateRender == true)))){ renderTime(0); }; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; var _local4:Boolean; var _local5:Number = this.cachedTime; this.active = true; if (_arg1 >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); _local3 = 1; _local4 = true; } else { if (_arg1 <= 0){ _local3 = 0; this.cachedTotalTime = (this.cachedTime = _local3); if (_arg1 < 0){ this.active = false; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); _local3 = this.ease(_arg1, 0, 1, this.cachedDuration); }; }; if (!this.initted){ init(); if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; } else { if ((((this.cachedTime == _local5)) && (!(_arg2)))){ return; }; }; var _local6:PropTween = _firstPropTween; while (_local6 != null) { _local6.target[_local6.property] = (_local6.start + (_local3 * _local6.change)); _local6 = _local6.nextNode; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local4){ complete(true); }; } protected function removePropTween(_arg1:PropTween):void{ if (((_arg1.isPlugin) && (!((_arg1.target.onDisable == null))))){ _arg1.target.onDisable(); }; if (_arg1.nextNode != null){ _arg1.nextNode.prevNode = _arg1.prevNode; }; if (_arg1.prevNode != null){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_firstPropTween == _arg1){ _firstPropTween = _arg1.nextNode; }; }; } protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{ var _local9:Array; var _local10:int; var _local8:PropTween = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7); if (_arg7 != null){ _arg7.prevNode = _local8; }; if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){ _local9 = _arg1.overwriteProps; _local10 = (_local9.length - 1); while (_local10 > -1) { propTweenLookup[_local9[_local10]] = _local8; _local10--; }; } else { propTweenLookup[_arg5] = _local8; }; return (_local8); } protected function init():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:Boolean; var _local6:PropTween; var _local5:Object = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars; propTweenLookup = {}; if (((!((_local5.timeScale == undefined))) && ((this.target is Tweenable)))){ _firstPropTween = insertPropTween(this.target, "timeScale", this.target.timeScale, _local5.timeScale, "timeScale", false, _firstPropTween); }; for (_local1 in _local5) { if ((_local1 in _reservedProps)){ } else { if ((_local1 in plugins)){ _local3 = new (plugins[_local1]); if (_local3.onInitTween(this.target, _local5[_local1], this) == false){ _firstPropTween = insertPropTween(this.target, _local1, this.target[_local1], _local5[_local1], _local1, false, _firstPropTween); } else { _firstPropTween = insertPropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, _firstPropTween); _hasPlugins = true; if (_local3.priority != 0){ _firstPropTween.priority = _local3.priority; _local4 = true; }; if (((!((_local3.onDisable == null))) || (!((_local3.onEnable == null))))){ _notifyPluginsOfEnabled = true; }; }; } else { _firstPropTween = insertPropTween(this.target, _local1, this.target[_local1], _local5[_local1], _local1, false, _firstPropTween); }; }; }; if (_local4){ _firstPropTween = onPluginEvent("onInit", _firstPropTween); }; if (this.vars.runBackwards == true){ _local6 = _firstPropTween; while (_local6 != null) { _local6.start = (_local6.start + _local6.change); _local6.change = -(_local6.change); _local6 = _local6.nextNode; }; }; _hasUpdate = Boolean(!((this.vars.onUpdate == null))); if (_overwrittenProps != null){ killVars(_overwrittenProps); }; if (((((TweenLite.overwriteManager.enabled) && (!((_firstPropTween == null))))) && ((this.target in masterList)))){ overwriteManager.manageOverwrites(this, propTweenLookup, masterList[this.target]); }; this.initted = true; } override public function complete(_arg1:Boolean=false):void{ if (!_arg1){ renderTime(this.cachedTotalDuration); return; }; if (_hasPlugins){ onPluginEvent("onComplete", _firstPropTween); }; if (this.timeline.autoRemoveChildren){ this.enabled = false; } else { this.active = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == this.gc){ if (_arg1){ if (!(this.target in TweenLite.masterList)){ TweenLite.masterList[this.target] = [this]; } else { TweenLite.masterList[this.target].push(this); }; }; super.enabled = _arg1; if (_notifyPluginsOfEnabled){ onPluginEvent((_arg1) ? "onEnable" : "onDisable", _firstPropTween); }; }; } public function killVars(_arg1:Object, _arg2:Boolean=true):void{ var _local3:String; var _local4:PropTween; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (_local3 in _arg1) { if ((_local3 in propTweenLookup)){ _local4 = propTweenLookup[_local3]; if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){ _local4.target.killProps(_arg1); if (_local4.target.overwriteProps.length == 0){ removePropTween(_local4); delete propTweenLookup[_local3]; }; } else { removePropTween(_local4); delete propTweenLookup[_local3]; }; }; if (_arg2){ _overwrittenProps[_local3] = 1; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, useFrames:_arg4, overwrite:0})); } public static function removeTween(_arg1:TweenLite):void{ if (_arg1 != null){ _arg1.enabled = false; }; } public static function initClass():void{ TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]); rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.startTime = (getTimer() * 0.001); rootFramesTimeline.startTime = rootFrame; rootTimeline.autoRemoveChildren = (rootFramesTimeline.autoRemoveChildren = true); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; if (((!((_arg1 == null))) && ((_arg1 in masterList)))){ _local3 = masterList[_arg1]; _local4 = _local3.length; while (_local4-- > 0) { if (!_local3[_local4].gc){ if (_arg2){ _local3[_local4].complete(false); } else { _local3[_local4].enabled = false; }; }; }; delete masterList[_arg1]; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; if (_arg3.immediateRender != false){ _arg3.immediateRender = true; }; return (new TweenLite(_arg1, _arg2, _arg3)); } protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } protected static function updateAll(_arg1:Event=null):void{ var _local2:Dictionary; var _local3:Object; var _local4:Array; var _local5:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.startTime) * rootTimeline.cachedTimeScale)); rootFrame++; rootFramesTimeline.renderTime((rootFrame * rootFramesTimeline.cachedTimeScale)); if (!(rootFrame % 60)){ _local2 = masterList; for (_local3 in _local2) { _local4 = _local2[_local3]; _local5 = _local4.length; while (_local5-- > 0) { if (_local4[_local5].gc){ _local4.splice(_local5, 1); }; }; if (_local4.length == 0){ delete _local2[_local3]; }; }; }; } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 88
//TweenMax (gs.TweenMax) package gs { import flash.display.*; import flash.events.*; import gs.core.tween.*; import gs.events.*; import flash.utils.*; import gs.plugins.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _reversed:Boolean; public var yoyo:Boolean; protected var _repeat:int; protected var _cyclesComplete:uint; protected var _dispatcher:EventDispatcher; protected var _hasUpdateListener:Boolean; protected var _pauseTime:Number; protected var _repeatDelay:Number; public static const version:Number = 11.0971; public static var removeTween:Function = TweenLite.removeTween; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; private static var _pauseAllTime:Number; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]); public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); if (TweenLite.version < 11.097){ trace("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."); }; if ((((typeof(this.vars.yoyo) == "number")) || (!((this.vars.loop == undefined))))){ trace("WARNING: Your tween uses the old 'yoyo' or 'loop' syntax which technically still works for now but has been deprecated in favor of the new, more flexible 'repeat' and 'yoyo' usage. See http://www.TweenMax.com for details."); }; _cyclesComplete = 0; if ((((this.vars.yoyo == true)) || (!(isNaN(this.vars.yoyo))))){ this.yoyo = true; }; _repeat = ((this.vars.loop)!=undefined) ? ((this.vars.loop)==0) ? -1 : Number(this.vars.loop) : ((((typeof(this.vars.yoyo))=="number") ? ((this.vars.yoyo)==0) ? -1 : this.vars.yoyo : this.vars.repeat) || (0)); _repeatDelay = ((this.vars.repeatDelay) || (0)); this.cacheIsDirty = true; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); }; }; if (this.vars.reversed == true){ _reversed = true; }; } override public function renderTime(_arg1:Number, _arg2:Boolean=false):void{ var _local4:Tweenable; var _local6:Boolean; var _local7:Number; var _local8:Boolean; var _local10:Number; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; var _local3:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; var _local5:Number = this.cachedTime; if (_arg1 >= _local3){ if (((_reversed) || (((this.yoyo) && (!(((_repeat % 2) == 0))))))){ _local7 = 0; this.cachedTotalTime = (this.cachedTime = _local7); } else { this.cachedTotalTime = _local3; this.cachedTime = this.cachedDuration; _local7 = 1; }; _local6 = true; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; }; if (((_reversed) || (((this.yoyo) && (!(((_repeat % 2) == 0))))))){ this.cachedTotalTime = _local3; this.cachedTime = this.cachedDuration; _local7 = 1; _local6 = true; } else { _local7 = 0; this.cachedTotalTime = (this.cachedTime = _local7); }; } else { this.cachedTotalTime = (this.cachedTime = (_reversed) ? (_local3 - _arg1) : _arg1); if (_repeat == 0){ _local7 = this.ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; }; if (_repeat != 0){ _local10 = (this.cachedDuration + _repeatDelay); this.cachedTime = (((((this.yoyo) && ((((this.cachedTotalTime / _local10) % 2) >= 1)))) || (((!(this.yoyo)) && (!(((this.cachedTotalTime / _local10) % 1))))))) ? (this.cachedDuration - (this.cachedTotalTime % _local10)) : (this.cachedTotalTime % _local10); if (this.cachedTime >= this.cachedDuration){ this.cachedTime = this.cachedDuration; _local7 = 1; } else { if (this.cachedTime <= 0){ _local7 = 0; this.cachedTime = _local7; } else { _local7 = this.ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!((_cyclesComplete == int((this.cachedTotalTime / _local10))))) && (!(_local6)))){ _local8 = true; _cyclesComplete = int((this.cachedTotalTime / _local10)); }; }; if (!this.initted){ init(); if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); }; } else { if ((((_local5 == this.cachedTime)) && (!(_arg2)))){ return; }; }; var _local9:PropTween = _firstPropTween; while (_local9 != null) { _local9.target[_local9.property] = (_local9.start + (_local7 * _local9.change)); _local9 = _local9.nextNode; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_hasUpdateListener){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); }; if (_local6){ if (!_reversed){ complete(true); } else { if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); }; }; } else { if (((_local8) && (!((_dispatcher == null))))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); }; }; } public function set reversed(_arg1:Boolean):void{ if (_arg1 != _reversed){ reverse(true); }; } public function willTrigger(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1)); } public function restart(_arg1:Boolean=false):void{ this.totalTime = (_arg1) ? -(_delay) : 0; this.paused = false; } override protected function init():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:PropTween; if (this.vars.startAt != null){ this.vars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.vars.startAt); }; super.init(); if ((((this.vars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){ _local5 = this.vars.roundProps; _local1 = (_local5.length - 1); while (_local1 > -1) { _local3 = _local5[_local1]; _local7 = this._firstPropTween; while (_local7 != null) { if (_local7.name == _local3){ if (_local7.isPlugin){ _local7.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local7.target, _local3, _local7.start, _local7.change); _hasPlugins = true; _firstPropTween = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, _firstPropTween); } else { _local6.add(_local7.target, _local3, _local7.start, _local7.change); this.removePropTween(_local7); }; }; } else { if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){ _local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local7.target.round = true; }; }; }; _local7 = _local7.nextNode; }; _local1--; }; }; } public function get totalProgress():Number{ return ((_reversed) ? (1 - (this.cachedTotalTime / this.totalDuration)) : (this.cachedTotalTime / this.totalDuration)); } protected function adjustStartValues():void{ var _local2:Number; var _local3:Number; var _local4:PropTween; var _local5:Number; var _local6:int; var _local1:Number = this.progress; if (_local1 != 0){ _local2 = this.ease(_local1, 0, 1, 1); _local3 = (1 / (1 - _local2)); _local4 = _firstPropTween; while (_local4 != null) { _local5 = (_local4.start + _local4.change); if (_local4.isPlugin){ _local4.change = ((_local5 - _local2) * _local3); } else { _local4.change = ((_local5 - _local4.target[_local4.property]) * _local3); }; _local4.start = (_local5 - _local4.change); _local4 = _local4.nextNode; }; }; } public function set time(_arg1:Number):void{ this.totalTime = _arg1; } override public function set delay(_arg1:Number):void{ super.delay = _arg1; setDirtyCache(true); } public function set totalProgress(_arg1:Number):void{ this.totalTime = (_reversed) ? ((1 - _arg1) * this.totalDuration) : (this.totalDuration * _arg1); } override public function set duration(_arg1:Number):void{ this.cachedDuration = _arg1; this.setDirtyCache(true); } public function resume():void{ this.paused = false; } public function get paused():Boolean{ return (this.cachedPaused); } public function killProperties(_arg1:Array):void{ var _local3:int; var _local2:Object = {}; _local3 = (_arg1.length - 1); while (_local3 > -1) { _local2[_arg1[_local3]] = true; _local3--; }; killVars(_local2); } public function get progress():Number{ return ((_reversed) ? (1 - (this.cachedTime / this.duration)) : (this.cachedTime / this.duration)); } public function get totalTime():Number{ return (this.cachedTotalTime); } override public function complete(_arg1:Boolean=false):void{ super.complete(_arg1); if (_dispatcher != null){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); }; } public function invalidate():void{ _firstPropTween = null; _overwrittenProps = null; _hasUpdate = (_hasUpdateListener = false); if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); }; if ((((this.vars.yoyo == true)) || (!(isNaN(this.vars.yoyo))))){ this.yoyo = true; }; if (!isNaN(this.vars.repeat)){ _repeat = this.vars.repeat; }; if (!isNaN(this.vars.repeatDelay)){ _repeatDelay = this.vars.repeatDelay; }; this.initted = (this.active = false); } public function dispatchEvent(_arg1:Event):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1)); } public function get reversed():Boolean{ return (_reversed); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local4:Object = {}; _local4[_arg1] = _arg2; updateProperties(_local4, _arg3); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if (_arg1 == TweenEvent.UPDATE){ _hasUpdateListener = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function initDispatcher():void{ if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); }; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); _hasUpdateListener = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; } protected function setDirtyCache(_arg1:Boolean=true):void{ var _local2:Tweenable = (_arg1) ? this : this.timeline; while (_local2 != null) { _local2.cacheIsDirty = true; _local2 = _local2.timeline; }; } public function set progress(_arg1:Number):void{ this.totalTime = (_reversed) ? ((1 - _arg1) * this.duration) : (this.duration * _arg1); } protected function updateProperties(_arg1:Object, _arg2:Boolean=true):void{ var _local5:String; var _local6:Object; var _local7:Boolean; var _local3:PropTween = _firstPropTween; var _local4:Number = this.cachedTotalTime; if (this.initted){ if (!_arg2){ this.time = 0; }; killVars(_arg1); for (_local5 in _arg1) { if ((_local5 in _reservedProps)){ } else { if ((_local5 in plugins)){ _local6 = new (plugins[_local5]); if (_local6.onInitTween(this.target, _arg1[_local5], this) == false){ _firstPropTween = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, _firstPropTween); } else { _firstPropTween = insertPropTween(_local6, "changeFactor", 0, 1, ((_local6.overwriteProps.length)==1) ? _local6.overwriteProps[0] : "_MULTIPLE_", true, _firstPropTween); _hasPlugins = true; if (_local6.priority != 0){ _firstPropTween.priority = _local6.priority; _local7 = true; }; }; } else { _firstPropTween = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, _firstPropTween); }; }; this.vars[_local5] = _arg1[_local5]; }; if (_local7){ _firstPropTween = onPluginEvent("onInit", _firstPropTween); }; if (((_arg2) && (!((this.cachedTotalTime == 0))))){ adjustStartValues(); this.time = _local4; }; } else { for (_local5 in _arg1) { this.vars[_local5] = _arg1[_local5]; }; }; } public function set totalTime(_arg1:Number):void{ this.startTime = (this.timeline.cachedTotalTime - (_arg1 / this.cachedTimeScale)); renderTime(_arg1); setDirtyCache(false); } public function set paused(_arg1:Boolean):void{ var _local2:Number; if (_arg1 != this.cachedPaused){ if (!_arg1){ _local2 = (_reversed) ? (this.totalDuration - this.cachedTotalTime) : this.cachedTotalTime; this.startTime = (this.timeline.cachedTotalTime - (_local2 / this.cachedTimeScale)); }; setDirtyCache(false); this.cachedPaused = _arg1; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(_arg1)) && (this.gc))){ this.enabled = true; }; } public function get time():Number{ return (this.cachedTime); } public function reverse(_arg1:Boolean=true):void{ this.startTime = (this.timeline.cachedTotalTime - (((1 - this.progress) * this.totalDuration) / this.cachedTimeScale)); _reversed = !(_reversed); setDirtyCache(false); if (_arg1){ this.paused = false; if (this.progress == 1){ this.time = 0; }; } else { if (this.gc){ this.enabled = true; }; }; } public function hasEventListener(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1)); } public function pause():void{ this.paused = true; } override public function set totalDuration(_arg1:Number):void{ this.timeScale = (this.totalDuration / _arg1); } override public function get totalDuration():Number{ if (this.cacheIsDirty){ this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat)); this.cacheIsDirty = false; }; return (this.cachedTotalDuration); } public function set timeScale(_arg1:Number):void{ this.startTime = (this.cachedTotalTime - (((this.cachedTotalTime - this.startTime) * this.cachedTimeScale) / _arg1)); this.cachedTimeScale = _arg1; } public function get timeScale():Number{ return (this.cachedTimeScale); } public static function set globalTimeScale(_arg1:Number):void{ TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function getTweensOf(_arg1:Object):Array{ var _local4:int; var _local2:Array = masterList[_arg1]; var _local3:Array = []; if (_local2 != null){ _local4 = _local2.length; while (_local4-- > 0) { if (!_local2[_local4].gc){ _local3[_local3.length] = _local2[_local4]; }; }; }; return (_local3); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function get globalTimeScale():Number{ return (TweenLite.rootTimeline.cachedTimeScale); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, useFrames:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array = getTweensOf(_arg1); var _local3:int = _local2.length; while (_local3-- > 0) { if (((((_local2[_local3].active) || ((_local2[_local3].startTime == _local2[_local3].cachedTime)))) && (!(_local2[_local3].gc)))){ return (true); }; }; return (false); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local5:Boolean; var _local4:Array = getAllTweens(); var _local6:int = _local4.length; while (_local6-- > 0) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); } else { _local4[_local6].enabled = false; }; }; }; } public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{ var _local4:Object; var _local5:DisplayObjectContainer; var _local3:Array = getAllTweens(); var _local6:int = _local3.length; while (_local6-- > 0) { _local4 = _local3[_local6].target; if ((_local4 is DisplayObject)){ _local5 = _local4.parent; while (_local5 != null) { if (_local5 == _arg1){ if (_arg2){ _local3[_local6].complete(false); } else { _local3[_local6].enabled = false; }; }; _local5 = _local5.parent; }; }; }; } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local5:Boolean; var _local4:Array = getAllTweens(); var _local6:int = _local4.length; while (_local6-- > 0) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){ (_local4[_local6] as TweenMax).paused = _arg1; }; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; if (_arg3.immediateRender != false){ _arg3.immediateRender = true; }; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{ _arg3.runBackwards = true; if (_arg3.immediateRender != false){ _arg3.immediateRender = true; }; return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)); } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function getAllTweens():Array{ var _local3:Array; var _local4:int; var _local1:Dictionary = masterList; var _local2:Array = []; for each (_local3 in _local1) { _local4 = _local3.length; while (_local4-- > 0) { if (!_local3[_local4].gc){ _local2[_local2.length] = _local3[_local4]; }; }; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{ var i:int; var vars:Object; var p:String; var onCompleteProxy:Function; var onCompleteParamsProxy:Array; var $targets = _arg1; var $duration = _arg2; var $vars = _arg3; var $stagger = _arg4; var $onCompleteAll = _arg5; var $onCompleteAllParams = _arg6; var l:uint = $targets.length; var a:Array = []; var curDelay:Number = (($vars.delay) || (0)); onCompleteProxy = $vars.onComplete; onCompleteParamsProxy = $vars.onCompleteParams; var lastIndex:int = (($stagger)<=0) ? 0 : (l - 1); i = 0; while (i < l) { vars = {}; for (p in $vars) { vars[p] = $vars[p]; }; vars.delay = curDelay; if ((((i == lastIndex)) && (!(($onCompleteAll == null))))){ vars.onComplete = function ():void{ if (onCompleteProxy != null){ onCompleteProxy.apply(null, onCompleteParamsProxy); }; $onCompleteAll.apply(null, $onCompleteAllParams); }; }; a[a.length] = new TweenMax($targets[i], $duration, vars); curDelay = (curDelay + $stagger); i = (i + 1); }; return (a); } } }//package gs
Section 89
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2: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 (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; var sendHostProgress:Boolean; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, 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 (_arg1:Number, _arg2: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 _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 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 (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.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.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; 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(_arg1:Object):MovieClip{ var clip:Object; 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 = _arg1; 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 (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { 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; var mc:MovieClip = 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(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.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 (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, 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 (_arg1:Number, _arg2: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 (_arg1:Number):void{ }}; 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; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; 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((w - 20), 0); backing.lineTo((w - 20), 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((w - 20), 0); inside.lineTo((w - 20), 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((w - 20), 0); outline.lineTo((w - 20), 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 _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local7:Number = ((100 * _local6) / _local5); var _local8:Number = ((100 * _local3) / chk.ad_msec); var _local9:Object = this._mochiad_bar._inside; var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 90
//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(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function reencode():void{ var _local1:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function set value(_arg1:Number):void{ setValue(_arg1); } public function toString():String{ var _local1:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 91
//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 static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); 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; }; }; 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(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; var _local2:Object = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 92
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3: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 _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4: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 = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; 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://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); var _local2:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.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 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); try { _listenChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; var _local3:String = _arg1.loaderInfo.parameters.mochiad_options; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; 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)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = this.client._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){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; trace("connected!"); _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var id = _arg1; var clip = _arg2; var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); var f:Function = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var req:URLRequest = new URLRequest(_servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._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 bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ 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 (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 93
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 94
//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 95
//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"; } }//package mx.core
Section 96
//Stats (net.hires.debug.Stats) package net.hires.debug { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.system.*; public class Stats extends Sprite { private var _fps_graph:uint; private var _ms:uint; private var _timer:uint; private var _graph:BitmapData; private var _text:TextField; private var _mem:Number; private var _xml:XML; private var _mem_max_graph:uint; private var _theme:Object; private var _mem_graph:uint; private var _fps:uint; private var _ms_prev:uint; private var _rectangle:Rectangle; private var _style:StyleSheet; private var _mem_max:Number; public function Stats(_arg1:Object=null):void{ _theme = {bg:51, fps:0xFFFF00, ms:0xFF00, mem:0xFFFF, memmax:0xFF0070}; super(); if (_arg1){ if (_arg1.bg != null){ _theme.bg = _arg1.bg; }; if (_arg1.fps != null){ _theme.fps = _arg1.fps; }; if (_arg1.ms != null){ _theme.ms = _arg1.ms; }; if (_arg1.mem != null){ _theme.mem = _arg1.mem; }; if (_arg1.memmax != null){ _theme.memmax = _arg1.memmax; }; }; addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } private function hex2css(_arg1:int):String{ return (("#" + _arg1.toString(16))); } private function update(_arg1: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(50, ((_fps / stage.frameRate) * 50)); _mem_graph = (Math.min(50, Math.sqrt(Math.sqrt((_mem * 5000)))) - 2); _mem_max_graph = (Math.min(50, Math.sqrt(Math.sqrt((_mem_max * 5000)))) - 2); _graph.scroll(1, 0); _graph.fillRect(_rectangle, _theme.bg); _graph.setPixel(0, (_graph.height - _fps_graph), _theme.fps); _graph.setPixel(0, (_graph.height - ((_timer - _ms) >> 1)), _theme.ms); _graph.setPixel(0, (_graph.height - _mem_graph), _theme.mem); _graph.setPixel(0, (_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 init(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, init); graphics.beginFill(_theme.bg); graphics.drawRect(0, 0, 70, 50); graphics.endFill(); _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 = 70; _text.height = 50; _text.styleSheet = _style; _text.condenseWhite = true; _text.selectable = false; _text.mouseEnabled = false; addChild(_text); var _local2:Bitmap = new Bitmap((_graph = new BitmapData(70, 50, false, _theme.bg))); _local2.y = 50; addChild(_local2); _rectangle = new Rectangle(0, 0, 1, _graph.height); addEventListener(MouseEvent.CLICK, onClick); addEventListener(Event.ENTER_FRAME, update); addEventListener(Event.REMOVED_FROM_STAGE, destroy); } private function onClick(_arg1:MouseEvent):void{ if (((mouseY / height) > 0.5)){ stage.frameRate--; } else { stage.frameRate++; }; _xml.fps = ((("FPS: " + _fps) + " / ") + stage.frameRate); _text.htmlText = _xml; } private function destroy(_arg1:Event):void{ removeEventListener(MouseEvent.CLICK, onClick); removeEventListener(Event.ENTER_FRAME, update); removeEventListener(Event.REMOVED_FROM_STAGE, destroy); _graph.dispose(); } } }//package net.hires.debug
Section 97
//IInvalidatingDisplayObject (org.josht.display.IInvalidatingDisplayObject) package org.josht.display { public interface IInvalidatingDisplayObject { function invalidate():void; function validate():void; } }//package org.josht.display
Section 98
//InvalidatingSprite (org.josht.display.InvalidatingSprite) package org.josht.display { import flash.display.*; import flash.events.*; public class InvalidatingSprite extends Sprite implements IInvalidatingDisplayObject { protected var isInvalid:Boolean;// = false public function InvalidatingSprite(){ this.invalidate(); } protected function draw():void{ } public function validate():void{ if (!this.parent){ return; }; while (this.isInvalid) { this.removeEventListener("exitFrame", renderHandler); this.removeEventListener(Event.ENTER_FRAME, renderHandler); this.removeEventListener(Event.ADDED_TO_STAGE, renderHandler); this.isInvalid = false; this.draw(); }; } public function invalidate():void{ if (this.isInvalid){ return; }; this.isInvalid = true; if (this.stage){ try { this.addEventListener("exitFrame", renderHandler); } catch(error:Error) { }; this.addEventListener(Event.ENTER_FRAME, renderHandler); } else { this.addEventListener(Event.ADDED_TO_STAGE, renderHandler); }; } private function renderHandler(_arg1:Event):void{ this.validate(); } } }//package org.josht.display
Section 99
//Button (org.josht.fl.controls.Button) package org.josht.fl.controls { import fl.controls.*; import fl.core.*; public class Button extends Button { private static var defaultStyles:Object = {contentAlign:"center", gap:5}; override protected function drawLayout():void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; this.background.width = this.width; this.background.height = this.height; var _local1:String = (this.getStyleValue("contentAlign") as String); var _local2:Number = Number(this.getStyleValue("textPadding")); var _local3:Number = Number(this.getStyleValue("gap")); var _local4:Number = ((this.icon)==null) ? 0 : (icon.width + _local3); var _local5:Number = ((this.icon)==null) ? 0 : (icon.height + _local3); this.textField.height = (this.textField.textHeight + 4); var _local6:Number = (this.textField.textWidth + 4); var _local7:Number = (this.textField.textHeight + 4); this.textField.visible = (label.length > 0); if (this.icon){ this.icon.y = Math.round(((this.height - this.icon.height) / 2)); }; if (textField.visible == false){ this.textField.width = 0; this.textField.height = 0; } else { if ((((this._labelPlacement == ButtonLabelPlacement.BOTTOM)) || ((this._labelPlacement == ButtonLabelPlacement.TOP)))){ _local8 = Math.max(0, Math.min(_local6, (this.width - (2 * _local2)))); if ((this.height - 2) > _local7){ _local9 = _local7; } else { _local9 = (this.height - 2); }; _local6 = _local8; this.textField.width = _local6; _local7 = _local9; this.textField.height = _local7; this.textField.y = Math.round(((((this.height - this.textField.height) - _local5) / 2) + ((this._labelPlacement)==ButtonLabelPlacement.BOTTOM) ? _local5 : 0)); if (this.icon){ this.icon.y = Math.round(((this._labelPlacement)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local5) : ((this.textField.y + this.textField.height) + _local3)); }; } else { _local8 = Math.max(0, Math.min(_local6, ((this.width - _local4) - (2 * _local2)))); _local6 = _local8; this.textField.width = _local6; this.textField.y = Math.round(((this.height - this.textField.height) / 2)); }; }; if (_local1 == "center"){ _local10 = (this.textField.width + (this.icon) ? (this.icon.width + _local3) : 0); _local11 = ((this.width - _local10) / 2); switch (this._labelPlacement){ case ButtonLabelPlacement.RIGHT: if (this.icon){ this.icon.x = _local11; _local11 = (_local11 + (this.icon.x + _local3)); }; this.textField.x = _local11; break; case ButtonLabelPlacement.LEFT: this.textField.x = _local11; if (this.icon){ this.icon.x = ((_local11 + this.textField.width) + _local3); }; break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: this.textField.x = ((this.width - this.textField.width) / 2); if (this.icon){ this.icon.x = ((this.width - this.icon.width) / 2); }; break; }; } else { if (_local1 == "left"){ _local11 = _local2; switch (this._labelPlacement){ case ButtonLabelPlacement.RIGHT: if (this.icon){ this.icon.x = _local11; _local11 = (_local11 + (this.icon.width + _local3)); }; this.textField.x = _local11; break; case ButtonLabelPlacement.LEFT: this.textField.x = _local11; this.icon.x = ((_local11 + this.textField.width) + _local3); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: this.textField.x = _local2; if (this.icon){ this.icon.x = _local2; }; break; }; } else { if (_local1 == "right"){ _local11 = (this.width - _local2); switch (this._labelPlacement){ case ButtonLabelPlacement.RIGHT: this.textField.x = ((this.width - this.textField.width) - _local2); if (this.icon){ this.icon.x = (this.textField.x - (this.icon.width + _local3)); }; break; case ButtonLabelPlacement.LEFT: if (this.icon){ this.icon.x = (_local11 - this.icon.width); _local11 = (this.icon.x - _local3); }; this.textField.x = (_local11 - this.textField.width); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: this.textField.x = (_local11 - this.textField.width); if (this.icon){ this.icon.x = (_local11 - this.icon.width); }; break; }; }; }; }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(Button.getStyleDefinition(), defaultStyles)); } } }//package org.josht.fl.controls
Section 100
//SoundEventManager (org.josht.media.SoundEventManager) package org.josht.media { import flash.events.*; import flash.utils.*; import flash.media.*; import flash.errors.*; public class SoundEventManager { private static const TARGET_TO_TYPES:Dictionary = new Dictionary(true); public static var mute:Boolean = false; private static function eventHandler(_arg1:Event):void{ if (mute){ return; }; var _local2:Object = TARGET_TO_TYPES[_arg1.currentTarget]; var _local3:Class = _local2[_arg1.type]; var _local4:Sound = new (_local3); _local4.play(); } public static function clearAllSoundsForTarget(_arg1:IEventDispatcher):void{ var _local3:String; if (!TARGET_TO_TYPES.hasOwnProperty(_arg1)){ return; }; var _local2:Object = TARGET_TO_TYPES[_arg1]; if (!_local2.hasOwnProperty(_local3)){ return; }; for (_local3 in _local2) { delete _local2[_local3]; _arg1.removeEventListener(_local3, eventHandler); }; delete TARGET_TO_TYPES[_arg1]; } public static function attachSoundToEvent(_arg1:IEventDispatcher, _arg2:String, _arg3:Class):void{ if (!TARGET_TO_TYPES.hasOwnProperty(_arg1)){ TARGET_TO_TYPES[_arg1] = {}; }; var _local4:Object = TARGET_TO_TYPES[_arg1]; if (_local4.hasOwnProperty(_arg2)){ throw (new IllegalOperationError(("A sound is already registered to play when the specified target dispatches an event of type " + _arg2))); }; _local4[_arg2] = _arg3; _arg1.addEventListener(_arg2, eventHandler, false, 0, true); } public static function clearSoundForEvent(_arg1:IEventDispatcher, _arg2:String):void{ if (!TARGET_TO_TYPES.hasOwnProperty(_arg1)){ return; }; var _local3:Object = TARGET_TO_TYPES[_arg1]; if (!_local3.hasOwnProperty(_arg2)){ return; }; delete _local3[_arg2]; _arg1.removeEventListener(_arg2, eventHandler); var _local4:Boolean; for (_arg2 in _local3) { _local4 = true; break; }; if (!_local4){ delete TARGET_TO_TYPES[_arg1]; }; } } }//package org.josht.media
Section 101
//ColorUtil (org.josht.utils.ColorUtil) package org.josht.utils { public class ColorUtil { public static function brightness(_arg1:uint):Number{ var _local2:Number = (red(_arg1) / 0xFF); var _local3:Number = (green(_arg1) / 0xFF); var _local4:Number = (blue(_arg1) / 0xFF); var _local5:Number = Math.max(_local2, _local3, _local4); return (_local5); } public static function red(_arg1:uint):uint{ return (((_arg1 >> 16) & 0xFF)); } public static function green(_arg1:uint):uint{ return (((_arg1 >> 8) & 0xFF)); } public static function fromARGB(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):uint{ return (((_arg1 << 24) + fromRGB(_arg2, _arg3, _arg4))); } public static function blendColors(_arg1:Number, _arg2:Number, _arg3:Number=0.5):Number{ var _local4:Number = (1 - _arg3); var _local5:uint = ColorUtil.red(_arg1); var _local6:uint = ColorUtil.green(_arg1); var _local7:uint = ColorUtil.blue(_arg1); _arg1 = ColorUtil.fromRGB((_local5 * _arg3), (_local6 * _arg3), (_local7 * _arg3)); _local5 = ColorUtil.red(_arg2); _local6 = ColorUtil.green(_arg2); _local7 = ColorUtil.blue(_arg2); _arg2 = ColorUtil.fromRGB((_local5 * _local4), (_local6 * _local4), (_local7 * _local4)); return ((_arg1 + _arg2)); } public static function saturation(_arg1:uint):Number{ var _local2:Number = (red(_arg1) / 0xFF); var _local3:Number = (green(_arg1) / 0xFF); var _local4:Number = (blue(_arg1) / 0xFF); var _local5:Number = Math.max(_local2, _local3, _local4); var _local6:Number = Math.min(_local2, _local3, _local4); var _local7:Number = (_local5 - _local6); var _local8:Number = 0; var _local9:Number = _local5; if (((!((_local7 == 0))) && (!((_local9 == 0))))){ _local8 = (_local7 / _local5); }; return (_local8); } public static function blue(_arg1:uint):uint{ return ((_arg1 & 0xFF)); } public static function fromRGB(_arg1:uint, _arg2:uint, _arg3:uint):uint{ return ((((_arg1 << 16) + (_arg2 << 8)) + _arg3)); } public static function fromHSB(_arg1:Number, _arg2:Number, _arg3:Number):uint{ if (_arg2 == 0){ return (fromRGB((_arg3 * 0xFF), (_arg3 * 0xFF), (_arg3 * 0xFF))); }; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = (_arg1 * 6); var _local8:Number = Math.floor(_local7); var _local9:Number = (_local7 - _local8); var _local10:Number = (_arg3 * (1 - _arg2)); var _local11:Number = (_arg3 * (1 - (_local9 * _arg2))); var _local12:Number = (_arg3 * (1 - ((1 - _local9) * _arg2))); switch (_local8){ case 0: _local4 = _arg3; _local5 = _local12; _local6 = _local10; break; case 1: _local4 = _local11; _local5 = _arg3; _local6 = _local10; break; case 2: _local4 = _local10; _local5 = _arg3; _local6 = _local12; break; case 3: _local4 = _local10; _local5 = _local11; _local6 = _arg3; break; case 4: _local4 = _local12; _local5 = _local10; _local6 = _arg3; break; case 5: _local4 = _arg3; _local5 = _local10; _local6 = _local11; break; }; _local4 = Math.round((_local4 * 0xFF)); _local5 = Math.round((_local5 * 0xFF)); _local6 = Math.round((_local6 * 0xFF)); return (fromRGB(_local4, _local5, _local6)); } public static function alpha(_arg1:uint):uint{ return (((_arg1 >> 24) & 0xFF)); } public static function hue(_arg1:uint):Number{ var _local9:Number; var _local10:Number; var _local11:Number; var _local2:Number = (red(_arg1) / 0xFF); var _local3:Number = (green(_arg1) / 0xFF); var _local4:Number = (blue(_arg1) / 0xFF); var _local5:Number = Math.max(_local2, _local3, _local4); var _local6:Number = Math.min(_local2, _local3, _local4); var _local7:Number = (_local5 - _local6); var _local8:Number = 0; if (_local7 != 0){ _local9 = ((_local5 - _local2) / _local7); _local10 = ((_local5 - _local3) / _local7); _local11 = ((_local5 - _local4) / _local7); switch (_local5){ case _local2: _local8 = (_local11 - _local10); break; case _local3: _local8 = ((2 + _local9) - _local11); break; case _local4: _local8 = ((4 + _local10) - _local9); break; }; _local8 = (_local8 / 6); }; if (_local8 < 0){ _local8++; }; if (_local8 > 1){ _local8--; }; return (_local8); } } }//package org.josht.utils
Section 102
//GraphicsUtil (org.josht.utils.GraphicsUtil) package org.josht.utils { import flash.display.*; import flash.geom.*; public class GraphicsUtil { public static function drawWedge(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=NaN):void{ var _local12:Number; var _local13:Number; var _local14:int; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _arg1.moveTo(_arg2, _arg3); if (isNaN(_arg7)){ _arg7 = _arg6; }; if (Math.abs(_arg5) > 360){ _arg5 = 360; }; var _local8:int = Math.ceil((Math.abs(_arg5) / 45)); var _local9:Number = (_arg5 / _local8); var _local10:Number = (-((_local9 / 180)) * Math.PI); var _local11:Number = (-((_arg4 / 180)) * Math.PI); if (_local8 > 0){ _local12 = (_arg2 + (Math.cos(((_arg4 / 180) * Math.PI)) * _arg6)); _local13 = (_arg3 + (Math.sin(((-(_arg4) / 180) * Math.PI)) * _arg7)); _arg1.lineTo(_local12, _local13); _local14 = 0; while (_local14 < _local8) { _local11 = (_local11 + _local10); _local15 = (_local11 - (_local10 / 2)); _local16 = (_arg2 + (Math.cos(_local11) * _arg6)); _local17 = (_arg3 + (Math.sin(_local11) * _arg7)); _local18 = (_arg2 + (Math.cos(_local15) * (_arg6 / Math.cos((_local10 / 2))))); _local19 = (_arg3 + (Math.sin(_local15) * (_arg7 / Math.cos((_local10 / 2))))); _arg1.curveTo(_local18, _local19, _local16, _local17); _local14++; }; _arg1.lineTo(_arg2, _arg3); }; } public static function drawGear(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:int=0, _arg9:Number=NaN):void{ var _local16:Number; var _local17:Number; if (_arg4 <= 2){ throw (new ArgumentError("Cannot draw a gear with fewer than three teeth.")); }; var _local10:Number = ((2 * Math.PI) / _arg4); var _local11:Number = (_local10 / 4); var _local12:Number = ((_arg7 / 180) * Math.PI); var _local13:Number = (_arg2 + (Math.cos(_local12) * _arg6)); var _local14:Number = (_arg3 - (Math.sin(_local12) * _arg6)); _arg1.moveTo(_local13, _local14); var _local15 = 1; while (_local15 <= _arg4) { _local16 = (_arg2 + (Math.cos(((_local12 + (_local10 * _local15)) - (_local11 * 3))) * _arg5)); _local17 = (_arg3 - (Math.sin(((_local12 + (_local10 * _local15)) - (_local11 * 3))) * _arg5)); _arg1.lineTo(_local16, _local17); _local16 = (_arg2 + (Math.cos(((_local12 + (_local10 * _local15)) - (_local11 * 2))) * _arg5)); _local17 = (_arg3 - (Math.sin(((_local12 + (_local10 * _local15)) - (_local11 * 2))) * _arg5)); _arg1.lineTo(_local16, _local17); _local16 = (_arg2 + (Math.cos(((_local12 + (_local10 * _local15)) - _local11)) * _arg6)); _local17 = (_arg3 - (Math.sin(((_local12 + (_local10 * _local15)) - _local11)) * _arg6)); _arg1.lineTo(_local16, _local17); _local16 = (_arg2 + (Math.cos((_local12 + (_local10 * _local15))) * _arg6)); _local17 = (_arg3 - (Math.sin((_local12 + (_local10 * _local15))) * _arg6)); _arg1.lineTo(_local16, _local17); _local15++; }; if (_arg8 > 2){ if (isNaN(_arg9)){ _arg9 = (_arg5 / 3); }; drawPolygon(_arg1, _arg2, _arg3, _arg8, _arg9, _arg7); }; } public static function drawStar(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number, _arg6:Number, _arg7:Number=0):void{ var _local15:Number; var _local16:Number; var _local8:int = Math.abs(_arg4); if (_local8 <= 2){ throw (new ArgumentError("Cannot draw a star with fewer than three points.")); }; var _local9:Number = ((Math.PI * 2) / _arg4); var _local10:Number = (_local9 / 2); var _local11:Number = ((_arg7 / 180) * Math.PI); var _local12:Number = (_arg2 + (Math.cos(_local11) * _arg6)); var _local13:Number = (_arg3 - (Math.sin(_local11) * _arg6)); _arg1.moveTo(_local12, _local13); var _local14 = 1; while (_local14 <= _local8) { _local15 = (_arg2 + (Math.cos(((_local11 + (_local9 * _local14)) - _local10)) * _arg5)); _local16 = (_arg3 - (Math.sin(((_local11 + (_local9 * _local14)) - _local10)) * _arg5)); _arg1.lineTo(_local15, _local16); _local15 = (_arg2 + (Math.cos((_local11 + (_local9 * _local14))) * _arg6)); _local16 = (_arg3 - (Math.sin((_local11 + (_local9 * _local14))) * _arg6)); _arg1.lineTo(_local15, _local16); _local14++; }; } public static function drawDashedLine(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=10, _arg7:Number=10):void{ var _local8:Number = (_arg6 + _arg7); var _local9:Number = (_arg4 - _arg2); var _local10:Number = (_arg5 - _arg3); var _local11:Number = Math.sqrt((Math.pow(_local9, 2) + Math.pow(_local10, 2))); var _local12:int = Math.floor(Math.abs((_local11 / _local8))); var _local13:Number = Math.atan2(_local10, _local9); var _local14:Number = _arg2; var _local15:Number = _arg3; _local9 = (Math.cos(_local13) * _local8); _local10 = (Math.sin(_local13) * _local8); var _local16:int; while (_local16 < _local12) { _arg1.moveTo(_local14, _local15); _arg1.lineTo((_local14 + (Math.cos(_local13) * _arg6)), (_local15 + (Math.sin(_local13) * _arg6))); _local14 = (_local14 + _local9); _local15 = (_local15 + _local10); _local16++; }; _arg1.moveTo(_local14, _local15); _local11 = Math.sqrt((((_arg4 - _local14) * (_arg4 - _local14)) + ((_arg5 - _local15) * (_arg5 - _local15)))); if (_local11 > _arg6){ _arg1.lineTo((_local14 + (Math.cos(_local13) * _arg6)), (_local15 + (Math.sin(_local13) * _arg6))); } else { if (_local11 > 0){ _arg1.lineTo((_local14 + (Math.cos(_local13) * _local11)), (_local15 + (Math.sin(_local13) * _local11))); }; }; _arg1.moveTo(_arg4, _arg5); } public static function drawBurst(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number, _arg6:Number, _arg7:Number):void{ var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; if (_arg4 <= 2){ throw (new ArgumentError("Cannot draw a burst with fewer than three points.")); }; var _local8:Number = ((Math.PI * 2) / _arg4); var _local9:Number = (_local8 / 2); var _local10:Number = (_local8 / 4); var _local11:Number = ((_arg7 / 180) * Math.PI); var _local12:Number = (_arg2 + (Math.cos(_local11) * _arg6)); var _local13:Number = (_arg3 - (Math.sin(_local11) * _arg6)); _arg1.moveTo(_local12, _local13); var _local14 = 1; while (_local14 <= _arg4) { _local15 = (_arg2 + (Math.cos(((_local11 + (_local8 * _local14)) - (_local10 * 3))) * (_arg5 / Math.cos(_local10)))); _local16 = (_arg3 - (Math.sin(((_local11 + (_local8 * _local14)) - (_local10 * 3))) * (_arg5 / Math.cos(_local10)))); _local17 = (_arg2 + (Math.cos(((_local11 + (_local8 * _local14)) - _local9)) * _arg5)); _local18 = (_arg3 - (Math.sin(((_local11 + (_local8 * _local14)) - _local9)) * _arg5)); _arg1.curveTo(_local15, _local16, _local17, _local18); _local15 = (_arg2 + (Math.cos(((_local11 + (_local8 * _local14)) - _local10)) * (_arg5 / Math.cos(_local10)))); _local16 = (_arg3 - (Math.sin(((_local11 + (_local8 * _local14)) - _local10)) * (_arg5 / Math.cos(_local10)))); _local17 = (_arg2 + (Math.cos((_local11 + (_local8 * _local14))) * _arg6)); _local18 = (_arg3 - (Math.sin((_local11 + (_local8 * _local14))) * _arg6)); _arg1.curveTo(_local15, _local16, _local17, _local18); _local14++; }; } public static function drawPolygon(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number, _arg6:Number=0):void{ var _local12:Number; var _local13:Number; var _local7:int = Math.abs(_arg4); if (_local7 <= 2){ throw (new ArgumentError("Cannot draw a polygon with fewer than three sides.")); }; var _local8:Number = ((Math.PI * 2) / _arg4); _arg6 = ((_arg6 / 180) * Math.PI); var _local9:Number = (_arg2 + (Math.cos(_arg6) * _arg5)); var _local10:Number = (_arg3 - (Math.sin(_arg6) * _arg5)); _arg1.moveTo(_local9, _local10); var _local11 = 1; while (_local11 <= _local7) { _local12 = (_arg2 + (Math.cos((_arg6 + (_local8 * _local11))) * _arg5)); _local13 = (_arg3 - (Math.sin((_arg6 + (_local8 * _local11))) * _arg5)); _arg1.lineTo(_local12, _local13); _local11++; }; } public static function drawArc(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=NaN):Point{ var _local13:int; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; if (isNaN(_arg7)){ _arg7 = _arg6; }; if (Math.abs(_arg5) > 360){ _arg5 = 360; }; var _local8:int = Math.ceil((Math.abs(_arg5) / 45)); var _local9:Number = (((_arg5 / _local8) * Math.PI) / 180); var _local10:Number = ((_arg4 * Math.PI) / 180); var _local11:Number = (_arg2 + (Math.cos(_local10) * _arg6)); var _local12:Number = (_arg3 - (Math.sin(_local10) * _arg7)); _arg1.moveTo(_local11, _local12); if (_local8 > 0){ _local13 = 0; while (_local13 < _local8) { _local10 = (_local10 + _local9); _local14 = (_local10 - (_local9 / 2)); _local15 = (_arg2 + (Math.cos(_local10) * _arg6)); _local16 = (_arg3 - (Math.sin(_local10) * _arg7)); _local17 = (_arg2 + (Math.cos(_local14) * (_arg6 / Math.cos((_local9 / 2))))); _local18 = (_arg3 - (Math.sin(_local14) * (_arg7 / Math.cos((_local9 / 2))))); _arg1.curveTo(_local17, _local18, _local15, _local16); _local13++; }; }; return (new Point(_local15, _local16)); } } }//package org.josht.utils
Section 103
//MathUtil (org.josht.utils.MathUtil) package org.josht.utils { public class MathUtil { private static function gcd2(_arg1:Number, _arg2:Number):Number{ var _local3:Number; if (_arg1 == 0){ return (_arg2); }; while (_arg2 != 0) { _local3 = (_arg1 % _arg2); _arg1 = _arg2; _arg2 = _local3; }; return (_arg1); } public static function factorial(_arg1:int):Number{ var _local2:Number = 1; var _local3 = 1; while (_local3 <= _arg1) { _local2 = (_local2 * _local3); _local3++; }; return (_local2); } public static function binomialCoefficient(_arg1:int, _arg2:int):Number{ return ((factorial(_arg1) / (factorial(_arg2) * factorial((_arg1 - _arg2))))); } public static function gcd(_arg1:Number, _arg2:Number, ... _args):Number{ _args.unshift(_arg2); var _local4:Number = _arg1; var _local5:int = _args.length; var _local6:int; while (_local6 < _local5) { _local4 = MathUtil.gcd2(_local4, Number(_args[_local6])); _local6++; }; return (_local4); } public static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg2 > _arg3){ throw (new ArgumentError("minimum should be smaller than maximum.")); }; return (Math.min(_arg3, Math.max(_arg2, _arg1))); } public static function sum(_arg1:Number, _arg2:Number, ... _args):Number{ _args.unshift(_arg2); var _local4:Number = _arg1; var _local5:int = _args.length; var _local6:int; while (_local6 < _local5) { _local4 = (_local4 + Number(_args[_local6])); _local6++; }; return (_local4); } } }//package org.josht.utils
Section 104
//PointUtil (org.josht.utils.PointUtil) package org.josht.utils { import flash.geom.*; public class PointUtil { public static function scalarMultiply(_arg1:Point, _arg2:Number):Point{ return (new Point((_arg1.x * _arg2), (_arg1.y * _arg2))); } public static function reverse(_arg1:Point):Point{ return (new Point(-(_arg1.x), -(_arg1.y))); } public static function angle(_arg1:Point, _arg2:Point):Number{ var _local3:Number = (_arg2.x - _arg1.x); var _local4:Number = (_arg2.y - _arg1.y); return (Math.atan2(_local4, _local3)); } public static function scalarDivide(_arg1:Point, _arg2:Number):Point{ return (new Point((_arg1.x / _arg2), (_arg1.y / _arg2))); } public static function dotProduct(_arg1:Point, _arg2:Point):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function rotate(_arg1:Point, _arg2:Number):Point{ var _local3:Point = new Point(); _local3.x = ((_arg1.x * Math.cos(_arg2)) + (_arg1.y * Math.sin(_arg2))); _local3.y = ((-(_arg1.x) * Math.sin(_arg2)) + (_arg1.y * Math.cos(_arg2))); return (_local3); } } }//package org.josht.utils
Section 105
//BackButtonOverIcon (BackButtonOverIcon) package { import flash.display.*; public dynamic class BackButtonOverIcon extends Sprite { } }//package
Section 106
//BackButtonUpIcon (BackButtonUpIcon) package { import flash.display.*; public dynamic class BackButtonUpIcon extends Sprite { } }//package
Section 107
//BackToMenuButton (BackToMenuButton) package { import flash.display.*; public dynamic class BackToMenuButton extends SimpleButton { } }//package
Section 108
//BombBlue (BombBlue) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombBlue extends BombNode { } }//package
Section 109
//BombCyan (BombCyan) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombCyan extends BombNode { } }//package
Section 110
//BombGray (BombGray) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombGray extends BombNode { } }//package
Section 111
//BombGreen (BombGreen) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombGreen extends BombNode { } }//package
Section 112
//BombPink (BombPink) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombPink extends BombNode { } }//package
Section 113
//BombRed (BombRed) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombRed extends BombNode { } }//package
Section 114
//BombYellow (BombYellow) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class BombYellow extends BombNode { } }//package
Section 115
//BowlerHatBW (BowlerHatBW) package { import flash.display.*; public dynamic class BowlerHatBW extends Sprite { } }//package
Section 116
//Button_disabledSkin (Button_disabledSkin) package { import flash.display.*; public dynamic class Button_disabledSkin extends MovieClip { } }//package
Section 117
//Button_downSkin (Button_downSkin) package { import flash.display.*; public dynamic class Button_downSkin extends MovieClip { } }//package
Section 118
//Button_emphasizedSkin (Button_emphasizedSkin) package { import flash.display.*; public dynamic class Button_emphasizedSkin extends MovieClip { } }//package
Section 119
//Button_overSkin (Button_overSkin) package { import flash.display.*; public dynamic class Button_overSkin extends MovieClip { } }//package
Section 120
//Button_selectedDisabledSkin (Button_selectedDisabledSkin) package { import flash.display.*; public dynamic class Button_selectedDisabledSkin extends MovieClip { } }//package
Section 121
//Button_selectedDownSkin (Button_selectedDownSkin) package { import flash.display.*; public dynamic class Button_selectedDownSkin extends MovieClip { } }//package
Section 122
//Button_selectedOverSkin (Button_selectedOverSkin) package { import flash.display.*; public dynamic class Button_selectedOverSkin extends MovieClip { } }//package
Section 123
//Button_selectedUpSkin (Button_selectedUpSkin) package { import flash.display.*; public dynamic class Button_selectedUpSkin extends MovieClip { } }//package
Section 124
//Button_upSkin (Button_upSkin) package { import flash.display.*; public dynamic class Button_upSkin extends MovieClip { } }//package
Section 125
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 126
//KeyBW (KeyBW) package { import flash.display.*; public dynamic class KeyBW extends Sprite { } }//package
Section 127
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 128
//MouseCursor (MouseCursor) package { import flash.display.*; public dynamic class MouseCursor extends Sprite { } }//package
Section 129
//NodeBlue (NodeBlue) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeBlue extends Node { } }//package
Section 130
//NodeCyan (NodeCyan) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeCyan extends Node { } }//package
Section 131
//NodeGray (NodeGray) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeGray extends Node { } }//package
Section 132
//NodeGreen (NodeGreen) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeGreen extends Node { } }//package
Section 133
//NodePink (NodePink) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodePink extends Node { } }//package
Section 134
//NodeRed (NodeRed) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeRed extends Node { } }//package
Section 135
//NodeYellow (NodeYellow) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class NodeYellow extends Node { } }//package
Section 136
//PowerUpFire (PowerUpFire) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class PowerUpFire extends PowerUpNode { } }//package
Section 137
//PowerUpSkull (PowerUpSkull) package { import com.bowlerhatgames.qrossfire.nodes.*; public dynamic class PowerUpSkull extends PowerUpNode { } }//package
Section 138
//Qrossfire (Qrossfire) package { import flash.events.*; import flash.display.*; import flash.ui.*; import flash.utils.*; import flash.net.*; public class Qrossfire extends MovieClip { public var sponsorAd:Sprite; private static const BORDER_COLOR:uint = 0x660000; private static const PROGRESS_BAR_PADDING:Number = 30; private static const PROGRESS_BAR_COLOR:uint = 0x990000; private static const MINIMUM_AD_TIME:int = 5000; private static const PROGRESS_BAR_HEIGHT:Number = 25; public function Qrossfire(){ stop(); var _local1:ContextMenu = new ContextMenu(); _local1.hideBuiltInItems(); this.contextMenu = _local1; if (this.stage){ this.stage.align = StageAlign.TOP_LEFT; }; this.loaderInfo.addEventListener(Event.INIT, swfInitHandler); } private function initialize():void{ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.gotoAndStop(2); this.graphics.clear(); var _local1:Class = Class(getDefinitionByName("com.bowlerhatgames.qrossfire.Game")); var _local2:Sprite = new (_local1); this.addChild(_local2); } private function sponsorAd_clickHandler(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.frosmo.com/uk/ui/?ref=qrossfire"), "_blank"); } private function enterFrameHandler(_arg1:Event):void{ var _local2:Number = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal); _local2 = Math.min(_local2, (getTimer() / MINIMUM_AD_TIME)); if (_local2 >= 1){ this.initialize(); return; }; this.graphics.clear(); this.graphics.beginFill(BORDER_COLOR); this.graphics.drawRect(PROGRESS_BAR_PADDING, ((this.loaderInfo.height - PROGRESS_BAR_HEIGHT) - 20), (this.loaderInfo.width - (2 * PROGRESS_BAR_PADDING)), PROGRESS_BAR_HEIGHT); this.graphics.drawRect((PROGRESS_BAR_PADDING + 2), ((this.loaderInfo.height - (PROGRESS_BAR_HEIGHT - 2)) - 20), ((this.loaderInfo.width - (2 * PROGRESS_BAR_PADDING)) - 4), (PROGRESS_BAR_HEIGHT - 4)); this.graphics.endFill(); this.graphics.beginFill(PROGRESS_BAR_COLOR); this.graphics.drawRect((PROGRESS_BAR_PADDING + 5), ((this.loaderInfo.height - (PROGRESS_BAR_HEIGHT - 5)) - 20), (_local2 * ((this.loaderInfo.width - (2 * PROGRESS_BAR_PADDING)) - 10)), (PROGRESS_BAR_HEIGHT - 10)); this.graphics.endFill(); } private function swfInitHandler(_arg1:Event):void{ _arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee); this.sponsorAd.buttonMode = true; this.sponsorAd.addEventListener(MouseEvent.CLICK, sponsorAd_clickHandler); this.addEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package
Section 139
//RadioButton_disabledIcon (RadioButton_disabledIcon) package { import flash.display.*; public dynamic class RadioButton_disabledIcon extends MovieClip { } }//package
Section 140
//RadioButton_downIcon (RadioButton_downIcon) package { import flash.display.*; public dynamic class RadioButton_downIcon extends MovieClip { } }//package
Section 141
//RadioButton_overIcon (RadioButton_overIcon) package { import flash.display.*; public dynamic class RadioButton_overIcon extends MovieClip { } }//package
Section 142
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDisabledIcon extends MovieClip { } }//package
Section 143
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDownIcon extends MovieClip { } }//package
Section 144
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon) package { import flash.display.*; public dynamic class RadioButton_selectedOverIcon extends MovieClip { } }//package
Section 145
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon) package { import flash.display.*; public dynamic class RadioButton_selectedUpIcon extends MovieClip { } }//package
Section 146
//RadioButton_upIcon (RadioButton_upIcon) package { import flash.display.*; public dynamic class RadioButton_upIcon extends MovieClip { } }//package
Section 147
//ScreenRadioOverSkin (ScreenRadioOverSkin) package { import flash.display.*; public dynamic class ScreenRadioOverSkin extends Sprite { } }//package
Section 148
//ScreenRadioSelectedOverSkin (ScreenRadioSelectedOverSkin) package { import flash.display.*; public dynamic class ScreenRadioSelectedOverSkin extends Sprite { } }//package
Section 149
//ScreenRadioSelectedUpSkin (ScreenRadioSelectedUpSkin) package { import flash.display.*; public dynamic class ScreenRadioSelectedUpSkin extends Sprite { } }//package
Section 150
//ScreenRadioUpSkin (ScreenRadioUpSkin) package { import flash.display.*; public dynamic class ScreenRadioUpSkin extends Sprite { } }//package
Section 151
//SelectionIndicator (SelectionIndicator) package { import flash.display.*; public dynamic class SelectionIndicator extends Sprite { } }//package

Library Items

Symbol 1 FontUsed by:2 3 49 79 81 82 83 84 86 88 96 119 120 121 122 123 140 141 142 143 150 151 152 153 154 155 156 159 160 166 192 193 200
Symbol 2 TextUses:1Used by:Timeline
Symbol 3 TextUses:1Used by:Timeline
Symbol 4 BitmapUsed by:5
Symbol 5 GraphicUses:4Used by:6
Symbol 6 MovieClipUses:5Used by:Timeline
Symbol 7 GraphicUsed by:13
Symbol 8 GraphicUsed by:13
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:13 18 23 28 33 38 43 50 132 139 149 171 174 176 178 180 182
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClipUses:11Used by:13
Symbol 13 MovieClip {NodeRed}Uses:7 8 10 12
Symbol 14 GraphicUsed by:18
Symbol 15 GraphicUsed by:18
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18
Symbol 18 MovieClip {NodeGreen}Uses:14 15 10 17
Symbol 19 GraphicUsed by:23
Symbol 20 GraphicUsed by:23 176
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:21Used by:23
Symbol 23 MovieClip {NodeGray}Uses:19 20 10 22
Symbol 24 GraphicUsed by:28
Symbol 25 GraphicUsed by:28 182
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:28
Symbol 28 MovieClip {NodeYellow}Uses:24 25 10 27
Symbol 29 GraphicUsed by:33
Symbol 30 GraphicUsed by:33 171
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:33
Symbol 33 MovieClip {NodePink}Uses:29 30 10 32
Symbol 34 GraphicUsed by:38
Symbol 35 GraphicUsed by:38 178
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:38
Symbol 38 MovieClip {NodeCyan}Uses:34 35 10 37
Symbol 39 GraphicUsed by:43
Symbol 40 GraphicUsed by:43 180
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:43
Symbol 43 MovieClip {NodeBlue}Uses:39 40 10 42
Symbol 44 GraphicUsed by:90
Symbol 45 GraphicUsed by:50 149 171 174 176 178 180 182
Symbol 46 GraphicUsed by:50
Symbol 47 GraphicUsed by:48 169
Symbol 48 MovieClipUses:47Used by:50
Symbol 49 EditableTextUses:1Used by:50
Symbol 50 MovieClip {com.bowlerhatgames.qrossfire.controls.PieTimer}Uses:45 46 48 10 49Used by:90
Symbol 51 GraphicUsed by:80 90 204
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClipUses:52Used by:75 118
Symbol 54 MovieClip {fl.core.ComponentShim}Used by:75 118
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClip {Button_disabledSkin}Uses:55Used by:75
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClip {Button_downSkin}Uses:57Used by:75
Symbol 59 GraphicUsed by:60
Symbol 60 MovieClip {Button_emphasizedSkin}Uses:59Used by:75
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClip {Button_overSkin}Uses:61Used by:75
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClip {Button_selectedDisabledSkin}Uses:63Used by:75
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {Button_selectedDownSkin}Uses:65Used by:75
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClip {Button_selectedOverSkin}Uses:67Used by:75
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClip {Button_selectedUpSkin}Uses:69Used by:75
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClip {Button_upSkin}Uses:71Used by:75
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClip {focusRectSkin}Uses:73Used by:75 118
Symbol 75 MovieClip {org.josht.fl.controls.Button}Uses:53 54 56 58 60 62 64 66 68 70 72 74Used by:87 89 90 101 124 157 161
Symbol 76 BitmapUsed by:77
Symbol 77 GraphicUses:76Used by:78
Symbol 78 MovieClipUses:77Used by:90 101
Symbol 79 TextUses:1Used by:80
Symbol 80 MovieClipUses:51 79Used by:90
Symbol 81 TextUses:1Used by:90
Symbol 82 TextUses:1Used by:90
Symbol 83 EditableTextUses:1Used by:90
Symbol 84 EditableTextUses:1Used by:90
Symbol 85 GraphicUsed by:87 89
Symbol 86 EditableTextUses:1Used by:87
Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog}Uses:85 86 75Used by:90
Symbol 88 EditableTextUses:1Used by:89
Symbol 89 MovieClip {com.bowlerhatgames.qrossfire.controls.PauseDialog}Uses:85 88 75Used by:90
Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen}Uses:44 50 51 75 78 80 81 82 83 84 87 89
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClip {KeyBW}Uses:91Used by:94
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClip {BowlerHatBW}Uses:92 93Used by:100
Symbol 95 GraphicUsed by:101
Symbol 96 TextUses:1Used by:101
Symbol 97 GraphicUsed by:100
Symbol 98 FontUsed by:99
Symbol 99 TextUses:98Used by:100
Symbol 100 MovieClipUses:97 94 99Used by:101
Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen}Uses:95 75 96 100 78
Symbol 102 GraphicUsed by:124
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClip {RadioButton_upIcon}Uses:103Used by:118
Symbol 105 GraphicUsed by:106 115
Symbol 106 MovieClip {RadioButton_overIcon}Uses:105Used by:118
Symbol 107 GraphicUsed by:108 116
Symbol 108 MovieClip {RadioButton_downIcon}Uses:107Used by:118
Symbol 109 GraphicUsed by:110 117
Symbol 110 MovieClip {RadioButton_disabledIcon}Uses:109Used by:118
Symbol 111 GraphicUsed by:114
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClipUses:112Used by:114 115 116 117
Symbol 114 MovieClip {RadioButton_selectedUpIcon}Uses:111 113Used by:118
Symbol 115 MovieClip {RadioButton_selectedOverIcon}Uses:105 113Used by:118
Symbol 116 MovieClip {RadioButton_selectedDownIcon}Uses:107 113Used by:118
Symbol 117 MovieClip {RadioButton_selectedDisabledIcon}Uses:109 113Used by:118
Symbol 118 MovieClip {fl.controls.RadioButton}Uses:53 54 104 106 108 110 114 115 116 117 74Used by:124 161
Symbol 119 TextUses:1Used by:124
Symbol 120 TextUses:1Used by:124
Symbol 121 TextUses:1Used by:124
Symbol 122 TextUses:1Used by:124
Symbol 123 TextUses:1Used by:124
Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen}Uses:102 118 75 119 120 121 122 123
Symbol 125 GraphicUsed by:126
Symbol 126 MovieClip {MouseCursor}Uses:125Used by:157
Symbol 127 GraphicUsed by:157
Symbol 128 GraphicUsed by:132
Symbol 129 GraphicUsed by:130
Symbol 130 MovieClipUses:129Used by:132
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClip {PowerUpFire}Uses:128 130 131 10Used by:157
Symbol 133 GraphicUsed by:139
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClipUses:134Used by:139
Symbol 136 GraphicUsed by:139
Symbol 137 GraphicUsed by:138
Symbol 138 MovieClipUses:137Used by:139 149 171 174 176 178 180 182
Symbol 139 MovieClip {PowerUpSkull}Uses:133 135 136 10 138Used by:157
Symbol 140 EditableTextUses:1Used by:157
Symbol 141 EditableTextUses:1Used by:157
Symbol 142 EditableTextUses:1Used by:157
Symbol 143 EditableTextUses:1Used by:157
Symbol 144 GraphicUsed by:157
Symbol 145 GraphicUsed by:149
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClipUses:146Used by:149 171 174 176 178 180 182
Symbol 148 GraphicUsed by:149 186 201
Symbol 149 MovieClip {BombRed}Uses:145 147 148 10 45 138Used by:157
Symbol 150 EditableTextUses:1Used by:157
Symbol 151 EditableTextUses:1Used by:157
Symbol 152 EditableTextUses:1Used by:157
Symbol 153 EditableTextUses:1Used by:157
Symbol 154 TextUses:1Used by:157
Symbol 155 TextUses:1Used by:157
Symbol 156 TextUses:1Used by:157
Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen}Uses:127 132 139 140 141 142 143 144 149 150 151 75 152 153 154 155 126 156
Symbol 158 GraphicUsed by:161
Symbol 159 EditableTextUses:1Used by:161
Symbol 160 TextUses:1Used by:161
Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen}Uses:158 159 118 75 160
Symbol 162 GraphicUsed by:165
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClipUses:163Used by:165
Symbol 165 MovieClip {BackButtonUpIcon}Uses:162 164Used by:169
Symbol 166 TextUses:1Used by:169
Symbol 167 GraphicUsed by:168
Symbol 168 MovieClip {BackButtonOverIcon}Uses:167Used by:169
Symbol 169 Button {BackToMenuButton}Uses:165 166 168 47
Symbol 170 GraphicUsed by:171
Symbol 171 MovieClip {BombPink}Uses:170 147 30 10 45 138
Symbol 172 GraphicUsed by:174
Symbol 173 GraphicUsed by:174
Symbol 174 MovieClip {BombGreen}Uses:172 147 173 10 45 138
Symbol 175 GraphicUsed by:176
Symbol 176 MovieClip {BombGray}Uses:175 147 20 10 45 138
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClip {BombCyan}Uses:177 147 35 10 45 138
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClip {BombBlue}Uses:179 147 40 10 45 138
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip {BombYellow}Uses:181 147 25 10 45 138
Symbol 183 GraphicUsed by:184
Symbol 184 MovieClipUses:183Used by:185 187
Symbol 185 MovieClip {ScreenRadioOverSkin}Uses:184
Symbol 186 MovieClipUses:148Used by:187 190
Symbol 187 MovieClip {ScreenRadioSelectedOverSkin}Uses:184 186
Symbol 188 GraphicUsed by:189
Symbol 189 MovieClipUses:188Used by:190 191
Symbol 190 MovieClip {ScreenRadioSelectedUpSkin}Uses:189 186
Symbol 191 MovieClip {ScreenRadioUpSkin}Uses:189
Symbol 192 EditableTextUses:1Used by:194
Symbol 193 EditableTextUses:1Used by:194
Symbol 194 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoreItem}Uses:192 193
Symbol 195 MovieClip {com.bowlerhatgames.qrossfire.Game}
Symbol 196 GraphicUsed by:197
Symbol 197 MovieClipUses:196Used by:198
Symbol 198 MovieClip {SelectionIndicator}Uses:197Used by:199
Symbol 199 MovieClip {com.bowlerhatgames.qrossfire.GameBoard}Uses:198
Symbol 200 EditableTextUses:1Used by:201
Symbol 201 MovieClip {com.bowlerhatgames.qrossfire.screens.AdvertisementScreen}Uses:148 200
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:Timeline
Symbol 204 MovieClipUses:51Used by:Timeline
Symbol 205 Sound {com.bowlerhatgames.qrossfire.assets.audio.SelectNodeSound}
Symbol 206 Sound {com.bowlerhatgames.qrossfire.assets.audio.FlamePowerUpSound}
Symbol 207 Sound {com.bowlerhatgames.qrossfire.assets.audio.MatchSound}
Symbol 208 Sound {com.bowlerhatgames.qrossfire.assets.audio.DeselectNodeSound}
Symbol 209 Sound {com.bowlerhatgames.qrossfire.assets.audio.SlideReverseSound}
Symbol 210 Sound {com.bowlerhatgames.qrossfire.assets.audio.SlideSound}
Symbol 211 Sound {com.bowlerhatgames.qrossfire.assets.audio.BombExplodeSound}
Symbol 212 Sound {com.bowlerhatgames.qrossfire.assets.audio.TimerWarningSound}
Symbol 213 Sound {com.bowlerhatgames.qrossfire.assets.audio.ButtonClickSound}
Symbol 214 Sound {com.bowlerhatgames.qrossfire.assets.audio.LevelUpSound}
Symbol 215 Sound {com.bowlerhatgames.qrossfire.assets.audio.MenuBackgroundMusic}
Symbol 216 MovieClip {fl.controls.Button}

Instance Names

"sponsorAd"Frame 1Symbol 6 MovieClip
"base"Symbol 50 MovieClip {com.bowlerhatgames.qrossfire.controls.PieTimer} Frame 1Symbol 48 MovieClip
"digitalField"Symbol 50 MovieClip {com.bowlerhatgames.qrossfire.controls.PieTimer} Frame 1Symbol 49 EditableText
"messageField"Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog} Frame 1Symbol 86 EditableText
"moreGamesButton"Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"submitScoreButton"Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"playAgainButton"Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"messageField"Symbol 89 MovieClip {com.bowlerhatgames.qrossfire.controls.PauseDialog} Frame 1Symbol 88 EditableText
"moreGamesButton"Symbol 89 MovieClip {com.bowlerhatgames.qrossfire.controls.PauseDialog} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"resumeButton"Symbol 89 MovieClip {com.bowlerhatgames.qrossfire.controls.PauseDialog} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"pieTimer"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 50 MovieClip {com.bowlerhatgames.qrossfire.controls.PieTimer}
"backButton"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"sponsorLogo"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 78 MovieClip
"blitzTitle"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 80 MovieClip
"blitzTimer"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 50 MovieClip {com.bowlerhatgames.qrossfire.controls.PieTimer}
"scoreField"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 83 EditableText
"levelField"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 84 EditableText
"endLevelDialog"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 87 MovieClip {com.bowlerhatgames.qrossfire.controls.EndLevelDialog}
"pauseDialog"Symbol 90 MovieClip {com.bowlerhatgames.qrossfire.screens.GameScreen} Frame 1Symbol 89 MovieClip {com.bowlerhatgames.qrossfire.controls.PauseDialog}
"playGameOption"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"settingsOption"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"highScoresOption"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"moreGamesOption"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"createdByLink"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 100 MovieClip
"sponsorLogo"Symbol 101 MovieClip {com.bowlerhatgames.qrossfire.screens.TitleScreen} Frame 1Symbol 78 MovieClip
"easyRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"normalRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"hardRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"musicOnRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"musicOffRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"sfxOnRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"sfxOffRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"helpOnRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"helpOffRadio"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"backButton"Symbol 124 MovieClip {com.bowlerhatgames.qrossfire.screens.SettingsScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"light"Symbol 149 MovieClip {BombRed} Frame 1Symbol 138 MovieClip
"exampleFlame"Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen} Frame 1Symbol 132 MovieClip {PowerUpFire}
"exampleSkull"Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen} Frame 1Symbol 139 MovieClip {PowerUpSkull}
"exampleBomb"Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen} Frame 1Symbol 149 MovieClip {BombRed}
"continueButton"Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"demoMouse"Symbol 157 MovieClip {com.bowlerhatgames.qrossfire.screens.InstructionsScreen} Frame 1Symbol 126 MovieClip {MouseCursor}
"statusField"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 159 EditableText
"dailyRadio"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"weeklyRadio"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"monthlyRadio"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"allRadio"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 118 MovieClip {fl.controls.RadioButton}
"backButton"Symbol 161 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoresScreen} Frame 1Symbol 75 MovieClip {org.josht.fl.controls.Button}
"light"Symbol 171 MovieClip {BombPink} Frame 1Symbol 138 MovieClip
"light"Symbol 174 MovieClip {BombGreen} Frame 1Symbol 138 MovieClip
"light"Symbol 176 MovieClip {BombGray} Frame 1Symbol 138 MovieClip
"light"Symbol 178 MovieClip {BombCyan} Frame 1Symbol 138 MovieClip
"light"Symbol 180 MovieClip {BombBlue} Frame 1Symbol 138 MovieClip
"light"Symbol 182 MovieClip {BombYellow} Frame 1Symbol 138 MovieClip
"nameField"Symbol 194 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoreItem} Frame 1Symbol 192 EditableText
"scoreField"Symbol 194 MovieClip {com.bowlerhatgames.qrossfire.screens.HighScoreItem} Frame 1Symbol 193 EditableText
"selectionIndicator"Symbol 199 MovieClip {com.bowlerhatgames.qrossfire.GameBoard} Frame 1Symbol 198 MovieClip {SelectionIndicator}
"timerField"Symbol 201 MovieClip {com.bowlerhatgames.qrossfire.screens.AdvertisementScreen} Frame 1Symbol 200 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 11284 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmln ..."




http://swfchan.com/19/90600/info.shtml
Created: 28/3 -2019 08:08:12 Last modified: 28/3 -2019 08:08:12 Server time: 22/12 -2024 12:32:11