Section 1
//ActionRadius (game.components.ActionRadius)
package game.components {
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.containers.*;
public class ActionRadius extends Canvas {
private var mInitialized:Boolean;// = false
public var _bindingsByDestination:Object;
public var _bindingsBeginWithWord:Object;
private var mRadius:int;
private var mValid:Boolean;// = false
private var _documentDescriptor_:UIComponentDescriptor;
public function ActionRadius(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:64, height:64});
}});
mValid = false;
mInitialized = false;
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
this.addEventListener("resize", ___Canvas1_resize);
}
public function ___Canvas1_resize(_arg1:ResizeEvent):void{
SetRadius((this.width / 2));
}
public function IsValid():Boolean{
return (mValid);
}
public function Update(_arg1:Boolean):void{
mInitialized = true;
if (_arg1 != mValid){
mValid = _arg1;
DrawCircle(_arg1);
};
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
SetRadius(78);
}
public function CheckCollision(_arg1:DisplayObject, _arg2:Boolean=false):Boolean{
return (((this.hitTestObject(_arg1)) && (((((((((!(_arg2)) || (this.hitTestPoint(_arg1.x, _arg1.y, true)))) || (this.hitTestPoint((_arg1.x + _arg1.width), _arg1.y, true)))) || (this.hitTestPoint((_arg1.x + _arg1.width), (_arg1.y + _arg1.height), true)))) || (this.hitTestPoint(_arg1.x, (_arg1.y + _arg1.height), true))))));
}
public function IsInitialized():Boolean{
return (mInitialized);
}
public function SetRadius(_arg1:int):void{
mRadius = _arg1;
this.width = (mRadius * 2);
this.height = (mRadius * 2);
DrawCircle(true);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
private function DrawCircle(_arg1:Boolean):void{
this.graphics.clear();
this.graphics.beginFill((_arg1) ? 0xFF00 : 0xFF0000, 0.3);
this.graphics.drawCircle(mRadius, mRadius, mRadius);
this.graphics.endFill();
}
}
}//package game.components
Section 2
//Aim (game.components.Aim)
package game.components {
import mx.core.*;
import mx.events.*;
import mx.containers.*;
public class Aim extends Canvas {
public var _bindingsByDestination:Object;
private var _949664937idAnimation:Animation;
public var _bindingsBeginWithWord:Object;
private var mAfterLoad:Function;
private var _documentDescriptor_:UIComponentDescriptor;
public function Aim(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:12, height:12, childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 12;
this.height = 12;
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
public function UpdateAnimation():void{
this.idAnimation.SetAnimation("Aim", true);
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function Init(_arg1:Function=null, _arg2:Function=null, _arg3:Boolean=true):void{
mAfterLoad = _arg1;
this.idAnimation.Init("animations/Aim.gif", "animations/Aim.xml", OnLoad, _arg2, _arg3);
this.width = 13;
this.height = 13;
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
UpdateAnimation();
}
private function OnLoad():void{
if (mAfterLoad){
mAfterLoad();
};
UpdateAnimation();
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
}
}//package game.components
Section 3
//Animation (game.components.Animation)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import game.*;
import mx.controls.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import game.gif.player.*;
import flash.utils.*;
import flash.media.*;
import game.gif.events.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Animation extends SWFLoader {
private var mCurrentActionParam:Object;
private var mOldAnimationName:String;
public var _bindingsByDestination:Object;
private var mCurrentAnimation:XML;
private var mLoopEndFrame:int;
private var mAnimation:GIFPlayer;
private var mAnimations:XML;
private var mLoopStartFrame:int;
public var _bindingsBeginWithWord:Object;
private var mCurrentFinishHandler:Function;
private var mAnimationPath:String;
private var mInitilized:Boolean;
private var mAfterLoad:Function;
private var mCurrentActionHandler:Function;
private var mLoopActionFrame:int;
private var mIsLooped:Boolean;
public function Animation(){
this.addEventListener("initialize", ___SWFLoader1_initialize);
}
public function Stop(_arg1:Boolean=false):void{
if (!mInitilized){
return;
};
if (!mCurrentAnimation){
return;
};
if (_arg1){
mAnimation.gotoAndStop(1);
} else {
mAnimation.stop();
};
}
private function ParseAnimations(_arg1:Event):void{
(_arg1.target as URLLoader).removeEventListener(Event.COMPLETE, ParseAnimations, false);
mAnimations = new XML(_arg1.target.data);
mInitilized = true;
this.width = mAnimation.width;
this.height = mAnimation.height;
if (mAfterLoad){
mAfterLoad();
};
}
private function AfterLoad(_arg1:GIFPlayerEvent=null):void{
mAnimation.removeEventListener(GIFPlayerEvent.COMPLETE, AfterLoad, false);
mLoopEndFrame = mAnimation.totalFrames;
mLoopStartFrame = 0;
mAnimation.addEventListener(FrameEvent.FRAME_RENDERED, OnEnterFrame, false, 0, true);
ResourceManager.GetURLLoader(mAnimationPath, ParseAnimations);
}
private function OnEnterFrame(_arg1:FrameEvent):void{
if (!mInitilized){
return;
};
if ((((mAnimation.currentFrame == mLoopActionFrame)) && (mCurrentActionHandler))){
mCurrentActionHandler(mCurrentActionParam);
if (!mIsLooped){
mCurrentActionHandler = null;
mCurrentActionParam = null;
};
};
if (mAnimation.currentFrame >= mLoopEndFrame){
if (mIsLooped){
mAnimation.gotoAndPlay(mLoopStartFrame);
} else {
mAnimation.stop();
if (mCurrentFinishHandler){
mCurrentFinishHandler();
mCurrentFinishHandler = null;
};
};
};
}
public function SetLooped(_arg1:Boolean, _arg2:Boolean=false):void{
var _local3:int;
var _local4:int;
if (!mInitilized){
return;
};
if (!mCurrentAnimation){
return;
};
_local3 = int(mCurrentAnimation.attribute("from"));
_local4 = int(mCurrentAnimation.attribute("to"));
mIsLooped = _arg1;
if (mIsLooped){
mLoopStartFrame = _local3;
mLoopEndFrame = _local4;
};
if (_arg2){
mAnimation.gotoAndPlay(_local3);
};
}
public function GetGIFPlayer():GIFPlayer{
return (mAnimation);
}
public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
var _local6:UIComponent;
var _local7:URLLoader;
_local6 = new UIComponent();
mAfterLoad = _arg3;
mIsLooped = false;
mInitilized = false;
mAnimationPath = _arg2;
if (((!(_arg5)) || (!(ResourceManager.LoadGIFFromCache(mAnimation, _arg1))))){
mAnimation.addEventListener(GIFPlayerEvent.COMPLETE, AfterLoad, false, 0, true);
if (_arg4){
mAnimation.addEventListener(GIFPlayerEvent.COMPLETE, _arg4, false, 0, true);
};
_local7 = ResourceManager.GetURLLoader(_arg1, OnGIFDownloaded);
mAnimation.linkLoader(_local7);
} else {
AfterLoad();
};
if (this.numChildren > 0){
this.removeChildAt(0);
};
this.addChild(mAnimation);
}
public function SetAnimation(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Function=null, _arg5:Function=null, _arg6:Object=null):void{
var _local7:XML;
var _local8:int;
var _local9:int;
var _local10:int;
if (!mInitilized){
return;
};
if (_arg1 == mOldAnimationName){
if (!_arg3){
return;
};
};
_local7 = mAnimations.child(_arg1)[0];
_local8 = int(_local7.attribute("from"));
_local9 = int(_local7.attribute("to"));
_local10 = int(_local7.attribute("actionFrame"));
if (((((mCurrentAnimation) && ((int(mCurrentAnimation.attribute("priority")) > int(_local7.attribute("priority")))))) && ((mAnimation.currentFrame < mLoopEndFrame)))){
return;
};
mOldAnimationName = _arg1;
mIsLooped = _arg2;
mLoopStartFrame = _local8;
mLoopEndFrame = _local9;
mLoopActionFrame = _local10;
mCurrentAnimation = _local7;
mCurrentFinishHandler = _arg4;
mCurrentActionHandler = _arg5;
mCurrentActionParam = _arg6;
mAnimation.gotoAndPlay(_local8);
}
private function OnGIFDownloaded(_arg1:Event):void{
var _local2:URLLoader;
_local2 = (_arg1.target as URLLoader);
_local2.removeEventListener(Event.COMPLETE, OnGIFDownloaded, false);
mAnimation.setLoader(_local2);
}
public function ___SWFLoader1_initialize(_arg1:FlexEvent):void{
OnCreate();
}
public function Play():void{
if (!mInitilized){
return;
};
if (!mCurrentAnimation){
return;
};
mAnimation.play();
}
override public function initialize():void{
super.initialize();
}
public function GetCurrentAnimationName():String{
return (mOldAnimationName);
}
private function OnCreate():void{
mAnimation = new GIFPlayer(false);
}
}
}//package game.components
Section 4
//Arrow1Building (game.components.Arrow1Building)
package game.components {
import mx.core.*;
import flash.geom.*;
import game.*;
public class Arrow1Building extends Warehouse {
private var mArrowCount:int;
private var _documentDescriptor_:UIComponentDescriptor;
public function Arrow1Building(){
_documentDescriptor_ = new UIComponentDescriptor({type:Warehouse, propertiesFactory:function ():Object{
return ({width:64, height:64});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
}
override public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
super.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteXmlName, _arg3, _arg4, _arg5);
mArrowCount = GameUtils.GetGameCore().GetCurrentLevelSettings().arrow1Count;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteHeight;
this.idBlock.x = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBlockX;
this.idBlock.y = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBlockY;
this.idBlock.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBlockWidth;
this.idBlock.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBlockHeight;
mBase = new Point((this.width / 2), (this.height / 2));
}
public function GetArrowCount():int{
return (mArrowCount);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function TakeArrow():void{
if (mArrowCount > 0){
mArrowCount--;
};
if (mArrowCount < 1){
this.visible = false;
};
}
}
}//package game.components
Section 5
//Arrow2Building (game.components.Arrow2Building)
package game.components {
import mx.core.*;
import flash.geom.*;
import game.*;
public class Arrow2Building extends Warehouse {
private var mArrowCount:int;
private var _documentDescriptor_:UIComponentDescriptor;
public function Arrow2Building(){
_documentDescriptor_ = new UIComponentDescriptor({type:Warehouse, propertiesFactory:function ():Object{
return ({width:64, height:64});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
}
override public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
super.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteXmlName, _arg3, _arg4, _arg5);
mArrowCount = GameUtils.GetGameCore().GetCurrentLevelSettings().arrow2Count;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteHeight;
this.idBlock.x = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBlockX;
this.idBlock.y = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBlockY;
this.idBlock.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBlockWidth;
this.idBlock.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBlockHeight;
mBase = new Point((this.width / 2), (this.height / 2));
}
public function GetArrowCount():int{
return (mArrowCount);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function TakeArrow():void{
if (mArrowCount > 0){
mArrowCount--;
};
if (mArrowCount < 1){
this.visible = false;
};
}
}
}//package game.components
Section 6
//Arrow3Building (game.components.Arrow3Building)
package game.components {
import mx.core.*;
import flash.geom.*;
import game.*;
public class Arrow3Building extends Warehouse {
private var mArrowCount:int;
private var _documentDescriptor_:UIComponentDescriptor;
public function Arrow3Building(){
_documentDescriptor_ = new UIComponentDescriptor({type:Warehouse, propertiesFactory:function ():Object{
return ({width:64, height:64});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
}
override public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
super.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteXmlName, _arg3, _arg4, _arg5);
mArrowCount = GameUtils.GetGameCore().GetCurrentLevelSettings().arrow3Count;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteHeight;
this.idBlock.x = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBlockX;
this.idBlock.y = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBlockY;
this.idBlock.width = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBlockWidth;
this.idBlock.height = GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBlockHeight;
mBase = new Point((this.width / 2), (this.height / 2));
}
public function GetArrowCount():int{
return (mArrowCount);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function TakeArrow():void{
if (mArrowCount > 0){
mArrowCount--;
};
if (mArrowCount < 1){
this.visible = false;
};
}
}
}//package game.components
Section 7
//Bullet (game.components.Bullet)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.effects.*;
import game.*;
import mx.containers.*;
import mx.effects.easing.*;
public class Bullet extends Canvas {
public var _bindingsByDestination:Object;
private var _949664937idAnimation:Animation;
private var mFly:Move;
public var _bindingsBeginWithWord:Object;
private var mMinDamage:Number;
private var mRotation:Rotate;
private var _documentDescriptor_:UIComponentDescriptor;
private var mFinished:Boolean;
public function Bullet(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:12, height:12, childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 12;
this.height = 12;
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
this.idAnimation.Init(_arg1, _arg2, _arg3, _arg4, _arg5);
mMinDamage = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerDamage;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteHeight;
mFinished = false;
mRotation = new Rotate(this);
mRotation.duration = 1;
mFly = new Move(this);
mFly.suspendBackgroundProcessing = true;
mFly.easingFunction = Linear.easeNone;
mFly.addEventListener(EffectEvent.EFFECT_END, Boom, false, 0, true);
mFly.addEventListener(TweenEvent.TWEEN_UPDATE, CheckCollisions, false, 0, true);
}
public function RemoveThis():void{
mFly.target = null;
mRotation.target = null;
if (this.parent){
this.parent.removeChild(this);
};
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function FlyTo(_arg1:int, _arg2:int):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local3 = (_arg1 - (this.x + (this.width / 2)));
_local4 = ((this.y + (this.height / 2)) - _arg2);
_local5 = Math.max(this.width, this.height);
if (GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteRotate){
_local6 = Math.atan2(_local3, _local4);
mRotation.angleFrom = ((_local6 * 180) / Math.PI);
mRotation.angleTo = ((_local6 * 180) / Math.PI);
mRotation.captureStartValues();
mRotation.play();
mRotation.end();
};
mFly.xTo = _arg1;
mFly.yTo = _arg2;
mFly.duration = ((1200 * int((Math.sqrt((((this.x - _arg1) * (this.x - _arg1)) + ((this.y - _arg2) * (this.y - _arg2)))) / _local5))) / GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpeed);
this.idAnimation.SetAnimation("Fly", true);
mFly.play();
}
public function SetDamage(_arg1:int):void{
mMinDamage = _arg1;
}
private function CheckCollisions(_arg1:Event=null):void{
var _local2:DisplayObject;
if (mFinished){
return;
};
for each (_local2 in GameUtils.GetGameCore().GetCorovanManager().GetSandbox().getChildren()) {
if (((((((_local2.hitTestPoint(this.x, this.y, true)) || (_local2.hitTestPoint((this.x + this.width), this.y, true)))) || (_local2.hitTestPoint((this.x + this.width), (this.y + this.height), true)))) || (_local2.hitTestPoint(this.x, (this.y + this.height), true)))){
if ((_local2 is Camel)){
if ((_local2 as Camel).IsDead()){
return;
};
(_local2 as Camel).Hurt((mMinDamage + ((Math.random() * mMinDamage) / 2)));
} else {
_local2.visible = false;
};
Boom();
break;
};
};
}
private function Boom(_arg1:Event=null):void{
if (mFinished){
return;
};
mFinished = true;
mFly.end();
mRotation.end();
mFly.removeEventListener(EffectEvent.EFFECT_END, Boom, false);
this.idAnimation.SetAnimation("Boom", false, true, RemoveThis);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
private function rawEasing(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
_local5 = (((_arg3 * _arg1) / _arg4) + _arg2);
return (Math.round(_local5));
}
}
}//package game.components
Section 8
//Camel (game.components.Camel)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.effects.*;
import game.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Camel extends Canvas {
private var _bindings:Array;
private var mDestroyed:Boolean;
public var _bindingsByDestination:Object;
private var _949664937idAnimation:Animation;
private var mLastDelta:Point;
private var mHealth:int;
private var mPointsVisited:int;
private var mDisappear:Fade;
public var _bindingsBeginWithWord:Object;
private var mMove:Move;
private var _1624785993idAimed:Aim;
private var mMoveCompleteHandler:Function;
private var _974881961idHealth:Canvas;
private var mReward:int;
private var mDead:Boolean;
private var mDying:Boolean;
private var mIsWalking:Boolean;
private var _watchers:Array;
private var mSpeed:int;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function Camel(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:36, height:36, childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:4, percentWidth:100, percentHeight:100, alpha:1});
}}), new UIComponentDescriptor({type:Canvas, id:"idHealth", stylesFactory:function ():void{
this.backgroundColor = 0xFF00;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, height:3});
}}), new UIComponentDescriptor({type:Aim, id:"idAimed", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.verticalCenter = 0;
}, propertiesFactory:function ():Object{
return ({visible:false});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 36;
this.height = 36;
this.horizontalScrollPolicy = "off";
this.verticalScrollPolicy = "off";
this.addEventListener("hide", ___Canvas1_hide);
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
public function SetOrientation(_arg1:int, _arg2:int, _arg3:Boolean=false):void{
mLastDelta.x = _arg1;
mLastDelta.y = _arg2;
if (_arg1 > 0){
WalkRight(_arg3);
return;
};
if (_arg1 < 0){
WalkLeft(_arg3);
return;
};
if (_arg2 < 0){
WalkUp(_arg3);
return;
};
if (_arg2 > 0){
WalkDown(_arg3);
return;
};
}
public function Hurt(_arg1:int):void{
if (mDead){
return;
};
mHealth = Math.max(0, (mHealth - _arg1));
if (mHealth <= (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth * 0.85)){
this.idHealth.setStyle("backgroundColor", "0xffff00");
};
if (mHealth <= (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth * 0.65)){
this.idHealth.setStyle("backgroundColor", "0xff8844");
};
if (mHealth <= (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth * 0.45)){
this.idHealth.setStyle("backgroundColor", "0xff0000");
};
this.idHealth.width = (this.width * (mHealth / GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth));
if (mHealth < 1){
mDead = true;
GameUtils.GetGameCore().GetMainForm().idScore.AddScore(((mReward + int(((Math.random() * mReward) / 3))) * (GameUtils.GetGameCore().GetMainForm().mAvailableTowers + 1)));
this.visible = false;
};
}
private function ForceRender():void{
SetOrientation(mLastDelta.x, mLastDelta.y, true);
}
public function get idAimed():Aim{
return (this._1624785993idAimed);
}
private function MoveComplete(_arg1:Event=null):void{
if (((((((!(mIsWalking)) || (mDead))) || (mDestroyed))) || (mDying))){
return;
};
mPointsVisited++;
mIsWalking = false;
if (mMoveCompleteHandler){
mMoveCompleteHandler(this);
};
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function set idAimed(_arg1:Aim):void{
var _local2:Object;
_local2 = this._1624785993idAimed;
if (_local2 !== _arg1){
this._1624785993idAimed = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAimed", _local2, _arg1));
};
}
public function ResetCamel():void{
mPointsVisited = 0;
mHealth = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth;
this.idAimed.visible = false;
mIsWalking = false;
mDead = false;
mDying = false;
mDestroyed = false;
this.idHealth.setStyle("backgroundColor", "0x00ff00");
this.idHealth.width = this.width;
mDisappear.end();
if (mMove){
mMove.removeEventListener(EffectEvent.EFFECT_END, MoveComplete, false);
mMove.end();
};
mMove = new Move(this);
mMove.easingFunction = rawEasing;
mMove.addEventListener(EffectEvent.EFFECT_END, MoveComplete, false, 0, true);
this.visible = true;
}
public function IsDead():Boolean{
return (((mDead) || (mDying)));
}
public function Init(_arg1:String, _arg2:String, _arg3:int=1, _arg4:Function=null, _arg5:Function=null, _arg6:Function=null, _arg7:Boolean=true):void{
mIsWalking = false;
mDead = false;
mPointsVisited = 0;
mLastDelta = new Point();
this.idAnimation.Init(_arg1, _arg2, _arg4, _arg5, _arg7);
mMoveCompleteHandler = _arg6;
mDestroyed = false;
mDying = false;
mSpeed = _arg3;
mHealth = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelHealth;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth;
this.height = (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight + 4);
mReward = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelReward;
this.idAimed.Init(_arg4, _arg5, _arg7);
mDisappear = new Fade(this);
mDisappear.alphaFrom = 1;
mDisappear.alphaTo = 0;
mDisappear.duration = 1000;
mMove = new Move(this);
mMove.easingFunction = rawEasing;
mMove.addEventListener(EffectEvent.EFFECT_END, MoveComplete, false, 0, true);
}
private function _Camel_bindingExprs():void{
var _local1:*;
_local1 = mDisappear;
_local1 = this.width;
}
public function Die():void{
if (mDying){
return;
};
GameUtils.GetGameCore().GetMainForm().idScore.AddKill();
mMove.pause();
mDisappear.end();
mDying = true;
this.idAnimation.Stop();
}
public function RemoveThis():void{
if (mDestroyed){
return;
};
mDestroyed = true;
mDisappear.end();
mMove.end();
mDisappear.target = null;
mMove.target = null;
if (this.parent){
this.parent.removeChild(this);
};
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function WalkLeft(_arg1:Boolean=false):void{
idAnimation.SetAnimation("WalkLeft", true, _arg1);
}
public function WalkToPoint(_arg1:int, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:Number;
if (((((((mIsWalking) || (mDead))) || (mDestroyed))) || (mDying))){
return;
};
mDisappear.end();
mMove.end();
_local3 = ((_arg1 - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth / 2)) - this.x);
_local4 = ((_arg2 - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight / 2)) - this.y);
mMove.xBy = ((_local3 == 0)) ? NaN : _local3;
mMove.yBy = ((_local4 == 0)) ? NaN : _local4;
_local5 = (Math.min(GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth, GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight) + GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpace);
mMove.duration = ((2000 * int((Math.sqrt(((_local3 * _local3) + (_local4 * _local4))) / _local5))) / mSpeed);
SetOrientation(_local3, _local4, true);
mIsWalking = true;
mMove.captureStartValues();
mMove.play();
}
public function WalkRight(_arg1:Boolean=false):void{
idAnimation.SetAnimation("WalkRight", true, _arg1);
}
public function SetAimed(_arg1:Boolean):void{
this.idAimed.visible = _arg1;
this.idAimed.idAnimation.Play();
}
private function _Camel_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function (){
return (mDisappear);
}, function (_arg1):void{
this.setStyle("hideEffect", _arg1);
}, "this.hideEffect");
_bindings[0] = binding;
binding = new Binding(this, function ():Number{
return (this.width);
}, function (_arg1:Number):void{
idHealth.width = _arg1;
}, "idHealth.width");
_bindings[1] = binding;
}
public function ___Canvas1_hide(_arg1:FlexEvent):void{
Die();
}
public function WalkDown(_arg1:Boolean=false):void{
idAnimation.SetAnimation("WalkDown", true, _arg1);
}
public function GetVisitedCount():int{
return (mPointsVisited);
}
public function WalkUp(_arg1:Boolean=false):void{
idAnimation.SetAnimation("WalkUp", true, _arg1);
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
ForceRender();
}
public function set idHealth(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._974881961idHealth;
if (_local2 !== _arg1){
this._974881961idHealth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idHealth", _local2, _arg1));
};
}
public function get idHealth():Canvas{
return (this._974881961idHealth);
}
override public function initialize():void{
var target:Camel;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_Camel_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_CamelWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
private function rawEasing(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
_local5 = (((_arg3 * _arg1) / _arg4) + _arg2);
return (Math.round(_local5));
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
Camel._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 9
//CorovanButton (game.components.CorovanButton)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.containers.*;
import flash.utils.*;
public class CorovanButton extends Canvas {
public var _bindingsByDestination:Object;
private var _949664937idAnimation:Animation;
private var mOnClick:Function;
public var _bindingsBeginWithWord:Object;
private var mEnabled:Boolean;
private var mAfterLoad:Function;
private var _documentDescriptor_:UIComponentDescriptor;
public function CorovanButton(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:32, height:32, childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 32;
this.height = 32;
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function SetEnabled(_arg1:Boolean):void{
mEnabled = _arg1;
this.alpha = (_arg1) ? 1 : 0.3;
}
public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Function=null, _arg6:Boolean=true):void{
mAfterLoad = _arg4;
mOnClick = _arg3;
SetEnabled(false);
this.idAnimation.Init(_arg1, _arg2, OnLoad, _arg5, _arg6);
this.addEventListener(MouseEvent.CLICK, OnMouseClick, false, 0, true);
this.width = 32;
this.height = 32;
}
private function Unpress():void{
this.idAnimation.Stop(true);
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
private function Click():void{
if (mOnClick){
setTimeout(mOnClick, 5, this);
};
this.idAnimation.Stop();
}
private function OnMouseClick(_arg1:Event):void{
if (!mEnabled){
return;
};
this.idAnimation.SetAnimation("Press", false, true, Click);
}
private function OnLoad():void{
if (mAfterLoad){
mAfterLoad();
};
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
}
}//package game.components
Section 10
//CorovanToolTip (game.components.CorovanToolTip)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class CorovanToolTip extends Canvas implements IToolTip {
private var _1194491742idBack:Canvas;
public var _bindingsByDestination:Object;
public var _bindingsBeginWithWord:Object;
private var _399556533idCaption:Label;
private var _1194478243idBody:Text;
private var _documentDescriptor_:UIComponentDescriptor;
public function CorovanToolTip(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"idBack", stylesFactory:function ():void{
this.borderThickness = 1;
this.cornerRadius = 10;
this.backgroundColor = 16777092;
this.backgroundAlpha = 0.7;
this.borderStyle = "solid";
}, propertiesFactory:function ():Object{
return ({verticalScrollPolicy:"off", horizontalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Label, id:"idCaption", stylesFactory:function ():void{
this.fontWeight = "bold";
this.top = 5;
this.horizontalCenter = 0;
}, propertiesFactory:function ():Object{
return ({text:"Label"});
}}), new UIComponentDescriptor({type:VBox, stylesFactory:function ():void{
this.top = 20;
this.left = 3;
}, propertiesFactory:function ():Object{
return ({verticalScrollPolicy:"off", horizontalScrollPolicy:"off", maxWidth:200, childDescriptors:[new UIComponentDescriptor({type:Text, id:"idBody", propertiesFactory:function ():Object{
return ({text:"text"});
}})]});
}})]});
}})]});
}});
super();
mx_internal::_document = this;
this.verticalScrollPolicy = "off";
this.horizontalScrollPolicy = "off";
}
public function get idCaption():Label{
return (this._399556533idCaption);
}
public function set idCaption(_arg1:Label):void{
var _local2:Object;
_local2 = this._399556533idCaption;
if (_local2 !== _arg1){
this._399556533idCaption = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCaption", _local2, _arg1));
};
}
public function get idBack():Canvas{
return (this._1194491742idBack);
}
public function get text():String{
return ("nothing");
}
public function get idBody():Text{
return (this._1194478243idBody);
}
public function set idBack(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1194491742idBack;
if (_local2 !== _arg1){
this._1194491742idBack = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBack", _local2, _arg1));
};
}
public function set text(_arg1:String):void{
}
public function set idBody(_arg1:Text):void{
var _local2:Object;
_local2 = this._1194478243idBody;
if (_local2 !== _arg1){
this._1194478243idBody = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBody", _local2, _arg1));
};
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
}
}//package game.components
Section 11
//GameTimer (game.components.GameTimer)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class GameTimer extends Canvas {
private var _bindings:Array;
public var _bindingsByDestination:Object;
private var _1642332906idTimer:Label;
private var mOnComplete:Function;
public var _bindingsBeginWithWord:Object;
private var _681920764_Label1:Label;
private var mAbort:Boolean;
private var mTimer:Timer;
private var _watchers:Array;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function GameTimer(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:100, height:30, childDescriptors:[new UIComponentDescriptor({type:Label, id:"_Label1", stylesFactory:function ():void{
this.fontSize = 15;
this.fontFamily = "Verdana";
this.fontWeight = "bold";
this.verticalCenter = 1;
this.horizontalCenter = 0;
}}), new UIComponentDescriptor({type:Label, id:"idTimer", stylesFactory:function ():void{
this.fontSize = 15;
this.fontFamily = "Verdana";
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.verticalCenter = 0;
this.horizontalCenter = 0;
}, propertiesFactory:function ():Object{
return ({text:"xxxx"});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 100;
this.height = 30;
}
private function UpdateTimer(_arg1:TimerEvent):void{
this.idTimer.text = (String((mTimer.repeatCount - mTimer.currentCount)) + " sec.");
}
private function _GameTimer_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function ():String{
var _local1:*;
var _local2:*;
_local1 = idTimer.text;
_local2 = ((_local1 == undefined)) ? null : String(_local1);
return (_local2);
}, function (_arg1:String):void{
_Label1.text = _arg1;
}, "_Label1.text");
_bindings[0] = binding;
}
private function OnComplete(_arg1:Event):void{
mTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, OnComplete, false);
if (!mAbort){
mOnComplete(_arg1);
};
}
public function get _Label1():Label{
return (this._681920764_Label1);
}
public function Init(_arg1:int, _arg2:Function=null):void{
mAbort = true;
if (mTimer){
mTimer.stop();
};
mTimer = new Timer(1000, _arg1);
mOnComplete = _arg2;
if (mOnComplete){
mTimer.addEventListener(TimerEvent.TIMER_COMPLETE, OnComplete, false, 0, true);
};
mTimer.addEventListener(TimerEvent.TIMER, UpdateTimer, false, 0, true);
this.idTimer.text = (String((mTimer.repeatCount - mTimer.currentCount)) + " sec.");
mAbort = false;
mTimer.start();
}
public function set idTimer(_arg1:Label):void{
var _local2:Object;
_local2 = this._1642332906idTimer;
if (_local2 !== _arg1){
this._1642332906idTimer = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idTimer", _local2, _arg1));
};
}
public function set _Label1(_arg1:Label):void{
var _local2:Object;
_local2 = this._681920764_Label1;
if (_local2 !== _arg1){
this._681920764_Label1 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label1", _local2, _arg1));
};
}
public function get idTimer():Label{
return (this._1642332906idTimer);
}
private function _GameTimer_bindingExprs():void{
var _local1:*;
_local1 = idTimer.text;
}
override public function initialize():void{
var target:GameTimer;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_GameTimer_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_GameTimerWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
_slot1._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 12
//Level (game.components.Level)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import game.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import mx.collections.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Level extends Canvas {
public var _bindingsByDestination:Object;
private var mLevelSettings:LevelSettings;
private var mTumbleweedInterval:uint;
private var _313864728idObstaclesLayer:Canvas;
private var mTumbleweed:Tumbleweed;
private var mTowers:ArrayCollection;
private var mMusic:GameSound;
public var _bindingsBeginWithWord:Object;
private var mWarehouses:ArrayCollection;
private var mWaypoints:XML;
private var mCurrentSelection:Tower;
private var mBerserkMode:Boolean;
private var mLevelData:XML;
private var _2023545001idBackground:Image;
private var mSniperMode:Boolean;
private var _1634834217idLevel:SWFLoader;
private var _documentDescriptor_:UIComponentDescriptor;
public function Level(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:320, height:320, childDescriptors:[new UIComponentDescriptor({type:Image, id:"idBackground", propertiesFactory:function ():Object{
return ({x:0, y:0, autoLoad:true, percentWidth:100, percentHeight:100});
}}), new UIComponentDescriptor({type:SWFLoader, id:"idLevel", propertiesFactory:function ():Object{
return ({x:0, y:0, autoLoad:true, percentWidth:100, percentHeight:100});
}}), new UIComponentDescriptor({type:Canvas, id:"idObstaclesLayer", propertiesFactory:function ():Object{
return ({mouseChildren:true, creationPolicy:"all", x:0, y:0, percentWidth:100, percentHeight:100, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 320;
this.height = 320;
}
public function RemoveTumbleweed():void{
if (((mTumbleweed) && (mTumbleweed.parent))){
GameUtils.GetGameCore().GetMainForm().idSandbox.removeChild(mTumbleweed);
};
}
public function IsSniperMode():Boolean{
return (mSniperMode);
}
public function GetWarehouse():Warehouse{
var _local1:Warehouse;
for each (_local1 in mWarehouses) {
if ((((_local1 is Arrow3Building)) && (((_local1 as Arrow3Building).GetArrowCount() > 0)))){
return (_local1);
};
};
for each (_local1 in mWarehouses) {
if ((((_local1 is Arrow2Building)) && (((_local1 as Arrow2Building).GetArrowCount() > 0)))){
return (_local1);
};
};
for each (_local1 in mWarehouses) {
if ((((_local1 is Arrow1Building)) && (((_local1 as Arrow1Building).GetArrowCount() > 0)))){
return (_local1);
};
};
return (null);
}
public function GetLevelSettings():LevelSettings{
return (mLevelSettings);
}
public function SetBerserkMode(_arg1:Boolean):void{
mBerserkMode = _arg1;
if (((mCurrentSelection) && (_arg1))){
mCurrentSelection.SetBerserkMode(_arg1);
};
}
public function get idBackground():Image{
return (this._2023545001idBackground);
}
private function OnInitObstacles(_arg1:Event):void{
var _local2:int;
var _local3:ArrayCollection;
var _local4:int;
var _local5:Container;
var _local6:Point;
var _local7:Point;
var _local8:Point;
_local2 = (mWaypoints.children().length() - 1);
this.idObstaclesLayer.removeAllChildren();
GameUtils.GetGameCore().GetLoadingQueue().addEventListener("obstacles", OnLevelComplete, false, 0, true);
_local3 = new ArrayCollection();
_local4 = 0;
while (_local4 < _local2) {
_local5 = new Container();
_local6 = new Point(Number((mWaypoints.child("Point")[_local4] as XML).attribute("x")), Number((mWaypoints.child("Point")[_local4] as XML).attribute("y")));
_local7 = new Point(Number((mWaypoints.child("Point")[(_local4 + 1)] as XML).attribute("x")), Number((mWaypoints.child("Point")[(_local4 + 1)] as XML).attribute("y")));
_local8 = _local7.subtract(_local6);
_local5.x = ((_local8.x < 0)) ? (_local7.x - (GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth / 2)) : (_local6.x - (GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth / 2));
_local5.width = (Math.abs(_local8.x) + GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth);
_local5.y = ((_local8.y < 0)) ? (_local7.y - (GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth / 2)) : (_local6.y - (GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth / 2));
_local5.height = (Math.abs(_local8.y) + GameUtils.GetGameCore().GetCurrentLevelSettings().RoadWidth);
_local5.setStyle("backgroundColor", 0xFF0000);
_local5.setStyle("backgroundAlpha", 0);
GameUtils.GetGameCore().GetLoadingQueue().AddObject("obstacles", _local5);
_local5.addEventListener(FlexEvent.UPDATE_COMPLETE, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false, 0, true);
_local5.initialize();
_local3.addItem(_local5);
_local4++;
};
for each (_local5 in _local3) {
this.idObstaclesLayer.addChild(_local5);
};
_local3.removeAll();
mTumbleweedInterval = setInterval(CreateTumbleweed, (12000 + (Math.random() * 3000)));
}
public function ZSort():void{
var _local1:Array;
var _local2:int;
_local1 = this.idObstaclesLayer.getChildren();
_local1.sortOn("name", Array.NUMERIC);
_local2 = 0;
while (_local2 < _local1.length) {
this.idObstaclesLayer.setChildIndex(_local1[_local2], _local2);
_local2++;
};
}
private function OnLevelComplete(_arg1:Event):void{
GameUtils.GetGameCore().GetLoadingQueue().removeEventListener("obstacles", OnLevelComplete);
this.dispatchEvent(new Event("LevelInitComplete"));
}
public function SetSniperMode(_arg1:Boolean):void{
mSniperMode = _arg1;
if (((mCurrentSelection) && (_arg1))){
mCurrentSelection.SetSniperMode(_arg1);
};
}
public function Init(_arg1:String):void{
var _local2:Tower;
if (mTumbleweed){
clearInterval(mTumbleweedInterval);
if (mTumbleweed.parent){
GameUtils.GetGameCore().GetMainForm().idSandbox.removeChild(mTumbleweed);
};
};
if (((mTowers) && ((mTowers.length > 0)))){
for each (_local2 in mTowers) {
this.idObstaclesLayer.removeChild(_local2);
};
mTowers.removeAll();
mTowers = new ArrayCollection();
};
ResourceManager.GetURLLoader(_arg1, ParseWaypoints);
}
public function set idBackground(_arg1:Image):void{
var _local2:Object;
_local2 = this._2023545001idBackground;
if (_local2 !== _arg1){
this._2023545001idBackground = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBackground", _local2, _arg1));
};
}
public function Restart():void{
var _local1:Tower;
var _local2:Warehouse;
if (((mTowers) && ((mTowers.length > 0)))){
for each (_local1 in mTowers) {
this.idObstaclesLayer.removeChild(_local1);
};
mTowers.removeAll();
mTowers = new ArrayCollection();
};
if (mWarehouses){
for each (_local2 in mWarehouses) {
if (_local2.parent){
this.idObstaclesLayer.removeChild(_local2);
};
};
mWarehouses.removeAll();
mWarehouses = new ArrayCollection();
};
}
public function get idObstaclesLayer():Canvas{
return (this._313864728idObstaclesLayer);
}
public function GetWaypoints():XML{
return (mWaypoints);
}
private function OnInitForeground(_arg1:Event):void{
var _local2:Loader;
_local2 = ResourceManager.GetLoader(mLevelData.attribute("image"), OnInitObstacles);
this.idLevel.addChild(_local2);
}
public function set idLevel(_arg1:SWFLoader):void{
var _local2:Object;
_local2 = this._1634834217idLevel;
if (_local2 !== _arg1){
this._1634834217idLevel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idLevel", _local2, _arg1));
};
}
public function Process():void{
var _local1:ArrayCollection;
var _local2:Tower;
_local1 = new ArrayCollection();
for each (_local2 in mTowers) {
if (_local2.LockOnTarget()){
_local1.addItem(_local2);
};
};
for each (_local2 in _local1) {
_local2.FireAtWill();
};
_local1.removeAll();
}
public function SelectNone(_arg1:Event=null):void{
GameUtils.GetGameCore().GetMainForm().idChooseTarget.visible = false;
if (mCurrentSelection){
SetSniperMode(false);
SetBerserkMode(false);
mCurrentSelection.SetSelection(false);
mCurrentSelection = null;
};
}
public function IsBerserkMode():Boolean{
return (mBerserkMode);
}
public function CreateTumbleweed():void{
if (((mTumbleweed) && (mTumbleweed.mToLeftMove.isPlaying))){
return;
};
RemoveTumbleweed();
if (!GameUtils.GetGameCore().IsReady()){
return;
};
mTumbleweed = new Tumbleweed();
GameUtils.GetGameCore().GetMainForm().idSandbox.addChild(mTumbleweed);
mTumbleweed.initialize();
mTumbleweed.Init();
}
public function ResetMusic():void{
if (mMusic){
mMusic.Stop();
};
mMusic = ResourceManager.GetSound(mLevelData.attribute("music"));
mMusic.Play();
}
public function AddTower(_arg1:int, _arg2:int):void{
var _local3:Tower;
_local3 = new Tower();
_local3.initialize();
_local3.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteXmlName);
_local3.setStyle("creationCompleteEffect", _local3.mAppear);
this.idObstaclesLayer.addChild(_local3);
_local3.x = (_arg1 - (_local3.width / 2));
_local3.y = (_arg2 - (_local3.height / 2));
_local3.InitBasePosition();
_local3.SetEnabled(true);
_local3.name = String(_arg2);
if (!mTowers){
mTowers = new ArrayCollection();
};
_local3.addEventListener(MouseEvent.CLICK, OnTowerClick, false, 0, true);
mTowers.addItem(_local3);
ZSort();
}
public function CheckTower(_arg1:Tower):void{
if (mCurrentSelection){
SetSniperMode(false);
SetBerserkMode(false);
mCurrentSelection.SetSelection(false);
};
GameUtils.GetGameCore().GetMainForm().idChoosePlace.visible = false;
GameUtils.GetGameCore().GetMainForm().idChooseTarget.visible = true;
mCurrentSelection = _arg1;
mCurrentSelection.SetSelection(true);
mBerserkMode = _arg1.IsBerserkMode();
mSniperMode = _arg1.IsSniperMode();
}
public function get idLevel():SWFLoader{
return (this._1634834217idLevel);
}
private function ParseWaypoints(_arg1:Event):void{
var _local2:Loader;
mLevelData = new XML(_arg1.target.data);
mWaypoints = mLevelData.child("Waypoints")[0];
if (this.idLevel.numChildren > 0){
this.idLevel.removeChildAt(0);
};
if (!mLevelSettings){
mLevelSettings = new LevelSettings();
};
mLevelSettings.Init(mLevelData);
_local2 = ResourceManager.GetLoader(mLevelData.attribute("back"), OnInitForeground);
this.idBackground.addChild(_local2);
}
public function AddWarehouse(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Warehouse;
switch (_arg1){
case 1:
_local4 = new Arrow1Building();
break;
case 2:
_local4 = new Arrow2Building();
break;
case 3:
_local4 = new Arrow3Building();
break;
default:
return;
};
_local4.initialize();
_local4.Init("", "");
_local4.SetDestroyable(true);
this.idObstaclesLayer.addChild(_local4);
_local4.x = (_arg2 - (_local4.width / 2));
_local4.y = (_arg3 - (_local4.height / 2));
_local4.name = String(_arg3);
if (!mWarehouses){
mWarehouses = new ArrayCollection();
};
mWarehouses.addItem(_local4);
ZSort();
}
public function OnTowerClick(_arg1:MouseEvent):void{
if (((GameUtils.GetGameCore().GetMainForm().IsBuilding()) || (!(GameUtils.GetGameCore().IsReady())))){
return;
};
CheckTower((_arg1.currentTarget as Tower));
}
public function GetCurrentTower():Tower{
return (mCurrentSelection);
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function set idObstaclesLayer(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._313864728idObstaclesLayer;
if (_local2 !== _arg1){
this._313864728idObstaclesLayer = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idObstaclesLayer", _local2, _arg1));
};
}
}
}//package game.components
Section 13
//MainForm (game.components.MainForm)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import game.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import game.mochi.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class MainForm extends Canvas {
private var _49421048_Canvas12:Canvas;
public var _bindingsByDestination:Object;
private var _450243099idCongratsText:Label;
private var _681920766_Label3:Label;
private var _617009163idDemoTower:Tower;
private var _335292747_Label11:Label;
private var _911331098idButtonUpgrade5:CorovanButton;
private var _692198003idRadius:ActionRadius;
private var _1561249981idChooseTarget:Label;
private var _49421049_Canvas13:Canvas;
private var _424985260idBulletLayer:Canvas;
private var _1841537365idTowersAvailableCount:Label;
private var _1608742752idCongratsButton:Label;
private var _49421079_Canvas22:Canvas;
private var _335292746_Label12:Label;
public var _bindingsBeginWithWord:Object;
private var _49421050_Canvas14:Canvas;
private var _embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950:Class;
private var _585240426idBuilderArrow3:Arrow3Building;
private var _884973192idKilled:Label;
private var _1958851107idCounterPanel:Canvas;
private var _887274385idSoheiLink:Label;
private var _911331102idButtonUpgrade1:CorovanButton;
private var _589796586idMiscLayer:Canvas;
private var mCurrentBuilding:UIComponent;
private var _681920765_Label2:Label;
private var _794943255idBuilderTower:Canvas;
private var _335292744_Label14:Label;
private var _1606016896idNextButton:Canvas;
private var _721185280idBuilder:Canvas;
private var _bindings:Array;
private var _1636047973idMoney:Label;
private var _49421052_Canvas16:Canvas;
private var _1642332906idTimer:GameTimer;
private var _585240425idBuilderArrow2:Arrow2Building;
private var _1596119642idReadyDisplay:Canvas;
private var _913270060idSandbox:Canvas;
private var mBuildingNow:Boolean;
private var _799063068idBuilderPanel:Canvas;
private var _647743677idAttackers:Label;
private var _911331101idButtonUpgrade2:CorovanButton;
private var mCurrentLevelName:String;
private var _681920767_Label4:Label;
private var _181328633idButtonCancel:CorovanButton;
private var _49421046_Canvas10:Canvas;
private var mCurrentLevelId:int;
private var _1641232951idScore:Score;
public var mGameCore:GameCore;
private var _799193122idBuildingsList:Canvas;
public var mAvailableTowers:int;
private var _585240424idBuilderArrow1:Arrow1Building;
private var _911331099idButtonUpgrade4:CorovanButton;
private var _49421047_Canvas11:Canvas;
private var _814327767idGameLevel:Level;
private var _911331100idButtonUpgrade3:CorovanButton;
private var _1403162087idStartButton:Canvas;
private var _watchers:Array;
private var _335292748_Label10:Label;
private var _1799548502idCrioLink:Label;
private var _1642521262idTower:Tower;
private var _1065273663idCompleteText:Label;
private var _1560277890idLevelComplete:Canvas;
private var _746482411idChoosePlace:Label;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function MainForm(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({height:340, width:440, childDescriptors:[new UIComponentDescriptor({type:Image, propertiesFactory:function ():Object{
return ({x:0, y:0, width:440, height:340, source:_embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950});
}}), new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:320, height:320, x:10, y:10, childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"idMiscLayer", propertiesFactory:function ():Object{
return ({percentWidth:100, percentHeight:100, x:0, y:-1, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Level, id:"idGameLevel", propertiesFactory:function ():Object{
return ({x:0, y:0});
}}), new UIComponentDescriptor({type:Canvas, id:"idSandbox", propertiesFactory:function ():Object{
return ({percentWidth:100, percentHeight:100, x:0, y:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:Canvas, id:"idBulletLayer", propertiesFactory:function ():Object{
return ({percentWidth:100, percentHeight:100, x:0, y:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:ActionRadius, id:"idRadius", propertiesFactory:function ():Object{
return ({x:0, y:0});
}}), new UIComponentDescriptor({type:Canvas, id:"idBuilder", propertiesFactory:function ():Object{
return ({creationPolicy:"all", horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"idBuilderTower", propertiesFactory:function ():Object{
return ({x:0, y:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Tower, id:"idTower", stylesFactory:function ():void{
this.verticalCenter = 0;
this.horizontalCenter = 0;
}, propertiesFactory:function ():Object{
return ({horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}})]});
}}), new UIComponentDescriptor({type:Arrow1Building, id:"idBuilderArrow1", stylesFactory:function ():void{
this.backgroundColor = 1044480;
}, propertiesFactory:function ():Object{
return ({visible:false, x:0, y:0, alpha:0.3, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:Arrow2Building, id:"idBuilderArrow2", stylesFactory:function ():void{
this.backgroundColor = 1044480;
}, propertiesFactory:function ():Object{
return ({visible:false, x:0, y:0, alpha:0.3, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:Arrow3Building, id:"idBuilderArrow3", stylesFactory:function ():void{
this.backgroundColor = 1044480;
}, propertiesFactory:function ():Object{
return ({visible:false, x:0, y:0, alpha:0.3, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}})]});
}})]});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"idLevelComplete", events:{show:"__idLevelComplete_show"}, stylesFactory:function ():void{
this.backgroundAlpha = 0.69;
}, propertiesFactory:function ():Object{
return ({visible:false, x:10, y:10, width:320, height:320, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idCompleteText", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.fontWeight = "bold";
this.fontSize = 15;
}, propertiesFactory:function ():Object{
return ({y:90, text:"Level complete!"});
}}), new UIComponentDescriptor({type:Label, id:"_Label2", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 15;
}, propertiesFactory:function ():Object{
return ({x:10, y:157, text:"Earned:"});
}}), new UIComponentDescriptor({type:Label, id:"_Label3", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 15;
}, propertiesFactory:function ():Object{
return ({x:10, y:189, text:"Killed:"});
}}), new UIComponentDescriptor({type:Label, id:"_Label4", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 15;
}, propertiesFactory:function ():Object{
return ({x:10, y:221, text:"Attackers:"});
}}), new UIComponentDescriptor({type:HBox, stylesFactory:function ():void{
this.horizontalAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:129, y:160, width:181, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idMoney", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 12;
this.textAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:0, y:0, text:"0"});
}})]});
}}), new UIComponentDescriptor({type:HBox, stylesFactory:function ():void{
this.horizontalAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:129, y:192, width:181, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idKilled", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 12;
this.textAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:0, y:0, text:"0"});
}})]});
}}), new UIComponentDescriptor({type:HBox, stylesFactory:function ():void{
this.horizontalAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:129, y:224, width:181, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idAttackers", stylesFactory:function ():void{
this.fontWeight = "bold";
this.fontSize = 12;
this.textAlign = "right";
}, propertiesFactory:function ():Object{
return ({x:0, y:0, text:"0"});
}})]});
}}), new UIComponentDescriptor({type:Label, id:"idCongratsText", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.fontWeight = "bold";
this.fontSize = 24;
}, propertiesFactory:function ():Object{
return ({y:38, text:"CONGRATULATIONS!"});
}}), new UIComponentDescriptor({type:Canvas, id:"idNextButton", stylesFactory:function ():void{
this.backgroundAlpha = 0.5;
this.borderStyle = "solid";
this.cornerRadius = 5;
this.horizontalCenter = 0;
}, propertiesFactory:function ():Object{
return ({y:0xFF, width:90, height:24, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idCongratsButton", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.verticalCenter = 0;
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({text:"Next"});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas10", events:{click:"___Canvas10_click"}, stylesFactory:function ():void{
this.borderStyle = "solid";
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100, buttonMode:true, useHandCursor:true});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas11", stylesFactory:function ():void{
this.backgroundAlpha = 0.5;
this.borderStyle = "solid";
this.cornerRadius = 5;
this.horizontalCenter = 55;
}, propertiesFactory:function ():Object{
return ({y:285, width:100, height:24, childDescriptors:[new UIComponentDescriptor({type:Label, id:"_Label10", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.verticalCenter = 0;
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({text:"Show highscore"});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas12", events:{click:"___Canvas12_click"}, stylesFactory:function ():void{
this.borderStyle = "solid";
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100, buttonMode:true, useHandCursor:true});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas13", stylesFactory:function ():void{
this.backgroundAlpha = 0.5;
this.borderStyle = "solid";
this.cornerRadius = 5;
this.horizontalCenter = -55;
}, propertiesFactory:function ():Object{
return ({y:285, width:100, height:24, childDescriptors:[new UIComponentDescriptor({type:Label, id:"_Label11", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.verticalCenter = 0;
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({text:"Send my score!"});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas14", events:{click:"___Canvas14_click"}, stylesFactory:function ():void{
this.borderStyle = "solid";
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100, buttonMode:true, useHandCursor:true});
}})]});
}})]});
}}), new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({x:330, y:9, width:110, height:331, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"_Canvas16", stylesFactory:function ():void{
this.borderStyle = "solid";
this.backgroundAlpha = 0.5;
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:6, y:55, width:100, height:30, childDescriptors:[new UIComponentDescriptor({type:Score, id:"idScore", stylesFactory:function ():void{
this.horizontalCenter = 0;
this.verticalCenter = 0;
}, propertiesFactory:function ():Object{
return ({width:90});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"idReadyDisplay", stylesFactory:function ():void{
this.backgroundAlpha = 0.5;
this.cornerRadius = 5;
this.borderStyle = "solid";
}, propertiesFactory:function ():Object{
return ({x:6, y:91, width:100, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:GameTimer, id:"idTimer", propertiesFactory:function ():Object{
return ({y:20, x:0, width:105});
}}), new UIComponentDescriptor({type:Label, id:"_Label12", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:10, y:1, text:"Start in:"});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"idCounterPanel", stylesFactory:function ():void{
this.cornerRadius = 5;
this.borderStyle = "solid";
this.backgroundAlpha = 0.5;
}, propertiesFactory:function ():Object{
return ({visible:true, x:6, y:151, width:100, height:105, childDescriptors:[new UIComponentDescriptor({type:Tower, id:"idDemoTower", stylesFactory:function ():void{
this.horizontalCenter = 0;
}, propertiesFactory:function ():Object{
return ({y:10});
}}), new UIComponentDescriptor({type:Label, id:"idTowersAvailableCount", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:39.5, y:82, text:"x1"});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"idBuilderPanel", stylesFactory:function ():void{
this.cornerRadius = 5;
this.borderStyle = "solid";
this.backgroundAlpha = 0.5;
}, propertiesFactory:function ():Object{
return ({visible:false, x:6, y:151, width:100, height:105, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:CorovanButton, id:"idButtonCancel", events:{toolTipCreate:"__idButtonCancel_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:2, y:3, visible:false, name:"777", toolTip:" "});
}}), new UIComponentDescriptor({type:Canvas, id:"idBuildingsList", propertiesFactory:function ():Object{
return ({x:1, y:1, width:100, height:64, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:CorovanButton, id:"idButtonUpgrade1", events:{toolTipCreate:"__idButtonUpgrade1_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:0, y:0, name:"1", toolTip:" "});
}}), new UIComponentDescriptor({type:CorovanButton, id:"idButtonUpgrade2", events:{toolTipCreate:"__idButtonUpgrade2_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:32, y:0, name:"2", toolTip:" "});
}}), new UIComponentDescriptor({type:CorovanButton, id:"idButtonUpgrade3", events:{toolTipCreate:"__idButtonUpgrade3_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:64, y:0, name:"3", toolTip:" "});
}}), new UIComponentDescriptor({type:CorovanButton, id:"idButtonUpgrade4", events:{toolTipCreate:"__idButtonUpgrade4_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:32, y:32, name:"4", toolTip:" "});
}}), new UIComponentDescriptor({type:CorovanButton, id:"idButtonUpgrade5", events:{toolTipCreate:"__idButtonUpgrade5_toolTipCreate"}, propertiesFactory:function ():Object{
return ({x:64, y:32, name:"5", toolTip:" "});
}})]});
}})]});
}}), new UIComponentDescriptor({type:Canvas, id:"idStartButton", stylesFactory:function ():void{
this.backgroundAlpha = 0.5;
this.borderStyle = "solid";
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:10, y:263, width:90, height:24, childDescriptors:[new UIComponentDescriptor({type:Label, id:"_Label14", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:27.5, y:2, text:"Again"});
}}), new UIComponentDescriptor({type:Canvas, id:"_Canvas22", events:{click:"___Canvas22_click"}, stylesFactory:function ():void{
this.borderStyle = "solid";
this.cornerRadius = 5;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100, buttonMode:true, useHandCursor:true});
}})]});
}}), new UIComponentDescriptor({type:Label, propertiesFactory:function ():Object{
return ({x:14, y:292, text:"Copyright 2008"});
}}), new UIComponentDescriptor({type:Label, id:"idCrioLink", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:25, y:306, htmlText:"<u>Crio</u>"});
}}), new UIComponentDescriptor({type:Canvas, events:{click:"___Canvas23_click"}, propertiesFactory:function ():Object{
return ({x:25, y:306, useHandCursor:true, buttonMode:true, width:27, height:15});
}}), new UIComponentDescriptor({type:Label, stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:48, y:306, text:","});
}}), new UIComponentDescriptor({type:Label, id:"idSoheiLink", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:54, y:306, htmlText:"<u>Sohei</u>"});
}}), new UIComponentDescriptor({type:Canvas, events:{click:"___Canvas24_click"}, propertiesFactory:function ():Object{
return ({x:54, y:306, useHandCursor:true, buttonMode:true, width:34, height:15});
}}), new UIComponentDescriptor({type:Label, stylesFactory:function ():void{
this.fontSize = 7;
}, propertiesFactory:function ():Object{
return ({x:89, y:318, text:"1.5", width:20, height:13});
}}), new UIComponentDescriptor({type:Label, id:"idChooseTarget", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({visible:false, x:11, y:90, text:"Choose target"});
}}), new UIComponentDescriptor({type:Label, id:"idChoosePlace", stylesFactory:function ():void{
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({visible:false, x:11, y:90, text:"Choose place"});
}})]});
}})]});
}});
_embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950 = MainForm__embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950;
super();
mx_internal::_document = this;
this.height = 340;
this.width = 440;
this.horizontalScrollPolicy = "off";
this.verticalScrollPolicy = "off";
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
public function get idDemoTower():Tower{
return (this._617009163idDemoTower);
}
public function set idDemoTower(_arg1:Tower):void{
var _local2:Object;
_local2 = this._617009163idDemoTower;
if (_local2 !== _arg1){
this._617009163idDemoTower = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idDemoTower", _local2, _arg1));
};
}
public function ___Canvas14_click(_arg1:MouseEvent):void{
OnSendHighscore();
}
public function get idBuildingsList():Canvas{
return (this._799193122idBuildingsList);
}
public function NextLevel():void{
mCurrentLevelId = ((mCurrentLevelId + 1) % mGameCore.GetGameSettings().GetLevelList().length);
mCurrentLevelName = mGameCore.GetGameSettings().GetLevel(mCurrentLevelId).attribute("levelPath")[0];
this.idLevelComplete.visible = false;
this.idBuilderTower.visible = true;
this.idRadius.visible = true;
this.idReadyDisplay.visible = true;
this.idGameLevel.Restart();
PostInit();
}
public function set idBuildingsList(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._799193122idBuildingsList;
if (_local2 !== _arg1){
this._799193122idBuildingsList = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuildingsList", _local2, _arg1));
};
}
private function OnPrecacheFinished(_arg1:Event):void{
GameUtils.GetGameCore().GetLoadingQueue().removeEventListener("precache", OnPrecacheFinished, false);
LevelLoaded();
GameUtils.ShowAlert(GameUtils.GetGameCore().GetCurrentLevelSettings().BriefingText, GameUtils.GetGameCore().GetCurrentLevelSettings().BriefingTitle, 4, null, ShowBriefing);
}
public function get idCongratsButton():Label{
return (this._1608742752idCongratsButton);
}
public function __idButtonUpgrade4_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("\"Berserk\" mode", (("Selected tower will shoot 4 times <br>faster. <br>Cost: <b>" + mGameCore.GetCurrentLevelSettings().berserkCost) + "</b>"), _arg1);
}
public function set idMoney(_arg1:Label):void{
var _local2:Object;
_local2 = this._1636047973idMoney;
if (_local2 !== _arg1){
this._1636047973idMoney = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idMoney", _local2, _arg1));
};
}
public function set idSoheiLink(_arg1:Label):void{
var _local2:Object;
_local2 = this._887274385idSoheiLink;
if (_local2 !== _arg1){
this._887274385idSoheiLink = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idSoheiLink", _local2, _arg1));
};
}
public function get idButtonUpgrade2():CorovanButton{
return (this._911331101idButtonUpgrade2);
}
public function get idButtonUpgrade5():CorovanButton{
return (this._911331098idButtonUpgrade5);
}
public function get idBuilderTower():Canvas{
return (this._794943255idBuilderTower);
}
public function get idButtonUpgrade4():CorovanButton{
return (this._911331099idButtonUpgrade4);
}
public function get idButtonUpgrade1():CorovanButton{
return (this._911331102idButtonUpgrade1);
}
public function get idButtonUpgrade3():CorovanButton{
return (this._911331100idButtonUpgrade3);
}
public function get _Label4():Label{
return (this._681920767_Label4);
}
public function HideBuildings():void{
if (mCurrentBuilding){
mCurrentBuilding.visible = false;
};
this.idBuildingsList.visible = true;
this.idButtonCancel.visible = false;
idChoosePlace.visible = false;
mBuildingNow = false;
this.idBuilder.visible = false;
this.idRadius.visible = false;
}
public function get _Label2():Label{
return (this._681920765_Label2);
}
public function get _Label3():Label{
return (this._681920766_Label3);
}
private function _MainForm_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsBkg);
}, function (_arg1:uint):void{
idLevelComplete.setStyle("backgroundColor", _arg1);
}, "idLevelComplete.backgroundColor");
_bindings[0] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
idCompleteText.setStyle("color", _arg1);
}, "idCompleteText.color");
_bindings[1] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
_Label2.setStyle("color", _arg1);
}, "_Label2.color");
_bindings[2] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
_Label3.setStyle("color", _arg1);
}, "_Label3.color");
_bindings[3] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
_Label4.setStyle("color", _arg1);
}, "_Label4.color");
_bindings[4] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
idMoney.setStyle("color", _arg1);
}, "idMoney.color");
_bindings[5] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
idKilled.setStyle("color", _arg1);
}, "idKilled.color");
_bindings[6] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
idAttackers.setStyle("color", _arg1);
}, "idAttackers.color");
_bindings[7] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
}, function (_arg1:uint):void{
idCongratsText.setStyle("color", _arg1);
}, "idCongratsText.color");
_bindings[8] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
idNextButton.setStyle("backgroundColor", _arg1);
}, "idNextButton.backgroundColor");
_bindings[9] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
idNextButton.setStyle("borderColor", _arg1);
}, "idNextButton.borderColor");
_bindings[10] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
idCongratsButton.setStyle("color", _arg1);
}, "idCongratsButton.color");
_bindings[11] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
}, function (_arg1:uint):void{
_Canvas10.setStyle("borderColor", _arg1);
}, "_Canvas10.borderColor");
_bindings[12] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
_Canvas11.setStyle("backgroundColor", _arg1);
}, "_Canvas11.backgroundColor");
_bindings[13] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
_Canvas11.setStyle("borderColor", _arg1);
}, "_Canvas11.borderColor");
_bindings[14] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
_Label10.setStyle("color", _arg1);
}, "_Label10.color");
_bindings[15] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
}, function (_arg1:uint):void{
_Canvas12.setStyle("borderColor", _arg1);
}, "_Canvas12.borderColor");
_bindings[16] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
_Canvas13.setStyle("backgroundColor", _arg1);
}, "_Canvas13.backgroundColor");
_bindings[17] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
_Canvas13.setStyle("borderColor", _arg1);
}, "_Canvas13.borderColor");
_bindings[18] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
_Label11.setStyle("color", _arg1);
}, "_Label11.color");
_bindings[19] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
}, function (_arg1:uint):void{
_Canvas14.setStyle("borderColor", _arg1);
}, "_Canvas14.borderColor");
_bindings[20] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
_Canvas16.setStyle("backgroundColor", _arg1);
}, "_Canvas16.backgroundColor");
_bindings[21] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
_Canvas16.setStyle("borderColor", _arg1);
}, "_Canvas16.borderColor");
_bindings[22] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
idReadyDisplay.setStyle("backgroundColor", _arg1);
}, "idReadyDisplay.backgroundColor");
_bindings[23] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
idReadyDisplay.setStyle("borderColor", _arg1);
}, "idReadyDisplay.borderColor");
_bindings[24] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
_Label12.setStyle("color", _arg1);
}, "_Label12.color");
_bindings[25] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
idCounterPanel.setStyle("backgroundColor", _arg1);
}, "idCounterPanel.backgroundColor");
_bindings[26] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
idCounterPanel.setStyle("borderColor", _arg1);
}, "idCounterPanel.borderColor");
_bindings[27] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
idTowersAvailableCount.setStyle("color", _arg1);
}, "idTowersAvailableCount.color");
_bindings[28] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
idBuilderPanel.setStyle("backgroundColor", _arg1);
}, "idBuilderPanel.backgroundColor");
_bindings[29] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
idBuilderPanel.setStyle("borderColor", _arg1);
}, "idBuilderPanel.borderColor");
_bindings[30] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg);
}, function (_arg1:uint):void{
idStartButton.setStyle("backgroundColor", _arg1);
}, "idStartButton.backgroundColor");
_bindings[31] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
}, function (_arg1:uint):void{
idStartButton.setStyle("borderColor", _arg1);
}, "idStartButton.borderColor");
_bindings[32] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
}, function (_arg1:uint):void{
_Label14.setStyle("color", _arg1);
}, "_Label14.color");
_bindings[33] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
}, function (_arg1:uint):void{
_Canvas22.setStyle("borderColor", _arg1);
}, "_Canvas22.borderColor");
_bindings[34] = binding;
}
public function UpdateStats():void{
this.idAttackers.text = String(this.idScore.GetUsed());
this.idMoney.text = String(this.idScore.GetScore());
this.idKilled.text = String(this.idScore.GetKills());
}
public function set idCongratsButton(_arg1:Label):void{
var _local2:Object;
_local2 = this._1608742752idCongratsButton;
if (_local2 !== _arg1){
this._1608742752idCongratsButton = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCongratsButton", _local2, _arg1));
};
}
private function _MainForm_bindingExprs():void{
var _local1:*;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBkg;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIButtonBorder;
}
public function OnScoreChange():void{
this.idButtonUpgrade1.SetEnabled((((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().arrow1Cost)) && (mGameCore.IsReady())));
this.idButtonUpgrade2.SetEnabled((((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().arrow2Cost)) && (mGameCore.IsReady())));
this.idButtonUpgrade3.SetEnabled((((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().arrow3Cost)) && (mGameCore.IsReady())));
this.idButtonUpgrade4.SetEnabled((((((((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().berserkCost)) && (mGameCore.IsReady()))) && (this.idGameLevel.GetCurrentTower()))) && (!(this.idGameLevel.IsBerserkMode()))));
this.idButtonUpgrade5.SetEnabled((((((((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().sniperCost)) && (mGameCore.IsReady()))) && (this.idGameLevel.GetCurrentTower()))) && (!(this.idGameLevel.IsSniperMode()))));
}
public function __idButtonCancel_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("Отмена", "Отменить постройку", _arg1);
}
public function get idKilled():Label{
return (this._884973192idKilled);
}
public function ___Canvas23_click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.dtf.ru/person/info.php?id=835"), "_blank");
}
public function ___Canvas12_click(_arg1:MouseEvent):void{
OnShowHighscore();
}
public function set idButtonUpgrade2(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._911331101idButtonUpgrade2;
if (_local2 !== _arg1){
this._911331101idButtonUpgrade2 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonUpgrade2", _local2, _arg1));
};
}
public function set idButtonUpgrade3(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._911331100idButtonUpgrade3;
if (_local2 !== _arg1){
this._911331100idButtonUpgrade3 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonUpgrade3", _local2, _arg1));
};
}
public function set idBuilderTower(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._794943255idBuilderTower;
if (_local2 !== _arg1){
this._794943255idBuilderTower = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilderTower", _local2, _arg1));
};
}
public function set idMiscLayer(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._589796586idMiscLayer;
if (_local2 !== _arg1){
this._589796586idMiscLayer = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idMiscLayer", _local2, _arg1));
};
}
public function set idButtonUpgrade4(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._911331099idButtonUpgrade4;
if (_local2 !== _arg1){
this._911331099idButtonUpgrade4 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonUpgrade4", _local2, _arg1));
};
}
public function set idButtonUpgrade1(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._911331102idButtonUpgrade1;
if (_local2 !== _arg1){
this._911331102idButtonUpgrade1 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonUpgrade1", _local2, _arg1));
};
}
public function get idCrioLink():Label{
return (this._1799548502idCrioLink);
}
public function set idButtonUpgrade5(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._911331098idButtonUpgrade5;
if (_local2 !== _arg1){
this._911331098idButtonUpgrade5 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonUpgrade5", _local2, _arg1));
};
}
public function set _Label4(_arg1:Label):void{
var _local2:Object;
_local2 = this._681920767_Label4;
if (_local2 !== _arg1){
this._681920767_Label4 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label4", _local2, _arg1));
};
}
public function set _Label2(_arg1:Label):void{
var _local2:Object;
_local2 = this._681920765_Label2;
if (_local2 !== _arg1){
this._681920765_Label2 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label2", _local2, _arg1));
};
}
public function __idButtonUpgrade1_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("Improved ammo", (((((("Makes x" + mGameCore.GetCurrentLevelSettings().arrow1Multiplier) + " damage.<br>Count: <b>") + mGameCore.GetCurrentLevelSettings().arrow1Count) + "</b>.<br>Cost: <b>") + mGameCore.GetCurrentLevelSettings().arrow1Cost) + "</b>"), _arg1);
}
public function set _Label3(_arg1:Label):void{
var _local2:Object;
_local2 = this._681920766_Label3;
if (_local2 !== _arg1){
this._681920766_Label3 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label3", _local2, _arg1));
};
}
public function set idButtonCancel(_arg1:CorovanButton):void{
var _local2:Object;
_local2 = this._181328633idButtonCancel;
if (_local2 !== _arg1){
this._181328633idButtonCancel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idButtonCancel", _local2, _arg1));
};
}
public function get idStartButton():Canvas{
return (this._1403162087idStartButton);
}
public function get idCongratsText():Label{
return (this._450243099idCongratsText);
}
public function get idCounterPanel():Canvas{
return (this._1958851107idCounterPanel);
}
public function set idChoosePlace(_arg1:Label):void{
var _local2:Object;
_local2 = this._746482411idChoosePlace;
if (_local2 !== _arg1){
this._746482411idChoosePlace = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idChoosePlace", _local2, _arg1));
};
}
private function PreInit():void{
this.visible = false;
mCurrentBuilding = null;
mGameCore = new GameCore(this);
mCurrentLevelId = -1;
mGameCore.addEventListener(Event.COMPLETE, PostInit, false, 0, true);
mGameCore.Init();
}
public function get idScore():Score{
return (this._1641232951idScore);
}
public function set idSandbox(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._913270060idSandbox;
if (_local2 !== _arg1){
this._913270060idSandbox = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idSandbox", _local2, _arg1));
};
}
public function get idReadyDisplay():Canvas{
return (this._1596119642idReadyDisplay);
}
public function set idBulletLayer(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._424985260idBulletLayer;
if (_local2 !== _arg1){
this._424985260idBulletLayer = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBulletLayer", _local2, _arg1));
};
}
public function get idTower():Tower{
return (this._1642521262idTower);
}
public function set idKilled(_arg1:Label):void{
var _local2:Object;
_local2 = this._884973192idKilled;
if (_local2 !== _arg1){
this._884973192idKilled = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idKilled", _local2, _arg1));
};
}
public function get idTimer():GameTimer{
return (this._1642332906idTimer);
}
public function get _Canvas10():Canvas{
return (this._49421046_Canvas10);
}
public function get _Canvas12():Canvas{
return (this._49421048_Canvas12);
}
public function get _Canvas13():Canvas{
return (this._49421049_Canvas13);
}
public function get _Canvas14():Canvas{
return (this._49421050_Canvas14);
}
public function get _Canvas16():Canvas{
return (this._49421052_Canvas16);
}
public function __idButtonUpgrade5_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("\"Sniper\" mode", (("Selected tower will shoot in the <br>mouse cursor direction.<br>Radius x1.5<br>Cost: <b>" + mGameCore.GetCurrentLevelSettings().sniperCost) + "</b>"), _arg1);
}
public function get _Canvas22():Canvas{
return (this._49421079_Canvas22);
}
public function set idRadius(_arg1:ActionRadius):void{
var _local2:Object;
_local2 = this._692198003idRadius;
if (_local2 !== _arg1){
this._692198003idRadius = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idRadius", _local2, _arg1));
};
}
public function get _Canvas11():Canvas{
return (this._49421047_Canvas11);
}
public function ___Canvas10_click(_arg1:MouseEvent):void{
this.visible = false;
setTimeout((CheckConditions()) ? this.NextLevel : this.Restart, 30);
}
private function OnMouseClick(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:int;
if (!mCurrentBuilding){
return;
};
if ((((mCurrentBuilding.id == "idBuilderTower")) && ((((mAvailableTowers < 1)) || (GameUtils.GetGameCore().IsReady()))))){
mBuildingNow = false;
};
if (mBuildingNow){
_local2 = CheckBuilderValidity();
if (!_local2){
return;
};
if (mCurrentBuilding.id == "idBuilderTower"){
this.idGameLevel.AddTower((stage.mouseX - 10), (stage.mouseY - 10));
mAvailableTowers--;
this.idGameLevel.SelectNone();
this.idTowersAvailableCount.text = ("x " + String(mAvailableTowers));
return;
};
_local3 = Number(mCurrentBuilding.id.split("idBuilderArrow")[1]);
switch (_local3){
case 1:
this.idScore.TakeAwayScore(GameUtils.GetGameCore().GetCurrentLevelSettings().arrow1Cost);
break;
case 2:
this.idScore.TakeAwayScore(GameUtils.GetGameCore().GetCurrentLevelSettings().arrow2Cost);
break;
case 3:
this.idScore.TakeAwayScore(GameUtils.GetGameCore().GetCurrentLevelSettings().arrow3Cost);
break;
default:
break;
};
this.idGameLevel.AddWarehouse(_local3, (stage.mouseX - 10), (stage.mouseY - 10));
HideBuildings();
};
}
public function set idCrioLink(_arg1:Label):void{
var _local2:Object;
_local2 = this._1799548502idCrioLink;
if (_local2 !== _arg1){
this._1799548502idCrioLink = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCrioLink", _local2, _arg1));
};
}
private function CorovanLoaded(_arg1:Event):void{
GameUtils.GetGameCore().GetCorovanManager().removeEventListener(Event.COMPLETE, CorovanLoaded, false);
this.idCounterPanel.visible = true;
this.idBuilderPanel.visible = false;
this.idBuilder.visible = true;
this.idRadius.visible = true;
mBuildingNow = true;
mCurrentBuilding = this.idBuilderTower;
mCurrentBuilding.visible = true;
this.visible = true;
}
private function ShowBriefing(_arg1:Event=null):void{
_arg1.currentTarget.removeEventListener(CloseEvent.CLOSE, ShowBriefing, false);
this.idTimer.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().StartTimeout, BeginGame);
}
public function get idLevelComplete():Canvas{
return (this._1560277890idLevelComplete);
}
override public function initialize():void{
var target:MainForm;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_MainForm_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_MainFormWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
private function OnSendHighscore():void{
MochiScores.showLeaderboard({boardID:GameUtils.GetGameCore().GetCurrentLevelSettings().BoardId, score:this.idScore.GetScore()});
}
public function get idBuilderPanel():Canvas{
return (this._799063068idBuilderPanel);
}
private function OnShowHighscore():void{
MochiScores.showLeaderboard({boardID:GameUtils.GetGameCore().GetCurrentLevelSettings().BoardId});
}
public function set idBuilder(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._721185280idBuilder;
if (_local2 !== _arg1){
this._721185280idBuilder = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilder", _local2, _arg1));
};
}
private function BeginGame(_arg1:Event=null):void{
this.idBuilderTower.visible = false;
this.idRadius.visible = false;
this.idReadyDisplay.visible = false;
this.idCounterPanel.visible = false;
this.idBuilderPanel.visible = true;
this.idScore.SetUsed((GameUtils.GetGameCore().GetCurrentLevelSettings().TowerCount - mAvailableTowers));
mBuildingNow = false;
this.idGameLevel.SelectNone();
GameUtils.GetGameCore().SetReady(true);
}
public function set idStartButton(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1403162087idStartButton;
if (_local2 !== _arg1){
this._1403162087idStartButton = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idStartButton", _local2, _arg1));
};
}
public function set idCongratsText(_arg1:Label):void{
var _local2:Object;
_local2 = this._450243099idCongratsText;
if (_local2 !== _arg1){
this._450243099idCongratsText = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCongratsText", _local2, _arg1));
};
}
public function __idButtonUpgrade2_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("Battle ammo", (((((("Makes x" + mGameCore.GetCurrentLevelSettings().arrow2Multiplier) + " damage.<br>Count: <b>") + mGameCore.GetCurrentLevelSettings().arrow2Count) + "</b>.<br>Cost: <b>") + mGameCore.GetCurrentLevelSettings().arrow2Cost) + "</b>"), _arg1);
}
public function set idCounterPanel(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1958851107idCounterPanel;
if (_local2 !== _arg1){
this._1958851107idCounterPanel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCounterPanel", _local2, _arg1));
};
}
public function get idMoney():Label{
return (this._1636047973idMoney);
}
public function set idScore(_arg1:Score):void{
var _local2:Object;
_local2 = this._1641232951idScore;
if (_local2 !== _arg1){
this._1641232951idScore = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idScore", _local2, _arg1));
};
}
public function get idSoheiLink():Label{
return (this._887274385idSoheiLink);
}
private function LevelLoaded(_arg1:Event=null, _arg2:Boolean=true):void{
if (((_arg1) && (_arg1.currentTarget))){
_arg1.currentTarget.removeEventListener("LevelInitComplete", LevelLoaded, false);
};
mAvailableTowers = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerCount;
this.idTowersAvailableCount.text = ("x " + String(mAvailableTowers));
CheckBuilderValidity();
this.idScore.Init(null, null, true, OnScoreChange);
HideBuildings();
this.idButtonUpgrade1.SetEnabled(false);
this.idButtonUpgrade2.SetEnabled(false);
this.idButtonUpgrade3.SetEnabled(false);
this.idButtonUpgrade4.SetEnabled(false);
this.idButtonUpgrade5.SetEnabled(false);
if (GameUtils.GetGameCore().IsMusicEnabled()){
this.idGameLevel.ResetMusic();
};
if (_arg2){
this.idTower.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteXmlName);
this.idTower.InitBasePosition();
this.idDemoTower.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteXmlName);
this.idRadius.SetRadius(GameUtils.GetGameCore().GetCurrentLevelSettings().TowerRadius);
this.idBuilderArrow1.Init("", "");
this.idBuilderArrow2.Init("", "");
this.idBuilderArrow3.Init("", "");
this.idButtonUpgrade1.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBuyXmlName, OnButtonClick);
this.idButtonUpgrade2.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBuyXmlName, OnButtonClick);
this.idButtonUpgrade3.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBuyXmlName, OnButtonClick);
this.idButtonUpgrade4.Init("animations/buttons/button5.gif", "animations/buttons/button.xml", OnButtonClick);
this.idButtonUpgrade5.Init("animations/buttons/button6.gif", "animations/buttons/button.xml", OnButtonClick);
this.idButtonCancel.Init("animations/buttons/button4.gif", "animations/buttons/button.xml", OnButtonClick);
this.idButtonCancel.SetEnabled(true);
GameUtils.GetGameCore().GetCorovanManager().addEventListener(Event.COMPLETE, CorovanLoaded, false, 0, true);
GameUtils.GetGameCore().GetCorovanManager().Init(GameUtils.GetGameCore().GetCurrentLevelSettings().CamelCount, GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpeed, this.idGameLevel.GetWaypoints());
GameUtils.GetGameCore().Restart(true);
return;
};
this.idTimer.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().StartTimeout, BeginGame);
this.idCounterPanel.visible = true;
this.idBuilderPanel.visible = false;
this.idBuilder.visible = true;
this.idRadius.visible = true;
mBuildingNow = true;
mCurrentBuilding = this.idBuilderTower;
mCurrentBuilding.visible = true;
this.visible = true;
}
public function set idReadyDisplay(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1596119642idReadyDisplay;
if (_local2 !== _arg1){
this._1596119642idReadyDisplay = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idReadyDisplay", _local2, _arg1));
};
}
public function get idMiscLayer():Canvas{
return (this._589796586idMiscLayer);
}
public function ___Canvas24_click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.sohei.ru"), "_blank");
}
public function get idButtonCancel():CorovanButton{
return (this._181328633idButtonCancel);
}
public function get idChoosePlace():Label{
return (this._746482411idChoosePlace);
}
public function get idSandbox():Canvas{
return (this._913270060idSandbox);
}
public function get idBulletLayer():Canvas{
return (this._424985260idBulletLayer);
}
public function set idTowersAvailableCount(_arg1:Label):void{
var _local2:Object;
_local2 = this._1841537365idTowersAvailableCount;
if (_local2 !== _arg1){
this._1841537365idTowersAvailableCount = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idTowersAvailableCount", _local2, _arg1));
};
}
public function set idTower(_arg1:Tower):void{
var _local2:Object;
_local2 = this._1642521262idTower;
if (_local2 !== _arg1){
this._1642521262idTower = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idTower", _local2, _arg1));
};
}
public function set _Label11(_arg1:Label):void{
var _local2:Object;
_local2 = this._335292747_Label11;
if (_local2 !== _arg1){
this._335292747_Label11 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label11", _local2, _arg1));
};
}
public function set _Label10(_arg1:Label):void{
var _local2:Object;
_local2 = this._335292748_Label10;
if (_local2 !== _arg1){
this._335292748_Label10 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label10", _local2, _arg1));
};
}
public function set _Label14(_arg1:Label):void{
var _local2:Object;
_local2 = this._335292744_Label14;
if (_local2 !== _arg1){
this._335292744_Label14 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label14", _local2, _arg1));
};
}
public function __idLevelComplete_show(_arg1:FlexEvent):void{
UpdateStats();
}
public function set _Label12(_arg1:Label):void{
var _local2:Object;
_local2 = this._335292746_Label12;
if (_local2 !== _arg1){
this._335292746_Label12 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label12", _local2, _arg1));
};
}
public function set idCompleteText(_arg1:Label):void{
var _local2:Object;
_local2 = this._1065273663idCompleteText;
if (_local2 !== _arg1){
this._1065273663idCompleteText = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idCompleteText", _local2, _arg1));
};
}
public function get idRadius():ActionRadius{
return (this._692198003idRadius);
}
public function CheckConditions():Boolean{
var _local1:Boolean;
_local1 = (((this.idScore.GetScore() >= GameUtils.GetGameCore().GetCurrentLevelSettings().CashToContinue)) && ((this.idScore.GetKills() >= GameUtils.GetGameCore().GetCurrentLevelSettings().KillsToContinue)));
if (_local1){
this.idCongratsText.text = "CONGRATULATIONS!";
this.idCongratsButton.text = "Next";
this.idCompleteText.text = "Level complete!";
} else {
this.idCongratsText.text = "DEFEAT!";
this.idCongratsButton.text = "Restart";
this.idCompleteText.text = "Level incomplete!";
};
return (_local1);
}
public function set idTimer(_arg1:GameTimer):void{
var _local2:Object;
_local2 = this._1642332906idTimer;
if (_local2 !== _arg1){
this._1642332906idTimer = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idTimer", _local2, _arg1));
};
}
private function CheckBuilderValidity():Boolean{
var _local1:Boolean;
var _local2:DisplayObject;
if (!mCurrentBuilding){
return (false);
};
_local1 = false;
if (mCurrentBuilding.id == "idBuilderTower"){
for each (_local2 in idGameLevel.idObstaclesLayer.getChildren()) {
if (this.idTower.CheckCollision(_local2, false)){
this.idRadius.Update(false);
_local1 = true;
break;
};
};
if (!_local1){
this.idRadius.Update(true);
};
return (((!(_local1)) && (this.idRadius.IsInitialized())));
};
for each (_local2 in idGameLevel.idObstaclesLayer.getChildren()) {
if (((!((_local2 == mCurrentBuilding))) && ((mCurrentBuilding as Warehouse).CheckCollision(_local2, false)))){
_local1 = true;
break;
};
};
if (_local1){
mCurrentBuilding.setStyle("backgroundColor", "0xff0000");
} else {
mCurrentBuilding.setStyle("backgroundColor", "0x00ff00");
};
return (!(_local1));
}
public function set _Canvas10(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421046_Canvas10;
if (_local2 !== _arg1){
this._49421046_Canvas10 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas10", _local2, _arg1));
};
}
public function set _Canvas11(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421047_Canvas11;
if (_local2 !== _arg1){
this._49421047_Canvas11 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas11", _local2, _arg1));
};
}
public function Restart():void{
this.idBulletLayer.removeAllChildren();
this.idLevelComplete.visible = false;
mGameCore.Restart(true);
this.idBuilderTower.visible = true;
this.idRadius.visible = true;
this.idReadyDisplay.visible = true;
this.idGameLevel.Restart();
LevelLoaded(null, false);
}
private function PostInit(_arg1:Event=null):void{
mGameCore.removeEventListener(Event.COMPLETE, PostInit, false);
if (mCurrentLevelId < 0){
mCurrentLevelId = 0;
mCurrentLevelName = mGameCore.GetGameSettings().GetLevel(mCurrentLevelId).attribute("levelPath")[0];
this.idMiscLayer.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove, false, 0, true);
this.idMiscLayer.addEventListener(MouseEvent.CLICK, OnMouseClick, false, 1, true);
};
mBuildingNow = false;
this.idGameLevel.addEventListener("LevelInitComplete", PrepareToLoadLevel, false, 0, true);
this.idGameLevel.Init(mCurrentLevelName);
}
public function set _Canvas13(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421049_Canvas13;
if (_local2 !== _arg1){
this._49421049_Canvas13 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas13", _local2, _arg1));
};
}
public function set _Canvas14(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421050_Canvas14;
if (_local2 !== _arg1){
this._49421050_Canvas14 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas14", _local2, _arg1));
};
}
private function OnButtonClick(_arg1:CorovanButton):void{
switch (Number(_arg1.name)){
case 1:
case 2:
case 3:
this.idBuildingsList.visible = false;
this.idButtonCancel.visible = true;
mBuildingNow = true;
idChoosePlace.visible = true;
this.idBuilder.visible = true;
this.idGameLevel.SelectNone();
mCurrentBuilding = (this.idBuilder.getChildByName(("idBuilderArrow" + _arg1.name)) as UIComponent);
mCurrentBuilding.visible = true;
break;
case 4:
this.idGameLevel.SetBerserkMode(true);
this.idScore.TakeAwayScore(mGameCore.GetCurrentLevelSettings().berserkCost);
break;
case 5:
this.idGameLevel.SetSniperMode(true);
this.idScore.TakeAwayScore(mGameCore.GetCurrentLevelSettings().sniperCost);
break;
case 777:
HideBuildings();
break;
};
}
public function set _Canvas16(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421052_Canvas16;
if (_local2 !== _arg1){
this._49421052_Canvas16 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas16", _local2, _arg1));
};
}
public function set _Canvas12(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421048_Canvas12;
if (_local2 !== _arg1){
this._49421048_Canvas12 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas12", _local2, _arg1));
};
}
public function get idBuilder():Canvas{
return (this._721185280idBuilder);
}
public function IsBuilding():Boolean{
return (mBuildingNow);
}
public function set _Canvas22(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._49421079_Canvas22;
if (_local2 !== _arg1){
this._49421079_Canvas22 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Canvas22", _local2, _arg1));
};
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
PreInit();
}
public function ___Canvas22_click(_arg1:MouseEvent):void{
this.visible = false;
setTimeout(this.Restart, 35);
}
public function __idButtonUpgrade3_toolTipCreate(_arg1:ToolTipEvent):void{
GameUtils.createCorovanTip("Elite ammo", (((((("Makes x" + mGameCore.GetCurrentLevelSettings().arrow3Multiplier) + " damage.<br>Count: <b>") + mGameCore.GetCurrentLevelSettings().arrow3Count) + "</b>.<br>Cost: <b>") + mGameCore.GetCurrentLevelSettings().arrow3Cost) + "</b>"), _arg1);
}
private function PrepareToLoadLevel(_arg1:Event):void{
this.idGameLevel.removeEventListener("LevelInitComplete", PrepareToLoadLevel, false);
this.executeBindings(true);
GameUtils.GetGameCore().GetLoadingQueue().addEventListener("precache", OnPrecacheFinished, false, 0, true);
setTimeout(ResourceManager.PreCacheResources, 35, mCurrentLevelName);
}
public function get idTowersAvailableCount():Label{
return (this._1841537365idTowersAvailableCount);
}
public function set idAttackers(_arg1:Label):void{
var _local2:Object;
_local2 = this._647743677idAttackers;
if (_local2 !== _arg1){
this._647743677idAttackers = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAttackers", _local2, _arg1));
};
}
public function get _Label10():Label{
return (this._335292748_Label10);
}
public function get _Label11():Label{
return (this._335292747_Label11);
}
public function get _Label12():Label{
return (this._335292746_Label12);
}
public function get _Label14():Label{
return (this._335292744_Label14);
}
public function set idChooseTarget(_arg1:Label):void{
var _local2:Object;
_local2 = this._1561249981idChooseTarget;
if (_local2 !== _arg1){
this._1561249981idChooseTarget = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idChooseTarget", _local2, _arg1));
};
}
public function get idCompleteText():Label{
return (this._1065273663idCompleteText);
}
public function set idBuilderArrow1(_arg1:Arrow1Building):void{
var _local2:Object;
_local2 = this._585240424idBuilderArrow1;
if (_local2 !== _arg1){
this._585240424idBuilderArrow1 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilderArrow1", _local2, _arg1));
};
}
public function set idBuilderArrow2(_arg1:Arrow2Building):void{
var _local2:Object;
_local2 = this._585240425idBuilderArrow2;
if (_local2 !== _arg1){
this._585240425idBuilderArrow2 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilderArrow2", _local2, _arg1));
};
}
private function OnMouseMove(_arg1:MouseEvent):void{
if (!mCurrentBuilding){
return;
};
if ((((mCurrentBuilding.id == "idBuilderTower")) && ((((mAvailableTowers <= 0)) || (GameUtils.GetGameCore().IsReady()))))){
if (this.idBuilderTower.visible){
this.idBuilderTower.visible = false;
this.idRadius.visible = false;
};
return;
};
this.idBuilder.x = ((stage.mouseX - (mCurrentBuilding.width / 2)) - 10);
this.idBuilder.y = ((stage.mouseY - (mCurrentBuilding.height / 2)) - 10);
if (mCurrentBuilding.id == "idBuilderTower"){
this.idRadius.y = (((stage.mouseY - ((this.idTower.height / 2) - mGameCore.GetCurrentLevelSettings().TowerSpriteBulletStartY)) - (this.idRadius.height / 2)) - 10);
this.idRadius.x = (((stage.mouseX - ((this.idTower.width / 2) - mGameCore.GetCurrentLevelSettings().TowerSpriteBulletStartX)) - (this.idRadius.width / 2)) - 10);
};
CheckBuilderValidity();
}
public function set idBuilderArrow3(_arg1:Arrow3Building):void{
var _local2:Object;
_local2 = this._585240426idBuilderArrow3;
if (_local2 !== _arg1){
this._585240426idBuilderArrow3 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilderArrow3", _local2, _arg1));
};
}
public function set idNextButton(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1606016896idNextButton;
if (_local2 !== _arg1){
this._1606016896idNextButton = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idNextButton", _local2, _arg1));
};
}
public function set idLevelComplete(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1560277890idLevelComplete;
if (_local2 !== _arg1){
this._1560277890idLevelComplete = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idLevelComplete", _local2, _arg1));
};
}
public function get idAttackers():Label{
return (this._647743677idAttackers);
}
public function get idChooseTarget():Label{
return (this._1561249981idChooseTarget);
}
public function get idBuilderArrow1():Arrow1Building{
return (this._585240424idBuilderArrow1);
}
public function get idBuilderArrow2():Arrow2Building{
return (this._585240425idBuilderArrow2);
}
public function get idBuilderArrow3():Arrow3Building{
return (this._585240426idBuilderArrow3);
}
public function get idNextButton():Canvas{
return (this._1606016896idNextButton);
}
public function set idBuilderPanel(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._799063068idBuilderPanel;
if (_local2 !== _arg1){
this._799063068idBuilderPanel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBuilderPanel", _local2, _arg1));
};
}
public function get idGameLevel():Level{
return (this._814327767idGameLevel);
}
public function set idGameLevel(_arg1:Level):void{
var _local2:Object;
_local2 = this._814327767idGameLevel;
if (_local2 !== _arg1){
this._814327767idGameLevel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idGameLevel", _local2, _arg1));
};
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
MainForm._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 14
//MainForm__embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950 (game.components.MainForm__embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950)
package game.components {
import mx.core.*;
public class MainForm__embed_mxml_______bin_embed_backgrounds_panel_jpg_1164036950 extends BitmapAsset {
}
}//package game.components
Section 15
//Score (game.components.Score)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import game.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Score extends Canvas {
private var _bindings:Array;
private var mInitialized:Boolean;
public var _bindingsByDestination:Object;
private var mKills:int;
private var _949664937idAnimation:Animation;
private var mUsed:int;
public var _bindingsBeginWithWord:Object;
private var mOnScoreChange:Function;
private var mScore:int;
private var _1641232951idScore:Label;
private var _681920764_Label1:Label;
private var mAfterLoad:Function;
private var _watchers:Array;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function Score(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({height:20, childDescriptors:[new UIComponentDescriptor({type:HBox, stylesFactory:function ():void{
this.horizontalAlign = "center";
this.verticalAlign = "middle";
this.horizontalGap = 2;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off", childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, width:14, height:14});
}}), new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({childDescriptors:[new UIComponentDescriptor({type:Label, id:"_Label1", stylesFactory:function ():void{
this.fontFamily = "Verdana";
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:1, y:1});
}}), new UIComponentDescriptor({type:Label, id:"idScore", stylesFactory:function ():void{
this.fontFamily = "Verdana";
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({x:0, y:0, text:"0"});
}})]});
}})]});
}})]});
}});
super();
mx_internal::_document = this;
this.height = 20;
this.horizontalScrollPolicy = "off";
this.verticalScrollPolicy = "off";
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
public function GetUsed():int{
return (mUsed);
}
public function set idScore(_arg1:Label):void{
var _local2:Object;
_local2 = this._1641232951idScore;
if (_local2 !== _arg1){
this._1641232951idScore = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idScore", _local2, _arg1));
};
}
public function UpdateAnimation():void{
this.idAnimation.SetAnimation("Rotate", true);
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
private function _Score_bindingExprs():void{
var _local1:*;
_local1 = idScore.text;
_local1 = GameUtils.GetGameCore().GetCurrentLevelSettings().GUIMoneyTextColor;
}
public function GetScore():int{
return (mScore);
}
public function get _Label1():Label{
return (this._681920764_Label1);
}
public function Init(_arg1:Function=null, _arg2:Function=null, _arg3:Boolean=true, _arg4:Function=null):void{
if (!mInitialized){
mAfterLoad = _arg1;
this.idAnimation.Init("animations/Coin.gif", "animations/Coin.xml", OnLoad, _arg2, _arg3);
mInitialized = true;
};
mScore = 0;
mKills = 0;
mUsed = 0;
mOnScoreChange = _arg4;
this.idScore.text = String(mScore);
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function set _Label1(_arg1:Label):void{
var _local2:Object;
_local2 = this._681920764_Label1;
if (_local2 !== _arg1){
this._681920764_Label1 = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Label1", _local2, _arg1));
};
}
public function get idScore():Label{
return (this._1641232951idScore);
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
UpdateAnimation();
}
public function AddScore(_arg1:int):void{
mScore = (mScore + _arg1);
this.idScore.text = String(mScore);
mOnScoreChange();
}
private function _Score_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function ():String{
var _local1:*;
var _local2:*;
_local1 = idScore.text;
_local2 = ((_local1 == undefined)) ? null : String(_local1);
return (_local2);
}, function (_arg1:String):void{
_Label1.text = _arg1;
}, "_Label1.text");
_bindings[0] = binding;
binding = new Binding(this, function ():uint{
return (GameUtils.GetGameCore().GetCurrentLevelSettings().GUIMoneyTextColor);
}, function (_arg1:uint):void{
_Label1.setStyle("color", _arg1);
}, "_Label1.color");
_bindings[1] = binding;
}
public function SetUsed(_arg1:int):void{
mUsed = _arg1;
}
public function GetKills():int{
return (mKills);
}
public function TakeAwayScore(_arg1:int):void{
mScore = Math.max(0, (mScore - _arg1));
this.idScore.text = String(mScore);
mOnScoreChange();
}
private function OnLoad():void{
if (mAfterLoad){
mAfterLoad();
};
UpdateAnimation();
}
override public function initialize():void{
var target:Score;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_Score_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_ScoreWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
public function AddKill():void{
mKills = (mKills + 1);
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
_slot1._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 16
//Selection (game.components.Selection)
package game.components {
import mx.core.*;
import mx.events.*;
import mx.containers.*;
public class Selection extends Canvas {
public var _bindingsByDestination:Object;
public var _bindingsBeginWithWord:Object;
private var _documentDescriptor_:UIComponentDescriptor;
public function Selection(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:64, height:64});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
this.addEventListener("resize", ___Canvas1_resize);
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
public function ___Canvas1_resize(_arg1:ResizeEvent):void{
OnResize();
}
private function Init():void{
Redraw();
}
private function Redraw():void{
this.graphics.clear();
this.graphics.lineStyle(1, 0x8BE900);
this.graphics.moveTo(0, 0);
this.graphics.lineTo(4, 0);
this.graphics.moveTo(0, 0);
this.graphics.lineTo(0, 4);
this.graphics.moveTo(this.width, 0);
this.graphics.lineTo((this.width - 4), 0);
this.graphics.moveTo(this.width, 0);
this.graphics.lineTo(this.width, 4);
this.graphics.moveTo(this.width, this.height);
this.graphics.lineTo((this.width - 4), this.height);
this.graphics.moveTo(this.width, this.height);
this.graphics.lineTo(this.width, (this.height - 4));
this.graphics.moveTo(0, this.height);
this.graphics.lineTo(4, this.height);
this.graphics.moveTo(0, this.height);
this.graphics.lineTo(0, (this.height - 4));
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
Init();
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
private function OnResize():void{
Redraw();
}
}
}//package game.components
Section 17
//Tower (game.components.Tower)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.effects.*;
import game.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Tower extends Canvas {
private var _508442041idRotation:Rotate;
private var _1625800754idBlock:Canvas;
private var _bindings:Array;
public var _bindingsByDestination:Object;
public var mAppear:Fade;
private var mTarget:Camel;
private var _949664937idAnimation:Animation;
private var mBase:Point;
private var mDisappear:Fade;
public var _bindingsBeginWithWord:Object;
private var mSelected:Boolean;
private var mSelectionEnabled:Boolean;
private var mIsFiring:Boolean;
private var mAssignedTarget:Camel;
private var mShootRadius:Number;
private var _1884810575idSelection:Selection;
private var mAfterLoad:Function;
private var mBerserkMode:Boolean;
private var mMinShootInterval:Number;
private var _watchers:Array;
private var mSniperMode:Boolean;
private var mLockOnTarget:Point;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function Tower(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:64, height:64, childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"idBlock", stylesFactory:function ():void{
this.backgroundColor = 0x888888;
this.backgroundAlpha = 0;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, width:0, height:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}}), new UIComponentDescriptor({type:Selection, id:"idSelection", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
this.horizontalScrollPolicy = "off";
this.verticalScrollPolicy = "off";
_Rotate1_i();
}
public function IsSniperMode():Boolean{
return (mSniperMode);
}
public function SetBerserkMode(_arg1:Boolean):void{
mBerserkMode = _arg1;
if (_arg1){
setTimeout(SetBerserkMode, (GameUtils.GetGameCore().GetCurrentLevelSettings().BerserkTimeout * 1000), false);
} else {
if (GameUtils.GetGameCore().GetCurrentLevel().GetCurrentTower() == this){
GameUtils.GetGameCore().GetCurrentLevel().SetBerserkMode(false);
GameUtils.GetGameCore().GetMainForm().OnScoreChange();
};
};
}
public function set idBlock(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1625800754idBlock;
if (_local2 !== _arg1){
this._1625800754idBlock = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBlock", _local2, _arg1));
};
}
public function InitBasePosition():void{
mBase = new Point((this.x + GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBulletStartX), (this.y + GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBulletStartY));
}
public function get idBlock():Canvas{
return (this._1625800754idBlock);
}
public function FireAtWill():void{
var _local1:Bullet;
var _local2:Warehouse;
var _local3:int;
if (((!(mTarget)) || (mIsFiring))){
return;
};
mIsFiring = true;
_local1 = new Bullet();
_local1.x = (mBase.x - (GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteWidth / 2));
_local1.y = (mBase.y - (GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteHeight / 2));
GameUtils.GetGameCore().GetMainForm().idBulletLayer.addChild(_local1);
_local1.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteXmlName);
_local2 = GameUtils.GetGameCore().GetCurrentLevel().GetWarehouse();
if ((_local2 is Arrow3Building)){
(_local2 as Arrow3Building).TakeArrow();
_local1.SetDamage((GameUtils.GetGameCore().GetCurrentLevelSettings().TowerDamage * GameUtils.GetGameCore().GetCurrentLevelSettings().arrow3Multiplier));
};
if ((_local2 is Arrow2Building)){
(_local2 as Arrow2Building).TakeArrow();
_local1.SetDamage((GameUtils.GetGameCore().GetCurrentLevelSettings().TowerDamage * GameUtils.GetGameCore().GetCurrentLevelSettings().arrow2Multiplier));
};
if ((_local2 is Arrow1Building)){
(_local2 as Arrow1Building).TakeArrow();
_local1.SetDamage((GameUtils.GetGameCore().GetCurrentLevelSettings().TowerDamage * GameUtils.GetGameCore().GetCurrentLevelSettings().arrow1Multiplier));
};
_local1.FlyTo((mLockOnTarget.x - (GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteWidth / 2)), (mLockOnTarget.y - (GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteHeight / 2)));
_local3 = (mMinShootInterval + int(((Math.random() * mMinShootInterval) / 2)));
setTimeout(ReloadFire, (mBerserkMode) ? (_local3 / 4) : _local3);
}
public function GetShootRadius():Number{
return (mShootRadius);
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function SetEnabled(_arg1:Boolean):void{
mSelectionEnabled = _arg1;
}
public function AfterLoad():void{
if (mAfterLoad){
mAfterLoad();
};
if (this.idAnimation.GetGIFPlayer().totalFrames > 1){
this.idAnimation.SetAnimation("Idle", true);
};
}
public function SetTarget(_arg1:Camel):void{
if (mAssignedTarget){
mAssignedTarget.SetAimed(false);
};
mAssignedTarget = _arg1;
_arg1.SetAimed(true);
}
public function SetSniperMode(_arg1:Boolean):void{
mSniperMode = _arg1;
if (_arg1){
setTimeout(SetSniperMode, (GameUtils.GetGameCore().GetCurrentLevelSettings().SniperTimeout * 1000), false);
mShootRadius = (mShootRadius * 1.5);
} else {
if (GameUtils.GetGameCore().GetCurrentLevel().GetCurrentTower() == this){
mShootRadius = (mShootRadius / 1.5);
GameUtils.GetGameCore().GetCurrentLevel().SetSniperMode(false);
GameUtils.GetGameCore().GetMainForm().OnScoreChange();
};
};
}
public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
mAfterLoad = _arg3;
this.idAnimation.Init(_arg1, _arg2, AfterLoad, _arg4, _arg5);
mIsFiring = false;
mLockOnTarget = new Point();
mMinShootInterval = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerShootInterval;
mShootRadius = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerRadius;
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteHeight;
this.idBlock.x = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBlockX;
this.idBlock.y = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBlockY;
this.idBlock.width = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBlockWidth;
this.idBlock.height = GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteBlockHeight;
mBerserkMode = false;
mSniperMode = false;
mSelected = false;
mSelectionEnabled = false;
mDisappear = new Fade(this);
mDisappear.alphaFrom = 1;
mDisappear.alphaTo = 0;
mDisappear.addEventListener(EffectEvent.EFFECT_END, RemoveThis, false, 0, true);
mAppear = new Fade(this);
mAppear.alphaFrom = 0;
mAppear.alphaTo = 1;
}
public function RemoveThis():void{
this.idRotation.target = null;
mDisappear.target = null;
mAppear.target = null;
if (this.parent){
this.parent.removeChild(this);
};
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function set idSelection(_arg1:Selection):void{
var _local2:Object;
_local2 = this._1884810575idSelection;
if (_local2 !== _arg1){
this._1884810575idSelection = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idSelection", _local2, _arg1));
};
}
private function _Tower_bindingExprs():void{
var _local1:*;
_local1 = mDisappear;
_local1 = idBlock;
_local1 = this;
_local1 = mSelected;
}
public function get idRotation():Rotate{
return (this._508442041idRotation);
}
public function IsBerserkMode():Boolean{
return (mBerserkMode);
}
public function get idSelection():Selection{
return (this._1884810575idSelection);
}
public function LockOnTarget():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (mIsFiring){
return (false);
};
if (((mSniperMode) && ((GameUtils.GetGameCore().GetCurrentLevel().GetCurrentTower() == this)))){
_local1 = new Number(((this.stage.mouseX - mBase.x) - 10));
_local2 = new Number(((this.stage.mouseY - mBase.y) - 10));
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
mLockOnTarget.x = (mBase.x + ((_local1 / _local3) * mShootRadius));
mLockOnTarget.y = (mBase.y + ((_local2 / _local3) * mShootRadius));
} else {
mTarget = GameUtils.GetGameCore().GetCorovanManager().GetClosestCamel(mBase.x, mBase.y, mShootRadius, mAssignedTarget);
if (!mTarget){
return (false);
};
_local1 = new Number(((mTarget.x + (mTarget.width / 2)) - mBase.x));
_local2 = new Number(((mTarget.y + (mTarget.height / 2)) - mBase.y));
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
mLockOnTarget.x = (mBase.x + ((_local1 / _local3) * mShootRadius));
mLockOnTarget.y = (mBase.y + ((_local2 / _local3) * mShootRadius));
};
return (true);
}
private function _Tower_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function (){
return (mDisappear);
}, function (_arg1):void{
this.setStyle("hideEffect", _arg1);
}, "this.hideEffect");
_bindings[0] = binding;
binding = new Binding(this, function ():Sprite{
return (idBlock);
}, function (_arg1:Sprite):void{
this.hitArea = _arg1;
}, "this.hitArea");
_bindings[1] = binding;
binding = new Binding(this, function ():Object{
return (this);
}, function (_arg1:Object):void{
idRotation.target = _arg1;
}, "idRotation.target");
_bindings[2] = binding;
binding = new Binding(this, function ():Boolean{
return (mSelected);
}, function (_arg1:Boolean):void{
idSelection.visible = _arg1;
}, "idSelection.visible");
_bindings[3] = binding;
}
private function _Rotate1_i():Rotate{
var _local1:Rotate;
_local1 = new Rotate();
idRotation = _local1;
_local1.angleFrom = 0;
_local1.angleTo = 0;
_local1.duration = 1;
BindingManager.executeBindings(this, "idRotation", idRotation);
return (_local1);
}
public function CheckCollision(_arg1:DisplayObject, _arg2:Boolean=false):Boolean{
var _local3:DisplayObject;
_local3 = ((_arg1 as Sprite).hitArea) ? (_arg1 as Sprite).hitArea : _arg1;
return (((this.hitArea.hitTestObject(_local3)) && (((((((((!(_arg2)) || (this.idBlock.hitTestPoint(_local3.x, _local3.y, true)))) || (this.idBlock.hitTestPoint((_local3.x + _local3.width), _local3.y, true)))) || (this.idBlock.hitTestPoint((_local3.x + _local3.width), (_local3.y + _local3.height), true)))) || (this.idBlock.hitTestPoint(_local3.x, (_local3.y + _local3.height), true))))));
}
public function GetCenter():Point{
return (mBase);
}
public function SetOrientationTo(_arg1:int, _arg2:int):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg1 - mBase.x);
_local4 = (mBase.y - _arg2);
_local5 = Math.atan2(_local3, _local4);
this.idRotation.end();
this.idRotation.angleFrom = ((_local5 * 180) / Math.PI);
this.idRotation.angleTo = ((_local5 * 180) / Math.PI);
this.idRotation.play();
}
public function SetSelection(_arg1:Boolean):void{
if (!mSelectionEnabled){
return;
};
mSelected = _arg1;
this.idSelection.visible = mSelected;
if (mAssignedTarget){
mAssignedTarget.SetAimed(_arg1);
};
}
public function set idRotation(_arg1:Rotate):void{
var _local2:Object;
_local2 = this._508442041idRotation;
if (_local2 !== _arg1){
this._508442041idRotation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idRotation", _local2, _arg1));
};
}
override public function initialize():void{
var target:Tower;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_Tower_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_TowerWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
private function ReloadFire():void{
mIsFiring = false;
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
Tower._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 18
//Tumbleweed (game.components.Tumbleweed)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.*;
import game.*;
import mx.containers.*;
import mx.effects.easing.*;
public class Tumbleweed extends Canvas {
public var _bindingsByDestination:Object;
private var _949664937idAnimation:Animation;
public var mToLeftMove:Move;
private var mParallel:Parallel;
public var _bindingsBeginWithWord:Object;
private var _documentDescriptor_:UIComponentDescriptor;
public function Tumbleweed(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:12, height:12, childDescriptors:[new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 12;
this.height = 12;
this.addEventListener("creationComplete", ___Canvas1_creationComplete);
}
private function ForceRender():void{
this.idAnimation.SetAnimation("Roll", true);
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
public function Init(_arg1:Function=null, _arg2:Function=null, _arg3:Boolean=true):void{
this.idAnimation.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().TumbleweedSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().TumbleweedSpriteXmlName, _arg1, _arg2, _arg3);
this.idAnimation.SetAnimation("Roll", true);
this.width = GameUtils.GetGameCore().GetCurrentLevelSettings().TumbleweedSpriteWidth;
this.height = GameUtils.GetGameCore().GetCurrentLevelSettings().TumbleweedSpriteHeight;
this.y = ((this.parent.height - this.height) * Math.random());
this.x = (this.parent.width + this.width);
mToLeftMove = new Move(this);
mToLeftMove.xFrom = this.x;
mToLeftMove.xTo = -32;
mToLeftMove.easingFunction = Linear.easeNone;
mToLeftMove.duration = 10000;
mToLeftMove.addEventListener(EffectEvent.EFFECT_END, RemoveThis, false, 0, true);
mToLeftMove.play();
}
public function RemoveThis(_arg1:Event=null):void{
this.visible = false;
mToLeftMove.target = null;
if (this.parent){
this.parent.removeChild(this);
};
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function ___Canvas1_creationComplete(_arg1:FlexEvent):void{
ForceRender();
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
}
}//package game.components
Section 19
//Warehouse (game.components.Warehouse)
package game.components {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.effects.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Warehouse extends Canvas {
private var _1625800754idBlock:Canvas;
private var _bindings:Array;
public var _bindingsByDestination:Object;
private var mAppear:Fade;
private var _949664937idAnimation:Animation;
protected var mBase:Point;
private var mDestroyable:Boolean;
private var mDisappear:Fade;
public var _bindingsBeginWithWord:Object;
private var mAfterLoad:Function;
private var _watchers:Array;
private var _documentDescriptor_:UIComponentDescriptor;
private static var _watcherSetupUtil:IWatcherSetupUtil;
public function Warehouse(){
_documentDescriptor_ = new UIComponentDescriptor({type:Canvas, propertiesFactory:function ():Object{
return ({width:64, height:64, childDescriptors:[new UIComponentDescriptor({type:Canvas, id:"idBlock", stylesFactory:function ():void{
this.backgroundColor = 0x888888;
this.backgroundAlpha = 0;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, width:0, height:0, horizontalScrollPolicy:"off", verticalScrollPolicy:"off"});
}}), new UIComponentDescriptor({type:Animation, id:"idAnimation", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
super();
mx_internal::_document = this;
this.width = 64;
this.height = 64;
this.horizontalScrollPolicy = "off";
this.verticalScrollPolicy = "off";
}
public function set idBlock(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1625800754idBlock;
if (_local2 !== _arg1){
this._1625800754idBlock = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBlock", _local2, _arg1));
};
}
public function get idBlock():Canvas{
return (this._1625800754idBlock);
}
public function get idAnimation():Animation{
return (this._949664937idAnimation);
}
private function _Warehouse_bindingsSetup():void{
var binding:Binding;
if (!_bindings){
_bindings = [];
};
if (!_watchers){
_watchers = [];
};
binding = new Binding(this, function ():Sprite{
return (idBlock);
}, function (_arg1:Sprite):void{
this.hitArea = _arg1;
}, "this.hitArea");
_bindings[0] = binding;
}
private function _Warehouse_bindingExprs():void{
var _local1:*;
_local1 = idBlock;
}
public function Init(_arg1:String, _arg2:String, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=true):void{
mAfterLoad = _arg3;
SetDestroyable(false);
this.idAnimation.Init(_arg1, _arg2, _arg3, _arg4, _arg5);
mDisappear = new Fade(this);
mDisappear.alphaFrom = 1;
mDisappear.alphaTo = 0;
mDisappear.addEventListener(EffectEvent.EFFECT_END, RemoveThis, false, 0, true);
mAppear = new Fade(this);
mAppear.alphaFrom = 0;
mAppear.alphaTo = 1;
}
public function RemoveThis(_arg1:Event=null):void{
if (((this.parent) && (mDestroyable))){
mDisappear.target = null;
mAppear.target = null;
this.parent.removeChild(this);
};
}
public function set idAnimation(_arg1:Animation):void{
var _local2:Object;
_local2 = this._949664937idAnimation;
if (_local2 !== _arg1){
this._949664937idAnimation = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idAnimation", _local2, _arg1));
};
}
public function SetDestroyable(_arg1:Boolean):void{
mDestroyable = _arg1;
if (mDestroyable){
this.setStyle("hideEffect", mDisappear);
this.setStyle("creationCompleteEffect", mAppear);
};
}
public function CheckCollision(_arg1:DisplayObject, _arg2:Boolean=false):Boolean{
var _local3:DisplayObject;
_local3 = ((_arg1 as Sprite).hitArea) ? (_arg1 as Sprite).hitArea : _arg1;
return (((this.hitArea.hitTestObject(_local3)) && (((((((((!(_arg2)) || (this.idBlock.hitTestPoint(_local3.x, _local3.y, true)))) || (this.idBlock.hitTestPoint((_local3.x + _local3.width), _local3.y, true)))) || (this.idBlock.hitTestPoint((_local3.x + _local3.width), (_local3.y + _local3.height), true)))) || (this.idBlock.hitTestPoint(_local3.x, (_local3.y + _local3.height), true))))));
}
public function GetCenter():Point{
return (mBase);
}
override public function initialize():void{
var target:Warehouse;
var watcherSetupUtilClass:Object;
mx_internal::setDocumentDescriptor(_documentDescriptor_);
_Warehouse_bindingsSetup();
target = this;
if (_watcherSetupUtil == null){
watcherSetupUtilClass = getDefinitionByName("_game_components_WarehouseWatcherSetupUtil");
var _local2 = watcherSetupUtilClass;
_local2["init"](null);
};
_watcherSetupUtil.setup(this, function (_arg1:String){
return (target[_arg1]);
}, _bindings, _watchers);
super.initialize();
}
public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{
Warehouse._watcherSetupUtil = _arg1;
}
}
}//package game.components
Section 20
//GIFDecoder (game.gif.decoder.GIFDecoder)
package game.gif.decoder {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import game.gif.frames.*;
import game.gif.errors.*;
public class GIFDecoder {
private var inStream:ByteArray;
private var transIndex:int;
private var gct:Array;
private var bgColor:int;
private var ih:int;
private var dispose:int;// = 0
private var height:int;
private var iw:int;
private var bitmap:BitmapData;
private var blockSize:int;// = 0
private var ix:int;
private var iy:int;
private var gctSize:int;
private var suffix:Array;
private var transparency:Boolean;// = false
private var image:BitmapData;
private var lastImage:BitmapData;
private var interlace:Boolean;
private var pixelAspect:int;
private var delay:int;// = 0
private var lctSize:int;
private var bgIndex:int;
private var act:Array;
private var block:ByteArray;
private var prefix:Array;
private var lastRect:Rectangle;
private var gctFlag:Boolean;
private var frames:Array;
private var lastBgColor:int;
private var pixelStack:Array;
private var pixels:Array;
private var lastDispose:int;// = 0
private var frameCount:int;
private var width:int;
private var loopCount:int;// = 1
private var lct:Array;
private var lctFlag:Boolean;
private var status:int;
private static var STATUS_OPEN_ERROR:int = 2;
private static var MaxStackSize:int = 0x1000;
private static var frameRect:Rectangle = new Rectangle();
private static var STATUS_OK:int = 0;
private static var STATUS_FORMAT_ERROR:int = 1;
public function GIFDecoder(){
loopCount = 1;
blockSize = 0;
dispose = 0;
lastDispose = 0;
transparency = false;
delay = 0;
super();
block = new ByteArray();
}
private function init():void{
status = STATUS_OK;
frameCount = 0;
frames = new Array();
gct = null;
lct = null;
}
public function getLoopCount():int{
return (loopCount);
}
private function readLSD():void{
var _local1:int;
width = readShort();
height = readShort();
_local1 = readSingleByte();
gctFlag = !(((_local1 & 128) == 0));
gctSize = (2 << (_local1 & 7));
bgIndex = readSingleByte();
pixelAspect = readSingleByte();
}
private function decodeImageData():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:int;
_local1 = -1;
_local2 = (iw * ih);
if ((((pixels == null)) || ((pixels.length < _local2)))){
pixels = new Array(_local2);
};
if (prefix == null){
prefix = new Array(MaxStackSize);
};
if (suffix == null){
suffix = new Array(MaxStackSize);
};
if (pixelStack == null){
pixelStack = new Array((MaxStackSize + 1));
};
_local15 = readSingleByte();
_local4 = (1 << _local15);
_local7 = (_local4 + 1);
_local3 = (_local4 + 2);
_local9 = _local1;
_local6 = (_local15 + 1);
_local5 = ((1 << _local6) - 1);
_local11 = 0;
while (_local11 < _local4) {
prefix[int(_local11)] = 0;
suffix[int(_local11)] = _local11;
_local11++;
};
_local18 = 0;
_local19 = _local18;
_local17 = _local19;
_local16 = _local17;
_local12 = _local16;
_local10 = _local12;
_local14 = _local10;
_local13 = 0;
while (_local13 < _local2) {
if (_local17 == 0){
if (_local10 < _local6){
if (_local12 == 0){
_local12 = readBlock();
if (_local12 <= 0){
break;
};
_local18 = 0;
};
_local14 = (_local14 + ((int(block[int(_local18)]) & 0xFF) << _local10));
_local10 = (_local10 + 8);
_local18++;
_local12--;
continue;
};
_local11 = (_local14 & _local5);
_local14 = (_local14 >> _local6);
_local10 = (_local10 - _local6);
if ((((_local11 > _local3)) || ((_local11 == _local7)))){
break;
};
if (_local11 == _local4){
_local6 = (_local15 + 1);
_local5 = ((1 << _local6) - 1);
_local3 = (_local4 + 2);
_local9 = _local1;
continue;
};
if (_local9 == _local1){
var _temp1 = _local17;
_local17 = (_local17 + 1);
pixelStack[int(_temp1)] = suffix[int(_local11)];
_local9 = _local11;
_local16 = _local11;
continue;
};
_local8 = _local11;
if (_local11 == _local3){
var _temp2 = _local17;
_local17 = (_local17 + 1);
pixelStack[int(_temp2)] = _local16;
_local11 = _local9;
};
while (_local11 > _local4) {
var _temp3 = _local17;
_local17 = (_local17 + 1);
pixelStack[int(_temp3)] = suffix[int(_local11)];
_local11 = prefix[int(_local11)];
};
_local16 = (suffix[int(_local11)] & 0xFF);
if (_local3 >= MaxStackSize){
break;
};
var _temp4 = _local17;
_local17 = (_local17 + 1);
pixelStack[int(_temp4)] = _local16;
prefix[int(_local3)] = _local9;
suffix[int(_local3)] = _local16;
_local3++;
if (((((_local3 & _local5) == 0)) && ((_local3 < MaxStackSize)))){
_local6++;
_local5 = (_local5 + _local3);
};
_local9 = _local8;
};
_local17--;
var _temp5 = _local19;
_local19 = (_local19 + 1);
pixels[int(_temp5)] = pixelStack[int(_local17)];
_local13++;
};
_local13 = _local19;
while (_local13 < _local2) {
pixels[int(_local13)] = 0;
_local13++;
};
}
public function getFrameSize():Rectangle{
var _local1:Rectangle;
_local1 = GIFDecoder.frameRect;
_local1.x = (_local1.y = 0);
_local1.width = width;
_local1.height = height;
return (_local1);
}
private function readColorTable(_arg1:int):Array{
var nbytes:int;
var tab:Array;
var c:ByteArray;
var n:int;
var i:int;
var j:int;
var r:int;
var g:int;
var b:int;
var ncolors = _arg1;
nbytes = (3 * ncolors);
tab = null;
c = new ByteArray();
n = 0;
try {
inStream.readBytes(c, 0, nbytes);
n = nbytes;
} catch(e:Error) {
};
if (n < nbytes){
status = STATUS_FORMAT_ERROR;
} else {
tab = new Array(0x0100);
i = 0;
j = 0;
while (i < ncolors) {
j = (j + 1);
r = (c[j] & 0xFF);
j = (j + 1);
g = (c[j] & 0xFF);
j = (j + 1);
b = (c[j] & 0xFF);
i = (i + 1);
var _local3 = i;
tab[_local3] = (((4278190080 | (r << 16)) | (g << 8)) | b);
};
};
return (tab);
}
private function resetFrame():void{
var _local1:Boolean;
var _local2:int;
lastDispose = dispose;
lastRect = new Rectangle(ix, iy, iw, ih);
lastImage = image;
lastBgColor = bgColor;
_local1 = false;
_local2 = 0;
lct = null;
}
private function readImage():void{
var _local1:int;
var _local2:int;
ix = readShort();
iy = readShort();
iw = readShort();
ih = readShort();
_local1 = readSingleByte();
lctFlag = !(((_local1 & 128) == 0));
interlace = !(((_local1 & 64) == 0));
lctSize = (2 << (_local1 & 7));
if (lctFlag){
lct = readColorTable(lctSize);
act = lct;
} else {
act = gct;
if (bgIndex == transIndex){
bgColor = 0;
};
};
_local2 = 0;
if (transparency){
_local2 = act[transIndex];
act[transIndex] = 0;
};
if (act == null){
status = STATUS_FORMAT_ERROR;
};
if (hasError()){
return;
};
decodeImageData();
skip();
if (hasError()){
return;
};
frameCount++;
bitmap = new BitmapData(width, height);
image = bitmap;
transferPixels();
frames.push(new GIFFrame(bitmap, delay));
if (transparency){
act[transIndex] = _local2;
};
resetFrame();
}
private function transferPixels():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:Number;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
_local1 = getPixels(bitmap);
if (lastDispose > 0){
if (lastDispose == 3){
_local6 = (frameCount - 2);
lastImage = ((_local6 > 0)) ? getFrame((_local6 - 1)).bitmapData : null;
};
if (lastImage != null){
_local7 = getPixels(lastImage);
_local1 = _local7.slice();
if (lastDispose == 2){
_local8 = (transparency) ? 0 : lastBgColor;
image.fillRect(lastRect, _local8);
};
};
};
_local2 = 1;
_local3 = 8;
_local4 = 0;
_local5 = 0;
while (_local5 < ih) {
_local9 = _local5;
if (interlace){
if (_local4 >= ih){
_local2++;
switch (_local2){
case 2:
_local4 = 4;
break;
case 3:
_local4 = 2;
_local3 = 4;
break;
case 4:
_local4 = 1;
_local3 = 2;
break;
};
};
_local9 = _local4;
_local4 = (_local4 + _local3);
};
_local9 = (_local9 + iy);
if (_local9 < height){
_local10 = (_local9 * width);
_local11 = (_local10 + ix);
_local12 = (_local11 + iw);
if ((_local10 + width) < _local12){
_local12 = (_local10 + width);
};
_local13 = (_local5 * iw);
while (_local11 < _local12) {
var _temp1 = _local13;
_local13 = (_local13 + 1);
_local14 = (pixels[_temp1] & 0xFF);
_local15 = act[_local14];
if (_local15 != 0){
_local1[_local11] = _local15;
};
_local11++;
};
};
_local5++;
};
setPixels(_local1);
}
private function skip():void{
do {
readBlock();
} while ((((blockSize > 0)) && (!(hasError()))));
}
private function readShort():int{
return ((readSingleByte() | (readSingleByte() << 8)));
}
private function hasError():Boolean{
return (!((status == STATUS_OK)));
}
private function readBlock():int{
var n:int;
var count:int;
blockSize = readSingleByte();
n = 0;
if (blockSize > 0){
try {
count = 0;
while (n < blockSize) {
inStream.readBytes(block, n, (blockSize - n));
if ((blockSize - n) == -1){
break;
};
n = (n + (blockSize - n));
};
} catch(e:Error) {
};
if (n < blockSize){
status = STATUS_FORMAT_ERROR;
};
};
return (n);
}
public function getFrameCount():int{
return (frameCount);
}
public function read(_arg1:ByteArray):int{
var _local2:int;
_local2 = getTimer();
init();
if (_arg1 != null){
_local2 = getTimer();
this.inStream = _arg1;
readHeader();
_local2 = getTimer();
if (!hasError()){
readContents();
if (frameCount < 0){
status = STATUS_FORMAT_ERROR;
};
};
} else {
status = STATUS_OPEN_ERROR;
};
return (status);
}
public function get disposeValue():int{
return (dispose);
}
private function getPixels(_arg1:BitmapData):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
_local2 = new Array(((4 * image.width) * image.height));
_local3 = 0;
_local4 = image.width;
_local5 = image.height;
_local6 = 0;
while (_local6 < _local5) {
_local7 = 0;
while (_local7 < _local4) {
_local8 = _arg1.getPixel(_local6, _local7);
var _temp1 = _local3;
_local3 = (_local3 + 1);
var _local9 = _temp1;
_local2[_local9] = ((_local8 & 0xFF0000) >> 16);
var _temp2 = _local3;
_local3 = (_local3 + 1);
var _local10 = _temp2;
_local2[_local10] = ((_local8 & 0xFF00) >> 8);
var _temp3 = _local3;
_local3 = (_local3 + 1);
var _local11 = _temp3;
_local2[_local11] = (_local8 & 0xFF);
_local7++;
};
_local6++;
};
return (_local2);
}
public function getImage():GIFFrame{
return (getFrame(0));
}
private function readGraphicControlExt():void{
var _local1:int;
readSingleByte();
_local1 = readSingleByte();
dispose = ((_local1 & 28) >> 2);
if (dispose == 0){
dispose = 1;
};
transparency = !(((_local1 & 1) == 0));
delay = (readShort() * 10);
transIndex = readSingleByte();
readSingleByte();
}
private function setPixels(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local2 = 0;
_arg1.position = 0;
_local3 = image.width;
_local4 = image.height;
_local5 = 0;
while (_local5 < _local4) {
_local6 = 0;
while (_local6 < _local3) {
var _temp1 = _local2;
_local2 = (_local2 + 1);
_local7 = _arg1[int(_temp1)];
bitmap.setPixel32(_local6, _local5, _local7);
_local6++;
};
_local5++;
};
}
private function readSingleByte():int{
var curByte:int;
curByte = 0;
try {
curByte = inStream.readUnsignedByte();
} catch(e:Error) {
status = STATUS_FORMAT_ERROR;
};
return (curByte);
}
public function getFrame(_arg1:int):GIFFrame{
var _local2:GIFFrame;
_local2 = null;
if ((((_arg1 >= 0)) && ((_arg1 < frameCount)))){
_local2 = frames[_arg1];
} else {
throw (new RangeError("Wrong frame number passed"));
};
return (_local2);
}
private function readHeader():void{
var _local1:String;
var _local2:int;
_local1 = "";
_local2 = 0;
while (_local2 < 6) {
_local1 = (_local1 + String.fromCharCode(readSingleByte()));
_local2++;
};
if (_local1.indexOf("GIF") != 0){
status = STATUS_FORMAT_ERROR;
throw (new FileTypeError("Invalid file type"));
};
readLSD();
if (((gctFlag) && (!(hasError())))){
gct = readColorTable(gctSize);
bgColor = gct[bgIndex];
};
}
private function readNetscapeExt():void{
var _local1:*;
var _local2:*;
do {
readBlock();
if (block[0] == 1){
_local1 = (block[1] & 0xFF);
_local2 = (block[2] & 0xFF);
loopCount = ((_local2 << 8) | _local1);
};
} while ((((blockSize > 0)) && (!(hasError()))));
}
public function getDelay(_arg1:int):int{
delay = -1;
if ((((_arg1 >= 0)) && ((_arg1 < frameCount)))){
delay = frames[_arg1].delay;
};
return (delay);
}
private function readContents():void{
var _local1:Boolean;
var _local2:int;
var _local3:String;
var _local4:int;
_local1 = false;
while (!(((_local1) || (hasError())))) {
_local2 = readSingleByte();
switch (_local2){
case 44:
readImage();
break;
case 33:
_local2 = readSingleByte();
switch (_local2){
case 249:
readGraphicControlExt();
break;
case 0xFF:
readBlock();
_local3 = "";
_local4 = 0;
while (_local4 < 11) {
_local3 = (_local3 + block[int(_local4)]);
_local4++;
};
if (_local3 == "NETSCAPE2.0"){
readNetscapeExt();
} else {
skip();
};
break;
default:
skip();
break;
};
break;
case 59:
_local1 = true;
break;
case 0:
break;
default:
status = STATUS_FORMAT_ERROR;
break;
};
};
}
}
}//package game.gif.decoder
Section 21
//FileTypeError (game.gif.errors.FileTypeError)
package game.gif.errors {
public class FileTypeError extends Error {
public function FileTypeError(_arg1:String){
super(_arg1);
}
}
}//package game.gif.errors
Section 22
//FileTypeEvent (game.gif.events.FileTypeEvent)
package game.gif.events {
import flash.events.*;
public class FileTypeEvent extends Event {
public static const INVALID:String = "invalid";
public function FileTypeEvent(_arg1:String){
super(_arg1, false, false);
}
}
}//package game.gif.events
Section 23
//FrameEvent (game.gif.events.FrameEvent)
package game.gif.events {
import flash.events.*;
import game.gif.frames.*;
public class FrameEvent extends Event {
public var frame:GIFFrame;
public static const FRAME_RENDERED:String = "rendered";
public function FrameEvent(_arg1:String, _arg2:GIFFrame){
super(_arg1, false, false);
frame = _arg2;
}
}
}//package game.gif.events
Section 24
//GIFPlayerEvent (game.gif.events.GIFPlayerEvent)
package game.gif.events {
import flash.events.*;
import flash.geom.*;
public class GIFPlayerEvent extends Event {
public var rect:Rectangle;
public static const COMPLETE:String = "complete";
public function GIFPlayerEvent(_arg1:String, _arg2:Rectangle){
super(_arg1, false, false);
rect = _arg2;
}
}
}//package game.gif.events
Section 25
//TimeoutEvent (game.gif.events.TimeoutEvent)
package game.gif.events {
import flash.events.*;
public class TimeoutEvent extends Event {
public static const TIME_OUT:String = "timeout";
public function TimeoutEvent(_arg1:String){
super(_arg1, false, false);
}
}
}//package game.gif.events
Section 26
//GIFFrame (game.gif.frames.GIFFrame)
package game.gif.frames {
import flash.display.*;
public class GIFFrame {
public var delay:int;
public var bitmapData:BitmapData;
public function GIFFrame(_arg1:BitmapData, _arg2:int){
bitmapData = _arg1;
delay = _arg2;
}
}
}//package game.gif.frames
Section 27
//GIFPlayer (game.gif.player.GIFPlayer)
package game.gif.player {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import game.gif.decoder.*;
import game.gif.frames.*;
import game.gif.events.*;
import game.gif.errors.*;
import flash.errors.*;
public class GIFPlayer extends Bitmap {
private var arrayLng:uint;
private var myURLLoader:URLLoader;
private var aFrames:Array;
private var myGIFDecoder:GIFDecoder;
private var auto:Boolean;
private var iInc:int;
private var iIndex:int;
private var myTimer:Timer;
public function GIFPlayer(_arg1:Boolean=true){
auto = _arg1;
iIndex = (iInc = 0);
myTimer = new Timer(0, 0);
aFrames = new Array();
myURLLoader = new URLLoader();
myURLLoader.dataFormat = URLLoaderDataFormat.BINARY;
myURLLoader.addEventListener(Event.COMPLETE, onComplete);
myURLLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
myTimer.addEventListener(TimerEvent.TIMER, update);
myGIFDecoder = new GIFDecoder();
}
public function stop():void{
if (myTimer.running){
myTimer.stop();
};
}
public function getLoader():URLLoader{
return (myURLLoader);
}
public function get totalFrames():int{
return (aFrames.length);
}
public function getDecoder():GIFDecoder{
return (myGIFDecoder);
}
private function concat(_arg1:int):int{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1) {
bitmapData.draw(aFrames[_local2].bitmapData);
_local2++;
};
return (_local2);
}
public function setLoader(_arg1:URLLoader):void{
stop();
linkLoader(_arg1);
onComplete();
}
public function play():void{
if (aFrames.length){
if (!myTimer.running){
myTimer.start();
};
} else {
throw (new Error("Nothing to play"));
};
}
private function onComplete(_arg1:Event=null, _arg2=true):void{
var myGIFStream:ByteArray;
var lng:int;
var i:int;
var pEvt = _arg1;
var needDecode = _arg2;
if (needDecode){
myGIFStream = myURLLoader.data;
myGIFStream.position = 0;
};
aFrames = new Array();
iInc = 0;
try {
if (needDecode){
myGIFDecoder.read(myGIFStream);
};
lng = myGIFDecoder.getFrameCount();
i = 0;
while (i < lng) {
aFrames[int(i)] = myGIFDecoder.getFrame(i);
i = (i + 1);
};
dispatchEvent(new GIFPlayerEvent(GIFPlayerEvent.COMPLETE, aFrames[0].bitmapData.rect));
arrayLng = aFrames.length;
if (auto){
play();
} else {
gotoAndStop(1);
};
} catch(e:ScriptTimeoutError) {
dispatchEvent(new TimeoutEvent(TimeoutEvent.TIME_OUT));
} catch(e:FileTypeError) {
dispatchEvent(new FileTypeEvent(FileTypeEvent.INVALID));
} catch(e:Error) {
throw (new Error(("An unknown error occured, make sure the GIF file contains at least one frame\nNumber of frames : " + aFrames.length)));
};
}
public function get currentFrame():int{
return ((iIndex + 1));
}
public function setDecoder(_arg1:GIFDecoder):void{
stop();
myGIFDecoder = _arg1;
onComplete(null, false);
}
public function get autoPlay():Boolean{
return (auto);
}
public function gotoAndStop(_arg1:int):void{
if ((((_arg1 > 0)) && ((_arg1 <= aFrames.length)))){
iInc = int((int(_arg1) - 1));
switch (myGIFDecoder.disposeValue){
case 1:
bitmapData = aFrames[0].bitmapData.clone();
bitmapData.draw(aFrames[concat(iInc)].bitmapData);
break;
case 2:
bitmapData = aFrames[iInc].bitmapData;
break;
};
if (myTimer.running){
myTimer.stop();
};
} else {
throw (new RangeError(("Frame out of range, please specify a frame between 1 and " + aFrames.length)));
};
}
public function get frames():Array{
return (aFrames);
}
public function linkLoader(_arg1:URLLoader):void{
myURLLoader = _arg1;
}
public function getFrame(_arg1:int):GIFFrame{
var _local2:GIFFrame;
if ((((_arg1 > 0)) && ((_arg1 <= aFrames.length)))){
_local2 = aFrames[(_arg1 - 1)];
} else {
throw (new RangeError(("Frame out of range, please specify a frame between 1 and " + aFrames.length)));
};
return (_local2);
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
}
public function gotoAndPlay(_arg1:int):void{
if ((((_arg1 > 0)) && ((_arg1 <= aFrames.length)))){
iInc = int((int(_arg1) - 1));
switch (myGIFDecoder.disposeValue){
case 1:
bitmapData = aFrames[0].bitmapData.clone();
bitmapData.draw(aFrames[concat(iInc)].bitmapData);
break;
case 2:
bitmapData = aFrames[iInc].bitmapData;
break;
};
if (!myTimer.running){
myTimer.start();
};
} else {
throw (new RangeError(("Frame out of range, please specify a frame between 1 and " + aFrames.length)));
};
}
private function update(_arg1:TimerEvent):void{
var _local2:int;
_local2 = aFrames[(iIndex = (iInc++ % arrayLng))].delay;
_arg1.target.delay = ((_local2)>0) ? _local2 : 100;
switch (myGIFDecoder.disposeValue){
case 1:
if (!iIndex){
bitmapData = aFrames[0].bitmapData.clone();
};
bitmapData.draw(aFrames[iIndex].bitmapData);
break;
case 2:
bitmapData = aFrames[iIndex].bitmapData;
break;
};
dispatchEvent(new FrameEvent(FrameEvent.FRAME_RENDERED, aFrames[iIndex]));
}
public function getDelay(_arg1:int):int{
var _local2:int;
if ((((_arg1 > 0)) && ((_arg1 <= aFrames.length)))){
_local2 = aFrames[(_arg1 - 1)].delay;
} else {
throw (new RangeError(("Frame out of range, please specify a frame between 1 and " + aFrames.length)));
};
return (_local2);
}
public function get loopCount():int{
return (myGIFDecoder.getLoopCount());
}
public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{
stop();
myURLLoader.load(_arg1);
}
}
}//package game.gif.player
Section 28
//MochiScores (game.mochi.MochiScores)
package game.mochi {
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 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;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.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 _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
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{
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 game.mochi
Section 29
//MochiServices (game.mochi.MochiServices)
package game.mochi {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
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++;
};
};
}
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);
};
};
};
};
};
}
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);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function getVersion():String{
return ("1.31");
}
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();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
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 onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
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()});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = 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");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
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...");
}
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 (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) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
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 mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = 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 ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package game.mochi
Section 30
//Banner (game.Banner)
package game {
import flash.display.*;
public dynamic class Banner extends MovieClip {
}
}//package game
Section 31
//CollisionManager (game.CollisionManager)
package game {
import mx.core.*;
import flash.display.*;
public class CollisionManager {
private var mSandbox:Container;
public function CollisionManager(_arg1:Container):void{
mSandbox = _arg1;
}
public function HitTest(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
return (_arg1.hitTestObject(_arg2));
}
public function HitTestAgainstAll(_arg1:DisplayObject):DisplayObject{
var _local2:DisplayObject;
for each (_local2 in mSandbox.getChildren()) {
if (((HitTest(_arg1, _local2)) && (!((_arg1 == _local2))))){
return (_local2);
};
};
return (null);
}
}
}//package game
Section 32
//CorovanManager (game.CorovanManager)
package game {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.*;
import game.components.*;
import mx.collections.*;
public class CorovanManager extends EventDispatcher {
private var mCamelCount:int;
private var mSandbox:Container;
private var mCamels:ArrayCollection;
private var mWaypoints:XML;
private var mInitialized:Boolean;
private var mCamelSpeed:int;
public function CorovanManager(_arg1:Container):void{
mSandbox = _arg1;
mInitialized = false;
}
private function ReInitAllCamels():void{
var _local1:Camel;
for each (_local1 in mCamels) {
_local1.x = (Number((mWaypoints.child("Point")[0] as XML).attribute("x")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth / 2));
_local1.y = (Number((mWaypoints.child("Point")[0] as XML).attribute("y")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight / 2));
_local1.width = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth;
_local1.height = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight;
_local1.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteXmlName, mCamelSpeed);
};
this.dispatchEvent(new Event(Event.COMPLETE));
}
public function IsCamelInRadius(_arg1:Camel, _arg2:int, _arg3:int, _arg4:int):Boolean{
return ((((((((((((_arg1.x > 0)) && ((_arg1.y > 0)))) && ((_arg1.x < mSandbox.width)))) && ((_arg1.y < mSandbox.height)))) && (GameUtils.IsPointInCircleLQ((_arg1.x + (_arg1.width / 2)), (_arg1.y + (_arg1.height / 2)), _arg2, _arg3, _arg4)))) && (GameUtils.IsPointInCircleHQ((_arg1.x + (_arg1.width / 2)), (_arg1.y + (_arg1.height / 2)), _arg2, _arg3, _arg4))));
}
public function GetCamels():ArrayCollection{
return (mCamels);
}
public function Process():void{
var _local1:int;
var _local2:int;
var _local3:Camel;
var _local4:int;
var _local5:XML;
if (!mInitialized){
return;
};
_local1 = 0;
_local2 = 0;
while (_local2 < mCamels.length) {
_local3 = mCamels[_local2];
_local4 = (_local3.GetVisitedCount() + 1);
if ((((_local4 >= mWaypoints.children().length())) || (_local3.IsDead()))){
} else {
_local1 = (_local1 + 1);
if ((((((((_local3.x > 0)) && ((_local3.y > 0)))) && ((_local3.x < 320)))) && ((_local3.y < 320)))){
_local3.visible = true;
};
_local5 = (mWaypoints.child("Point")[_local4] as XML);
_local3.WalkToPoint(int(_local5.attribute("x")), int(_local5.attribute("y")));
};
_local2++;
};
if (_local1 < 1){
GameUtils.GetGameCore().SetReady(false);
GameUtils.GetGameCore().GetMainForm().CheckConditions();
GameUtils.GetGameCore().GetMainForm().idLevelComplete.visible = true;
GameUtils.GetGameCore().GetMainForm().HideBuildings();
GameUtils.GetGameCore().GetCurrentLevel().SelectNone();
GameUtils.GetGameCore().GetMainForm().idChooseTarget.visible = false;
GameUtils.GetGameCore().GetMainForm().idBuilderPanel.visible = false;
};
}
private function OnCamelClick(_arg1:MouseEvent):void{
var _local2:Tower;
var _local3:Camel;
_local2 = GameUtils.GetGameCore().GetCurrentLevel().GetCurrentTower();
_local3 = (_arg1.currentTarget as Camel);
if (!_local2){
return;
};
_local2.SetTarget(_local3);
}
private function MakeCamelsQueue():void{
var _local1:int;
var _local2:int;
var _local3:int;
_local1 = (int((mWaypoints.child("Point")[0] as XML).attribute("x")) - int((mWaypoints.child("Point")[1] as XML).attribute("x")));
_local2 = (int((mWaypoints.child("Point")[0] as XML).attribute("y")) - int((mWaypoints.child("Point")[1] as XML).attribute("y")));
if (_local1 != 0){
_local1 = ((_local1 > 0)) ? 1 : -1;
};
if (_local2 != 0){
_local2 = ((_local2 > 0)) ? 1 : -1;
};
_local3 = 0;
while (_local3 < mCamels.length) {
mCamels[_local3].x = ((int((mWaypoints.child("Point")[0] as XML).attribute("x")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth / 2)) + ((_local1 * _local3) * (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth + GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpace)));
mCamels[_local3].y = ((int((mWaypoints.child("Point")[0] as XML).attribute("y")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight / 2)) + ((_local2 * _local3) * (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight + GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpace)));
if (_local3 > 0){
(mCamels[_local3] as Camel).SetOrientation((int((mWaypoints.child("Point")[0] as XML).attribute("x")) - mCamels[_local3].x), (int((mWaypoints.child("Point")[0] as XML).attribute("y")) - mCamels[_local3].y));
} else {
(mCamels[_local3] as Camel).SetOrientation((int((mWaypoints.child("Point")[1] as XML).attribute("x")) - mCamels[_local3].x), (int((mWaypoints.child("Point")[1] as XML).attribute("y")) - mCamels[_local3].y));
};
_local3++;
};
}
private function OnPopulateComplete(_arg1:Event):void{
GameUtils.GetGameCore().GetLoadingQueue().removeEventListener("population", OnPopulateComplete, false);
this.dispatchEvent(new Event(Event.COMPLETE));
}
private function PopulateCamels(_arg1:int):void{
var _local2:int;
var _local3:Camel;
GameUtils.GetGameCore().GetLoadingQueue().addEventListener("population", OnPopulateComplete, false, 0, true);
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Camel();
_local3.x = (Number((mWaypoints.child("Point")[0] as XML).attribute("x")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth / 2));
_local3.y = (Number((mWaypoints.child("Point")[0] as XML).attribute("y")) - (GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight / 2));
_local3.width = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteWidth;
_local3.height = GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteHeight;
GameUtils.GetGameCore().GetLoadingQueue().AddObject("population", _local3);
mCamels.addItem(_local3);
_local3.addEventListener(FlexEvent.UPDATE_COMPLETE, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false, 0, true);
_local3.addEventListener(MouseEvent.CLICK, OnCamelClick, false, 0, true);
_local2++;
};
_local2 = 0;
while (_local2 < _arg1) {
mSandbox.addChildAt(mCamels[_local2], 0);
mCamels[_local2].Init(GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteXmlName, mCamelSpeed);
_local2++;
};
}
public function Restart():void{
RestoreAllCamels();
MakeCamelsQueue();
}
private function RestoreAllCamels():void{
var _local1:*;
var _local2:Camel;
for each (_local1 in mSandbox.getChildren()) {
EffectManager.endEffectsForTarget(_local1);
};
mSandbox.removeAllChildren();
for each (_local2 in mCamels) {
_local2.ResetCamel();
mSandbox.addChildAt(_local2, 0);
};
}
public function GetSandbox():Container{
return (mSandbox);
}
public function RemoveCamel(_arg1:Camel):void{
var _local2:int;
_local2 = mCamels.getItemIndex(_arg1);
if (_local2 < 0){
return;
};
mCamels.removeItemAt(_local2);
}
public function Init(_arg1:int, _arg2:int, _arg3:XML):void{
mInitialized = false;
mWaypoints = _arg3;
mCamelSpeed = _arg2;
mCamelCount = _arg1;
if (((!(mCamels)) || (((mCamels) && (!((mCamels.length == _arg1))))))){
mCamels = new ArrayCollection();
PopulateCamels(_arg1);
} else {
RestoreAllCamels();
ReInitAllCamels();
};
MakeCamelsQueue();
mInitialized = true;
}
public function GetClosestCamel(_arg1:int, _arg2:int, _arg3:int, _arg4:Camel=null):Camel{
var _local5:Array;
var _local6:int;
_local5 = new Array();
_local6 = 0;
while (_local6 < mCamels.length) {
if (((((mCamels[_local6]) && (IsCamelInRadius(mCamels[_local6], _arg1, _arg2, _arg3)))) && (!((mCamels[_local6] as Camel).IsDead())))){
if (((_arg4) && ((_arg4 == mCamels[_local6])))){
return (mCamels[_local6]);
};
_local5.push(mCamels[_local6]);
};
_local6++;
};
if (_local5.length > 0){
return (_local5[int((Math.random() * _local5.length))]);
};
return (null);
}
}
}//package game
Section 33
//CorovanPreloader (game.CorovanPreloader)
package game {
import mx.preloaders.*;
import flash.system.*;
public class CorovanPreloader extends DownloadProgressBar {
public var image:Class;
public function CorovanPreloader(){
this.downloadingLabel = "Downloadng...";
DownloadProgressBar.initializingLabel = "One moment...";
this.backgroundColor = 0;
Security.allowDomain("*", "localhost");
Security.allowInsecureDomain("*", "localhost");
Security.allowDomain("corovan.by.ru");
Security.allowInsecureDomain("corovan.by.ru");
Security.allowDomain("reflexgame.tu1.ru");
Security.allowInsecureDomain("reflexgame.tu1.ru");
Security.allowDomain("*.mochiads.com");
Security.allowInsecureDomain("*.mochiads.com");
Security.allowDomain("*.mochiad.com");
Security.allowInsecureDomain("*.mochiad.com");
}
}
}//package game
Section 34
//GameCore (game.GameCore)
package game {
import flash.events.*;
import mx.core.*;
import game.components.*;
public class GameCore extends EventDispatcher {
private var mLoadingQueue:LoadingQueue;
private var mGameSettings:GameSettings;
private var mCorovanManager:CorovanManager;
private var mGlobalTiming:GlobalTiming;
private var mCollisionManager:CollisionManager;
private var mMusicEnabled:Boolean;
private var mMainForm:MainForm;
private var mReady:Boolean;
public function GameCore(_arg1:MainForm):void{
mMainForm = _arg1;
mMusicEnabled = GameUtils.GetApp().idMusic.selected;
}
public function SetReady(_arg1:Boolean):void{
mReady = _arg1;
}
public function Loop(_arg1:Event):void{
var _local2:int;
_local2 = 0;
mGlobalTiming.Update();
_local2 = KeyboardMapper.ProcessKeys();
if (mReady){
mCorovanManager.Process();
};
mMainForm.idGameLevel.Process();
}
public function IsReady():Boolean{
return (mReady);
}
public function IsMusicEnabled():Boolean{
return (mMusicEnabled);
}
public function GetMainForm():MainForm{
return (mMainForm);
}
private function InitComplete(_arg1:Event):void{
mLoadingQueue.removeEventListener("preinit", InitComplete, false);
dispatchEvent(new Event(Event.COMPLETE));
}
public function GetGameSettings():GameSettings{
return (mGameSettings);
}
public function GetCurrentLevelSettings():LevelSettings{
return (GetCurrentLevel().GetLevelSettings());
}
public function GetCorovanManager():CorovanManager{
return (mCorovanManager);
}
public function GetLoadingQueue():LoadingQueue{
return (mLoadingQueue);
}
public function Restart(_arg1:Boolean):void{
mReady = false;
if (_arg1){
mCorovanManager.Restart();
};
}
public function Init():void{
mGlobalTiming = new GlobalTiming();
mCollisionManager = new CollisionManager(mMainForm.idSandbox);
mCorovanManager = new CorovanManager(mMainForm.idSandbox);
mLoadingQueue = new LoadingQueue();
Application.application.addEventListener(Event.ENTER_FRAME, Loop, false, 0, true);
mGameSettings = new GameSettings();
mLoadingQueue.addEventListener("preinit", InitComplete, false, 0, true);
mLoadingQueue.AddObject("preinit", mGameSettings);
mGameSettings.addEventListener(Event.COMPLETE, mLoadingQueue.ObjectLoaded);
mGameSettings.Init();
mReady = false;
}
public function GetCollisionManager():CollisionManager{
return (mCollisionManager);
}
public function GetGlobalTiming():GlobalTiming{
return (mGlobalTiming);
}
public function GetCurrentLevel():Level{
return (mMainForm.idGameLevel);
}
public function SetMusicEnabled(_arg1:Boolean):void{
mMusicEnabled = _arg1;
}
}
}//package game
Section 35
//GameSettings (game.GameSettings)
package game {
import flash.events.*;
import mx.collections.*;
public class GameSettings extends EventDispatcher {
private var mGameSettings:XML;
private var mCompleteHandler:Function;
private var mLevelList:ArrayCollection;
public function GameSettings():void{
mLevelList = null;
}
public function Init():void{
ResourceManager.GetURLLoader("misc/GameSettings.xml", OnLoadGameSettings);
}
public function GetLevelList():ArrayCollection{
var _local1:XML;
var _local2:XML;
var _local3:XML;
var _local4:String;
if (mLevelList){
return (mLevelList);
};
_local1 = mGameSettings.child("LevelList")[0];
_local2 = _local1.child(_local1.attribute("firstLevel")[0])[0];
mLevelList = new ArrayCollection();
mLevelList.addItem(_local2);
for each (_local3 in _local1.children()) {
_local4 = _local3.attribute("nextLevel")[0];
if (_local4.length < 1){
} else {
mLevelList.addItem(_local1.child(_local4)[0]);
};
};
return (mLevelList);
}
private function OnLoadGameSettings(_arg1:Event):void{
mGameSettings = new XML(_arg1.target.data);
this.dispatchEvent(new Event(Event.COMPLETE));
}
public function GetLevel(_arg1:int):XML{
return ((GetLevelList()[_arg1] as XML));
}
}
}//package game
Section 36
//GameSound (game.GameSound)
package game {
import flash.events.*;
import flash.media.*;
public class GameSound extends EventDispatcher {
private var mChannel:SoundChannel;
private var mSound:Sound;
private var mAutoplay:Boolean;
public function GameSound(_arg1:Boolean=false):void{
mAutoplay = _arg1;
mSound = new Sound();
}
private function AfterLoad(_arg1:Event):void{
mSound.removeEventListener(Event.COMPLETE, AfterLoad, false);
if (mAutoplay){
mChannel = mSound.play(0, int.MAX_VALUE);
};
this.dispatchEvent(new Event(Event.COMPLETE));
}
public function Play():void{
mChannel = mSound.play(0, int.MAX_VALUE);
}
public function Stop():void{
mChannel.stop();
}
public function Init(_arg1:String):void{
var _local2:SoundLoaderContext;
_local2 = new SoundLoaderContext(((5 * 60) * 1000), false);
mSound.addEventListener(Event.COMPLETE, AfterLoad, false, 0, true);
mSound.load(ResourceManager.GetResourceRequest(_arg1), _local2);
}
public function GetSound():Sound{
return (mSound);
}
}
}//package game
Section 37
//GameUtils (game.GameUtils)
package game {
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import mx.controls.*;
import game.components.*;
public class GameUtils {
public static var BASE_URL:String = "";
public static function IsPointInCircleLQ(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int):Boolean{
var _local6:Number;
_local6 = (((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4)));
return ((_local6 <= (_arg5 * _arg5)));
}
public static function IsPointInCircleHQ(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int):Boolean{
var _local6:Number;
_local6 = (((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4)));
return ((Math.sqrt(_local6) <= _arg5));
}
public static function GetGameCore():GameCore{
return (GetApp().GetGameCore());
}
public static function GetApp():Corovan{
return ((Application.application as Corovan));
}
public static function createCorovanTip(_arg1:String, _arg2:String, _arg3:ToolTipEvent):void{
var _local4:CorovanToolTip;
_local4 = new CorovanToolTip();
_local4.initialize();
_local4.idBack.setStyle("backgroundColor", GetGameCore().GetCurrentLevelSettings().GUIStatsBkg);
_local4.idBack.setStyle("borderColor", GetGameCore().GetCurrentLevelSettings().GUIButtonDarkBorder);
_local4.idCaption.setStyle("color", GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
_local4.idBody.setStyle("color", GetGameCore().GetCurrentLevelSettings().GUIStatsTextColor);
_local4.idCaption.htmlText = _arg1;
_local4.idBody.htmlText = _arg2;
_arg3.toolTip = _local4;
}
public static function ShowAlert(_arg1:String="", _arg2:String="", _arg3:uint=4, _arg4:Sprite=null, _arg5:Function=null, _arg6:Class=null, _arg7:uint=4):void{
var _local8:Boolean;
var _local9:Alert;
_local8 = ((_arg3 & Alert.NONMODAL)) ? false : true;
if (!_arg4){
_arg4 = Sprite(Application.application);
};
_local9 = new Alert();
if ((((((((_arg3 & Alert.OK)) || ((_arg3 & Alert.CANCEL)))) || ((_arg3 & Alert.YES)))) || ((_arg3 & Alert.NO)))){
_local9.buttonFlags = _arg3;
};
if ((((((((_arg7 == Alert.OK)) || ((_arg7 == Alert.CANCEL)))) || ((_arg7 == Alert.YES)))) || ((_arg7 == Alert.NO)))){
_local9.defaultButtonFlag = _arg7;
};
_local9.text = _arg1;
_local9.title = _arg2;
_local9.iconClass = _arg6;
if (_arg5 != null){
_local9.addEventListener(CloseEvent.CLOSE, _arg5, false, 0, true);
};
PopUpManager.addPopUp(_local9, _arg4, _local8);
_local9.setActualSize(_local9.getExplicitOrMeasuredWidth(), _local9.getExplicitOrMeasuredHeight());
_local9.setStyle("themeColor", GetGameCore().GetCurrentLevelSettings().GUIStatsBkg);
_local9.setStyle("backgroundColor", GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
_local9.setStyle("color", GetGameCore().GetCurrentLevelSettings().GUIButtonTextColor);
_local9.setStyle("modalTransparencyColor", GetGameCore().GetCurrentLevelSettings().GUIStatsBkg);
_local9.setStyle("barColor", GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
_local9.setStyle("borderColor", GetGameCore().GetCurrentLevelSettings().GUIButtonBorder);
_local9.setStyle("footerColors", [GetGameCore().GetCurrentLevelSettings().GUIStatsBkg, GetGameCore().GetCurrentLevelSettings().GUIButtonBorder]);
_local9.setStyle("headerColors", [GetGameCore().GetCurrentLevelSettings().GUIStatsBkg, GetGameCore().GetCurrentLevelSettings().GUIButtonBorder]);
}
}
}//package game
Section 38
//GlobalTiming (game.GlobalTiming)
package game {
import flash.utils.*;
public class GlobalTiming {
private var mLastTime:int;
private var mInitialized:Boolean;
private var mSupposedFps:int;
private var mLastResult:int;
public function GlobalTiming(_arg1:int=30):void{
mSupposedFps = _arg1;
mInitialized = false;
}
public function Update():void{
var _local1:int;
if (!mInitialized){
mLastTime = getTimer();
mInitialized = true;
};
_local1 = getTimer();
mLastResult = (_local1 - mLastTime);
mLastTime = _local1;
}
public function GetInterval():int{
return (mLastResult);
}
public function GetRatio():Number{
return (Math.max(1, (mLastResult / (1000 / mSupposedFps))));
}
}
}//package game
Section 39
//KeyboardMapper (game.KeyboardMapper)
package game {
import flash.events.*;
import flash.utils.*;
public class KeyboardMapper {
private static var mKeyMap:Dictionary = new Dictionary(true);
public static function ProcessKeys():int{
var _local1:int;
var _local2:String;
var _local3:Object;
var _local4:uint;
_local1 = 0;
for (_local2 in mKeyMap) {
_local3 = mKeyMap[_local2];
if (_local3.pressed){
_local1 = (_local1 + 1);
if (((_local3.down) && (_local3.timedOut))){
_local3.down();
if (_local3.delay > 0){
_local4 = uint(_local2);
_local3.timedOut = false;
setTimeout(unpressKey, _local3.delay, _local4);
};
};
};
};
return (_local1);
}
public static function MapKey(_arg1:uint, _arg2:Function, _arg3:Function=null, _arg4:int=-1):void{
mKeyMap[_arg1] = {down:_arg2, up:_arg3, delay:_arg4, pressed:false, timedOut:true};
}
private static function unpressKey(_arg1:uint):void{
mKeyMap[_arg1].timedOut = true;
}
public static function UnpressAll():void{
var _local1:Object;
for each (_local1 in mKeyMap) {
_local1.pressed = false;
};
}
public static function OnKeyDown(_arg1:KeyboardEvent):void{
if (((mKeyMap[_arg1.keyCode]) && (mKeyMap[_arg1.keyCode].timedOut))){
mKeyMap[_arg1.keyCode].pressed = true;
};
}
public static function OnKeyUp(_arg1:KeyboardEvent):void{
if (mKeyMap[_arg1.keyCode]){
mKeyMap[_arg1.keyCode].pressed = false;
if (mKeyMap[_arg1.keyCode].up){
mKeyMap[_arg1.keyCode].up();
};
};
}
}
}//package game
Section 40
//LevelSettings (game.LevelSettings)
package game {
import flash.events.*;
import mx.events.*;
public class LevelSettings implements IEventDispatcher {
private var _1075403930Arrow1SpriteBlockWidth:Number;
private var _180080085TowerSpriteHeight:Number;
private var _742465731Arrow2SpriteBuyName:String;
private var _1303113512Arrow2SpriteWidth:Number;
private var _1012142791Arrow2SpriteName:String;
private var _1036520459CashToContinue:int;
private var _830292773TowerRadius:int;
private var _639368891BulletSpriteXmlName:String;
private var _257318056TowerSpriteWidth:Number;
private var _589221767Arrow1SpriteBlockHeight:Number;
private var _1918915079TowerSpriteBulletStartY:Number;
private var _202532527CamelSpeed:Number;
private var _1287138863GUIButtonBkg:uint;
private var _449124004sniperCost:int;
private var _1622365094TowerCount:int;
private var _201683671KillsToContinue:int;
private var _321807398TowerSpriteBlockHeight:Number;
private var _217322983CamelCount:Number;
private var _1199016953berserkCost:int;
private var _407850586Arrow2SpriteBlockHeight:Number;
private var _1931086521TowerSpriteName:String;
private var _236907106Arrow3SpriteBuyName:String;
private var _1284037953StartTimeout:Number;
private var _202536432CamelSpace:int;
private var _301081669BulletSpeed:Number;
private var _912855525arrow3Count:int;
private var _435806230arrow2Multiplier:Number;
private var _884226374arrow2Count:int;
private var _386377671CamelSpriteXmlName:String;
private var _1942998265BerserkTimeout:Number;
private var _855597223arrow1Count:int;
private var _1881404972Arrow1SpriteHeight:Number;
private var _1461242796TowerSpriteXmlName:String;
private var _1953887373Arrow3SpriteXmlName:String;
private var _2048957070BulletSpriteHeight:Number;
private var _1248024356Arrow1SpriteBuyName:String;
private var _729551683TowerSpriteBuyName:String;
private var _1131041382RoadWidth:int;
private var _495704959BulletSpriteWidth:Number;
private var _1391232038CamelSpriteName:String;
private var _1773515467arrow1Cost:int;
private var _1771668425arrow3Cost:int;
private var _2046540264Arrow1SpriteBlockX:Number;
private var _1485873146Arrow3SpriteName:String;
private var _1955377586BulletSpriteName:String;
private var _722489167GUIButtonDarkBorder:uint;
private var _342157834Arrow2SpriteBuyXmlName:String;
private var _1772591946arrow2Cost:int;
private var _bindingEventDispatcher:EventDispatcher;
private var _1404922939Arrow3SpriteBlockHeight:Number;
private var _2046540263Arrow1SpriteBlockY:Number;
private var _187062155CamelSpriteWidth:Number;
private var _2021795995CamelReward:int;
private var _1148268232TumbleweedSpriteHeight:Number;
private var _2128156790TowerSpriteBuyXmlName:String;
private var _1661621019Arrow3SpriteBlockY:Number;
private var _2062209707arrow3Multiplier:Number;
private var _1918915078TowerSpriteBulletStartX:Number;
private var _1159387141TumbleweedSpriteWidth:Number;
private var _104263205music:String;
private var _1793893714SniperTimeout:Number;
private var _1986235026CamelHealth:int;
private var _1826756310Arrow3SpriteHeight:Number;
private var _942770123Arrow1SpriteXmlName:String;
private var _318272185GUIButtonBorder:uint;
private var _1661621018Arrow3SpriteBlockX:Number;
private var _1284050028TumbleweedSpriteName:String;
private var _1174030793Arrow3SpriteWidth:Number;
private var _1955024026Arrow2SpriteBlockY:Number;
private var _1590904421TowerShootInterval:int;
private var _101360815GUIMoneyTextColor:uint;
private var mRootNode:XML;
private var _1512181311TumbleweedSpriteXmlName:String;
private var _2076947952BriefingTitle:String;
private var _14944793TowerSpriteBlockX:Number;
private var _784808568Arrow1SpriteName:String;
private var _1695467531Arrow3SpriteBuyXmlName:String;
private var _1011151863Arrow1SpriteBuyXmlName:String;
private var _277905767Arrow2SpriteBlockWidth:Number;
private var _1990221230GUIStatsTextColor:uint;
private var _1432196231Arrow1SpriteWidth:Number;
private var _14944794TowerSpriteBlockY:Number;
private var _1955024025Arrow2SpriteBlockX:Number;
private var _1392937097GUIButtonTextColor:uint;
private var _2102558439TowerSpriteBlockWidth:Number;
private var _1950161214BulletSpriteRotate:Boolean;
private var _1230840904TowerDamage:int;
private var _2120159317Arrow2SpriteHeight:Number;
private var _1070964738CamelSpriteHeight:Number;
private var _1361145129arrow1Multiplier:Number;
private var _1448328748Arrow2SpriteXmlName:String;
private var _764289387BriefingText:String;
private var _1716612737BoardId:String;
private var _29767258GUIStatsBkg:uint;
private var _1631215464Arrow3SpriteBlockWidth:Number;
public function LevelSettings():void{
_bindingEventDispatcher = new EventDispatcher(IEventDispatcher(this));
super();
}
public function set CamelSpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._1070964738CamelSpriteHeight;
if (_local2 !== _arg1){
this._1070964738CamelSpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpriteHeight", _local2, _arg1));
};
}
public function get TumbleweedSpriteWidth():Number{
return (this._1159387141TumbleweedSpriteWidth);
}
public function get berserkCost():int{
return (this._1199016953berserkCost);
}
public function get CamelSpriteHeight():Number{
return (this._1070964738CamelSpriteHeight);
}
public function set TumbleweedSpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1159387141TumbleweedSpriteWidth;
if (_local2 !== _arg1){
this._1159387141TumbleweedSpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TumbleweedSpriteWidth", _local2, _arg1));
};
}
public function get TowerSpriteBulletStartX():Number{
return (this._1918915078TowerSpriteBulletStartX);
}
public function set BerserkTimeout(_arg1:Number):void{
var _local2:Object;
_local2 = this._1942998265BerserkTimeout;
if (_local2 !== _arg1){
this._1942998265BerserkTimeout = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BerserkTimeout", _local2, _arg1));
};
}
public function get CamelSpace():int{
return (this._202536432CamelSpace);
}
public function set Arrow1SpriteBuyXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1011151863Arrow1SpriteBuyXmlName;
if (_local2 !== _arg1){
this._1011151863Arrow1SpriteBuyXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBuyXmlName", _local2, _arg1));
};
}
public function set TowerSpriteBulletStartX(_arg1:Number):void{
var _local2:Object;
_local2 = this._1918915078TowerSpriteBulletStartX;
if (_local2 !== _arg1){
this._1918915078TowerSpriteBulletStartX = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBulletStartX", _local2, _arg1));
};
}
public function set Arrow2SpriteBuyXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._342157834Arrow2SpriteBuyXmlName;
if (_local2 !== _arg1){
this._342157834Arrow2SpriteBuyXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBuyXmlName", _local2, _arg1));
};
}
public function set berserkCost(_arg1:int):void{
var _local2:Object;
_local2 = this._1199016953berserkCost;
if (_local2 !== _arg1){
this._1199016953berserkCost = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "berserkCost", _local2, _arg1));
};
}
public function get CamelCount():Number{
return (this._217322983CamelCount);
}
public function get TowerSpriteBlockY():Number{
return (this._14944794TowerSpriteBlockY);
}
public function get TowerSpriteBulletStartY():Number{
return (this._1918915079TowerSpriteBulletStartY);
}
public function set CamelSpace(_arg1:int):void{
var _local2:Object;
_local2 = this._202536432CamelSpace;
if (_local2 !== _arg1){
this._202536432CamelSpace = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpace", _local2, _arg1));
};
}
public function get Arrow1SpriteBuyXmlName():String{
return (this._1011151863Arrow1SpriteBuyXmlName);
}
public function get music():String{
return (this._104263205music);
}
public function get TowerSpriteBlockHeight():Number{
return (this._321807398TowerSpriteBlockHeight);
}
public function get Arrow1SpriteBlockX():Number{
return (this._2046540264Arrow1SpriteBlockX);
}
public function get TowerSpriteBlockX():Number{
return (this._14944793TowerSpriteBlockX);
}
public function get CamelSpriteName():String{
return (this._1391232038CamelSpriteName);
}
public function set Arrow3SpriteBuyXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1695467531Arrow3SpriteBuyXmlName;
if (_local2 !== _arg1){
this._1695467531Arrow3SpriteBuyXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBuyXmlName", _local2, _arg1));
};
}
public function get Arrow1SpriteBlockY():Number{
return (this._2046540263Arrow1SpriteBlockY);
}
public function set CamelCount(_arg1:Number):void{
var _local2:Object;
_local2 = this._217322983CamelCount;
if (_local2 !== _arg1){
this._217322983CamelCount = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelCount", _local2, _arg1));
};
}
public function set TowerSpriteBlockY(_arg1:Number):void{
var _local2:Object;
_local2 = this._14944794TowerSpriteBlockY;
if (_local2 !== _arg1){
this._14944794TowerSpriteBlockY = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBlockY", _local2, _arg1));
};
}
public function get Arrow1SpriteXmlName():String{
return (this._942770123Arrow1SpriteXmlName);
}
public function get Arrow3SpriteBuyXmlName():String{
return (this._1695467531Arrow3SpriteBuyXmlName);
}
public function set TowerSpriteBlockX(_arg1:Number):void{
var _local2:Object;
_local2 = this._14944793TowerSpriteBlockX;
if (_local2 !== _arg1){
this._14944793TowerSpriteBlockX = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBlockX", _local2, _arg1));
};
}
public function set TowerSpriteBulletStartY(_arg1:Number):void{
var _local2:Object;
_local2 = this._1918915079TowerSpriteBulletStartY;
if (_local2 !== _arg1){
this._1918915079TowerSpriteBulletStartY = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBulletStartY", _local2, _arg1));
};
}
public function set Arrow3SpriteBlockY(_arg1:Number):void{
var _local2:Object;
_local2 = this._1661621019Arrow3SpriteBlockY;
if (_local2 !== _arg1){
this._1661621019Arrow3SpriteBlockY = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBlockY", _local2, _arg1));
};
}
public function get arrow3Cost():int{
return (this._1771668425arrow3Cost);
}
public function set Arrow1SpriteBlockX(_arg1:Number):void{
var _local2:Object;
_local2 = this._2046540264Arrow1SpriteBlockX;
if (_local2 !== _arg1){
this._2046540264Arrow1SpriteBlockX = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBlockX", _local2, _arg1));
};
}
public function dispatchEvent(_arg1:Event):Boolean{
return (_bindingEventDispatcher.dispatchEvent(_arg1));
}
public function get BulletSpeed():Number{
return (this._301081669BulletSpeed);
}
public function set music(_arg1:String):void{
var _local2:Object;
_local2 = this._104263205music;
if (_local2 !== _arg1){
this._104263205music = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "music", _local2, _arg1));
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_bindingEventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function set Arrow3SpriteBlockX(_arg1:Number):void{
var _local2:Object;
_local2 = this._1661621018Arrow3SpriteBlockX;
if (_local2 !== _arg1){
this._1661621018Arrow3SpriteBlockX = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBlockX", _local2, _arg1));
};
}
public function set Arrow1SpriteBuyName(_arg1:String):void{
var _local2:Object;
_local2 = this._1248024356Arrow1SpriteBuyName;
if (_local2 !== _arg1){
this._1248024356Arrow1SpriteBuyName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBuyName", _local2, _arg1));
};
}
public function set arrow1Multiplier(_arg1:Number):void{
var _local2:Object;
_local2 = this._1361145129arrow1Multiplier;
if (_local2 !== _arg1){
this._1361145129arrow1Multiplier = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow1Multiplier", _local2, _arg1));
};
}
public function get GUIStatsBkg():uint{
return (this._29767258GUIStatsBkg);
}
public function set TowerSpriteBlockHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._321807398TowerSpriteBlockHeight;
if (_local2 !== _arg1){
this._321807398TowerSpriteBlockHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBlockHeight", _local2, _arg1));
};
}
public function get Arrow2SpriteHeight():Number{
return (this._2120159317Arrow2SpriteHeight);
}
public function set Arrow1SpriteBlockY(_arg1:Number):void{
var _local2:Object;
_local2 = this._2046540263Arrow1SpriteBlockY;
if (_local2 !== _arg1){
this._2046540263Arrow1SpriteBlockY = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBlockY", _local2, _arg1));
};
}
public function get GUIStatsTextColor():uint{
return (this._1990221230GUIStatsTextColor);
}
public function get Arrow3SpriteBuyName():String{
return (this._236907106Arrow3SpriteBuyName);
}
public function get TowerSpriteXmlName():String{
return (this._1461242796TowerSpriteXmlName);
}
public function set CamelSpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1391232038CamelSpriteName;
if (_local2 !== _arg1){
this._1391232038CamelSpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpriteName", _local2, _arg1));
};
}
public function get TumbleweedSpriteName():String{
return (this._1284050028TumbleweedSpriteName);
}
public function get RoadWidth():int{
return (this._1131041382RoadWidth);
}
public function get Arrow3SpriteWidth():Number{
return (this._1174030793Arrow3SpriteWidth);
}
public function set arrow1Cost(_arg1:int):void{
var _local2:Object;
_local2 = this._1773515467arrow1Cost;
if (_local2 !== _arg1){
this._1773515467arrow1Cost = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow1Cost", _local2, _arg1));
};
}
public function set Arrow2SpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1012142791Arrow2SpriteName;
if (_local2 !== _arg1){
this._1012142791Arrow2SpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteName", _local2, _arg1));
};
}
public function get Arrow1SpriteName():String{
return (this._784808568Arrow1SpriteName);
}
public function set Arrow1SpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._942770123Arrow1SpriteXmlName;
if (_local2 !== _arg1){
this._942770123Arrow1SpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteXmlName", _local2, _arg1));
};
}
public function set arrow3Cost(_arg1:int):void{
var _local2:Object;
_local2 = this._1771668425arrow3Cost;
if (_local2 !== _arg1){
this._1771668425arrow3Cost = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow3Cost", _local2, _arg1));
};
}
public function get GUIButtonTextColor():uint{
return (this._1392937097GUIButtonTextColor);
}
public function set TowerSpriteBuyName(_arg1:String):void{
var _local2:Object;
_local2 = this._729551683TowerSpriteBuyName;
if (_local2 !== _arg1){
this._729551683TowerSpriteBuyName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBuyName", _local2, _arg1));
};
}
public function get BoardId():String{
return (this._1716612737BoardId);
}
public function set BulletSpeed(_arg1:Number):void{
var _local2:Object;
_local2 = this._301081669BulletSpeed;
if (_local2 !== _arg1){
this._301081669BulletSpeed = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpeed", _local2, _arg1));
};
}
public function set arrow2Count(_arg1:int):void{
var _local2:Object;
_local2 = this._884226374arrow2Count;
if (_local2 !== _arg1){
this._884226374arrow2Count = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow2Count", _local2, _arg1));
};
}
public function get BriefingText():String{
return (this._764289387BriefingText);
}
public function get CamelHealth():int{
return (this._1986235026CamelHealth);
}
public function set Arrow3SpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1174030793Arrow3SpriteWidth;
if (_local2 !== _arg1){
this._1174030793Arrow3SpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteWidth", _local2, _arg1));
};
}
public function set GUIButtonDarkBorder(_arg1:uint):void{
var _local2:Object;
_local2 = this._722489167GUIButtonDarkBorder;
if (_local2 !== _arg1){
this._722489167GUIButtonDarkBorder = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIButtonDarkBorder", _local2, _arg1));
};
}
public function get Arrow2SpriteBlockX():Number{
return (this._1955024025Arrow2SpriteBlockX);
}
public function get Arrow2SpriteBlockY():Number{
return (this._1955024026Arrow2SpriteBlockY);
}
public function set CamelSpeed(_arg1:Number):void{
var _local2:Object;
_local2 = this._202532527CamelSpeed;
if (_local2 !== _arg1){
this._202532527CamelSpeed = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpeed", _local2, _arg1));
};
}
public function set SniperTimeout(_arg1:Number):void{
var _local2:Object;
_local2 = this._1793893714SniperTimeout;
if (_local2 !== _arg1){
this._1793893714SniperTimeout = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "SniperTimeout", _local2, _arg1));
};
}
public function get arrow1Count():int{
return (this._855597223arrow1Count);
}
public function set TowerSpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1461242796TowerSpriteXmlName;
if (_local2 !== _arg1){
this._1461242796TowerSpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteXmlName", _local2, _arg1));
};
}
public function set GUIMoneyTextColor(_arg1:uint):void{
var _local2:Object;
_local2 = this._101360815GUIMoneyTextColor;
if (_local2 !== _arg1){
this._101360815GUIMoneyTextColor = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIMoneyTextColor", _local2, _arg1));
};
}
public function set Arrow2SpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._2120159317Arrow2SpriteHeight;
if (_local2 !== _arg1){
this._2120159317Arrow2SpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteHeight", _local2, _arg1));
};
}
public function get arrow3Multiplier():Number{
return (this._2062209707arrow3Multiplier);
}
public function set TowerSpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._257318056TowerSpriteWidth;
if (_local2 !== _arg1){
this._257318056TowerSpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteWidth", _local2, _arg1));
};
}
public function get Arrow2SpriteBuyXmlName():String{
return (this._342157834Arrow2SpriteBuyXmlName);
}
public function set sniperCost(_arg1:int):void{
var _local2:Object;
_local2 = this._449124004sniperCost;
if (_local2 !== _arg1){
this._449124004sniperCost = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "sniperCost", _local2, _arg1));
};
}
public function get TowerSpriteName():String{
return (this._1931086521TowerSpriteName);
}
public function get BulletSpriteHeight():Number{
return (this._2048957070BulletSpriteHeight);
}
public function set GUIStatsTextColor(_arg1:uint):void{
var _local2:Object;
_local2 = this._1990221230GUIStatsTextColor;
if (_local2 !== _arg1){
this._1990221230GUIStatsTextColor = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIStatsTextColor", _local2, _arg1));
};
}
public function get StartTimeout():Number{
return (this._1284037953StartTimeout);
}
public function get GUIButtonBorder():uint{
return (this._318272185GUIButtonBorder);
}
public function get Arrow2SpriteBuyName():String{
return (this._742465731Arrow2SpriteBuyName);
}
public function set Arrow3SpriteBuyName(_arg1:String):void{
var _local2:Object;
_local2 = this._236907106Arrow3SpriteBuyName;
if (_local2 !== _arg1){
this._236907106Arrow3SpriteBuyName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBuyName", _local2, _arg1));
};
}
public function get TumbleweedSpriteHeight():Number{
return (this._1148268232TumbleweedSpriteHeight);
}
public function set CamelReward(_arg1:int):void{
var _local2:Object;
_local2 = this._2021795995CamelReward;
if (_local2 !== _arg1){
this._2021795995CamelReward = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelReward", _local2, _arg1));
};
}
public function get BulletSpriteRotate():Boolean{
return (this._1950161214BulletSpriteRotate);
}
public function get KillsToContinue():int{
return (this._201683671KillsToContinue);
}
public function get TowerRadius():int{
return (this._830292773TowerRadius);
}
public function get BulletSpriteXmlName():String{
return (this._639368891BulletSpriteXmlName);
}
public function set TumbleweedSpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1284050028TumbleweedSpriteName;
if (_local2 !== _arg1){
this._1284050028TumbleweedSpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TumbleweedSpriteName", _local2, _arg1));
};
}
public function set GUIStatsBkg(_arg1:uint):void{
var _local2:Object;
_local2 = this._29767258GUIStatsBkg;
if (_local2 !== _arg1){
this._29767258GUIStatsBkg = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIStatsBkg", _local2, _arg1));
};
}
public function get arrow2Cost():int{
return (this._1772591946arrow2Cost);
}
public function get Arrow3SpriteHeight():Number{
return (this._1826756310Arrow3SpriteHeight);
}
public function get TowerSpriteBlockWidth():Number{
return (this._2102558439TowerSpriteBlockWidth);
}
public function set Arrow3SpriteBlockWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1631215464Arrow3SpriteBlockWidth;
if (_local2 !== _arg1){
this._1631215464Arrow3SpriteBlockWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBlockWidth", _local2, _arg1));
};
}
public function set Arrow3SpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1953887373Arrow3SpriteXmlName;
if (_local2 !== _arg1){
this._1953887373Arrow3SpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteXmlName", _local2, _arg1));
};
}
public function set Arrow1SpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._784808568Arrow1SpriteName;
if (_local2 !== _arg1){
this._784808568Arrow1SpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteName", _local2, _arg1));
};
}
public function set Arrow1SpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1432196231Arrow1SpriteWidth;
if (_local2 !== _arg1){
this._1432196231Arrow1SpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteWidth", _local2, _arg1));
};
}
public function get Arrow2SpriteWidth():Number{
return (this._1303113512Arrow2SpriteWidth);
}
public function set Arrow2SpriteBlockWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._277905767Arrow2SpriteBlockWidth;
if (_local2 !== _arg1){
this._277905767Arrow2SpriteBlockWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBlockWidth", _local2, _arg1));
};
}
public function set BulletSpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._495704959BulletSpriteWidth;
if (_local2 !== _arg1){
this._495704959BulletSpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpriteWidth", _local2, _arg1));
};
}
public function set BoardId(_arg1:String):void{
var _local2:Object;
_local2 = this._1716612737BoardId;
if (_local2 !== _arg1){
this._1716612737BoardId = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BoardId", _local2, _arg1));
};
}
public function hasEventListener(_arg1:String):Boolean{
return (_bindingEventDispatcher.hasEventListener(_arg1));
}
public function set RoadWidth(_arg1:int):void{
var _local2:Object;
_local2 = this._1131041382RoadWidth;
if (_local2 !== _arg1){
this._1131041382RoadWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "RoadWidth", _local2, _arg1));
};
}
public function get BerserkTimeout():Number{
return (this._1942998265BerserkTimeout);
}
public function set Arrow1SpriteBlockWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1075403930Arrow1SpriteBlockWidth;
if (_local2 !== _arg1){
this._1075403930Arrow1SpriteBlockWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBlockWidth", _local2, _arg1));
};
}
public function set Arrow1SpriteBlockHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._589221767Arrow1SpriteBlockHeight;
if (_local2 !== _arg1){
this._589221767Arrow1SpriteBlockHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteBlockHeight", _local2, _arg1));
};
}
public function set GUIButtonTextColor(_arg1:uint):void{
var _local2:Object;
_local2 = this._1392937097GUIButtonTextColor;
if (_local2 !== _arg1){
this._1392937097GUIButtonTextColor = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIButtonTextColor", _local2, _arg1));
};
}
public function get Arrow3SpriteBlockX():Number{
return (this._1661621018Arrow3SpriteBlockX);
}
public function set TowerSpriteBuyXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._2128156790TowerSpriteBuyXmlName;
if (_local2 !== _arg1){
this._2128156790TowerSpriteBuyXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBuyXmlName", _local2, _arg1));
};
}
public function set BulletSpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._2048957070BulletSpriteHeight;
if (_local2 !== _arg1){
this._2048957070BulletSpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpriteHeight", _local2, _arg1));
};
}
public function set CamelSpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._187062155CamelSpriteWidth;
if (_local2 !== _arg1){
this._187062155CamelSpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpriteWidth", _local2, _arg1));
};
}
public function get arrow1Multiplier():Number{
return (this._1361145129arrow1Multiplier);
}
public function set CamelHealth(_arg1:int):void{
var _local2:Object;
_local2 = this._1986235026CamelHealth;
if (_local2 !== _arg1){
this._1986235026CamelHealth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelHealth", _local2, _arg1));
};
}
public function Init(_arg1:XML):void{
mRootNode = _arg1;
BriefingTitle = String(mRootNode.child("briefingTitle")[0]);
BriefingText = String(mRootNode.child("briefingText")[0]);
BoardId = String(mRootNode.child("boardId")[0]);
CashToContinue = int(mRootNode.child("cashToContinue")[0]);
KillsToContinue = int(mRootNode.child("killsToContinue")[0]);
music = String(mRootNode.attribute("music")[0]);
StartTimeout = Number(mRootNode.child("timeOut")[0]);
SniperTimeout = Number(mRootNode.child("sniperTimeOut")[0]);
BerserkTimeout = Number(mRootNode.child("berserkTimeOut")[0]);
CamelCount = int(mRootNode.child("camelCount")[0]);
CamelSpeed = Number(mRootNode.child("camelSpeed")[0]);
CamelReward = int(mRootNode.child("camelReward")[0]);
CamelSpace = int(mRootNode.child("camelSpace")[0]);
CamelHealth = int(mRootNode.child("camelHealth")[0]);
TowerShootInterval = int(mRootNode.child("towerMinShootInterval")[0]);
TowerRadius = int(mRootNode.child("towerRadius")[0]);
TowerDamage = int(mRootNode.child("towerMinDamage")[0]);
TowerCount = int(mRootNode.child("towerMaxCount")[0]);
RoadWidth = int(mRootNode.child("roadWidth")[0]);
BulletSpeed = Number(mRootNode.child("bulletSpeed")[0]);
berserkCost = int(mRootNode.child("berserkCost")[0]);
sniperCost = int(mRootNode.child("sniperCost")[0]);
arrow1Cost = int(mRootNode.child("arrow1Cost")[0]);
arrow2Cost = int(mRootNode.child("arrow2Cost")[0]);
arrow3Cost = int(mRootNode.child("arrow3Cost")[0]);
arrow1Count = int(mRootNode.child("arrow1Count")[0]);
arrow2Count = int(mRootNode.child("arrow2Count")[0]);
arrow3Count = int(mRootNode.child("arrow3Count")[0]);
arrow1Multiplier = Number(mRootNode.child("arrow1Multiplier")[0]);
arrow2Multiplier = Number(mRootNode.child("arrow2Multiplier")[0]);
arrow3Multiplier = Number(mRootNode.child("arrow3Multiplier")[0]);
TowerSpriteBlockWidth = Number(mRootNode.child("TowerSprite")[0].attribute("blockWidth")[0]);
TowerSpriteBlockHeight = Number(mRootNode.child("TowerSprite")[0].attribute("blockHeight")[0]);
TowerSpriteBlockX = Number(mRootNode.child("TowerSprite")[0].attribute("blockX")[0]);
TowerSpriteBlockY = Number(mRootNode.child("TowerSprite")[0].attribute("blockY")[0]);
TowerSpriteWidth = Number(mRootNode.child("TowerSprite")[0].attribute("width")[0]);
TowerSpriteHeight = Number(mRootNode.child("TowerSprite")[0].attribute("height")[0]);
TowerSpriteBulletStartX = Number(mRootNode.child("TowerSprite")[0].attribute("bulletStartX")[0]);
TowerSpriteBulletStartY = Number(mRootNode.child("TowerSprite")[0].attribute("bulletStartY")[0]);
TowerSpriteName = String(mRootNode.child("TowerSprite")[0].attribute("imageName")[0]);
TowerSpriteBuyName = String(mRootNode.child("TowerSprite")[0].attribute("buyImageName")[0]);
TowerSpriteXmlName = String(mRootNode.child("TowerSprite")[0].attribute("xmlName")[0]);
TowerSpriteBuyXmlName = String(mRootNode.child("TowerSprite")[0].attribute("buyXmlName")[0]);
CamelSpriteWidth = Number(mRootNode.child("CamelSprite")[0].attribute("width")[0]);
CamelSpriteHeight = Number(mRootNode.child("CamelSprite")[0].attribute("height")[0]);
CamelSpriteName = String(mRootNode.child("CamelSprite")[0].attribute("imageName")[0]);
CamelSpriteXmlName = String(mRootNode.child("CamelSprite")[0].attribute("xmlName")[0]);
BulletSpriteWidth = Number(mRootNode.child("BulletSprite")[0].attribute("width")[0]);
BulletSpriteHeight = Number(mRootNode.child("BulletSprite")[0].attribute("height")[0]);
BulletSpriteName = String(mRootNode.child("BulletSprite")[0].attribute("imageName")[0]);
BulletSpriteXmlName = String(mRootNode.child("BulletSprite")[0].attribute("xmlName")[0]);
BulletSpriteRotate = (String(mRootNode.child("BulletSprite")[0].attribute("rotate")[0]) == "true");
TumbleweedSpriteWidth = Number(mRootNode.child("TumbleweedSprite")[0].attribute("width")[0]);
TumbleweedSpriteHeight = Number(mRootNode.child("TumbleweedSprite")[0].attribute("height")[0]);
TumbleweedSpriteName = String(mRootNode.child("TumbleweedSprite")[0].attribute("imageName")[0]);
TumbleweedSpriteXmlName = String(mRootNode.child("TumbleweedSprite")[0].attribute("xmlName")[0]);
Arrow1SpriteBlockWidth = Number(mRootNode.child("Arrow1Sprite")[0].attribute("blockWidth")[0]);
Arrow1SpriteBlockHeight = Number(mRootNode.child("Arrow1Sprite")[0].attribute("blockHeight")[0]);
Arrow1SpriteBlockX = Number(mRootNode.child("Arrow1Sprite")[0].attribute("blockX")[0]);
Arrow1SpriteBlockY = Number(mRootNode.child("Arrow1Sprite")[0].attribute("blockY")[0]);
Arrow1SpriteWidth = Number(mRootNode.child("Arrow1Sprite")[0].attribute("width")[0]);
Arrow1SpriteHeight = Number(mRootNode.child("Arrow1Sprite")[0].attribute("height")[0]);
Arrow1SpriteName = String(mRootNode.child("Arrow1Sprite")[0].attribute("imageName")[0]);
Arrow1SpriteBuyName = String(mRootNode.child("Arrow1Sprite")[0].attribute("buyImageName")[0]);
Arrow1SpriteXmlName = String(mRootNode.child("Arrow1Sprite")[0].attribute("xmlName")[0]);
Arrow1SpriteBuyXmlName = String(mRootNode.child("Arrow1Sprite")[0].attribute("buyXmlName")[0]);
Arrow2SpriteBlockWidth = Number(mRootNode.child("Arrow2Sprite")[0].attribute("blockWidth")[0]);
Arrow2SpriteBlockHeight = Number(mRootNode.child("Arrow2Sprite")[0].attribute("blockHeight")[0]);
Arrow2SpriteBlockX = Number(mRootNode.child("Arrow2Sprite")[0].attribute("blockX")[0]);
Arrow2SpriteBlockY = Number(mRootNode.child("Arrow2Sprite")[0].attribute("blockY")[0]);
Arrow2SpriteWidth = Number(mRootNode.child("Arrow2Sprite")[0].attribute("width")[0]);
Arrow2SpriteHeight = Number(mRootNode.child("Arrow2Sprite")[0].attribute("height")[0]);
Arrow2SpriteName = String(mRootNode.child("Arrow2Sprite")[0].attribute("imageName")[0]);
Arrow2SpriteBuyName = String(mRootNode.child("Arrow2Sprite")[0].attribute("buyImageName")[0]);
Arrow2SpriteXmlName = String(mRootNode.child("Arrow2Sprite")[0].attribute("xmlName")[0]);
Arrow2SpriteBuyXmlName = String(mRootNode.child("Arrow2Sprite")[0].attribute("buyXmlName")[0]);
Arrow3SpriteBlockWidth = Number(mRootNode.child("Arrow3Sprite")[0].attribute("blockWidth")[0]);
Arrow3SpriteBlockHeight = Number(mRootNode.child("Arrow3Sprite")[0].attribute("blockHeight")[0]);
Arrow3SpriteBlockX = Number(mRootNode.child("Arrow3Sprite")[0].attribute("blockX")[0]);
Arrow3SpriteBlockY = Number(mRootNode.child("Arrow3Sprite")[0].attribute("blockY")[0]);
Arrow3SpriteWidth = Number(mRootNode.child("Arrow3Sprite")[0].attribute("width")[0]);
Arrow3SpriteHeight = Number(mRootNode.child("Arrow3Sprite")[0].attribute("height")[0]);
Arrow3SpriteName = String(mRootNode.child("Arrow3Sprite")[0].attribute("imageName")[0]);
Arrow3SpriteBuyName = String(mRootNode.child("Arrow3Sprite")[0].attribute("buyImageName")[0]);
Arrow3SpriteXmlName = String(mRootNode.child("Arrow3Sprite")[0].attribute("xmlName")[0]);
Arrow3SpriteBuyXmlName = String(mRootNode.child("Arrow3Sprite")[0].attribute("buyXmlName")[0]);
GUIStatsBkg = Number(mRootNode.child("GUI")[0].attribute("statsBkg")[0]);
GUIButtonBorder = Number(mRootNode.child("GUI")[0].attribute("buttonBorder")[0]);
GUIButtonDarkBorder = Number(mRootNode.child("GUI")[0].attribute("buttonDarkBorder")[0]);
GUIButtonBkg = Number(mRootNode.child("GUI")[0].attribute("buttonBkg")[0]);
GUIButtonTextColor = Number(mRootNode.child("GUI")[0].attribute("buttonTextColor")[0]);
GUIStatsTextColor = Number(mRootNode.child("GUI")[0].attribute("statsTextColor")[0]);
GUIMoneyTextColor = Number(mRootNode.child("GUI")[0].attribute("moneyTextColor")[0]);
}
public function set BriefingText(_arg1:String):void{
var _local2:Object;
_local2 = this._764289387BriefingText;
if (_local2 !== _arg1){
this._764289387BriefingText = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BriefingText", _local2, _arg1));
};
}
public function set Arrow2SpriteBlockX(_arg1:Number):void{
var _local2:Object;
_local2 = this._1955024025Arrow2SpriteBlockX;
if (_local2 !== _arg1){
this._1955024025Arrow2SpriteBlockX = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBlockX", _local2, _arg1));
};
}
public function get arrow1Cost():int{
return (this._1773515467arrow1Cost);
}
public function get Arrow2SpriteName():String{
return (this._1012142791Arrow2SpriteName);
}
public function set Arrow2SpriteBlockY(_arg1:Number):void{
var _local2:Object;
_local2 = this._1955024026Arrow2SpriteBlockY;
if (_local2 !== _arg1){
this._1955024026Arrow2SpriteBlockY = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBlockY", _local2, _arg1));
};
}
public function get Arrow1SpriteBuyName():String{
return (this._1248024356Arrow1SpriteBuyName);
}
public function set TowerShootInterval(_arg1:int):void{
var _local2:Object;
_local2 = this._1590904421TowerShootInterval;
if (_local2 !== _arg1){
this._1590904421TowerShootInterval = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerShootInterval", _local2, _arg1));
};
}
public function get TowerSpriteBuyName():String{
return (this._729551683TowerSpriteBuyName);
}
public function get Arrow3SpriteBlockY():Number{
return (this._1661621019Arrow3SpriteBlockY);
}
public function set TowerCount(_arg1:int):void{
var _local2:Object;
_local2 = this._1622365094TowerCount;
if (_local2 !== _arg1){
this._1622365094TowerCount = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerCount", _local2, _arg1));
};
}
public function set arrow1Count(_arg1:int):void{
var _local2:Object;
_local2 = this._855597223arrow1Count;
if (_local2 !== _arg1){
this._855597223arrow1Count = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow1Count", _local2, _arg1));
};
}
public function get GUIButtonDarkBorder():uint{
return (this._722489167GUIButtonDarkBorder);
}
public function get CamelSpeed():Number{
return (this._202532527CamelSpeed);
}
public function set Arrow2SpriteBlockHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._407850586Arrow2SpriteBlockHeight;
if (_local2 !== _arg1){
this._407850586Arrow2SpriteBlockHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBlockHeight", _local2, _arg1));
};
}
public function set arrow3Multiplier(_arg1:Number):void{
var _local2:Object;
_local2 = this._2062209707arrow3Multiplier;
if (_local2 !== _arg1){
this._2062209707arrow3Multiplier = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow3Multiplier", _local2, _arg1));
};
}
public function get TowerSpriteWidth():Number{
return (this._257318056TowerSpriteWidth);
}
public function get SniperTimeout():Number{
return (this._1793893714SniperTimeout);
}
public function get GUIMoneyTextColor():uint{
return (this._101360815GUIMoneyTextColor);
}
public function get sniperCost():int{
return (this._449124004sniperCost);
}
public function set BulletSpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1955377586BulletSpriteName;
if (_local2 !== _arg1){
this._1955377586BulletSpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpriteName", _local2, _arg1));
};
}
public function get Arrow1SpriteBlockWidth():Number{
return (this._1075403930Arrow1SpriteBlockWidth);
}
public function get Arrow2SpriteBlockWidth():Number{
return (this._277905767Arrow2SpriteBlockWidth);
}
public function set TowerDamage(_arg1:int):void{
var _local2:Object;
_local2 = this._1230840904TowerDamage;
if (_local2 !== _arg1){
this._1230840904TowerDamage = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerDamage", _local2, _arg1));
};
}
public function set TowerSpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1931086521TowerSpriteName;
if (_local2 !== _arg1){
this._1931086521TowerSpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteName", _local2, _arg1));
};
}
public function get CamelReward():int{
return (this._2021795995CamelReward);
}
public function set BulletSpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._639368891BulletSpriteXmlName;
if (_local2 !== _arg1){
this._639368891BulletSpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpriteXmlName", _local2, _arg1));
};
}
public function get Arrow1SpriteWidth():Number{
return (this._1432196231Arrow1SpriteWidth);
}
public function get arrow2Count():int{
return (this._884226374arrow2Count);
}
public function get Arrow3SpriteBlockWidth():Number{
return (this._1631215464Arrow3SpriteBlockWidth);
}
public function set GUIButtonBorder(_arg1:uint):void{
var _local2:Object;
_local2 = this._318272185GUIButtonBorder;
if (_local2 !== _arg1){
this._318272185GUIButtonBorder = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIButtonBorder", _local2, _arg1));
};
}
public function set StartTimeout(_arg1:Number):void{
var _local2:Object;
_local2 = this._1284037953StartTimeout;
if (_local2 !== _arg1){
this._1284037953StartTimeout = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "StartTimeout", _local2, _arg1));
};
}
public function get BulletSpriteWidth():Number{
return (this._495704959BulletSpriteWidth);
}
public function get Arrow1SpriteBlockHeight():Number{
return (this._589221767Arrow1SpriteBlockHeight);
}
public function set TumbleweedSpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1512181311TumbleweedSpriteXmlName;
if (_local2 !== _arg1){
this._1512181311TumbleweedSpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TumbleweedSpriteXmlName", _local2, _arg1));
};
}
public function set Arrow2SpriteBuyName(_arg1:String):void{
var _local2:Object;
_local2 = this._742465731Arrow2SpriteBuyName;
if (_local2 !== _arg1){
this._742465731Arrow2SpriteBuyName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteBuyName", _local2, _arg1));
};
}
public function set TumbleweedSpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._1148268232TumbleweedSpriteHeight;
if (_local2 !== _arg1){
this._1148268232TumbleweedSpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TumbleweedSpriteHeight", _local2, _arg1));
};
}
public function set BulletSpriteRotate(_arg1:Boolean):void{
var _local2:Object;
_local2 = this._1950161214BulletSpriteRotate;
if (_local2 !== _arg1){
this._1950161214BulletSpriteRotate = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BulletSpriteRotate", _local2, _arg1));
};
}
public function set CamelSpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._386377671CamelSpriteXmlName;
if (_local2 !== _arg1){
this._386377671CamelSpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CamelSpriteXmlName", _local2, _arg1));
};
}
public function get TowerShootInterval():int{
return (this._1590904421TowerShootInterval);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_bindingEventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function get Arrow3SpriteXmlName():String{
return (this._1953887373Arrow3SpriteXmlName);
}
public function get TowerSpriteBuyXmlName():String{
return (this._2128156790TowerSpriteBuyXmlName);
}
public function set arrow2Cost(_arg1:int):void{
var _local2:Object;
_local2 = this._1772591946arrow2Cost;
if (_local2 !== _arg1){
this._1772591946arrow2Cost = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow2Cost", _local2, _arg1));
};
}
public function get TowerCount():int{
return (this._1622365094TowerCount);
}
public function set Arrow1SpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._1881404972Arrow1SpriteHeight;
if (_local2 !== _arg1){
this._1881404972Arrow1SpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow1SpriteHeight", _local2, _arg1));
};
}
public function get CamelSpriteWidth():Number{
return (this._187062155CamelSpriteWidth);
}
public function set KillsToContinue(_arg1:int):void{
var _local2:Object;
_local2 = this._201683671KillsToContinue;
if (_local2 !== _arg1){
this._201683671KillsToContinue = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "KillsToContinue", _local2, _arg1));
};
}
public function set Arrow3SpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._1826756310Arrow3SpriteHeight;
if (_local2 !== _arg1){
this._1826756310Arrow3SpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteHeight", _local2, _arg1));
};
}
public function get Arrow2SpriteBlockHeight():Number{
return (this._407850586Arrow2SpriteBlockHeight);
}
public function set Arrow2SpriteWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._1303113512Arrow2SpriteWidth;
if (_local2 !== _arg1){
this._1303113512Arrow2SpriteWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteWidth", _local2, _arg1));
};
}
public function get TowerDamage():int{
return (this._1230840904TowerDamage);
}
public function set TowerSpriteHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._180080085TowerSpriteHeight;
if (_local2 !== _arg1){
this._180080085TowerSpriteHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteHeight", _local2, _arg1));
};
}
public function set GUIButtonBkg(_arg1:uint):void{
var _local2:Object;
_local2 = this._1287138863GUIButtonBkg;
if (_local2 !== _arg1){
this._1287138863GUIButtonBkg = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "GUIButtonBkg", _local2, _arg1));
};
}
public function set Arrow2SpriteXmlName(_arg1:String):void{
var _local2:Object;
_local2 = this._1448328748Arrow2SpriteXmlName;
if (_local2 !== _arg1){
this._1448328748Arrow2SpriteXmlName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow2SpriteXmlName", _local2, _arg1));
};
}
public function get CamelSpriteXmlName():String{
return (this._386377671CamelSpriteXmlName);
}
public function set arrow3Count(_arg1:int):void{
var _local2:Object;
_local2 = this._912855525arrow3Count;
if (_local2 !== _arg1){
this._912855525arrow3Count = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow3Count", _local2, _arg1));
};
}
public function set TowerRadius(_arg1:int):void{
var _local2:Object;
_local2 = this._830292773TowerRadius;
if (_local2 !== _arg1){
this._830292773TowerRadius = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerRadius", _local2, _arg1));
};
}
public function get TumbleweedSpriteXmlName():String{
return (this._1512181311TumbleweedSpriteXmlName);
}
public function get GUIButtonBkg():uint{
return (this._1287138863GUIButtonBkg);
}
public function willTrigger(_arg1:String):Boolean{
return (_bindingEventDispatcher.willTrigger(_arg1));
}
public function set arrow2Multiplier(_arg1:Number):void{
var _local2:Object;
_local2 = this._435806230arrow2Multiplier;
if (_local2 !== _arg1){
this._435806230arrow2Multiplier = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "arrow2Multiplier", _local2, _arg1));
};
}
public function get TowerSpriteHeight():Number{
return (this._180080085TowerSpriteHeight);
}
public function set TowerSpriteBlockWidth(_arg1:Number):void{
var _local2:Object;
_local2 = this._2102558439TowerSpriteBlockWidth;
if (_local2 !== _arg1){
this._2102558439TowerSpriteBlockWidth = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "TowerSpriteBlockWidth", _local2, _arg1));
};
}
public function set Arrow3SpriteBlockHeight(_arg1:Number):void{
var _local2:Object;
_local2 = this._1404922939Arrow3SpriteBlockHeight;
if (_local2 !== _arg1){
this._1404922939Arrow3SpriteBlockHeight = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteBlockHeight", _local2, _arg1));
};
}
public function get BulletSpriteName():String{
return (this._1955377586BulletSpriteName);
}
public function set BriefingTitle(_arg1:String):void{
var _local2:Object;
_local2 = this._2076947952BriefingTitle;
if (_local2 !== _arg1){
this._2076947952BriefingTitle = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "BriefingTitle", _local2, _arg1));
};
}
public function get Arrow1SpriteHeight():Number{
return (this._1881404972Arrow1SpriteHeight);
}
public function get arrow3Count():int{
return (this._912855525arrow3Count);
}
public function get Arrow3SpriteBlockHeight():Number{
return (this._1404922939Arrow3SpriteBlockHeight);
}
public function set CashToContinue(_arg1:int):void{
var _local2:Object;
_local2 = this._1036520459CashToContinue;
if (_local2 !== _arg1){
this._1036520459CashToContinue = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "CashToContinue", _local2, _arg1));
};
}
public function get BriefingTitle():String{
return (this._2076947952BriefingTitle);
}
public function set Arrow3SpriteName(_arg1:String):void{
var _local2:Object;
_local2 = this._1485873146Arrow3SpriteName;
if (_local2 !== _arg1){
this._1485873146Arrow3SpriteName = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "Arrow3SpriteName", _local2, _arg1));
};
}
public function get CashToContinue():int{
return (this._1036520459CashToContinue);
}
public function get Arrow2SpriteXmlName():String{
return (this._1448328748Arrow2SpriteXmlName);
}
public function get arrow2Multiplier():Number{
return (this._435806230arrow2Multiplier);
}
public function get Arrow3SpriteName():String{
return (this._1485873146Arrow3SpriteName);
}
}
}//package game
Section 41
//LoadingQueue (game.LoadingQueue)
package game {
import flash.events.*;
import flash.utils.*;
import mx.collections.*;
public class LoadingQueue extends EventDispatcher {
private var mQueue:Dictionary;
public function LoadingQueue():void{
mQueue = new Dictionary();
}
private function CheckQueue(_arg1:String):void{
if (mQueue[_arg1].queue.length < 1){
this.dispatchEvent(new Event(mQueue[_arg1].event));
};
}
public function ObjectLoaded(_arg1:Event):void{
var _local2:Object;
var _local3:Object;
var _local4:int;
(_arg1.currentTarget as EventDispatcher).removeEventListener(_arg1.type, ObjectLoaded, false);
_local2 = _arg1.currentTarget;
for each (_local3 in mQueue) {
_local4 = _local3.queue.getItemIndex(_local2);
if (_local4 >= 0){
_local3.queue.removeItemAt(_local4);
CheckQueue(_local3.event);
};
};
}
public function AddObject(_arg1:String, _arg2:Object):void{
if (!mQueue[_arg1]){
mQueue[_arg1] = {event:_arg1, queue:new ArrayCollection()};
};
mQueue[_arg1].queue.addItem(_arg2);
}
}
}//package game
Section 42
//MochiAd (game.MochiAd)
package game {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
public class MochiAd {
public static function getVersion():String{
return ("2.3");
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {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."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = 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;
};
lv = 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;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
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"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
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 _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
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);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {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");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = 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();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = 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{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (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.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
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 _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 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 createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
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.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, 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");
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){
options.ad_started();
options.ad_finished();
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = 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{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = 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();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = 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;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = 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;
_local1 = (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;
f = 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.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
options.ad_failed();
_local4 = true;
};
};
};
if (this.parent._mochiad_ctr_failed){
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 fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = 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 game
Section 43
//ResourceManager (game.ResourceManager)
package game {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.net.*;
import game.gif.player.*;
import game.components.*;
import flash.utils.*;
public class ResourceManager {
public static var tower:Tower;
public static var bullet:Bullet;
private static var mCachegroup:Dictionary = new Dictionary();
private static var mPreCache:Dictionary = new Dictionary();
public static var camel:Camel;
public static var mResources:Dictionary = new Dictionary();
public static var score:Score;
public static var tumbleweed:Tumbleweed;
public function ResourceManager():void{
}
public static function GetSound(_arg1:String, _arg2:GameSound=null, _arg3:Function=null):GameSound{
var _local4:GameSound;
if (mResources[_arg1]){
return (mResources[_arg1]);
};
if (!_arg2){
_local4 = new GameSound();
} else {
_local4 = _arg2;
};
if (_arg3){
_local4.addEventListener(Event.COMPLETE, _arg3, false, 0, true);
};
_local4.Init(_arg1);
mResources[_arg1] = _local4;
return (_local4);
}
public static function GetResource(_arg1:String):URLLoader{
return (new URLLoader(new URLRequest((GameUtils.BASE_URL + _arg1))));
}
public static function PreCacheResources(_arg1:String):void{
var _local2:Container;
var _local3:Tower;
var _local4:Bullet;
var _local5:Tumbleweed;
var _local6:Camel;
var _local7:Score;
var _local8:Aim;
var _local9:CorovanButton;
var _local10:CorovanButton;
var _local11:CorovanButton;
var _local12:CorovanButton;
var _local13:CorovanButton;
var _local14:CorovanButton;
var _local15:Arrow1Building;
var _local16:Arrow2Building;
var _local17:Arrow3Building;
var _local18:GameSound;
if (mCachegroup[_arg1]){
GameUtils.GetGameCore().GetLoadingQueue().addEventListener("precache", PreCacheFinished, false, 0, true);
GameUtils.GetGameCore().GetLoadingQueue().dispatchEvent(new Event("precache"));
return;
};
mCachegroup[_arg1] = true;
_local2 = new Container();
_local2.initialize();
_local2.visible = false;
_local2.name = "tempContainer";
GameUtils.GetGameCore().GetMainForm().addChild(_local2);
_local3 = new Tower();
_local2.addChild(_local3);
_local4 = new Bullet();
_local2.addChild(_local4);
_local5 = new Tumbleweed();
_local2.addChild(_local5);
_local6 = new Camel();
_local2.addChild(_local6);
_local7 = new Score();
_local2.addChild(_local7);
_local8 = new Aim();
_local2.addChild(_local8);
_local9 = new CorovanButton();
_local2.addChild(_local9);
_local10 = new CorovanButton();
_local2.addChild(_local10);
_local11 = new CorovanButton();
_local2.addChild(_local11);
_local12 = new CorovanButton();
_local2.addChild(_local12);
_local13 = new CorovanButton();
_local2.addChild(_local13);
_local14 = new CorovanButton();
_local2.addChild(_local14);
_local15 = new Arrow1Building();
_local2.addChild(_local15);
_local16 = new Arrow2Building();
_local2.addChild(_local16);
_local17 = new Arrow3Building();
_local2.addChild(_local17);
if (GameUtils.GetGameCore().IsMusicEnabled()){
_local18 = new GameSound();
};
GameUtils.GetGameCore().GetLoadingQueue().addEventListener("precache", PreCacheFinished, false, 0, true);
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local3.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local4.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local5.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local6.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local7.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local8.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local9.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local10.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local11.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local12.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local13.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local14.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local15.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local16.idAnimation.GetGIFPlayer());
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local17.idAnimation.GetGIFPlayer());
if (GameUtils.GetGameCore().IsMusicEnabled()){
GameUtils.GetGameCore().GetLoadingQueue().AddObject("precache", _local18);
};
_local3.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteXmlName, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().TowerSpriteName] = _local3;
_local4.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteXmlName, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().BulletSpriteName] = _local4;
_local5.Init(null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().TumbleweedSpriteName] = _local5;
_local6.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteName, GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteXmlName, 0, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, null, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().CamelSpriteName] = _local6;
_local7.Init(null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache["animations/Coin.gif"] = _local7;
_local8.Init(null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache["animations/Aim.gif"] = _local8;
_local9.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBuyXmlName, null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteBuyName] = _local9;
_local10.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBuyXmlName, null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteBuyName] = _local10;
_local11.Init(GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBuyName, GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBuyXmlName, null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteBuyName] = _local11;
_local12.Init("animations/buttons/button4.gif", "animations/buttons/button.xml", null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache["animations/buttons/button4.gif"] = _local12;
_local13.Init("animations/buttons/button5.gif", "animations/buttons/button.xml", null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache["animations/buttons/button5.gif"] = _local13;
_local14.Init("animations/buttons/button6.gif", "animations/buttons/button.xml", null, null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache["animations/buttons/button6.gif"] = _local14;
_local15.Init("", "", null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow1SpriteName] = _local15;
_local16.Init("", "", null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow2SpriteName] = _local16;
_local17.Init("", "", null, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded, false);
mPreCache[GameUtils.GetGameCore().GetCurrentLevelSettings().Arrow3SpriteName] = _local17;
if (GameUtils.GetGameCore().IsMusicEnabled()){
GetSound(GameUtils.GetGameCore().GetCurrentLevelSettings().music, _local18, GameUtils.GetGameCore().GetLoadingQueue().ObjectLoaded);
};
}
public static function LoadGIFFromCache(_arg1:GIFPlayer, _arg2:String):Boolean{
var _local3:GIFPlayer;
if (!mPreCache[_arg2]){
return (false);
};
_local3 = mPreCache[_arg2].idAnimation.GetGIFPlayer();
_arg1.setDecoder(_local3.getDecoder());
if (_arg1.autoPlay){
_arg1.play();
};
return (true);
}
public static function GetLoader(_arg1:String, _arg2:Function=null):Loader{
var _local3:Loader;
var _local4:Loader;
if (mResources[_arg1]){
_local4 = (mResources[_arg1] as Loader);
if (_arg2){
_local4.addEventListener(Event.COMPLETE, _arg2, false, 0, true);
};
if ((((_local4.contentLoaderInfo.bytesLoaded > 0)) && ((_local4.contentLoaderInfo.bytesLoaded == _local4.contentLoaderInfo.bytesTotal)))){
_local4.dispatchEvent(new Event(Event.COMPLETE));
};
return (_local4);
};
_local3 = new Loader();
if (_arg2){
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, _arg2, false, 0, true);
};
_local3.load(GetResourceRequest(_arg1));
mResources[_arg1] = _local3;
return (_local3);
}
private static function PreCacheFinished(_arg1:Event):void{
var _local2:Container;
GameUtils.GetGameCore().GetLoadingQueue().removeEventListener("precache", PreCacheFinished, false);
_local2 = (GameUtils.GetGameCore().GetMainForm().getChildByName("tempContainer") as Container);
if (_local2){
_local2.removeAllChildren();
GameUtils.GetGameCore().GetMainForm().removeChild(_local2);
};
}
public static function GetResourceRequest(_arg1:String):URLRequest{
var _local2:String;
_local2 = (GameUtils.BASE_URL + _arg1);
return (new URLRequest(_local2));
}
public static function GetURLLoader(_arg1:String, _arg2:Function=null):URLLoader{
var _local3:URLLoader;
var _local4:URLLoader;
if (mResources[_arg1]){
_local4 = (mResources[_arg1] as URLLoader);
if (_arg2){
_local4.addEventListener(Event.COMPLETE, _arg2, false, 0, true);
};
if ((((_local4.bytesLoaded > 0)) && ((_local4.bytesLoaded == _local4.bytesTotal)))){
_local4.dispatchEvent(new Event(Event.COMPLETE));
};
return (_local4);
};
_local3 = new URLLoader();
_local3.dataFormat = URLLoaderDataFormat.BINARY;
if (_arg2){
_local3.addEventListener(Event.COMPLETE, _arg2, false, 0, true);
};
_local3.load(GetResourceRequest(_arg1));
mResources[_arg1] = _local3;
return (_local3);
}
}
}//package game
Section 44
//IAutomationObject (mx.automation.IAutomationObject)
package mx.automation {
import flash.events.*;
public interface IAutomationObject {
function createAutomationIDPart(_arg1:IAutomationObject):Object;
function get automationName():String;
function get automationDelegate():Object;
function set automationName(_arg1:String):void;
function getAutomationChildAt(_arg1:int):IAutomationObject;
function get showInAutomationHierarchy():Boolean;
function get automationTabularData():Object;
function resolveAutomationIDPart(_arg1:Object):Array;
function replayAutomatableEvent(_arg1:Event):Boolean;
function set automationDelegate(_arg1:Object):void;
function get automationValue():Array;
function get numAutomationChildren():int;
function set showInAutomationHierarchy(_arg1:Boolean):void;
}
}//package mx.automation
Section 45
//BindabilityInfo (mx.binding.BindabilityInfo)
package mx.binding {
import mx.events.*;
public class BindabilityInfo {
private var typeDescription:XML;
private var childChangeEvents:Object;
private var classChangeEvents:Object;
public static const METHOD:String = "method";
public static const ACCESSOR:String = "accessor";
public static const CHANGE_EVENT:String = "ChangeEvent";
public static const NON_COMMITTING_CHANGE_EVENT:String = "NonCommittingChangeEvent";
public static const BINDABLE:String = "Bindable";
mx_internal static const VERSION:String = "2.0.1.0";
public static const MANAGED:String = "Managed";
public function BindabilityInfo(_arg1:XML){
childChangeEvents = {};
super();
this.typeDescription = _arg1;
}
private function getClassChangeEvents():Object{
if (!classChangeEvents){
classChangeEvents = {};
addBindabilityEvents(typeDescription.metadata, classChangeEvents);
if (typeDescription.metadata.(@name == MANAGED).length() > 0){
classChangeEvents[PropertyChangeEvent.PROPERTY_CHANGE] = true;
};
};
return (classChangeEvents);
}
private function addBindabilityEvents(_arg1:XMLList, _arg2:Object):void{
var metadata = _arg1;
var eventListObj = _arg2;
addChangeEvents(metadata.(@name == BINDABLE), eventListObj, true);
addChangeEvents(metadata.(@name == CHANGE_EVENT), eventListObj, true);
addChangeEvents(metadata.(@name == NON_COMMITTING_CHANGE_EVENT), eventListObj, false);
}
private function addChangeEvents(_arg1:XMLList, _arg2:Object, _arg3:Boolean):void{
var _local4:XML;
var _local5:XMLList;
var _local6:String;
for each (_local4 in _arg1) {
_local5 = _local4.arg;
if (_local5.length() > 0){
_local6 = _local5[0].@value;
_arg2[_local6] = _arg3;
} else {
trace((("warning: unconverted Bindable metadata in class '" + typeDescription.@name) + "'"));
};
};
}
private function copyProps(_arg1:Object, _arg2:Object):Object{
var _local3:String;
for (_local3 in _arg1) {
_arg2[_local3] = _arg1[_local3];
};
return (_arg2);
}
public function getChangeEvents(_arg1:String):Object{
var changeEvents:Object;
var childDesc:XMLList;
var numChildren:int;
var childName = _arg1;
changeEvents = childChangeEvents[childName];
if (!changeEvents){
changeEvents = copyProps(getClassChangeEvents(), {});
childDesc = (typeDescription.accessor.(@name == childName) + typeDescription.method.(@name == childName));
numChildren = childDesc.length();
if (numChildren == 0){
if (!typeDescription.@dynamic){
trace((((("warning: no describeType entry for '" + childName) + "' on non-dynamic type '") + typeDescription.@name) + "'"));
};
} else {
if (numChildren > 1){
trace(((((("warning: multiple describeType entries for '" + childName) + "' on type '") + typeDescription.@name) + "':\n") + childDesc));
};
addBindabilityEvents(childDesc.metadata, changeEvents);
};
childChangeEvents[childName] = changeEvents;
};
return (changeEvents);
}
}
}//package mx.binding
Section 46
//Binding (mx.binding.Binding)
package mx.binding {
import mx.collections.errors.*;
public class Binding {
mx_internal var destFunc:Function;
mx_internal var srcFunc:Function;
mx_internal var destString:String;
mx_internal var document:Object;
private var hasHadValue:Boolean;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
private var wrappedFunctionSuccessful:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){
this.document = _arg1;
this.srcFunc = _arg2;
this.destFunc = _arg3;
this.destString = _arg4;
isExecuting = false;
isHandlingEvent = false;
hasHadValue = false;
uiComponentWatcher = -1;
BindingManager.addBinding(_arg1, _arg4, this);
}
public function watcherFired(_arg1:Boolean, _arg2:int):void{
var commitEvent = _arg1;
var cloneIndex = _arg2;
if (isHandlingEvent){
return;
};
try {
isHandlingEvent = true;
execute(cloneIndex);
} finally {
isHandlingEvent = false;
};
}
protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{
var result:Object;
var thisArg = _arg1;
var wrappedFunction = _arg2;
var object = _arg3;
var args = _args;
wrappedFunctionSuccessful = false;
try {
result = wrappedFunction.apply(thisArg, args);
wrappedFunctionSuccessful = true;
return (result);
} catch(itemPendingError:ItemPendingError) {
itemPendingError.addResponder(new EvalBindingResponder(this, object));
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError));
};
} catch(rangeError:RangeError) {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + rangeError));
};
} catch(error:Error) {
if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){
throw (error);
} else {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + error));
};
};
};
return (null);
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg1.length();
if (_local3 == _arg2.length()){
_local4 = 0;
while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) {
_local4++;
};
return ((_local4 == _local3));
//unresolved jump
};
return (false);
}
private function innerExecute():void{
var _local1:Object;
_local1 = wrapFunctionCall(document, srcFunc);
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1));
};
if (((hasHadValue) || (wrappedFunctionSuccessful))){
if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){
destFunc.call(document, _local1);
lastValue = _local1;
hasHadValue = true;
};
};
}
}
}//package mx.binding
Section 47
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "2.0.1.0";
static var debugDestinationStrings:Object = {};
public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:String;
if (((!(_arg2)) || ((_arg2 == "")))){
return;
};
if (((((((_arg1) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){
for (_local4 in _arg1._bindingsByDestination) {
if (_local4.charAt(0) == _arg2.charAt(0)){
if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){
_arg1._bindingsByDestination[_local4].execute(_arg3);
};
};
};
};
}
public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{
if (!_arg1._bindingsByDestination){
_arg1._bindingsByDestination = {};
_arg1._bindingsBeginWithWord = {};
};
_arg1._bindingsByDestination[_arg2] = _arg3;
_arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true;
}
public static function debugBinding(_arg1:String):void{
debugDestinationStrings[_arg1] = true;
}
private static function getFirstWord(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = _arg1.indexOf(".");
_local3 = _arg1.indexOf("[");
if (_local2 == _local3){
return (_arg1);
};
_local4 = Math.min(_local2, _local3);
if (_local4 == -1){
_local4 = Math.max(_local2, _local3);
};
return (_arg1.substr(0, _local4));
}
public static function getUIComponentWatcherForDestination(_arg1:Object, _arg2:String):int{
var _local3:String;
if (_arg1._bindingsByDestination){
for (_local3 in _arg1._bindingsByDestination) {
if ((((_local3 == _arg2)) && (!((_arg1._bindingsByDestination[_local3].uiComponentWatcher == -1))))){
return (_arg1._bindingsByDestination[_local3].uiComponentWatcher);
};
};
};
return (-1);
}
}
}//package mx.binding
Section 48
//EvalBindingResponder (mx.binding.EvalBindingResponder)
package mx.binding {
import mx.rpc.*;
public class EvalBindingResponder implements IResponder {
private var binding:Binding;
private var object:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function EvalBindingResponder(_arg1:Binding, _arg2:Object){
this.binding = _arg1;
this.object = _arg2;
}
public function fault(_arg1:Object):void{
}
public function result(_arg1:Object):void{
binding.execute(object);
}
}
}//package mx.binding
Section 49
//FunctionReturnWatcher (mx.binding.FunctionReturnWatcher)
package mx.binding {
import flash.events.*;
import mx.core.*;
public class FunctionReturnWatcher extends Watcher {
private var functionName:String;
private var _functionGetter:Function;
private var events:Object;
private var document:Object;
private var parameterFunction:Function;
private var parentObj:Object;
public var parentWatcher:Watcher;
mx_internal static const VERSION:String = "2.0.1.0";
public function FunctionReturnWatcher(_arg1:String, _arg2:Object, _arg3:Function, _arg4:Object){
this.functionName = _arg1;
this.document = _arg2;
this.parameterFunction = _arg3;
this.events = _arg4;
}
public function set functionGetter(_arg1:Function):void{
_functionGetter = _arg1;
}
public function eventHandler(_arg1:Event):void{
updateFunctionReturn();
notifyListeners(events[_arg1.type]);
}
override public function updateParent(_arg1:Object):void{
if (!(_arg1 is Watcher)){
setupParentObj(_arg1);
} else {
if (_arg1 == parentWatcher){
setupParentObj(parentWatcher.value);
};
};
updateFunctionReturn();
}
public function updateFunctionReturn():void{
wrapUpdate(function ():void{
if (_functionGetter != null){
value = _functionGetter(functionName).apply(parentObj, parameterFunction.apply(document));
} else {
value = parentObj[functionName].apply(parentObj, parameterFunction.apply(document));
};
updateChildren();
});
}
override protected function shallowClone():Watcher{
var _local1:FunctionReturnWatcher;
_local1 = new FunctionReturnWatcher(functionName, document, parameterFunction, events);
if (_functionGetter != null){
_local1.functionGetter = _functionGetter;
};
return (_local1);
}
private function setupParentObj(_arg1:Object):void{
var _local2:IEventDispatcher;
var _local3:String;
if (((((!((parentObj == null))) && ((parentObj is IEventDispatcher)))) && (!((events == null))))){
_local2 = (parentObj as IEventDispatcher);
for (_local3 in events) {
_local2.removeEventListener(_local3, eventHandler);
};
};
parentObj = _arg1;
if (((((!((parentObj == null))) && ((parentObj is IEventDispatcher)))) && (!((events == null))))){
_local2 = (parentObj as IEventDispatcher);
for (_local3 in events) {
if (_local3 != "__NoChangeEvent__"){
_local2.addEventListener(_local3, eventHandler, false, EventPriority.BINDING, true);
};
};
};
}
}
}//package mx.binding
Section 50
//IWatcherSetupUtil (mx.binding.IWatcherSetupUtil)
package mx.binding {
public interface IWatcherSetupUtil {
function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void;
}
}//package mx.binding
Section 51
//PropertyWatcher (mx.binding.PropertyWatcher)
package mx.binding {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import mx.utils.*;
public class PropertyWatcher extends Watcher {
private var useRTTI:Boolean;
protected var events:Object;
private var _propertyGetter:Function;
private var _propertyName:String;
private var parentObj:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function PropertyWatcher(_arg1:String, _arg2:Object){
_propertyName = _arg1;
this.events = _arg2;
useRTTI = !(_arg2);
}
public function set propertyGetter(_arg1:Function):void{
_propertyGetter = _arg1;
}
private function objectIsEmpty(_arg1:Object):Boolean{
var _local2:String;
for (_local2 in _arg1) {
return (false);
};
return (true);
}
private function addParentEventListeners():void{
var _local1:String;
for (_local1 in events) {
if (_local1 != "__NoChangeEvent__"){
parentObj.addEventListener(_local1, eventHandler, false, EventPriority.BINDING, true);
};
};
}
override public function updateParent(_arg1:Object):void{
var _local2:String;
var _local3:BindabilityInfo;
if (((parentObj) && ((parentObj is IEventDispatcher)))){
for (_local2 in events) {
parentObj.removeEventListener(_local2, eventHandler);
};
};
if ((_arg1 is Watcher)){
parentObj = _arg1.value;
} else {
parentObj = _arg1;
};
if (parentObj){
if (useRTTI){
events = {};
if ((parentObj is IEventDispatcher)){
_local3 = DescribeTypeCache.describeType(parentObj).bindabilityInfo;
events = _local3.getChangeEvents(_propertyName);
if (objectIsEmpty(events)){
trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "'"));
} else {
addParentEventListeners();
};
} else {
trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "' (class is not an IEventDispatcher)"));
};
} else {
if ((parentObj is IEventDispatcher)){
addParentEventListeners();
};
};
};
wrapUpdate(updateProperty);
}
public function eventHandler(_arg1:Event):void{
var _local2:Object;
if ((_arg1 is PropertyChangeEvent)){
_local2 = PropertyChangeEvent(_arg1).property;
if (_local2 != _propertyName){
return;
};
};
wrapUpdate(updateProperty);
notifyListeners(events[_arg1.type]);
}
public function get propertyName():String{
return (_propertyName);
}
private function updateProperty():void{
if (parentObj){
if (_propertyName == "this"){
value = parentObj;
} else {
if (_propertyGetter != null){
value = _propertyGetter.apply(parentObj, [_propertyName]);
} else {
value = parentObj[_propertyName];
};
};
} else {
value = null;
};
updateChildren();
}
private function eventNamesToString():String{
var _local1:String;
var _local2:String;
_local1 = " ";
for (_local2 in events) {
_local1 = (_local1 + (_local2 + " "));
};
return (_local1);
}
override protected function shallowClone():Watcher{
var _local1:PropertyWatcher;
_local1 = new PropertyWatcher(_propertyName, events);
if (_propertyGetter != null){
_local1.propertyGetter = _propertyGetter;
};
return (_local1);
}
private function traceInfo():String{
return ((((((("Watcher(" + getQualifiedClassName(parentObj)) + ".") + _propertyName) + "): events = [") + eventNamesToString()) + (useRTTI) ? "] (RTTI)" : "]"));
}
}
}//package mx.binding
Section 52
//Watcher (mx.binding.Watcher)
package mx.binding {
import mx.collections.errors.*;
public class Watcher {
private var listeners:Array;
public var value:Object;
protected var cloneIndex:int;
protected var children:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function Watcher(){
listeners = [];
super();
}
public function removeChildren(_arg1:int):void{
children.splice(_arg1);
}
public function updateChildren():void{
var _local1:int;
var _local2:int;
if (children){
_local1 = children.length;
_local2 = 0;
while (_local2 < _local1) {
children[_local2].updateParent(this);
_local2++;
};
};
}
protected function shallowClone():Watcher{
return (new Watcher());
}
protected function wrapUpdate(_arg1:Function):void{
var wrappedFunction = _arg1;
try {
wrappedFunction.apply(this);
} catch(itemPendingError:ItemPendingError) {
value = null;
} catch(rangeError:RangeError) {
value = null;
} catch(error:Error) {
if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){
throw (error);
};
};
}
private function valueChanged(_arg1:Object):Boolean{
var _local2:String;
if ((((_arg1 == null)) && ((value == null)))){
return (false);
};
_local2 = typeof(value);
if (_local2 == "string"){
if ((((_arg1 == null)) && ((value == "")))){
return (false);
};
return (!((_arg1 == value)));
};
if (_local2 == "number"){
if ((((_arg1 == null)) && ((value == 0)))){
return (false);
};
return (!((_arg1 == value)));
};
if (_local2 == "boolean"){
if ((((_arg1 == null)) && ((value == false)))){
return (false);
};
return (!((_arg1 == value)));
};
return (true);
}
public function notifyListeners(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
_local2 = listeners.length;
_local3 = 0;
while (_local3 < _local2) {
listeners[_local3].watcherFired(_arg1, cloneIndex);
_local3++;
};
}
protected function deepClone(_arg1:int):Watcher{
var _local2:Watcher;
var _local3:int;
var _local4:int;
var _local5:Watcher;
_local2 = shallowClone();
_local2.cloneIndex = _arg1;
_local2.listeners = listeners.concat();
if (children){
_local3 = children.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = children[_local4].deepClone(_arg1);
_local2.addChild(_local5);
_local4++;
};
};
return (_local2);
}
public function updateParent(_arg1:Object):void{
}
public function addChild(_arg1:Watcher):void{
if (!children){
children = [_arg1];
} else {
children.push(_arg1);
};
_arg1.updateParent(this);
}
public function addListener(_arg1:Binding):void{
listeners.push(_arg1);
}
}
}//package mx.binding
Section 53
//CollectionViewError (mx.collections.errors.CollectionViewError)
package mx.collections.errors {
public class CollectionViewError extends Error {
mx_internal static const VERSION:String = "2.0.1.0";
public function CollectionViewError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 54
//CursorError (mx.collections.errors.CursorError)
package mx.collections.errors {
public class CursorError extends Error {
mx_internal static const VERSION:String = "2.0.1.0";
public function CursorError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 55
//ItemPendingError (mx.collections.errors.ItemPendingError)
package mx.collections.errors {
import mx.rpc.*;
public class ItemPendingError extends Error {
private var _responders:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function ItemPendingError(_arg1:String){
super(_arg1);
}
public function addResponder(_arg1:IResponder):void{
if (!_responders){
_responders = [];
};
_responders.push(_arg1);
}
public function get responders():Array{
return (_responders);
}
}
}//package mx.collections.errors
Section 56
//SortError (mx.collections.errors.SortError)
package mx.collections.errors {
public class SortError extends Error {
mx_internal static const VERSION:String = "2.0.1.0";
public function SortError(_arg1:String){
super(_arg1);
}
}
}//package mx.collections.errors
Section 57
//ArrayCollection (mx.collections.ArrayCollection)
package mx.collections {
import flash.utils.*;
public class ArrayCollection extends ListCollectionView implements IExternalizable {
mx_internal static const VERSION:String = "2.0.1.0";
public function ArrayCollection(_arg1:Array=null){
this.source = _arg1;
}
public function writeExternal(_arg1:IDataOutput):void{
if ((list is IExternalizable)){
IExternalizable(list).writeExternal(_arg1);
} else {
_arg1.writeObject(source);
};
}
public function readExternal(_arg1:IDataInput):void{
if ((list is IExternalizable)){
IExternalizable(list).readExternal(_arg1);
} else {
source = (_arg1.readObject() as Array);
};
}
public function get source():Array{
if (((list) && ((list is ArrayList)))){
return (ArrayList(list).source);
};
return (null);
}
public function set source(_arg1:Array):void{
list = new ArrayList(_arg1);
}
}
}//package mx.collections
Section 58
//ArrayList (mx.collections.ArrayList)
package mx.collections {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.resources.*;
import flash.system.*;
import flash.utils.*;
import mx.utils.*;
public class ArrayList extends EventDispatcher implements IList, IExternalizable, IPropertyChangeNotifier {
private var _uid:String;
private var _source:Array;
private var _dispatchEvents:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceOutOfBounds:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain);
public function ArrayList(_arg1:Array=null){
_dispatchEvents = 0;
super();
disableEvents();
this.source = _arg1;
enableEvents();
_uid = UIDUtil.createUID();
}
private function internalDispatchEvent(_arg1:String, _arg2:Object=null, _arg3:int=-1):void{
var _local4:CollectionEvent;
var _local5:PropertyChangeEvent;
if (_dispatchEvents == 0){
if (hasEventListener(CollectionEvent.COLLECTION_CHANGE)){
_local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local4.kind = _arg1;
_local4.items.push(_arg2);
_local4.location = _arg3;
dispatchEvent(_local4);
};
if (((hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)) && ((((_arg1 == CollectionEventKind.ADD)) || ((_arg1 == CollectionEventKind.REMOVE)))))){
_local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.property = _arg3;
if (_arg1 == CollectionEventKind.ADD){
_local5.newValue = _arg2;
} else {
_local5.oldValue = _arg2;
};
dispatchEvent(_local5);
};
};
}
public function removeAll():void{
var _local1:int;
var _local2:int;
if (length > 0){
_local1 = length;
_local2 = 0;
while (_local2 < _local1) {
stopTrackUpdates(source[_local2]);
_local2++;
};
source.splice(0, length);
internalDispatchEvent(CollectionEventKind.RESET);
};
}
public function readExternal(_arg1:IDataInput):void{
source = _arg1.readObject();
}
protected function startTrackUpdates(_arg1:Object):void{
if (((_arg1) && ((_arg1 is IEventDispatcher)))){
IEventDispatcher(_arg1).addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler, false, 0, true);
};
}
public function get source():Array{
return (_source);
}
public function getItemAt(_arg1:int, _arg2:int=0):Object{
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1)));
};
return (source[_arg1]);
}
public function toArray():Array{
return (source.concat());
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
private function disableEvents():void{
_dispatchEvents--;
}
public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
var _local5:PropertyChangeEvent;
_local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.source = _arg1;
_local5.property = _arg2;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
itemUpdateHandler(_local5);
}
public function addItemAt(_arg1:Object, _arg2:int):void{
if ((((_arg2 < 0)) || ((_arg2 > length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2)));
};
source.splice(_arg2, 0, _arg1);
startTrackUpdates(_arg1);
internalDispatchEvent(CollectionEventKind.ADD, _arg1, _arg2);
}
public function setItemAt(_arg1:Object, _arg2:int):Object{
var _local3:Object;
var _local4:Boolean;
var _local5:Boolean;
var _local6:PropertyChangeEvent;
var _local7:CollectionEvent;
if ((((_arg2 < 0)) || ((_arg2 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2)));
};
_local3 = source[_arg2];
source[_arg2] = _arg1;
stopTrackUpdates(_local3);
startTrackUpdates(_arg1);
if (_dispatchEvents == 0){
_local4 = hasEventListener(CollectionEvent.COLLECTION_CHANGE);
_local5 = hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE);
if (((_local4) || (_local5))){
_local6 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local6.kind = PropertyChangeEventKind.UPDATE;
_local6.oldValue = _local3;
_local6.newValue = _arg1;
_local6.property = _arg2;
};
if (_local4){
_local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local7.kind = CollectionEventKind.REPLACE;
_local7.location = _arg2;
_local7.items.push(_local6);
dispatchEvent(_local7);
};
if (_local5){
dispatchEvent(_local6);
};
};
return (_local3);
}
protected function stopTrackUpdates(_arg1:Object):void{
if (((_arg1) && ((_arg1 is IEventDispatcher)))){
IEventDispatcher(_arg1).removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler);
};
}
public function set source(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:CollectionEvent;
if (((_source) && (_source.length))){
_local3 = _source.length;
_local2 = 0;
while (_local2 < _local3) {
stopTrackUpdates(_source[_local2]);
_local2++;
};
};
_source = (_arg1) ? _arg1 : [];
_local3 = _source.length;
_local2 = 0;
while (_local2 < _local3) {
startTrackUpdates(_source[_local2]);
_local2++;
};
if (_dispatchEvents == 0){
_local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local4.kind = CollectionEventKind.RESET;
dispatchEvent(_local4);
};
}
public function removeItem(_arg1:Object):Boolean{
var _local2:int;
var _local3:Boolean;
_local2 = getItemIndex(_arg1);
_local3 = (_local2 >= 0);
if (_local3){
removeItemAt(_local2);
};
return (_local3);
}
public function getItemIndex(_arg1:Object):int{
return (ArrayUtil.getItemIndex(_arg1, source));
}
public function writeExternal(_arg1:IDataOutput):void{
_arg1.writeObject(_source);
}
public function get uid():String{
return (_uid);
}
public function addItem(_arg1:Object):void{
addItemAt(_arg1, length);
}
public function removeItemAt(_arg1:int):Object{
var _local2:Object;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1)));
};
_local2 = source.splice(_arg1, 1)[0];
stopTrackUpdates(_local2);
internalDispatchEvent(CollectionEventKind.REMOVE, _local2, _arg1);
return (_local2);
}
public function get length():int{
if (source){
return (source.length);
};
return (0);
}
protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{
var _local2:PropertyChangeEvent;
var _local3:uint;
internalDispatchEvent(CollectionEventKind.UPDATE, _arg1);
if ((((_dispatchEvents == 0)) && (hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)))){
_local2 = PropertyChangeEvent(_arg1.clone());
_local3 = getItemIndex(_arg1.target);
_local2.property = ((_local3.toString() + ".") + _arg1.property);
dispatchEvent(_local2);
};
}
override public function toString():String{
if (source){
return (source.toString());
};
return (getQualifiedClassName(this));
}
private function enableEvents():void{
_dispatchEvents++;
if (_dispatchEvents > 0){
_dispatchEvents = 0;
};
}
private static function loadResources():void{
resourceOutOfBounds = packageResources.getString("outOfBounds");
}
loadResources();
}
}//package mx.collections
Section 59
//CursorBookmark (mx.collections.CursorBookmark)
package mx.collections {
public class CursorBookmark {
private var _value:Object;
mx_internal static const VERSION:String = "2.0.1.0";
private static var _first:CursorBookmark;
private static var _last:CursorBookmark;
private static var _current:CursorBookmark;
public function CursorBookmark(_arg1:Object){
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function getViewIndex():int{
return (-1);
}
public static function get LAST():CursorBookmark{
if (!_last){
_last = new CursorBookmark("${L}");
};
return (_last);
}
public static function get FIRST():CursorBookmark{
if (!_first){
_first = new CursorBookmark("${F}");
};
return (_first);
}
public static function get CURRENT():CursorBookmark{
if (!_current){
_current = new CursorBookmark("${C}");
};
return (_current);
}
}
}//package mx.collections
Section 60
//ICollectionView (mx.collections.ICollectionView)
package mx.collections {
import flash.events.*;
public interface ICollectionView extends IEventDispatcher {
function refresh():Boolean;
function set sort(_arg1:Sort):void;
function get length():int;
function set filterFunction(_arg1:Function):void;
function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void;
function get filterFunction():Function;
function createCursor():IViewCursor;
function disableAutoUpdate():void;
function enableAutoUpdate():void;
function get sort():Sort;
function contains(_arg1:Object):Boolean;
}
}//package mx.collections
Section 61
//IList (mx.collections.IList)
package mx.collections {
import flash.events.*;
public interface IList extends IEventDispatcher {
function get length():int;
function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void;
function getItemIndex(_arg1:Object):int;
function addItemAt(_arg1:Object, _arg2:int):void;
function removeItemAt(_arg1:int):Object;
function setItemAt(_arg1:Object, _arg2:int):Object;
function addItem(_arg1:Object):void;
function getItemAt(_arg1:int, _arg2:int=0):Object;
function removeAll():void;
function toArray():Array;
}
}//package mx.collections
Section 62
//ItemResponder (mx.collections.ItemResponder)
package mx.collections {
import mx.rpc.*;
public class ItemResponder implements IResponder {
private var _faultHandler:Function;
private var _resultHandler:Function;
private var _token:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function ItemResponder(_arg1:Function, _arg2:Function, _arg3:Object=null){
_resultHandler = _arg1;
_faultHandler = _arg2;
_token = _arg3;
}
public function fault(_arg1:Object):void{
_faultHandler(_arg1, _token);
}
public function result(_arg1:Object):void{
_resultHandler(_arg1, _token);
}
}
}//package mx.collections
Section 63
//IViewCursor (mx.collections.IViewCursor)
package mx.collections {
import flash.events.*;
public interface IViewCursor extends IEventDispatcher {
function moveNext():Boolean;
function get view():ICollectionView;
function insert(_arg1:Object):void;
function remove():Object;
function get beforeFirst():Boolean;
function get afterLast():Boolean;
function findAny(_arg1:Object):Boolean;
function movePrevious():Boolean;
function get bookmark():CursorBookmark;
function findFirst(_arg1:Object):Boolean;
function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void;
function get current():Object;
function findLast(_arg1:Object):Boolean;
}
}//package mx.collections
Section 64
//ListCollectionView (mx.collections.ListCollectionView)
package mx.collections {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.resources.*;
import flash.system.*;
import flash.utils.*;
import mx.utils.*;
import mx.collections.errors.*;
public class ListCollectionView extends Proxy implements ICollectionView, IList, IMXMLObject {
private var autoUpdateCounter:int;
private var _list:IList;
protected var localIndex:Array;
private var _filterFunction:Function;
private var pendingUpdates:Array;
private var eventDispatcher:EventDispatcher;
private var revision:int;
private var _sort:Sort;
mx_internal static const VERSION:String = "2.0.1.0";
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain);
private static var resourceInvalidIndex:String;
private static var resourceBookmarkNotFound:String;
private static var resourceOutOfBounds:String;
private static var resourceUnknownProperty:String;
private static var resourceIncorrectAddition:String;
private static var resourceItemNotFound:String;
public function ListCollectionView(_arg1:IList=null){
eventDispatcher = new EventDispatcher(this);
this.list = _arg1;
}
public function set filterFunction(_arg1:Function):void{
_filterFunction = _arg1;
dispatchEvent(new Event("filterFunctionChanged"));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private function replaceItemsInView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:PropertyChangeEvent;
var _local9:CollectionEvent;
if (localIndex){
_local4 = _arg1.length;
_local5 = [];
_local6 = [];
_local7 = 0;
while (_local7 < _local4) {
_local8 = _arg1[_local7];
_local5.push(_local8.oldValue);
_local6.push(_local8.newValue);
_local7++;
};
removeItemsFromView(_local5, _arg2, _arg3);
addItemsToView(_local6, _arg2, _arg3);
} else {
_local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local9.kind = CollectionEventKind.REPLACE;
_local9.location = _arg2;
_local9.items = _arg1;
dispatchEvent(_local9);
};
}
public function willTrigger(_arg1:String):Boolean{
return (eventDispatcher.willTrigger(_arg1));
}
private function handlePendingUpdates():void{
var _local1:Array;
var _local2:CollectionEvent;
var _local3:int;
var _local4:CollectionEvent;
var _local5:int;
if (pendingUpdates){
_local1 = pendingUpdates;
pendingUpdates = null;
_local3 = 0;
while (_local3 < _local1.length) {
_local4 = _local1[_local3];
if (_local4.kind == CollectionEventKind.UPDATE){
if (!_local2){
_local2 = _local4;
} else {
_local5 = 0;
while (_local5 < _local4.items.length) {
_local2.items.push(_local4.items[_local5]);
_local5++;
};
};
} else {
listChangeHandler(_local4);
};
_local3++;
};
if (_local2){
listChangeHandler(_local2);
};
};
}
mx_internal function findItem(_arg1:Object, _arg2:String, _arg3:Boolean=false):int{
if (!sort){
throw (new CollectionViewError(resourceItemNotFound));
};
if (localIndex.length == 0){
return ((_arg3) ? 0 : -1);
};
return (sort.findItem(localIndex, _arg1, _arg2, _arg3));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
var index:int;
var n:Number;
var name = _arg1;
if ((name is QName)){
name = name.localName;
};
index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
return (false);
};
return ((((index >= 0)) && ((index < length))));
}
public function removeAll():void{
var _local1:int;
var _local2:int;
_local1 = length;
if (_local1 > 0){
if (localIndex){
_local2 = (_local1 - 1);
while (_local2 >= 0) {
removeItemAt(_local2);
_local2--;
};
} else {
list.removeAll();
};
};
}
public function getItemAt(_arg1:int, _arg2:int=0):Object{
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1)));
};
if (localIndex){
return (localIndex[_arg1]);
};
if (list){
return (list.getItemAt(_arg1, _arg2));
};
return (null);
}
private function moveItemInView(_arg1:Object, _arg2:Boolean=true, _arg3:Array=null):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:CollectionEvent;
if (localIndex){
_local4 = -1;
_local5 = 0;
while (_local5 < localIndex.length) {
if (localIndex[_local5] == _arg1){
_local4 = _local5;
break;
};
_local5++;
};
if (_local4 > -1){
localIndex.splice(_local4, 1);
};
_local6 = addItemsToView([_arg1], -1, false);
if (_arg2){
_local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local7.items.push(_arg1);
if (((((_arg3) && ((_local6 == _local4)))) && ((_local6 > -1)))){
_arg3.push(_arg1);
return;
};
if ((((_local6 > -1)) && ((_local4 > -1)))){
_local7.kind = CollectionEventKind.MOVE;
_local7.location = _local6;
_local7.oldLocation = _local4;
} else {
if (_local6 > -1){
_local7.kind = CollectionEventKind.ADD;
_local7.location = _local6;
} else {
if (_local4 > -1){
_local7.kind = CollectionEventKind.REMOVE;
_local7.location = _local4;
} else {
_arg2 = false;
};
};
};
if (_arg2){
dispatchEvent(_local7);
};
};
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return ((_arg1 - 1).toString());
}
public function contains(_arg1:Object):Boolean{
return (!((getItemIndex(_arg1) == -1)));
}
public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
list.itemUpdated(_arg1, _arg2, _arg3, _arg4);
}
private function removeItemsFromView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:CollectionEvent;
_local4 = (localIndex) ? [] : _arg1;
_local5 = _arg2;
if (localIndex){
_local6 = 0;
while (_local6 < _arg1.length) {
_local7 = _arg1[_local6];
_local8 = getItemIndex(_local7);
if (_local8 > -1){
localIndex.splice(_local8, 1);
_local4.push(_local7);
_local5 = _local8;
};
_local6++;
};
};
if (((_arg3) && ((_local4.length > 0)))){
_local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local9.kind = CollectionEventKind.REMOVE;
_local9.location = (((!(localIndex)) || ((_local4.length == 1)))) ? _local5 : -1;
_local9.items = _local4;
dispatchEvent(_local9);
};
}
mx_internal function getBookmark(_arg1:int):ListCollectionViewBookmark{
var value:Object;
var index = _arg1;
if ((((index < 0)) || ((index > length)))){
throw (new CollectionViewError(StringUtil.substitute(resourceInvalidIndex, index)));
};
try {
value = getItemAt(index);
} catch(e:Error) {
value = null;
};
return (new ListCollectionViewBookmark(value, this, revision, index));
}
public function get sort():Sort{
return (_sort);
}
public function addItemAt(_arg1:Object, _arg2:int):void{
var _local3:int;
if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 > length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2)));
};
_local3 = _arg2;
if (((localIndex) && (sort))){
_local3 = list.length;
};
list.addItemAt(_arg1, _local3);
}
private function handlePropertyChangeEvents(_arg1:Array):void{
var _local2:Array;
var _local3:Array;
var _local4:Object;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:PropertyChangeEvent;
var _local9:Object;
var _local10:Boolean;
var _local11:int;
var _local12:int;
var _local13:CollectionEvent;
_local2 = _arg1;
if (((sort) || (!((filterFunction == null))))){
_local3 = [];
_local5 = 0;
while (_local5 < _arg1.length) {
_local8 = _arg1[_local5];
if (_local8.target){
_local9 = _local8.target;
_local10 = !((_local8.target == _local8.source));
} else {
_local9 = _local8.source;
_local10 = false;
};
_local11 = 0;
while (_local11 < _local3.length) {
if (_local3[_local11].item == _local9){
break;
};
_local11++;
};
if (_local11 < _local3.length){
_local4 = _local3[_local11];
} else {
_local4 = {item:_local9, move:_local10, event:_local8};
_local3.push(_local4);
};
_local4.move = ((((((_local4.move) || (filterFunction))) || (!(_local8.property)))) || (((sort) && (sort.propertyAffectsSort(String(_local8.property))))));
_local5++;
};
_local2 = [];
_local5 = 0;
while (_local5 < _local3.length) {
_local4 = _local3[_local5];
if (_local4.move){
moveItemInView(_local4.item, _local4.item, _local2);
} else {
_local2.push(_local4.item);
};
_local5++;
};
_local6 = new Array();
_local7 = 0;
while (_local7 < _local2.length) {
_local12 = 0;
while (_local12 < _local3.length) {
if (_local2[_local7] == _local3[_local12].item){
_local6.push(_local3[_local12].event);
};
_local12++;
};
_local7++;
};
_local2 = _local6;
};
if (_local2.length > 0){
_local13 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local13.kind = CollectionEventKind.UPDATE;
_local13.items = _local2;
dispatchEvent(_local13);
};
}
public function get list():IList{
return (_list);
}
private function populateLocalIndex():void{
if (list){
localIndex = list.toArray();
} else {
localIndex = [];
};
}
public function set sort(_arg1:Sort):void{
_sort = _arg1;
dispatchEvent(new Event("sortChanged"));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){
return (getItemAt((_arg1 - 1)));
}
private function addItemsToView(_arg1:Array, _arg2:int, _arg3:Boolean=true):int{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:CollectionEvent;
_local4 = (localIndex) ? [] : _arg1;
_local5 = _arg2;
if (localIndex){
_local6 = _arg2;
_local7 = 0;
while (_local7 < _arg1.length) {
_local8 = _arg1[_local7];
if ((((filterFunction == null)) || (filterFunction(_local8)))){
if (sort){
_local6 = findItem(_local8, Sort.ANY_INDEX_MODE, true);
_local5 = _local6;
};
if (((((sort) && (sort.unique))) && ((sort.compareFunction(_local8, localIndex[_local6]) == 0)))){
throw (new CollectionViewError(resourceIncorrectAddition));
};
var _temp1 = _local6;
_local6 = (_local6 + 1);
localIndex.splice(_temp1, 0, _local8);
_local4.push(_local8);
};
_local7++;
};
};
if (((localIndex) && ((_local4.length > 1)))){
_local5 = -1;
};
if (((_arg3) && ((_local4.length > 0)))){
_local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local9.kind = CollectionEventKind.ADD;
_local9.location = _local5;
_local9.items = _local4;
dispatchEvent(_local9);
};
return (_local5);
}
public function dispatchEvent(_arg1:Event):Boolean{
return (eventDispatcher.dispatchEvent(_arg1));
}
public function getItemIndex(_arg1:Object):int{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
if (sort){
_local3 = sort.findItem(localIndex, _arg1, Sort.FIRST_INDEX_MODE);
if (_local3 == -1){
return (-1);
};
_local4 = sort.findItem(localIndex, _arg1, Sort.LAST_INDEX_MODE);
_local2 = _local3;
while (_local2 <= _local4) {
if (localIndex[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
} else {
if (filterFunction != null){
_local5 = localIndex.length;
_local2 = 0;
while (_local2 < _local5) {
if (localIndex[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
};
};
return (list.getItemIndex(_arg1));
}
public function enableAutoUpdate():void{
if (autoUpdateCounter > 0){
autoUpdateCounter--;
if (autoUpdateCounter == 0){
handlePendingUpdates();
};
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var index:int;
var n:Number;
var name = _arg1;
if ((name is QName)){
name = name.localName;
};
index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
throw (new Error(StringUtil.substitute(resourceUnknownProperty, name)));
};
return (getItemAt(index));
}
mx_internal function getBookmarkIndex(_arg1:CursorBookmark):int{
var _local2:ListCollectionViewBookmark;
if (((!((_arg1 is ListCollectionViewBookmark))) || (!((ListCollectionViewBookmark(_arg1).view == this))))){
throw (new CollectionViewError(resourceBookmarkNotFound));
};
_local2 = ListCollectionViewBookmark(_arg1);
if (_local2.viewRevision != revision){
if ((((((_local2.index < 0)) || ((_local2.index >= length)))) || (!((getItemAt(_local2.index) == _local2.value))))){
_local2.index = getItemIndex(_local2.value);
};
_local2.viewRevision = revision;
};
return (_local2.index);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function removeItemAt(_arg1:int):Object{
var _local2:int;
var _local3:Object;
if ((((_arg1 < 0)) || ((_arg1 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1)));
};
_local2 = _arg1;
if (localIndex){
_local3 = localIndex[_arg1];
_local2 = list.getItemIndex(_local3);
};
return (list.removeItemAt(_local2));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
return (null);
}
public function initialized(_arg1:Object, _arg2:String):void{
refresh();
}
public function setItemAt(_arg1:Object, _arg2:int):Object{
var _local3:int;
var _local4:Object;
if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 >= length)))){
throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2)));
};
_local3 = _arg2;
if (localIndex){
if (_arg2 > localIndex.length){
_local3 = list.length;
} else {
_local4 = localIndex[_arg2];
_local3 = list.getItemIndex(_local4);
};
};
return (list.setItemAt(_arg1, _local3));
}
mx_internal function reset():void{
var _local1:CollectionEvent;
internalRefresh(false);
_local1 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
_local1.kind = CollectionEventKind.RESET;
dispatchEvent(_local1);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var index:int;
var n:Number;
var name = _arg1;
var value = _arg2;
if ((name is QName)){
name = name.localName;
};
index = -1;
try {
n = parseInt(String(name));
if (!isNaN(n)){
index = int(n);
};
} catch(e:Error) {
};
if (index == -1){
throw (new Error(StringUtil.substitute(resourceUnknownProperty, name)));
};
setItemAt(value, index);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1 < length)) ? (_arg1 + 1) : 0);
}
public function set list(_arg1:IList):void{
var _local2:Boolean;
var _local3:Boolean;
if (_list != _arg1){
if (_list){
_list.removeEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler);
_local2 = (_list.length > 0);
};
_list = _arg1;
if (_list){
_list.addEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler, false, 0, true);
_local3 = (_list.length > 0);
};
if (((_local2) || (_local3))){
reset();
};
dispatchEvent(new Event("listChanged"));
};
}
public function toArray():Array{
var _local1:Array;
if (localIndex){
_local1 = localIndex.concat();
} else {
_local1 = list.toArray();
};
return (_local1);
}
private function internalRefresh(_arg1:Boolean):Boolean{
var tmp:Array;
var len:int;
var i:int;
var item:Object;
var refreshEvent:CollectionEvent;
var dispatch = _arg1;
if (((sort) || (!((filterFunction == null))))){
try {
populateLocalIndex();
} catch(pending:ItemPendingError) {
pending.addResponder(new ItemResponder(function (_arg1:Object, _arg2:Object=null):void{
internalRefresh(dispatch);
}, function (_arg1:Object, _arg2:Object=null):void{
}));
return (false);
};
if (filterFunction != null){
tmp = [];
len = localIndex.length;
i = 0;
while (i < len) {
item = localIndex[i];
if (filterFunction(item)){
tmp.push(item);
};
i = (i + 1);
};
localIndex = tmp;
};
if (sort){
sort.sort(localIndex);
dispatch = true;
};
} else {
if (localIndex){
localIndex = null;
};
};
revision++;
pendingUpdates = null;
if (dispatch){
refreshEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
refreshEvent.kind = CollectionEventKind.REFRESH;
dispatchEvent(refreshEvent);
};
return (true);
}
public function disableAutoUpdate():void{
autoUpdateCounter++;
}
public function refresh():Boolean{
return (internalRefresh(true));
}
public function addItem(_arg1:Object):void{
addItemAt(_arg1, length);
}
public function get filterFunction():Function{
return (_filterFunction);
}
public function createCursor():IViewCursor{
return (new ListCollectionViewCursor(this));
}
public function hasEventListener(_arg1:String):Boolean{
return (eventDispatcher.hasEventListener(_arg1));
}
public function get length():int{
if (localIndex){
return (localIndex.length);
};
if (list){
return (list.length);
};
return (0);
}
public function toString():String{
if (localIndex){
return (ObjectUtil.toString(localIndex));
};
if (((list) && (Object(list).toString))){
return (Object(list).toString());
};
return (getQualifiedClassName(this));
}
private function listChangeHandler(_arg1:CollectionEvent):void{
if (autoUpdateCounter > 0){
if (!pendingUpdates){
pendingUpdates = [];
};
pendingUpdates.push(_arg1);
} else {
switch (_arg1.kind){
case CollectionEventKind.ADD:
addItemsToView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.RESET:
reset();
break;
case CollectionEventKind.REMOVE:
removeItemsFromView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.REPLACE:
replaceItemsInView(_arg1.items, _arg1.location);
break;
case CollectionEventKind.UPDATE:
handlePropertyChangeEvents(_arg1.items);
break;
default:
dispatchEvent(_arg1);
};
};
}
private static function loadResources():void{
resourceOutOfBounds = packageResources.getString("outOfBounds");
resourceInvalidIndex = packageResources.getString("invalidIndex");
resourceUnknownProperty = packageResources.getString("unknownProperty");
resourceIncorrectAddition = packageResources.getString("incorrectAddition");
resourceItemNotFound = packageResources.getString("itemNotFound");
resourceBookmarkNotFound = packageResources.getString("bookmarkNotFound");
}
loadResources();
}
}//package mx.collections
import flash.events.*;
import mx.events.*;
import mx.resources.*;
import flash.system.*;
import mx.collections.errors.*;
class ListCollectionViewBookmark extends CursorBookmark {
mx_internal var viewRevision:int;
mx_internal var view:ListCollectionView;
mx_internal var index:int;
private function ListCollectionViewBookmark(_arg1:Object, _arg2:ListCollectionView, _arg3:int, _arg4:int){
super(_arg1);
this.view = _arg2;
this.viewRevision = _arg3;
this.index = _arg4;
}
override public function getViewIndex():int{
return (view.getBookmarkIndex(this));
}
}
class ListCollectionViewCursor extends EventDispatcher implements IViewCursor {
private var _view:ListCollectionView;
private var currentValue:Object;
private var currentIndex:int;
private var invalid:Boolean;
private static const BEFORE_FIRST_INDEX:int = -1;
private static const AFTER_LAST_INDEX:int = -2;
private static var resourceInvalidInsert:String;
private static var resourceInvalidRemove:String;
private static var resourceInvalidBookmark:String;
private static var resourceBookmarkInvalid:String;
private static var resourceInvalidCursor:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain);
private function ListCollectionViewCursor(_arg1:ListCollectionView){
var view = _arg1;
super();
_view = view;
_view.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionEventHandler, false, 0, true);
currentIndex = ((view.length > 0)) ? 0 : AFTER_LAST_INDEX;
if (currentIndex == 0){
try {
setCurrent(view.getItemAt(0), false);
} catch(e:ItemPendingError) {
currentIndex = BEFORE_FIRST_INDEX;
setCurrent(null, false);
};
};
}
public function movePrevious():Boolean{
var _local1:int;
if (beforeFirst){
return (false);
};
_local1 = (afterLast) ? (view.length - 1) : (currentIndex - 1);
if (_local1 == -1){
_local1 = BEFORE_FIRST_INDEX;
setCurrent(null);
} else {
setCurrent(ListCollectionView(view).getItemAt(_local1));
};
currentIndex = _local1;
return (!(beforeFirst));
}
public function get beforeFirst():Boolean{
checkValid();
return ((((currentIndex == BEFORE_FIRST_INDEX)) || ((view.length == 0))));
}
public function remove():Object{
var oldIndex:int;
var removed:Object;
if (((beforeFirst) || (afterLast))){
throw (new CursorError(resourceInvalidRemove));
};
oldIndex = currentIndex;
currentIndex++;
if (currentIndex >= view.length){
currentIndex = AFTER_LAST_INDEX;
setCurrent(null);
} else {
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(e:ItemPendingError) {
setCurrent(null, false);
ListCollectionView(view).removeItemAt(oldIndex);
throw (e);
};
};
removed = ListCollectionView(view).removeItemAt(oldIndex);
return (removed);
}
private function collectionEventHandler(_arg1:CollectionEvent):void{
var event = _arg1;
switch (event.kind){
case CollectionEventKind.ADD:
if (event.location <= currentIndex){
currentIndex = (currentIndex + event.items.length);
};
break;
case CollectionEventKind.REMOVE:
if (event.location < currentIndex){
currentIndex = (currentIndex - event.items.length);
} else {
if (event.location == currentIndex){
if (currentIndex < view.length){
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(error:ItemPendingError) {
setCurrent(null, false);
};
} else {
currentIndex = AFTER_LAST_INDEX;
setCurrent(null);
};
};
};
break;
case CollectionEventKind.MOVE:
if (event.oldLocation == currentIndex){
currentIndex = event.location;
} else {
if (event.oldLocation < currentIndex){
currentIndex = (currentIndex - event.items.length);
};
if (event.location <= currentIndex){
currentIndex = (currentIndex + event.items.length);
};
};
break;
case CollectionEventKind.REFRESH:
if (!((beforeFirst) || (afterLast))){
currentIndex = ListCollectionView(view).getItemIndex(currentValue);
if (currentIndex == -1){
setCurrent(null);
};
};
break;
case CollectionEventKind.REPLACE:
if (event.location == currentIndex){
try {
setCurrent(ListCollectionView(view).getItemAt(currentIndex));
} catch(error:ItemPendingError) {
setCurrent(null, false);
};
};
break;
case CollectionEventKind.RESET:
currentIndex = BEFORE_FIRST_INDEX;
setCurrent(null);
break;
};
}
public function get current():Object{
checkValid();
return (currentValue);
}
public function get afterLast():Boolean{
checkValid();
return ((((currentIndex == AFTER_LAST_INDEX)) || ((view.length == 0))));
}
public function findFirst(_arg1:Object):Boolean{
var lcView:ListCollectionView;
var index:int;
var values = _arg1;
checkValid();
lcView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.FIRST_INDEX_MODE);
} catch(sortError:SortError) {
throw (new CursorError(sortError.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
public function get view():ICollectionView{
checkValid();
return (_view);
}
private function setCurrent(_arg1:Object, _arg2:Boolean=true):void{
currentValue = _arg1;
if (_arg2){
dispatchEvent(new FlexEvent(FlexEvent.CURSOR_UPDATE));
};
}
public function insert(_arg1:Object):void{
var _local2:int;
if (afterLast){
_local2 = view.length;
} else {
if (beforeFirst){
if (view.length > 0){
throw (new CursorError(resourceInvalidInsert));
};
_local2 = 0;
} else {
_local2 = currentIndex;
};
};
ListCollectionView(view).addItemAt(_arg1, _local2);
}
public function get bookmark():CursorBookmark{
checkValid();
if ((((view.length == 0)) || (beforeFirst))){
return (CursorBookmark.FIRST);
};
if (afterLast){
return (CursorBookmark.LAST);
};
return (ListCollectionView(view).getBookmark(currentIndex));
}
private function checkValid():void{
if (invalid){
throw (new CursorError(resourceInvalidCursor));
};
}
public function moveNext():Boolean{
var _local1:int;
if (afterLast){
return (false);
};
_local1 = (beforeFirst) ? 0 : (currentIndex + 1);
if (_local1 >= view.length){
_local1 = AFTER_LAST_INDEX;
setCurrent(null);
} else {
setCurrent(ListCollectionView(view).getItemAt(_local1));
};
currentIndex = _local1;
return (!(afterLast));
}
public function findLast(_arg1:Object):Boolean{
var lcView:ListCollectionView;
var index:int;
var values = _arg1;
checkValid();
lcView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.LAST_INDEX_MODE);
} catch(sortError:SortError) {
throw (new CursorError(sortError.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
public function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void{
var newIndex:int;
var newCurrent:Object;
var bookmark = _arg1;
var offset = _arg2;
var prefetch = _arg3;
checkValid();
if (view.length == 0){
currentIndex = AFTER_LAST_INDEX;
setCurrent(null, false);
return;
};
newIndex = currentIndex;
if (bookmark == CursorBookmark.FIRST){
newIndex = 0;
} else {
if (bookmark == CursorBookmark.LAST){
newIndex = (view.length - 1);
} else {
if (bookmark != CursorBookmark.CURRENT){
try {
newIndex = ListCollectionView(view).getBookmarkIndex(bookmark);
if (newIndex < 0){
setCurrent(null);
throw (new CursorError(resourceBookmarkInvalid));
};
} catch(bmError:CollectionViewError) {
throw (new CursorError(resourceInvalidBookmark));
};
};
};
};
newIndex = (newIndex + offset);
newCurrent = null;
if (newIndex >= view.length){
currentIndex = AFTER_LAST_INDEX;
} else {
if (newIndex < 0){
currentIndex = BEFORE_FIRST_INDEX;
} else {
newCurrent = ListCollectionView(view).getItemAt(newIndex, prefetch);
currentIndex = newIndex;
};
};
setCurrent(newCurrent);
}
public function findAny(_arg1:Object):Boolean{
var lcView:ListCollectionView;
var index:int;
var values = _arg1;
checkValid();
lcView = ListCollectionView(view);
try {
index = lcView.findItem(values, Sort.ANY_INDEX_MODE);
} catch(e:SortError) {
throw (new CursorError(e.message));
};
if (index > -1){
currentIndex = index;
setCurrent(lcView.getItemAt(currentIndex));
};
return ((index > -1));
}
private static function loadResources():void{
resourceInvalidInsert = packageResources.getString("invalidInsert");
resourceInvalidRemove = packageResources.getString("invalidRemove");
resourceBookmarkInvalid = packageResources.getString("bookmarkInvalid");
resourceInvalidBookmark = packageResources.getString("invalidBookmark");
resourceInvalidCursor = packageResources.getString("invalidCursor");
}
loadResources();
}
Section 65
//Sort (mx.collections.Sort)
package mx.collections {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import mx.utils.*;
import mx.collections.errors.*;
public class Sort extends EventDispatcher {
private var usingCustomCompareFunction:Boolean;
private var _fields:Array;
private var _compareFunction:Function;
private var noFieldsDescending:Boolean;// = false
private var defaultEmptyField:SortField;
private var fieldList:Array;
private var _unique:Boolean;
public static const ANY_INDEX_MODE:String = "any";
public static const FIRST_INDEX_MODE:String = "first";
mx_internal static const VERSION:String = "2.0.1.0";
public static const LAST_INDEX_MODE:String = "last";
private static var resourceNoComparator:String;
private static var resourceFindRestriction:String;
private static var resourceNoItems:String;
private static var resourceFindCondition:String;
private static var resourceUnknownMode:String;
private static var resourceNonUnique:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain);
public function Sort(){
fieldList = [];
noFieldsDescending = false;
super();
}
public function findItem(_arg1:Array, _arg2:Object, _arg3:String, _arg4:Boolean=false, _arg5:Function=null):int{
var compareForFind:Function;
var fieldsForCompare:Array;
var found:Boolean;
var objFound:Boolean;
var index:int;
var lowerBound:int;
var upperBound:int;
var obj:Object;
var direction:int;
var fieldName:String;
var hadPreviousFieldName:Boolean;
var i:int;
var hasFieldName:Boolean;
var objIndex:int;
var match:Boolean;
var prevCompare:int;
var nextCompare:int;
var items = _arg1;
var values = _arg2;
var mode = _arg3;
var returnInsertionIndex = _arg4;
var compareFunction = _arg5;
if (!items){
throw (new SortError(resourceNoItems));
};
if (items.length == 0){
return ((returnInsertionIndex) ? 1 : -1);
};
if (compareFunction == null){
compareForFind = this.compareFunction;
if (((values) && ((fieldList.length > 0)))){
fieldsForCompare = [];
hadPreviousFieldName = true;
i = 0;
while (i < fieldList.length) {
fieldName = fieldList[i];
if (fieldName){
try {
hasFieldName = !((values[fieldName] === undefined));
} catch(e:Error) {
hasFieldName = false;
};
if (hasFieldName){
if (!hadPreviousFieldName){
throw (new SortError(StringUtil.substitute(resourceFindCondition, fieldName)));
};
fieldsForCompare.push(fieldName);
} else {
hadPreviousFieldName = false;
};
} else {
fieldsForCompare.push(null);
};
i = (i + 1);
};
if (fieldsForCompare.length == 0){
throw (new SortError(resourceFindRestriction));
};
try {
initSortFields(items[0]);
} catch(initSortError:SortError) {
};
};
} else {
compareForFind = compareFunction;
};
found = false;
objFound = false;
index = 0;
lowerBound = 0;
upperBound = (items.length - 1);
obj = null;
direction = 1;
while (((!(objFound)) && ((lowerBound <= upperBound)))) {
index = Math.round(((lowerBound + upperBound) / 2));
obj = items[index];
direction = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
switch (direction){
case -1:
upperBound = (index - 1);
break;
case 0:
objFound = true;
switch (mode){
case ANY_INDEX_MODE:
found = true;
break;
case FIRST_INDEX_MODE:
found = (index == lowerBound);
objIndex = (index - 1);
match = true;
while (((((match) && (!(found)))) && ((objIndex >= lowerBound)))) {
obj = items[objIndex];
prevCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
match = (prevCompare == 0);
if (((!(match)) || (((match) && ((objIndex == lowerBound)))))){
found = true;
index = (objIndex + (match) ? 0 : 1);
};
objIndex = (objIndex - 1);
};
break;
case LAST_INDEX_MODE:
found = (index == upperBound);
objIndex = (index + 1);
match = true;
while (((((match) && (!(found)))) && ((objIndex <= upperBound)))) {
obj = items[objIndex];
nextCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj);
match = (nextCompare == 0);
if (((!(match)) || (((match) && ((objIndex == upperBound)))))){
found = true;
index = (objIndex - (match) ? 0 : 1);
};
objIndex = (objIndex + 1);
};
break;
default:
throw (new SortError(resourceUnknownMode));
};
break;
case 1:
lowerBound = (index + 1);
break;
};
};
if (((!(found)) && (!(returnInsertionIndex)))){
return (-1);
};
return (((direction)>0) ? (index + 1) : index);
}
public function get compareFunction():Function{
return ((usingCustomCompareFunction) ? _compareFunction : internalCompare);
}
public function set unique(_arg1:Boolean):void{
_unique = _arg1;
}
public function sort(_arg1:Array):void{
var fixedCompareFunction:Function;
var uniqueRet1:Object;
var fields:Array;
var i:int;
var sortArgs:Object;
var uniqueRet2:Object;
var items = _arg1;
if (((!(items)) || ((items.length <= 1)))){
return;
};
if (usingCustomCompareFunction){
fixedCompareFunction = function (_arg1:Object, _arg2:Object):int{
return (compareFunction(_arg1, _arg2, _fields));
};
if (unique){
uniqueRet1 = items.sort(fixedCompareFunction, Array.UNIQUESORT);
if (uniqueRet1 == 0){
throw (new SortError(resourceNonUnique));
};
} else {
items.sort(fixedCompareFunction);
};
} else {
fields = this.fields;
if (((fields) && ((fields.length > 0)))){
sortArgs = initSortFields(items[0], true);
if (unique){
if (((sortArgs) && ((fields.length == 1)))){
uniqueRet2 = items.sortOn(sortArgs.fields[0], (sortArgs.options[0] | Array.UNIQUESORT));
} else {
uniqueRet2 = items.sort(internalCompare, Array.UNIQUESORT);
};
if (uniqueRet2 == 0){
throw (new SortError(resourceNonUnique));
};
} else {
if (sortArgs){
items.sortOn(sortArgs.fields, sortArgs.options);
} else {
items.sort(internalCompare);
};
};
} else {
items.sort(internalCompare);
};
};
}
public function propertyAffectsSort(_arg1:String):Boolean{
var _local2:int;
var _local3:SortField;
if (((usingCustomCompareFunction) || (!(fields)))){
return (true);
};
_local2 = 0;
while (_local2 < fields.length) {
_local3 = fields[_local2];
if ((((_local3.name == _arg1)) || (_local3.usingCustomCompareFunction))){
return (true);
};
_local2++;
};
return (false);
}
private function internalCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:SortField;
_local4 = 0;
if (!_fields){
_local4 = noFieldsCompare(_arg1, _arg2);
} else {
_local5 = 0;
_local6 = (_arg3) ? _arg3.length : _fields.length;
while ((((_local4 == 0)) && ((_local5 < _local6)))) {
_local7 = SortField(_fields[_local5]);
_local4 = _local7.internalCompare(_arg1, _arg2);
_local5++;
};
};
return (_local4);
}
public function get unique():Boolean{
return (_unique);
}
private function noFieldsCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{
var result:int;
var a = _arg1;
var b = _arg2;
var fields = _arg3;
if (!defaultEmptyField){
defaultEmptyField = new SortField();
try {
defaultEmptyField.initCompare(a);
} catch(e:SortError) {
throw (new SortError(StringUtil.substitute(resourceNoComparator, a)));
};
};
result = defaultEmptyField.compareFunction(a, b);
if (noFieldsDescending){
result = (result * -1);
};
return (result);
}
override public function toString():String{
return (ObjectUtil.toString(this));
}
private function initSortFields(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:Object;
var _local4:int;
var _local5:SortField;
var _local6:int;
_local3 = null;
_local4 = 0;
while (_local4 < fields.length) {
SortField(fields[_local4]).initCompare(_arg1);
_local4++;
};
if (_arg2){
_local3 = {fields:[], options:[]};
_local4 = 0;
while (_local4 < fields.length) {
_local5 = fields[_local4];
_local6 = _local5.getArraySortOnOptions();
if (_local6 == -1){
return (null);
};
_local3.fields.push(_local5.name);
_local3.options.push(_local6);
_local4++;
};
};
return (_local3);
}
public function reverse():void{
var _local1:int;
if (fields){
_local1 = 0;
while (_local1 < fields.length) {
SortField(fields[_local1]).reverse();
_local1++;
};
};
noFieldsDescending = !(noFieldsDescending);
}
public function set fields(_arg1:Array):void{
var _local2:SortField;
var _local3:int;
_fields = _arg1;
fieldList = [];
if (_fields){
_local3 = 0;
while (_local3 < _fields.length) {
_local2 = SortField(_fields[_local3]);
fieldList.push(_local2.name);
_local3++;
};
};
dispatchEvent(new Event("fieldsChanged"));
}
public function get fields():Array{
return (_fields);
}
public function set compareFunction(_arg1:Function):void{
_compareFunction = _arg1;
usingCustomCompareFunction = !((_compareFunction == null));
}
private static function loadResources():void{
resourceNoItems = packageResources.getString("noItems");
resourceFindCondition = packageResources.getString("findCondition");
resourceFindRestriction = packageResources.getString("findRestriction");
resourceUnknownMode = packageResources.getString("unknownMode");
resourceNonUnique = packageResources.getString("nonUnique");
resourceNoComparator = packageResources.getString("noComparator");
}
loadResources();
}
}//package mx.collections
Section 66
//SortField (mx.collections.SortField)
package mx.collections {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import mx.utils.*;
import mx.collections.errors.*;
public class SortField extends EventDispatcher {
private var _caseInsensitive:Boolean;
private var _compareFunction:Function;
private var _numeric:Boolean;
private var _descending:Boolean;
private var _usingCustomCompareFunction:Boolean;
private var _name:String;
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceNoComparatorSortField:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain);
public function SortField(_arg1:String=null, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false){
_name = _arg1;
_caseInsensitive = _arg2;
_descending = _arg3;
_numeric = _arg4;
_compareFunction = stringCompare;
}
public function get caseInsensitive():Boolean{
return (_caseInsensitive);
}
public function set caseInsensitive(_arg1:Boolean):void{
if (_arg1 != _caseInsensitive){
_caseInsensitive = _arg1;
dispatchEvent(new Event("caseInsensitiveChanged"));
};
}
public function get name():String{
return (_name);
}
public function set name(_arg1:String):void{
_name = _arg1;
dispatchEvent(new Event("nameChanged"));
}
mx_internal function get usingCustomCompareFunction():Boolean{
return (_usingCustomCompareFunction);
}
private function numericCompare(_arg1:Object, _arg2:Object):int{
var fa:Number;
var fb:Number;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? Number(a) : Number(a[_name]);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? Number(b) : Number(b[_name]);
} catch(error:Error) {
};
return (ObjectUtil.numericCompare(fa, fb));
}
public function set numeric(_arg1:Boolean):void{
if (_numeric != _arg1){
_numeric = _arg1;
dispatchEvent(new Event("numericChanged"));
};
}
private function stringCompare(_arg1:Object, _arg2:Object):int{
var fa:String;
var fb:String;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? String(a) : String(a[_name]);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? String(b) : String(b[_name]);
} catch(error:Error) {
};
return (ObjectUtil.stringCompare(fa, fb, _caseInsensitive));
}
public function get compareFunction():Function{
return (_compareFunction);
}
public function get numeric():Boolean{
return (_numeric);
}
mx_internal function internalCompare(_arg1:Object, _arg2:Object):int{
var _local3:int;
_local3 = compareFunction(_arg1, _arg2);
if (descending){
_local3 = (_local3 * -1);
};
return (_local3);
}
public function reverse():void{
descending = !(descending);
}
override public function toString():String{
return (ObjectUtil.toString(this));
}
mx_internal function getArraySortOnOptions():int{
var _local1:int;
if (((((((usingCustomCompareFunction) || ((name == null)))) || ((_compareFunction == xmlCompare)))) || ((_compareFunction == dateCompare)))){
return (-1);
};
_local1 = 0;
if (caseInsensitive){
_local1 = (_local1 | Array.CASEINSENSITIVE);
};
if (descending){
_local1 = (_local1 | Array.DESCENDING);
};
if (((numeric) || ((_compareFunction == numericCompare)))){
_local1 = (_local1 | Array.NUMERIC);
};
return (_local1);
}
private function dateCompare(_arg1:Object, _arg2:Object):int{
var fa:Date;
var fb:Date;
var a = _arg1;
var b = _arg2;
try {
fa = ((_name == null)) ? (a as Date) : (a[_name] as Date);
} catch(error:Error) {
};
try {
fb = ((_name == null)) ? (b as Date) : (b[_name] as Date);
} catch(error:Error) {
};
return (ObjectUtil.dateCompare(fa, fb));
}
public function set descending(_arg1:Boolean):void{
if (_descending != _arg1){
_descending = _arg1;
dispatchEvent(new Event("descendingChanged"));
};
}
private function xmlCompare(_arg1:Object, _arg2:Object):int{
var sa:String;
var sb:String;
var a = _arg1;
var b = _arg2;
try {
sa = ((_name == null)) ? a.toString() : a[_name].toString();
} catch(error:Error) {
};
try {
sb = ((_name == null)) ? b.toString() : b[_name].toString();
} catch(error:Error) {
};
if (numeric){
return (ObjectUtil.numericCompare(parseFloat(sa), parseFloat(sb)));
};
return (ObjectUtil.stringCompare(sa, sb, _caseInsensitive));
}
mx_internal function initCompare(_arg1:Object):void{
var value:Object;
var typ:String;
var test:String;
var obj = _arg1;
if (!usingCustomCompareFunction){
if (numeric){
_compareFunction = numericCompare;
} else {
if (caseInsensitive){
_compareFunction = stringCompare;
} else {
if (_name){
try {
value = obj[_name];
} catch(error:Error) {
};
};
if (value == null){
value = obj;
};
typ = typeof(value);
switch (typ){
case "string":
_compareFunction = stringCompare;
break;
case "object":
if ((value is Date)){
_compareFunction = dateCompare;
} else {
_compareFunction = stringCompare;
try {
test = value.toString();
} catch(error2:Error) {
};
if (((!(test)) || ((test == "[object Object]")))){
_compareFunction = nullCompare;
};
};
break;
case "xml":
_compareFunction = xmlCompare;
break;
case "boolean":
case "number":
_compareFunction = numericCompare;
break;
};
};
};
};
}
private function nullCompare(_arg1:Object, _arg2:Object):int{
var value:Object;
var left:Object;
var right:Object;
var found:Boolean;
var typeLeft:String;
var typeRight:String;
var a = _arg1;
var b = _arg2;
found = false;
if ((((a == null)) && ((b == null)))){
return (0);
};
if (_name){
try {
left = a[_name];
} catch(error:Error) {
};
try {
right = b[_name];
} catch(error:Error) {
};
};
if ((((left == null)) && ((right == null)))){
return (0);
};
if (left == null){
left = a;
};
if (right == null){
right = b;
};
typeLeft = typeof(left);
typeRight = typeof(right);
if ((((typeLeft == "string")) || ((typeRight == "string")))){
found = true;
_compareFunction = stringCompare;
} else {
if ((((typeLeft == "object")) || ((typeRight == "object")))){
if ((((typeLeft is Date)) || ((typeRight is Date)))){
found = true;
_compareFunction = dateCompare;
};
} else {
if ((((typeLeft == "xml")) || ((typeRight == "xml")))){
found = true;
_compareFunction = xmlCompare;
} else {
if ((((((((typeLeft == "number")) || ((typeRight == "number")))) || ((typeLeft == "boolean")))) || ((typeRight == "boolean")))){
found = true;
_compareFunction = numericCompare;
};
};
};
};
if (found){
return (_compareFunction(left, right));
};
throw (new SortError(StringUtil.substitute(resourceNoComparatorSortField, name)));
}
public function get descending():Boolean{
return (_descending);
}
public function set compareFunction(_arg1:Function):void{
_compareFunction = _arg1;
_usingCustomCompareFunction = !((_arg1 == null));
}
private static function loadResources():void{
resourceNoComparatorSortField = packageResources.getString("noComparatorSortField");
}
loadResources();
}
}//package mx.collections
Section 67
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout)
package mx.containers.utilityClasses {
import mx.core.*;
public class ApplicationLayout extends BoxLayout {
mx_internal static const VERSION:String = "2.0.1.0";
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:IFlexDisplayObject;
super.updateDisplayList(_arg1, _arg2);
_local3 = super.target;
if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){
_local4 = _local3.getStyle("paddingLeft");
_local5 = _local3.getStyle("paddingTop");
_local6 = 0;
_local7 = 0;
_local8 = _local3.numChildren;
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
if (_local10.x < _local4){
_local6 = Math.max(_local6, (_local4 - _local10.x));
};
if (_local10.y < _local5){
_local7 = Math.max(_local7, (_local5 - _local10.y));
};
_local9++;
};
if (((!((_local6 == 0))) || (!((_local7 == 0))))){
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7));
_local9++;
};
};
};
}
}
}//package mx.containers.utilityClasses
Section 68
//BoxLayout (mx.containers.utilityClasses.BoxLayout)
package mx.containers.utilityClasses {
import mx.core.*;
import mx.controls.scrollClasses.*;
import mx.containers.*;
public class BoxLayout extends Layout {
public var direction:String;// = "vertical"
mx_internal static const VERSION:String = "2.0.1.0";
public function BoxLayout(){
direction = BoxDirection.VERTICAL;
super();
}
private function isVertical():Boolean{
return (!((direction == BoxDirection.HORIZONTAL)));
}
override public function measure():void{
var _local1:Container;
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:IUIComponent;
var _local13:Number;
var _local14:Number;
_local1 = super.target;
_local2 = isVertical();
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = _local1.numChildren;
_local8 = _local7;
_local9 = 0;
while (_local9 < _local7) {
_local12 = IUIComponent(_local1.getChildAt(_local9));
if (!_local12.includeInLayout){
_local8--;
} else {
_local13 = _local12.getExplicitOrMeasuredWidth();
_local14 = _local12.getExplicitOrMeasuredHeight();
if (_local2){
_local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3);
_local5 = Math.max(_local13, _local5);
_local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight);
_local6 = (_local6 + _local14);
} else {
_local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth);
_local5 = (_local5 + _local13);
_local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4);
_local6 = Math.max(_local14, _local6);
};
};
_local9++;
};
_local10 = widthPadding(_local8);
_local11 = heightPadding(_local8);
_local1.measuredMinWidth = (_local3 + _local10);
_local1.measuredMinHeight = (_local4 + _local11);
_local1.measuredWidth = (_local5 + _local10);
_local1.measuredHeight = (_local6 + _local11);
}
mx_internal function getHorizontalAlignValue():Number{
var _local1:String;
_local1 = target.getStyle("horizontalAlign");
if (_local1 == "center"){
return (0.5);
};
if (_local1 == "right"){
return (1);
};
return (0);
}
mx_internal function heightPadding(_arg1:Number):Number{
var _local2:EdgeMetrics;
var _local3:Number;
_local2 = target.viewMetricsAndPadding;
_local3 = (_local2.top + _local2.bottom);
if ((((_arg1 > 1)) && (isVertical()))){
_local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1)));
};
return (_local3);
}
mx_internal function widthPadding(_arg1:Number):Number{
var _local2:EdgeMetrics;
var _local3:Number;
_local2 = target.viewMetricsAndPadding;
_local3 = (_local2.left + _local2.right);
if ((((_arg1 > 1)) && ((isVertical() == false)))){
_local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1)));
};
return (_local3);
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:int;
var _local5:EdgeMetrics;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:ScrollBar;
var _local15:ScrollBar;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:IUIComponent;
var _local23:IUIComponent;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
_local3 = super.target;
_local4 = _local3.numChildren;
if (_local4 == 0){
return;
};
_local5 = _local3.viewMetricsAndPadding;
_local6 = _local3.getStyle("paddingLeft");
_local7 = _local3.getStyle("paddingTop");
_local8 = getHorizontalAlignValue();
_local9 = getVerticalAlignValue();
_local10 = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth;
_local11 = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight;
_local12 = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left);
_local13 = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top);
_local14 = _local3.horizontalScrollBar;
_local15 = _local3.verticalScrollBar;
if (_local4 == 1){
_local23 = IUIComponent(_local3.getChildAt(0));
_local24 = _local23.percentWidth;
_local25 = _local23.percentHeight;
if (_local24){
_local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100)));
} else {
_local26 = _local23.getExplicitOrMeasuredWidth();
};
if (_local25){
_local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100)));
} else {
_local27 = _local23.getExplicitOrMeasuredHeight();
};
if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){
_local23.setActualSize(Math.floor(_local26), Math.floor(_local27));
} else {
_local23.setActualSize(_local26, _local27);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
_local20 = (((_local12 - _local23.width) * _local8) + _local6);
_local19 = (((_local13 - _local23.height) * _local9) + _local7);
_local23.move(Math.floor(_local20), Math.floor(_local19));
} else {
if (isVertical()){
_local16 = _local3.getStyle("verticalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
_local19 = (_local7 + (_local18 * _local9));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local20 = (((_local12 - _local22.width) * _local8) + _local6);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local19 = (_local19 + (_local22.height + _local16));
};
_local21++;
};
} else {
_local16 = _local3.getStyle("horizontalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local15.minWidth);
};
_local20 = (_local6 + (_local18 * _local8));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local19 = (((_local13 - _local22.height) * _local9) + _local7);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local20 = (_local20 + (_local22.width + _local16));
};
_local21++;
};
};
};
}
mx_internal function getVerticalAlignValue():Number{
var _local1:String;
_local1 = target.getStyle("verticalAlign");
if (_local1 == "middle"){
return (0.5);
};
if (_local1 == "bottom"){
return (1);
};
return (0);
}
}
}//package mx.containers.utilityClasses
Section 69
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout)
package mx.containers.utilityClasses {
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
public class CanvasLayout extends Layout {
private var _contentArea:Rectangle;
mx_internal static const VERSION:String = "2.0.1.0";
private static var r:Rectangle = new Rectangle();
private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent):void{
var _local4:IStyleClient;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Boolean;
var _local16:Boolean;
_local4 = (_arg3 as IStyleClient);
if (!_local4){
return;
};
_local5 = _local4.getStyle("left");
_local6 = _local4.getStyle("right");
_local7 = _local4.getStyle("horizontalCenter");
_local8 = _local4.getStyle("top");
_local9 = _local4.getStyle("bottom");
_local10 = _local4.getStyle("verticalCenter");
_local15 = false;
_local16 = false;
if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){
_local11 = ((_arg1 - _local5) - _local6);
if (_local11 < _arg3.minWidth){
_local11 = _arg3.minWidth;
};
} else {
if (!isNaN(_arg3.percentWidth)){
_local11 = ((_arg3.percentWidth / 100) * _arg1);
_local11 = bound(_local11, _arg3.minWidth, _arg3.maxWidth);
_local15 = true;
} else {
_local11 = _arg3.getExplicitOrMeasuredWidth();
};
};
if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){
_local12 = ((_arg2 - _local8) - _local9);
if (_local12 < _arg3.minHeight){
_local12 = _arg3.minHeight;
};
} else {
if (!isNaN(_arg3.percentHeight)){
_local12 = ((_arg3.percentHeight / 100) * _arg2);
_local12 = bound(_local12, _arg3.minHeight, _arg3.maxHeight);
_local16 = true;
} else {
_local12 = _arg3.getExplicitOrMeasuredHeight();
};
};
if (!isNaN(_local7)){
_local13 = Math.round((((_arg1 - _local11) / 2) + _local7));
} else {
if (!isNaN(_local5)){
_local13 = _local5;
} else {
if (!isNaN(_local6)){
_local13 = ((_arg1 - _local6) - _local11);
};
};
};
if (!isNaN(_local10)){
_local14 = Math.round((((_arg2 - _local12) / 2) + _local10));
} else {
if (!isNaN(_local8)){
_local14 = _local8;
} else {
if (!isNaN(_local9)){
_local14 = ((_arg2 - _local9) - _local12);
};
};
};
_local13 = (isNaN(_local13)) ? _arg3.x : _local13;
_local14 = (isNaN(_local14)) ? _arg3.y : _local14;
_arg3.move(_local13, _local14);
if (_local15){
if ((_local13 + _local11) > _arg1){
_local11 = Math.max((_arg1 - _local13), _arg3.minWidth);
};
};
if (_local16){
if ((_local14 + _local12) > _arg2){
_local12 = Math.max((_arg2 - _local14), _arg3.minHeight);
};
};
if (((!(isNaN(_local11))) && (!(isNaN(_local12))))){
_arg3.setActualSize(_local11, _local12);
};
}
override public function set target(_arg1:Container):void{
var _local2:Container;
var _local3:int;
var _local4:int;
_local2 = super.target;
if (_arg1 != _local2){
if (_local2){
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _local2.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
if (_arg1){
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _arg1.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
super.target = _arg1;
};
}
override public function measure():void{
var _local1:Container;
var _local2:Number;
var _local3:Number;
var _local4:EdgeMetrics;
var _local5:Rectangle;
_local1 = super.target;
_local2 = 0;
_local3 = 0;
_local4 = _local1.viewMetrics;
_contentArea = null;
_local5 = measureContentArea();
_local1.measuredWidth = ((_local5.width + _local4.left) + _local4.right);
_local1.measuredHeight = ((_local5.height + _local4.top) + _local4.bottom);
}
private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler);
}
private function measureContentArea():Rectangle{
var _local1:int;
var _local2:int;
var _local3:IUIComponent;
var _local4:IStyleClient;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (_contentArea){
return (_contentArea);
};
_contentArea = new Rectangle();
_local1 = target.numChildren;
_local2 = 0;
while (_local2 < _local1) {
_local3 = (target.getChildAt(_local2) as IUIComponent);
_local4 = (_local3 as IStyleClient);
if (!_local3.includeInLayout){
} else {
_local5 = _local3.x;
_local6 = _local3.y;
_local7 = _local3.getExplicitOrMeasuredWidth();
_local8 = _local3.getExplicitOrMeasuredHeight();
if (((!(isNaN(_local3.percentWidth))) || (((((_local4) && (!(isNaN(_local4.getStyle("left")))))) && (!(isNaN(_local4.getStyle("right")))))))){
_local7 = _local3.minWidth;
};
if (((!(isNaN(_local3.percentHeight))) || (((((_local4) && (!(isNaN(_local4.getStyle("top")))))) && (!(isNaN(_local4.getStyle("bottom")))))))){
_local8 = _local3.minHeight;
};
r.x = _local5;
r.y = _local6;
r.width = _local7;
r.height = _local8;
applyAnchorStylesDuringMeasure(_local3, r);
_local5 = r.x;
_local6 = r.y;
_local7 = r.width;
_local8 = r.height;
if (isNaN(_local5)){
_local5 = _local3.x;
};
if (isNaN(_local6)){
_local6 = _local3.y;
};
_local9 = _local5;
_local10 = _local6;
if (isNaN(_local7)){
_local7 = _local3.width;
};
if (isNaN(_local8)){
_local8 = _local3.height;
};
_local9 = (_local9 + _local7);
_local10 = (_local10 + _local8);
_contentArea.right = Math.max(_contentArea.right, _local9);
_contentArea.bottom = Math.max(_contentArea.bottom, _local10);
};
_local2++;
};
return (_contentArea);
}
private function child_moveHandler(_arg1:MoveEvent):void{
var _local2:Container;
if ((_arg1.target is IUIComponent)){
if (!IUIComponent(_arg1.target).includeInLayout){
return;
};
};
_local2 = super.target;
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
_contentArea = null;
};
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:EdgeMetrics;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:int;
var _local9:IUIComponent;
_local3 = super.target;
_local3.mx_internal::doingLayout = false;
_local4 = _local3.viewMetrics;
_local3.mx_internal::doingLayout = true;
_local5 = ((_arg1 - _local4.left) - _local4.right);
_local6 = ((_arg2 - _local4.top) - _local4.bottom);
_local7 = _local3.numChildren;
_local8 = 0;
while (_local8 < _local7) {
_local9 = (_local3.getChildAt(_local8) as IUIComponent);
applyAnchorStylesDuringUpdateDisplayList(_local5, _local6, _local9);
_local8++;
};
}
private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{
var _local3:IStyleClient;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local3 = (_arg1 as IStyleClient);
if (!_local3){
return;
};
_local4 = _local3.getStyle("left");
_local5 = _local3.getStyle("right");
_local6 = _local3.getStyle("horizontalCenter");
if (!isNaN(_local6)){
_arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local6));
} else {
if (((!(isNaN(_local4))) && (!(isNaN(_local5))))){
_arg2.x = _local4;
_arg2.width = (_arg2.width + _local5);
} else {
if (!isNaN(_local4)){
_arg2.x = _local4;
} else {
if (!isNaN(_local5)){
_arg2.x = 0;
_arg2.width = (_arg2.width + _local5);
};
};
};
};
_local7 = _local3.getStyle("top");
_local8 = _local3.getStyle("bottom");
_local9 = _local3.getStyle("verticalCenter");
if (!isNaN(_local9)){
_arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local9));
} else {
if (((!(isNaN(_local7))) && (!(isNaN(_local8))))){
_arg2.y = _local7;
_arg2.height = (_arg2.height + _local8);
} else {
if (!isNaN(_local7)){
_arg2.y = _local7;
} else {
if (!isNaN(_local8)){
_arg2.y = 0;
_arg2.height = (_arg2.height + _local8);
};
};
};
};
}
private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
_arg1 = _arg2;
} else {
if (_arg1 > _arg3){
_arg1 = _arg3;
} else {
_arg1 = Math.floor(_arg1);
};
};
return (_arg1);
}
private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler);
}
}
}//package mx.containers.utilityClasses
Section 70
//Flex (mx.containers.utilityClasses.Flex)
package mx.containers.utilityClasses {
import mx.core.*;
public class Flex {
mx_internal static const VERSION:String = "2.0.1.0";
public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
var _local6:Array;
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local4 = _arg2;
_local5 = 0;
_local6 = [];
_local10 = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredHeight();
};
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local11);
_local7 = new FlexChildInfo();
_local7.percent = _local11;
_local7.min = _local8.minWidth;
_local7.max = _local8.maxWidth;
_local7.height = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredWidth();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local14), Math.floor(_local13));
} else {
_local8.setActualSize(_local14, _local13);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.width);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height));
} else {
_local8.setActualSize(_local7.size, _local7.height);
};
_local9++;
};
};
return (_local4);
}
public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
var _local6:Array;
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local4 = _arg2;
_local5 = 0;
_local6 = [];
_local10 = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredWidth();
};
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local12);
_local7 = new FlexChildInfo();
_local7.percent = _local12;
_local7.min = _local8.minHeight;
_local7.max = _local8.maxHeight;
_local7.width = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredHeight();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local13), Math.floor(_local14));
} else {
_local8.setActualSize(_local13, _local14);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.height);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size));
} else {
_local8.setActualSize(_local7.width, _local7.size);
};
_local9++;
};
};
return (_local4);
}
public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local5:int;
var _local6:Number;
var _local7:Boolean;
var _local8:Number;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local5 = _arg4.length;
_local8 = (_arg2 - ((_arg1 * _arg3) / 100));
if (_local8 > 0){
_arg2 = (_arg2 - _local8);
};
do {
_local6 = 0;
_local7 = true;
_local9 = (_arg2 / _arg3);
_local10 = 0;
while (_local10 < _local5) {
_local11 = _arg4[_local10];
_local12 = (_local11.percent * _local9);
if (_local12 < _local11.min){
_local13 = _local11.min;
_local11.size = _local13;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local13);
_local7 = false;
break;
} else {
if (_local12 > _local11.max){
_local14 = _local11.max;
_local11.size = _local14;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local14);
_local7 = false;
break;
} else {
_local11.size = _local12;
_local6 = (_local6 + _local12);
};
};
_local10++;
};
} while (!(_local7));
return (Math.max(0, Math.floor((_arg2 - _local6))));
}
}
}//package mx.containers.utilityClasses
Section 71
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo)
package mx.containers.utilityClasses {
import mx.core.*;
public class FlexChildInfo {
public var size:Number;// = 0
public var percent:Number;
public var width:Number;
public var max:Number;
public var height:Number;
public var preferred:Number;// = 0
public var min:Number;
public var flex:Number;// = 0
public var child:IUIComponent;
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexChildInfo(){
size = 0;
preferred = 0;
flex = 0;
super();
}
}
}//package mx.containers.utilityClasses
Section 72
//Layout (mx.containers.utilityClasses.Layout)
package mx.containers.utilityClasses {
import mx.core.*;
public class Layout {
private var _target:Container;
mx_internal static const VERSION:String = "2.0.1.0";
public function set target(_arg1:Container):void{
_target = _arg1;
}
public function measure():void{
}
public function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get target():Container{
return (_target);
}
}
}//package mx.containers.utilityClasses
Section 73
//Box (mx.containers.Box)
package mx.containers {
import flash.events.*;
import mx.core.*;
import mx.containers.utilityClasses.*;
public class Box extends Container {
mx_internal var layoutObject:BoxLayout;
mx_internal static const VERSION:String = "2.0.1.0";
public function Box(){
layoutObject = new BoxLayout();
super();
layoutObject.target = this;
}
public function pixelsToPercent(_arg1:Number):Number{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:IUIComponent;
var _local9:Number;
var _local10:Number;
_local2 = isVertical();
_local3 = 0;
_local4 = 0;
_local5 = numChildren;
_local6 = 0;
while (_local6 < _local5) {
_local8 = IUIComponent(getChildAt(_local6));
_local9 = (_local2) ? _local8.height : _local8.width;
_local10 = (_local2) ? _local8.percentHeight : _local8.percentWidth;
if (!isNaN(_local10)){
_local3 = (_local3 + _local10);
_local4 = (_local4 + _local9);
};
_local6++;
};
_local7 = 100;
if (_local4 != _arg1){
_local7 = (((_local4 * _local3) / (_local4 - _arg1)) - _local3);
};
return (_local7);
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
mx_internal function isVertical():Boolean{
return (!((direction == BoxDirection.HORIZONTAL)));
}
public function set direction(_arg1:String):void{
layoutObject.direction = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("directionChanged"));
}
public function get direction():String{
return (layoutObject.direction);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
}
}
}//package mx.containers
Section 74
//BoxDirection (mx.containers.BoxDirection)
package mx.containers {
public final class BoxDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.containers
Section 75
//Canvas (mx.containers.Canvas)
package mx.containers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.containers.utilityClasses.*;
public class Canvas extends Container {
private var layoutObject:CanvasLayout;
mx_internal static const VERSION:String = "2.0.1.0";
public function Canvas(){
layoutObject = new CanvasLayout();
super();
layoutObject.target = this;
}
override mx_internal function get usePadding():Boolean{
return (false);
}
override mx_internal function getScrollableRect():Rectangle{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:EdgeMetrics;
var _local8:Rectangle;
var _local9:DisplayObject;
var _local10:Number;
var _local11:Number;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = numChildren;
_local6 = 0;
while (_local6 < _local5) {
_local9 = getChildAt(_local6);
_local10 = 0;
_local11 = 0;
if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){
} else {
_local1 = Math.min(_local1, _local9.x);
_local2 = Math.min(_local2, _local9.y);
if ((_local9 is IStyleClient)){
_local10 = IStyleClient(_local9).getStyle("right");
_local11 = IStyleClient(_local9).getStyle("bottom");
if (isNaN(_local10)){
_local10 = 0;
};
if (isNaN(_local11)){
_local11 = 0;
};
};
if (!isNaN(_local9.width)){
_local3 = Math.max(_local3, ((_local9.x + _local9.width) + _local10));
};
if (!isNaN(_local9.height)){
_local4 = Math.max(_local4, ((_local9.y + _local9.height) + _local11));
};
};
_local6++;
};
_local7 = viewMetrics;
_local8 = new Rectangle();
_local8.left = _local1;
_local8.top = _local2;
_local8.right = _local3;
_local8.bottom = _local4;
if (usePadding){
_local8.right = (_local8.right + getStyle("paddingRight"));
_local8.bottom = (_local8.bottom + getStyle("paddingBottom"));
};
return (_local8);
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
}
}
}//package mx.containers
Section 76
//ControlBar (mx.containers.ControlBar)
package mx.containers {
import mx.core.*;
public class ControlBar extends Box {
mx_internal static const VERSION:String = "2.0.1.0";
public function ControlBar(){
direction = BoxDirection.HORIZONTAL;
}
override public function get horizontalScrollPolicy():String{
return (ScrollPolicy.OFF);
}
override public function get verticalScrollPolicy():String{
return (ScrollPolicy.OFF);
}
override public function set horizontalScrollPolicy(_arg1:String):void{
}
override public function set verticalScrollPolicy(_arg1:String):void{
}
override public function set enabled(_arg1:Boolean):void{
if (_arg1 != super.enabled){
super.enabled = _arg1;
alpha = (_arg1) ? 1 : 0.4;
};
}
override public function set includeInLayout(_arg1:Boolean):void{
var _local2:Container;
if (includeInLayout != _arg1){
super.includeInLayout = _arg1;
_local2 = (parent as Container);
if (_local2){
_local2.invalidateViewMetricsAndPadding();
};
};
}
override public function invalidateSize():void{
super.invalidateSize();
if (parent){
Container(parent).invalidateViewMetricsAndPadding();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
if (contentPane){
contentPane.opaqueBackground = null;
};
}
}
}//package mx.containers
Section 77
//HBox (mx.containers.HBox)
package mx.containers {
import mx.core.*;
public class HBox extends Box {
mx_internal static const VERSION:String = "2.0.1.0";
public function HBox(){
mx_internal::layoutObject.direction = BoxDirection.HORIZONTAL;
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.containers
Section 78
//Panel (mx.containers.Panel)
package mx.containers {
import mx.automation.*;
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.effects.*;
import mx.controls.*;
import mx.containers.utilityClasses.*;
public class Panel extends Container {
protected var statusTextField:UITextField;
private var initializing:Boolean;// = true
private var _layout:String;// = "vertical"
private var autoSetRoundedCorners:Boolean;
private var _statusChanged:Boolean;// = false
protected var titleTextField:UITextField;
private var _titleIconChanged:Boolean;// = false
private var _status:String;// = ""
private var _title:String;// = ""
private var _titleIcon:Class;
protected var controlBar:IUIComponent;
mx_internal var titleIconObject:Object;// = null
private var panelViewMetrics:EdgeMetrics;
mx_internal var _showCloseButton:Boolean;// = false
private var checkedForAutoSetRoundedCorners:Boolean;
mx_internal var titleBarBackground:IFlexDisplayObject;
private var regX:Number;
private var regY:Number;
protected var titleBar:UIComponent;
private var layoutObject:Layout;
private var _titleChanged:Boolean;// = false
mx_internal var closeButton:Button;
mx_internal static const VERSION:String = "2.0.1.0";
private static const HEADER_PADDING:Number = 14;
mx_internal static var createAccessibilityImplementation:Function;
public function Panel(){
_showCloseButton = false;
titleIconObject = null;
initializing = true;
_layout = ContainerLayout.VERTICAL;
_status = "";
_statusChanged = false;
_title = "";
_titleChanged = false;
_titleIconChanged = false;
super();
addEventListener("resizeStart", EffectManager.eventHandler, false, EventPriority.EFFECT);
addEventListener("resizeEnd", EffectManager.eventHandler, false, EventPriority.EFFECT);
layoutObject = new BoxLayout();
layoutObject.target = this;
showInAutomationHierarchy = true;
}
public function get status():String{
return (_status);
}
public function set status(_arg1:String):void{
_status = _arg1;
_statusChanged = true;
invalidateProperties();
dispatchEvent(new Event("statusChanged"));
}
mx_internal function getTitleBar():UIComponent{
return (titleBar);
}
protected function startDragging(_arg1:MouseEvent):void{
regX = (_arg1.stageX - x);
regY = (_arg1.stageY - y);
systemManager.addEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler, true);
systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
}
private function systemManager_mouseMoveHandler(_arg1:MouseEvent):void{
_arg1.stopImmediatePropagation();
move((_arg1.stageX - regX), (_arg1.stageY - regY));
}
public function set title(_arg1:String):void{
_title = _arg1;
_titleChanged = true;
invalidateProperties();
invalidateSize();
invalidateViewMetricsAndPadding();
dispatchEvent(new Event("titleChanged"));
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
override public function getChildIndex(_arg1:DisplayObject):int{
if (((controlBar) && ((_arg1 == controlBar)))){
return (numChildren);
};
return (super.getChildIndex(_arg1));
}
private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{
if (!isNaN(regX)){
stopDragging();
};
}
protected function getHeaderHeight():Number{
var _local1:Number;
_local1 = getStyle("headerHeight");
if (isNaN(_local1)){
_local1 = (measureHeaderText().height + HEADER_PADDING);
};
return (_local1);
}
private function showTitleBar(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
titleBar.visible = _arg1;
_local2 = titleBar.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = titleBar.getChildAt(_local3);
_local4.visible = _arg1;
_local3++;
};
}
override public function createComponentsFromDescriptors(_arg1:Boolean=true):void{
var _local2:IUIComponent;
var _local3:Object;
super.createComponentsFromDescriptors();
if (numChildren == 0){
setControlBar(null);
return;
};
_local2 = IUIComponent(getChildAt((numChildren - 1)));
if ((_local2 is ControlBar)){
_local3 = _local2.document;
if (contentPane){
contentPane.removeChild(DisplayObject(_local2));
} else {
removeChild(DisplayObject(_local2));
};
_local2.document = _local3;
rawChildren.addChild(DisplayObject(_local2));
setControlBar(_local2);
} else {
setControlBar(null);
};
}
private function measureHeaderText():Rectangle{
var _local1:Number;
var _local2:Number;
_local1 = 20;
_local2 = 14;
if (((titleTextField) && (titleTextField.text))){
titleTextField.validateNow();
_local1 = titleTextField.textWidth;
_local2 = titleTextField.textHeight;
};
if (statusTextField){
statusTextField.validateNow();
_local1 = Math.max(_local1, statusTextField.textWidth);
_local2 = Math.max(_local2, statusTextField.textHeight);
};
return (new Rectangle(0, 0, Math.round(_local1), Math.round(_local2)));
}
mx_internal function getTitleTextField():UITextField{
return (titleTextField);
}
override protected function measure():void{
var _local1:Rectangle;
var _local2:Number;
var _local3:Number;
var _local4:EdgeMetrics;
var _local5:Number;
var _local6:Number;
super.measure();
layoutObject.measure();
_local1 = measureHeaderText();
_local2 = _local1.width;
_local3 = _local1.height;
_local4 = borderMetrics;
_local2 = (_local2 + (_local4.left + _local4.right));
_local5 = 5;
_local2 = (_local2 + (_local5 * 2));
if (titleIconObject){
_local2 = (_local2 + titleIconObject.width);
};
if (closeButton){
_local2 = (_local2 + (closeButton.getExplicitOrMeasuredWidth() + 6));
};
measuredMinWidth = Math.max(_local2, measuredMinWidth);
measuredWidth = Math.max(_local2, measuredWidth);
if (((controlBar) && (controlBar.includeInLayout))){
_local6 = ((controlBar.getExplicitOrMeasuredWidth() + _local4.left) + _local4.right);
measuredWidth = Math.max(measuredWidth, _local6);
};
}
mx_internal function getControlBar():IUIComponent{
return (controlBar);
}
mx_internal function getStatusTextField():UITextField{
return (statusTextField);
}
override protected function commitProperties():void{
super.commitProperties();
if (_titleChanged){
_titleChanged = false;
titleTextField.text = _title;
if (initialized){
layoutChrome(unscaledWidth, unscaledHeight);
};
};
if (_titleIconChanged){
_titleIconChanged = false;
if (titleIconObject){
titleBar.removeChild(DisplayObject(titleIconObject));
titleIconObject = null;
};
if (_titleIcon){
titleIconObject = new _titleIcon();
titleBar.addChild(DisplayObject(titleIconObject));
};
if (initialized){
layoutChrome(unscaledWidth, unscaledHeight);
};
};
if (_statusChanged){
_statusChanged = false;
statusTextField.text = _status;
if (initialized){
layoutChrome(unscaledWidth, unscaledHeight);
};
};
}
public function set titleIcon(_arg1:Class):void{
_titleIcon = _arg1;
_titleIconChanged = true;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("titleIconChanged"));
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Graphics;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
super.layoutChrome(_arg1, _arg2);
_local3 = borderMetrics;
_local4 = _local3.left;
_local5 = _local3.top;
_local6 = getHeaderHeight();
if ((((_local6 > 0)) && ((height >= _local6)))){
_local7 = ((_arg1 - _local3.left) - _local3.right);
showTitleBar(true);
titleBar.mouseChildren = true;
titleBar.mouseEnabled = true;
_local8 = titleBar.graphics;
_local8.clear();
_local8.beginFill(0xFFFFFF, 0);
_local8.drawRect(0, 0, _local7, _local6);
_local8.endFill();
titleBar.move(_local4, _local5);
titleBar.setActualSize(_local7, _local6);
titleBarBackground.move(0, 0);
IFlexDisplayObject(titleBarBackground).setActualSize(_local7, _local6);
closeButton.visible = _showCloseButton;
if (_showCloseButton){
closeButton.setActualSize(closeButton.getExplicitOrMeasuredWidth(), closeButton.getExplicitOrMeasuredHeight());
closeButton.move(((((_arg1 - _local4) - _local3.right) - 10) - closeButton.getExplicitOrMeasuredWidth()), ((_local6 - closeButton.getExplicitOrMeasuredHeight()) / 2));
};
_local9 = 10;
_local10 = 10;
if (titleIconObject){
_local11 = titleIconObject.height;
_local12 = ((_local6 - _local11) / 2);
titleIconObject.move(_local9, _local12);
_local9 = (_local9 + (titleIconObject.width + 4));
};
_local11 = titleTextField.textHeight;
_local12 = ((_local6 - _local11) / 2);
_local13 = (_local3.left + _local3.right);
titleTextField.move(_local9, (_local12 - 1));
titleTextField.setActualSize(Math.max(0, (((_arg1 - _local9) - _local10) - _local13)), (_local11 + UITextField.TEXT_HEIGHT_PADDING));
_local11 = statusTextField.textHeight;
_local12 = ((_local6 - _local11) / 2);
_local14 = ((((_arg1 - _local10) - 4) - _local13) - statusTextField.textWidth);
if (_showCloseButton){
_local14 = (_local14 - (closeButton.getExplicitOrMeasuredWidth() + 4));
};
statusTextField.move(_local14, (_local12 - 1));
statusTextField.setActualSize((statusTextField.textWidth + 8), (statusTextField.textHeight + UITextField.TEXT_HEIGHT_PADDING));
_local15 = ((titleTextField.x + titleTextField.textWidth) + 8);
if (statusTextField.x < _local15){
statusTextField.width = Math.max((statusTextField.width - (_local15 - statusTextField.x)), 0);
statusTextField.x = _local15;
};
} else {
if (titleBar){
showTitleBar(false);
titleBar.mouseChildren = false;
titleBar.mouseEnabled = false;
};
};
if (controlBar){
_local16 = controlBar.x;
_local17 = controlBar.y;
_local18 = controlBar.width;
_local19 = controlBar.height;
controlBar.setActualSize((_arg1 - (_local3.left + _local3.right)), controlBar.getExplicitOrMeasuredHeight());
controlBar.move(_local3.left, ((_arg2 - _local3.bottom) - controlBar.getExplicitOrMeasuredHeight()));
if (controlBar.includeInLayout){
controlBar.visible = (controlBar.y >= _local3.top);
};
if (((((((!((_local16 == controlBar.x))) || (!((_local17 == controlBar.y))))) || (!((_local18 == controlBar.width))))) || (!((_local19 == controlBar.height))))){
invalidateDisplayList();
};
};
}
public function set layout(_arg1:String):void{
if (_layout != _arg1){
_layout = _arg1;
if (layoutObject){
layoutObject.target = null;
};
if (_layout == ContainerLayout.ABSOLUTE){
layoutObject = new CanvasLayout();
} else {
layoutObject = new BoxLayout();
if (_layout == ContainerLayout.VERTICAL){
BoxLayout(layoutObject).direction = BoxDirection.VERTICAL;
} else {
BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL;
};
};
if (layoutObject){
layoutObject.target = this;
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("layoutChanged"));
};
}
override public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:EdgeMetrics;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (!panelViewMetrics){
panelViewMetrics = new EdgeMetrics(0, 0, 0, 0);
};
_local1 = panelViewMetrics;
_local2 = super.viewMetrics;
_local3 = getStyle("borderThickness");
_local4 = getStyle("borderThicknessLeft");
_local5 = getStyle("borderThicknessTop");
_local6 = getStyle("borderThicknessRight");
_local7 = getStyle("borderThicknessBottom");
_local1.left = (_local2.left + (isNaN(_local4)) ? _local3 : _local4);
_local1.top = (_local2.top + (isNaN(_local5)) ? _local3 : _local5);
_local1.right = (_local2.right + (isNaN(_local6)) ? _local3 : _local6);
_local1.bottom = (_local2.bottom + (isNaN(_local7)) ? (((controlBar) && (!(isNaN(_local5))))) ? _local5 : (isNaN(_local4)) ? _local3 : _local4 : _local7);
_local8 = getHeaderHeight();
if (!isNaN(_local8)){
_local1.top = (_local1.top + _local8);
};
if (((controlBar) && (controlBar.includeInLayout))){
_local1.bottom = (_local1.bottom + controlBar.getExplicitOrMeasuredHeight());
};
return (_local1);
}
public function get title():String{
return (_title);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
if (titleTextField){
titleTextField.enabled = _arg1;
};
if (statusTextField){
statusTextField.enabled = _arg1;
};
if (controlBar){
controlBar.enabled = _arg1;
};
if (closeButton){
closeButton.enabled = _arg1;
};
}
private function stage_mouseLeaveHandler(_arg1:Event):void{
if (!isNaN(regX)){
stopDragging();
};
}
public function get titleIcon():Class{
return (_titleIcon);
}
override protected function createChildren():void{
var _local1:Class;
var _local2:IStyleClient;
var _local3:ISimpleStyleClient;
var _local4:String;
var _local5:String;
super.createChildren();
if (!titleBar){
titleBar = new UIComponent();
titleBar.visible = false;
titleBar.addEventListener(MouseEvent.MOUSE_DOWN, titleBar_mouseDownHandler);
rawChildren.addChild(titleBar);
};
if (!titleBarBackground){
_local1 = getStyle("titleBackgroundSkin");
if (_local1){
titleBarBackground = new (_local1);
_local2 = (titleBarBackground as IStyleClient);
if (_local2){
_local2.setStyle("backgroundImage", undefined);
};
_local3 = (titleBarBackground as ISimpleStyleClient);
if (_local3){
_local3.styleName = this;
};
titleBar.addChild(DisplayObject(titleBarBackground));
};
};
if (!titleTextField){
titleTextField = new UITextField();
titleTextField.selectable = false;
titleBar.addChild(titleTextField);
_local4 = getStyle("titleStyleName");
titleTextField.styleName = _local4;
titleTextField.text = title;
titleTextField.enabled = enabled;
};
if (!statusTextField){
statusTextField = new UITextField();
statusTextField.selectable = false;
titleBar.addChild(statusTextField);
_local5 = getStyle("statusStyleName");
statusTextField.styleName = _local5;
statusTextField.text = status;
statusTextField.enabled = enabled;
};
if (!closeButton){
closeButton = new Button();
closeButton.styleName = this;
closeButton.upSkinName = "closeButtonUpSkin";
closeButton.overSkinName = "closeButtonOverSkin";
closeButton.downSkinName = "closeButtonDownSkin";
closeButton.disabledSkinName = "closeButtonDisabledSkin";
closeButton.explicitWidth = (closeButton.explicitHeight = 16);
closeButton.focusEnabled = false;
closeButton.visible = false;
closeButton.enabled = enabled;
closeButton.addEventListener(MouseEvent.CLICK, closeButton_clickHandler);
titleBar.addChild(closeButton);
closeButton.owner = this;
};
}
public function get layout():String{
return (_layout);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
if (((((((cacheAsBitmap) && (!(contentPane)))) && (!((cachePolicy == UIComponentCachePolicy.OFF))))) && (getStyle("backgroundColor")))){
createContentPane();
invalidateDisplayList();
};
}
private function closeButton_clickHandler(_arg1:MouseEvent):void{
dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
}
private function setControlBar(_arg1:IUIComponent):void{
var _local2:String;
if (_arg1 == controlBar){
return;
};
controlBar = _arg1;
if (!checkedForAutoSetRoundedCorners){
checkedForAutoSetRoundedCorners = true;
autoSetRoundedCorners = (styleDeclaration) ? (styleDeclaration.getStyle("roundedBottomCorners") === undefined) : true;
};
if (autoSetRoundedCorners){
setStyle("roundedBottomCorners", !((controlBar == null)));
};
_local2 = getStyle("controlBarStyleName");
if (((_local2) && ((controlBar is ISimpleStyleClient)))){
ISimpleStyleClient(controlBar).styleName = _local2;
};
if (controlBar){
controlBar.enabled = enabled;
};
if ((controlBar is IAutomationObject)){
IAutomationObject(controlBar).showInAutomationHierarchy = false;
};
invalidateViewMetricsAndPadding();
invalidateSize();
invalidateDisplayList();
}
protected function stopDragging():void{
systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler, true);
systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
regX = NaN;
regY = NaN;
}
private function titleBar_mouseDownHandler(_arg1:MouseEvent):void{
if (_arg1.target == closeButton){
return;
};
if (((((enabled) && (isPopUp))) && (isNaN(regX)))){
startDragging(_arg1);
};
}
override protected function initializeAccessibility():void{
if (Panel.createAccessibilityImplementation != null){
Panel.createAccessibilityImplementation(this);
};
}
override public function styleChanged(_arg1:String):void{
var _local2:Boolean;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:Class;
var _local7:IStyleClient;
var _local8:ISimpleStyleClient;
_local2 = ((!(_arg1)) || ((_arg1 == "styleName")));
super.styleChanged(_arg1);
if (((_local2) || ((_arg1 == "titleStyleName")))){
if (titleTextField){
_local3 = getStyle("titleStyleName");
titleTextField.styleName = _local3;
};
};
if (((_local2) || ((_arg1 == "statusStyleName")))){
if (statusTextField){
_local4 = getStyle("statusStyleName");
statusTextField.styleName = _local4;
};
};
if (((_local2) || ((_arg1 == "controlBarStyleName")))){
if (((controlBar) && ((controlBar is ISimpleStyleClient)))){
_local5 = getStyle("controlBarStyleName");
ISimpleStyleClient(controlBar).styleName = _local5;
};
};
if (((_local2) || ((_arg1 == "titleBackgroundSkin")))){
if (titleBar){
_local6 = getStyle("titleBackgroundSkin");
if (_local6){
if (titleBarBackground){
titleBar.removeChild(DisplayObject(titleBarBackground));
titleBarBackground = null;
};
titleBarBackground = new (_local6);
_local7 = (titleBarBackground as IStyleClient);
if (_local7){
_local7.setStyle("backgroundImage", undefined);
};
_local8 = (titleBarBackground as ISimpleStyleClient);
if (_local8){
_local8.styleName = this;
};
titleBar.addChildAt(DisplayObject(titleBarBackground), 0);
};
};
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
if (border){
border.visible = true;
};
titleBar.visible = true;
}
}
}//package mx.containers
Section 79
//VBox (mx.containers.VBox)
package mx.containers {
public class VBox extends Box {
mx_internal static const VERSION:String = "2.0.1.0";
override public function set direction(_arg1:String):void{
}
}
}//package mx.containers
Section 80
//AlertForm (mx.controls.alertClasses.AlertForm)
package mx.controls.alertClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import flash.text.*;
import mx.controls.*;
import flash.ui.*;
public class AlertForm extends UIComponent {
private var icon:DisplayObject;
private var textWidth:Number;
private var textHeight:Number;
mx_internal var defaultButton:Button;
private var defaultButtonChanged:Boolean;// = false
mx_internal var buttons:Array;
mx_internal var textField:UITextField;
mx_internal static const VERSION:String = "2.0.1.0";
public function AlertForm(){
buttons = [];
defaultButtonChanged = false;
super();
tabChildren = true;
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
_local2 = Alert(parent).buttonFlags;
if (_arg1.keyCode == Keyboard.ESCAPE){
if ((((_local2 & Alert.CANCEL)) || (!((_local2 & Alert.NO))))){
removeAlert("CANCEL");
} else {
if ((_local2 & Alert.NO)){
removeAlert("NO");
};
};
};
}
private function clickHandler(_arg1:MouseEvent):void{
var _local2:String;
_local2 = Button(_arg1.currentTarget).name;
removeAlert(_local2);
}
override protected function measure():void{
var _local1:String;
var _local2:TextLineMetrics;
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
super.measure();
_local1 = Alert(parent).title;
_local2 = Alert(parent).getTitleTextField().getUITextFormat().measureText(_local1);
_local3 = Math.max(buttons.length, 2);
_local4 = ((_local3 * buttons[0].width) + ((_local3 - 1) * 8));
_local5 = Math.max(_local4, _local2.width);
textField.width = (2 * _local5);
textWidth = (textField.textWidth + UITextField.TEXT_WIDTH_PADDING);
_local6 = Math.max(_local5, textWidth);
_local6 = Math.min(_local6, (2 * _local5));
if ((((textWidth < _local6)) && ((textField.multiline == true)))){
textField.multiline = false;
textField.wordWrap = false;
} else {
if (textField.multiline == false){
textField.wordWrap = true;
textField.multiline = true;
};
};
_local6 = (_local6 + 16);
if (icon){
_local6 = (_local6 + (icon.width + 8));
};
textHeight = (textField.textHeight + UITextField.TEXT_HEIGHT_PADDING);
_local7 = textHeight;
if (icon){
_local7 = Math.max(_local7, icon.height);
};
_local7 = Math.min(_local7, (screen.height * 0.75));
_local7 = (_local7 + (buttons[0].height + (3 * 8)));
measuredWidth = _local6;
measuredHeight = _local7;
}
override protected function commitProperties():void{
var _local1:ISystemManager;
super.commitProperties();
if (((defaultButtonChanged) && (defaultButton))){
defaultButtonChanged = false;
Alert(parent).defaultButton = defaultButton;
if ((parent is IFocusManagerContainer)){
_local1 = Alert(parent).systemManager;
_local1.activate(IFocusManagerContainer(parent));
};
defaultButton.setFocus();
};
}
override protected function createChildren():void{
var _local1:Class;
var _local2:uint;
var _local3:uint;
var _local4:Button;
super.createChildren();
if (!textField){
textField = new UITextField();
textField.styleName = this;
textField.text = Alert(parent).text;
textField.multiline = true;
textField.wordWrap = true;
textField.selectable = true;
addChild(textField);
};
_local1 = Alert(parent).iconClass;
if (((_local1) && (!(icon)))){
icon = new (_local1);
addChild(icon);
};
_local2 = Alert(parent).buttonFlags;
_local3 = Alert(parent).defaultButtonFlag;
if ((_local2 & Alert.OK)){
_local4 = createButton(Alert.okLabel, "OK");
if (_local3 == Alert.OK){
defaultButton = _local4;
};
};
if ((_local2 & Alert.YES)){
_local4 = createButton(Alert.yesLabel, "YES");
if (_local3 == Alert.YES){
defaultButton = _local4;
};
};
if ((_local2 & Alert.NO)){
_local4 = createButton(Alert.noLabel, "NO");
if (_local3 == Alert.NO){
defaultButton = _local4;
};
};
if ((_local2 & Alert.CANCEL)){
_local4 = createButton(Alert.cancelLabel, "CANCEL");
if (_local3 == Alert.CANCEL){
defaultButton = _local4;
};
};
if (defaultButton){
defaultButtonChanged = true;
invalidateProperties();
};
}
private function removeAlert(_arg1:String):void{
var _local2:Alert;
var _local3:CloseEvent;
_local2 = Alert(parent);
_local2.visible = false;
_local3 = new CloseEvent(CloseEvent.CLOSE);
if (_arg1 == "YES"){
_local3.detail = Alert.YES;
} else {
if (_arg1 == "NO"){
_local3.detail = Alert.NO;
} else {
if (_arg1 == "OK"){
_local3.detail = Alert.OK;
} else {
if (_arg1 == "CANCEL"){
_local3.detail = Alert.CANCEL;
};
};
};
};
_local2.dispatchEvent(_local3);
PopUpManager.removePopUp(_local2);
}
private function createButton(_arg1:String, _arg2:String):Button{
var _local3:Button;
var _local4:String;
_local3 = new Button();
_local3.label = _arg1;
_local3.name = _arg2;
_local4 = getStyle("buttonStyleName");
if (_local4){
_local3.styleName = _local4;
};
_local3.addEventListener(MouseEvent.CLICK, clickHandler);
_local3.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
_local3.owner = parent;
addChild(_local3);
_local3.setActualSize(Alert.buttonWidth, Alert.buttonHeight);
buttons.push(_local3);
return (_local3);
}
override public function styleChanged(_arg1:String):void{
var _local2:String;
var _local3:int;
var _local4:int;
super.styleChanged(_arg1);
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "buttonStyleName")))){
if (buttons){
_local2 = getStyle("buttonStyleName");
_local3 = buttons.length;
_local4 = 0;
while (_local4 < _local3) {
buttons[_local4].styleName = _local2;
_local4++;
};
};
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number;
super.updateDisplayList(_arg1, _arg2);
_local4 = (_arg2 - buttons[0].height);
_local5 = ((buttons.length * (buttons[0].width + 8)) - 8);
_local3 = ((_arg1 - _local5) / 2);
_local6 = 0;
while (_local6 < buttons.length) {
buttons[_local6].move(_local3, _local4);
buttons[_local6].tabIndex = (_local6 + 1);
_local3 = (_local3 + (buttons[_local6].width + 8));
_local6++;
};
_local5 = textWidth;
if (icon){
_local5 = (_local5 + (icon.width + 8));
};
_local3 = ((_arg1 - _local5) / 2);
if (icon){
icon.x = _local3;
icon.y = ((_local4 - icon.height) / 2);
_local3 = (_local3 + (icon.width + 8));
};
_local7 = textField.getExplicitOrMeasuredHeight();
textField.move(_local3, ((_local4 - _local7) / 2));
textField.setActualSize((textWidth + 5), _local7);
}
}
}//package mx.controls.alertClasses
Section 81
//DataGridListData (mx.controls.dataGridClasses.DataGridListData)
package mx.controls.dataGridClasses {
import mx.core.*;
import mx.controls.listClasses.*;
public class DataGridListData extends BaseListData {
public var dataField:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){
super(_arg1, _arg4, _arg5, _arg6, _arg3);
this.dataField = _arg2;
}
}
}//package mx.controls.dataGridClasses
Section 82
//BaseListData (mx.controls.listClasses.BaseListData)
package mx.controls.listClasses {
import mx.core.*;
public class BaseListData {
private var _uid:String;
public var label:String;
public var rowIndex:int;
public var owner:IUIComponent;
public var columnIndex:int;
mx_internal static const VERSION:String = "2.0.1.0";
public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){
this.label = _arg1;
this.uid = _arg2;
this.owner = _arg3;
this.rowIndex = _arg4;
this.columnIndex = _arg5;
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
public function get uid():String{
return (_uid);
}
}
}//package mx.controls.listClasses
Section 83
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer)
package mx.controls.listClasses {
public interface IDropInListItemRenderer {
function set listData(_arg1:BaseListData):void;
function get listData():BaseListData;
}
}//package mx.controls.listClasses
Section 84
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer)
package mx.controls.listClasses {
import flash.events.*;
import mx.core.*;
import mx.managers.*;
import mx.styles.*;
public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent {
}
}//package mx.controls.listClasses
Section 85
//ScrollBar (mx.controls.scrollClasses.ScrollBar)
package mx.controls.scrollClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.controls.*;
import flash.utils.*;
import flash.ui.*;
public class ScrollBar extends UIComponent {
mx_internal var isScrolling:Boolean;
mx_internal var oldPosition:Number;
mx_internal var downArrow:Button;
private var _pageSize:Number;// = 0
mx_internal var _minHeight:Number;// = 32
private var trackScrolling:Boolean;// = false
private var trackScrollRepeatDirection:int;
private var _scrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
private var _direction:String;// = "vertical"
mx_internal var upArrow:Button;
private var trackScrollTimer:Timer;
mx_internal var scrollTrack:DisplayObject;
private var _pageScrollSize:Number;// = 0
private var _maxScrollPosition:Number;// = 0
mx_internal var scrollThumb:ScrollThumb;
private var _minScrollPosition:Number;// = 0
private var trackPosition:Number;
mx_internal var _minWidth:Number;// = 16
mx_internal static const VERSION:String = "2.0.1.0";
public static const THICKNESS:Number = 16;
public function ScrollBar(){
_minWidth = 16;
_minHeight = 32;
trackScrolling = false;
_direction = ScrollBarDirection.VERTICAL;
_lineScrollSize = 1;
_maxScrollPosition = 0;
_minScrollPosition = 0;
_pageSize = 0;
_pageScrollSize = 0;
_scrollPosition = 0;
super();
}
private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(1);
}
public function set minScrollPosition(_arg1:Number):void{
_minScrollPosition = _arg1;
}
mx_internal function get virtualHeight():Number{
return (unscaledHeight);
}
mx_internal function get lineMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT);
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
this.pageSize = _arg1;
_pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1;
this.minScrollPosition = Math.max(_arg2, 0);
this.maxScrollPosition = Math.max(_arg3, 0);
_scrollPosition = Math.max(this.minScrollPosition, _scrollPosition);
_scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition);
if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){
upArrow.enabled = true;
downArrow.enabled = true;
addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler);
addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler);
if (!scrollThumb){
scrollThumb = new ScrollThumb();
scrollThumb.focusEnabled = false;
addChildAt(scrollThumb, getChildIndex(downArrow));
scrollThumb.styleName = this;
scrollThumb.upSkinName = "thumbUpSkin";
scrollThumb.overSkinName = "thumbOverSkin";
scrollThumb.downSkinName = "thumbDownSkin";
scrollThumb.iconName = "thumbIcon";
};
_local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight));
if (_local5 < scrollThumb.minHeight){
if (trackHeight < scrollThumb.minHeight){
scrollThumb.visible = false;
} else {
_local5 = scrollThumb.minHeight;
scrollThumb.visible = true;
scrollThumb.setActualSize(_minWidth, scrollThumb.minHeight);
};
} else {
scrollThumb.visible = true;
scrollThumb.setActualSize(_minWidth, _local5);
};
scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition);
scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition);
} else {
upArrow.enabled = false;
downArrow.enabled = false;
if (scrollThumb){
scrollThumb.visible = false;
};
};
}
public function get pageScrollSize():Number{
return (_pageScrollSize);
}
private function get trackY():Number{
return (upArrow.getExplicitOrMeasuredHeight());
}
public function set pageScrollSize(_arg1:Number):void{
_pageScrollSize = _arg1;
}
mx_internal function isScrollBarKey(_arg1:uint):Boolean{
var _local2:Number;
if (_arg1 == Keyboard.HOME){
if (scrollPosition != 0){
_local2 = scrollPosition;
scrollPosition = 0;
dispatchScrollEvent(_local2, minDetail);
};
return (true);
} else {
if (_arg1 == Keyboard.END){
if (scrollPosition < maxScrollPosition){
_local2 = scrollPosition;
scrollPosition = maxScrollPosition;
dispatchScrollEvent(_local2, maxDetail);
};
return (true);
};
};
return (false);
}
private function trackScrollTimerHandler(_arg1:Event):void{
if (trackScrollRepeatDirection == 1){
if ((scrollThumb.y + scrollThumb.height) > trackPosition){
return;
};
};
if (trackScrollRepeatDirection == -1){
if (scrollThumb.y < trackPosition){
return;
};
};
pageScroll(trackScrollRepeatDirection);
if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){
trackScrollTimer.delay = getStyle("repeatInterval");
trackScrollTimer.repeatCount = 0;
};
}
private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{
scrollTrack_mouseLeaveHandler(_arg1);
}
private function get minDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT);
}
override protected function measure():void{
super.measure();
upArrow.validateSize();
downArrow.validateSize();
_minWidth = upArrow.getExplicitOrMeasuredWidth();
_minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight());
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
mx_internal function get linePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT);
}
private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
if (_arg1.target != stage){
return;
};
scrollTrack_mouseMoveHandler(_arg1);
}
private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(-1);
}
private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{
if (_arg1.target != this){
return;
};
if (trackScrolling){
trackScrollTimer.start();
};
}
private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{
if (_arg1.target != this){
return;
};
trackScrolling = true;
systemManager.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
systemManager.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler);
trackPosition = _arg1.localY;
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _arg1.localY)) ? 1 : ((scrollThumb.y > _arg1.localY)) ? -1 : 0;
pageScroll(trackScrollRepeatDirection);
if (!trackScrollTimer){
trackScrollTimer = new Timer(getStyle("repeatDelay"), 1);
trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler);
};
trackScrollTimer.start();
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
}
public function set scrollPosition(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_scrollPosition = _arg1;
if (scrollThumb){
if (!cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = true);
};
if (!isScrolling){
_arg1 = Math.min(_arg1, maxScrollPosition);
_arg1 = Math.max(_arg1, minScrollPosition);
_local2 = (maxScrollPosition - minScrollPosition);
_local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY);
scrollThumb.move(0, Math.round(_local3));
};
};
}
mx_internal function pageScroll(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:String;
_local2 = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize;
_local3 = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{
var _local2:String;
trackScrolling = false;
systemManager.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler);
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler);
if (trackScrollTimer){
trackScrollTimer.reset();
};
if (_arg1.target != this){
return;
};
_local2 = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(oldPosition, _local2);
oldPosition = NaN;
}
private function get trackHeight():Number{
return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight())));
}
public function set pageSize(_arg1:Number):void{
_pageSize = _arg1;
}
mx_internal function get pagePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
invalidateDisplayList();
}
mx_internal function get pageMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT);
}
private function get maxDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT);
}
private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{
if (trackScrolling){
trackScrollTimer.stop();
};
}
mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{
var _local3:ScrollEvent;
_local3 = new ScrollEvent(ScrollEvent.SCROLL);
_local3.detail = _arg2;
_local3.position = scrollPosition;
_local3.delta = (scrollPosition - _arg1);
_local3.direction = direction;
dispatchEvent(_local3);
}
public function set lineScrollSize(_arg1:Number):void{
_lineScrollSize = _arg1;
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("directionChanged"));
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!scrollTrack){
_local1 = getStyle("trackSkin");
scrollTrack = new (_local1);
if ((scrollTrack is ISimpleStyleClient)){
ISimpleStyleClient(scrollTrack).styleName = this;
};
addChild(scrollTrack);
};
if (!upArrow){
upArrow = new Button();
upArrow.enabled = false;
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
upArrow.upSkinName = "upArrowUpSkin";
upArrow.overSkinName = "upArrowOverSkin";
upArrow.downSkinName = "upArrowDownSkin";
upArrow.disabledSkinName = "upArrowDisabledSkin";
upArrow.upIconName = "";
upArrow.overIconName = "";
upArrow.downIconName = "";
upArrow.disabledIconName = "";
addChild(upArrow);
upArrow.styleName = this;
upArrow.validateProperties();
upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler);
};
if (!downArrow){
downArrow = new Button();
downArrow.enabled = false;
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
downArrow.upSkinName = "downArrowUpSkin";
downArrow.overSkinName = "downArrowOverSkin";
downArrow.downSkinName = "downArrowDownSkin";
downArrow.disabledSkinName = "downArrowDisabledSkin";
downArrow.upIconName = "";
downArrow.overIconName = "";
downArrow.downIconName = "";
downArrow.disabledIconName = "";
addChild(downArrow);
downArrow.styleName = this;
downArrow.validateProperties();
downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler);
};
}
public function set maxScrollPosition(_arg1:Number):void{
_maxScrollPosition = _arg1;
}
public function get pageSize():Number{
return (_pageSize);
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
mx_internal function lineScroll(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:String;
_local2 = _lineScrollSize;
_local3 = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if ($height == 1){
return;
};
if (!upArrow){
return;
};
super.updateDisplayList(_arg1, _arg2);
if (cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = false);
};
upArrow.move(0, 0);
upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight());
scrollTrack.y = 0;
scrollTrack.height = virtualHeight;
downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight());
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize);
scrollPosition = _scrollPosition;
}
private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
if (trackScrolling){
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
trackPosition = _local2.y;
};
}
}
}//package mx.controls.scrollClasses
Section 86
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection)
package mx.controls.scrollClasses {
public final class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.controls.scrollClasses
Section 87
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb)
package mx.controls.scrollClasses {
import flash.events.*;
import mx.events.*;
import flash.geom.*;
import mx.controls.*;
public class ScrollThumb extends Button {
private var lastY:Number;
private var datamax:Number;
private var datamin:Number;
private var ymax:Number;
private var ymin:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function ScrollThumb(){
explicitMinHeight = 10;
stickyHighlighting = true;
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:Number;
var _local4:ScrollBar;
var _local5:Number;
var _local6:Number;
if (ymin == ymax){
return;
};
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
_local3 = (_local2.y - lastY);
_local3 = (_local3 + y);
if (_local3 < ymin){
_local3 = ymin;
} else {
if (_local3 > ymax){
_local3 = ymax;
};
};
_local4 = ScrollBar(parent);
_local4.isScrolling = true;
$y = _local3;
_local5 = _local4.scrollPosition;
_local6 = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin);
_local4.scrollPosition = _local6;
_local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK);
}
override protected function measure():void{
super.measure();
measuredWidth = 14;
measuredHeight = 10;
}
mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.ymin = _arg1;
this.ymax = _arg2;
this.datamin = _arg3;
this.datamax = _arg4;
}
override protected function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:ScrollBar;
super.mouseDownHandler(_arg1);
_local2 = ScrollBar(parent);
_local2.oldPosition = _local2.scrollPosition;
lastY = _arg1.localY;
systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler);
}
override mx_internal function buttonReleased():void{
super.buttonReleased();
stopDragThumb();
}
private function stopDragThumb():void{
var _local1:ScrollBar;
_local1 = ScrollBar(parent);
_local1.isScrolling = false;
_local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION);
_local1.oldPosition = NaN;
systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler);
}
private function stage_mouseMoveHandler(_arg1:MouseEvent):void{
if (_arg1.target != stage){
return;
};
mouseMoveHandler(_arg1);
}
}
}//package mx.controls.scrollClasses
Section 88
//Alert (mx.controls.Alert)
package mx.controls {
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import mx.containers.*;
import mx.resources.*;
import flash.system.*;
import mx.controls.alertClasses.*;
public class Alert extends Panel {
mx_internal var alertForm:AlertForm;
public var iconClass:Class;
private var init:Boolean;// = false
public var text:String;// = ""
public var buttonFlags:uint;// = 4
public var defaultButtonFlag:uint;// = 4
public static const NONMODAL:uint = 0x8000;
public static const NO:uint = 2;
public static const YES:uint = 1;
public static const OK:uint = 4;
mx_internal static const VERSION:String = "2.0.1.0";
public static const CANCEL:uint = 8;
public static var buttonWidth:Number = 60;
mx_internal static var createAccessibilityImplementation:Function;
private static var resourceNoLabel:String;
public static var yesLabel:String = "";
private static var resourceOkLabel:String;
public static var cancelLabel:String = "";
public static var okLabel:String = "";
private static var resourceCancelLabel:String;
public static var noLabel:String = "";
public static var buttonHeight:Number = 22;
private static var resourceYesLabel:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("controls", ApplicationDomain.currentDomain);
public function Alert(){
init = false;
buttonFlags = OK;
defaultButtonFlag = OK;
text = "";
super();
title = "";
}
override protected function measure():void{
var _local1:EdgeMetrics;
super.measure();
_local1 = viewMetrics;
measuredWidth = Math.max(measuredWidth, ((alertForm.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right));
measuredHeight = ((alertForm.getExplicitOrMeasuredHeight() + _local1.top) + _local1.bottom);
}
override protected function createChildren():void{
var _local1:String;
super.createChildren();
_local1 = getStyle("messageStyleName");
if (_local1){
styleName = _local1;
};
if (!alertForm){
alertForm = new AlertForm();
alertForm.styleName = this;
addChild(alertForm);
};
}
override protected function initializeAccessibility():void{
if (Alert.createAccessibilityImplementation != null){
Alert.createAccessibilityImplementation(this);
};
}
override public function styleChanged(_arg1:String):void{
var _local2:String;
super.styleChanged(_arg1);
if (_arg1 == "messageStyleName"){
_local2 = getStyle("messageStyleName");
styleName = _local2;
};
if (alertForm){
alertForm.styleChanged(_arg1);
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:Number;
super.updateDisplayList(_arg1, _arg2);
_local3 = viewMetrics;
alertForm.setActualSize(((((_arg1 - _local3.left) - _local3.right) - getStyle("paddingLeft")) - getStyle("paddingRight")), ((((_arg2 - _local3.top) - _local3.bottom) - getStyle("paddingTop")) - getStyle("paddingBottom")));
if (!init){
if (parent == systemManager){
_local4 = ((screen.width - measuredWidth) / 2);
_local5 = ((screen.height - measuredHeight) / 2);
} else {
_local4 = ((parent.width - measuredWidth) / 2);
_local5 = ((parent.height - measuredHeight) / 2);
};
move(Math.round(_local4), Math.round(_local5));
init = true;
};
}
private static function bundleChanged():void{
okLabel = resourceOkLabel;
yesLabel = resourceYesLabel;
noLabel = resourceNoLabel;
cancelLabel = resourceCancelLabel;
}
private static function loadResources():void{
resourceCancelLabel = packageResources.getString("cancelLabel");
resourceNoLabel = packageResources.getString("noLabel");
resourceOkLabel = packageResources.getString("okLabel");
resourceYesLabel = packageResources.getString("yesLabel");
bundleChanged();
}
public static function show(_arg1:String="", _arg2:String="", _arg3:uint=4, _arg4:Sprite=null, _arg5:Function=null, _arg6:Class=null, _arg7:uint=4):Alert{
var _local8:Boolean;
var _local9:Alert;
_local8 = ((_arg3 & Alert.NONMODAL)) ? false : true;
if (!_arg4){
_arg4 = Sprite(Application.application);
};
_local9 = new (Alert);
if ((((((((_arg3 & Alert.OK)) || ((_arg3 & Alert.CANCEL)))) || ((_arg3 & Alert.YES)))) || ((_arg3 & Alert.NO)))){
_local9.buttonFlags = _arg3;
};
if ((((((((_arg7 == Alert.OK)) || ((_arg7 == Alert.CANCEL)))) || ((_arg7 == Alert.YES)))) || ((_arg7 == Alert.NO)))){
_local9.defaultButtonFlag = _arg7;
};
_local9.text = _arg1;
_local9.title = _arg2;
_local9.iconClass = _arg6;
if (_arg5 != null){
_local9.addEventListener(CloseEvent.CLOSE, _arg5);
};
PopUpManager.addPopUp(_local9, _arg4, _local8);
_local9.setActualSize(_local9.getExplicitOrMeasuredWidth(), _local9.getExplicitOrMeasuredHeight());
return (_local9);
}
loadResources();
}
}//package mx.controls
Section 89
//Button (mx.controls.Button)
package mx.controls {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import mx.styles.*;
import flash.text.*;
import mx.controls.listClasses.*;
import flash.utils.*;
import mx.skins.*;
import mx.controls.dataGridClasses.*;
import flash.ui.*;
public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer {
private var enabledChanged:Boolean;// = false
private var skinMeasuredWidth:Number;
mx_internal var disabledSkinName:String;// = "disabledSkin"
mx_internal var downSkinName:String;// = "downSkin"
mx_internal var _labelPlacement:String;// = "right"
private var _data:Object;
private var _phase:String;// = "up"
mx_internal var _toggle:Boolean;// = false
mx_internal var selectedOverSkinName:String;// = "selectedOverSkin"
mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin"
private var labelSet:Boolean;
mx_internal var toggleChanged:Boolean;// = false
private var labelChanged:Boolean;// = false
private var autoRepeatTimer:Timer;
mx_internal var disabledIconName:String;// = "disabledIcon"
mx_internal var upSkinName:String;// = "upSkin"
private var toolTipSet:Boolean;// = false
mx_internal var downIconName:String;// = "downIcon"
mx_internal var currentIcon:IFlexDisplayObject;
private var styleChangedFlag:Boolean;// = true
private var _autoRepeat:Boolean;// = false
mx_internal var selectedOverIconName:String;// = "selectedOverIcon"
private var _label:String;// = ""
mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon"
mx_internal var extraSpacing:Number;
mx_internal var selectedUpSkinName:String;// = "selectedUpSkin"
mx_internal var upIconName:String;// = "upIcon"
mx_internal var buttonOffset:Number;// = 0
private var skinMeasuredHeight:Number;
mx_internal var centerContent:Boolean;// = true
private var oldUnscaledWidth:Number;
private var skins:Array;
mx_internal var overSkinName:String;// = "overSkin"
mx_internal var currentSkin:IFlexDisplayObject;
mx_internal var selectedDownSkinName:String;// = "selectedDownSkin"
private var _listData:BaseListData;
mx_internal var iconName:String;// = "icon"
mx_internal var _emphasized:Boolean;// = false
public var selectedField:String;// = null
private var icons:Array;
public var stickyHighlighting:Boolean;// = false
mx_internal var selectedUpIconName:String;// = "selectedUpIcon"
mx_internal var selectedDownIconName:String;// = "selectedDownIcon"
mx_internal var overIconName:String;// = "overIcon"
private var selectedSet:Boolean;
protected var textField:UITextField;
mx_internal var _selected:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var createAccessibilityImplementation:Function;
public function Button(){
skins = [];
icons = [];
buttonOffset = 0;
centerContent = true;
extraSpacing = (10 + 10);
styleChangedFlag = true;
upSkinName = "upSkin";
overSkinName = "overSkin";
downSkinName = "downSkin";
disabledSkinName = "disabledSkin";
selectedUpSkinName = "selectedUpSkin";
selectedOverSkinName = "selectedOverSkin";
selectedDownSkinName = "selectedDownSkin";
selectedDisabledSkinName = "selectedDisabledSkin";
iconName = "icon";
upIconName = "upIcon";
overIconName = "overIcon";
downIconName = "downIcon";
disabledIconName = "disabledIcon";
selectedUpIconName = "selectedUpIcon";
selectedOverIconName = "selectedOverIcon";
selectedDownIconName = "selectedDownIcon";
selectedDisabledIconName = "selectedDisabledIcon";
enabledChanged = false;
toolTipSet = false;
_autoRepeat = false;
_emphasized = false;
_label = "";
labelChanged = false;
_labelPlacement = ButtonLabelPlacement.RIGHT;
_phase = ButtonPhase.UP;
_selected = false;
selectedField = null;
stickyHighlighting = false;
_toggle = false;
toggleChanged = false;
super();
mouseChildren = false;
addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
addEventListener(MouseEvent.CLICK, clickHandler);
}
override protected function adjustFocusRect(_arg1:DisplayObject=null):void{
super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon));
}
mx_internal function getCurrentIcon():IFlexDisplayObject{
var _local1:String;
var _local2:IFlexDisplayObject;
var _local3:Class;
_local1 = getCurrentIconName();
if (!_local1){
return (null);
};
_local2 = IFlexDisplayObject(getChildByName(_local1));
if (_local2 == null){
_local3 = Class(getStyle(_local1));
if (_local3 == null){
_local3 = Class(getStyle(iconName));
};
if (_local3 != null){
_local2 = IFlexDisplayObject(new (_local3));
_local2.name = _local1;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addChild(DisplayObject(_local2));
icons.push(_local2);
};
};
return (_local2);
}
mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:TextLineMetrics;
var _local21:Number;
var _local22:String;
var _local23:EdgeMetrics;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = 0;
_local8 = 0;
_local9 = 0;
_local10 = 0;
_local11 = 0;
_local12 = 2;
_local13 = 2;
_local14 = getStyle("paddingLeft");
_local15 = getStyle("paddingRight");
_local16 = getStyle("paddingTop");
_local17 = getStyle("paddingBottom");
_local18 = 0;
_local19 = 0;
if (label){
_local20 = measureText(label);
if (_local20.width > 0){
_local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width);
};
_local19 = _local20.height;
} else {
_local20 = measureText("Wj");
_local19 = _local20.height;
};
_local21 = (_arg3) ? buttonOffset : 0;
_local22 = getStyle("textAlign");
_local23 = (((currentSkin) && ((currentSkin is RectangularBorder)))) ? RectangularBorder(currentSkin).borderMetrics : null;
_local24 = _arg1;
_local25 = ((_arg2 - _local16) - _local17);
if (_local23){
_local24 = (_local24 - (_local23.left + _local23.right));
_local25 = (_local25 - (_local23.top + _local23.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING));
textField.height = _local5;
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local8 + _local12);
if (centerContent){
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14));
} else {
_local28 = ((((_local24 - _local4) - _local8) - _local12) / 2);
_local6 = (_local6 + Math.max(_local28, _local14));
};
};
};
_local10 = (_local6 - (_local8 + _local12));
if (!centerContent){
_local6 = (_local6 + _local14);
};
} else {
_local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15);
if (centerContent){
if (_local22 == "left"){
_local6 = 2;
} else {
if (_local22 == "right"){
_local6--;
} else {
if (_local6 > 0){
_local6 = (_local6 / 2);
};
};
};
};
_local10 = ((_local6 + _local4) + _local12);
};
_local7 = 0;
_local11 = _local7;
if (centerContent){
_local11 = (Math.round(((_local25 - _local9) / 2)) + _local16);
_local7 = (Math.round(((_local25 - _local5) / 2)) + _local16);
} else {
_local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16));
_local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16));
};
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((_local19 == 0)))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING));
textField.width = _local4;
_local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5));
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = ((_local24 - _local4) / 2);
_local10 = ((_local24 - _local8) / 2);
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (((_local25 - _local5) - _local9) - _local13);
if (((centerContent) && ((_local7 > 0)))){
_local7 = (_local7 / 2);
};
_local7 = (_local7 + _local16);
_local11 = (((_local7 + _local5) + _local13) - 3);
} else {
_local7 = ((_local9 + _local13) + _local16);
if (centerContent){
_local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1));
};
_local11 = (((_local7 - _local9) - _local13) + 3);
};
};
_local26 = _local21;
_local27 = _local21;
if (_local23){
_local26 = (_local26 + _local23.left);
_local27 = (_local27 + _local23.top);
};
textField.x = (_local6 + _local26);
textField.y = (_local7 + _local27);
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(textField, (numChildren - 1));
};
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonPressed();
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
protected function rollOutHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.UP;
_arg1.updateAfterEvent();
} else {
if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.stop();
};
};
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonReleased();
if (phase == ButtonPhase.DOWN){
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
phase = ButtonPhase.UP;
};
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
if (_arg1){
autoRepeatTimer = new Timer(1);
} else {
autoRepeatTimer = null;
};
}
mx_internal function buttonPressed():void{
phase = ButtonPhase.DOWN;
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.delay = getStyle("repeatDelay");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.start();
};
}
mx_internal function viewIcon():void{
var _local1:String;
_local1 = getCurrentIconName();
viewIconForPhase(_local1);
}
mx_internal function changeSkins():void{
var _local1:int;
var _local2:int;
_local1 = skins.length;
_local2 = 0;
while (_local2 < _local1) {
removeChild(skins[_local2]);
_local2++;
};
skins = [];
}
private function autoRepeatTimer_timerHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
}
private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{
if (contains(DisplayObject(_arg1.target))){
return;
};
phase = ButtonPhase.UP;
buttonReleased();
_arg1.updateAfterEvent();
}
protected function mouseUpHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
phase = ButtonPhase.OVER;
buttonReleased();
_arg1.updateAfterEvent();
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelPlacementChanged"));
}
mx_internal function viewIconForPhase(_arg1:String):void{
var _local2:IFlexDisplayObject;
var _local3:Class;
_local2 = IFlexDisplayObject(getChildByName(_arg1));
if (_local2 == null){
_local3 = Class(getStyle(_arg1));
if (_local3 == null){
_local3 = Class(getStyle(iconName));
};
if (_local3 != null){
_local2 = IFlexDisplayObject(new (_local3));
_local2.name = _arg1;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addChild(DisplayObject(_local2));
icons.push(_local2);
};
};
if (currentIcon != null){
currentIcon.visible = false;
};
currentIcon = _local2;
if (currentIcon != null){
currentIcon.visible = true;
};
}
mx_internal function getTextField():UITextField{
return (textField);
}
mx_internal function setSelected(_arg1:Boolean):void{
if (_selected != _arg1){
_selected = _arg1;
invalidateDisplayList();
if (toggle){
dispatchEvent(new Event(Event.CHANGE));
};
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
};
}
protected function clickHandler(_arg1:MouseEvent):void{
if (!enabled){
_arg1.stopImmediatePropagation();
return;
};
if (toggle){
setSelected(!(selected));
};
}
mx_internal function getCurrentIconName():String{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledIconName : disabledIconName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpIconName : upIconName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverIconName : overIconName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownIconName : downIconName;
};
};
};
};
return (_local1);
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function measure():void{
var textWidth:Number;
var textHeight:Number;
var bm:EdgeMetrics;
var tempCurrentIcon:IFlexDisplayObject;
var iconWidth:Number;
var iconHeight:Number;
var w:Number;
var h:Number;
var lineMetrics:TextLineMetrics;
super.measure();
textWidth = 0;
textHeight = 0;
if (label){
lineMetrics = measureText(label);
textWidth = lineMetrics.width;
textHeight = lineMetrics.height;
textWidth = (textWidth + ((getStyle("paddingLeft") + getStyle("paddingRight")) + getStyle("textIndent")));
textHeight = (textHeight + (getStyle("paddingTop") + getStyle("paddingBottom")));
};
try {
bm = currentSkin["borderMetrics"];
} catch(e:Error) {
bm = new EdgeMetrics(3, 3, 3, 3);
};
tempCurrentIcon = getCurrentIcon();
iconWidth = (tempCurrentIcon) ? tempCurrentIcon.width : 0;
iconHeight = (tempCurrentIcon) ? tempCurrentIcon.height : 0;
w = 0;
h = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
w = (textWidth + iconWidth);
if (iconWidth != 0){
w = (w + (getStyle("horizontalGap") - 2));
};
h = Math.max(textHeight, (iconHeight + 6));
} else {
w = Math.max(textWidth, iconWidth);
h = (textHeight + iconHeight);
if (iconHeight != 0){
h = (h + getStyle("verticalGap"));
};
};
if (bm){
w = (w + (bm.left + bm.right));
h = (h + (bm.top + bm.bottom));
};
if (((label) && (!((label.length == 0))))){
w = (w + extraSpacing);
} else {
w = (w + 6);
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
w = Math.max(skinMeasuredWidth, w);
};
if (!isNaN(skinMeasuredHeight)){
h = Math.max(skinMeasuredHeight, h);
};
measuredMinWidth = (measuredWidth = w);
measuredMinHeight = (measuredHeight = h);
}
mx_internal function get phase():String{
return (_phase);
}
public function set selected(_arg1:Boolean):void{
selectedSet = true;
setSelected(_arg1);
}
mx_internal function changeIcons():void{
var _local1:int;
var _local2:int;
_local1 = icons.length;
_local2 = 0;
while (_local2 < _local1) {
removeChild(icons[_local2]);
_local2++;
};
icons = [];
}
override protected function commitProperties():void{
super.commitProperties();
if (!initialized){
viewSkin();
viewIcon();
};
if (enabledChanged){
textField.enabled = enabled;
enabledChanged = false;
};
if (toggleChanged){
if (!toggle){
selected = false;
};
toggleChanged = false;
};
}
public function get listData():BaseListData{
return (_listData);
}
mx_internal function viewSkin():void{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledSkinName : disabledSkinName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpSkinName : upSkinName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverSkinName : overSkinName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownSkinName : downSkinName;
};
};
};
};
viewSkinForPhase(_local1);
}
public function set label(_arg1:String):void{
labelSet = true;
if (_label != _arg1){
_label = _arg1;
labelChanged = true;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelChanged"));
};
}
mx_internal function viewSkinForPhase(_arg1:String):void{
var _local2:IFlexDisplayObject;
var _local3:Number;
var _local4:Class;
var _local5:ISimpleStyleClient;
_local2 = IFlexDisplayObject(getChildByName(_arg1));
if (!_local2){
_local4 = Class(getStyle(_arg1));
if (_local4){
_local2 = IFlexDisplayObject(new (_local4));
_local2.name = _arg1;
_local5 = (_local2 as ISimpleStyleClient);
if (_local5){
_local5.styleName = this;
};
addChild(DisplayObject(_local2));
_local2.setActualSize(unscaledWidth, unscaledHeight);
if ((((_local2 is IInvalidating)) && (initialized))){
IInvalidating(_local2).validateNow();
} else {
if ((((_local2 is ProgrammaticSkin)) && (initialized))){
ProgrammaticSkin(_local2).validateDisplayList();
};
};
skins.push(_local2);
};
};
if (currentSkin){
currentSkin.visible = false;
};
currentSkin = _local2;
if (currentSkin){
currentSkin.visible = true;
};
if (enabled){
if (phase == ButtonPhase.OVER){
_local3 = textField.getStyle("textRollOverColor");
} else {
if (phase == ButtonPhase.DOWN){
_local3 = textField.getStyle("textSelectedColor");
} else {
_local3 = textField.getStyle("color");
};
};
textField.setColor(_local3);
};
}
private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.reset();
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.delay = getStyle("repeatInterval");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.start();
};
}
protected function mouseDownHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
buttonPressed();
_arg1.updateAfterEvent();
}
override public function set enabled(_arg1:Boolean):void{
if (super.enabled == _arg1){
return;
};
super.enabled = _arg1;
enabledChanged = true;
invalidateProperties();
invalidateDisplayList();
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override public function get baselinePosition():Number{
var _local1:String;
var _local2:TextLineMetrics;
_local1 = label;
if (!_local1){
_local1 = "Wj";
};
validateNow();
if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){
_local2 = measureText(_local1);
return ((((measuredHeight - _local2.height) / 2) + _local2.ascent));
};
return ((textField.y + measureText(_local1).ascent));
}
public function set toggle(_arg1:Boolean):void{
_toggle = _arg1;
toggleChanged = true;
invalidateProperties();
invalidateDisplayList();
dispatchEvent(new Event("toggleChanged"));
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
changeSkins();
invalidateDisplayList();
}
public function get selected():Boolean{
return (_selected);
}
mx_internal function buttonReleased():void{
systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
if (autoRepeatTimer){
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.reset();
};
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
mx_internal function set phase(_arg1:String):void{
_phase = _arg1;
invalidateSize();
invalidateDisplayList();
}
private function stage_mouseLeaveHandler(_arg1:Event):void{
phase = ButtonPhase.UP;
buttonReleased();
}
public function get label():String{
return (_label);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (phase != ButtonPhase.UP){
phase = ButtonPhase.UP;
};
}
override protected function createChildren():void{
super.createChildren();
if (!textField){
textField = new UITextField();
textField.styleName = this;
addChild(textField);
};
}
protected function rollOverHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.UP){
if (_arg1.buttonDown){
return;
};
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
} else {
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.DOWN;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.start();
};
};
};
}
public function set data(_arg1:Object):void{
var _local2:*;
var _local3:*;
_data = _arg1;
if (((_listData) && ((_listData is DataGridListData)))){
_local2 = _data[DataGridListData(_listData).dataField];
_local3 = "";
} else {
if (_listData){
if (selectedField){
_local2 = _data[selectedField];
};
_local3 = _listData.label;
} else {
_local2 = _data;
};
};
if (((!((_local2 === undefined))) && (!(selectedSet)))){
selected = (_local2 as Boolean);
selectedSet = false;
};
if (((!((_local3 === undefined))) && (!(labelSet)))){
label = _local3;
labelSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
public function get data():Object{
if (!_data){
_data = {};
};
return (_data);
}
public function get toggle():Boolean{
return (_toggle);
}
override public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
super.styleChanged(_arg1);
if (((!(_arg1)) || ((_arg1 == "styleName")))){
changeSkins();
changeIcons();
} else {
if (_arg1.toLowerCase().indexOf("skin") != -1){
changeSkins();
} else {
if (_arg1.toLowerCase().indexOf("icon") != -1){
changeIcons();
invalidateSize();
};
};
};
}
override public function set toolTip(_arg1:String):void{
super.toolTip = _arg1;
if (_arg1){
toolTipSet = true;
} else {
toolTipSet = false;
invalidateDisplayList();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:int;
var _local5:IFlexDisplayObject;
var _local6:Boolean;
super.updateDisplayList(_arg1, _arg2);
_local3 = skins.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(skins[_local4]);
_local5.setActualSize(_arg1, _arg2);
_local4++;
};
viewSkin();
viewIcon();
if (((currentIcon) && ((currentIcon is IUIComponent)))){
IUIComponent(currentIcon).enabled = enabled;
};
layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN));
if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){
textField.text = label;
_local6 = textField.truncateToFit();
if (!toolTipSet){
if (_local6){
super.toolTip = label;
} else {
super.toolTip = null;
};
};
styleChangedFlag = false;
labelChanged = false;
};
oldUnscaledWidth = _arg1;
}
}
}//package mx.controls
Section 90
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement)
package mx.controls {
public final class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
mx_internal static const VERSION:String = "2.0.1.0";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package mx.controls
Section 91
//ButtonPhase (mx.controls.ButtonPhase)
package mx.controls {
public final class ButtonPhase {
public static const DOWN:String = "down";
public static const OVER:String = "over";
mx_internal static const VERSION:String = "2.0.1.0";
public static const UP:String = "up";
}
}//package mx.controls
Section 92
//CheckBox (mx.controls.CheckBox)
package mx.controls {
public class CheckBox extends Button {
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var createAccessibilityImplementation:Function;
public function CheckBox(){
_toggle = true;
centerContent = false;
extraSpacing = 8;
}
override protected function measure():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
super.measure();
_local1 = measureText(label).height;
_local2 = (currentIcon) ? currentIcon.height : 0;
_local3 = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local3 = Math.max(_local1, _local2);
} else {
_local3 = (_local1 + _local2);
_local4 = getStyle("verticalGap");
if (((!((_local2 == 0))) && (!(isNaN(_local4))))){
_local3 = (_local3 + _local4);
};
};
measuredMinHeight = (measuredHeight = Math.max(_local3, 18));
}
override public function set toggle(_arg1:Boolean):void{
}
override public function set emphasized(_arg1:Boolean):void{
}
override protected function initializeAccessibility():void{
if (_slot1.createAccessibilityImplementation != null){
_slot1.createAccessibilityImplementation(this);
};
}
}
}//package mx.controls
Section 93
//HScrollBar (mx.controls.HScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class HScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "2.0.1.0";
public function HScrollBar(){
super.direction = ScrollBarDirection.HORIZONTAL;
scaleX = -1;
rotation = -90;
}
override mx_internal function get virtualHeight():Number{
return (unscaledWidth);
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.LEFT){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.RIGHT){
lineScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override protected function measure():void{
super.measure();
measuredWidth = _minHeight;
measuredHeight = _minWidth;
}
override public function get minHeight():Number{
return (_minWidth);
}
override public function get minWidth():Number{
return (_minHeight);
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 94
//Image (mx.controls.Image)
package mx.controls {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.controls.listClasses.*;
public class Image extends SWFLoader implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer {
private var _data:Object;
private var sourceSet:Boolean;
private var _listData:BaseListData;
private var makeContentVisible:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
public function Image(){
makeContentVisible = false;
super();
tabChildren = false;
tabEnabled = true;
showInAutomationHierarchy = true;
}
override public function set source(_arg1:Object):void{
sourceSet = true;
super.source = _arg1;
}
override mx_internal function contentLoaderInfo_completeEventHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target.loader);
super.contentLoaderInfo_completeEventHandler(_arg1);
_local2.visible = false;
makeContentVisible = true;
invalidateDisplayList();
}
public function get listData():BaseListData{
return (_listData);
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
public function set data(_arg1:Object):void{
_data = _arg1;
if (!sourceSet){
source = (listData) ? listData.label : data;
sourceSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
public function get data():Object{
return (_data);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
if (((makeContentVisible) && (contentHolder))){
contentHolder.visible = true;
makeContentVisible = false;
};
}
}
}//package mx.controls
Section 95
//Label (mx.controls.Label)
package mx.controls {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.geom.*;
import flash.text.*;
import mx.controls.listClasses.*;
public class Label extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer {
mx_internal var htmlTextChanged:Boolean;// = false
private var enabledChanged:Boolean;// = false
private var _data:Object;
mx_internal var textChanged:Boolean;// = false
private var _htmlText:String;// = ""
private var _condenseWhite:Boolean;// = false
private var toolTipSet:Boolean;// = false
private var selectableChanged:Boolean;
private var explicitHTMLText:String;// = null
private var condenseWhiteChanged:Boolean;// = false
private var _selectable:Boolean;// = false
public var truncateToFit:Boolean;// = true
private var _text:String;// = ""
private var _textHeight:Number;
private var _listData:BaseListData;
private var _textWidth:Number;
private var _tabIndex:int;// = -1
protected var textField:UITextField;
private var textSet:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function Label(){
enabledChanged = false;
toolTipSet = false;
_condenseWhite = false;
condenseWhiteChanged = false;
_htmlText = "";
htmlTextChanged = false;
explicitHTMLText = null;
_selectable = false;
_tabIndex = -1;
_text = "";
textChanged = false;
truncateToFit = true;
super();
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
mx_internal function set styleSheet(_arg1:StyleSheet):void{
textField.styleSheet = _arg1;
}
public function get selectable():Boolean{
return (_selectable);
}
override public function set tabIndex(_arg1:int):void{
_tabIndex = _arg1;
invalidateProperties();
}
private function textField_textFieldStyleChangeHandler(_arg1:Event):void{
textFieldChanged(true);
}
public function set selectable(_arg1:Boolean):void{
if (_arg1 == selectable){
return;
};
_selectable = _arg1;
selectableChanged = true;
invalidateProperties();
}
public function get textHeight():Number{
return (_textHeight);
}
public function get textWidth():Number{
return (_textWidth);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return ((textField) ? textField.getLineMetrics(_arg1) : null);
}
mx_internal function getTextField():UITextField{
return (textField);
}
mx_internal function getMinimumText(_arg1:String):String{
if (((!(_arg1)) || ((_arg1.length < 2)))){
_arg1 = "Wj";
};
return (_arg1);
}
public function get text():String{
return (_text);
}
override protected function measure():void{
var _local1:String;
var _local2:Rectangle;
super.measure();
_local1 = (isHTML) ? explicitHTMLText : text;
_local1 = getMinimumText(_local1);
_local2 = measureTextFieldBounds(_local1);
measuredMinWidth = (measuredWidth = ((_local2.width + getStyle("paddingLeft")) + getStyle("paddingRight")));
measuredMinHeight = (measuredHeight = ((_local2.height + getStyle("paddingTop")) + getStyle("paddingBottom")));
}
public function get listData():BaseListData{
return (_listData);
}
override protected function commitProperties():void{
super.commitProperties();
if (condenseWhiteChanged){
textField.condenseWhite = _condenseWhite;
condenseWhiteChanged = false;
};
textField.tabIndex = tabIndex;
if (enabledChanged){
textField.enabled = enabled;
enabledChanged = false;
};
if (selectableChanged){
textField.selectable = _selectable;
selectableChanged = false;
};
if (((textChanged) || (htmlTextChanged))){
if (isHTML){
textField.htmlText = explicitHTMLText;
} else {
textField.text = _text;
};
textFieldChanged(false);
textChanged = false;
htmlTextChanged = false;
};
}
private function textFieldChanged(_arg1:Boolean):void{
var _local2:Boolean;
if (!_arg1){
_local2 = !((_text == textField.text));
_text = textField.text;
if (_local2){
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
};
};
_local2 = !((_htmlText == textField.htmlText));
_htmlText = textField.htmlText;
if (_local2){
dispatchEvent(new Event("htmlTextChanged"));
};
_textWidth = textField.textWidth;
_textHeight = textField.textHeight;
}
mx_internal function get styleSheet():StyleSheet{
return (textField.styleSheet);
}
override public function get tabIndex():int{
return (_tabIndex);
}
public function set text(_arg1:String):void{
textSet = true;
if (!_arg1){
_arg1 = "";
};
if (((!(isHTML)) && ((_arg1 == _text)))){
return;
};
_text = _arg1;
textChanged = true;
_htmlText = null;
explicitHTMLText = null;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
}
override public function set enabled(_arg1:Boolean):void{
if (_arg1 == enabled){
return;
};
super.enabled = _arg1;
enabledChanged = true;
invalidateProperties();
}
override public function get baselinePosition():Number{
var _local1:String;
var _local2:TextLineMetrics;
if (!textField){
return (NaN);
};
validateNow();
_local1 = (isHTML) ? explicitHTMLText : text;
if (_local1 == ""){
_local1 = " ";
};
_local2 = (isHTML) ? measureHTMLText(_local1) : measureText(_local1);
return ((textField.y + _local2.ascent));
}
public function set condenseWhite(_arg1:Boolean):void{
if (_arg1 == _condenseWhite){
return;
};
_condenseWhite = _arg1;
condenseWhiteChanged = true;
if (isHTML){
htmlTextChanged = true;
};
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("condenseWhiteChanged"));
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
public function set htmlText(_arg1:String):void{
textSet = true;
if (!_arg1){
_arg1 = "";
};
if (((isHTML) && ((_arg1 == explicitHTMLText)))){
return;
};
_htmlText = _arg1;
htmlTextChanged = true;
_text = null;
explicitHTMLText = _arg1;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("htmlTextChanged"));
}
override protected function createChildren():void{
super.createChildren();
if (!textField){
textField = new UITextField();
textField.enabled = enabled;
textField.ignorePadding = true;
textField.selectable = selectable;
textField.styleName = this;
textField.addEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler);
addChild(textField);
};
}
public function get condenseWhite():Boolean{
return (_condenseWhite);
}
public function set data(_arg1:Object):void{
var _local2:*;
_data = _arg1;
if (_listData){
_local2 = _listData.label;
} else {
if (_data != null){
if ((_data is String)){
_local2 = String(_data);
} else {
_local2 = _data.toString();
};
};
};
if (((!((_local2 === undefined))) && (!(textSet)))){
text = _local2;
textSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
public function get htmlText():String{
return (_htmlText);
}
public function get data():Object{
return (_data);
}
private function measureTextFieldBounds(_arg1:String):Rectangle{
var _local2:TextLineMetrics;
_local2 = (isHTML) ? measureHTMLText(_arg1) : measureText(_arg1);
return (new Rectangle(0, 0, (_local2.width + UITextField.TEXT_WIDTH_PADDING), (_local2.height + UITextField.TEXT_HEIGHT_PADDING)));
}
override public function set toolTip(_arg1:String):void{
super.toolTip = _arg1;
toolTipSet = !((_arg1 == null));
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:Rectangle;
var _local9:Boolean;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("paddingLeft");
_local4 = getStyle("paddingTop");
_local5 = getStyle("paddingRight");
_local6 = getStyle("paddingBottom");
textField.setActualSize(((_arg1 - _local3) - _local5), ((_arg2 - _local4) - _local6));
textField.x = _local3;
textField.y = _local4;
_local7 = (isHTML) ? explicitHTMLText : text;
_local8 = measureTextFieldBounds(_local7);
if (truncateToFit){
if (isHTML){
_local9 = (_local8.width > textField.width);
} else {
textField.text = _text;
_local9 = textField.truncateToFit();
};
if (!toolTipSet){
super.toolTip = (_local9) ? text : null;
};
};
}
}
}//package mx.controls
Section 96
//SWFLoader (mx.controls.SWFLoader)
package mx.controls {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
import mx.styles.*;
import mx.resources.*;
import flash.system.*;
import flash.net.*;
import mx.utils.*;
public class SWFLoader extends UIComponent {
private var contentChanged:Boolean;// = false
private var _loaderContext:LoaderContext;
private var _autoLoad:Boolean;// = true
private var isContentLoaded:Boolean;// = false
private var _trustContent:Boolean;// = false
private var _maintainAspectRatio:Boolean;// = true
private var _source:Object;
private var _scaleContent:Boolean;// = true
private var attemptingChildAppDomain:Boolean;// = false
private var flexContent:Boolean;// = false
private var brokenImageBorder:IFlexDisplayObject;
private var brokenImage:Boolean;// = false
private var _bytesLoaded:Number;// = NAN
private var _bytesTotal:Number;// = NAN
private var requestedURL:URLRequest;
private var resizableContent:Boolean;// = false
private var contentRequestID:String;// = null
mx_internal var contentHolder:DisplayObject;
private var scaleContentChanged:Boolean;// = false
private var _showBusyCursor:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceNotLoadable:String;
private static var resourceOutOfRange:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("controls", ApplicationDomain.currentDomain);
public function SWFLoader(){
contentChanged = false;
scaleContentChanged = false;
isContentLoaded = false;
brokenImage = false;
resizableContent = false;
flexContent = false;
contentRequestID = null;
attemptingChildAppDomain = false;
_autoLoad = true;
_bytesLoaded = NaN;
_bytesTotal = NaN;
_maintainAspectRatio = true;
_scaleContent = true;
_showBusyCursor = false;
_trustContent = false;
super();
tabChildren = true;
tabEnabled = false;
addEventListener(FlexEvent.INITIALIZE, initializeHandler);
showInAutomationHierarchy = false;
}
public function get maintainAspectRatio():Boolean{
return (_maintainAspectRatio);
}
public function set maintainAspectRatio(_arg1:Boolean):void{
_maintainAspectRatio = _arg1;
dispatchEvent(new Event("maintainAspectRatioChanged"));
}
public function get source():Object{
return (_source);
}
public function set loaderContext(_arg1:LoaderContext):void{
_loaderContext = _arg1;
dispatchEvent(new Event("loaderContextChanged"));
}
private function contentLoaderInfo_httpStatusEventHandler(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public function set source(_arg1:Object):void{
if (_source != _arg1){
_source = _arg1;
contentChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("sourceChanged"));
};
}
public function get bytesLoaded():Number{
return (_bytesLoaded);
}
public function get content():DisplayObject{
if ((contentHolder is Loader)){
return (Loader(contentHolder).content);
};
return (contentHolder);
}
private function contentLoaderInfo_progressEventHandler(_arg1:ProgressEvent):void{
_bytesTotal = _arg1.bytesTotal;
_bytesLoaded = _arg1.bytesLoaded;
dispatchEvent(_arg1);
}
private function loadContent(_arg1:Object):DisplayObject{
var child:DisplayObject;
var cls:Class;
var url:String;
var loader:Loader;
var lc:LoaderContext;
var rootURL:String;
var lastIndex:int;
var classOrString = _arg1;
if ((classOrString is Class)){
cls = Class(classOrString);
} else {
if ((classOrString is String)){
try {
cls = Class(systemManager.getDefinitionByName(String(classOrString)));
} catch(e:Error) {
};
url = String(classOrString);
} else {
url = classOrString.toString();
};
};
if (cls){
var _local3 = new (cls);
child = _local3;
contentHolder = _local3;
addChild(child);
contentLoaded();
} else {
if ((classOrString is DisplayObject)){
_local3 = DisplayObject(classOrString);
child = _local3;
contentHolder = _local3;
addChild(child);
contentLoaded();
} else {
if (url){
loader = new FlexLoader();
child = loader;
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaderInfo_completeEventHandler);
loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, contentLoaderInfo_httpStatusEventHandler);
loader.contentLoaderInfo.addEventListener(Event.INIT, contentLoaderInfo_initEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, contentLoaderInfo_ioErrorEventHandler);
loader.contentLoaderInfo.addEventListener(Event.OPEN, contentLoaderInfo_openEventHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, contentLoaderInfo_progressEventHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, contentLoaderInfo_securityErrorEventHandler);
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, contentLoaderInfo_unloadEventHandler);
if ((((((Capabilities.isDebugger == true)) && ((url.indexOf(".jpg") == -1)))) && ((Application.application.systemManager.loaderInfo.url.indexOf("debug=true") > -1)))){
url = (url + ((url.indexOf("?"))>-1) ? "&debug=true" : "?debug=true");
};
if (!(((((url.indexOf(":") > -1)) || ((url.indexOf("/") == 0)))) || ((url.indexOf("\\") == 0)))){
if (((!((SystemManagerGlobals.bootstrapLoaderInfoURL == null))) && (!((SystemManagerGlobals.bootstrapLoaderInfoURL == ""))))){
rootURL = SystemManagerGlobals.bootstrapLoaderInfoURL;
} else {
if (root){
rootURL = root.loaderInfo.url;
} else {
if (systemManager){
rootURL = DisplayObject(systemManager).loaderInfo.url;
};
};
};
if (rootURL){
lastIndex = Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/"));
if (lastIndex != -1){
url = (rootURL.substr(0, (lastIndex + 1)) + url);
};
};
};
requestedURL = new URLRequest(url);
lc = loaderContext;
if (!lc){
lc = new LoaderContext();
_loaderContext = lc;
if (trustContent){
lc.securityDomain = SecurityDomain.currentDomain;
} else {
attemptingChildAppDomain = true;
lc.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
};
};
loader.load(requestedURL, lc);
} else {
throw (new Error(StringUtil.substitute(resourceNotLoadable, source)));
};
};
};
invalidateDisplayList();
return (child);
}
public function get percentLoaded():Number{
var _local1:Number;
_local1 = (((isNaN(_bytesTotal)) || ((_bytesTotal == 0)))) ? 0 : (100 * (_bytesLoaded / _bytesTotal));
if (isNaN(_local1)){
_local1 = 0;
};
return (_local1);
}
private function doScaleLoader():void{
var _local1:Number;
var _local2:Number;
if (!isContentLoaded){
return;
};
unScaleContent();
_local1 = unscaledWidth;
_local2 = unscaledHeight;
if ((((contentHolderWidth > _local1)) || ((contentHolderHeight > _local2)))){
contentHolder.scrollRect = new Rectangle(0, 0, _local1, _local2);
} else {
contentHolder.scrollRect = null;
};
contentHolder.x = ((_local1 - contentHolderWidth) * getHorizontalAlignValue());
contentHolder.y = ((_local2 - contentHolderHeight) * getVerticalAlignValue());
}
public function get contentWidth():Number{
return ((contentHolder) ? contentHolder.width : NaN);
}
public function load(_arg1:Object=null):void{
var url = _arg1;
if (url){
_source = url;
};
if (contentHolder){
if (isContentLoaded){
if ((contentHolder is Loader)){
Loader(contentHolder).unload();
};
} else {
if ((contentHolder is Loader)){
try {
Loader(contentHolder).close();
} catch(error:Error) {
};
};
};
removeChild(contentHolder);
contentHolder = null;
};
isContentLoaded = false;
brokenImage = false;
if (((!(_source)) || ((_source == "")))){
return;
};
contentHolder = loadContent(_source);
}
private function unScaleContent():void{
contentHolder.scaleX = 1;
contentHolder.scaleY = 1;
contentHolder.x = 0;
contentHolder.y = 0;
}
private function getHorizontalAlignValue():Number{
var _local1:String;
_local1 = getStyle("horizontalAlign");
if (_local1 == "left"){
return (0);
};
if (_local1 == "right"){
return (1);
};
return (0.5);
}
private function get contentHolderHeight():Number{
var loaderInfo:LoaderInfo;
var content:IFlexDisplayObject;
var testContent:DisplayObject;
if ((contentHolder is Loader)){
loaderInfo = Loader(contentHolder).contentLoaderInfo;
};
if (loaderInfo){
if (loaderInfo.contentType == "application/x-shockwave-flash"){
try {
content = (Loader(contentHolder).content as IFlexDisplayObject);
if (content){
return (content.measuredHeight);
};
} catch(error:Error) {
return (contentHolder.height);
};
} else {
try {
testContent = Loader(contentHolder).content;
} catch(error:Error) {
return (contentHolder.height);
};
};
return (loaderInfo.height);
};
if ((contentHolder is IUIComponent)){
return (IUIComponent(contentHolder).getExplicitOrMeasuredHeight());
};
if ((contentHolder is IFlexDisplayObject)){
return (IFlexDisplayObject(contentHolder).measuredHeight);
};
return (contentHolder.height);
}
private function get contentHolderWidth():Number{
var loaderInfo:LoaderInfo;
var content:IFlexDisplayObject;
var testContent:DisplayObject;
if ((contentHolder is Loader)){
loaderInfo = Loader(contentHolder).contentLoaderInfo;
};
if (loaderInfo){
if (loaderInfo.contentType == "application/x-shockwave-flash"){
try {
content = (Loader(contentHolder).content as IFlexDisplayObject);
if (content){
return (content.measuredWidth);
};
} catch(error:Error) {
return (contentHolder.width);
};
} else {
try {
testContent = Loader(contentHolder).content;
} catch(error:Error) {
return (contentHolder.width);
};
};
return (loaderInfo.width);
};
if ((contentHolder is IUIComponent)){
return (IUIComponent(contentHolder).getExplicitOrMeasuredWidth());
};
if ((contentHolder is IFlexDisplayObject)){
return (IFlexDisplayObject(contentHolder).measuredWidth);
};
return (contentHolder.width);
}
private function contentLoaderInfo_initEventHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
override protected function measure():void{
var _local1:Number;
var _local2:Number;
super.measure();
if (isContentLoaded){
_local1 = contentHolder.scaleX;
_local2 = contentHolder.scaleY;
contentHolder.scaleX = 1;
contentHolder.scaleY = 1;
measuredWidth = contentHolderWidth;
measuredHeight = contentHolderHeight;
contentHolder.scaleX = _local1;
contentHolder.scaleY = _local2;
} else {
if (((!(_source)) && ((_source == "")))){
measuredWidth = 0;
measuredHeight = 0;
};
};
}
public function get showBusyCursor():Boolean{
return (_showBusyCursor);
}
mx_internal function contentLoaderInfo_completeEventHandler(_arg1:Event):void{
if (LoaderInfo(_arg1.target).loader != contentHolder){
return;
};
dispatchEvent(_arg1);
contentLoaded();
}
private function initializeHandler(_arg1:FlexEvent):void{
if (contentChanged){
contentChanged = false;
if (_autoLoad){
load(_source);
};
};
}
public function get bytesTotal():Number{
return (_bytesTotal);
}
override protected function commitProperties():void{
super.commitProperties();
if (contentChanged){
contentChanged = false;
if (_autoLoad){
load(_source);
};
};
}
private function contentLoaded():void{
var loaderInfo:LoaderInfo;
isContentLoaded = true;
if ((contentHolder is Loader)){
loaderInfo = Loader(contentHolder).contentLoaderInfo;
};
resizableContent = false;
if (loaderInfo){
if (loaderInfo.contentType == "application/x-shockwave-flash"){
resizableContent = true;
};
if (resizableContent){
try {
flexContent = (Loader(contentHolder).content is IFlexDisplayObject);
} catch(e:Error) {
flexContent = false;
};
};
};
try {
if (((((tabChildren) && ((contentHolder is Loader)))) && ((Loader(contentHolder).content is DisplayObjectContainer)))){
Loader(contentHolder).tabChildren = true;
DisplayObjectContainer(Loader(contentHolder).content).tabChildren = true;
};
} catch(e:Error) {
};
invalidateSize();
invalidateDisplayList();
}
private function contentLoaderInfo_ioErrorEventHandler(_arg1:IOErrorEvent):void{
source = getStyle("brokenImageSkin");
load();
contentChanged = false;
brokenImage = true;
if (hasEventListener(_arg1.type)){
dispatchEvent(_arg1);
};
}
public function set trustContent(_arg1:Boolean):void{
if (_trustContent != _arg1){
_trustContent = _arg1;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("trustContentChanged"));
};
}
public function get loaderContext():LoaderContext{
return (_loaderContext);
}
public function set autoLoad(_arg1:Boolean):void{
if (_autoLoad != _arg1){
_autoLoad = _arg1;
contentChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("autoLoadChanged"));
};
}
override public function get baselinePosition():Number{
return (NaN);
}
private function contentLoaderInfo_securityErrorEventHandler(_arg1:SecurityErrorEvent):void{
var _local2:LoaderContext;
if (attemptingChildAppDomain){
attemptingChildAppDomain = false;
_local2 = new LoaderContext();
_loaderContext = _local2;
callLater(load);
return;
};
dispatchEvent(_arg1);
}
public function get contentHeight():Number{
return ((contentHolder) ? contentHolder.height : NaN);
}
public function get trustContent():Boolean{
return (_trustContent);
}
public function get autoLoad():Boolean{
return (_autoLoad);
}
public function set showBusyCursor(_arg1:Boolean):void{
if (_showBusyCursor != _arg1){
_showBusyCursor = _arg1;
if (_showBusyCursor){
CursorManager.registerToUseBusyCursor(this);
} else {
CursorManager.unRegisterToUseBusyCursor(this);
};
};
}
private function getVerticalAlignValue():Number{
var _local1:String;
_local1 = getStyle("verticalAlign");
if (_local1 == "top"){
return (0);
};
if (_local1 == "bottom"){
return (1);
};
return (0.5);
}
private function contentLoaderInfo_unloadEventHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function set scaleContent(_arg1:Boolean):void{
if (_scaleContent != _arg1){
_scaleContent = _arg1;
scaleContentChanged = true;
invalidateDisplayList();
};
dispatchEvent(new Event("scaleContentChanged"));
}
private function contentLoaderInfo_openEventHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get scaleContent():Boolean{
return (_scaleContent);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Class;
super.updateDisplayList(_arg1, _arg2);
if (contentChanged){
contentChanged = false;
if (_autoLoad){
load(_source);
};
};
if (isContentLoaded){
if (((_scaleContent) && (!(brokenImage)))){
doScaleContent();
} else {
doScaleLoader();
};
scaleContentChanged = false;
};
if (((brokenImage) && (!(brokenImageBorder)))){
_local3 = getStyle("brokenImageBorderSkin");
if (_local3){
brokenImageBorder = IFlexDisplayObject(new (_local3));
if ((brokenImageBorder is ISimpleStyleClient)){
ISimpleStyleClient(brokenImageBorder).styleName = this;
};
addChild(DisplayObject(brokenImageBorder));
};
} else {
if (((!(brokenImage)) && (brokenImageBorder))){
removeChild(DisplayObject(brokenImageBorder));
brokenImageBorder = null;
};
};
if (brokenImageBorder){
brokenImageBorder.setActualSize(_arg1, _arg2);
};
}
private function doScaleContent():void{
var interiorWidth:Number;
var interiorHeight:Number;
var contentWidth:Number;
var contentHeight:Number;
var x:Number;
var y:Number;
var newXScale:Number;
var newYScale:Number;
var scale:Number;
var w:Number;
var h:Number;
var holder:Loader;
var lInfo:LoaderInfo;
if (!isContentLoaded){
return;
};
if (((!(resizableContent)) || (((maintainAspectRatio) && (!(flexContent)))))){
unScaleContent();
interiorWidth = unscaledWidth;
interiorHeight = unscaledHeight;
contentWidth = contentHolderWidth;
contentHeight = contentHolderHeight;
x = 0;
y = 0;
newXScale = ((contentWidth == 0)) ? 1 : (interiorWidth / contentWidth);
newYScale = ((contentHeight == 0)) ? 1 : (interiorHeight / contentHeight);
if (_maintainAspectRatio){
if (newXScale > newYScale){
x = Math.floor(((interiorWidth - (contentWidth * newYScale)) * getHorizontalAlignValue()));
scale = newYScale;
} else {
y = Math.floor(((interiorHeight - (contentHeight * newXScale)) * getVerticalAlignValue()));
scale = newXScale;
};
contentHolder.scaleX = scale;
contentHolder.scaleY = scale;
} else {
contentHolder.scaleX = newXScale;
contentHolder.scaleY = newYScale;
};
contentHolder.x = x;
contentHolder.y = y;
} else {
contentHolder.x = 0;
contentHolder.y = 0;
w = unscaledWidth;
h = unscaledHeight;
if ((contentHolder is Loader)){
holder = Loader(contentHolder);
try {
if (holder.content.width > 0){
if ((holder.content is IFlexDisplayObject)){
IFlexDisplayObject(holder.content).setActualSize(w, h);
} else {
lInfo = holder.contentLoaderInfo;
if (lInfo){
contentHolder.scaleX = (w / lInfo.width);
contentHolder.scaleY = (h / lInfo.height);
} else {
contentHolder.width = w;
contentHolder.height = h;
};
};
} else {
if (!(holder.content is IFlexDisplayObject)){
contentHolder.width = w;
contentHolder.height = h;
};
};
} catch(error:Error) {
contentHolder.width = w;
contentHolder.height = h;
};
} else {
contentHolder.width = w;
contentHolder.height = h;
};
};
}
private static function loadResources():void{
resourceOutOfRange = packageResources.getString("outOfRange");
resourceNotLoadable = packageResources.getString("notLoadable");
}
loadResources();
}
}//package mx.controls
Section 97
//Text (mx.controls.Text)
package mx.controls {
import mx.core.*;
import mx.events.*;
public class Text extends Label {
private var lastUnscaledWidth:Number;// = NAN
mx_internal static const VERSION:String = "2.0.1.0";
public function Text(){
lastUnscaledWidth = NaN;
super();
selectable = true;
truncateToFit = false;
addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
}
override protected function measure():void{
if (isSpecialCase()){
if (!isNaN(lastUnscaledWidth)){
measureUsingWidth(lastUnscaledWidth);
} else {
measuredWidth = 0;
measuredHeight = 0;
};
return;
};
measureUsingWidth(explicitWidth);
}
private function measureUsingWidth(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = getStyle("paddingLeft");
_local3 = getStyle("paddingTop");
_local4 = getStyle("paddingRight");
_local5 = getStyle("paddingBottom");
textField.validateNow();
textField.autoSize = "left";
if (!isNaN(_arg1)){
textField.width = ((_arg1 - _local2) - _local4);
measuredWidth = (Math.ceil(textField.textWidth) + UITextField.TEXT_WIDTH_PADDING);
measuredHeight = (Math.ceil(textField.textHeight) + UITextField.TEXT_HEIGHT_PADDING);
} else {
textField.wordWrap = false;
measuredWidth = (Math.ceil(textField.textWidth) + UITextField.TEXT_WIDTH_PADDING);
measuredHeight = (Math.ceil(textField.textHeight) + UITextField.TEXT_HEIGHT_PADDING);
textField.wordWrap = true;
};
textField.autoSize = "none";
measuredWidth = (measuredWidth + (_local2 + _local4));
measuredHeight = (measuredHeight + (_local3 + _local5));
if (isNaN(explicitWidth)){
measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH;
measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT;
} else {
measuredMinWidth = measuredWidth;
measuredMinHeight = measuredHeight;
};
}
private function updateCompleteHandler(_arg1:FlexEvent):void{
lastUnscaledWidth = NaN;
}
override protected function childrenCreated():void{
super.childrenCreated();
textField.multiline = true;
textField.wordWrap = true;
textField.mouseWheelEnabled = false;
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Boolean;
if (isSpecialCase()){
_local7 = ((isNaN(lastUnscaledWidth)) || (!((lastUnscaledWidth == _arg1))));
lastUnscaledWidth = _arg1;
if (_local7){
invalidateSize();
return;
};
};
_local3 = getStyle("paddingLeft");
_local4 = getStyle("paddingTop");
_local5 = getStyle("paddingRight");
_local6 = getStyle("paddingBottom");
textField.setActualSize(((_arg1 - _local3) - _local5), ((_arg2 - _local4) - _local6));
textField.x = _local3;
textField.y = _local4;
}
private function isSpecialCase():Boolean{
var _local1:Number;
var _local2:Number;
_local1 = getStyle("left");
_local2 = getStyle("right");
return (((((((!(isNaN(percentWidth))) || (((!(isNaN(_local1))) && (!(isNaN(_local2))))))) && (isNaN(explicitHeight)))) && (isNaN(percentHeight))));
}
}
}//package mx.controls
Section 98
//ToolTip (mx.controls.ToolTip)
package mx.controls {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import mx.skins.*;
public class ToolTip extends UIComponent implements IToolTip {
mx_internal var border:IFlexDisplayObject;
private var textChanged:Boolean;
private var _text:String;
protected var textField:UITextField;
mx_internal static const VERSION:String = "2.0.1.0";
public static var maxWidth:Number = 300;
public function ToolTip(){
mouseEnabled = false;
}
mx_internal function getTextField():UITextField{
return (textField);
}
public function get text():String{
return (_text);
}
override protected function measure():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
super.measure();
_local1 = borderMetrics;
_local2 = (_local1.left + getStyle("paddingLeft"));
_local3 = (_local1.top + getStyle("paddingTop"));
_local4 = (_local1.right + getStyle("paddingRight"));
_local5 = (_local1.bottom + getStyle("paddingBottom"));
_local6 = (_local2 + _local4);
_local7 = (_local3 + _local5);
textField.wordWrap = false;
if ((textField.textWidth + _local6) > ToolTip.maxWidth){
textField.width = (ToolTip.maxWidth - _local6);
textField.wordWrap = true;
};
measuredWidth = (textField.width + _local6);
measuredHeight = (textField.height + _local7);
}
override protected function commitProperties():void{
var _local1:TextFormat;
super.commitProperties();
if (textChanged){
_local1 = textField.getTextFormat();
_local1.leftMargin = 0;
_local1.rightMargin = 0;
textField.defaultTextFormat = _local1;
textField.text = _text;
textChanged = false;
};
}
public function set text(_arg1:String):void{
_text = _arg1;
textChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!border){
_local1 = getStyle("borderSkin");
border = new (_local1);
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
addChild(DisplayObject(border));
};
if (!textField){
textField = new UITextField();
textField.autoSize = TextFieldAutoSize.LEFT;
textField.mouseEnabled = false;
textField.multiline = true;
textField.selectable = false;
textField.wordWrap = false;
textField.styleName = this;
addChild(textField);
};
}
private function get borderMetrics():EdgeMetrics{
if ((border is RectangularBorder)){
return (RectangularBorder(border).borderMetrics);
};
return (EdgeMetrics.EMPTY);
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
invalidateDisplayList();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
super.updateDisplayList(_arg1, _arg2);
_local3 = borderMetrics;
_local4 = (_local3.left + getStyle("paddingLeft"));
_local5 = (_local3.top + getStyle("paddingTop"));
_local6 = (_local3.right + getStyle("paddingRight"));
_local7 = (_local3.bottom + getStyle("paddingBottom"));
_local8 = (_local4 + _local6);
_local9 = (_local5 + _local7);
border.setActualSize(_arg1, _arg2);
textField.move(_local4, _local5);
textField.setActualSize((_arg1 - _local8), (_arg2 - _local9));
}
}
}//package mx.controls
Section 99
//VScrollBar (mx.controls.VScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class VScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "2.0.1.0";
public function VScrollBar(){
super.direction = ScrollBarDirection.VERTICAL;
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.UP){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.DOWN){
lineScroll(1);
return (true);
};
if (_arg1 == Keyboard.PAGE_UP){
pageScroll(-1);
return (true);
};
if (_arg1 == Keyboard.PAGE_DOWN){
pageScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override protected function measure():void{
super.measure();
measuredWidth = _minWidth;
measuredHeight = _minHeight;
}
override public function get minHeight():Number{
return (_minHeight);
}
override public function get minWidth():Number{
return (_minWidth);
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 100
//Application (mx.core.Application)
package mx.core {
import flash.events.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import mx.styles.*;
import mx.effects.*;
import mx.resources.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import mx.containers.utilityClasses.*;
import flash.ui.*;
import flash.external.*;
public class Application extends LayoutContainer {
public var frameRate:Number;
private var _viewSourceURL:String;
public var scriptTimeLimit:Number;
public var resetHistory:Boolean;// = true
mx_internal var _url:String;
public var preloader:Object;
public var pageTitle:String;
private var processingCreationQueue:Boolean;// = false
private var creationQueue:Array;
private var resizeWidth:Boolean;// = true
public var controlBar:IUIComponent;
private var _applicationViewMetrics:EdgeMetrics;
private var preloadObj:Object;
public var usePreloader:Boolean;
private var resizeHandlerAdded:Boolean;// = false
private var resizeHeight:Boolean;// = true
public var scriptRecursionLimit:int;
mx_internal var _parameters:Object;
mx_internal static const VERSION:String = "2.0.1.0";
private static var viewSourceMenuItem:String;
mx_internal static var useProgressiveLayout:Boolean = false;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function Application(){
resizeHandlerAdded = false;
creationQueue = [];
processingCreationQueue = false;
resizeWidth = true;
resizeHeight = true;
resetHistory = true;
name = "application";
UIComponentGlobals.layoutManager = (Singleton.getInstance("mx.managers::ILayoutManager") as ILayoutManager);
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
if (!ApplicationGlobals.application){
ApplicationGlobals.application = this;
};
super();
layoutObject = new ApplicationLayout();
layoutObject.target = this;
boxLayoutClass = ApplicationLayout;
showInAutomationHierarchy = true;
}
mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{
var controlBar = _arg1;
var dock = _arg2;
if (dock){
try {
removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex);
setControlBar(controlBar);
} else {
try {
rawChildren.removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
setControlBar(null);
addChildAt(DisplayObject(controlBar), 0);
};
}
override mx_internal function initThemeColor():Boolean{
var _local1:Boolean;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:CSSStyleDeclaration;
_local1 = super.initThemeColor();
if (!_local1){
_local5 = StyleManager.getStyleDeclaration("global");
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
};
_local1 = true;
};
return (_local1);
}
private function resizeHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (resizeWidth){
if (isNaN(percentWidth)){
_local2 = DisplayObject(systemManager).width;
} else {
super.percentWidth = Math.max(percentWidth, 0);
super.percentWidth = Math.min(percentWidth, 100);
_local2 = ((percentWidth * screen.width) / 100);
};
if (!isNaN(explicitMaxWidth)){
_local2 = Math.min(_local2, explicitMaxWidth);
};
if (!isNaN(explicitMinWidth)){
_local2 = Math.max(_local2, explicitMinWidth);
};
} else {
_local2 = width;
};
if (resizeHeight){
if (isNaN(percentHeight)){
_local3 = DisplayObject(systemManager).height;
} else {
super.percentHeight = Math.max(percentHeight, 0);
super.percentHeight = Math.min(percentHeight, 100);
_local3 = ((percentHeight * screen.height) / 100);
};
if (!isNaN(explicitMaxHeight)){
_local3 = Math.min(_local3, explicitMaxHeight);
};
if (!isNaN(explicitMinHeight)){
_local3 = Math.max(_local3, explicitMinHeight);
};
} else {
_local3 = height;
};
if (((!((_local2 == width))) || (!((_local3 == height))))){
invalidateProperties();
invalidateSize();
};
setActualSize(_local2, _local3);
invalidateDisplayList();
}
override public function set tabIndex(_arg1:int):void{
}
public function set viewSourceURL(_arg1:String):void{
_viewSourceURL = _arg1;
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
private function initContextMenu():void{
var _local1:ContextMenu;
var _local2:ContextMenuItem;
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
_local1.builtInItems.print = true;
if (_viewSourceURL){
_local2 = new ContextMenuItem(viewSourceMenuItem, true);
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
_local1.customItems.push(_local2);
};
contextMenu = _local1;
}
override public function set icon(_arg1:Class):void{
}
override public function set percentWidth(_arg1:Number):void{
super.percentWidth = _arg1;
invalidateDisplayList();
}
override public function getChildIndex(_arg1:DisplayObject):int{
if (((controlBar) && ((_arg1 == controlBar)))){
return (-1);
};
return (super.getChildIndex(_arg1));
}
override public function get id():String{
if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){
return (ExternalInterface.objectID);
};
return (super.id);
}
override protected function measure():void{
var _local1:EdgeMetrics;
var _local2:Number;
super.measure();
_local1 = borderMetrics;
if (((controlBar) && (controlBar.includeInLayout))){
_local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right);
measuredWidth = Math.max(measuredWidth, _local2);
measuredMinWidth = Math.max(measuredMinWidth, _local2);
};
}
public function get url():String{
return (_url);
}
private function debugTickler():void{
var _local1:int;
_local1 = 0;
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg2 == this){
setActualSize(_arg1.width, _arg1.height);
if (horizontalScrollBar){
horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible;
};
if (verticalScrollBar){
verticalScrollBar.visible = _arg1.verticalScrollBarVisible;
};
if (whiteBox){
whiteBox.visible = _arg1.whiteBoxVisible;
};
horizontalScrollPosition = _arg1.horizontalScrollPosition;
verticalScrollPosition = _arg1.verticalScrollPosition;
updateDisplayList(unscaledWidth, unscaledHeight);
};
super.finishPrint(_arg1.scrollRect, _arg2);
}
override public function set label(_arg1:String):void{
}
public function get parameters():Object{
return (_parameters);
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Object;
_local2 = {};
if (_arg1 == this){
_local2.width = width;
_local2.height = height;
_local2.verticalScrollPosition = verticalScrollPosition;
_local2.horizontalScrollPosition = horizontalScrollPosition;
_local2.horizontalScrollBarVisible = !((horizontalScrollBar == null));
_local2.verticalScrollBarVisible = !((verticalScrollBar == null));
_local2.whiteBoxVisible = !((whiteBox == null));
setActualSize(measuredWidth, measuredHeight);
horizontalScrollPosition = 0;
verticalScrollPosition = 0;
if (horizontalScrollBar){
horizontalScrollBar.visible = false;
};
if (verticalScrollBar){
verticalScrollBar.visible = false;
};
if (whiteBox){
whiteBox.visible = false;
};
updateDisplayList(unscaledWidth, unscaledHeight);
};
_local2.scrollRect = super.prepareToPrint(_arg1);
return (_local2);
}
public function get viewSourceURL():String{
return (_viewSourceURL);
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:EdgeMetrics;
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
_local3 = borderMetrics;
_local4 = getStyle("borderThickness");
_local5 = new EdgeMetrics();
_local5.left = (_local3.left - _local4);
_local5.top = (_local3.top - _local4);
_local5.right = (_local3.right - _local4);
_local5.bottom = (_local3.bottom - _local4);
if (((controlBar) && (controlBar.includeInLayout))){
if ((controlBar is IInvalidating)){
IInvalidating(controlBar).invalidateDisplayList();
};
controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight());
controlBar.move(_local5.left, _local5.top);
};
}
override public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:EdgeMetrics;
var _local3:Number;
if (!_applicationViewMetrics){
_applicationViewMetrics = new EdgeMetrics();
};
_local1 = _applicationViewMetrics;
_local2 = super.viewMetrics;
_local3 = getStyle("borderThickness");
_local1.left = _local2.left;
_local1.top = _local2.top;
_local1.right = _local2.right;
_local1.bottom = _local2.bottom;
if (((controlBar) && (controlBar.includeInLayout))){
_local1.top = (_local1.top - _local3);
_local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3));
};
return (_local1);
}
private function addedHandler(_arg1:Event):void{
if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){
doNextQueueItem();
};
}
private function menuItemSelectHandler(_arg1:Event):void{
navigateToURL(new URLRequest(_viewSourceURL), "_blank");
}
private function doNextQueueItem(_arg1:FlexEvent=null):void{
processingCreationQueue = true;
Application.useProgressiveLayout = true;
callLater(processNextQueueItem);
}
private function setControlBar(_arg1:IUIComponent):void{
if (_arg1 == controlBar){
return;
};
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).clearStyle("cornerRadius");
IStyleClient(controlBar).clearStyle("docked");
};
controlBar = _arg1;
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).setStyle("cornerRadius", 0);
IStyleClient(controlBar).setStyle("docked", true);
};
invalidateSize();
invalidateDisplayList();
invalidateViewMetricsAndPadding();
}
override public function initialize():void{
var _local1:ISystemManager;
var _local2:Object;
_local1 = systemManager;
_url = _local1.loaderInfo.url;
_parameters = _local1.loaderInfo.parameters;
initManagers(_local1);
_descriptor = null;
if (documentDescriptor){
(creationPolicy == documentDescriptor.properties.creationPolicy);
if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){
creationPolicy = ContainerCreationPolicy.AUTO;
};
_local2 = documentDescriptor.properties;
if (_local2.width != null){
width = _local2.width;
delete _local2.width;
};
if (_local2.height != null){
height = _local2.height;
delete _local2.height;
};
documentDescriptor.events = null;
};
initContextMenu();
super.initialize();
addEventListener(Event.ADDED, addedHandler);
if (((_local1.isTopLevel()) && ((Capabilities.isDebugger == true)))){
setInterval(debugTickler, 1500);
};
}
private function initManagers(_arg1:ISystemManager):void{
if (_arg1.isTopLevel()){
focusManager = new FocusManager(this);
_arg1.activate(this);
};
}
override public function set percentHeight(_arg1:Number):void{
super.percentHeight = _arg1;
invalidateDisplayList();
}
private function printCreationQueue():void{
var _local1:String;
var _local2:Number;
var _local3:int;
var _local4:Object;
_local1 = "";
_local2 = creationQueue.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = creationQueue[_local3];
_local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index));
_local3++;
};
}
override public function set toolTip(_arg1:String):void{
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){
clearStyle("backgroundImage");
};
}
private function processNextQueueItem():void{
var queueItem:Object;
var nextChild:IUIComponent;
if (EffectManager.effectsPlaying.length > 0){
callLater(processNextQueueItem);
} else {
if (creationQueue.length > 0){
queueItem = creationQueue.shift();
try {
nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id;
if ((nextChild is Container)){
Container(nextChild).createComponentsFromDescriptors(true);
};
if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){
doNextQueueItem();
} else {
nextChild.addEventListener("childrenCreationComplete", doNextQueueItem);
};
} catch(e:Error) {
processNextQueueItem();
};
} else {
processingCreationQueue = false;
Application.useProgressiveLayout = false;
};
};
}
public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{
var _local5:int;
var _local6:Object;
var _local7:Boolean;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
_local5 = creationQueue.length;
_local6 = {};
_local7 = false;
_local6.id = _arg1;
_local6.parent = _arg4;
_local6.callbackFunc = _arg3;
_local6.index = _arg2;
_local11 = 0;
while (_local11 < _local5) {
_local9 = creationQueue[_local11].index;
_local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0;
if (_local6.index != -1){
if ((((_local9 == -1)) || ((_local6.index < _local9)))){
_local8 = _local11;
_local7 = true;
break;
};
} else {
_local12 = (_local6.parent) ? _local6.parent.nestLevel : 0;
if ((((_local9 == -1)) && ((_local10 < _local12)))){
_local8 = _local11;
_local7 = true;
break;
};
};
_local11++;
};
if (!_local7){
creationQueue.push(_local6);
_local7 = true;
} else {
creationQueue.splice(_local8, 0, _local6);
};
if (((initialized) && (!(processingCreationQueue)))){
doNextQueueItem();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
resizeWidth = isNaN(explicitWidth);
resizeHeight = isNaN(explicitHeight);
if (((resizeWidth) || (resizeHeight))){
resizeHandler(new Event(Event.RESIZE));
if (!resizeHandlerAdded){
systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true);
resizeHandlerAdded = true;
};
} else {
if (resizeHandlerAdded){
systemManager.removeEventListener(Event.RESIZE, resizeHandler);
resizeHandlerAdded = false;
};
};
createBorder();
}
private static function loadResources():void{
viewSourceMenuItem = packageResources.getString("viewSource");
}
public static function get application():Object{
return (ApplicationGlobals.application);
}
loadResources();
}
}//package mx.core
Section 101
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 102
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "2.0.1.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 103
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var document:Object;
public var type:Class;
public var propertiesFactory:Function;
private var _properties:Object;
public var id:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 104
//Container (mx.core.Container)
package mx.core {
import flash.events.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.graphics.*;
import mx.controls.scrollClasses.*;
import mx.controls.*;
import mx.resources.*;
import mx.binding.*;
import mx.controls.listClasses.*;
import flash.system.*;
import mx.skins.*;
import flash.ui.*;
public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer {
private var _horizontalLineScrollSize:Number;// = 5
mx_internal var border:IFlexDisplayObject;
private var _viewMetricsAndPadding:EdgeMetrics;
private var scrollableWidth:Number;// = 0
private var _rawChildren:ContainerRawChildrenList;
private var _data:Object;
private var _viewMetrics:EdgeMetrics;
private var changedStyles:String;// = null
private var _verticalPageScrollSize:Number;// = 0
private var mouseEventReferenceCount:int;// = 0
protected var whiteBox:Shape;
private var _verticalScrollBar:ScrollBar;
private var _horizontalPageScrollSize:Number;// = 0
private var _clipContent:Boolean;// = true
private var _icon:Class;// = null
mx_internal var doingLayout:Boolean;// = false
private var _createdComponents:Array;
private var _firstChildIndex:int;// = 0
private var scrollableHeight:Number;// = 0
mx_internal var _numChildren:int;// = 0
private var recursionFlag:Boolean;// = true
private var forceLayout:Boolean;// = false
mx_internal var blocker:Sprite;
private var _label:String;// = ""
private var _numChildrenCreated:int;// = -1
protected var actualCreationPolicy:String;
private var _childRepeaters:Array;
private var _childDescriptors:Array;
private var scrollPropertiesChanged:Boolean;// = false
private var scrollPositionChanged:Boolean;// = true
private var _focusPane:Sprite;
private var _defaultButton:IFlexDisplayObject;
private var _forceClippingCount:int;
mx_internal var creatingContentPane:Boolean;// = false
private var _creationPolicy:String;
private var _creationIndex:int;// = -1
private var _verticalScrollPosition:Number;// = 0
private var _autoLayout:Boolean;// = true
private var _horizontalScrollBar:ScrollBar;
private var viewableHeight:Number;// = 0
private var viewableWidth:Number;// = 0
mx_internal var contentPane:Sprite;// = null
private var numChildrenBefore:int;
private var _verticalLineScrollSize:Number;// = 5
private var _horizontalScrollPosition:Number;// = 0
mx_internal var _horizontalScrollPolicy:String;// = "auto"
private var verticalScrollPositionPending:Number;
mx_internal var _verticalScrollPolicy:String;// = "auto"
private var horizontalScrollPositionPending:Number;
private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>";
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceMultipleChildSets_ClassAndInstance:String;
private static var resourceMultipleChildSets_ClassAndSubclass:String;
private static var resourceScrollDirection:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function Container(){
recursionFlag = true;
forceLayout = false;
doingLayout = false;
changedStyles = null;
creatingContentPane = false;
contentPane = null;
scrollPropertiesChanged = false;
scrollPositionChanged = true;
scrollableWidth = 0;
scrollableHeight = 0;
viewableWidth = 0;
viewableHeight = 0;
mouseEventReferenceCount = 0;
_numChildren = 0;
_autoLayout = true;
_clipContent = true;
_creationIndex = -1;
_firstChildIndex = 0;
_horizontalLineScrollSize = 5;
_horizontalPageScrollSize = 0;
_horizontalScrollPosition = 0;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_icon = null;
_label = "";
_numChildrenCreated = -1;
_verticalLineScrollSize = 5;
_verticalPageScrollSize = 0;
_verticalScrollPosition = 0;
_verticalScrollPolicy = ScrollPolicy.AUTO;
super();
tabChildren = true;
tabEnabled = false;
showInAutomationHierarchy = false;
}
mx_internal function get firstChildIndex():int{
return (_firstChildIndex);
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
protected function scrollChildren():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Rectangle;
if (!contentPane){
return;
};
_local1 = viewMetrics;
_local2 = 0;
_local3 = 0;
_local4 = ((unscaledWidth - _local1.left) - _local1.right);
_local5 = ((unscaledHeight - _local1.top) - _local1.bottom);
if (_clipContent){
_local2 = (_local2 + _horizontalScrollPosition);
if (horizontalScrollBar){
_local4 = viewableWidth;
};
_local3 = (_local3 + _verticalScrollPosition);
if (verticalScrollBar){
_local5 = viewableHeight;
};
} else {
_local4 = scrollableWidth;
_local5 = scrollableHeight;
};
_local6 = getScrollableRect();
if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){
contentPane.scrollRect = null;
contentPane.opaqueBackground = null;
contentPane.cacheAsBitmap = false;
} else {
contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5);
};
if (focusPane){
focusPane.scrollRect = contentPane.scrollRect;
};
if (((((border) && ((border is RectangularBorder)))) && (RectangularBorder(border).hasBackgroundImage))){
RectangularBorder(border).adjustBackgroundImage();
};
}
mx_internal function get createdComponents():Array{
return (_createdComponents);
}
public function get childDescriptors():Array{
return (_childDescriptors);
}
public function get verticalScrollPosition():Number{
if (!isNaN(verticalScrollPositionPending)){
return (verticalScrollPositionPending);
};
return (_verticalScrollPosition);
}
mx_internal function set createdComponents(_arg1:Array):void{
_createdComponents = _arg1;
}
mx_internal function get childRepeaters():Array{
return (_childRepeaters);
}
public function get horizontalScrollPosition():Number{
if (!isNaN(horizontalScrollPositionPending)){
return (horizontalScrollPositionPending);
};
return (_horizontalScrollPosition);
}
override public function get focusPane():Sprite{
return (_focusPane);
}
private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{
var _local4:Boolean;
var _local5:IFocusManager;
var _local6:String;
var _local7:String;
var _local8:Graphics;
_local4 = false;
if (((((_arg1) || (_arg2))) || (_arg3))){
createContentPane();
};
if (_arg1){
if (!horizontalScrollBar){
horizontalScrollBar = new HScrollBar();
horizontalScrollBar.name = "horizontalScrollBar";
_local6 = getStyle("horizontalScrollBarStyleName");
if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(horizontalScrollBar).styleName = _local6;
};
rawChildren.addChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
horizontalScrollBar.enabled = enabled;
if ((horizontalScrollBar is IInvalidating)){
IInvalidating(horizontalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!verticalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
} else {
if (horizontalScrollBar){
horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar = null;
viewableWidth = (scrollableWidth = 0);
if (_horizontalScrollPosition != 0){
_horizontalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
};
if (_arg2){
if (!verticalScrollBar){
verticalScrollBar = new VScrollBar();
verticalScrollBar.name = "verticalScrollBar";
_local7 = getStyle("verticalScrollBarStyleName");
if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(verticalScrollBar).styleName = _local7;
};
rawChildren.addChild(DisplayObject(verticalScrollBar));
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
verticalScrollBar.enabled = enabled;
if ((verticalScrollBar is IInvalidating)){
IInvalidating(verticalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!horizontalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
} else {
if (verticalScrollBar){
verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(verticalScrollBar));
verticalScrollBar = null;
viewableHeight = (scrollableHeight = 0);
if (_verticalScrollPosition != 0){
_verticalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
};
if (((horizontalScrollBar) && (verticalScrollBar))){
if (!whiteBox){
whiteBox = new FlexShape();
whiteBox.name = "whiteBox";
_local8 = whiteBox.graphics;
_local8.beginFill(0xFFFFFF);
_local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight);
_local8.endFill();
rawChildren.addChild(whiteBox);
};
} else {
if (whiteBox){
rawChildren.removeChild(whiteBox);
whiteBox = null;
};
};
return (_local4);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:Object;
var _local3:String;
var _local4:Number;
_local2 = getFocus();
if ((_local2 is TextField)){
return;
};
if (verticalScrollBar){
_local3 = ScrollEventDirection.VERTICAL;
_local4 = verticalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.UP:
verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_UP:
verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.HOME:
verticalScrollPosition = verticalScrollBar.minScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP);
_arg1.stopPropagation();
break;
case Keyboard.END:
verticalScrollPosition = verticalScrollBar.maxScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM);
_arg1.stopPropagation();
break;
};
};
if (horizontalScrollBar){
_local3 = ScrollEventDirection.HORIZONTAL;
_local4 = horizontalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.LEFT:
horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT);
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT);
_arg1.stopPropagation();
break;
};
};
}
protected function createBorder():void{
var _local1:Class;
if (((!(border)) && (isBorderNeeded()))){
_local1 = getStyle("borderSkin");
border = new (_local1);
border.name = "border";
if ((border is IUIComponent)){
IUIComponent(border).enabled = enabled;
};
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
rawChildren.addChildAt(DisplayObject(border), 0);
invalidateDisplayList();
};
}
public function set verticalScrollPosition(_arg1:Number):void{
if (_verticalScrollPosition == _arg1){
return;
};
_verticalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
verticalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
private function horizontalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = horizontalScrollPosition;
horizontalScrollPosition = horizontalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail);
};
}
public function get icon():Class{
return (_icon);
}
public function set horizontalScrollBar(_arg1:ScrollBar):void{
_horizontalScrollBar = _arg1;
}
mx_internal function set childRepeaters(_arg1:Array):void{
_childRepeaters = _arg1;
}
public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{
var _local3:UIComponentDescriptor;
var _local4:Object;
var _local5:Class;
var _local6:IDeferredInstantiationUIComponent;
var _local7:String;
var _local8:Object;
var _local9:Array;
var _local10:IRepeaterClient;
var _local11:IStyleClient;
var _local12:String;
var _local13:String;
_local3 = UIComponentDescriptor(_arg1);
_local4 = _local3.properties;
if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){
return (null);
};
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
_local5 = _local3.type;
_local6 = new (_local5);
_local6.id = _local3.id;
if (((_local6.id) && (!((_local6.id == ""))))){
_local6.name = _local6.id;
};
_local6.descriptor = _local3;
if (((_local4.childDescriptors) && ((_local6 is Container)))){
Container(_local6)._childDescriptors = _local4.childDescriptors;
delete _local4.childDescriptors;
};
for (_local7 in _local4) {
_local6[_local7] = _local4[_local7];
};
if ((_local6 is Container)){
Container(_local6).recursionFlag = _arg2;
};
if (_local3.instanceIndices){
if ((_local6 is IRepeaterClient)){
_local10 = IRepeaterClient(_local6);
_local10.instanceIndices = _local3.instanceIndices;
_local10.repeaters = _local3.repeaters;
_local10.repeaterIndices = _local3.repeaterIndices;
};
};
if ((_local6 is IStyleClient)){
_local11 = IStyleClient(_local6);
if (_local3.stylesFactory != null){
if (!_local11.styleDeclaration){
_local11.styleDeclaration = new CSSStyleDeclaration();
};
_local11.styleDeclaration.factory = _local3.stylesFactory;
};
};
_local8 = _local3.events;
if (_local8){
for (_local12 in _local8) {
_local13 = _local8[_local12];
_local6.addEventListener(_local12, _local3.document[_local13]);
};
};
_local9 = _local3.effects;
if (_local9){
_local6.registerEffects(_local9);
};
if ((_local6 is IRepeaterClient)){
IRepeaterClient(_local6).initializeRepeaterArrays(this);
};
_local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document));
if (!_local6.document){
_local6.document = _local3.document;
};
if ((_local6 is IRepeater)){
if (!childRepeaters){
childRepeaters = [];
};
childRepeaters.push(_local6);
_local6.executeBindings();
IRepeater(_local6).initializeRepeater(this, _arg2);
} else {
addChild(DisplayObject(_local6));
_local6.executeBindings();
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
_local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
return (_local6);
}
mx_internal function get usePadding():Boolean{
return (true);
}
public function set horizontalScrollPosition(_arg1:Number):void{
if (_horizontalScrollPosition == _arg1){
return;
};
_horizontalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
horizontalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
override public function set focusPane(_arg1:Sprite):void{
var _local2:Boolean;
var _local3:Boolean;
_local2 = invalidateSizeFlag;
_local3 = invalidateDisplayListFlag;
invalidateSizeFlag = true;
invalidateDisplayListFlag = true;
if (_arg1){
rawChildren.addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
rawChildren.removeChild(_focusPane);
_focusPane = null;
};
if (((_arg1) && (contentPane))){
_arg1.x = contentPane.x;
_arg1.y = contentPane.y;
_arg1.scrollRect = contentPane.scrollRect;
};
invalidateSizeFlag = _local2;
invalidateDisplayListFlag = _local3;
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalLineScrollSize);
}
private function updateBackgroundImageRect():void{
var _local1:RectangularBorder;
var _local2:EdgeMetrics;
var _local3:Number;
var _local4:Number;
_local1 = (border as RectangularBorder);
if (!_local1){
return;
};
if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){
_local1.backgroundImageRect = null;
return;
};
_local2 = viewMetrics;
_local3 = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right);
_local4 = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom);
if (getStyle("backgroundAttachment") == "fixed"){
_local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, _local3, _local4);
} else {
_local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4));
};
}
mx_internal function invalidateViewMetricsAndPadding():void{
_viewMetricsAndPadding = null;
}
public function get verticalLineScrollSize():Number{
return (_verticalLineScrollSize);
}
private function mouseWheelHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (verticalScrollBar){
_arg1.stopPropagation();
_local2 = ((_arg1.delta <= 0)) ? 1 : -1;
_local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1;
_local4 = Math.max(Math.abs(_arg1.delta), _local3);
_local5 = verticalScrollPosition;
verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2));
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN);
};
}
mx_internal function createContentPane():void{
var _local1:int;
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:IUIComponent;
if (contentPane){
return;
};
creatingContentPane = true;
_local1 = numChildren;
_local2 = new FlexSprite();
_local2.name = "contentPane";
_local2.tabChildren = true;
if (border){
_local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1);
if ((((border is RectangularBorder)) && (RectangularBorder(border).hasBackgroundImage))){
_local3++;
};
} else {
_local3 = 0;
};
rawChildren.addChildAt(_local2, _local3);
_local4 = 0;
while (_local4 < _local1) {
_local5 = IUIComponent(super.getChildAt(_firstChildIndex));
_local2.addChild(DisplayObject(_local5));
_local5.parentChanged(_local2);
_numChildren--;
_local4++;
};
contentPane = _local2;
creatingContentPane = false;
contentPane.visible = true;
}
public function get creationPolicy():String{
return (_creationPolicy);
}
public function get defaultButton():IFlexDisplayObject{
return (_defaultButton);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
private function verticalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = verticalScrollPosition;
verticalScrollPosition = verticalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail);
};
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = rawChildren_getChildIndex(_arg1);
return (rawChildren_removeChildAt(_local2));
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
return (addChildAt(_arg1, numChildren));
}
override public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int;
if (contentPane){
return (contentPane.getChildIndex(_arg1));
};
_local2 = (super.getChildIndex(_arg1) - _firstChildIndex);
return (_local2);
}
public function set icon(_arg1:Class):void{
_icon = _arg1;
dispatchEvent(new Event("iconChanged"));
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
override public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object;
_local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
if (_arg1){
executeChildBindings(_arg1);
};
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function set verticalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalLineScrollSizeChanged"));
}
mx_internal function getScrollableRect():Rectangle{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:EdgeMetrics;
var _local8:Rectangle;
var _local9:DisplayObject;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = numChildren;
_local6 = 0;
while (_local6 < _local5) {
_local9 = getChildAt(_local6);
if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){
} else {
_local1 = Math.min(_local1, _local9.x);
_local2 = Math.min(_local2, _local9.y);
if (!isNaN(_local9.width)){
_local3 = Math.max(_local3, (_local9.x + _local9.width));
};
if (!isNaN(_local9.height)){
_local4 = Math.max(_local4, (_local9.y + _local9.height));
};
};
_local6++;
};
_local7 = viewMetrics;
_local8 = new Rectangle();
_local8.left = _local1;
_local8.top = _local2;
_local8.right = _local3;
_local8.bottom = _local4;
if (usePadding){
_local8.right = (_local8.right + getStyle("paddingRight"));
_local8.bottom = (_local8.bottom + getStyle("paddingBottom"));
};
return (_local8);
}
mx_internal function get numRepeaters():int{
return ((childRepeaters) ? childRepeaters.length : 0);
}
public function get creationIndex():int{
return (_creationIndex);
}
override mx_internal function childAdded(_arg1:DisplayObject):void{
var _local2:ChildExistenceChangedEvent;
dispatchEvent(new Event("childrenChanged"));
_local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
super.childAdded(_arg1);
}
public function set horizontalScrollPolicy(_arg1:String):void{
if (_horizontalScrollPolicy != _arg1){
_horizontalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalScrollPolicyChanged"));
};
}
override public function removeChildAt(_arg1:int):DisplayObject{
return (removeChild(getChildAt(_arg1)));
}
override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
var _local4:EdgeMetrics;
var _local5:Number;
var _local6:Graphics;
_local4 = viewMetrics;
_local5 = 0;
if (!_arg3){
_arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5);
};
if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){
return;
};
_local6 = _arg1.graphics;
_local6.clear();
_local6.beginFill(_arg2);
_local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local6.endFill();
}
public function createComponentsFromDescriptors(_arg1:Boolean=true):void{
var _local2:int;
var _local3:int;
var _local4:IFlexDisplayObject;
numChildrenBefore = numChildren;
createdComponents = [];
_local2 = (childDescriptors) ? childDescriptors.length : 0;
_local3 = 0;
while (_local3 < _local2) {
_local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1);
createdComponents.push(_local4);
_local3++;
};
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
UIComponentGlobals.layoutManager.usePhasedInstantiation = false;
};
numChildrenCreated = (numChildren - numChildrenBefore);
processedDescriptors = true;
}
override public function globalToContent(_arg1:Point):Point{
if (contentPane){
return (contentPane.globalToLocal(_arg1));
};
return (globalToLocal(_arg1));
}
override mx_internal function removingChild(_arg1:DisplayObject):void{
var _local2:ChildExistenceChangedEvent;
super.removingChild(_arg1);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
_local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
}
private function isBorderNeeded():Boolean{
var _local1:Object;
_local1 = getStyle("borderStyle");
if (_local1){
if (((!((_local1 == "none"))) || ((((_local1 == "none")) && (getStyle("mouseShield")))))){
return (true);
};
};
_local1 = getStyle("backgroundColor");
if (((!((_local1 === null))) && (!((_local1 === ""))))){
return (true);
};
_local1 = getStyle("backgroundImage");
return (((!((_local1 == null))) && (!((_local1 == "")))));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = super.getChildAt(_arg1);
super.removingChild(_local2);
$removeChildAt(_arg1);
super.childRemoved(_local2);
if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){
_numChildren--;
} else {
if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){
_firstChildIndex--;
};
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("childrenChanged"));
return (_local2);
}
public function get verticalPageScrollSize():Number{
return (_verticalPageScrollSize);
}
override public function validateDisplayList():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
} else {
layoutChrome(unscaledWidth, unscaledHeight);
};
invalidateDisplayListFlag = true;
if (createContentPaneAndScrollbarsIfNeeded()){
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
};
createContentPaneAndScrollbarsIfNeeded();
};
if (contentPane){
_local1 = viewMetrics;
if (overlay){
overlay.x = 0;
overlay.y = 0;
overlay.width = unscaledWidth;
overlay.height = unscaledHeight;
};
if (((horizontalScrollBar) || (verticalScrollBar))){
if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){
_local1.right = (_local1.right - verticalScrollBar.minWidth);
};
if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){
_local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight);
};
if (horizontalScrollBar){
_local2 = ((unscaledWidth - _local1.left) - _local1.right);
if (verticalScrollBar){
_local2 = (_local2 - verticalScrollBar.minWidth);
};
horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight);
horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight));
};
if (verticalScrollBar){
_local3 = ((unscaledHeight - _local1.top) - _local1.bottom);
if (horizontalScrollBar){
_local3 = (_local3 - horizontalScrollBar.minHeight);
};
verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3);
verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top);
};
if (whiteBox){
whiteBox.x = verticalScrollBar.x;
whiteBox.y = horizontalScrollBar.y;
};
};
contentPane.x = _local1.left;
contentPane.y = _local1.top;
if (focusPane){
focusPane.x = _local1.left;
focusPane.y = _local1.top;
};
scrollChildren();
};
invalidateDisplayListFlag = false;
if (blocker){
_local1 = viewMetrics;
_local4 = (enabled) ? null : getStyle("backgroundDisabledColor");
if (!_local4){
_local4 = getStyle("backgroundColor");
};
if ((((_local4 === null)) || (isNaN(Number(_local4))))){
_local4 = 0xFFFFFF;
};
_local5 = getStyle("disabledOverlayAlpha");
if (isNaN(_local5)){
_local5 = 0.6;
};
blocker.x = _local1.left;
blocker.y = _local1.top;
_local6 = (unscaledWidth - (_local1.left + _local1.right));
_local7 = (unscaledHeight - (_local1.top + _local1.bottom));
blocker.graphics.clear();
blocker.graphics.beginFill(uint(_local4), _local5);
blocker.graphics.drawRect(0, 0, _local6, _local7);
blocker.graphics.endFill();
rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1));
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalLineScrollSizeChanged"));
}
override public function contentToGlobal(_arg1:Point):Point{
if (contentPane){
return (contentPane.localToGlobal(_arg1));
};
return (localToGlobal(_arg1));
}
mx_internal function set forceClipping(_arg1:Boolean):void{
if (_clipContent){
if (_arg1){
_forceClippingCount++;
} else {
_forceClippingCount--;
};
createContentPane();
scrollChildren();
};
}
public function get horizontalPageScrollSize():Number{
return (_horizontalPageScrollSize);
}
public function set defaultButton(_arg1:IFlexDisplayObject):void{
_defaultButton = _arg1;
ContainerGlobals.focusedContainer = null;
}
private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:IUIComponent;
_local2 = _arg1.id;
if (((!((_local2 == null))) && ((document[_local2] == null)))){
return (false);
};
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IUIComponent(getChildAt(_local4));
if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){
return (true);
};
_local4++;
};
if (childRepeaters){
_local3 = childRepeaters.length;
_local4 = 0;
while (_local4 < _local3) {
if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){
return (true);
};
_local4++;
};
};
return (false);
}
override protected function commitProperties():void{
var _local1:String;
super.commitProperties();
if (changedStyles){
_local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles;
super.notifyStyleChangeInChildren(_local1, true);
changedStyles = null;
};
createOrDestroyBlocker();
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg1){
contentPane.scrollRect = Rectangle(_arg1);
};
super.finishPrint(_arg1, _arg2);
}
public function get autoLayout():Boolean{
return (_autoLayout);
}
public function get maxHorizontalScrollPosition():Number{
return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0));
}
public function set creationPolicy(_arg1:String):void{
_creationPolicy = _arg1;
setActualCreationPolicies(_arg1);
}
public function set verticalScrollPolicy(_arg1:String):void{
if (_verticalScrollPolicy != _arg1){
_verticalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalScrollPolicyChanged"));
};
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Rectangle;
_local2 = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null;
if (_local2){
contentPane.scrollRect = null;
};
super.prepareToPrint(_arg1);
return (_local2);
}
public function set label(_arg1:String):void{
_label = _arg1;
dispatchEvent(new Event("labelChanged"));
}
override protected function initializationComplete():void{
}
override mx_internal function addingChild(_arg1:DisplayObject):void{
var _local2:IUIComponent;
_local2 = IUIComponent(_arg1);
super.addingChild(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
_numChildren++;
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
};
}
mx_internal function setActualCreationPolicies(_arg1:String):void{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:IFlexDisplayObject;
var _local6:Container;
actualCreationPolicy = _arg1;
_local2 = _arg1;
if (_arg1 == ContainerCreationPolicy.QUEUED){
_local2 = ContainerCreationPolicy.AUTO;
};
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(getChildAt(_local4));
if ((_local5 is Container)){
_local6 = Container(_local5);
if (_local6.creationPolicy == null){
_local6.setActualCreationPolicies(_local2);
};
};
_local4++;
};
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (contentPane.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
};
}
override public function contains(_arg1:DisplayObject):Boolean{
if (contentPane){
return (contentPane.contains(_arg1));
};
return (super.contains(_arg1));
}
public function set clipContent(_arg1:Boolean):void{
if (_clipContent != _arg1){
_clipContent = _arg1;
invalidateDisplayList();
};
}
override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:int;
var _local4:int;
var _local5:ISimpleStyleClient;
_local3 = super.numChildren;
_local4 = 0;
while (_local4 < _local3) {
if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){
_local5 = (super.getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
};
_local4++;
};
if (_arg2){
changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1;
invalidateProperties();
};
}
override public function get contentMouseX():Number{
if (contentPane){
return (contentPane.mouseX);
};
return (super.contentMouseX);
}
override public function get contentMouseY():Number{
if (contentPane){
return (contentPane.mouseY);
};
return (super.contentMouseY);
}
override public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if ((((autoLayout == false)) && ((forceLayout == false)))){
if (_arg1){
_local2 = super.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = super.getChildAt(_local3);
if ((_local4 is ILayoutManagerClient)){
ILayoutManagerClient(_local4).validateSize(true);
};
_local3++;
};
};
adjustSizesForScaleChanges();
} else {
super.validateSize(_arg1);
};
}
override public function getChildAt(_arg1:int):DisplayObject{
if (contentPane){
return (contentPane.getChildAt(_arg1));
};
return (super.getChildAt((_firstChildIndex + _arg1)));
}
protected function layoutChrome(_arg1:Number, _arg2:Number):void{
if (border){
updateBackgroundImageRect();
border.move(0, 0);
border.setActualSize(_arg1, _arg2);
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){
setStyle("mouseShield", true);
setStyle("mouseShieldChildren", true);
};
};
}
override protected function attachOverlay():void{
rawChildren_addChild(overlay);
}
override public function localToContent(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = localToGlobal(_arg1);
return (globalToContent(_arg1));
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new ContainerRawChildrenList(this);
};
return (_rawChildren);
}
public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:Boolean;
var _local3:Boolean;
_local1 = borderMetrics;
_local2 = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON)))));
_local3 = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON)))));
if (((!(_local2)) && (!(_local3)))){
return (_local1);
};
if (!_viewMetrics){
_viewMetrics = _local1.clone();
} else {
_viewMetrics.left = _local1.left;
_viewMetrics.right = _local1.right;
_viewMetrics.top = _local1.top;
_viewMetrics.bottom = _local1.bottom;
};
if (_local2){
_viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth);
};
if (_local3){
_viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight);
};
return (_viewMetrics);
}
public function set creationIndex(_arg1:int):void{
_creationIndex = _arg1;
}
public function executeChildBindings(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:IUIComponent;
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = IUIComponent(getChildAt(_local3));
if ((_local4 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1);
};
_local3++;
};
}
public function set verticalScrollBar(_arg1:ScrollBar):void{
_verticalScrollBar = _arg1;
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
private function createOrDestroyBlocker():void{
var _local1:DisplayObject;
var _local2:ISystemManager;
if (enabled){
if (blocker){
rawChildren.removeChild(blocker);
blocker = null;
};
} else {
if (!blocker){
blocker = new FlexSprite();
blocker.name = "blocker";
blocker.mouseEnabled = true;
rawChildren.addChild(blocker);
blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler);
_local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null;
while (_local1) {
if (_local1 == this){
_local2 = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.focus = null;
};
break;
};
_local1 = _local1.parent;
};
};
};
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
if (horizontalScrollBar){
horizontalScrollBar.enabled = _arg1;
};
if (verticalScrollBar){
verticalScrollBar.enabled = _arg1;
};
invalidateProperties();
}
override public function getChildByName(_arg1:String):DisplayObject{
var _local2:DisplayObject;
var _local3:int;
if (contentPane){
return (contentPane.getChildByName(_arg1));
};
_local2 = super.getChildByName(_arg1);
if (!_local2){
return (null);
};
_local3 = (super.getChildIndex(_local2) - _firstChildIndex);
if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){
return (null);
};
return (_local2);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
if (contentPane){
contentPane.addChildAt(_arg1, _arg2);
} else {
$addChildAt(_arg1, (_firstChildIndex + _arg2));
};
childAdded(_arg1);
return (_arg1);
}
override public function get baselinePosition():Number{
var _local1:IUIComponent;
if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){
_local1 = (getChildAt(0) as IUIComponent);
if (_local1){
return ((_local1.y + _local1.baselinePosition));
};
};
return (super.baselinePosition);
}
private function blocker_clickHandler(_arg1:Event):void{
_arg1.stopPropagation();
}
public function get maxVerticalScrollPosition():Number{
return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0));
}
public function set verticalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalPageScrollSizeChanged"));
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
numChildrenCreated--;
if (numChildrenCreated <= 0){
dispatchEvent(new FlexEvent("childrenCreationComplete"));
};
}
override public function contentToLocal(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = contentToGlobal(_arg1);
return (globalToLocal(_arg1));
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
if (contentPane){
contentPane.removeChild(_arg1);
} else {
$removeChild(_arg1);
};
childRemoved(_arg1);
return (_arg1);
}
private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{
var _local5:ScrollEvent;
_local5 = new ScrollEvent(ScrollEvent.SCROLL);
_local5.direction = _arg1;
_local5.position = _arg3;
_local5.delta = (_arg3 - _arg2);
_local5.detail = _arg4;
dispatchEvent(_local5);
}
public function get label():String{
return (_label);
}
mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{
if (processedDescriptors){
return;
};
if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){
if (_arg1.properties.childDescriptors){
throw (new Error(resourceMultipleChildSets_ClassAndSubclass));
};
} else {
_documentDescriptor = _arg1;
_documentDescriptor.document = this;
};
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:IndexChangedEvent;
_local4 = _local3;
_local5 = _arg2;
if (contentPane){
contentPane.setChildIndex(_arg1, _arg2);
if (((_autoLayout) || (forceLayout))){
invalidateDisplayList();
};
} else {
_local3 = super.getChildIndex(_arg1);
_arg2 = (_arg2 + _firstChildIndex);
if (_arg2 == _local3){
return;
};
super.setChildIndex(_arg1, _arg2);
invalidateDisplayList();
_local4 = (_local3 - _firstChildIndex);
_local5 = (_arg2 - _firstChildIndex);
};
_local6 = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE);
_local6.relatedObject = _arg1;
_local6.oldIndex = _local4;
_local6.newIndex = _local5;
dispatchEvent(_local6);
dispatchEvent(new Event("childrenChanged"));
}
override public function regenerateStyleCache(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
super.regenerateStyleCache(_arg1);
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = getChildAt(_local3);
if (((_arg1) && ((_local4 is UIComponent)))){
if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
UIComponent(_local4).regenerateStyleCache(_arg1);
};
} else {
if ((((_local4 is UITextField)) && (UITextField(_local4).inheritingStyles))){
StyleProtoChain.initTextField(UITextField(_local4));
};
};
_local3++;
};
};
}
override protected function createChildren():void{
var _local1:Application;
super.createChildren();
createBorder();
createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON))));
if (creationPolicy != null){
actualCreationPolicy = creationPolicy;
} else {
if ((parent is Container)){
if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
actualCreationPolicy = Container(parent).actualCreationPolicy;
};
};
};
if (actualCreationPolicy == ContainerCreationPolicy.NONE){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){
_local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application);
_local1.addToCreationQueue(this, creationIndex, null, this);
} else {
if (recursionFlag){
createComponentsFromDescriptors();
};
};
};
if (autoLayout == false){
forceLayout = true;
};
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
}
mx_internal function set numChildrenCreated(_arg1:int):void{
_numChildrenCreated = _arg1;
}
public function get borderMetrics():EdgeMetrics{
return ((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY);
}
public function get clipContent():Boolean{
return (_clipContent);
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int;
_local3 = super.getChildIndex(_arg1);
super.setChildIndex(_arg1, _arg2);
if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){
_firstChildIndex--;
} else {
if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){
_firstChildIndex++;
};
};
dispatchEvent(new Event("childrenChanged"));
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
public function get viewMetricsAndPadding():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:EdgeMetrics;
if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){
return (_viewMetricsAndPadding);
};
if (!_viewMetricsAndPadding){
_viewMetricsAndPadding = new EdgeMetrics();
};
_local1 = _viewMetricsAndPadding;
_local2 = viewMetrics;
_local1.left = (_local2.left + getStyle("paddingLeft"));
_local1.right = (_local2.right + getStyle("paddingRight"));
_local1.top = (_local2.top + getStyle("paddingTop"));
_local1.bottom = (_local2.bottom + getStyle("paddingBottom"));
return (_local1);
}
public function set horizontalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalPageScrollSizeChanged"));
}
private function layoutCompleteHandler(_arg1:Event):void{
var _local2:Boolean;
UIComponentGlobals.layoutManager.removeEventListener("updateComplete", layoutCompleteHandler);
forceLayout = false;
_local2 = false;
if (!isNaN(horizontalScrollPositionPending)){
if (horizontalScrollPositionPending < 0){
horizontalScrollPositionPending = 0;
} else {
if (horizontalScrollPositionPending > maxHorizontalScrollPosition){
horizontalScrollPositionPending = maxHorizontalScrollPosition;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){
_horizontalScrollPosition = horizontalScrollPositionPending;
horizontalScrollBar.scrollPosition = horizontalScrollPositionPending;
_local2 = true;
};
horizontalScrollPositionPending = NaN;
};
if (!isNaN(verticalScrollPositionPending)){
if (verticalScrollPositionPending < 0){
verticalScrollPositionPending = 0;
} else {
if (verticalScrollPositionPending > maxVerticalScrollPosition){
verticalScrollPositionPending = maxVerticalScrollPosition;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){
_verticalScrollPosition = verticalScrollPositionPending;
verticalScrollBar.scrollPosition = verticalScrollPositionPending;
_local2 = true;
};
verticalScrollPositionPending = NaN;
};
if (_local2){
scrollChildren();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){
setStyle("mouseShield", false);
setStyle("mouseShieldChildren", false);
};
};
}
public function set autoLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
_autoLayout = _arg1;
if (_arg1){
invalidateSize();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
mx_internal function get numChildrenCreated():int{
return (_numChildrenCreated);
}
override public function initialize():void{
var _local1:*;
if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){
_local1 = documentDescriptor.properties;
if (((_local1) && (_local1.childDescriptors))){
if (_childDescriptors){
throw (new Error(resourceMultipleChildSets_ClassAndInstance));
};
_childDescriptors = _local1.childDescriptors;
};
};
super.initialize();
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + $numChildren) + 1))))){
_numChildren++;
} else {
if (_arg2 <= _firstChildIndex){
_firstChildIndex++;
};
};
super.addingChild(_arg1);
$addChildAt(_arg1, _arg2);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
invalidateDisplayList();
}
private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:EdgeMetrics;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
_local2 = _arg1.right;
_local3 = _arg1.bottom;
_local4 = unscaledWidth;
_local5 = unscaledHeight;
_local6 = (((_arg1.left < 0)) || ((_arg1.top < 0)));
_local7 = viewMetrics;
if (scaleX != 1){
_local4 = (_local4 + (1 / Math.abs(scaleX)));
};
if (scaleY != 1){
_local5 = (_local5 + (1 / Math.abs(scaleY)));
};
_local4 = Math.floor(_local4);
_local5 = Math.floor(_local5);
_local2 = Math.floor(_local2);
_local3 = Math.floor(_local3);
if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){
_local5 = (_local5 - horizontalScrollBar.minHeight);
};
if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){
_local4 = (_local4 - verticalScrollBar.minWidth);
};
_local4 = (_local4 - (_local7.left + _local7.right));
_local5 = (_local5 - (_local7.top + _local7.bottom));
_local8 = (horizontalScrollPolicy == ScrollPolicy.ON);
_local9 = (verticalScrollPolicy == ScrollPolicy.ON);
_local10 = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0)));
if (_local4 < _local2){
_local10 = true;
if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){
_local8 = true;
};
};
if (_local5 < _local3){
_local10 = true;
if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){
_local9 = true;
};
};
if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){
_local9 = false;
_local8 = _local9;
} else {
if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){
_local8 = false;
};
};
_local11 = createOrDestroyScrollbars(_local8, _local9, _local10);
if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){
if (horizontalScrollBar){
horizontalScrollBar.setScrollProperties((_local4 - borderMetrics.right), 0, (_local2 - _local4), horizontalPageScrollSize);
scrollPositionChanged = true;
};
viewableWidth = _local4;
scrollableWidth = _local2;
};
if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){
if (verticalScrollBar){
verticalScrollBar.setScrollProperties((_local5 - borderMetrics.bottom), 0, (_local3 - _local5), verticalPageScrollSize);
scrollPositionChanged = true;
};
viewableHeight = _local5;
scrollableHeight = _local3;
};
return (_local11);
}
public function getChildren():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
_local1 = [];
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local1.push(getChildAt(_local3));
_local3++;
};
return (_local1);
}
public function removeAllChildren():void{
while (numChildren > 0) {
removeChildAt(0);
};
}
override mx_internal function childRemoved(_arg1:DisplayObject):void{
super.childRemoved(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
_numChildren--;
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
};
dispatchEvent(new Event("childrenChanged"));
}
override public function get numChildren():int{
return ((contentPane) ? contentPane.numChildren : _numChildren);
}
public function get data():Object{
return (_data);
}
override public function styleChanged(_arg1:String):void{
var _local2:Boolean;
var _local3:String;
var _local4:String;
_local2 = (((_arg1 == null)) || ((_arg1 == "styleName")));
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateDisplayList();
};
if (((_local2) || ((_arg1 == "borderSkin")))){
if (border){
rawChildren.removeChild(DisplayObject(border));
border = null;
createBorder();
};
};
if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){
createBorder();
};
super.styleChanged(_arg1);
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateViewMetricsAndPadding();
};
if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){
if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){
_local3 = getStyle("horizontalScrollBarStyleName");
ISimpleStyleClient(horizontalScrollBar).styleName = _local3;
};
};
if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){
if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){
_local4 = getStyle("verticalScrollBarStyleName");
ISimpleStyleClient(verticalScrollBar).styleName = _local4;
};
};
}
private function createContentPaneAndScrollbarsIfNeeded():Boolean{
var _local1:Rectangle;
var _local2:Boolean;
if (_clipContent){
_local1 = getScrollableRect();
_local2 = createScrollbarsIfNeeded(_local1);
if (border){
updateBackgroundImageRect();
};
return (_local2);
//unresolved jump
};
_local2 = createOrDestroyScrollbars(false, false, false);
_local1 = getScrollableRect();
scrollableWidth = _local1.right;
scrollableHeight = _local1.bottom;
if (((_local2) && (border))){
updateBackgroundImageRect();
};
return (_local2);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Object;
var _local4:Number;
super.updateDisplayList(_arg1, _arg2);
layoutChrome(_arg1, _arg2);
if (scrollPositionChanged){
if (_horizontalScrollPosition < 0){
_horizontalScrollPosition = 0;
} else {
if (_horizontalScrollPosition > maxHorizontalScrollPosition){
_horizontalScrollPosition = maxHorizontalScrollPosition;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){
horizontalScrollBar.scrollPosition = _horizontalScrollPosition;
};
if (_verticalScrollPosition < 0){
_verticalScrollPosition = 0;
} else {
if (_verticalScrollPosition > maxVerticalScrollPosition){
_verticalScrollPosition = maxVerticalScrollPosition;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){
verticalScrollBar.scrollPosition = _verticalScrollPosition;
};
scrollChildren();
scrollPositionChanged = false;
};
if (scrollPropertiesChanged){
if (horizontalScrollBar){
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
};
if (verticalScrollBar){
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
};
scrollPropertiesChanged = false;
};
if (((contentPane) && (contentPane.scrollRect))){
_local3 = (enabled) ? null : getStyle("backgroundDisabledColor");
if (!_local3){
_local3 = getStyle("backgroundColor");
};
_local4 = getStyle("backgroundAlpha");
if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){
_local3 = null;
} else {
if (((getStyle("backgroundImage")) || (getStyle("background")))){
_local3 = null;
} else {
if (_local4 != 1){
_local3 = null;
};
};
};
contentPane.opaqueBackground = _local3;
contentPane.cacheAsBitmap = !((_local3 == null));
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
if (_numChildren == 0){
_firstChildIndex++;
};
super.addingChild(_arg1);
$addChild(_arg1);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
private static function loadResources():void{
resourceScrollDirection = packageResources.getString("scrollDirection");
resourceMultipleChildSets_ClassAndInstance = packageResources.getString("multipleChildSets_ClassAndInstance");
resourceMultipleChildSets_ClassAndSubclass = packageResources.getString("multipleChildSets_ClassAndSubclass");
}
mx_internal static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{
var _local3:InteractiveObject;
var _local4:InteractiveObject;
var _local5:IUIComponent;
var _local6:IFocusManager;
var _local7:Button;
_local3 = _arg2;
_local4 = _arg2;
_local5 = null;
if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){
return;
};
while (_local4) {
if (_local4.parent){
_local3 = _local4.parent;
} else {
_local3 = null;
};
if ((_local4 is IUIComponent)){
_local5 = IUIComponent(_local4);
};
_local4 = _local3;
if (((((_local4) && ((_local4 is Container)))) && (Container(_local4).defaultButton))){
break;
};
};
if (ContainerGlobals.focusedContainer != _local4){
if (!_local4){
_local4 = InteractiveObject(_local5);
};
if (((_local4) && ((_local4 is Container)))){
_local6 = UIComponent(_local4).focusManager;
_local7 = (Container(_local4).defaultButton as Button);
if (_local7){
ContainerGlobals.focusedContainer = Container(_local4);
_local6.defaultButton = _local7;
} else {
ContainerGlobals.focusedContainer = Container(_local4);
_local6.defaultButton = null;
};
};
};
}
loadResources();
}
}//package mx.core
Section 105
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy)
package mx.core {
public final class ContainerCreationPolicy {
public static const ALL:String = "all";
public static const QUEUED:String = "queued";
public static const NONE:String = "none";
mx_internal static const VERSION:String = "2.0.1.0";
public static const AUTO:String = "auto";
}
}//package mx.core
Section 106
//ContainerGlobals (mx.core.ContainerGlobals)
package mx.core {
import flash.display.*;
public class ContainerGlobals {
public static var focusedContainer:InteractiveObject;
}
}//package mx.core
Section 107
//ContainerLayout (mx.core.ContainerLayout)
package mx.core {
public final class ContainerLayout {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
public static const ABSOLUTE:String = "absolute";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 108
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public class ContainerRawChildrenList implements IChildList {
private var owner:Container;
mx_internal static const VERSION:String = "2.0.1.0";
public function ContainerRawChildrenList(_arg1:Container){
this.owner = _arg1;
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
}
}//package mx.core
Section 109
//DragSource (mx.core.DragSource)
package mx.core {
public class DragSource {
private var formatHandlers:Object;
private var dataHolder:Object;
private var _formats:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function DragSource(){
dataHolder = {};
formatHandlers = {};
_formats = [];
super();
}
public function dataForFormat(_arg1:String):Object{
var _local2:Object;
_local2 = dataHolder[_arg1];
if (_local2){
return (_local2);
};
if (formatHandlers[_arg1]){
return (formatHandlers[_arg1]());
};
return (null);
}
public function addHandler(_arg1:Function, _arg2:String):void{
_formats.push(_arg2);
formatHandlers[_arg2] = _arg1;
}
public function addData(_arg1:Object, _arg2:String):void{
_formats.push(_arg2);
dataHolder[_arg2] = _arg1;
}
public function hasFormat(_arg1:String):Boolean{
var _local2:int;
var _local3:int;
_local2 = _formats.length;
_local3 = 0;
while (_local3 < _local2) {
if (_formats[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function get formats():Array{
return (_formats);
}
}
}//package mx.core
Section 110
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var bottom:Number;
public var top:Number;
public var right:Number;
public var left:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static var EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 111
//EventPriority (mx.core.EventPriority)
package mx.core {
public final class EventPriority {
public static const DEFAULT:int = 0;
public static const BINDING:int = 100;
public static const DEFAULT_HANDLER:int = -50;
public static const EFFECT:int = -100;
public static const CURSOR_MANAGEMENT:int = 200;
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 112
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 113
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 114
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 115
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 116
//FlexTextField (mx.core.FlexTextField)
package mx.core {
import flash.text.*;
import mx.utils.*;
public class FlexTextField extends TextField {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexTextField(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 117
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
}
}//package mx.core
Section 118
//IContainer (mx.core.IContainer)
package mx.core {
public interface IContainer {
}
}//package mx.core
Section 119
//IDataRenderer (mx.core.IDataRenderer)
package mx.core {
public interface IDataRenderer {
function set data(_arg1:Object):void;
function get data():Object;
}
}//package mx.core
Section 120
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function get descriptor():UIComponentDescriptor;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function set cacheHeuristic(_arg1:Boolean):void;
function get cachePolicy():String;
function registerEffects(_arg1:Array):void;
function set id(_arg1:String):void;
}
}//package mx.core
Section 121
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 122
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.display.*;
import flash.events.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 123
//IFlexModule (mx.core.IFlexModule)
package mx.core {
public interface IFlexModule {
function set moduleFactory(_arg1:IFlexModuleFactory):void;
function get moduleFactory():IFlexModuleFactory;
}
}//package mx.core
Section 124
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 125
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function get imeMode():String;
function set imeMode(_arg1:String):void;
}
}//package mx.core
Section 126
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateDisplayList():void;
function invalidateSize():void;
function invalidateProperties():void;
}
}//package mx.core
Section 127
//IMXMLObject (mx.core.IMXMLObject)
package mx.core {
public interface IMXMLObject {
function initialized(_arg1:Object, _arg2:String):void;
}
}//package mx.core
Section 128
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 129
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 130
//IRepeater (mx.core.IRepeater)
package mx.core {
public interface IRepeater {
function get container():Container;
function set recycleChildren(_arg1:Boolean):void;
function get startingIndex():int;
function set startingIndex(_arg1:int):void;
function get currentItem():Object;
function get count():int;
function get recycleChildren():Boolean;
function executeChildBindings():void;
function set dataProvider(_arg1:Object):void;
function initializeRepeater(_arg1:Container, _arg2:Boolean):void;
function get currentIndex():int;
function get dataProvider():Object;
function set count(_arg1:int):void;
}
}//package mx.core
Section 131
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 132
//IToolTip (mx.core.IToolTip)
package mx.core {
import flash.geom.*;
public interface IToolTip extends IUIComponent {
function get screen():Rectangle;
function get text():String;
function set text(_arg1:String):void;
}
}//package mx.core
Section 133
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set enabled(_arg1:Boolean):void;
function set measuredMinWidth(_arg1:Number):void;
function set isPopUp(_arg1:Boolean):void;
function get percentWidth():Number;
function set percentWidth(_arg1:Number):void;
function get baselinePosition():Number;
function initialize():void;
function getExplicitOrMeasuredWidth():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function getExplicitOrMeasuredHeight():Number;
function get document():Object;
function get explicitMaxWidth():Number;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function get maxHeight():Number;
function get minWidth():Number;
function owns(_arg1:DisplayObject):Boolean;
function get opaqueBackground():Object;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function get owner():DisplayObjectContainer;
function set document(_arg1:Object):void;
function get tweeningProperties():Array;
function get enabled():Boolean;
function get isPopUp():Boolean;
function get explicitMinHeight():Number;
function set focusPane(_arg1:Sprite):void;
function get maxWidth():Number;
function get percentHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function get explicitMaxHeight():Number;
function get focusPane():Sprite;
function parentChanged(_arg1:DisplayObjectContainer):void;
function set opaqueBackground(_arg1:Object):void;
function set measuredMinHeight(_arg1:Number):void;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scrollRect():Rectangle;
function set explicitWidth(_arg1:Number):void;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function get explicitMinWidth():Number;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 134
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 135
//LayoutContainer (mx.core.LayoutContainer)
package mx.core {
import flash.events.*;
import mx.containers.*;
import mx.resources.*;
import flash.system.*;
import mx.containers.utilityClasses.*;
public class LayoutContainer extends Container {
private var _layout:String;// = "vertical"
private var processingCreationQueue:Boolean;// = false
private var creationQueue:Array;
protected var boxLayoutClass:Class;
private var preloadObj:Object;
private var resizeHandlerAdded:Boolean;// = false
protected var layoutObject:Layout;
protected var canvasLayoutClass:Class;
mx_internal static const VERSION:String = "2.0.1.0";
private static var viewSourceMenuItem:String;
mx_internal static var useProgressiveLayout:Boolean = false;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function LayoutContainer(){
layoutObject = new BoxLayout();
canvasLayoutClass = CanvasLayout;
boxLayoutClass = BoxLayout;
resizeHandlerAdded = false;
creationQueue = [];
processingCreationQueue = false;
_layout = ContainerLayout.VERTICAL;
super();
layoutObject.target = this;
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
}
public function set layout(_arg1:String):void{
if (_layout != _arg1){
_layout = _arg1;
if (layoutObject){
layoutObject.target = null;
};
if (_layout == ContainerLayout.ABSOLUTE){
layoutObject = new canvasLayoutClass();
} else {
layoutObject = new boxLayoutClass();
if (_layout == ContainerLayout.VERTICAL){
BoxLayout(layoutObject).direction = BoxDirection.VERTICAL;
} else {
BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL;
};
};
if (layoutObject){
layoutObject.target = this;
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("layoutChanged"));
};
}
public function get layout():String{
return (_layout);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
createBorder();
}
private static function loadResources():void{
viewSourceMenuItem = packageResources.getString("viewSource");
}
loadResources();
}
}//package mx.core
Section 136
//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 137
//ScrollPolicy (mx.core.ScrollPolicy)
package mx.core {
public final class ScrollPolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OFF:String = "off";
}
}//package mx.core
Section 138
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
private static var classMap:Object = {};
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class;
_local2 = classMap[_arg1];
return (Object(_local2).getInstance());
}
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class;
_local3 = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
}
}//package mx.core
Section 139
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 140
//UIComponent (mx.core.UIComponent)
package mx.core {
import mx.automation.*;
import flash.events.*;
import mx.events.*;
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import mx.states.*;
import mx.effects.*;
import mx.graphics.*;
import mx.resources.*;
import mx.binding.*;
import flash.system.*;
import flash.utils.*;
import mx.utils.*;
import mx.validators.*;
import mx.skins.*;
import mx.modules.*;
public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener {
private var errorStringChanged:Boolean;// = false
mx_internal var overlay:UIComponent;
mx_internal var automaticRadioButtonGroups:Object;
private var _currentState:String;
private var _isPopUp:Boolean;
private var _repeaters:Array;
private var packageResources:ResourceBundle;
private var _systemManager:ISystemManager;
private var _measuredWidth:Number;// = 0
private var methodQueue:Array;
mx_internal var _width:Number;
private var _tweeningProperties:Array;
private var _validationSubField:String;
private var _endingEffectInstances:Array;
mx_internal var saveBorderColor:Boolean;// = true
mx_internal var overlayColor:uint;
private var _repeaterIndices:Array;
private var oldExplicitWidth:Number;
mx_internal var _descriptor:UIComponentDescriptor;
private var _initialized:Boolean;// = false
private var requestedCurrentState:String;
private var _focusEnabled:Boolean;// = true
private var cacheAsBitmapCount:int;// = 0
mx_internal var overlayReferenceCount:int;// = 0
private var listeningForRender:Boolean;// = false
mx_internal var invalidateDisplayListFlag:Boolean;// = false
private var oldScaleX:Number;// = 1
private var oldScaleY:Number;// = 1
mx_internal var _explicitMaxHeight:Number;
mx_internal var invalidatePropertiesFlag:Boolean;// = false
private var hasFocusRect:Boolean;// = false
private var _scaleX:Number;// = 1
private var _scaleY:Number;// = 1
mx_internal var invalidateSizeFlag:Boolean;// = false
private var _styleDeclaration:CSSStyleDeclaration;
mx_internal var _documentDescriptor:UIComponentDescriptor;
mx_internal var _affectedProperties:Object;
private var _processedDescriptors:Boolean;// = false
mx_internal var origBorderColor:Number;
private var _focusManager:IFocusManager;
private var _cachePolicy:String;// = "auto"
private var _measuredHeight:Number;// = 0
private var _id:String;
private var _owner:DisplayObjectContainer;
public var transitions:Array;
mx_internal var _parent:DisplayObjectContainer;
private var _measuredMinWidth:Number;// = 0
private var oldMinWidth:Number;
private var _enabled:Boolean;// = false
public var states:Array;
private var _explicitWidth:Number;
private var _mouseFocusEnabled:Boolean;// = true
private var oldHeight:Number;// = 0
private var _currentStateChanged:Boolean;
private var cachedTextFormat:UITextFormat;
private var _automationDelegate:IAutomationObject;
mx_internal var _height:Number;
private var _percentWidth:Number;
private var _automationName:String;// = null
private var _isEffectStarted:Boolean;// = false
private var _styleName:Object;
mx_internal var _document:Object;
private var _errorString:String;// = ""
private var oldExplicitHeight:Number;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _filters:Array;
private var _toolTip:String;
private var _focusPane:Sprite;
private var playStateTransition:Boolean;// = true
private var _nonInheritingStyles:Object;
private var _showInAutomationHierarchy:Boolean;// = true
private var _moduleFactory:IFlexModuleFactory;
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var _instanceIndices:Array;
private var _visible:Boolean;// = true
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
mx_internal var _effectsStarted:Array;
private var _explicitMinWidth:Number;
private var resourceStateUndefined:String;// = null
mx_internal var _explicitMaxWidth:Number;
private var _measuredMinHeight:Number;// = 0
private var _uid:String;
private var _currentTransitionEffect:Effect;
private var _updateCompletePendingFlag:Boolean;// = false
private var oldMinHeight:Number;
mx_internal var _explicitMinHeight:Number;
private var _percentHeight:Number;
private var oldWidth:Number;// = 0
public static const DEFAULT_MEASURED_WIDTH:Number = 160;
public static const DEFAULT_MAX_WIDTH:Number = 10000;
public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
public static const DEFAULT_MAX_HEIGHT:Number = 10000;
public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
mx_internal static const VERSION:String = "2.0.1.0";
public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
mx_internal static var dispatchEventHook:Function;
private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY");
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var STYLE_UNINITIALIZED:Object = {};
private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX");
public function UIComponent(){
packageResources = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
resourceStateUndefined = null;
listeningForRender = false;
methodQueue = [];
hasFocusRect = false;
_initialized = false;
_processedDescriptors = false;
_updateCompletePendingFlag = false;
invalidatePropertiesFlag = false;
invalidateSizeFlag = false;
invalidateDisplayListFlag = false;
oldX = 0;
oldY = 0;
oldWidth = 0;
oldHeight = 0;
oldScaleX = 1;
oldScaleY = 1;
overlayReferenceCount = 0;
saveBorderColor = true;
_scaleX = 1;
_scaleY = 1;
_visible = true;
_enabled = false;
_nestLevel = 0;
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_cachePolicy = UIComponentCachePolicy.AUTO;
cacheAsBitmapCount = 0;
_focusEnabled = true;
_mouseFocusEnabled = true;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
_measuredWidth = 0;
_measuredHeight = 0;
_includeInLayout = true;
playStateTransition = true;
states = [];
transitions = [];
_automationName = null;
_showInAutomationHierarchy = true;
_errorString = "";
errorStringChanged = false;
_effectsStarted = [];
_affectedProperties = {};
_isEffectStarted = false;
_endingEffectInstances = [];
super();
focusRect = false;
tabEnabled = (this is IFocusManagerComponent);
enabled = true;
$visible = false;
addEventListener(Event.ADDED, addedHandler);
addEventListener(Event.REMOVED, removedHandler);
if ((this is IFocusManagerComponent)){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
_width = super.width;
_height = super.height;
}
public function getStyle(_arg1:String){
return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]);
}
public function get toolTip():String{
return (_toolTip);
}
private function transition_effectEndHandler(_arg1:EffectEvent):void{
_currentTransitionEffect = null;
}
public function get nestLevel():int{
return (_nestLevel);
}
protected function adjustFocusRect(_arg1:DisplayObject=null):void{
var _local2:IFocusManager;
var _local3:IFlexDisplayObject;
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
if (!_arg1){
_arg1 = this;
};
if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){
return;
};
_local2 = focusManager;
if (!_local2){
return;
};
_local3 = IFlexDisplayObject(getFocusObject());
if (_local3){
if (((errorString) && (!((errorString == ""))))){
_local4 = getStyle("errorColor");
} else {
_local4 = getStyle("themeColor");
};
_local5 = getStyle("focusThickness");
if ((_local3 is IStyleClient)){
IStyleClient(_local3).setStyle("focusColor", _local4);
};
_local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5)));
if (rotation){
_local7 = ((rotation * Math.PI) / 180);
_local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7)))));
DisplayObject(_local3).rotation = rotation;
} else {
_local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5));
};
if (_arg1.parent == this){
_local6.x = (_local6.x + x);
_local6.y = (_local6.y + y);
};
_local6 = parent.localToGlobal(_local6);
_local6 = parent.globalToLocal(_local6);
_local3.move(_local6.x, _local6.y);
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
} else {
if ((_local3 is ProgrammaticSkin)){
ProgrammaticSkin(_local3).validateNow();
};
};
};
}
public function set nestLevel(_arg1:int):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:ILayoutManagerClient;
var _local6:UITextField;
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
updateCallbacks();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient);
if (_local5){
_local5.nestLevel = (_arg1 + 1);
} else {
_local6 = (_local2.getChildAt(_local4) as UITextField);
if (_local6){
_local6.nestLevel = (_arg1 + 1);
};
};
_local4++;
};
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function callLaterDispatcher(_arg1:Event):void{
var layoutErrorEvent:DynamicEvent;
var event = _arg1;
UIComponentGlobals.callLaterDispatcherCount++;
if (!UIComponentGlobals.designTime){
callLaterDispatcher2(event);
} else {
try {
callLaterDispatcher2(event);
} catch(e:Error) {
layoutErrorEvent = new DynamicEvent("layoutError");
layoutErrorEvent.error = e;
systemManager.dispatchEvent(layoutErrorEvent);
};
};
UIComponentGlobals.callLaterDispatcherCount--;
}
final mx_internal function get $width():Number{
return (super.width);
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{
if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){
requestedCurrentState = _arg1;
playStateTransition = _arg2;
if (initialized){
commitCurrentState();
} else {
_currentStateChanged = true;
addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
}
private function getBaseStates(_arg1:State):Array{
var _local2:Array;
_local2 = [];
while (((_arg1) && (!((_arg1.basedOn == ""))))) {
_local2.push(_arg1.basedOn);
_arg1 = getState(_arg1.basedOn);
};
return (_local2);
}
public function set minHeight(_arg1:Number):void{
if (explicitMinHeight == _arg1){
return;
};
explicitMinHeight = _arg1;
}
public function get errorString():String{
return (_errorString);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
final mx_internal function set $width(_arg1:Number):void{
super.width = _arg1;
}
public function invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
};
}
override public function get scaleX():Number{
return (_scaleX);
}
override public function get scaleY():Number{
return (_scaleY);
}
mx_internal function initThemeColor():Boolean{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Array;
var _local7:int;
var _local8:CSSStyleDeclaration;
_local1 = _styleName;
if (_styleDeclaration){
_local2 = _styleDeclaration.getStyle("themeColor");
_local3 = _styleDeclaration.getStyle("rollOverColor");
_local4 = _styleDeclaration.getStyle("selectionColor");
};
if (((((!(_local2)) && (_local1))) && (!((_local1 is ISimpleStyleClient))))){
_local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1;
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
};
if (!_local2){
_local6 = getClassStyleDeclarations();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_local8){
_local2 = _local8.getStyle("themeColor");
_local3 = _local8.getStyle("rollOverColor");
_local4 = _local8.getStyle("selectionColor");
};
if (_local2){
break;
};
_local7++;
};
};
if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
return (true);
};
return (((((_local2) && (!(isNaN(_local3))))) && (!(isNaN(_local4)))));
}
override public function get mouseX():Number{
if (((!(root)) || ((root[fakeMouseX] === undefined)))){
return (super.mouseX);
};
return (globalToLocal(new Point(root[fakeMouseX], 0)).x);
}
override public function get mouseY():Number{
if (((!(root)) || ((root[fakeMouseY] === undefined)))){
return (super.mouseY);
};
return (globalToLocal(new Point(0, root[fakeMouseY])).y);
}
override public function stopDrag():void{
super.stopDrag();
invalidateProperties();
dispatchEvent(new Event("xChanged"));
dispatchEvent(new Event("yChanged"));
}
public function get uid():String{
if (!_uid){
_uid = toString();
};
return (_uid);
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
public function get focusPane():Sprite{
return (_focusPane);
}
public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function set validationSubField(_arg1:String):void{
_validationSubField = _arg1;
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
public function get isDocument():Boolean{
return ((document == this));
}
mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{
if (!overlay){
overlayColor = _arg1;
overlay = new UIComponent();
overlay.name = "overlay";
fillOverlay(overlay, _arg1, _arg2);
attachOverlay();
if (!_arg2){
addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler);
};
overlay.x = 0;
overlay.y = 0;
invalidateDisplayList();
overlayReferenceCount = 1;
} else {
overlayReferenceCount++;
};
dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay));
}
override public function get visible():Boolean{
return (_visible);
}
public function get screen():Rectangle{
var _local1:ISystemManager;
_local1 = systemManager;
return ((_local1) ? _local1.screen : null);
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus(DisplayObject(_arg1.target))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
};
Container.checkFocus(_arg1.relatedObject, this);
};
}
private function focusObj_scrollHandler(_arg1:Event):void{
adjustFocusRect();
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
public function set explicitMinHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMinHeight == _arg1){
return;
};
_explicitMinHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinHeightChanged"));
}
public function stylesInitialized():void{
}
public function set errorString(_arg1:String):void{
ToolTipManager.registerErrorString(this, _arg1);
_errorString = _arg1;
errorStringChanged = true;
invalidateProperties();
dispatchEvent(new Event("errorStringChanged"));
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
final mx_internal function set $height(_arg1:Number):void{
super.height = _arg1;
}
final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{
return (super.removeChild(_arg1));
}
override public function set scaleX(_arg1:Number):void{
if (_scaleX == _arg1){
return;
};
_scaleX = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleXChanged"));
}
override public function set scaleY(_arg1:Number):void{
if (_scaleY == _arg1){
return;
};
_scaleY = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleYChanged"));
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
mx_internal function get isEffectStarted():Boolean{
return (_isEffectStarted);
}
public function set uid(_arg1:String):void{
this._uid = _arg1;
}
mx_internal function adjustSizesForScaleChanges():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = scaleX;
_local2 = scaleY;
if (_local1 != oldScaleX){
_local3 = Math.abs((_local1 / oldScaleX));
if (explicitMinWidth){
explicitMinWidth = (explicitMinWidth * _local3);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local3);
};
if (explicitMaxWidth){
explicitMaxWidth = (explicitMaxWidth * _local3);
};
oldScaleX = _local1;
};
if (_local2 != oldScaleY){
_local3 = Math.abs((_local2 / oldScaleY));
if (explicitMinHeight){
explicitMinHeight = (explicitMinHeight * _local3);
};
if (explicitHeight){
explicitHeight = (explicitHeight * _local3);
};
if (explicitMaxHeight){
explicitMaxHeight = (explicitMaxHeight * _local3);
};
oldScaleY = _local2;
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
public function determineTextFormatFromStyles():UITextFormat{
var _local1:UITextFormat;
_local1 = cachedTextFormat;
if (!_local1){
_local1 = new UITextFormat(systemManager);
_local1.align = _inheritingStyles.textAlign;
_local1.bold = (_inheritingStyles.fontWeight == "bold");
_local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor;
_local1.font = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ",");
_local1.indent = _inheritingStyles.textIndent;
_local1.italic = (_inheritingStyles.fontStyle == "italic");
_local1.kerning = _inheritingStyles.kerning;
_local1.leading = _nonInheritingStyles.leading;
_local1.leftMargin = _nonInheritingStyles.paddingLeft;
_local1.letterSpacing = _inheritingStyles.letterSpacing;
_local1.rightMargin = _nonInheritingStyles.paddingRight;
_local1.size = _inheritingStyles.fontSize;
_local1.underline = (_nonInheritingStyles.textDecoration == "underline");
_local1.antiAliasType = _inheritingStyles.fontAntiAliasType;
_local1.gridFitType = _inheritingStyles.fontGridFitType;
_local1.sharpness = _inheritingStyles.fontSharpness;
_local1.thickness = _inheritingStyles.fontThickness;
cachedTextFormat = _local1;
};
return (_local1);
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
if (automationDelegate){
return (automationDelegate.getAutomationChildAt(_arg1));
};
return (null);
}
private function focusObj_resizeHandler(_arg1:ResizeEvent):void{
adjustFocusRect();
}
public function validationResultHandler(_arg1:ValidationResultEvent):void{
var _local2:String;
var _local3:ValidationResult;
var _local4:int;
if (_arg1.type == ValidationResultEvent.VALID){
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
} else {
if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){
_local4 = 0;
while (_local4 < _arg1.results.length) {
_local3 = _arg1.results[_local4];
if (_local3.subField == validationSubField){
if (_local3.isError){
_local2 = _local3.errorMessage;
} else {
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
};
break;
};
_local4++;
};
} else {
if (((_arg1.results) && ((_arg1.results.length > 0)))){
_local2 = _arg1.results[0].errorMessage;
};
};
if (((_local2) && (!((errorString == _local2))))){
errorString = _local2;
dispatchEvent(new FlexEvent(FlexEvent.INVALID));
};
};
}
public function invalidateProperties():void{
if (!invalidatePropertiesFlag){
invalidatePropertiesFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
};
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_width != _arg1){
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
dispatchEvent(new Event("heightChanged"));
_local3 = true;
};
if (_local3){
invalidateDisplayList();
dispatchResizeEvent();
};
}
final mx_internal function get $x():Number{
return (super.x);
}
final mx_internal function get $y():Number{
return (super.y);
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function registerEffects(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:String;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]);
if (((!((_local4 == null))) && (!((_local4 == ""))))){
addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
_local3++;
};
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
if (automationDelegate){
return (automationDelegate.createAutomationIDPart(_arg1));
};
return (null);
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
private function filterChangeHandler(_arg1:Event):void{
super.filters = _filters;
}
override public function set x(_arg1:Number):void{
if (super.x == _arg1){
return;
};
super.x = _arg1;
invalidateProperties();
dispatchEvent(new Event("xChanged"));
}
override public function set y(_arg1:Number):void{
if (super.y == _arg1){
return;
};
super.y = _arg1;
invalidateProperties();
dispatchEvent(new Event("yChanged"));
}
public function set explicitHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
_showInAutomationHierarchy = _arg1;
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
}
mx_internal function getFocusObject():DisplayObject{
var _local1:IFocusManager;
_local1 = focusManager;
if (((!(_local1)) || (!(_local1.focusPane)))){
return (null);
};
return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0));
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren;
addingChild(_arg1);
$addChildAt(_arg1, _local2);
childAdded(_arg1);
return (_arg1);
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set percentWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
public function get document():Object{
return (_document);
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{
return (super.addChild(_arg1));
}
mx_internal function setThemeColor(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if ((_local2 is String)){
_local2 = parseInt(String(_arg1));
} else {
_local2 = Number(_arg1);
};
if (isNaN(_local2)){
_local2 = StyleManager.getColorName(_arg1);
};
_local3 = ColorUtil.adjustBrightness2(_local2, 50);
_local4 = ColorUtil.adjustBrightness2(_local2, 70);
setStyle("selectionColor", _local3);
setStyle("rollOverColor", _local4);
}
override public function get height():Number{
return (_height);
}
public function get id():String{
return (_id);
}
public function set minWidth(_arg1:Number):void{
if (explicitMinWidth == _arg1){
return;
};
explicitMinWidth = _arg1;
}
public function set currentState(_arg1:String):void{
setCurrentState(_arg1, true);
}
public function getRepeaterItem(_arg1:int=-1):Object{
var _local2:Array;
_local2 = repeaters;
if (_arg1 == -1){
_arg1 = (_local2.length - 1);
};
return (_local2[_arg1].getItemAt(repeaterIndices[_arg1]));
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object;
_local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function get instanceIndex():int{
return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function effectFinished(_arg1:EffectInstance):void{
_endingEffectInstances.push(_arg1);
invalidateProperties();
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
}
public function set measuredWidth(_arg1:Number):void{
_measuredWidth = _arg1;
}
override public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = getChildAt(_arg1);
removingChild(_local2);
$removeChild(_local2);
childRemoved(_local2);
return (_local2);
}
mx_internal function set isEffectStarted(_arg1:Boolean):void{
_isEffectStarted = _arg1;
}
mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
var _local4:Graphics;
if (!_arg3){
_arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0);
};
_local4 = _arg1.graphics;
_local4.clear();
_local4.beginFill(_arg2);
_local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local4.endFill();
}
mx_internal function childAdded(_arg1:DisplayObject):void{
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).initialized){
UIComponent(_arg1).initialize();
};
} else {
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
};
}
public function globalToContent(_arg1:Point):Point{
return (globalToLocal(_arg1));
}
public function get instanceIndices():Array{
return ((_instanceIndices) ? _instanceIndices.slice(0) : null);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
}
private function getTransition(_arg1:String, _arg2:String):Effect{
var _local3:Effect;
var _local4:int;
var _local5:int;
var _local6:Transition;
_local3 = null;
_local4 = 0;
if (!transitions){
return (null);
};
if (!_arg1){
_arg1 = "";
};
if (!_arg2){
_arg2 = "";
};
_local5 = 0;
while (_local5 < transitions.length) {
_local6 = transitions[_local5];
if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){
_local3 = _local6.effect;
_local4 = 1;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){
_local3 = _local6.effect;
_local4 = 2;
} else {
if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){
_local3 = _local6.effect;
_local4 = 3;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){
_local3 = _local6.effect;
_local4 = 4;
break;
};
};
};
};
_local5++;
};
return (_local3);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
mx_internal function getEffectsForProperty(_arg1:String):Array{
return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []);
}
protected function get unscaledWidth():Number{
return ((width / Math.abs(scaleX)));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
if (_arg1){
dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
};
}
private function processEffectFinished(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:EffectInstance;
var _local5:EffectInstance;
var _local6:Array;
var _local7:int;
var _local8:String;
var _local9:int;
_local2 = (_effectsStarted.length - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
if (_local4 == _effectsStarted[_local2]){
_local5 = _effectsStarted[_local2];
_effectsStarted.splice(_local2, 1);
_local6 = _local5.effect.getAffectedProperties();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_affectedProperties[_local8] != undefined){
_local9 = 0;
while (_local9 < _affectedProperties[_local8].length) {
if (_affectedProperties[_local8][_local9] == _local4){
_affectedProperties[_local8].splice(_local9, 1);
break;
};
_local9++;
};
if (_affectedProperties[_local8].length == 0){
delete _affectedProperties[_local8];
};
};
_local7++;
};
break;
};
_local3++;
};
_local2--;
};
isEffectStarted = ((_effectsStarted.length > 0)) ? true : false;
}
protected function measure():void{
measuredWidth = (isNaN(_width)) ? 0 : _width;
measuredHeight = (isNaN(_height)) ? 0 : _height;
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent;
_local1 = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function set maxWidth(_arg1:Number):void{
if (explicitMaxWidth == _arg1){
return;
};
explicitMaxWidth = _arg1;
}
public function validateDisplayList():void{
var _local1:ISystemManager;
if (invalidateDisplayListFlag){
_local1 = (parent as ISystemManager);
if (_local1){
if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
};
updateDisplayList(((scaleX == 0)) ? 0 : (width / scaleX), ((scaleY == 0)) ? 0 : (height / scaleY));
invalidateDisplayListFlag = false;
};
}
public function contentToGlobal(_arg1:Point):Point{
return (localToGlobal(_arg1));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
if (automationDelegate){
return (automationDelegate.resolveAutomationIDPart(_arg1));
};
return ([]);
}
public function setFocus():void{
var _local1:ISystemManager;
_local1 = systemManager;
if (((_local1) && (_local1.stage))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
if (_arg1){
setVisible(_visible, true);
dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
};
}
public function owns(_arg1:DisplayObject):Boolean{
var _local2:IChildList;
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (_local2.contains(_arg1)){
return (true);
};
while (((_arg1) && (!((_arg1 == this))))) {
if ((_arg1 is IUIComponent)){
_arg1 = IUIComponent(_arg1).owner;
} else {
_arg1 = _arg1.parent;
};
};
return ((_arg1 == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
_visible = _arg1;
if (!initialized){
return;
};
if ($visible == _arg1){
return;
};
$visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
final mx_internal function set $y(_arg1:Number):void{
super.y = _arg1;
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:PropertyChangeEvent;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = null;
} else {
_local3 = _arg1[id];
if (!_local3){
return;
};
_local4 = [];
_local4.push(_local3);
_local5 = _local2.length;
_local6 = 0;
while (_local6 < (_local5 - 1)) {
_local8 = _local3[_local2[_local6]];
if (!_local8){
return;
};
_local3 = _local8;
_local4.push(_local3);
_local6++;
};
_local3.splice(_local2[(_local5 - 1)], 1);
_local7 = (_local4.length - 1);
while (_local7 > 0) {
if (_local4[_local7].length == 0){
_local4[(_local7 - 1)].splice(_local2[_local7], 1);
};
_local7--;
};
if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){
_arg1[id] = null;
} else {
_local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local9);
};
};
};
}
private function commitCurrentState():void{
var _local1:Effect;
var _local2:String;
var _local3:StateChangeEvent;
var _local4:String;
var _local5:State;
_local1 = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null;
_local2 = findCommonBaseState(_currentState, requestedCurrentState);
_local4 = (_currentState) ? _currentState : "";
_local5 = getState(requestedCurrentState);
if (_currentTransitionEffect){
_currentTransitionEffect.end();
};
initializeState(requestedCurrentState);
if (_local1){
_local1.captureStartValues();
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
_local3.oldState = _local4;
_local3.newState = (requestedCurrentState) ? requestedCurrentState : "";
dispatchEvent(_local3);
if (isBaseState(_currentState)){
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
};
removeState(_currentState, _local2);
_currentState = requestedCurrentState;
if (isBaseState(currentState)){
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
} else {
applyState(_currentState, _local2);
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
_local3.oldState = _local4;
_local3.newState = (_currentState) ? _currentState : "";
dispatchEvent(_local3);
if (_local1){
UIComponentGlobals.layoutManager.validateNow();
_currentTransitionEffect = _local1;
_local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler);
_local1.play();
};
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
final mx_internal function set $x(_arg1:Number):void{
super.x = _arg1;
}
private function applyState(_arg1:String, _arg2:String):void{
var _local3:State;
var _local4:Array;
var _local5:int;
_local3 = getState(_arg1);
if (_local3){
if (_local3.basedOn != _arg2){
applyState(_local3.basedOn, _arg2);
};
_local4 = _local3.overrides;
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5].apply(this);
_local5++;
};
_local3.dispatchEnterState();
};
}
override public function get width():Number{
return (_width);
}
public function effectStarted(_arg1:EffectInstance):void{
var _local2:Array;
var _local3:int;
var _local4:String;
_effectsStarted.push(_arg1);
_local2 = _arg1.effect.getAffectedProperties();
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_affectedProperties[_local4] == undefined){
_affectedProperties[_local4] = [];
};
_affectedProperties[_local4].push(_arg1);
_local3++;
};
isEffectStarted = true;
}
protected function commitProperties():void{
var _local1:Number;
var _local2:Number;
if (_scaleX != oldScaleX){
_local1 = Math.abs((_scaleX / oldScaleX));
if (!isNaN(explicitMinWidth)){
explicitMinWidth = (explicitMinWidth * _local1);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local1);
};
if (!isNaN(explicitMaxWidth)){
explicitMaxWidth = (explicitMaxWidth * _local1);
};
_width = (_width * _local1);
super.scaleX = (oldScaleX = _scaleX);
};
if (_scaleY != oldScaleY){
_local2 = Math.abs((_scaleY / oldScaleY));
if (!isNaN(explicitMinHeight)){
explicitMinHeight = (explicitMinHeight * _local2);
};
if (!isNaN(explicitHeight)){
explicitHeight = (explicitHeight * _local2);
};
if (!isNaN(explicitMaxHeight)){
explicitMaxHeight = (explicitMaxHeight * _local2);
};
_height = (_height * _local2);
super.scaleY = (oldScaleY = _scaleY);
};
if (((!((x == oldX))) || (!((y == oldY))))){
dispatchMoveEvent();
};
if (((!((width == oldWidth))) || (!((height == oldHeight))))){
dispatchResizeEvent();
};
if (errorStringChanged){
errorStringChanged = false;
setBorderColorForErrorString();
};
}
public function get percentHeight():Number{
return (_percentHeight);
}
final mx_internal function get $parent():DisplayObjectContainer{
return (super.parent);
}
public function set explicitMinWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMinWidth == _arg1){
return;
};
_explicitMinWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinWidthChanged"));
}
public function get isPopUp():Boolean{
return (_isPopUp);
}
private function measureSizes():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = false;
if (!invalidateSizeFlag){
return (_local1);
};
if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){
_local4 = Math.abs(scaleX);
_local5 = Math.abs(scaleY);
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth / _local4);
_measuredWidth = (_measuredWidth / _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight / _local5);
_measuredHeight = (_measuredHeight / _local5);
};
measure();
invalidateSizeFlag = false;
if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){
measuredWidth = explicitMinWidth;
};
if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){
measuredWidth = explicitMaxWidth;
};
if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){
measuredHeight = explicitMinHeight;
};
if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){
measuredHeight = explicitMaxHeight;
};
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth * _local4);
_measuredWidth = (_measuredWidth * _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight * _local5);
_measuredHeight = (_measuredHeight * _local5);
};
} else {
invalidateSizeFlag = false;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
};
adjustSizesForScaleChanges();
if (isNaN(oldMinWidth)){
oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
_local1 = true;
} else {
_local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
if (_local3 != oldMinWidth){
oldMinWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
if (_local3 != oldMinHeight){
oldMinHeight = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
if (_local3 != oldExplicitWidth){
oldExplicitWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
if (_local3 != oldExplicitHeight){
oldExplicitHeight = _local3;
_local1 = true;
};
};
return (_local1);
}
public function get automationTabularData():Object{
if (automationDelegate){
return (automationDelegate.automationTabularData);
};
return (null);
}
public function validateNow():void{
UIComponentGlobals.layoutManager.validateClient(this);
}
public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
}
public function get repeaters():Array{
return ((_repeaters) ? _repeaters.slice(0) : []);
}
private function dispatchMoveEvent():void{
var _local1:MoveEvent;
_local1 = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:DisplayObject;
var _local3:Sprite;
var _local4:DisplayObjectContainer;
var _local5:Class;
if (!parent){
return;
};
_local2 = getFocusObject();
_local3 = (focusManager) ? focusManager.focusPane : null;
if (((_arg1) && (!(isEffectStarted)))){
_local4 = _local3.parent;
if (_local4 != parent){
if (_local4){
if ((_local4 is ISystemManager)){
ISystemManager(_local4).focusPane = null;
} else {
IUIComponent(_local4).focusPane = null;
};
};
if ((parent is ISystemManager)){
ISystemManager(parent).focusPane = _local3;
} else {
IUIComponent(parent).focusPane = _local3;
};
};
_local5 = getStyle("focusSkin");
if (((_local2) && (!((_local2 is _local5))))){
_local3.removeChild(_local2);
_local2 = null;
};
if (!_local2){
_local2 = new (_local5);
_local2.name = "focus";
_local3.addChild(_local2);
};
if ((_local2 is ILayoutManagerClient)){
ILayoutManagerClient(_local2).nestLevel = nestLevel;
};
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
addEventListener(MoveEvent.MOVE, focusObj_moveHandler);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
addEventListener(Event.REMOVED, focusObj_removedHandler, true);
_local2.visible = true;
hasFocusRect = true;
adjustFocusRect();
} else {
if (hasFocusRect){
if (_local2){
_local2.visible = false;
};
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler);
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
removeEventListener(Event.REMOVED, focusObj_removedHandler, true);
};
};
}
private function get indexedID():String{
var _local1:String;
var _local2:Array;
_local1 = id;
_local2 = instanceIndices;
if (_local2){
_local1 = (_local1 + (("[" + _local2.join("][")) + "]"));
};
return (_local1);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = (document) ? document : Application.application;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
} else {
if ((_arg1 is UITextField)){
UITextField(_arg1).nestLevel = (nestLevel + 1);
};
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
} else {
if ((((_arg1 is UITextField)) && (UITextField(_arg1).inheritingStyles))){
StyleProtoChain.initTextField(UITextField(_arg1));
};
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).initThemeColor();
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).stylesInitialized();
};
}
protected function initializationComplete():void{
processedDescriptors = true;
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
public function set repeaterIndices(_arg1:Array):void{
_repeaterIndices = _arg1;
}
private function focusObj_removedHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (_arg1.target != this){
return;
};
_local2 = getFocusObject();
if (_local2){
_local2.visible = false;
};
}
mx_internal function updateCallbacks():void{
if (invalidateDisplayListFlag){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
if (invalidateSizeFlag){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
if (invalidatePropertiesFlag){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
if (systemManager){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_systemManager.stage.invalidate();
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _local3:int;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if ((this is IRawChildrenContainer)){
_local2 = IRawChildrenContainer(this).rawChildren;
} else {
_local2 = IChildList(this);
};
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = (_local2.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
}
public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
return (null);
}
public function get minHeight():Number{
if (!isNaN(explicitMinHeight)){
return (explicitMinHeight);
};
return (measuredMinHeight);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:int;
var _local4:int;
var _local5:ISimpleStyleClient;
cachedTextFormat = null;
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
_local4++;
};
}
public function get contentMouseX():Number{
return (mouseX);
}
public function get contentMouseY():Number{
return (mouseY);
}
public function get tweeningProperties():Array{
return (_tweeningProperties);
}
public function set explicitMaxWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMaxWidth == _arg1){
return;
};
_explicitMaxWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxWidthChanged"));
}
public function set document(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:IUIComponent;
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as IUIComponent);
if (!_local4){
} else {
if ((((_local4.document == _document)) || ((_local4.document == Application.application)))){
_local4.document = _arg1;
};
};
_local3++;
};
_document = _arg1;
}
public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:IInvalidating;
if (_arg1){
_local2 = 0;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if ((_local3 is ILayoutManagerClient)){
(_local3 as ILayoutManagerClient).validateSize(true);
};
_local2++;
};
};
if (invalidateSizeFlag){
_local4 = measureSizes();
if (((_local4) && (includeInLayout))){
invalidateDisplayList();
_local5 = (parent as IInvalidating);
if (_local5){
_local5.invalidateSize();
_local5.invalidateDisplayList();
};
};
};
}
override public function dispatchEvent(_arg1:Event):Boolean{
if (dispatchEventHook != null){
dispatchEventHook(_arg1, this);
};
return (super.dispatchEvent(_arg1));
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
final mx_internal function get $height():Number{
return (super.height);
}
override public function set height(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitHeight != _arg1){
explicitHeight = _arg1;
invalidateSize();
};
if (_height != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_height = _arg1;
dispatchEvent(new Event("heightChanged"));
};
}
protected function attachOverlay():void{
addChild(overlay);
}
private function overlay_resizeHandler(_arg1:Event):void{
fillOverlay(overlay, overlayColor, null);
}
public function get numAutomationChildren():int{
if (automationDelegate){
return (automationDelegate.numAutomationChildren);
};
return (0);
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
public function localToContent(_arg1:Point):Point{
return (_arg1);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get parentApplication():Object{
var _local1:Object;
var _local2:UIComponent;
_local1 = systemManager.document;
if (_local1 == this){
_local2 = (_local1.systemManager.parent as UIComponent);
_local1 = (_local2) ? _local2.systemManager.document : null;
};
return (_local1);
}
private function removeState(_arg1:String, _arg2:String):void{
var _local3:State;
var _local4:Array;
var _local5:int;
_local3 = getState(_arg1);
if (_local3){
_local3.dispatchExitState();
_local4 = _local3.overrides;
_local5 = _local4.length;
while (_local5) {
_local4[(_local5 - 1)].remove(this);
_local5--;
};
if (_local3.basedOn != _arg2){
removeState(_local3.basedOn, _arg2);
};
};
}
public function setStyle(_arg1:String, _arg2):void{
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
if (_arg1 == "styleName"){
styleName = _arg2;
return;
};
if (EffectManager.getEventForEffectTrigger(_arg1) != ""){
EffectManager.setStyle(_arg1, this);
};
_local3 = StyleManager.isInheritingStyle(_arg1);
_local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED));
_local5 = !((getStyle(_arg1) == _arg2));
if (!_styleDeclaration){
_styleDeclaration = new CSSStyleDeclaration();
_styleDeclaration.setStyle(_arg1, _arg2);
if (_local4){
regenerateStyleCache(_local3);
};
} else {
_styleDeclaration.setStyle(_arg1, _arg2);
};
if (((_local4) && (_local5))){
styleChanged(_arg1);
notifyStyleChangeInChildren(_arg1, _local3);
};
}
public function get validationSubField():String{
return (_validationSubField);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (!_systemManager){
_local1 = root;
if (_local1){
_systemManager = (_local1 as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
};
_local2 = _local2.parent;
};
};
};
return (_systemManager);
}
public function get showInAutomationHierarchy():Boolean{
return (_showInAutomationHierarchy);
}
private function isBaseState(_arg1:String):Boolean{
return (((!(_arg1)) || ((_arg1 == ""))));
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1)));
};
addingChild(_arg1);
$addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
cachedTextFormat = null;
invalidateDisplayList();
dispatchEvent(new Event("enabledChanged"));
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
private function setFocusLater(_arg1:Event=null):void{
var _local2:ISystemManager;
_local2 = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater);
if (UIComponentGlobals.nextFocusObject){
_local2.stage.focus = UIComponentGlobals.nextFocusObject;
};
UIComponentGlobals.nextFocusObject = null;
};
}
public function get currentState():String{
return ((_currentStateChanged) ? requestedCurrentState : _currentState);
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get baselinePosition():Number{
return (NaN);
}
public function set cachePolicy(_arg1:String):void{
if (_cachePolicy != _arg1){
_cachePolicy = _arg1;
if (_arg1 == UIComponentCachePolicy.OFF){
cacheAsBitmap = false;
} else {
if (_arg1 == UIComponentCachePolicy.ON){
cacheAsBitmap = true;
} else {
cacheAsBitmap = (cacheAsBitmapCount > 0);
};
};
};
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([]);
}
public function set instanceIndices(_arg1:Array):void{
_instanceIndices = _arg1;
}
public function get repeaterIndex():int{
return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1);
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
override public function set alpha(_arg1:Number):void{
super.alpha = _arg1;
dispatchEvent(new Event("alphaChanged"));
}
public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{
if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){
_instanceIndices = _arg1.instanceIndices;
_repeaters = _arg1.repeaters;
_repeaterIndices = _arg1.repeaterIndices;
};
}
public function get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth);
}
private function removedHandler(_arg1:Event):void{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is Container)) && (Container(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
}
public function callLater(_arg1:Function, _arg2:Array=null):void{
var _local3:ISystemManager;
methodQueue.push(new MethodQueueElement(_arg1, _arg2));
_local3 = systemManager;
if (((_local3) && (_local3.stage))){
if (!listeningForRender){
_local3.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_local3.stage.invalidate();
};
}
private function addedHandler(_arg1:Event):void{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is Container)) && (Container(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
}
public function get initialized():Boolean{
return (_initialized);
}
private function callLaterDispatcher2(_arg1:Event):void{
var _local2:ISystemManager;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:MethodQueueElement;
if (UIComponentGlobals.callLaterSuspendCount > 0){
return;
};
_local2 = systemManager;
if (((((_local2) && (_local2.stage))) && (listeningForRender))){
_local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
_local3 = methodQueue;
methodQueue = [];
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = MethodQueueElement(_local3[_local5]);
_local6.method.apply(null, _local6.args);
_local5++;
};
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureHTMLText(_arg1));
}
public function set descriptor(_arg1:UIComponentDescriptor):void{
_descriptor = _arg1;
}
private function getState(_arg1:String):State{
var _local2:int;
if (((!(states)) || (isBaseState(_arg1)))){
return (null);
};
_local2 = 0;
while (_local2 < states.length) {
if (states[_local2].name == _arg1){
return (states[_local2]);
};
_local2++;
};
if (resourceStateUndefined == null){
loadResources();
};
throw (new ArgumentError(StringUtil.substitute(resourceStateUndefined, _arg1)));
}
mx_internal function get documentDescriptor():UIComponentDescriptor{
return (_documentDescriptor);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("includeInLayoutChanged"));
};
}
public function getClassStyleDeclarations():Array{
var myApplicationDomain:ApplicationDomain;
var factory:IFlexModuleFactory;
var className:String;
var cache:Array;
var decls:Array;
var classNames:Array;
var caches:Array;
var declcache:Array;
var myRoot:DisplayObject;
var s:CSSStyleDeclaration;
factory = ModuleManager.getAssociatedFactory(this);
if (factory != null){
myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
} else {
myRoot = SystemManager.getSWFRoot(this);
if (!myRoot){
return ([]);
};
myApplicationDomain = myRoot.loaderInfo.applicationDomain;
};
className = getQualifiedClassName(this);
className = className.replace("::", ".");
cache = StyleManager.typeSelectorCache[className];
if (cache){
return (cache);
};
decls = [];
classNames = [];
caches = [];
declcache = [];
while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) {
cache = StyleManager.typeSelectorCache[className];
if (cache){
decls = decls.concat(cache);
break;
};
s = StyleManager.getStyleDeclaration(className);
if (s){
decls.unshift(s);
classNames.push(className);
caches.push(classNames);
declcache.push(decls);
decls = [];
classNames = [];
} else {
classNames.push(className);
};
try {
className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
className = className.replace("::", ".");
} catch(e:ReferenceError) {
className = null;
};
};
caches.push(classNames);
declcache.push(decls);
decls = [];
while (caches.length) {
classNames = caches.pop();
decls = decls.concat(declcache.pop());
while (classNames.length) {
StyleManager.typeSelectorCache[classNames.pop()] = decls;
};
};
return (decls);
}
public function validateProperties():void{
if (invalidatePropertiesFlag){
commitProperties();
invalidatePropertiesFlag = false;
};
}
public function set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
$removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
private function initializeState(_arg1:String):void{
var _local2:State;
_local2 = getState(_arg1);
while (_local2) {
_local2.initialize();
_local2 = getState(_local2.basedOn);
};
}
private function focusObj_moveHandler(_arg1:MoveEvent):void{
adjustFocusRect();
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_styleDeclaration);
}
override public function get doubleClickEnabled():Boolean{
return (super.doubleClickEnabled);
}
mx_internal function initProtoChain():void{
var _local1:CSSStyleDeclaration;
var _local2:Object;
var _local3:IStyleClient;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:CSSStyleDeclaration;
if (styleName){
if ((styleName is CSSStyleDeclaration)){
_local1 = CSSStyleDeclaration(styleName);
} else {
if ((styleName is IFlexDisplayObject)){
StyleProtoChain.initProtoChainForUIComponentStyleName(this);
return;
};
if ((styleName is String)){
_local1 = StyleManager.getStyleDeclaration(("." + styleName));
};
};
};
_local2 = StyleManager.stylesRoot;
if (((_local2) && (_local2.effects))){
registerEffects(_local2.effects);
};
_local3 = (parent as IStyleClient);
if (_local3){
_local7 = _local3.inheritingStyles;
if (_local7 == UIComponent.STYLE_UNINITIALIZED){
_local7 = _local2;
};
} else {
if (isPopUp){
_local7 = Application.application.inheritingStyles;
} else {
_local7 = StyleManager.stylesRoot;
};
};
_local4 = getClassStyleDeclarations();
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_local7 = _local8.addStyleToProtoChain(_local7, this);
_local2 = _local8.addStyleToProtoChain(_local2, this);
if (_local8.effects){
registerEffects(_local8.effects);
};
_local6++;
};
if (_local1){
_local7 = _local1.addStyleToProtoChain(_local7, this);
_local2 = _local1.addStyleToProtoChain(_local2, this);
if (_local1.effects){
registerEffects(_local1.effects);
};
};
inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7;
nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2;
}
public function get repeaterIndices():Array{
return ((_repeaterIndices) ? _repeaterIndices.slice() : []);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (_currentStateChanged){
_currentStateChanged = false;
commitCurrentState();
validateNow();
};
removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2)));
};
super.setChildIndex(_arg1, _arg2);
}
public function set measuredHeight(_arg1:Number):void{
_measuredHeight = _arg1;
}
protected function createChildren():void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
initProtoChain();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IStyleClient)){
if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
IStyleClient(_local5).regenerateStyleCache(_arg1);
};
} else {
if ((_local5 is UITextField)){
if (UITextField(_local5).inheritingStyles){
StyleProtoChain.initTextField(UITextField(_local5));
};
};
};
_local4++;
};
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus(DisplayObject(_arg1.target))){
drawFocus(false);
};
}
public function contentToLocal(_arg1:Point):Point{
return (_arg1);
}
public function getFocus():InteractiveObject{
var _local1:ISystemManager;
_local1 = systemManager;
if (!_local1){
return (null);
};
if (UIComponentGlobals.nextFocusObject){
return (UIComponentGlobals.nextFocusObject);
};
return (_local1.stage.focus);
}
public function endEffectsStarted():void{
var _local1:int;
var _local2:int;
_local1 = _effectsStarted.length;
_local2 = 0;
while (_local2 < _local1) {
_effectsStarted[_local2].end();
_local2++;
};
}
protected function get unscaledHeight():Number{
return ((height / Math.abs(scaleY)));
}
public function get enabled():Boolean{
return (_enabled);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
cacheAsBitmapCount = (_arg1) ? 1 : 0;
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
mx_internal function removeOverlay():void{
if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){
removeEventListener("resize", overlay_resizeHandler);
if (super.getChildByName("overlay")){
$removeChild(overlay);
};
overlay = null;
};
}
public function set cacheHeuristic(_arg1:Boolean):void{
if (_cachePolicy == UIComponentCachePolicy.AUTO){
if (_arg1){
cacheAsBitmapCount++;
} else {
if (cacheAsBitmapCount != 0){
cacheAsBitmapCount--;
};
};
super.cacheAsBitmap = !((cacheAsBitmapCount == 0));
};
}
public function get cachePolicy():String{
return (_cachePolicy);
}
public function set maxHeight(_arg1:Number):void{
if (explicitMaxHeight == _arg1){
return;
};
explicitMaxHeight = _arg1;
}
public function set focusManager(_arg1:IFocusManager):void{
_focusManager = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function get descriptor():UIComponentDescriptor{
return (_descriptor);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (_measuredMinWidth);
}
public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:PropertyChangeEvent;
var _local7:Object;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = this;
} else {
_local3 = _arg1[id];
if (!(_local3 is Array)){
_local3 = (_arg1[id] = []);
};
_local4 = _local2.length;
_local5 = 0;
while (_local5 < (_local4 - 1)) {
_local7 = _local3[_local2[_local5]];
if (!(_local7 is Array)){
_local7 = (_local3[_local2[_local5]] = []);
};
_local3 = _local7;
_local5++;
};
_local3[_local2[(_local4 - 1)]] = this;
_local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local6);
};
};
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
override public function set width(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitWidth != _arg1){
explicitWidth = _arg1;
invalidateSize();
};
if (_width != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
};
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function get repeater():IRepeater{
return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null);
}
public function initialize():void{
if (initialized){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
createChildren();
childrenCreated();
initializeAccessibility();
initializationComplete();
}
public function set percentHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
final mx_internal function set $visible(_arg1:Boolean):void{
super.visible = _arg1;
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
private function findCommonBaseState(_arg1:String, _arg2:String):String{
var _local3:State;
var _local4:State;
var _local5:Array;
var _local6:Array;
var _local7:String;
_local3 = getState(_arg1);
_local4 = getState(_arg2);
if (((!(_local3)) || (!(_local4)))){
return ("");
};
if (((isBaseState(_local3.basedOn)) || (isBaseState(_local4.basedOn)))){
return ("");
};
_local5 = getBaseStates(_local3);
_local6 = getBaseStates(_local4);
_local7 = "";
while (_local5[_local5.length] == _local6[_local6.length]) {
_local7 = _local5.pop();
_local6.pop();
if (((!(_local5.length)) || (!(_local6.length)))){
break;
};
};
return (_local7);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
if (IUIComponent(_arg1).document != _arg1){
IUIComponent(_arg1).document = null;
};
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
public function get maxHeight():Number{
return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight);
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
if (_focusManager){
return (_focusManager);
};
_local1 = parent;
while (_local1) {
if ((_local1 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local1).focusManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){
return;
};
regenerateStyleCache(true);
initThemeColor();
styleChanged("styleName");
notifyStyleChangeInChildren("styleName", true);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function set explicitMaxHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMaxHeight == _arg1){
return;
};
_explicitMaxHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxHeightChanged"));
}
mx_internal function cancelAllCallLaters():void{
var _local1:ISystemManager;
_local1 = systemManager;
if (((_local1) && (_local1.stage))){
if (listeningForRender){
_local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local1.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
};
methodQueue.splice(0);
}
private function updateCompleteHandler(_arg1:Event):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
processEffectFinished(_endingEffectInstances);
_endingEffectInstances = [];
}
public function styleChanged(_arg1:String):void{
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateSize();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){
initThemeColor();
};
invalidateDisplayList();
if ((parent is IInvalidating)){
if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateSize();
};
if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateDisplayList();
};
};
}
final mx_internal function get $visible():Boolean{
return (super.visible);
}
public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{
var _local12:Graphics;
var _local13:Number;
var _local14:Array;
var _local15:Matrix;
var _local16:Object;
_local12 = graphics;
if (((!(_arg3)) || (!(_arg4)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is Array)){
if ((_arg7 is Array)){
_local14 = (_arg7 as Array);
} else {
_local14 = [_arg7, _arg7];
};
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local15 = null;
if (_arg8){
if ((_arg8 is Matrix)){
_local15 = Matrix(_arg8);
} else {
_local15 = new Matrix();
if ((_arg8 is Number)){
_local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2);
} else {
_local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y);
};
};
};
if (_arg9 == GradientType.RADIAL){
_local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15);
} else {
_local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15);
};
} else {
_local12.beginFill(Number(_arg6), Number(_arg7));
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local16 = _arg11.r;
if ((_local16 is Number)){
_local13 = (Number(_local16) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function move(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_arg1 != super.x){
super.x = _arg1;
dispatchEvent(new Event("xChanged"));
_local3 = true;
};
if (_arg2 != super.y){
super.y = _arg2;
dispatchEvent(new Event("yChanged"));
_local3 = true;
};
if (_local3){
dispatchMoveEvent();
};
}
public function set toolTip(_arg1:String):void{
ToolTipManager.registerToolTip(this, _arg1);
_toolTip = _arg1;
dispatchEvent(new Event("toolTipChanged"));
}
public function set repeaters(_arg1:Array):void{
_repeaters = _arg1;
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function get styleName():Object{
return (_styleName);
}
private function loadResources():void{
resourceStateUndefined = packageResources.getString("stateUndefined");
}
public function set explicitWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
public function get parentDocument():Object{
var _local1:IUIComponent;
var _local2:ISystemManager;
if (document == this){
_local1 = (parent as IUIComponent);
if (_local1){
return (_local1.document);
};
_local2 = (parent as ISystemManager);
if (_local2){
return (_local2.document);
};
return (null);
//unresolved jump
};
return (document);
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
protected function childrenCreated():void{
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
private function setBorderColorForErrorString():void{
var _local1:IFocusManager;
var _local2:DisplayObject;
if (((!(_errorString)) || ((_errorString.length == 0)))){
setStyle("borderColor", origBorderColor);
saveBorderColor = true;
} else {
if (saveBorderColor){
saveBorderColor = false;
origBorderColor = getStyle("borderColor");
};
setStyle("borderColor", getStyle("errorColor"));
};
styleChanged("themeColor");
_local1 = focusManager;
_local2 = (_local1) ? DisplayObject(_local1.getFocus()) : null;
if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){
drawFocus(true);
};
}
public function measureText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureText(_arg1));
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
if (!invalidateSizeFlag){
invalidateSizeFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
};
}
override public function set filters(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:IEventDispatcher;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.removeEventListener("change", filterChangeHandler);
};
_local3++;
};
};
_filters = _arg1;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.addEventListener("change", filterChangeHandler);
};
_local3++;
};
};
super.filters = _filters;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
override public function get filters():Array{
return ((_filters) ? _filters : super.filters);
}
public static function resumeBackgroundProcessing():void{
var _local1:SystemManager;
if (UIComponentGlobals.callLaterSuspendCount > 0){
UIComponentGlobals.callLaterSuspendCount--;
if (UIComponentGlobals.callLaterSuspendCount == 0){
_local1 = SystemManagerGlobals.topLevelSystemManagers[0];
if (((_local1) && (_local1.stage))){
_local1.stage.invalidate();
};
};
};
}
public static function suspendBackgroundProcessing():void{
UIComponentGlobals.callLaterSuspendCount++;
}
}
}//package mx.core
class MethodQueueElement {
public var method:Function;
public var args:Array;
private function MethodQueueElement(_arg1:Function, _arg2:Array=null){
this.method = _arg1;
this.args = _arg2;
}
}
Section 141
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy)
package mx.core {
public final class UIComponentCachePolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OFF:String = "off";
}
}//package mx.core
Section 142
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
public var effects:Array;
public var stylesFactory:Function;
mx_internal var instanceIndices:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 143
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
}
}//package mx.core
Section 144
//UITextField (mx.core.UITextField)
package mx.core {
import mx.automation.*;
import flash.events.*;
import flash.display.*;
import mx.managers.*;
import mx.styles.*;
import flash.text.*;
import mx.resources.*;
import flash.system.*;
import flash.utils.*;
import mx.utils.*;
public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent {
private var _initialized:Boolean;// = false
private var invalidateDisplayListFlag:Boolean;// = true
mx_internal var explicitColor:uint;// = 4294967295
private var _processedDescriptors:Boolean;// = true
private var explicitHTMLText:String;// = null
private var _owner:DisplayObjectContainer;
mx_internal var _parent:DisplayObjectContainer;
mx_internal var styleChangedFlag:Boolean;// = true
private var _explicitWidth:Number;
private var _enabled:Boolean;// = true
private var cachedTextFormat:TextFormat;
private var _automationDelegate:IAutomationObject;
private var _automationName:String;
private var _document:Object;
private var _styleName:Object;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _toolTip:String;
private var _nonInheritingStyles:Object;
private var _moduleFactory:IFlexModuleFactory;
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
private var _updateCompletePendingFlag:Boolean;// = false
private var _imeMode:String;// = null
private var _ignorePadding:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
mx_internal static const TEXT_WIDTH_PADDING:int = 5;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
private static var resourceTruncationIndicator:String;
public function UITextField(){
invalidateDisplayListFlag = true;
styleChangedFlag = true;
explicitHTMLText = null;
explicitColor = StyleManager.NOT_A_COLOR;
_enabled = true;
_ignorePadding = true;
_imeMode = null;
_includeInLayout = true;
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_initialized = false;
_nestLevel = 0;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_processedDescriptors = true;
_updateCompletePendingFlag = false;
super();
focusRect = false;
selectable = false;
tabEnabled = false;
addEventListener(Event.CHANGE, changeHandler);
addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
StyleProtoChain.initTextField(this);
styleChangedFlag = true;
validateNow();
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function setColor(_arg1:uint):void{
explicitColor = _arg1;
styleChangedFlag = true;
invalidateDisplayListFlag = true;
validateNow();
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
private function creatingSystemManager():ISystemManager{
return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager);
}
public function set tweeningProperties(_arg1:Array):void{
}
public function invalidateDisplayList():void{
invalidateDisplayListFlag = true;
}
public function get focusPane():Sprite{
return (null);
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function getTextStyles():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.align = getStyle("textAlign");
_local1.bold = (getStyle("fontWeight") == "bold");
if (enabled){
if (explicitColor == StyleManager.NOT_A_COLOR){
_local1.color = getStyle("color");
} else {
_local1.color = explicitColor;
};
} else {
_local1.color = getStyle("disabledColor");
};
_local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
_local1.indent = getStyle("textIndent");
_local1.italic = (getStyle("fontStyle") == "italic");
_local1.kerning = getStyle("kerning");
_local1.leading = getStyle("leading");
_local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft");
_local1.letterSpacing = getStyle("letterSpacing");
_local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight");
_local1.size = getStyle("fontSize");
_local1.underline = (getStyle("textDecoration") == "underline");
cachedTextFormat = _local1;
return (_local1);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get percentWidth():Number{
return (NaN);
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
return (null);
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (width != _arg1){
width = _arg1;
};
if (height != _arg2){
height = _arg2;
};
}
public function set focusPane(_arg1:Sprite):void{
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
return (null);
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function invalidateProperties():void{
}
public function get explicitMinWidth():Number{
return (NaN);
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
}
public function set systemManager(_arg1:ISystemManager):void{
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set percentWidth(_arg1:Number):void{
}
public function get imeMode():String{
return (_imeMode);
}
public function get document():Object{
return (_document);
}
public function get explicitMaxWidth():Number{
return (NaN);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
private function changeHandler(_arg1:Event):void{
explicitHTMLText = null;
}
override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{
if (styleSheet){
return;
};
super.setTextFormat(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textFormatChange"));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function setFocus():void{
systemManager.stage.focus = this;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
public function owns(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
this.visible = _arg1;
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function get isPopUp():Boolean{
return (false);
}
public function get percentHeight():Number{
return (NaN);
}
public function truncateToFit(_arg1:String=null):Boolean{
var _local2:String;
var _local3:Number;
var _local4:String;
if (!_arg1){
_arg1 = resourceTruncationIndicator;
};
validateNow();
_local2 = super.text;
_local3 = width;
if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))){
var _local5 = _local2;
super.text = _local5;
_local4 = _local5;
_local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length)));
while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) {
_local4 = _local4.slice(0, -1);
super.text = (_local4 + _arg1);
};
return (true);
};
return (false);
}
public function validateNow():void{
var _local1:TextFormat;
var _local2:ISystemManager;
if (!parent){
return;
};
if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){
super.width = ((explicitWidth)>4) ? explicitWidth : 4;
};
if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){
super.height = explicitHeight;
};
if (styleChangedFlag){
_local1 = getTextStyles();
_local2 = creatingSystemManager();
embedFonts = (_local1.font) ? ((!((_local2 == null))) && (_local2.isFontFaceEmbedded(_local1))) : getStyle("embedFonts");
antiAliasType = getStyle("fontAntiAliasType");
gridFitType = getStyle("fontGridFitType");
sharpness = getStyle("fontSharpness");
thickness = getStyle("fontThickness");
if (!styleSheet){
super.setTextFormat(_local1);
defaultTextFormat = _local1;
};
dispatchEvent(new Event("textFieldStyleChange"));
};
styleChangedFlag = false;
invalidateDisplayListFlag = false;
}
public function get ignorePadding():Boolean{
return (_ignorePadding);
}
public function get automationTabularData():Object{
return (null);
}
private function textFieldStyleChangeHandler(_arg1:Event):void{
if (explicitHTMLText != null){
super.htmlText = explicitHTMLText;
};
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function get measuredMinHeight():Number{
return (0);
}
public function get minHeight():Number{
return (0);
}
public function get tweeningProperties():Array{
return (null);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
public function get explicitMinHeight():Number{
return (NaN);
}
override public function set text(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((!(isHTML)) && ((super.text == _arg1)))){
return;
};
super.text = _arg1;
explicitHTMLText = null;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function get numAutomationChildren():int{
return (0);
}
public function setStyle(_arg1:String, _arg2):void{
}
public function get showInAutomationHierarchy():Boolean{
return (true);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:IUIComponent;
_local1 = parent;
while (_local1) {
_local2 = (_local1 as IUIComponent);
if (_local2){
return (_local2.systemManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function get baselinePosition():Number{
var _local1:TextLineMetrics;
_local1 = getLineMetrics(0);
return (((height - 4) - _local1.descent));
}
public function set enabled(_arg1:Boolean):void{
mouseEnabled = _arg1;
_enabled = _arg1;
styleChanged("color");
}
public function get minWidth():Number{
return (0);
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([""]);
}
public function get measuredWidth():Number{
validateNow();
return ((textWidth + TEXT_WIDTH_PADDING));
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get maxWidth():Number{
return (UIComponent.DEFAULT_MAX_WIDTH);
}
public function get initialized():Boolean{
return (_initialized);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
override public function set htmlText(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((isHTML) && ((super.htmlText == _arg1)))){
return;
};
if (((cachedTextFormat) && ((styleSheet == null)))){
defaultTextFormat = cachedTextFormat;
};
super.htmlText = _arg1;
explicitHTMLText = _arg1;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function set measuredMinWidth(_arg1:Number):void{
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
public function get enabled():Boolean{
return (_enabled);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (0);
}
public function set isPopUp(_arg1:Boolean):void{
}
public function get measuredHeight():Number{
validateNow();
return ((textHeight + TEXT_HEIGHT_PADDING));
}
public function getUITextFormat():UITextFormat{
var _local1:UITextFormat;
validateNow();
_local1 = new UITextFormat(creatingSystemManager());
_local1.copyFrom(getTextFormat());
_local1.antiAliasType = antiAliasType;
_local1.gridFitType = gridFitType;
_local1.sharpness = sharpness;
_local1.thickness = thickness;
return (_local1);
}
public function initialize():void{
}
public function set percentHeight(_arg1:Number):void{
}
public function get maxHeight():Number{
return (UIComponent.DEFAULT_MAX_HEIGHT);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (parent){
StyleProtoChain.initTextField(this);
styleChanged("styleName");
};
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function set ignorePadding(_arg1:Boolean):void{
_ignorePadding = _arg1;
styleChanged(null);
}
public function set toolTip(_arg1:String):void{
ToolTipManager.registerToolTip(this, _arg1);
_toolTip = _arg1;
}
public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
UIComponent(parent).callLater(validateNow);
};
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
public function get explicitMaxHeight():Number{
return (NaN);
}
public function invalidateSize():void{
invalidateDisplayListFlag = true;
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function move(_arg1:Number, _arg2:Number):void{
if (this.x != _arg1){
this.x = _arg1;
};
if (this.y != _arg2){
this.y = _arg2;
};
}
public function get toolTip():String{
return (_toolTip);
}
public function set measuredMinHeight(_arg1:Number):void{
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function getStyle(_arg1:String){
if (StyleManager.inheritingStyles[_arg1]){
return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
//unresolved jump
};
return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
}
public function get styleName():Object{
return (_styleName);
}
private static function loadResources():void{
resourceTruncationIndicator = packageResources.getString("truncationIndicator");
}
loadResources();
}
}//package mx.core
Section 145
//UITextFormat (mx.core.UITextFormat)
package mx.core {
import mx.managers.*;
import flash.text.*;
public class UITextFormat extends TextFormat {
public var sharpness:Number;
public var gridFitType:String;
public var antiAliasType:String;
public var thickness:Number;
private var systemManager:ISystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
private static var measurementTextField:TextField;
public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){
this.systemManager = _arg1;
super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14);
}
public function measureText(_arg1:String):TextLineMetrics{
return (measure(_arg1, false));
}
mx_internal function copyFrom(_arg1:TextFormat):void{
font = _arg1.font;
size = _arg1.size;
color = _arg1.color;
bold = _arg1.bold;
italic = _arg1.italic;
underline = _arg1.underline;
url = _arg1.url;
target = _arg1.target;
align = _arg1.align;
leftMargin = _arg1.leftMargin;
rightMargin = _arg1.rightMargin;
indent = _arg1.indent;
leading = _arg1.leading;
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (measure(_arg1, true));
}
private function measure(_arg1:String, _arg2:Boolean):TextLineMetrics{
var _local3:ISystemManager;
var _local4:TextLineMetrics;
if (!_arg1){
_arg1 = "";
};
if (!measurementTextField){
measurementTextField = new TextField();
};
if (_arg2){
measurementTextField.htmlText = "";
} else {
measurementTextField.text = "";
};
measurementTextField.defaultTextFormat = this;
_local3 = systemManager;
if (font){
measurementTextField.embedFonts = ((!((_local3 == null))) && (_local3.isFontFaceEmbedded(this)));
} else {
measurementTextField.embedFonts = false;
};
measurementTextField.antiAliasType = antiAliasType;
measurementTextField.gridFitType = gridFitType;
measurementTextField.sharpness = sharpness;
measurementTextField.thickness = thickness;
if (_arg2){
measurementTextField.htmlText = _arg1;
} else {
measurementTextField.text = _arg1;
};
_local4 = measurementTextField.getLineMetrics(0);
_local4.width = Math.ceil(_local4.width);
_local4.height = Math.ceil(_local4.height);
return (_local4);
}
}
}//package mx.core
Section 146
//Linear (mx.effects.easing.Linear)
package mx.effects.easing {
public class Linear {
mx_internal static const VERSION:String = "2.0.1.0";
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package mx.effects.easing
Section 147
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class AddRemoveEffectTargetFilter extends EffectTargetFilter {
public var add:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function AddRemoveEffectTargetFilter(){
add = true;
super();
filterProperties = ["parent"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
if (add){
return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null)))));
};
return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null))));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 148
//BlurInstance (mx.effects.effectClasses.BlurInstance)
package mx.effects.effectClasses {
import flash.events.*;
import flash.filters.*;
public class BlurInstance extends TweenEffectInstance {
public var blurXFrom:Number;
public var blurXTo:Number;
public var blurYFrom:Number;
public var blurYTo:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function BlurInstance(_arg1:Object){
super(_arg1);
}
override public function play():void{
super.play();
if (isNaN(blurXFrom)){
blurXFrom = 4;
};
if (isNaN(blurXTo)){
blurXTo = 0;
};
if (isNaN(blurYFrom)){
blurYFrom = 4;
};
if (isNaN(blurYTo)){
blurYTo = 0;
};
tween = createTween(this, [blurXFrom, blurYFrom], [blurXTo, blurYTo], duration);
}
override public function onTweenEnd(_arg1:Object):void{
setBlurFilter(_arg1[0], _arg1[1]);
super.onTweenEnd(_arg1);
}
override public function onTweenUpdate(_arg1:Object):void{
setBlurFilter(_arg1[0], _arg1[1]);
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
}
private function setBlurFilter(_arg1:Number, _arg2:Number):void{
var _local3:Array;
var _local4:int;
var _local5:int;
_local3 = target.filters;
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
if ((_local3[_local5] is BlurFilter)){
_local3.splice(_local5, 1);
};
_local5++;
};
if (((_arg1) || (_arg2))){
_local3.push(new BlurFilter(_arg1, _arg2));
};
target.filters = _local3;
}
}
}//package mx.effects.effectClasses
Section 149
//CompositeEffectInstance (mx.effects.effectClasses.CompositeEffectInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.events.*;
import mx.effects.*;
public class CompositeEffectInstance extends EffectInstance {
mx_internal var activeEffectQueue:Array;
mx_internal var timerTween:Tween;
mx_internal var childSets:Array;
private var _playheadTime:Number;// = 0
mx_internal var endEffectCalled:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function CompositeEffectInstance(_arg1:Object){
activeEffectQueue = [];
_playheadTime = 0;
childSets = [];
super(_arg1);
}
override public function get playheadTime():Number{
return ((_playheadTime + super.playheadTime));
}
override public function finishEffect():void{
activeEffectQueue = null;
super.finishEffect();
}
override public function resume():void{
super.resume();
if (timerTween){
timerTween.resume();
};
}
override public function play():void{
timerTween = new Tween(this, 0, 0, durationWithoutRepeat);
super.play();
}
override mx_internal function playWithNoDuration():void{
super.playWithNoDuration();
end();
}
override mx_internal function get actualDuration():Number{
var _local1:Number;
_local1 = NaN;
if (repeatCount > 0){
_local1 = (((durationWithoutRepeat * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
mx_internal function get durationWithoutRepeat():Number{
return (0);
}
mx_internal function hasRotateInstance():Boolean{
var _local1:int;
var _local2:CompositeEffectInstance;
if (childSets){
_local1 = 0;
while (_local1 < childSets.length) {
if (childSets[_local1].length > 0){
_local2 = (childSets[_local1][0] as CompositeEffectInstance);
if ((((childSets[_local1][0] is RotateInstance)) || (((_local2) && (_local2.hasRotateInstance()))))){
return (true);
};
};
_local1++;
};
};
return (false);
}
mx_internal function effectEndHandler(_arg1:EffectEvent):void{
onEffectEnd(_arg1.effectInstance);
}
public function addChildSet(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1){
_local2 = _arg1.length;
if (_local2 > 0){
if (!childSets){
childSets = [_arg1];
} else {
childSets.push(_arg1);
};
_local3 = 0;
while (_local3 < _local2) {
_arg1[_local3].addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_arg1[_local3].parentCompositeEffectInstance = this;
_local3++;
};
};
};
}
protected function onEffectEnd(_arg1:IEffectInstance):void{
}
public function onTweenEnd(_arg1:Object):void{
_playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime;
}
public function onTweenUpdate(_arg1:Object):void{
_playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime;
}
override public function initEffect(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
super.initEffect(_arg1);
_local2 = childSets.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = childSets[_local3];
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local4[_local6].initEffect(_arg1);
_local6++;
};
_local3++;
};
}
override public function reverse():void{
super.reverse();
super.playReversed = !(playReversed);
if (timerTween){
timerTween.reverse();
};
}
override public function pause():void{
super.pause();
if (timerTween){
timerTween.pause();
};
}
}
}//package mx.effects.effectClasses
Section 150
//FadeInstance (mx.effects.effectClasses.FadeInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
public class FadeInstance extends TweenEffectInstance {
public var alphaFrom:Number;
private var restoreAlpha:Boolean;
public var alphaTo:Number;
private var origAlpha:Number;// = NAN
mx_internal static const VERSION:String = "2.0.1.0";
public function FadeInstance(_arg1:Object){
origAlpha = NaN;
super(_arg1);
}
override public function play():void{
var _local1:PropertyChanges;
super.play();
origAlpha = target.alpha;
_local1 = propertyChanges;
if (((isNaN(alphaFrom)) && (isNaN(alphaTo)))){
if (((_local1) && (!((_local1.end["alpha"] === undefined))))){
alphaFrom = origAlpha;
alphaTo = _local1.end["alpha"];
} else {
if (((_local1) && (!((_local1.end["visible"] === undefined))))){
alphaFrom = (_local1.start["visible"]) ? origAlpha : 0;
alphaTo = (_local1.end["visible"]) ? origAlpha : 0;
} else {
alphaFrom = 0;
alphaTo = origAlpha;
};
};
} else {
if (isNaN(alphaFrom)){
alphaFrom = ((alphaTo)==0) ? origAlpha : 0;
} else {
if (isNaN(alphaTo)){
if (((_local1) && (!((_local1.end["alpha"] === undefined))))){
alphaTo = _local1.end["alpha"];
} else {
alphaTo = ((alphaFrom)==0) ? origAlpha : 0;
};
};
};
};
tween = createTween(this, alphaFrom, alphaTo, duration);
target.alpha = tween.mx_internal::getCurrentValue(0);
}
override public function onTweenEnd(_arg1:Object):void{
super.onTweenEnd(_arg1);
if (((mx_internal::hideOnEffectEnd) || (restoreAlpha))){
target.alpha = origAlpha;
};
}
override public function onTweenUpdate(_arg1:Object):void{
target.alpha = _arg1;
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
switch (_arg1.type){
case "childrenCreationComplete":
case FlexEvent.CREATION_COMPLETE:
case FlexEvent.SHOW:
case Event.ADDED:
case "resizeEnd":
if (isNaN(alphaFrom)){
alphaFrom = 0;
};
if (isNaN(alphaTo)){
alphaTo = target.alpha;
};
break;
case FlexEvent.HIDE:
case Event.REMOVED:
case "resizeStart":
restoreAlpha = true;
if (isNaN(alphaFrom)){
alphaFrom = target.alpha;
};
if (isNaN(alphaTo)){
alphaTo = 0;
};
break;
};
}
}
}//package mx.effects.effectClasses
Section 151
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class HideShowEffectTargetFilter extends EffectTargetFilter {
public var show:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function HideShowEffectTargetFilter(){
show = true;
super();
filterProperties = ["visible"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
return ((_local5.end["visible"] == show));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 152
//MoveInstance (mx.effects.effectClasses.MoveInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class MoveInstance extends TweenEffectInstance {
public var xTo:Number;
private var right;
private var left;
private var bottom;
public var xFrom:Number;
private var oldHeight:Number;
private var top;
private var verticalCenter;
private var horizontalCenter;
public var yBy:Number;
public var yFrom:Number;
private var forceClipping:Boolean;// = false
private var oldWidth:Number;
public var yTo:Number;
private var checkClipping:Boolean;// = true
public var xBy:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function MoveInstance(_arg1:Object){
forceClipping = false;
checkClipping = true;
super(_arg1);
}
override public function play():void{
var _local1:Container;
var _local2:EdgeMetrics;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
super.play();
var _local9 = EffectManager;
_local9.mx_internal::startBitmapEffect(IUIComponent(target));
if (isNaN(xFrom)){
xFrom = (((!(isNaN(xTo))) && (!(isNaN(xBy))))) ? (xTo - xBy) : target.x;
};
if (isNaN(xTo)){
if (((((isNaN(xBy)) && (propertyChanges))) && (!((propertyChanges.end["x"] === undefined))))){
xTo = propertyChanges.end["x"];
} else {
xTo = (isNaN(xBy)) ? target.x : (xFrom + xBy);
};
};
if (isNaN(yFrom)){
yFrom = (((!(isNaN(yTo))) && (!(isNaN(yBy))))) ? (yTo - yBy) : target.y;
};
if (isNaN(yTo)){
if (((((isNaN(yBy)) && (propertyChanges))) && (!((propertyChanges.end["y"] === undefined))))){
yTo = propertyChanges.end["y"];
} else {
yTo = (isNaN(yBy)) ? target.y : (yFrom + yBy);
};
};
tween = createTween(this, [xFrom, yFrom], [xTo, yTo], duration);
_local1 = (target.parent as Container);
if (_local1){
_local2 = _local1.viewMetrics;
_local3 = _local2.left;
_local4 = (_local1.width - _local2.right);
_local5 = _local2.top;
_local6 = (_local1.height - _local2.bottom);
if ((((((((((((((((xFrom < _local3)) || ((xTo < _local3)))) || (((xFrom + target.width) > _local4)))) || (((xTo + target.width) > _local4)))) || ((yFrom < _local5)))) || ((yTo < _local5)))) || (((yFrom + target.height) > _local6)))) || (((yTo + target.height) > _local6)))){
forceClipping = true;
_local1.mx_internal::forceClipping = true;
};
};
mx_internal::applyTweenStartValues();
left = target.getStyle("left");
if (left != undefined){
target.setStyle("left", undefined);
};
right = target.getStyle("right");
if (right != undefined){
target.setStyle("right", undefined);
};
top = target.getStyle("top");
if (top != undefined){
target.setStyle("top", undefined);
};
bottom = target.getStyle("bottom");
if (bottom != undefined){
target.setStyle("bottom", undefined);
};
horizontalCenter = target.getStyle("horizontalCenter");
if (horizontalCenter != undefined){
target.setStyle("horizontalCenter", undefined);
};
verticalCenter = target.getStyle("verticalCenter");
if (verticalCenter != undefined){
target.setStyle("verticalCenter", undefined);
};
if (((!((left == undefined))) && (!((right == undefined))))){
_local7 = target.width;
oldWidth = target.explicitWidth;
target.width = _local7;
};
if (((!((top == undefined))) && (!((bottom == undefined))))){
_local8 = target.height;
oldHeight = target.explicitHeight;
target.height = _local8;
};
}
override public function onTweenEnd(_arg1:Object):void{
var _local2:Container;
var _local3 = EffectManager;
_local3.mx_internal::endBitmapEffect(IUIComponent(target));
if (left != undefined){
target.setStyle("left", left);
};
if (right != undefined){
target.setStyle("right", right);
};
if (top != undefined){
target.setStyle("top", top);
};
if (bottom != undefined){
target.setStyle("bottom", bottom);
};
if (horizontalCenter != undefined){
target.setStyle("horizontalCenter", horizontalCenter);
};
if (verticalCenter != undefined){
target.setStyle("verticalCenter", verticalCenter);
};
if (((!((left == undefined))) && (!((right == undefined))))){
target.explicitWidth = oldWidth;
};
if (((!((top == undefined))) && (!((bottom == undefined))))){
target.explicitHeight = oldHeight;
};
if (forceClipping){
_local2 = (target.parent as Container);
if (_local2){
forceClipping = false;
_local2.mx_internal::forceClipping = false;
};
};
checkClipping = false;
super.onTweenEnd(_arg1);
}
override public function onTweenUpdate(_arg1:Object):void{
var _local2:Container;
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
EffectManager.suspendEventHandling();
if (((!(forceClipping)) && (checkClipping))){
_local2 = (target.parent as Container);
if (_local2){
_local3 = _local2.viewMetrics;
_local4 = _local3.left;
_local5 = (_local2.width - _local3.right);
_local6 = _local3.top;
_local7 = (_local2.height - _local3.bottom);
if ((((((((_arg1[0] < _local4)) || (((_arg1[0] + target.width) > _local5)))) || ((_arg1[1] < _local6)))) || (((_arg1[1] + target.height) > _local7)))){
forceClipping = true;
_local2.mx_internal::forceClipping = true;
};
};
};
target.move(_arg1[0], _arg1[1]);
EffectManager.resumeEventHandling();
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1 is MoveEvent)) && ((_arg1.type == MoveEvent.MOVE)))){
if (((((((((((isNaN(xFrom)) && (isNaN(xTo)))) && (isNaN(xBy)))) && (isNaN(yFrom)))) && (isNaN(yTo)))) && (isNaN(yBy)))){
xFrom = MoveEvent(_arg1).oldX;
xTo = target.x;
yFrom = MoveEvent(_arg1).oldY;
yTo = target.y;
};
};
}
}
}//package mx.effects.effectClasses
Section 153
//ParallelInstance (mx.effects.effectClasses.ParallelInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.effects.*;
import flash.utils.*;
public class ParallelInstance extends CompositeEffectInstance {
private var isReversed:Boolean;// = false
private var doneEffectQueue:Array;
private var timer:Timer;
private var replayEffectQueue:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function ParallelInstance(_arg1:Object){
isReversed = false;
super(_arg1);
}
private function startTimer():void{
if (!timer){
timer = new Timer(10);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
};
timer.start();
}
override public function resume():void{
var _local1:int;
var _local2:int;
super.resume();
_local1 = activeEffectQueue.length;
_local2 = 0;
while (_local2 < _local1) {
activeEffectQueue[_local2].resume();
_local2++;
};
}
override mx_internal function get durationWithoutRepeat():Number{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:Array;
_local1 = 0;
_local2 = childSets.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = childSets[_local3];
_local1 = Math.max(_local4[0].actualDuration, _local1);
_local3++;
};
return (_local1);
}
private function timerHandler(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:int;
var _local4:int;
var _local5:EffectInstance;
_local2 = (durationWithoutRepeat - playheadTime);
_local3 = replayEffectQueue.length;
if (_local3 == 0){
stopTimer();
return;
};
_local4 = (_local3 - 1);
while (_local4 >= 0) {
_local5 = replayEffectQueue[_local4];
if (_local2 <= _local5.actualDuration){
activeEffectQueue.push(_local5);
replayEffectQueue.splice(_local4, 1);
_local5.playReversed = playReversed;
_local5.startEffect();
};
_local4--;
};
}
override public function play():void{
var _local1:Boolean;
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:EffectInstance;
var _local8:Array;
doneEffectQueue = [];
activeEffectQueue = [];
replayEffectQueue = [];
_local1 = false;
super.play();
_local2 = childSets.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = childSets[_local3];
_local5 = _local4.length;
_local6 = 0;
while ((((_local6 < _local5)) && (!((activeEffectQueue == null))))) {
_local7 = _local4[_local6];
if (((playReversed) && ((_local7.actualDuration < durationWithoutRepeat)))){
replayEffectQueue.push(_local7);
startTimer();
} else {
_local7.playReversed = playReversed;
activeEffectQueue.push(_local7);
};
if (_local7.suspendBackgroundProcessing){
UIComponent.suspendBackgroundProcessing();
};
_local6++;
};
_local3++;
};
if (activeEffectQueue.length > 0){
_local8 = activeEffectQueue.slice(0);
_local3 = 0;
while (_local3 < _local8.length) {
_local8[_local3].startEffect();
_local3++;
};
};
}
override public function addChildSet(_arg1:Array):void{
var _local2:CompositeEffectInstance;
super.addChildSet(_arg1);
if (_arg1.length > 0){
_local2 = (_arg1[0] as CompositeEffectInstance);
if ((((_arg1[0] is RotateInstance)) || (((!((_local2 == null))) && (_local2.hasRotateInstance()))))){
childSets.pop();
childSets.unshift(_arg1);
};
};
}
private function stopTimer():void{
if (timer){
timer.reset();
};
}
override protected function onEffectEnd(_arg1:IEffectInstance):void{
var _local2:int;
var _local3:int;
if (Object(_arg1).suspendBackgroundProcessing){
UIComponent.resumeBackgroundProcessing();
};
if (((endEffectCalled) || ((activeEffectQueue == null)))){
return;
};
_local2 = activeEffectQueue.length;
_local3 = 0;
while (_local3 < _local2) {
if (_arg1 == activeEffectQueue[_local3]){
doneEffectQueue.push(_arg1);
activeEffectQueue.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2 == 1){
finishRepeat();
};
}
override public function reverse():void{
var _local1:int;
var _local2:int;
super.reverse();
if (isReversed){
_local1 = activeEffectQueue.length;
_local2 = 0;
while (_local2 < _local1) {
activeEffectQueue[_local2].reverse();
_local2++;
};
stopTimer();
} else {
replayEffectQueue = doneEffectQueue.splice(0);
_local1 = activeEffectQueue.length;
_local2 = 0;
while (_local2 < _local1) {
activeEffectQueue[_local2].reverse();
_local2++;
};
startTimer();
};
isReversed = !(isReversed);
}
override public function end():void{
var _local1:Array;
var _local2:int;
var _local3:int;
endEffectCalled = true;
stopTimer();
if (activeEffectQueue){
_local1 = activeEffectQueue.concat();
activeEffectQueue = null;
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_local1[_local3]){
_local1[_local3].end();
};
_local3++;
};
};
super.end();
}
override public function pause():void{
var _local1:int;
var _local2:int;
super.pause();
_local1 = activeEffectQueue.length;
_local2 = 0;
while (_local2 < _local1) {
activeEffectQueue[_local2].pause();
_local2++;
};
}
}
}//package mx.effects.effectClasses
Section 154
//PropertyChanges (mx.effects.effectClasses.PropertyChanges)
package mx.effects.effectClasses {
import mx.core.*;
public class PropertyChanges {
public var start:Object;
public var target:IUIComponent;
public var end:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function PropertyChanges(_arg1:IUIComponent){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 155
//RotateInstance (mx.effects.effectClasses.RotateInstance)
package mx.effects.effectClasses {
import mx.effects.*;
public class RotateInstance extends TweenEffectInstance {
private var originalOffsetX:Number;
private var originalOffsetY:Number;
public var angleFrom:Number;// = 0
private var centerY:Number;
private var centerX:Number;
public var angleTo:Number;// = 360
private var newX:Number;
private var newY:Number;
public var originX:Number;
public var originY:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function RotateInstance(_arg1:Object){
angleFrom = 0;
angleTo = 360;
super(_arg1);
}
override public function play():void{
var _local1:Number;
super.play();
_local1 = ((Math.PI * target.rotation) / 180);
if (isNaN(originX)){
originX = (target.width / 2);
};
if (isNaN(originY)){
originY = (target.height / 2);
};
centerX = ((target.x + (originX * Math.cos(_local1))) - (originY * Math.sin(_local1)));
centerY = ((target.y + (originX * Math.sin(_local1))) + (originY * Math.cos(_local1)));
if (isNaN(angleFrom)){
angleFrom = target.rotation;
};
if (isNaN(angleTo)){
angleTo = ((target.rotation)==0) ? ((angleFrom)>180) ? 360 : 0 : target.rotation;
};
tween = createTween(this, angleFrom, angleTo, duration);
target.rotation = angleFrom;
_local1 = ((Math.PI * angleFrom) / 180);
EffectManager.suspendEventHandling();
originalOffsetX = ((originX * Math.cos(_local1)) - (originY * Math.sin(_local1)));
originalOffsetY = ((originX * Math.sin(_local1)) + (originY * Math.cos(_local1)));
newX = Number((centerX - originalOffsetX).toFixed(1));
newY = Number((centerY - originalOffsetY).toFixed(1));
target.move(newX, newY);
EffectManager.resumeEventHandling();
}
override public function onTweenUpdate(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if (newX != Number(target.x.toFixed(1))){
centerX = (target.x + originalOffsetX);
};
if (newY != Number(target.y.toFixed(1))){
centerY = (target.y + originalOffsetY);
};
_local2 = Number(_arg1);
_local3 = ((Math.PI * _local2) / 180);
EffectManager.suspendEventHandling();
target.rotation = _local2;
newX = ((centerX - (originX * Math.cos(_local3))) + (originY * Math.sin(_local3)));
newY = ((centerY - (originX * Math.sin(_local3))) - (originY * Math.cos(_local3)));
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
EffectManager.resumeEventHandling();
}
}
}//package mx.effects.effectClasses
Section 156
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance)
package mx.effects.effectClasses {
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class TweenEffectInstance extends EffectInstance {
mx_internal var needToLayout:Boolean;// = false
private var _seekTime:Number;// = 0
public var tween:Tween;
public var easingFunction:Function;
mx_internal static const VERSION:String = "2.0.1.0";
public function TweenEffectInstance(_arg1:Object){
needToLayout = false;
_seekTime = 0;
super(_arg1);
}
override public function get playheadTime():Number{
if (tween){
return ((tween.playheadTime + super.playheadTime));
};
return (0);
}
override mx_internal function set playReversed(_arg1:Boolean):void{
super.playReversed = _arg1;
if (tween){
tween.playReversed = _arg1;
};
}
override public function resume():void{
super.resume();
if (tween){
tween.resume();
};
}
public function onTweenUpdate(_arg1:Object):void{
}
mx_internal function applyTweenStartValues():void{
if (duration > 0){
onTweenUpdate(tween.getCurrentValue(0));
};
}
protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{
var _local6:Tween;
_local6 = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5);
_local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
if (easingFunction != null){
_local6.easingFunction = easingFunction;
};
if (_seekTime > 0){
_local6.seek(_seekTime);
};
_local6.playReversed = playReversed;
return (_local6);
}
override public function end():void{
stopRepeat = true;
if (delayTimer){
delayTimer.reset();
};
if (tween){
tween.endTween();
tween = null;
};
}
override public function reverse():void{
super.reverse();
if (tween){
tween.reverse();
};
super.playReversed = !(playReversed);
}
private function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
public function seek(_arg1:Number):void{
if (tween){
tween.seek(_arg1);
} else {
_seekTime = _arg1;
};
}
override public function pause():void{
super.pause();
if (tween){
tween.pause();
};
}
public function onTweenEnd(_arg1:Object):void{
onTweenUpdate(_arg1);
tween = null;
if (needToLayout){
UIComponentGlobals.layoutManager.validateNow();
};
finishRepeat();
}
}
}//package mx.effects.effectClasses
Section 157
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class ZoomInstance extends TweenEffectInstance {
private var show:Boolean;// = true
private var origPercentHeight:Number;
public var zoomWidthFrom:Number;
private var origX:Number;
private var origY:Number;
private var scaledOriginY:Number;
private var scaledOriginX:Number;
private var origPercentWidth:Number;
public var zoomWidthTo:Number;
public var zoomHeightFrom:Number;
private var newX:Number;
private var newY:Number;
public var captureRollEvents:Boolean;
private var origScaleX:Number;
private var origScaleY:Number;
public var originX:Number;
public var originY:Number;
public var zoomHeightTo:Number;
private var _mouseHasMoved:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
public function ZoomInstance(_arg1:Object){
_mouseHasMoved = false;
show = true;
super(_arg1);
}
override public function finishEffect():void{
if (captureRollEvents){
target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
super.finishEffect();
}
private function getScaleFromWidth(_arg1:Number):Number{
return ((_arg1 / (target.width / Math.abs(target.scaleX))));
}
private function getScaleFromHeight(_arg1:Number):Number{
return ((_arg1 / (target.height / Math.abs(target.scaleY))));
}
override public function play():void{
super.play();
applyPropertyChanges();
if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){
if (show){
zoomWidthFrom = (zoomHeightFrom = 0);
zoomWidthTo = target.scaleX;
zoomHeightTo = target.scaleY;
} else {
zoomWidthFrom = target.scaleX;
zoomHeightFrom = target.scaleY;
zoomWidthTo = (zoomHeightTo = 0);
};
} else {
if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){
zoomWidthFrom = (zoomWidthTo = target.scaleX);
} else {
if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){
zoomHeightFrom = (zoomHeightTo = target.scaleY);
};
};
if (isNaN(zoomWidthFrom)){
zoomWidthFrom = target.scaleX;
} else {
if (isNaN(zoomWidthTo)){
zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1;
};
};
if (isNaN(zoomHeightFrom)){
zoomHeightFrom = target.scaleY;
} else {
if (isNaN(zoomHeightTo)){
zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1;
};
};
};
if (zoomWidthFrom < 0.01){
zoomWidthFrom = 0.01;
};
if (zoomWidthTo < 0.01){
zoomWidthTo = 0.01;
};
if (zoomHeightFrom < 0.01){
zoomHeightFrom = 0.01;
};
if (zoomHeightTo < 0.01){
zoomHeightTo = 0.01;
};
origScaleX = target.scaleX;
origScaleY = target.scaleY;
newX = (origX = target.x);
newY = (origY = target.y);
if (isNaN(originX)){
scaledOriginX = (target.width / 2);
} else {
scaledOriginX = (originX * origScaleX);
};
if (isNaN(originY)){
scaledOriginY = (target.height / 2);
} else {
scaledOriginY = (originY * origScaleY);
};
scaledOriginX = Number(scaledOriginX.toFixed(1));
scaledOriginY = Number(scaledOriginY.toFixed(1));
origPercentWidth = target.percentWidth;
if (!isNaN(origPercentWidth)){
target.width = target.width;
};
origPercentHeight = target.percentHeight;
if (!isNaN(origPercentHeight)){
target.height = target.height;
};
tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration);
if (captureRollEvents){
target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
}
override public function onTweenEnd(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if (!isNaN(origPercentWidth)){
_local2 = target.width;
target.percentWidth = origPercentWidth;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._width = _local2;
};
};
if (!isNaN(origPercentHeight)){
_local3 = target.height;
target.percentHeight = origPercentHeight;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._height = _local3;
};
};
super.onTweenEnd(_arg1);
if (mx_internal::hideOnEffectEnd){
EffectManager.suspendEventHandling();
target.scaleX = origScaleX;
target.scaleY = origScaleY;
target.move(origX, origY);
EffectManager.resumeEventHandling();
};
}
private function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_MOVE){
_mouseHasMoved = true;
} else {
if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){
if (!_mouseHasMoved){
_arg1.stopImmediatePropagation();
};
_mouseHasMoved = false;
};
};
}
override public function onTweenUpdate(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
EffectManager.suspendEventHandling();
if (Math.abs((newX - Number(target.x.toFixed(1)))) > 0.1){
origX = (origX + (Number(target.x.toFixed(1)) - newX));
};
if (Math.abs((newY - Number(target.y.toFixed(1)))) > 0.1){
origY = (origY + (Number(target.y.toFixed(1)) - newY));
};
target.scaleX = _arg1[0];
target.scaleY = _arg1[1];
_local2 = (_arg1[0] / origScaleX);
_local3 = (_arg1[1] / origScaleY);
_local4 = (scaledOriginX * _local2);
_local5 = (scaledOriginY * _local3);
newX = ((scaledOriginX - _local4) + origX);
newY = ((scaledOriginY - _local5) + origY);
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
tween.mx_internal::needToLayout = true;
EffectManager.resumeEventHandling();
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){
show = false;
};
}
private function applyPropertyChanges():void{
var _local1:PropertyChanges;
var _local2:Boolean;
var _local3:Boolean;
_local1 = propertyChanges;
if (_local1){
_local2 = false;
_local3 = false;
if (_local1.end["scaleX"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo;
_local3 = true;
};
if (_local1.end["scaleY"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo;
_local3 = true;
};
if (_local3){
return;
};
if (_local1.end["width"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo;
_local2 = true;
};
if (_local1.end["height"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo;
_local2 = true;
};
if (_local2){
return;
};
if (_local1.end["visible"] !== undefined){
show = _local1.end["visible"];
};
};
}
}
}//package mx.effects.effectClasses
Section 158
//Blur (mx.effects.Blur)
package mx.effects {
import mx.effects.effectClasses.*;
public class Blur extends TweenEffect {
public var blurXFrom:Number;
public var blurYFrom:Number;
public var blurXTo:Number;
public var blurYTo:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["filters"];
public function Blur(_arg1:Object=null){
super(_arg1);
instanceClass = BlurInstance;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:BlurInstance;
super.initInstance(_arg1);
_local2 = BlurInstance(_arg1);
_local2.blurXFrom = blurXFrom;
_local2.blurXTo = blurXTo;
_local2.blurYFrom = blurYFrom;
_local2.blurYTo = blurYTo;
}
}
}//package mx.effects
Section 159
//CompositeEffect (mx.effects.CompositeEffect)
package mx.effects {
import mx.effects.effectClasses.*;
public class CompositeEffect extends Effect {
private var childTargets:Array;
private var _affectedProperties:Array;
public var children:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function CompositeEffect(_arg1:Object=null){
children = [];
super(_arg1);
instanceClass = CompositeEffectInstance;
}
override mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local3:int;
var _local4:int;
var _local5:Effect;
_local3 = children.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = children[_local4];
_arg1 = _local5.captureValues(_arg1, _arg2);
_local4++;
};
return (_arg1);
}
public function addChild(_arg1:Effect):void{
children.push(_arg1);
_affectedProperties = null;
}
override protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
var _local3:Array;
var _local4:int;
var _local5:int;
if (filterObject){
_local3 = targets;
if (_local3.length == 0){
_local3 = childTargets;
};
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
if (filterObject.filterFunction(_arg1, _local3[_local5])){
return (true);
};
_local5++;
};
return (false);
};
return (true);
}
override public function createInstance(_arg1:Object=null):IEffectInstance{
var _local2:IEffectInstance;
if (!childTargets){
childTargets = [_arg1];
};
_local2 = super.createInstance(_arg1);
childTargets = null;
return (_local2);
}
override public function getAffectedProperties():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
if (!_affectedProperties){
_local1 = [];
_local2 = children.length;
_local3 = 0;
while (_local3 < _local2) {
_local1 = _local1.concat(children[_local3].getAffectedProperties());
_local3++;
};
_affectedProperties = _local1;
};
return (_affectedProperties);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:CompositeEffectInstance;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:Effect;
super.initInstance(_arg1);
_local2 = CompositeEffectInstance(_arg1);
_local3 = childTargets;
if (!(_local3 is Array)){
_local3 = [_local3];
};
if (children){
_local4 = children.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = children[_local5];
if (propertyChangesArray != null){
_local6.propertyChangesArray = propertyChangesArray;
};
if ((((_local6.filterObject == null)) && (filterObject))){
_local6.filterObject = filterObject;
};
if (_local6.targets.length == 0){
_local2.addChildSet(children[_local5].createInstances(_local3));
} else {
_local2.addChildSet(children[_local5].createInstances(_local6.targets));
};
_local5++;
};
};
}
override mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local3:int;
var _local4:int;
var _local5:Effect;
var _local6:Array;
_local3 = children.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = children[_local4];
_local6 = ((_local5.targets.length > 0)) ? _local5.targets : _arg2;
if ((((_local5.filterObject == null)) && (filterObject))){
_local5.filterObject = filterObject;
};
_local5.applyStartValues(_arg1, _local6);
_local4++;
};
}
private function getChildrenTargets():Array{
var _local1:Array;
var _local2:Object;
var _local3:Array;
var _local4:Effect;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:String;
_local1 = [];
_local2 = {};
_local5 = children.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = children[_local6];
if ((_local4 is CompositeEffect)){
_local3 = CompositeEffect(_local4).getChildrenTargets();
_local7 = _local3.length;
_local8 = 0;
while (_local8 < _local7) {
if (_local3[_local8] != null){
_local2[_local3[_local8].toString()] = _local3[_local8];
};
_local8++;
};
} else {
if (_local4.targets != null){
_local7 = _local4.targets.length;
_local8 = 0;
while (_local8 < _local7) {
if (_local4.targets[_local8] != null){
_local2[_local4.targets[_local8].toString()] = _local4.targets[_local8];
};
_local8++;
};
};
};
_local6++;
};
_local5 = targets.length;
_local6 = 0;
while (_local6 < _local5) {
if (targets[_local6] != null){
_local2[targets[_local6].toString()] = targets[_local6];
};
_local6++;
};
for (_local9 in _local2) {
_local1.push(_local2[_local9]);
};
return (_local1);
}
override public function createInstances(_arg1:Array=null):Array{
var _local2:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
childTargets = _arg1;
_local2 = createInstance();
childTargets = null;
return ((_local2) ? [_local2] : []);
}
override public function captureStartValues():void{
var _local1:Array;
var _local2:int;
var _local3:int;
_local1 = getChildrenTargets();
propertyChangesArray = [];
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
propertyChangesArray.push(new PropertyChanges(_local1[_local3]));
_local3++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
}
}
}//package mx.effects
Section 160
//Effect (mx.effects.Effect)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.managers.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class Effect extends EventDispatcher {
mx_internal var applyActualDimensions:Boolean;// = true
private var _instances:Array;
private var _filter:String;
private var _customFilter:EffectTargetFilter;
mx_internal var durationExplicitlySet:Boolean;// = false
public var repeatCount:int;// = 1
public var repeatDelay:int;// = 0
public var suspendBackgroundProcessing:Boolean;// = false
public var startDelay:int;// = 0
private var _targets:Array;
mx_internal var propertyChangesArray:Array;
private var _relevantProperties:Array;
mx_internal var filterObject:EffectTargetFilter;
private var _callValidateNow:Boolean;// = false
mx_internal var initEvent:Event;
public var instanceClass:Class;
private var _duration:Number;// = 500
private var _relevantStyles:Array;
private var isPaused:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
public function Effect(_arg1:Object=null){
_instances = [];
_callValidateNow = false;
isPaused = false;
applyActualDimensions = true;
_duration = 500;
durationExplicitlySet = false;
_relevantStyles = [];
instanceClass = IEffectInstance;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
suspendBackgroundProcessing = false;
_targets = [];
super();
this.target = _arg1;
}
public function set targets(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = _arg1.length;
_local3 = (_local2 - 1);
while (_local3 > 0) {
if (_arg1[_local3] == null){
_arg1.splice(_local3, 1);
};
_local3--;
};
_targets = _arg1;
}
public function end(_arg1:IEffectInstance=null):void{
var _local2:int;
var _local3:int;
var _local4:IEffectInstance;
if (_arg1){
_arg1.end();
} else {
_local2 = _instances.length;
_local3 = _local2;
while (_local3 >= 0) {
_local4 = IEffectInstance(_instances[_local3]);
if (_local4){
_local4.end();
};
_local3--;
};
};
}
protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
if (filterObject){
return (filterObject.filterFunction(_arg1, _arg2));
};
return (true);
}
public function get target():Object{
if (_targets.length > 0){
return (_targets[0]);
};
return (null);
}
public function get duration():Number{
return (_duration);
}
protected function getValueFromTarget(_arg1:Object, _arg2:String){
if ((_arg2 in _arg1)){
return (_arg1[_arg2]);
};
return (undefined);
}
public function set customFilter(_arg1:EffectTargetFilter):void{
_customFilter = _arg1;
filterObject = _arg1;
}
public function get targets():Array{
return (_targets);
}
public function captureStartValues():void{
var _local1:int;
var _local2:int;
if (targets.length > 0){
propertyChangesArray = [];
_callValidateNow = true;
_local1 = targets.length;
_local2 = 0;
while (_local2 < _local1) {
propertyChangesArray.push(new PropertyChanges(targets[_local2]));
_local2++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
};
}
public function set target(_arg1:Object):void{
_targets.splice(0);
if (_arg1){
_targets[0] = _arg1;
};
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function get isPlaying():Boolean{
return (((_instances) && ((_instances.length > 0))));
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local3:Array;
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
_local3 = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local3) && ((_local3.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local3.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]);
_local9++;
};
_local7++;
};
};
_local10 = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]);
_local9++;
};
_local7++;
};
};
return (_arg1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
public function get relevantProperties():Array{
if (_relevantProperties){
return (_relevantProperties);
};
return (getAffectedProperties());
}
public function createInstance(_arg1:Object=null):IEffectInstance{
var _local2:IEffectInstance;
var _local3:PropertyChanges;
var _local4:Boolean;
var _local5:Boolean;
var _local6:int;
var _local7:int;
if (!_arg1){
_arg1 = this.target;
};
_local2 = null;
_local3 = null;
_local4 = true;
_local5 = false;
if (propertyChangesArray){
_local5 = true;
_local4 = filterInstance(propertyChangesArray, _arg1);
};
if (_local4){
_local2 = IEffectInstance(new instanceClass(_arg1));
initInstance(_local2);
if (_local5){
_local6 = propertyChangesArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (propertyChangesArray[_local7].target == _arg1){
_local2.propertyChanges = propertyChangesArray[_local7];
};
_local7++;
};
};
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_instances.push(_local2);
if (initEvent){
_local2.initEffect(initEvent);
};
};
return (_local2);
}
protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{
var target = _arg1;
var property = _arg2;
var value = _arg3;
var props = _arg4;
if ((property in target)){
try {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){
target.setActualSize(target.width, value);
} else {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){
target.setActualSize(value, target.height);
} else {
target[property] = value;
};
};
} catch(e:Error) {
};
};
}
protected function effectStartHandler(_arg1:EffectEvent):void{
dispatchEvent(_arg1);
}
public function play(_arg1:Array=null, _arg2:Boolean=false):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:IEffectInstance;
if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){
if (_callValidateNow){
LayoutManager.getInstance().validateNow();
};
propertyChangesArray = captureValues(propertyChangesArray, false);
propertyChangesArray = stripUnchangedValues(propertyChangesArray);
applyStartValues(propertyChangesArray, this.targets);
};
_local3 = createInstances(_arg1);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = IEffectInstance(_local3[_local5]);
Object(_local6).playReversed = _arg2;
_local6.startEffect();
_local5++;
};
return (_local3);
}
public function resume():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (isPaused))){
isPaused = false;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).resume();
_local2++;
};
};
}
public function set relevantStyles(_arg1:Array):void{
_relevantStyles = _arg1;
}
public function getAffectedProperties():Array{
return ([]);
}
protected function initInstance(_arg1:IEffectInstance):void{
_arg1.duration = duration;
Object(_arg1).durationExplicitlySet = durationExplicitlySet;
_arg1.effect = this;
_arg1.repeatCount = repeatCount;
_arg1.repeatDelay = repeatDelay;
_arg1.startDelay = startDelay;
_arg1.suspendBackgroundProcessing = suspendBackgroundProcessing;
}
public function get customFilter():EffectTargetFilter{
return (_customFilter);
}
mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:Boolean;
_local3 = relevantProperties;
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local8 = _arg1[_local5].target;
_local9 = false;
_local6 = _arg2.length;
_local7 = 0;
while (_local7 < _local6) {
if (_arg2[_local7] == _local8){
_local9 = filterInstance(_arg1, _local8);
break;
};
_local7++;
};
if (_local9){
_local6 = _local3.length;
_local7 = 0;
while (_local7 < _local6) {
if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){
applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start);
};
_local7++;
};
_local6 = relevantStyles.length;
_local7 = 0;
while (_local7 < _local6) {
if ((relevantStyles[_local7] in _arg1[_local5].start)){
_local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]);
};
_local7++;
};
};
_local5++;
};
}
public function get relevantStyles():Array{
return (_relevantStyles);
}
public function set relevantProperties(_arg1:Array):void{
_relevantProperties = _arg1;
}
public function createInstances(_arg1:Array=null):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
_local2 = [];
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = createInstance(_arg1[_local4]);
if (_local5){
_local2.push(_local5);
};
_local4++;
};
initEvent = null;
return (_local2);
}
protected function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance;
var _local3:int;
var _local4:int;
_local2 = IEffectInstance(_arg1.effectInstance);
EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_local3 = _instances.length;
_local4 = 0;
while (_local4 < _local3) {
if (_instances[_local4] === _local2){
_instances.splice(_local4, 1);
};
_local4++;
};
dispatchEvent(_arg1);
}
public function reverse():void{
var _local1:int;
var _local2:int;
if (isPlaying){
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).reverse();
_local2++;
};
};
}
public function set filter(_arg1:String):void{
if (!customFilter){
_filter = _arg1;
switch (_arg1){
case "add":
case "remove":
filterObject = new AddRemoveEffectTargetFilter();
AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add");
break;
case "hide":
case "show":
filterObject = new HideShowEffectTargetFilter();
HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show");
break;
case "move":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["x", "y"];
break;
case "resize":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["width", "height"];
break;
default:
filterObject = null;
break;
};
};
}
public function pause():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (!(isPaused)))){
isPaused = true;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).pause();
_local2++;
};
};
}
public function get filter():String{
return (_filter);
}
private static function mergeArrays(_arg1:Array, _arg2:Array):Array{
var _local3:int;
var _local4:Boolean;
var _local5:int;
if (_arg2){
_local3 = 0;
while (_local3 < _arg2.length) {
_local4 = true;
_local5 = 0;
while (_local5 < _arg1.length) {
if (_arg1[_local5] == _arg2[_local3]){
_local4 = false;
break;
};
_local5++;
};
if (_local4){
_arg1.push(_arg2[_local3]);
};
_local3++;
};
};
return (_arg1);
}
private static function stripUnchangedValues(_arg1:Array):Array{
var _local2:int;
var _local3:Object;
_local2 = 0;
while (_local2 < _arg1.length) {
for (_local3 in _arg1[_local2].start) {
if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){
delete _arg1[_local2].start[_local3];
delete _arg1[_local2].end[_local3];
};
};
_local2++;
};
return (_arg1);
}
}
}//package mx.effects
Section 161
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var delayStartTime:Number;// = 0
private var playCount:int;// = 0
mx_internal var stopRepeat:Boolean;// = false
private var _repeatCount:int;
private var _suspendBackgroundProcessing:Boolean;// = false
mx_internal var delayTimer:Timer;
private var _triggerEvent:Event;
mx_internal var parentCompositeEffectInstance:EffectInstance;
mx_internal var durationExplicitlySet:Boolean;// = false
private var _effect:Effect;
private var _target:Object;
mx_internal var hideOnEffectEnd:Boolean;// = false
private var _startDelay:int;// = 0
private var delayElapsedTime:Number;// = 0
private var _repeatDelay:int;// = 0
private var _propertyChanges:PropertyChanges;
private var _duration:Number;// = 500
private var _playReversed:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function EffectInstance(_arg1:Object){
delayStartTime = 0;
delayElapsedTime = 0;
durationExplicitlySet = false;
hideOnEffectEnd = false;
playCount = 0;
stopRepeat = false;
_duration = 500;
_repeatDelay = 0;
_startDelay = 0;
_suspendBackgroundProcessing = false;
super();
this.target = _arg1;
}
public function get playheadTime():Number{
return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay));
}
public function finishEffect():void{
playCount = 0;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
};
if ((target is IUIComponent)){
Object(target).effectFinished(this);
};
}
public function finishRepeat():void{
if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){
if (repeatDelay > 0){
delayTimer = new Timer(repeatDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
} else {
finishEffect();
};
}
mx_internal function get playReversed():Boolean{
return (_playReversed);
}
public function set effect(_arg1:Effect):void{
_effect = _arg1;
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_playReversed = _arg1;
}
public function resume():void{
if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){
delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime);
delayTimer.start();
};
}
public function get propertyChanges():PropertyChanges{
return (_propertyChanges);
}
public function set target(_arg1:Object):void{
_target = _arg1;
}
public function get repeatCount():int{
return (_repeatCount);
}
mx_internal function playWithNoDuration():void{
duration = 0;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
startEffect();
}
public function get startDelay():int{
return (_startDelay);
}
mx_internal function get actualDuration():Number{
var _local1:Number;
_local1 = NaN;
if (repeatCount > 0){
_local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
public function get suspendBackgroundProcessing():Boolean{
return (_suspendBackgroundProcessing);
}
public function play():void{
playCount++;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
};
}
public function set repeatDelay(_arg1:int):void{
_repeatDelay = _arg1;
}
public function set propertyChanges(_arg1:PropertyChanges):void{
_propertyChanges = _arg1;
}
mx_internal function eventHandler(_arg1:Event):void{
if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){
hideOnEffectEnd = false;
_arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler);
};
}
public function set repeatCount(_arg1:int):void{
_repeatCount = _arg1;
}
private function delayTimerHandler(_arg1:TimerEvent):void{
delayTimer.reset();
delayStartTime = NaN;
delayElapsedTime = NaN;
play();
}
public function set suspendBackgroundProcessing(_arg1:Boolean):void{
_suspendBackgroundProcessing = _arg1;
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function set startDelay(_arg1:int):void{
_startDelay = _arg1;
}
public function get effect():Effect{
return (_effect);
}
public function get duration():Number{
if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){
return (parentCompositeEffectInstance.duration);
};
return (_duration);
}
public function get target():Object{
return (_target);
}
public function startEffect():void{
if ((target is IUIComponent)){
Object(target).effectStarted(this);
Object(target).drawFocus(false);
};
if ((((startDelay > 0)) && (!(playReversed)))){
delayTimer = new Timer(startDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
}
public function get repeatDelay():int{
return (_repeatDelay);
}
public function initEffect(_arg1:Event):void{
triggerEvent = _arg1;
switch (_arg1.type){
case "resizeStart":
case "resizeEnd":
if (!durationExplicitlySet){
duration = 250;
};
break;
case FlexEvent.HIDE:
target.setVisible(true, true);
hideOnEffectEnd = true;
target.addEventListener(FlexEvent.SHOW, eventHandler);
break;
};
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
public function end():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function reverse():void{
if (repeatCount > 0){
playCount = ((repeatCount - playCount) + 1);
};
}
public function pause():void{
if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){
delayTimer.stop();
delayElapsedTime = (getTimer() - delayStartTime);
};
}
}
}//package mx.effects
Section 162
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.resources.*;
import flash.system.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceIncorrectTrigger:String;
mx_internal static var effectsPlaying:Array = [];
private static var targetsInfo:Array = [];
private static var effectTriggersForEvent:Object = {};
mx_internal static var lastEffectCreated:Effect;
private static var eventHandlingSuspendCount:Number = 0;
private static var eventsForEffectTriggers:Object = {};
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("effects", ApplicationDomain.currentDomain);
private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{
var _local3:Effect;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:String;
var _local10:Array;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:EffectInstance;
_local3 = createEffectForType(_arg2, _arg1.type);
if (!_local3){
return;
};
if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){
throw (new Error(resourceIncorrectTrigger));
};
if (_arg2.initialized == false){
_local9 = _arg1.type;
if ((((((((((_local9 == MoveEvent.MOVE)) || ((_local9 == ResizeEvent.RESIZE)))) || ((_local9 == FlexEvent.SHOW)))) || ((_local9 == FlexEvent.HIDE)))) || ((_local9 == Event.CHANGE)))){
_local3 = null;
return;
};
};
if ((_local3.target is IUIComponent)){
_local10 = IUIComponent(_local3.target).tweeningProperties;
if (((_local10) && ((_local10.length > 0)))){
_local11 = _local3.getAffectedProperties();
_local4 = _local10.length;
_local6 = _local11.length;
_local5 = 0;
while (_local5 < _local4) {
_local7 = 0;
while (_local7 < _local6) {
if (_local10[_local5] == _local11[_local7]){
_local3 = null;
return;
};
_local7++;
};
_local5++;
};
};
};
if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){
_local12 = _local3.getAffectedProperties();
_local5 = 0;
while (_local5 < _local12.length) {
_local13 = _local3.target.getEffectsForProperty(_local12[_local5]);
if (_local13.length > 0){
if (_arg1.type == ResizeEvent.RESIZE){
return;
};
_local7 = 0;
while (_local7 < _local13.length) {
_local14 = _local13[_local7];
if ((((_arg1.type == FlexEvent.SHOW)) && (_local14.hideOnEffectEnd))){
_local14.target.removeEventListener(FlexEvent.SHOW, _local14.eventHandler);
_local14.hideOnEffectEnd = false;
};
_local14.end();
_local7++;
};
};
_local5++;
};
};
_local3.initEvent = _arg1;
_local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler);
lastEffectCreated = _local3;
_local8 = _local3.play();
_local4 = _local8.length;
_local5 = 0;
while (_local5 < _local4) {
effectsPlaying.push(new EffectNode(_local3, _local8[_local5]));
_local5++;
};
if (_local3.suspendBackgroundProcessing){
UIComponent.suspendBackgroundProcessing();
};
}
public static function suspendEventHandling():void{
eventHandlingSuspendCount++;
}
mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{
var _local3:Number;
if (_arg1 != ""){
if (_arg2 == ""){
_local3 = _arg1.length;
if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){
_arg2 = _arg1.substring(0, (_local3 - 6));
};
};
if (_arg2 != ""){
effectTriggersForEvent[_arg2] = _arg1;
eventsForEffectTriggers[_arg1] = _arg2;
};
};
}
private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{
suspendEventHandling();
_arg2.addChildAt(_arg1, _arg3);
resumeEventHandling();
createAndPlayEffect(_arg4, _arg1);
}
mx_internal static function endVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, false);
}
public static function endEffectsForTarget(_arg1:IUIComponent):void{
var _local2:int;
var _local3:int;
var _local4:EffectInstance;
_local2 = effectsPlaying.length;
_local3 = (_local2 - 1);
while (_local3 >= 0) {
_local4 = effectsPlaying[_local3].instance;
if (_local4.target == _arg1){
_local4.end();
};
_local3--;
};
}
private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:int;
var _local5:int;
var _local6:Object;
_local6 = null;
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
_local6 = targetsInfo[_local5];
break;
};
_local5++;
};
if (!_local6){
_local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0};
targetsInfo.push(_local6);
};
if (_arg2){
if (_arg3){
_local6.bitmapEffectsCount++;
if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
} else {
if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){
_arg1.cacheAsBitmap = false;
};
};
} else {
if (_arg3){
if (_local6.bitmapEffectsCount != 0){
_local6.bitmapEffectsCount--;
};
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false;
};
} else {
if (_local6.vectorEffectsCount != 0){
if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){
_local4 = _local6.bitmapEffectsCount;
_local5 = 0;
while (_local5 < _local4) {
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
_local5++;
};
};
};
};
if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
targetsInfo.splice(_local5, 1);
break;
};
_local5++;
};
};
};
}
mx_internal static function eventHandler(_arg1:Event):void{
var _local2:FocusEvent;
var _local3:DisplayObject;
var _local4:int;
var _local5:DisplayObjectContainer;
var _local6:int;
if (!(_arg1.currentTarget is IFlexDisplayObject)){
return;
};
if (eventHandlingSuspendCount > 0){
return;
};
if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){
_local2 = FocusEvent(_arg1);
if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){
return;
};
};
if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){
return;
};
if (_arg1.type == Event.REMOVED){
if ((_arg1.target is UIComponent)){
if (UIComponent(_arg1.target).initialized == false){
return;
};
if (UIComponent(_arg1.target).isEffectStarted){
_local4 = 0;
while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) {
if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){
return;
};
_local4++;
};
};
};
_local3 = (_arg1.target as DisplayObject);
if (_local3 != null){
_local5 = (_local3.parent as DisplayObjectContainer);
if (_local5 != null){
_local6 = _local5.getChildIndex(_local3);
if (_local6 >= 0){
if ((_local3 is UIComponent)){
UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]);
};
};
};
};
} else {
createAndPlayEffect(_arg1, _arg1.currentTarget);
};
}
mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, true);
}
private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (_arg1.target == _arg3.target){
_local4 = _arg1.getAffectedProperties();
_local5 = _arg2.getAffectedProperties();
_local6 = _local4.length;
_local7 = _local5.length;
_local8 = 0;
while (_local8 < _local6) {
_local9 = 0;
while (_local9 < _local7) {
if (_local4[_local8] == _local5[_local9]){
return (true);
};
_local9++;
};
_local8++;
};
};
return (false);
}
private static function loadResources():void{
resourceIncorrectTrigger = packageResources.getString("incorrectTrigger");
}
mx_internal static function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
var _local6:DisplayObjectContainer;
_local2 = _arg1.effectInstance;
_local3 = effectsPlaying.length;
_local4 = (_local3 - 1);
while (_local4 >= 0) {
if (effectsPlaying[_local4].instance == _local2){
effectsPlaying.splice(_local4, 1);
break;
};
_local4--;
};
if (Object(_local2).hideOnEffectEnd == true){
_local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler);
_local2.target.setVisible(false, true);
};
if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){
_local5 = (_local2.target as DisplayObject);
if (_local5 != null){
_local6 = (_local5.parent as DisplayObjectContainer);
if (_local6 != null){
suspendEventHandling();
_local6.removeChild(_local5);
resumeEventHandling();
};
};
};
if (_local2.suspendBackgroundProcessing){
UIComponent.resumeBackgroundProcessing();
};
}
mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, true);
}
mx_internal static function setStyle(_arg1:String, _arg2):void{
var _local3:String;
_local3 = eventsForEffectTriggers[_arg1];
if (((!((_local3 == null))) && (!((_local3 == ""))))){
_arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
}
mx_internal static function getEventForEffectTrigger(_arg1:String):String{
var effectTrigger = _arg1;
if (eventsForEffectTriggers){
try {
return (eventsForEffectTriggers[effectTrigger]);
} catch(e:Error) {
return ("");
};
};
return ("");
}
mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{
var trigger:String;
var value:Object;
var effectClass:Class;
var cls:Class;
var effectObj:Effect;
var doc:Object;
var target = _arg1;
var type = _arg2;
trigger = effectTriggersForEvent[type];
if (trigger == ""){
trigger = (type + "Effect");
};
value = target.getStyle(trigger);
if (!value){
return (null);
};
if ((value is Class)){
cls = Class(value);
return (new cls(target));
};
try {
if ((value is String)){
doc = target.parentDocument;
if (!doc){
doc = Application.application;
};
effectObj = doc[value];
} else {
if ((value is Effect)){
effectObj = Effect(value);
};
};
if (effectObj){
effectObj.target = target;
return (effectObj);
};
} catch(e:Error) {
};
effectClass = Class(target.systemManager.getDefinitionByName(("mx.effects." + value)));
if (effectClass){
return (new effectClass(target));
};
return (null);
}
public static function resumeEventHandling():void{
eventHandlingSuspendCount--;
}
mx_internal static function startVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, false);
}
loadResources();
}
}//package mx.effects
class EffectNode {
public var instance:EffectInstance;
public var factory:Effect;
private function EffectNode(_arg1:Effect, _arg2:EffectInstance){
this.factory = _arg1;
this.instance = _arg2;
}
}
Section 163
//EffectTargetFilter (mx.effects.EffectTargetFilter)
package mx.effects {
import mx.effects.effectClasses.*;
public class EffectTargetFilter {
public var filterFunction:Function;
public var filterStyles:Array;
public var filterProperties:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function EffectTargetFilter(){
filterFunction = defaultFilterFunction;
filterProperties = [];
filterStyles = [];
super();
}
protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
var _local6:Array;
var _local7:int;
var _local8:int;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
_local6 = filterProperties.concat(filterStyles);
_local7 = _local6.length;
_local8 = 0;
while (_local8 < _local7) {
if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){
return (true);
};
_local8++;
};
};
_local4++;
};
return (false);
}
}
}//package mx.effects
Section 164
//Fade (mx.effects.Fade)
package mx.effects {
import mx.effects.effectClasses.*;
public class Fade extends TweenEffect {
public var alphaFrom:Number;
public var alphaTo:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["alpha", "visible"];
public function Fade(_arg1:Object=null){
super(_arg1);
instanceClass = FadeInstance;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:FadeInstance;
super.initInstance(_arg1);
_local2 = FadeInstance(_arg1);
_local2.alphaFrom = alphaFrom;
_local2.alphaTo = alphaTo;
}
}
}//package mx.effects
Section 165
//IEffectInstance (mx.effects.IEffectInstance)
package mx.effects {
import flash.events.*;
import mx.effects.effectClasses.*;
public interface IEffectInstance {
function set startDelay(_arg1:int):void;
function set triggerEvent(_arg1:Event):void;
function get playheadTime():Number;
function get triggerEvent():Event;
function finishEffect():void;
function finishRepeat():void;
function initEffect(_arg1:Event):void;
function get effect():Effect;
function startEffect():void;
function get duration():Number;
function set repeatDelay(_arg1:int):void;
function get target():Object;
function get startDelay():int;
function end():void;
function set propertyChanges(_arg1:PropertyChanges):void;
function set effect(_arg1:Effect):void;
function get className():String;
function get repeatDelay():int;
function set target(_arg1:Object):void;
function resume():void;
function get propertyChanges():PropertyChanges;
function set duration(_arg1:Number):void;
function reverse():void;
function get repeatCount():int;
function pause():void;
function set repeatCount(_arg1:int):void;
function set suspendBackgroundProcessing(_arg1:Boolean):void;
function play():void;
function get suspendBackgroundProcessing():Boolean;
}
}//package mx.effects
Section 166
//Move (mx.effects.Move)
package mx.effects {
import mx.effects.effectClasses.*;
public class Move extends TweenEffect {
public var xTo:Number;
public var yBy:Number;
public var xFrom:Number;
public var yFrom:Number;
public var yTo:Number;
public var xBy:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["x", "y"];
public function Move(_arg1:Object=null){
super(_arg1);
instanceClass = MoveInstance;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:MoveInstance;
super.initInstance(_arg1);
_local2 = MoveInstance(_arg1);
_local2.xFrom = xFrom;
_local2.xTo = xTo;
_local2.xBy = xBy;
_local2.yFrom = yFrom;
_local2.yTo = yTo;
_local2.yBy = yBy;
}
}
}//package mx.effects
Section 167
//Parallel (mx.effects.Parallel)
package mx.effects {
import mx.effects.effectClasses.*;
public class Parallel extends CompositeEffect {
mx_internal static const VERSION:String = "2.0.1.0";
public function Parallel(_arg1:Object=null){
super(_arg1);
instanceClass = ParallelInstance;
}
}
}//package mx.effects
Section 168
//Rotate (mx.effects.Rotate)
package mx.effects {
import mx.effects.effectClasses.*;
public class Rotate extends TweenEffect {
public var originY:Number;
public var angleFrom:Number;// = 0
public var angleTo:Number;// = 360
public var originX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["rotation"];
public function Rotate(_arg1:Object=null){
angleFrom = 0;
angleTo = 360;
super(_arg1);
instanceClass = RotateInstance;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:RotateInstance;
super.initInstance(_arg1);
_local2 = RotateInstance(_arg1);
_local2.angleFrom = angleFrom;
_local2.angleTo = angleTo;
_local2.originX = originX;
_local2.originY = originY;
}
}
}//package mx.effects
Section 169
//Tween (mx.effects.Tween)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var started:Boolean;// = false
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
private var previousUpdateTime:Number;
mx_internal var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
mx_internal var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
mx_internal static const VERSION:String = "2.0.1.0";
private static var timer:Timer = null;
private static var interval:Number = 10;
private static var activeTweens:Array = [];
mx_internal static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){
needToLayout = false;
maxDelay = 87.5;
_doSeek = false;
_isPlaying = true;
_doReverse = false;
userEquation = defaultEasingFunction;
started = false;
duration = 3000;
_playheadTime = 0;
_invertValues = false;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
if (_arg4 == 0){
endTween();
} else {
Tween.addTween(this);
};
}
public function pause():void{
_isPlaying = false;
}
mx_internal function get playheadTime():Number{
return (_playheadTime);
}
mx_internal function get playReversed():Boolean{
return (_invertValues);
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function endTween():void{
var _local1:TweenEvent;
var _local2:Object;
_local1 = new TweenEvent(TweenEvent.TWEEN_END);
_local2 = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
Tween.removeTweenAt(id);
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
mx_internal function doInterval():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
var _local5:TweenEvent;
_local1 = false;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
if (!started){
_local5 = new TweenEvent(TweenEvent.TWEEN_START);
dispatchEvent(_local5);
started = true;
};
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function seek(_arg1:Number):void{
var _local2:Number;
_local2 = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
mx_internal function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (duration == 0){
return (endValue);
};
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
mx_internal static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local2:Boolean;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Tween;
_local2 = false;
_local3 = intervalTime;
intervalTime = getTimer();
_local4 = activeTweens.length;
_local5 = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
UIComponentGlobals.layoutManager.validateNow();
};
_arg1.updateAfterEvent();
}
private static function removeTweenAt(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
_local2 = activeTweens.length;
_local3 = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 170
//TweenEffect (mx.effects.TweenEffect)
package mx.effects {
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
public class TweenEffect extends Effect {
public var easingFunction:Function;// = null
mx_internal static const VERSION:String = "2.0.1.0";
public function TweenEffect(_arg1:Object=null){
easingFunction = null;
super(_arg1);
instanceClass = TweenEffectInstance;
}
override protected function initInstance(_arg1:IEffectInstance):void{
super.initInstance(_arg1);
TweenEffectInstance(_arg1).easingFunction = easingFunction;
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
}
protected function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
}
}//package mx.effects
Section 171
//Zoom (mx.effects.Zoom)
package mx.effects {
import mx.effects.effectClasses.*;
public class Zoom extends TweenEffect {
public var originY:Number;
public var zoomWidthFrom:Number;
public var zoomWidthTo:Number;
public var zoomHeightFrom:Number;
public var captureRollEvents:Boolean;
public var zoomHeightTo:Number;
public var originX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"];
public function Zoom(_arg1:Object=null){
super(_arg1);
instanceClass = ZoomInstance;
applyActualDimensions = false;
relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"];
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:ZoomInstance;
super.initInstance(_arg1);
_local2 = ZoomInstance(_arg1);
_local2.zoomWidthFrom = zoomWidthFrom;
_local2.zoomWidthTo = zoomWidthTo;
_local2.zoomHeightFrom = zoomHeightFrom;
_local2.zoomHeightTo = zoomHeightTo;
_local2.originX = originX;
_local2.originY = originY;
_local2.captureRollEvents = captureRollEvents;
}
}
}//package mx.effects
Section 172
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class ChildExistenceChangedEvent extends Event {
public var relatedObject:DisplayObject;
public static const CHILD_REMOVE:String = "childRemove";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OVERLAY_CREATED:String = "overlayCreated";
public static const CHILD_ADD:String = "childAdd";
public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
}
override public function clone():Event{
return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject));
}
}
}//package mx.events
Section 173
//CloseEvent (mx.events.CloseEvent)
package mx.events {
import flash.events.*;
public class CloseEvent extends Event {
public var detail:int;
mx_internal static const VERSION:String = "2.0.1.0";
public static const CLOSE:String = "close";
public function CloseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1){
super(_arg1, _arg2, _arg3);
this.detail = _arg4;
}
override public function clone():Event{
return (new CloseEvent(type, bubbles, cancelable, detail));
}
}
}//package mx.events
Section 174
//CollectionEvent (mx.events.CollectionEvent)
package mx.events {
import flash.events.*;
public class CollectionEvent extends Event {
public var items:Array;
public var kind:String;
public var location:int;
public var oldLocation:int;
mx_internal static const VERSION:String = "2.0.1.0";
public static const COLLECTION_CHANGE:String = "collectionChange";
public function CollectionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:int=-1, _arg6:int=-1, _arg7:Array=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.location = _arg5;
this.oldLocation = _arg6;
this.items = (_arg7) ? _arg7 : [];
}
override public function clone():Event{
return (new CollectionEvent(type, bubbles, cancelable, kind, location, oldLocation, items));
}
override public function toString():String{
return (formatToString("CollectionEvent", "kind", "location", "oldLocation", "type", "bubbles", "cancelable", "eventPhase"));
}
}
}//package mx.events
Section 175
//CollectionEventKind (mx.events.CollectionEventKind)
package mx.events {
public final class CollectionEventKind {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const UPDATE:String = "update";
public static const MOVE:String = "move";
mx_internal static const EXPAND:String = "expand";
public static const REPLACE:String = "replace";
mx_internal static const VERSION:String = "2.0.1.0";
public static const REFRESH:String = "refresh";
public static const RESET:String = "reset";
}
}//package mx.events
Section 176
//DragEvent (mx.events.DragEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class DragEvent extends MouseEvent {
public var action:String;
public var draggedItem:Object;
public var dragSource:DragSource;
public var dragInitiator:IUIComponent;
public static const DRAG_DROP:String = "dragDrop";
public static const DRAG_COMPLETE:String = "dragComplete";
public static const DRAG_EXIT:String = "dragExit";
public static const DRAG_ENTER:String = "dragEnter";
public static const DRAG_START:String = "dragStart";
mx_internal static const VERSION:String = "2.0.1.0";
public static const DRAG_OVER:String = "dragOver";
public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3);
this.dragInitiator = _arg4;
this.dragSource = _arg5;
this.action = _arg6;
this.ctrlKey = _arg7;
this.altKey = _arg8;
this.shiftKey = _arg9;
}
override public function clone():Event{
var _local1:DragEvent;
_local1 = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey);
_local1.relatedObject = this.relatedObject;
_local1.localX = this.localX;
_local1.localY = this.localY;
return (_local1);
}
}
}//package mx.events
Section 177
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "2.0.1.0";
public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new DynamicEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 178
//EffectEvent (mx.events.EffectEvent)
package mx.events {
import flash.events.*;
import mx.effects.*;
public class EffectEvent extends Event {
public var effectInstance:IEffectInstance;
public static const EFFECT_START:String = "effectStart";
mx_internal static const VERSION:String = "2.0.1.0";
public static const EFFECT_END:String = "effectEnd";
public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){
super(_arg1, _arg2, _arg3);
this.effectInstance = _arg4;
}
override public function clone():Event{
return (new EffectEvent(type, bubbles, cancelable, effectInstance));
}
}
}//package mx.events
Section 179
//FlexEvent (mx.events.FlexEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class FlexEvent extends Event {
public static const ADD:String = "add";
public static const TRANSFORM_CHANGE:String = "transformChange";
public static const INIT_COMPLETE:String = "initComplete";
public static const REMOVE:String = "remove";
public static const BUTTON_DOWN:String = "buttonDown";
public static const EXIT_STATE:String = "exitState";
public static const CREATION_COMPLETE:String = "creationComplete";
public static const REPEAT:String = "repeat";
public static const LOADING:String = "loading";
public static const REPEAT_START:String = "repeatStart";
public static const INITIALIZE:String = "initialize";
public static const ENTER_STATE:String = "enterState";
public static const URL_CHANGED:String = "urlChanged";
public static const REPEAT_END:String = "repeatEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 180
//FlexMouseEvent (mx.events.FlexMouseEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class FlexMouseEvent extends MouseEvent {
public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside";
public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside";
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
}
override public function clone():Event{
return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta));
}
}
}//package mx.events
Section 181
//IndexChangedEvent (mx.events.IndexChangedEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class IndexChangedEvent extends Event {
public var triggerEvent:Event;
public var relatedObject:DisplayObject;
public var newIndex:Number;
public var oldIndex:Number;
public static const HEADER_SHIFT:String = "headerShift";
public static const CHANGE:String = "change";
mx_internal static const VERSION:String = "2.0.1.0";
public static const CHILD_INDEX_CHANGE:String = "childIndexChange";
public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
this.oldIndex = _arg5;
this.newIndex = _arg6;
this.triggerEvent = _arg7;
}
override public function clone():Event{
return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent));
}
}
}//package mx.events
Section 182
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "2.0.1.0";
public static var READY:String = "ready";
public static var ERROR:String = "error";
public static var PROGRESS:String = "progress";
public static var SETUP:String = "setup";
public static var UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
public function get module():IModuleInfo{
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 183
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
public class MoveEvent extends Event {
public var oldY:Number;
public var oldX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 184
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
public class PropertyChangeEvent extends Event {
public var oldValue:Object;
public var property:Object;
public var source:Object;
public var kind:String;
public var newValue:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent;
_local5 = new PropertyChangeEvent(PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
_local5.source = _arg1;
_local5.property = _arg2;
return (_local5);
}
}
}//package mx.events
Section 185
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "2.0.1.0";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 186
//ResizeEvent (mx.events.ResizeEvent)
package mx.events {
import flash.events.*;
public class ResizeEvent extends Event {
public var oldHeight:Number;
public var oldWidth:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 187
//RSLEvent (mx.events.RSLEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
import flash.net.*;
public class RSLEvent extends ProgressEvent {
public var errorText:String;
public var rslIndex:int;
public var rslTotal:int;
public var url:URLRequest;
public static const RSL_PROGRESS:String = "rslProgress";
public static const RSL_ERROR:String = "rslError";
mx_internal static const VERSION:String = "2.0.1.0";
public static const RSL_COMPLETE:String = "rslComplete";
public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.rslIndex = _arg6;
this.rslTotal = _arg7;
this.url = _arg8;
this.errorText = _arg9;
}
override public function clone():Event{
return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText));
}
}
}//package mx.events
Section 188
//ScrollEvent (mx.events.ScrollEvent)
package mx.events {
import flash.events.*;
public class ScrollEvent extends Event {
public var detail:String;
public var position:Number;
public var delta:Number;
public var direction:String;
mx_internal static const VERSION:String = "2.0.1.0";
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){
super(_arg1, _arg2, _arg3);
this.detail = _arg4;
this.position = _arg5;
this.direction = _arg6;
this.delta = _arg7;
}
override public function clone():Event{
return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta));
}
}
}//package mx.events
Section 189
//ScrollEventDetail (mx.events.ScrollEventDetail)
package mx.events {
public final class ScrollEventDetail {
public static const LINE_UP:String = "lineUp";
public static const AT_RIGHT:String = "atRight";
public static const PAGE_UP:String = "pageUp";
public static const LINE_DOWN:String = "lineDown";
public static const PAGE_DOWN:String = "pageDown";
public static const AT_LEFT:String = "atLeft";
public static const PAGE_RIGHT:String = "pageRight";
public static const THUMB_POSITION:String = "thumbPosition";
public static const AT_TOP:String = "atTop";
public static const LINE_LEFT:String = "lineLeft";
public static const AT_BOTTOM:String = "atBottom";
public static const LINE_RIGHT:String = "lineRight";
public static const THUMB_TRACK:String = "thumbTrack";
public static const PAGE_LEFT:String = "pageLeft";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.events
Section 190
//ScrollEventDirection (mx.events.ScrollEventDirection)
package mx.events {
public final class ScrollEventDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.events
Section 191
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
public class StateChangeEvent extends Event {
public var oldState:String;
public var newState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "2.0.1.0";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 192
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import mx.core.*;
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "2.0.1.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 193
//ToolTipEvent (mx.events.ToolTipEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ToolTipEvent extends Event {
public var toolTip:IToolTip;
public static const TOOL_TIP_SHOWN:String = "toolTipShown";
public static const TOOL_TIP_CREATE:String = "toolTipCreate";
public static const TOOL_TIP_SHOW:String = "toolTipShow";
public static const TOOL_TIP_HIDE:String = "toolTipHide";
public static const TOOL_TIP_END:String = "toolTipEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const TOOL_TIP_START:String = "toolTipStart";
public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){
super(_arg1, _arg2, _arg3);
this.toolTip = _arg4;
}
override public function clone():Event{
return (new ToolTipEvent(type, bubbles, cancelable, toolTip));
}
}
}//package mx.events
Section 194
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_END:String = "tweenEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_START:String = "tweenStart";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 195
//ValidationResultEvent (mx.events.ValidationResultEvent)
package mx.events {
import flash.events.*;
public class ValidationResultEvent extends Event {
public var results:Array;
public var field:String;
public static const INVALID:String = "invalid";
mx_internal static const VERSION:String = "2.0.1.0";
public static const VALID:String = "valid";
public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.field = _arg4;
this.results = _arg5;
}
public function get message():String{
var _local1:String;
var _local2:int;
var _local3:int;
_local1 = "";
_local2 = results.length;
_local3 = 0;
while (_local3 < _local2) {
if (results[_local3].isError){
_local1 = (_local1 + ((_local1 == "")) ? "" : "\n");
_local1 = (_local1 + results[_local3].errorMessage);
};
_local3++;
};
return (_local1);
}
override public function clone():Event{
return (new ValidationResultEvent(type, bubbles, cancelable, field, results));
}
}
}//package mx.events
Section 196
//GeneratedLocale (mx.generated.GeneratedLocale)
package mx.generated {
import mx.resources.*;
public class GeneratedLocale extends Locale {
public function GeneratedLocale(){
super("en_US");
}
}
}//package mx.generated
Section 197
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var _trRadius:Number;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function RectangularDropShadow(){
changed = true;
_alpha = 0.4;
_angle = 45;
_color = 0;
_distance = 4;
_tlRadius = 0;
_trRadius = 0;
_blRadius = 0;
_brRadius = 0;
super();
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:Number;
var _local13:Number;
var _local14:Matrix;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
_local6 = (leftShadow) ? leftShadow.width : 0;
_local7 = (rightShadow) ? rightShadow.width : 0;
_local8 = (topShadow) ? topShadow.height : 0;
_local9 = (bottomShadow) ? bottomShadow.height : 0;
_local10 = (_local6 + _local7);
_local11 = (_local8 + _local9);
_local12 = ((_arg5 + _local11) / 2);
_local13 = ((_arg4 + _local10) / 2);
_local14 = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number;
var _local2:Number;
var _local3:Shape;
var _local4:Graphics;
var _local5:BitmapData;
var _local6:DropShadowFilter;
var _local7:Rectangle;
var _local8:Rectangle;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Point;
var _local14:Rectangle;
_local1 = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
_local2 = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
_local3 = new FlexShape();
_local4 = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
_local5 = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
_local6 = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
_local7 = new Rectangle(0, 0, _local1, _local2);
_local8 = _local5.generateFilterRect(_local7, _local6);
_local9 = (_local7.left - _local8.left);
_local10 = (_local8.right - _local7.right);
_local11 = (_local7.top - _local8.top);
_local12 = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
_local13 = new Point(0, 0);
_local14 = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 198
//RoundedRectangle (mx.graphics.RoundedRectangle)
package mx.graphics {
import flash.geom.*;
import mx.core.*;
public class RoundedRectangle extends Rectangle {
public var cornerRadius:Number;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
cornerRadius = 0;
super(_arg1, _arg2, _arg3, _arg4);
this.cornerRadius = _arg5;
}
}
}//package mx.graphics
Section 199
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue)
package mx.managers.layoutClasses {
import mx.core.*;
import flash.display.*;
import mx.managers.*;
public class PriorityQueue {
private var maxPriority:int;// = -1
private var arrayOfArrays:Array;
private var minPriority:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
public function PriorityQueue(){
arrayOfArrays = [];
minPriority = 0;
maxPriority = -1;
super();
}
public function addObject(_arg1:Object, _arg2:int):void{
if (!arrayOfArrays[_arg2]){
arrayOfArrays[_arg2] = [];
};
arrayOfArrays[_arg2].push(_arg1);
if (maxPriority < minPriority){
minPriority = (maxPriority = _arg2);
} else {
if (_arg2 < minPriority){
minPriority = _arg2;
};
if (_arg2 > maxPriority){
maxPriority = _arg2;
};
};
}
public function removeSmallest():Object{
var _local1:Object;
_local1 = null;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
return (null);
};
};
_local1 = arrayOfArrays[minPriority].shift();
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
break;
};
};
};
return (_local1);
}
public function removeLargestChild(_arg1:ILayoutManagerClient):Object{
var _local2:Object;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = null;
_local3 = maxPriority;
_local4 = _arg1.nestLevel;
while (_local4 <= _local3) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local5 = 0;
while (_local5 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){
_local2 = arrayOfArrays[_local3][_local5];
arrayOfArrays[_local3].splice(_local5, 1);
return (_local2);
};
_local5++;
};
_local3--;
} else {
if (_local3 == maxPriority){
maxPriority--;
};
_local3--;
if (_local3 < _local4){
break;
};
};
};
return (_local2);
}
public function isEmpty():Boolean{
return ((minPriority > maxPriority));
}
public function removeLargest():Object{
var _local1:Object;
_local1 = null;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
return (null);
};
};
_local1 = arrayOfArrays[maxPriority].shift();
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
break;
};
};
};
return (_local1);
}
public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{
var _local2:Object;
var _local3:int;
var _local4:int;
_local2 = null;
_local3 = _arg1.nestLevel;
while (_local3 <= maxPriority) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local4 = 0;
while (_local4 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){
_local2 = arrayOfArrays[_local3][_local4];
arrayOfArrays[_local3].splice(_local4, 1);
return (_local2);
};
_local4++;
};
_local3++;
} else {
if (_local3 == minPriority){
minPriority++;
};
_local3++;
if (_local3 > maxPriority){
break;
};
};
};
return (_local2);
}
public function removeAll():void{
arrayOfArrays.splice(0);
minPriority = 0;
maxPriority = -1;
}
private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
var _local3:IChildList;
if ((_arg1 is IRawChildrenContainer)){
_local3 = IRawChildrenContainer(_arg1).rawChildren;
return (_local3.contains(_arg2));
};
if ((_arg1 is DisplayObjectContainer)){
return (DisplayObjectContainer(_arg1).contains(_arg2));
};
return ((_arg1 == _arg2));
}
}
}//package mx.managers.layoutClasses
Section 200
//CursorManager (mx.managers.CursorManager)
package mx.managers {
import mx.core.*;
public class CursorManager {
public static const NO_CURSOR:int = 0;
mx_internal static const VERSION:String = "2.0.1.0";
private static var impl:ICursorManager = (Singleton.getInstance("mx.managers::ICursorManager") as ICursorManager);
private static var implClassDependency:CursorManagerImpl;
public static function removeCursor(_arg1:int):void{
impl.removeCursor(_arg1);
}
public static function hideCursor():void{
impl.hideCursor();
}
public static function setBusyCursor():void{
impl.setBusyCursor();
}
public static function get currentCursorID():int{
return (impl.currentCursorID);
}
public static function removeBusyCursor():void{
impl.removeBusyCursor();
}
mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{
impl.unRegisterToUseBusyCursor(_arg1);
}
public static function removeAllCursors():void{
impl.removeAllCursors();
}
public static function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
return (impl.setCursor(_arg1, _arg2, _arg3, _arg4));
}
public static function showCursor():void{
impl.showCursor();
}
public static function set currentCursorYOffset(_arg1:Number):void{
impl.currentCursorYOffset = _arg1;
}
public static function set currentCursorID(_arg1:int):void{
impl.currentCursorID = _arg1;
}
public static function get currentCursorXOffset():Number{
return (impl.currentCursorXOffset);
}
public static function get currentCursorYOffset():Number{
return (impl.currentCursorYOffset);
}
mx_internal static function registerToUseBusyCursor(_arg1:Object):void{
impl.registerToUseBusyCursor(_arg1);
}
public static function set currentCursorXOffset(_arg1:Number):void{
impl.currentCursorXOffset = _arg1;
}
}
}//package mx.managers
Section 201
//CursorManagerImpl (mx.managers.CursorManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import flash.ui.*;
public class CursorManagerImpl implements ICursorManager {
private var showSystemCursor:Boolean;// = false
private var nextCursorID:int;// = 1
private var systemManager:SystemManager;// = null
private var cursorList:Array;
private var _currentCursorYOffset:Number;// = 0
private var cursorHolder:Sprite;
private var currentCursor:DisplayObject;
private var _currentCursorID:int;// = 0
private var showCustomCursor:Boolean;// = false
private var initialized:Boolean;// = false
private var overTextField:Boolean;// = false
private var _currentCursorXOffset:Number;// = 0
private var busyCursorList:Array;
private var overLink:Boolean;// = false
private var sourceArray:Array;
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:ICursorManager;
public function CursorManagerImpl(){
nextCursorID = 1;
cursorList = [];
busyCursorList = [];
initialized = false;
overTextField = false;
overLink = false;
showSystemCursor = false;
showCustomCursor = false;
systemManager = null;
sourceArray = [];
_currentCursorID = 0;
_currentCursorXOffset = 0;
_currentCursorYOffset = 0;
super();
if (instance){
throw (new Error("Instance already exists."));
};
}
public function get currentCursorXOffset():Number{
return (_currentCursorXOffset);
}
public function set currentCursorYOffset(_arg1:Number):void{
_currentCursorYOffset = _arg1;
}
public function get currentCursorID():int{
return (_currentCursorID);
}
public function removeCursor(_arg1:int):void{
var _local2:Object;
var _local3:CursorQueueItem;
for (_local2 in cursorList) {
_local3 = cursorList[_local2];
if (_local3.cursorID == _arg1){
cursorList.splice(_local2, 1);
showCurrentCursor();
break;
};
};
}
public function removeAllCursors():void{
cursorList.splice(0);
showCurrentCursor();
}
private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{
if (_arg1.priority < _arg2.priority){
return (-1);
};
if (_arg1.priority == _arg2.priority){
return (0);
};
return (1);
}
public function set currentCursorID(_arg1:int):void{
_currentCursorID = _arg1;
}
public function setBusyCursor():void{
var _local1:CSSStyleDeclaration;
var _local2:Class;
_local1 = StyleManager.getStyleDeclaration("CursorManager");
_local2 = _local1.getStyle("busyCursor");
busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW));
}
public function showCursor():void{
cursorHolder.visible = true;
}
private function findSource(_arg1:Object):int{
var _local2:int;
var _local3:int;
_local2 = sourceArray.length;
_local3 = 0;
while (_local3 < _local2) {
if (sourceArray[_local3] === _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
private function showCurrentCursor():void{
var _local1:CursorQueueItem;
if (systemManager == null){
systemManager = Application.application.systemManager;
};
if (cursorList.length > 0){
if (!initialized){
cursorHolder = new FlexSprite();
cursorHolder.name = "cursorHolder";
cursorHolder.mouseEnabled = false;
systemManager.cursorChildren.addChild(cursorHolder);
initialized = true;
};
_local1 = cursorList[0];
if (currentCursorID == CursorManager.NO_CURSOR){
Mouse.hide();
};
if (_local1.cursorID != currentCursorID){
if (cursorHolder.numChildren > 0){
cursorHolder.removeChildAt(0);
};
currentCursor = new _local1.cursorClass();
if (currentCursor){
if ((currentCursor is InteractiveObject)){
InteractiveObject(currentCursor).mouseEnabled = false;
};
cursorHolder.addChild(currentCursor);
cursorHolder.x = (systemManager.mouseX + _local1.x);
cursorHolder.y = (systemManager.mouseY + _local1.y);
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
currentCursorID = _local1.cursorID;
currentCursorXOffset = _local1.x;
currentCursorYOffset = _local1.y;
};
} else {
if (currentCursorID != CursorManager.NO_CURSOR){
currentCursorID = CursorManager.NO_CURSOR;
currentCursorXOffset = 0;
currentCursorYOffset = 0;
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
cursorHolder.removeChild(currentCursor);
};
Mouse.show();
};
}
public function get currentCursorYOffset():Number{
return (_currentCursorYOffset);
}
public function hideCursor():void{
cursorHolder.visible = false;
}
public function registerToUseBusyCursor(_arg1:Object):void{
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function completeHandler(_arg1:Event):void{
var _local2:int;
_local2 = findSource(_arg1.target);
if (_local2 != -1){
sourceArray.splice(_local2, 1);
removeBusyCursor();
};
}
public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
var _local5:int;
var _local6:CursorQueueItem;
_local5 = nextCursorID++;
_local6 = new CursorQueueItem();
_local6.cursorID = _local5;
_local6.cursorClass = _arg1;
_local6.priority = _arg2;
_local6.x = _arg3;
_local6.y = _arg4;
cursorList.push(_local6);
cursorList.sort(priorityCompare);
showCurrentCursor();
return (_local5);
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:int;
_local2 = findSource(_arg1.target);
if (_local2 == -1){
sourceArray.push(_arg1.target);
setBusyCursor();
};
}
public function removeBusyCursor():void{
if (busyCursorList.length > 0){
removeCursor(int(busyCursorList.pop()));
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Object;
cursorHolder.x = (systemManager.mouseX + currentCursorXOffset);
cursorHolder.y = (systemManager.mouseY + currentCursorYOffset);
_local2 = _arg1.target;
if (((((!(overTextField)) && ((_local2 is TextField)))) && ((_local2.type == TextFieldType.INPUT)))){
overTextField = true;
showSystemCursor = true;
} else {
if (((overTextField) && (!((((_local2 is TextField)) && ((_local2.type == TextFieldType.INPUT))))))){
overTextField = false;
showCustomCursor = true;
};
};
if (showSystemCursor){
showSystemCursor = false;
cursorHolder.visible = false;
Mouse.show();
};
if (showCustomCursor){
showCustomCursor = false;
cursorHolder.visible = true;
Mouse.hide();
};
}
public function unRegisterToUseBusyCursor(_arg1:Object):void{
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.removeEventListener(Event.COMPLETE, completeHandler);
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
public function set currentCursorXOffset(_arg1:Number):void{
_currentCursorXOffset = _arg1;
}
public static function getInstance():ICursorManager{
if (!instance){
instance = new (CursorManagerImpl);
};
return (instance);
}
}
}//package mx.managers
class CursorQueueItem {
public var cursorClass:Class;// = null
public var priority:int;// = 2
public var cursorID:int;// = 0
public var x:Number;
public var y:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private function CursorQueueItem(){
cursorID = CursorManager.NO_CURSOR;
cursorClass = null;
priority = CursorManagerPriority.MEDIUM;
super();
}
}
Section 202
//CursorManagerPriority (mx.managers.CursorManagerPriority)
package mx.managers {
public final class CursorManagerPriority {
public static const HIGH:int = 1;
public static const MEDIUM:int = 2;
mx_internal static const VERSION:String = "2.0.1.0";
public static const LOW:int = 3;
}
}//package mx.managers
Section 203
//FocusManager (mx.managers.FocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.text.*;
import mx.controls.*;
import flash.system.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var _showFocusIndicator:Boolean;// = false
private var focusableCandidates:Array;
private var LARGE_TAB_INDEX:int;// = 99999
private var browserFocusComponent:InteractiveObject;
private var calculateCandidates:Boolean;// = true
private var lastAction:String;
private var focusableObjects:Array;
private var defButton:Button;
private var _form:IFocusManagerContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var _focusPane:Sprite;
private var lastFocus:IFocusManagerComponent;
private var browserMode:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){
LARGE_TAB_INDEX = 99999;
calculateCandidates = true;
activated = false;
_showFocusIndicator = false;
_defaultButtonEnabled = true;
super();
browserMode = (((Capabilities.playerType == "ActiveX")) && (!(_arg2)));
_arg1.focusManager = this;
_form = _arg1;
focusableObjects = [];
focusPane = new FlexSprite();
focusPane.name = "focusPane";
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
_arg1.addEventListener(FlexEvent.SHOW, showHandler);
_arg1.addEventListener(FlexEvent.HIDE, hideHandler);
if (_arg1 != SystemManager(_arg1.systemManager).application){
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
_arg1.systemManager.addFocusManager(_arg1);
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var doc:DisplayObjectContainer;
var i:int;
var rawChildren:IChildList;
var o = _arg1;
var skipTopLevel = _arg2;
if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects.push(o);
calculateCandidates = true;
};
o.addEventListener("tabEnabledChange", tabEnabledChangeHandler);
o.addEventListener("tabIndexChange", tabIndexChangeHandler);
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener("tabChildrenChange", tabChildrenChangeHandler);
if (doc.tabChildren){
if ((o is IRawChildrenContainer)){
rawChildren = IRawChildrenContainer(o).rawChildren;
i = 0;
while (i < rawChildren.numChildren) {
try {
addFocusables(rawChildren.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
} else {
i = 0;
while (i < doc.numChildren) {
try {
addFocusables(doc.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
var parent = _arg1;
var child = _arg2;
try {
return (parent.getChildIndex(child));
} catch(e:Error) {
if ((parent is IRawChildrenContainer)){
return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child));
};
throw (e);
};
throw (new Error("FocusManager.getChildIndex failed"));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
var _local2:TextField;
if ((_arg1.relatedObject is TextField)){
_local2 = (_arg1.relatedObject as TextField);
if ((((_local2.type == "input")) || (_local2.selectable))){
return;
};
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
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 removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
if (!_arg2){
_arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler);
};
_local3 = 0;
while (_local3 < focusableObjects.length) {
if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){
if (focusableObjects[_local3] == lastFocus){
lastFocus.drawFocus(false);
lastFocus = null;
};
focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local3, 1);
_local3--;
calculateCandidates = true;
};
_local3++;
};
};
}
public function getFocus():IFocusManagerComponent{
var _local1:InteractiveObject;
_local1 = form.systemManager.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2, true);
};
}
private function sortByDepth(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = 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);
}
mx_internal function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent("click"));
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:int;
var _local2:int;
var _local3:InteractiveObject;
focusableCandidates = [];
_local1 = focusableObjects.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = focusableObjects[_local2];
if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local3);
_local2++;
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){
if (browserFocusComponent){
if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){
browserFocusComponent.tabIndex = -1;
};
browserFocusComponent = null;
return;
};
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function get nextTabIndex():int{
return ((getMaxTabIndex() + 1));
}
public function get focusPane():Sprite{
return (_focusPane);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:DisplayObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(IFocusManagerComponent(_local2));
};
lastAction = "MOUSEDOWN";
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:SystemManager;
var _local3:DisplayObject;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:IFocusManagerGroup;
_local2 = SystemManager(form.systemManager);
_local2.idleCounter = 0;
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (browserMode){
if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){
_local3 = form.systemManager.stage.focus;
_local3 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local3)));
_local4 = "";
if ((_local3 is IFocusManagerGroup)){
_local7 = IFocusManagerGroup(_local3);
_local4 = _local7.groupName;
};
_local5 = getIndexOfFocusedObject(_local3);
_local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4);
if (_arg1.shiftKey){
if (_local6 >= _local5){
browserFocusComponent = form.systemManager.stage.focus;
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
};
};
} else {
if (_local6 <= _local5){
browserFocusComponent = form.systemManager.stage.focus;
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
};
};
};
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
defButton.callLater(sendDefaultButtonEvent);
};
}
public function toString():String{
return ((Object(form).toString() + ".focusManager"));
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (isParent(DisplayObjectContainer(form), _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;
};
};
};
}
public function deactivate():void{
form.systemManager.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.systemManager.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.systemManager.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.systemManager.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{
if ((_arg1 is IRawChildrenContainer)){
return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2));
};
return (_arg1.contains(_arg2));
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _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 getMaxTabIndex():int{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:Number;
_local1 = 0;
_local2 = focusableObjects.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = focusableObjects[_local3].tabIndex;
if (!isNaN(_local4)){
_local1 = Math.max(_local1, _local4);
};
_local3++;
};
return (_local1);
}
private function showHandler(_arg1:Event):void{
form.systemManager.activate(form);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (IFocusManagerComponent(_arg1));
};
_arg1 = _arg1.parent;
};
return (null);
}
public function setFocus(_arg1:IFocusManagerComponent):void{
_arg1.setFocus();
}
mx_internal function set form(_arg1:IFocusManagerContainer):void{
_form = _arg1;
}
private function sortFocusableObjectsTabIndex():void{
var _local1:int;
var _local2:int;
var _local3:IFocusManagerComponent;
focusableCandidates = [];
_local1 = focusableObjects.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = focusableObjects[_local2];
if (((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))){
focusableCandidates.push(_local3);
};
_local2++;
};
focusableCandidates.sort(sortByTabIndex);
}
public function set defaultButton(_arg1:IUIComponent):void{
var _local2:Button;
_local2 = (_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 setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:IFocusManagerComponent;
if (focusableObjects.length == 0){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (IUIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function hideHandler(_arg1:Event):void{
form.systemManager.deactivate(form);
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is IUIComponent)){
if (!IUIComponent(_arg1).enabled){
return (false);
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function hideFocus():void{
if (showFocusIndicator){
showFocusIndicator = false;
if (lastFocus){
lastFocus.drawFocus(false);
};
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
mx_internal function get form():IFocusManagerContainer{
return (_form);
}
public function set focusPane(_arg1:Sprite):void{
_focusPane = _arg1;
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
_local3 = DisplayObject(_arg1.target);
if ((_local3 is IFocusManagerComponent)){
_local2 = 0;
while (_local2 < focusableObjects.length) {
if (_local3 == focusableObjects[_local2]){
if (_local3 == lastFocus){
lastFocus.drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
_local3.removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local2, 1);
calculateCandidates = true;
break;
};
_local2++;
};
};
removeFocusables(_local3, false);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (((lastFocus) && (!(browserMode)))){
lastFocus.setFocus();
};
lastAction = "ACTIVATE";
}
public function get defaultButton():IUIComponent{
return (_defaultButton);
}
public function showFocus():void{
if (!showFocusIndicator){
showFocusIndicator = true;
if (lastFocus){
lastFocus.drawFocus(true);
};
};
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (focusableObjects.length == 0){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.systemManager.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObject;
var _local3:DisplayObjectContainer;
_local2 = DisplayObject(form.systemManager);
if (!_local2){
return (false);
};
_local3 = _arg1.parent;
while (((_local3) && (!((_local3 == _local2))))) {
if (!_local3.tabChildren){
return (false);
};
_local3 = _local3.parent;
};
return (true);
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
private function sortByTabIndex(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):int{
var _local3:int;
var _local4:int;
_local3 = _arg1.tabIndex;
_local4 = _arg2.tabIndex;
if (_local3 == -1){
_local3 = int.MAX_VALUE;
};
if (_local4 == -1){
_local4 = int.MAX_VALUE;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.systemManager.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.systemManager.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.systemManager.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.systemManager.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 get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (((DisplayObject(form).visible) && (!(activated)))){
form.systemManager.activate(form);
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:int;
var _local4:int;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = focusableObjects.length;
_local4 = 0;
while (_local4 < _local3) {
if (focusableObjects[_local4] == _local2){
break;
};
_local4++;
};
if (_local2.tabEnabled){
if ((((_local4 == _local3)) && (isTabVisible(_local2)))){
focusableObjects.push(_local2);
};
} else {
if (_local4 < _local3){
focusableObjects.splice(_local4, 1);
};
};
}
}
}//package mx.managers
Section 204
//ICursorManager (mx.managers.ICursorManager)
package mx.managers {
public interface ICursorManager {
function removeAllCursors():void;
function removeBusyCursor():void;
function registerToUseBusyCursor(_arg1:Object):void;
function unRegisterToUseBusyCursor(_arg1:Object):void;
function removeCursor(_arg1:int):void;
function get currentCursorID():int;
function set currentCursorXOffset(_arg1:Number):void;
function setBusyCursor():void;
function showCursor():void;
function set currentCursorID(_arg1:int):void;
function hideCursor():void;
function set currentCursorYOffset(_arg1:Number):void;
function get currentCursorXOffset():Number;
function get currentCursorYOffset():Number;
function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int;
}
}//package mx.managers
Section 205
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.display.*;
import mx.core.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function hideFocus():void;
function set defaultButton(_arg1:IUIComponent):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function set focusPane(_arg1:Sprite):void;
function get nextTabIndex():int;
function get defaultButton():IUIComponent;
function get showFocusIndicator():Boolean;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function setFocus(_arg1:IFocusManagerComponent):void;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 206
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.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 mx.managers
Section 207
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.display.*;
import flash.events.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 208
//IFocusManagerGroup (mx.managers.IFocusManagerGroup)
package mx.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package mx.managers
Section 209
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
function isInvalid():Boolean;
function validateNow():void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
}
}//package mx.managers
Section 210
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function get nestLevel():int;
function get updateCompletePendingFlag():Boolean;
function validateDisplayList():void;
function set processedDescriptors(_arg1:Boolean):void;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function get initialized():Boolean;
}
}//package mx.managers
Section 211
//IPopUpManager (mx.managers.IPopUpManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
public interface IPopUpManager {
function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject;
function centerPopUp(_arg1:IFlexDisplayObject):void;
function removePopUp(_arg1:IFlexDisplayObject):void;
function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void;
function bringToFront(_arg1:IFlexDisplayObject):void;
}
}//package mx.managers
Section 212
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get toolTipChildren():IChildList;
function get numModalWindows():int;
function isTopLevel():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get topLevelSystemManager():ISystemManager;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function set focusPane(_arg1:Sprite):void;
function get rawChildren():IChildList;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function deactivate(_arg1:IFocusManagerContainer):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function set numModalWindows(_arg1:int):void;
}
}//package mx.managers
Section 213
//IToolTipManager (mx.managers.IToolTipManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public interface IToolTipManager {
function registerToolTip(_arg1:DisplayObject, _arg2:String):void;
function set enabled(_arg1:Boolean):void;
function get showDelay():Number;
function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip;
function get enabled():Boolean;
function destroyToolTip(_arg1:IToolTip):void;
function set showDelay(_arg1:Number):void;
function set hideDelay(_arg1:Number):void;
function get scrubDelay():Number;
function get toolTipClass():Class;
function registerErrorString(_arg1:DisplayObject, _arg2:String):void;
function sizeTip(_arg1:IToolTip):void;
function set currentTarget(_arg1:DisplayObject):void;
function set showEffect(_arg1:Effect):void;
function get hideDelay():Number;
function set currentToolTip(_arg1:IToolTip):void;
function set hideEffect(_arg1:Effect):void;
function set scrubDelay(_arg1:Number):void;
function get currentToolTip():IToolTip;
function get showEffect():Effect;
function get currentTarget():DisplayObject;
function get hideEffect():Effect;
function set toolTipClass(_arg1:Class):void;
}
}//package mx.managers
Section 214
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function set toolTip(_arg1:String):void;
function get toolTip():String;
}
}//package mx.managers
Section 215
//LayoutManager (mx.managers.LayoutManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import mx.managers.layoutClasses.*;
public class LayoutManager extends EventDispatcher implements ILayoutManager {
private var invalidateClientSizeFlag:Boolean;// = false
private var invalidateSizeQueue:PriorityQueue;
private var updateCompleteQueue:PriorityQueue;
private var originalFrameRate:Number;
private var _usePhasedInstantiation:Boolean;// = false
private var callLaterObject:UIComponent;
private var invalidateClientPropertiesFlag:Boolean;// = false
private var invalidateDisplayListQueue:PriorityQueue;
private var invalidateDisplayListFlag:Boolean;// = false
private var invalidatePropertiesFlag:Boolean;// = false
private var invalidatePropertiesQueue:PriorityQueue;
private var invalidateSizeFlag:Boolean;// = false
private var callLaterPending:Boolean;// = false
private var targetLevel:int;// = 2147483647
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:LayoutManager;
public function LayoutManager(){
updateCompleteQueue = new PriorityQueue();
invalidatePropertiesQueue = new PriorityQueue();
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
invalidateSizeQueue = new PriorityQueue();
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
invalidateDisplayListQueue = new PriorityQueue();
invalidateDisplayListFlag = false;
callLaterPending = false;
targetLevel = int.MAX_VALUE;
_usePhasedInstantiation = false;
super();
}
private function waitAFrame():void{
callLaterObject.callLater(doPhasedInstantiation);
}
public function get usePhasedInstantiation():Boolean{
return (_usePhasedInstantiation);
}
public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{
var _local3:ILayoutManagerClient;
var _local4:int;
var _local5:Boolean;
var _local6:int;
_local4 = 0;
_local5 = false;
_local6 = targetLevel;
if (targetLevel == int.MAX_VALUE){
targetLevel = _arg1.nestLevel;
};
while (!(_local5)) {
_local5 = true;
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateProperties();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
while (_local3) {
_local3.validateSize();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
};
if (!_arg2){
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateDisplayList();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
if (invalidateClientSizeFlag){
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
if (_local3){
invalidateSizeQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
};
};
if (_local6 == int.MAX_VALUE){
targetLevel = int.MAX_VALUE;
if (!_arg2){
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
while (_local3) {
if (!_local3.initialized){
_local3.initialized = true;
};
_local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local3.updateCompletePendingFlag = false;
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
};
};
};
}
private function validateDisplayList():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
while (_local1) {
_local1.validateDisplayList();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
}
private function validateSize():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
while (_local1) {
_local1.validateSize();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
};
}
public function invalidateProperties(_arg1:ILayoutManagerClient):void{
if (((!(invalidatePropertiesFlag)) && (Application.application.systemManager))){
invalidatePropertiesFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientPropertiesFlag = true;
};
invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel);
}
public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{
if (((!(invalidateDisplayListFlag)) && (Application.application.systemManager))){
invalidateDisplayListFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel);
}
public function validateNow():void{
var _local1:int;
if (!usePhasedInstantiation){
_local1 = 0;
while (((callLaterPending) && ((_local1 < 100)))) {
doPhasedInstantiation();
};
};
}
public function invalidateSize(_arg1:ILayoutManagerClient):void{
if (((!(invalidateSizeFlag)) && (Application.application.systemManager))){
invalidateSizeFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientSizeFlag = true;
};
invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel);
}
public function isInvalid():Boolean{
return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag)));
}
private function validateProperties():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
while (_local1) {
_local1.validateProperties();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
};
}
private function doPhasedInstantiation():void{
var _local1:ILayoutManagerClient;
if (usePhasedInstantiation){
if (invalidatePropertiesFlag){
validateProperties();
Application.application.dispatchEvent(new Event("validatePropertiesComplete"));
} else {
if (invalidateSizeFlag){
validateSize();
Application.application.dispatchEvent(new Event("validateSizeComplete"));
} else {
if (invalidateDisplayListFlag){
validateDisplayList();
Application.application.dispatchEvent(new Event("validateDisplayListComplete"));
};
};
};
} else {
if (invalidatePropertiesFlag){
validateProperties();
};
if (invalidateSizeFlag){
validateSize();
};
if (invalidateDisplayListFlag){
validateDisplayList();
};
};
if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){
callLaterObject.callLater(doPhasedInstantiation);
} else {
usePhasedInstantiation = false;
callLaterPending = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
while (_local1) {
if (((!(_local1.initialized)) && (_local1.processedDescriptors))){
_local1.initialized = true;
};
_local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local1.updateCompletePendingFlag = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
};
dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
};
}
public function set usePhasedInstantiation(_arg1:Boolean):void{
var _local2:Stage;
if (_usePhasedInstantiation != _arg1){
_usePhasedInstantiation = _arg1;
_local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (_arg1){
originalFrameRate = _local2.frameRate;
_local2.frameRate = 1000;
} else {
_local2.frameRate = originalFrameRate;
};
};
}
public static function getInstance():LayoutManager{
if (!instance){
instance = new (LayoutManager);
};
return (instance);
}
}
}//package mx.managers
Section 216
//PopUpManager (mx.managers.PopUpManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
public class PopUpManager {
mx_internal static const VERSION:String = "2.0.1.0";
private static var impl:IPopUpManager = (Singleton.getInstance("mx.managers::IPopUpManager") as IPopUpManager);
private static var implClassDependency:PopUpManagerImpl;
public static function removePopUp(_arg1:IFlexDisplayObject):void{
impl.removePopUp(_arg1);
}
public static function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void{
impl.addPopUp(_arg1, _arg2, _arg3, _arg4);
}
public static function bringToFront(_arg1:IFlexDisplayObject):void{
impl.bringToFront(_arg1);
}
public static function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject{
return (impl.createPopUp(_arg1, _arg2, _arg3, _arg4));
}
public static function centerPopUp(_arg1:IFlexDisplayObject):void{
impl.centerPopUp(_arg1);
}
}
}//package mx.managers
Section 217
//PopUpManagerChildList (mx.managers.PopUpManagerChildList)
package mx.managers {
public final class PopUpManagerChildList {
public static const PARENT:String = "parent";
public static const APPLICATION:String = "application";
mx_internal static const VERSION:String = "2.0.1.0";
public static const POPUP:String = "popup";
}
}//package mx.managers
Section 218
//PopUpManagerImpl (mx.managers.PopUpManagerImpl)
package mx.managers {
import mx.automation.*;
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.effects.*;
public class PopUpManagerImpl implements IPopUpManager {
private var popupInfo:Array;
mx_internal var modalWindowClass:Class;
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:IPopUpManager;
private function showModalWindow(_arg1:PopUpData):void{
var _local2:IStyleClient;
var _local3:Number;
var _local4:Fade;
var _local5:Number;
var _local6:Blur;
_local2 = (_arg1.owner as IStyleClient);
_local3 = 0;
if (_local2){
_local3 = _local2.getStyle("modalTransparencyDuration");
};
endEffects(_arg1);
if (_local3){
_local4 = new Fade(_arg1.modalWindow);
_local4.alphaFrom = 0;
_local4.alphaTo = _local2.getStyle("modalTransparency");
_local4.duration = _local3;
_local4.addEventListener(EffectEvent.EFFECT_END, fadeInEffectEndHandler);
_arg1.modalWindow.alpha = 0;
_arg1.modalWindow.visible = true;
_arg1.fade = _local4;
IUIComponent(_arg1.owner).setVisible(false, true);
_local4.play();
_local5 = _local2.getStyle("modalTransparencyBlur");
if (_local5){
_local6 = new Blur(Application.application);
new Blur(Application.application).blurXFrom = (_local6.blurYFrom = 0);
_local6.blurXTo = (_local6.blurYTo = _local5);
_local6.duration = _local3;
_local6.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_arg1.blur = _local6;
_local6.play();
};
} else {
IUIComponent(_arg1.owner).setVisible(true, true);
_arg1.modalWindow.visible = true;
};
}
public function bringToFront(_arg1:IFlexDisplayObject):void{
var _local2:PopUpData;
var _local3:ISystemManager;
if (((_arg1) && (_arg1.parent))){
_local2 = findPopupInfoByOwner(_arg1);
if (_local2){
_local3 = ISystemManager(_arg1.parent);
if (_local2.topMost){
_local3.popUpChildren.setChildIndex(DisplayObject(_arg1), (_local3.popUpChildren.numChildren - 1));
} else {
_local3.setChildIndex(DisplayObject(_arg1), (_local3.numChildren - 1));
};
};
};
}
private function popupShowHandler(_arg1:FlexEvent):void{
var _local2:PopUpData;
_local2 = findPopupInfoByOwner(_arg1.target);
if (_local2){
showModalWindow(_local2);
};
}
private function fadeOutDestroyEffectEndHandler(_arg1:EffectEvent):void{
var _local2:DisplayObject;
var _local3:ISystemManager;
effectEndHandler(_arg1);
_local2 = DisplayObject(_arg1.effectInstance.target);
if ((_local2.parent is ISystemManager)){
_local3 = ISystemManager(_local2.parent);
if (_local3.popUpChildren.contains(_local2)){
_local3.popUpChildren.removeChild(_local2);
} else {
_local3.removeChild(_local2);
};
} else {
_local2.parent.removeChild(_local2);
};
}
private function fadeInEffectEndHandler(_arg1:EffectEvent):void{
var _local2:int;
var _local3:int;
var _local4:PopUpData;
effectEndHandler(_arg1);
_local2 = popupInfo.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = popupInfo[_local3];
if (_local4.modalWindow == _arg1.effectInstance.target){
IUIComponent(_local4.owner).setVisible(true, true);
break;
};
_local3++;
};
}
private function popupRemovedHandler(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:PopUpData;
var _local5:DisplayObject;
var _local6:DisplayObject;
var _local7:DisplayObject;
var _local8:ISystemManager;
_local2 = popupInfo.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = popupInfo[_local3];
_local5 = _local4.owner;
if (_local5 == _arg1.target){
_local6 = _local4.parent;
_local7 = _local4.modalWindow;
_local8 = ((_local6 is ISystemManager)) ? ISystemManager(_local6) : IUIComponent(_local6).systemManager;
if ((_local5 is IUIComponent)){
IUIComponent(_local5).isPopUp = false;
};
if ((_local5 is IFocusManagerContainer)){
_local8.removeFocusManager(IFocusManagerContainer(_local5));
};
_local5.removeEventListener(Event.REMOVED, popupRemovedHandler);
if (_local7){
_local7.removeEventListener(MouseEvent.MOUSE_DOWN, _local4.mouseDownOutsideHandler);
_local7.removeEventListener(MouseEvent.MOUSE_WHEEL, _local4.mouseWheelOutsideHandler, true);
_local8.removeEventListener(Event.RESIZE, resizeHandler);
_local5.removeEventListener(FlexEvent.SHOW, popupShowHandler);
_local5.removeEventListener(FlexEvent.HIDE, popupHideHandler);
hideModalWindow(_local4, true);
_local8.numModalWindows--;
} else {
_local8.removeEventListener(MouseEvent.MOUSE_DOWN, _local4.mouseDownOutsideHandler);
_local8.removeEventListener(MouseEvent.MOUSE_WHEEL, _local4.mouseWheelOutsideHandler, true);
};
popupInfo.splice(_local3, 1);
break;
};
_local3++;
};
}
private function hideModalWindow(_arg1:PopUpData, _arg2:Boolean=false):void{
var _local3:IStyleClient;
var _local4:Number;
var _local5:Fade;
var _local6:Number;
var _local7:Blur;
_local3 = (_arg1.owner as IStyleClient);
_local4 = 0;
if (_local3){
_local4 = _local3.getStyle("modalTransparencyDuration");
};
endEffects(_arg1);
if (_local4){
_local5 = new Fade(_arg1.modalWindow);
_local5.alphaFrom = _arg1.modalWindow.alpha;
_local5.alphaTo = 0;
_local5.duration = _local4;
_local5.addEventListener(EffectEvent.EFFECT_END, (_arg2) ? fadeOutDestroyEffectEndHandler : fadeOutCloseEffectEndHandler);
_arg1.modalWindow.visible = true;
_arg1.fade = _local5;
_local5.play();
_local6 = _local3.getStyle("modalTransparencyBlur");
if (_local6){
_local7 = new Blur(Application.application);
new Blur(Application.application).blurXFrom = (_local7.blurYFrom = _local6);
_local7.blurXTo = (_local7.blurYTo = 0);
_local7.duration = _local4;
_local7.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_arg1.blur = _local7;
_local7.play();
};
} else {
_arg1.modalWindow.visible = false;
};
}
private function popupHideHandler(_arg1:FlexEvent):void{
var _local2:PopUpData;
_local2 = findPopupInfoByOwner(_arg1.target);
if (_local2){
hideModalWindow(_local2);
};
}
private function effectEndHandler(_arg1:EffectEvent):void{
var _local2:int;
var _local3:int;
var _local4:PopUpData;
var _local5:Effect;
_local2 = popupInfo.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = popupInfo[_local3];
_local5 = _arg1.effectInstance.effect;
if (_local5 == _local4.fade){
_local4.fade = null;
} else {
if (_local5 == _local4.blur){
_local4.blur = null;
};
};
_local3++;
};
}
private function createModalWindow(_arg1:DisplayObject, _arg2:PopUpData, _arg3:IChildList, _arg4:Boolean):void{
var _local5:IFlexDisplayObject;
var _local6:IStyleClient;
var _local7:Number;
var _local8:Sprite;
var _local9:ISystemManager;
var _local10:Rectangle;
var _local11:Graphics;
var _local12:Number;
_local5 = IFlexDisplayObject(_arg2.owner);
_local6 = (_local5 as IStyleClient);
_local7 = 0;
if (modalWindowClass){
_local8 = new modalWindowClass();
} else {
_local8 = new FlexSprite();
_local8.name = "modalWindow";
};
_local9 = IUIComponent(_arg1).systemManager;
_local9.numModalWindows++;
_arg3.addChildAt(_local8, _arg3.getChildIndex(DisplayObject(_local5)));
if ((_local5 is IAutomationObject)){
IAutomationObject(_local5).showInAutomationHierarchy = true;
};
if (_local6){
_local8.alpha = _local6.getStyle("modalTransparency");
};
_local8.tabEnabled = false;
_local10 = _local9.screen;
_local11 = _local8.graphics;
_local12 = 0xFFFFFF;
if (_local6){
_local12 = _local6.getStyle("modalTransparencyColor");
};
_local11.clear();
_local11.beginFill(_local12, 100);
_local11.drawRect(_local10.x, _local10.y, _local10.width, _local10.height);
_local11.endFill();
_arg2.modalWindow = _local8;
_arg2._mouseDownOutsideHandler = dispatchMouseDownOutsideEvent;
_arg2._mouseWheelOutsideHandler = dispatchMouseWheelOutsideEvent;
_local8.addEventListener(MouseEvent.MOUSE_DOWN, _arg2.mouseDownOutsideHandler);
_local8.addEventListener(MouseEvent.MOUSE_WHEEL, _arg2.mouseWheelOutsideHandler, true);
_local9.addEventListener(Event.RESIZE, resizeHandler);
_local5.addEventListener(FlexEvent.SHOW, popupShowHandler);
_local5.addEventListener(FlexEvent.HIDE, popupHideHandler);
if (_arg4){
showModalWindow(_arg2);
} else {
_local5.visible = _arg4;
};
}
private function findPopupInfoByOwner(_arg1:Object):PopUpData{
var _local2:int;
var _local3:int;
var _local4:PopUpData;
_local2 = popupInfo.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = popupInfo[_local3];
if (_local4.owner == _arg1){
return (_local4);
};
_local3++;
};
return (null);
}
private function fadeOutCloseEffectEndHandler(_arg1:EffectEvent):void{
effectEndHandler(_arg1);
DisplayObject(_arg1.effectInstance.target).visible = false;
}
private function endEffects(_arg1:PopUpData):void{
if (_arg1.fade){
_arg1.fade.end();
_arg1.fade = null;
};
if (_arg1.blur){
_arg1.blur.end();
_arg1.blur = null;
};
}
public function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void{
var _local5:Boolean;
var _local6:DisplayObjectContainer;
var _local7:ISystemManager;
var _local8:IChildList;
var _local9:Boolean;
var _local10:PopUpData;
_local5 = _arg1.visible;
_local6 = DisplayObjectContainer(_arg2.root);
if (((!(_local6)) && ((_arg2 is IUIComponent)))){
_local6 = DisplayObjectContainer(IUIComponent(_arg2).systemManager);
};
if ((_local6 is ISystemManager)){
_local7 = ISystemManager(_local6);
if (!_local7.isTopLevel()){
_local7 = _local7.topLevelSystemManager;
};
} else {
return;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).isPopUp = true;
};
if (((!(_arg4)) || ((_arg4 == PopUpManagerChildList.PARENT)))){
_local9 = _local7.popUpChildren.contains(_arg2);
} else {
_local9 = (_arg4 == PopUpManagerChildList.POPUP);
};
_local8 = (_local9) ? _local7.popUpChildren : _local7;
_local8.addChild(DisplayObject(_arg1));
_arg1.visible = false;
if (!popupInfo){
popupInfo = [];
};
_local10 = new PopUpData();
_local10.owner = DisplayObject(_arg1);
_local10.topMost = _local9;
popupInfo.push(_local10);
if ((_arg1 is IFocusManagerContainer)){
if (IFocusManagerContainer(_arg1).focusManager){
_local7.addFocusManager(IFocusManagerContainer(_arg1));
} else {
IFocusManagerContainer(_arg1).focusManager = new FocusManager(IFocusManagerContainer(_arg1), true);
};
};
if ((_arg1 is IAutomationObject)){
IAutomationObject(_arg1).showInAutomationHierarchy = true;
};
if ((_arg1 is ILayoutManagerClient)){
UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(_arg1), true);
};
_local10.parent = _arg2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).setActualSize(IUIComponent(_arg1).getExplicitOrMeasuredWidth(), IUIComponent(_arg1).getExplicitOrMeasuredHeight());
};
if (_arg3){
this.createModalWindow(_arg2, _local10, _local8, _local5);
} else {
_local10._mouseDownOutsideHandler = nonmodalMouseDownOutsideHandler;
_local10._mouseWheelOutsideHandler = nonmodalMouseWheelOutsideHandler;
_local7.addEventListener(MouseEvent.MOUSE_DOWN, _local10.mouseDownOutsideHandler);
_local7.addEventListener(MouseEvent.MOUSE_WHEEL, _local10.mouseWheelOutsideHandler, true);
_arg1.visible = _local5;
};
_arg1.addEventListener(Event.REMOVED, popupRemovedHandler);
if ((((_arg1 is IFocusManagerContainer)) && (_local5))){
_local7.activate(IFocusManagerContainer(_arg1));
};
}
public function removePopUp(_arg1:IFlexDisplayObject):void{
var _local2:PopUpData;
var _local3:ISystemManager;
if (((_arg1) && (_arg1.parent))){
_local2 = findPopupInfoByOwner(_arg1);
if (_local2){
_local3 = ISystemManager(_arg1.parent);
if (_local2.topMost){
_local3.popUpChildren.removeChild(DisplayObject(_arg1));
} else {
_local3.removeChild(DisplayObject(_arg1));
};
};
};
}
public function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject{
var _local5:IUIComponent;
_local5 = new (_arg2);
addPopUp(_local5, _arg1, _arg3, _arg4);
return (_local5);
}
private function resizeHandler(_arg1:Event):void{
var _local2:Rectangle;
var _local3:int;
var _local4:int;
var _local5:PopUpData;
_local2 = ISystemManager(DisplayObject(_arg1.target).root).screen;
_local3 = popupInfo.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = popupInfo[_local4];
if (((_local5.modalWindow) && ((_local5.owner.stage == DisplayObject(_arg1.target).stage)))){
_local5.modalWindow.width = _local2.width;
_local5.modalWindow.height = _local2.height;
_local5.modalWindow.x = _local2.x;
_local5.modalWindow.y = _local2.y;
};
_local4++;
};
}
public function centerPopUp(_arg1:IFlexDisplayObject):void{
var _local2:PopUpData;
var _local3:Point;
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_local2 = findPopupInfoByOwner(_arg1);
if (((_local2) && (_local2.parent))){
_local3 = new Point(0, 0);
_local3 = _local2.parent.localToGlobal(_local3);
_local3 = _arg1.parent.globalToLocal(_local3);
_arg1.move((Math.round(((_local2.parent.width - _arg1.width) / 2)) + _local3.x), (Math.round(((_local2.parent.height - _arg1.height) / 2)) + _local3.y));
};
}
private static function nonmodalMouseWheelOutsideHandler(_arg1:DisplayObject, _arg2:MouseEvent):void{
if (_arg1.hitTestPoint(_arg2.stageX, _arg2.stageY, true)){
} else {
dispatchMouseWheelOutsideEvent(_arg1, _arg2);
};
}
private static function dispatchMouseWheelOutsideEvent(_arg1:DisplayObject, _arg2:MouseEvent):void{
var _local3:MouseEvent;
var _local4:Point;
_local3 = new FlexMouseEvent(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE);
_local4 = _arg1.globalToLocal(new Point(_arg2.stageX, _arg2.stageY));
_local3.localX = _local4.x;
_local3.localY = _local4.y;
_local3.buttonDown = _arg2.buttonDown;
_local3.shiftKey = _arg2.shiftKey;
_local3.altKey = _arg2.altKey;
_local3.ctrlKey = _arg2.ctrlKey;
_local3.delta = _arg2.delta;
_local3.relatedObject = InteractiveObject(_arg2.target);
_arg1.dispatchEvent(_local3);
}
private static function dispatchMouseDownOutsideEvent(_arg1:DisplayObject, _arg2:MouseEvent):void{
var _local3:MouseEvent;
var _local4:Point;
_local3 = new FlexMouseEvent(FlexMouseEvent.MOUSE_DOWN_OUTSIDE);
_local4 = _arg1.globalToLocal(new Point(_arg2.stageX, _arg2.stageY));
_local3.localX = _local4.x;
_local3.localY = _local4.y;
_local3.buttonDown = _arg2.buttonDown;
_local3.shiftKey = _arg2.shiftKey;
_local3.altKey = _arg2.altKey;
_local3.ctrlKey = _arg2.ctrlKey;
_local3.delta = _arg2.delta;
_local3.relatedObject = InteractiveObject(_arg2.target);
_arg1.dispatchEvent(_local3);
}
public static function getInstance():IPopUpManager{
if (!instance){
instance = new (PopUpManagerImpl);
};
return (instance);
}
private static function nonmodalMouseDownOutsideHandler(_arg1:DisplayObject, _arg2:MouseEvent):void{
if (_arg1.hitTestPoint(_arg2.stageX, _arg2.stageY, true)){
} else {
dispatchMouseDownOutsideEvent(_arg1, _arg2);
};
}
}
}//package mx.managers
import flash.events.*;
import flash.display.*;
import mx.effects.*;
class PopUpData {
public var parent:DisplayObject;
public var _mouseDownOutsideHandler:Function;
public var blur:Effect;
public var _mouseWheelOutsideHandler:Function;
public var owner:DisplayObject;
public var topMost:Boolean;
public var fade:Effect;
public var modalWindow:DisplayObject;
private function PopUpData(){
}
public function mouseWheelOutsideHandler(_arg1:MouseEvent):void{
_mouseWheelOutsideHandler(owner, _arg1);
}
public function mouseDownOutsideHandler(_arg1:MouseEvent):void{
_mouseDownOutsideHandler(owner, _arg1);
}
}
Section 219
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){
this.owner = _arg1;
this.lowerBoundReference = _arg2;
this.upperBoundReference = _arg3;
}
public function getChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1));
return (_local2);
}
public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2 = owner;
_local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]);
_local2 = owner;
var _local3 = upperBoundReference;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
return (_arg1);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference]));
var _local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
return (_local2);
}
public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int;
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
_local2 = (_local2 - owner[lowerBoundReference]);
return (_local2);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3 = owner;
_local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2));
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
return (_arg1);
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2));
}
public function get numChildren():int{
return ((owner[upperBoundReference] - owner[lowerBoundReference]));
}
public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
if (owner.mx_internal::rawChildren_contains(_arg1)){
while (_arg1.parent != owner) {
_arg1 = _arg1.parent;
};
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){
return (true);
};
};
return (false);
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){
var _local3 = owner;
_local3.mx_internal::rawChildren_removeChild(_arg1);
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
return (_arg1);
}
}
}//package mx.managers
Section 220
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
import mx.events.*;
import mx.styles.*;
import mx.preloaders.*;
import flash.system.*;
import flash.utils.*;
import mx.messaging.config.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager {
mx_internal var nestLevel:int;// = 0
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var preloader:Preloader;
private var _topLevelSystemManager:ISystemManager;
private var _rawChildren:SystemRawChildrenList;
private var _toolTipIndex:int;// = 0
private var _explicitHeight:Number;
private var _document:Object;
private var form:IFocusManagerContainer;
private var _width:Number;
private var _toolTipChildren:SystemChildrenList;
private var initialized:Boolean;// = false
private var _focusPane:Sprite;
private var isStageRoot:Boolean;// = true
private var rslSizes:Array;// = null
private var _fontList:Object;// = null
private var nextFrameTimer:Timer;// = null
private var topLevel:Boolean;// = true
private var _popUpChildren:SystemChildrenList;
private var _cursorIndex:int;// = 0
private var _topMostIndex:int;// = 0
mx_internal var _mouseX;
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var initCallbackFunctions:Array;
private var _cursorChildren:SystemChildrenList;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
mx_internal var topLevelWindow:IUIComponent;
private static const IDLE_THRESHOLD:Number = 1000;
private static const IDLE_INTERVAL:Number = 100;
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
doneExecutingInitCallbacks = false;
initCallbackFunctions = [];
initialized = false;
topLevel = true;
isStageRoot = true;
nestLevel = 0;
rslSizes = null;
forms = [];
idleCounter = 0;
nextFrameTimer = null;
_applicationIndex = 1;
_cursorIndex = 0;
_fontList = null;
_noTopMostIndex = 0;
_numModalWindows = 0;
_toolTipIndex = 0;
_topMostIndex = 0;
super();
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
};
if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){
topLevel = false;
};
if (!stage){
isStageRoot = false;
};
if (topLevel){
SystemManagerGlobals.topLevelSystemManagers.push(this);
};
lastSystemManager = this;
executeCallbacks();
stop();
if (((topLevel) && (!((currentFrame == 1))))){
throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782.")));
};
root.loaderInfo.addEventListener(Event.INIT, initHandler);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local2:int;
var _local3:Class;
var _local4:DisplayObjectContainer;
_local2 = 1;
if (!topLevel){
_local4 = parent.parent;
while (_local4) {
if ((_local4 is ILayoutManagerClient)){
_local2 = (ILayoutManagerClient(_local4).nestLevel + 1);
break;
};
_local4 = _local4.parent;
};
};
nestLevel = _local2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).systemManager = this;
};
_local3 = Class(getDefinitionByName("mx.core.UIComponent"));
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = document;
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).initThemeColor();
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).stylesInitialized();
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
addingChild(_arg1);
super.addChild(_arg1);
childAdded(_arg1);
return (_arg1);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
var _local6:IStyleClient;
_local3 = false;
_local4 = rawChildren.numChildren;
_local5 = 0;
while (_local5 < _local4) {
_local6 = (rawChildren.getChildAt(_local5) as IStyleClient);
if (_local6){
_local6.styleChanged(_arg1);
_local6.notifyStyleChangeInChildren(_arg1, _arg2);
};
if (isTopLevelWindow(DisplayObject(_local6))){
_local3 = true;
};
_local4 = rawChildren.numChildren;
_local5++;
};
if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).styleChanged(_arg1);
IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2);
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
override public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if (super.contains(_arg1)){
if (_arg1.parent == this){
_local2 = super.getChildIndex(_arg1);
if (_local2 < noTopMostIndex){
return (true);
};
} else {
_local3 = 0;
while (_local3 < noTopMostIndex) {
_local4 = super.getChildAt(_local3);
if ((_local4 is IRawChildrenContainer)){
if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){
return (true);
};
};
if ((_local4 is DisplayObjectContainer)){
if (DisplayObjectContainer(_local4).contains(_arg1)){
return (true);
};
};
_local3++;
};
};
};
return (false);
}
private function idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
private function initHandler(_arg1:Event):void{
var _local2:int;
var _local3:int;
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
_local2 = ((totalFrames)==1) ? 0 : 1;
addFrameScript(_local2, docFrameHandler);
_local3 = (_local2 + 1);
while (_local3 < totalFrames) {
addFrameScript(_local3, extraFrameHandler);
_local3++;
};
initialize();
}
public function getDefinitionByName(_arg1:String):Object{
var _local2:ApplicationDomain;
var _local3:Object;
_local2 = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain);
if (_local2.hasDefinition(_arg1)){
_local3 = _local2.getDefinition(_arg1);
};
return (_local3);
}
public function get embeddedFontList():Object{
var _local1:Object;
var _local2:String;
var _local3:Object;
if (_fontList == null){
_fontList = {};
_local1 = info()["fonts"];
for (_local2 in _local1) {
_fontList[_local2] = _local1[_local2];
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_local3 = _topLevelSystemManager.embeddedFontList;
for (_local2 in _local3) {
_fontList[_local2] = _local3[_local2];
};
};
};
return (_fontList);
}
mx_internal function set cursorIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _cursorIndex);
_cursorIndex = _arg1;
}
override public function getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt((applicationIndex + _arg1)));
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){
idleTimer = new Timer(IDLE_INTERVAL);
idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler);
idleTimer.start();
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
};
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
override public function get mouseX():Number{
if (_mouseX === undefined){
return (super.mouseX);
};
return (_mouseX);
}
override public function get mouseY():Number{
if (_mouseY === undefined){
return (super.mouseY);
};
return (_mouseY);
}
public function removeFocusManager(_arg1:IFocusManagerContainer):void{
var _local2:int;
var _local3:int;
_local2 = forms.length;
_local3 = 0;
while (_local3 < _local2) {
if (forms[_local3] == _arg1){
if (form == _arg1){
deactivate(_arg1);
};
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
public function get rawChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.rawChildren);
};
if (!_rawChildren){
_rawChildren = new SystemRawChildrenList(this);
};
return (_rawChildren);
}
public function get focusPane():Sprite{
return (_focusPane);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:IChildList;
idleCounter = 0;
if (numModalWindows == 0){
if (forms.length > 1){
_local2 = forms.length;
_local3 = DisplayObject(_arg1.target);
_local4 = document.rawChildren.contains(_local3);
while (_local3) {
_local5 = 0;
while (_local5 < _local2) {
if (forms[_local5] == _local3){
_local6 = 0;
if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){
activate(IFocusManagerContainer(_local3));
};
if (popUpChildren.contains(_local3)){
_local9 = popUpChildren;
} else {
_local9 = this;
};
_local7 = _local9.getChildIndex(_local3);
_local8 = _local7;
_local2 = forms.length;
_local6 = 0;
while (_local6 < _local2) {
if (_local9.contains(forms[_local6])){
if (_local9.getChildIndex(forms[_local6]) > _local7){
_local8 = _local9.getChildIndex(forms[_local6]);
};
};
_local6++;
};
if ((((_local8 > _local7)) && (!(_local4)))){
_local9.setChildIndex(_local3, _local8);
};
return;
};
_local5++;
};
_local3 = _local3.parent;
};
};
};
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
return (_screen);
}
public function get preloaderBackgroundSize():String{
return (info()["backgroundSize"]);
}
private function docFrameHandler(_arg1:Event=null):void{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:Class;
Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl")));
Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager")));
Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl")));
Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
Singleton.registerClass("mx.managers::IToolTipManager", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));
executeCallbacks();
doneExecutingInitCallbacks = true;
_local2 = info()["mixins"];
if (((_local2) && ((_local2.length > 0)))){
_local3 = _local2.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = Class(getDefinitionByName(_local2[_local4]));
var _local6 = _local5;
_local6["init"](this);
_local4++;
};
};
initializeTopLevelWindow(null);
deferredNextFrame();
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
_local2 = stage.stageWidth;
_local3 = stage.stageHeight;
_local4 = loaderInfo.width;
_local5 = loaderInfo.height;
_local6 = ((_local4 - _local2) / 2);
_local7 = ((_local5 - _local3) / 2);
_local8 = stage.align;
if (_local8 == StageAlign.TOP){
_local7 = 0;
} else {
if (_local8 == StageAlign.BOTTOM){
_local7 = (_local5 - _local3);
} else {
if (_local8 == StageAlign.LEFT){
_local6 = 0;
} else {
if (_local8 == StageAlign.RIGHT){
_local6 = (_local4 - _local2);
} else {
if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){
_local7 = 0;
_local6 = 0;
} else {
if (_local8 == StageAlign.TOP_RIGHT){
_local7 = 0;
_local6 = (_local4 - _local2);
} else {
if (_local8 == StageAlign.BOTTOM_LEFT){
_local7 = (_local5 - _local3);
_local6 = 0;
} else {
if (_local8 == StageAlign.BOTTOM_RIGHT){
_local7 = (_local5 - _local3);
_local6 = (_local4 - _local2);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = _local6;
_screen.y = _local7;
_screen.width = _local2;
_screen.height = _local3;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (_arg1){
resizeMouseCatcher();
dispatchEvent(_arg1);
};
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
mx_internal function set topMostIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _topMostIndex);
_topMostIndex = _arg1;
toolTipIndex = (toolTipIndex + _local2);
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
public function isTopLevel():Boolean{
return (topLevel);
}
public function deactivate(_arg1:IFocusManagerContainer):void{
var _local2:IFocusManagerContainer;
var _local3:int;
var _local4:int;
var _local5:IFocusManagerContainer;
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
form.focusManager.deactivate();
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = forms[_local4];
if (_local5 == _arg1){
_local4 = (_local4 + 1);
while (_local4 < _local3) {
_local5 = forms[_local4];
if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
_local4++;
};
form = _local2;
break;
} else {
if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
};
_local4++;
};
if (form){
form.focusManager.activate();
};
};
};
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function info():Object{
return ({});
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
mx_internal function get toolTipIndex():int{
return (_toolTipIndex);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (isStageRoot){
return;
};
_width = _arg1;
_height = _arg2;
if (mouseCatcher){
mouseCatcher.width = _arg1;
mouseCatcher.height = _arg2;
};
dispatchEvent(new Event(Event.RESIZE));
}
mx_internal function set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
private function executeCallbacks():void{
var _local1:Function;
if (!parent){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChild(_arg1));
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
super.removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
override public function get stage():Stage{
var _local1:Stage;
_local1 = super.stage;
if (_local1){
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
return (_topLevelSystemManager.stage);
};
return (null);
}
public function create(... _args):Object{
var _local2:String;
var _local3:Class;
var _local4:String;
var _local5:int;
var _local6:int;
_local2 = info()["mainClassName"];
if (_local2 == null){
_local4 = loaderInfo.loaderURL;
_local5 = _local4.lastIndexOf(".");
_local6 = _local4.lastIndexOf("/");
_local2 = _local4.substring((_local6 + 1), _local5);
};
_local3 = Class(getDefinitionByName(_local2));
return ((_local3) ? new (_local3) : null);
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
public function get popUpChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.popUpChildren);
};
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
return (_popUpChildren);
}
public function activate(_arg1:IFocusManagerContainer):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
_local2 = form;
_local2.focusManager.deactivate();
};
};
form = _arg1;
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, (applicationIndex + _arg2));
}
public function get toolTipChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.toolTipChildren);
};
if (!_toolTipChildren){
_toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex"));
};
return (_toolTipChildren);
}
private function deferredNextFrame():void{
if ((currentFrame + 1) > totalFrames){
return;
};
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
} else {
nextFrameTimer = new Timer(100);
nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.start();
};
}
mx_internal function get cursorIndex():int{
return (_cursorIndex);
}
override public function getObjectsUnderPoint(_arg1:Point):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
var _local6:Array;
_local2 = [];
_local3 = topMostIndex;
_local4 = 0;
while (_local4 < _local3) {
_local5 = super.getChildAt(_local4);
if ((_local5 is DisplayObjectContainer)){
_local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1);
if (_local6){
_local2 = _local2.concat(_local6);
};
};
_local4++;
};
return (_local2);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
public function get document():Object{
return (_document);
}
private function resizeMouseCatcher():void{
var _local1:Graphics;
if (mouseCatcher){
_local1 = mouseCatcher.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
_local1.endFill();
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
mx_internal function get topMostIndex():int{
return (_topMostIndex);
}
public function addFocusManager(_arg1:IFocusManagerContainer):void{
forms.push(_arg1);
}
mx_internal function set noTopMostIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _noTopMostIndex);
_noTopMostIndex = _arg1;
topMostIndex = (topMostIndex + _local2);
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, _arg2);
}
private function mouseUpHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
mx_internal function childAdded(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
}
public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Object;
var _local6:Font;
var _local7:String;
_local2 = _arg1.font;
_local3 = Font.enumerateFonts();
_local4 = 0;
while (_local4 < _local3.length) {
_local6 = Font(_local3[_local4]);
if (_local6.fontName == _local2){
_local7 = "regular";
if (((_arg1.bold) && (_arg1.italic))){
_local7 = "boldItalic";
} else {
if (_arg1.bold){
_local7 = "bold";
} else {
if (_arg1.italic){
_local7 = "italic";
};
};
};
if (_local6.fontStyle == _local7){
return (true);
};
};
_local4++;
};
if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){
return (false);
};
_local5 = embeddedFontList[_local2];
return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular)))))));
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_arg1 == FlexEvent.IDLE){
super.removeEventListener(_arg1, _arg2, _arg3);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(_arg1, _arg2, _arg3);
};
}
override public function removeChildAt(_arg1:int):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChildAt((applicationIndex + _arg1)));
}
private function extraFrameHandler(_arg1:Event=null):void{
var _local2:Object;
var _local3:Class;
_local2 = info()["frames"];
if (((_local2) && (_local2[currentLabel]))){
_local3 = Class(getDefinitionByName(_local2[currentLabel]));
var _local4 = _local3;
_local4["frame"](this);
};
deferredNextFrame();
}
public function get application():IUIComponent{
return (IUIComponent(_document));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = super.getChildAt(_arg1);
removingChild(_local2);
super.removeChildAt(_arg1);
childRemoved(_local2);
return (_local2);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
}
mx_internal function get applicationIndex():int{
return (_applicationIndex);
}
mx_internal function set toolTipIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _toolTipIndex);
_toolTipIndex = _arg1;
cursorIndex = (cursorIndex + _local2);
}
public function get cursorChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.cursorChildren);
};
if (!_cursorChildren){
_cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex"));
};
return (_cursorChildren);
}
public function get preloaderBackgroundImage():Object{
return (info()["backgroundImage"]);
}
public function set numModalWindows(_arg1:int):void{
_numModalWindows = _arg1;
}
public function get preloaderBackgroundAlpha():Number{
return (info()["backgroundAlpha"]);
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent;
_local2 = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
_popUpChildren.removeChild(preloader);
mouseCatcher = new FlexSprite();
mouseCatcher.name = "mouseCatcher";
noTopMostIndex++;
super.addChildAt(mouseCatcher, 0);
resizeMouseCatcher();
if (!topLevel){
mouseCatcher.visible = false;
mask = mouseCatcher;
};
noTopMostIndex++;
super.addChildAt(DisplayObject(_local2), 1);
_local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
mx_internal function initialize():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:Boolean;
var _local6:Class;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
} else {
_width = loaderInfo.width;
_height = loaderInfo.height;
};
preloader = new Preloader();
preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
_popUpChildren.addChild(preloader);
_local1 = [];
_local2 = [];
_local3 = info()["rsls"];
_local4 = 0;
while (((_local3) && ((_local4 < _local3.length)))) {
_local1[_local4] = _local3[_local4].url;
_local2[_local4] = _local3[_local4].size;
_local4++;
};
_local5 = true;
if (info()["usePreloader"] != undefined){
_local5 = info()["usePreloader"];
};
_local6 = (info()["preloader"] as Class);
if (((_local5) && (!(_local6)))){
_local6 = DownloadProgressBar;
};
preloader.initialize(_local5, _local6, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, _local1, _local2);
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
var _local2:DisplayObjectContainer;
if (((!(topLevel)) && (parent))){
_local2 = parent.parent;
while (_local2) {
if ((_local2 is IInvalidating)){
IInvalidating(_local2).invalidateSize();
IInvalidating(_local2).invalidateDisplayList();
return;
};
_local2 = _local2.parent;
};
};
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
mx_internal function regenerateStyleCache(_arg1:Boolean):void{
var _local2:Boolean;
var _local3:int;
var _local4:int;
var _local5:IStyleClient;
_local2 = false;
_local3 = rawChildren.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (rawChildren.getChildAt(_local4) as IStyleClient);
if (_local5){
_local5.regenerateStyleCache(_arg1);
};
if (isTopLevelWindow(DisplayObject(_local5))){
_local2 = true;
};
_local3 = rawChildren.numChildren;
_local4++;
};
if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).regenerateStyleCache(_arg1);
};
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
public function get preloaderBackgroundColor():uint{
var _local1:*;
_local1 = info()["backgroundColor"];
if (_local1 == undefined){
return (4294967295);
};
return (uint(_local1));
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function get numModalWindows():int{
return (_numModalWindows);
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
initialized = true;
if (!parent){
return;
};
if (!topLevel){
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_topLevelSystemManager = IUIComponent(_local3).systemManager;
break;
};
_local3 = _local3.parent;
};
};
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
if (((topLevel) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (((topLevel) && (stage))){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
preloader.registerApplication(_local2);
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
override public function get width():Number{
return (_width);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public static function getSWFRoot(_arg1:Object):DisplayObject{
var className:String;
var p:*;
var sm:SystemManager;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
className = getQualifiedClassName(object);
for (p in allSystemManagers) {
sm = (p as SystemManager);
domain = sm.loaderInfo.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (sm);
};
} catch(e:Error) {
};
};
return (null);
}
mx_internal static function registerInitCallback(_arg1:Function):void{
var _local2:SystemManager;
if (((!(allSystemManagers)) || (!(lastSystemManager)))){
return;
};
_local2 = lastSystemManager;
if (_local2.doneExecutingInitCallbacks){
_arg1(_local2);
} else {
_local2.initCallbackFunctions.push(_arg1);
};
}
}
}//package mx.managers
Section 221
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var bootstrapLoaderInfoURL:String;
}
}//package mx.managers
Section 222
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
public function SystemRawChildrenList(_arg1:SystemManager){
this.owner = _arg1;
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
}
}//package mx.managers
Section 223
//ToolTipManager (mx.managers.ToolTipManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public class ToolTipManager extends EventDispatcher {
mx_internal static const VERSION:String = "2.0.1.0";
private static var impl:IToolTipManager = (Singleton.getInstance("mx.managers::IToolTipManager") as IToolTipManager);
private static var implClassDependency:ToolTipManagerImpl;
public static function get enabled():Boolean{
return (impl.enabled);
}
public static function set enabled(_arg1:Boolean):void{
impl.enabled = _arg1;
}
mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String):void{
impl.registerToolTip(_arg1, _arg2);
}
public static function set hideDelay(_arg1:Number):void{
impl.hideDelay = _arg1;
}
public static function set showDelay(_arg1:Number):void{
impl.showDelay = _arg1;
}
public static function get showDelay():Number{
return (impl.showDelay);
}
public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function destroyToolTip(_arg1:IToolTip):void{
return (impl.destroyToolTip(_arg1));
}
public static function get scrubDelay():Number{
return (impl.scrubDelay);
}
public static function get toolTipClass():Class{
return (impl.toolTipClass);
}
mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String):void{
impl.registerErrorString(_arg1, _arg2);
}
mx_internal static function sizeTip(_arg1:IToolTip):void{
impl.sizeTip(_arg1);
}
public static function set currentTarget(_arg1:DisplayObject):void{
impl.currentTarget = _arg1;
}
public static function set showEffect(_arg1:Effect):void{
impl.showEffect = _arg1;
}
public static function get hideDelay():Number{
return (impl.hideDelay);
}
public static function set hideEffect(_arg1:Effect):void{
impl.hideEffect = _arg1;
}
public static function set scrubDelay(_arg1:Number):void{
impl.scrubDelay = _arg1;
}
public static function get currentToolTip():IToolTip{
return (impl.currentToolTip);
}
public static function set currentToolTip(_arg1:IToolTip):void{
impl.currentToolTip = _arg1;
}
public static function get showEffect():Effect{
return (impl.showEffect);
}
public static function get currentTarget():DisplayObject{
return (impl.currentTarget);
}
public static function get hideEffect():Effect{
return (impl.hideEffect);
}
public static function set toolTipClass(_arg1:Class):void{
impl.toolTipClass = _arg1;
}
}
}//package mx.managers
Section 224
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.effects.*;
import mx.controls.*;
import flash.utils.*;
import mx.validators.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager {
private var _enabled:Boolean;// = true
private var _showDelay:Number;// = 500
private var _hideEffect:Effect;
private var hideTimer:Timer;
private var _toolTipClass:Class;
private var _scrubDelay:Number;// = 100
private var showTimer:Timer;
private var _currentToolTip:IToolTip;
private var currentText:String;
private var scrubTimer:Timer;
private var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var _showEffect:Effect;
private var initialized:Boolean;// = false
private var _hideDelay:Number;// = 10000
private var isError:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:IToolTipManager;
public function ToolTipManagerImpl(){
initialized = false;
_enabled = true;
_hideDelay = 10000;
_scrubDelay = 100;
_showDelay = 500;
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
}
private function toolTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
private function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
private function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
private function hideEffectEnded():void{
var _local1:ToolTipEvent;
reset();
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
}
public function set scrubDelay(_arg1:Number):void{
_scrubDelay = _arg1;
}
public function get currentToolTip():IToolTip{
return (_currentToolTip);
}
private function toolTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
public function get enabled():Boolean{
return (_enabled);
}
public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
var _local6:ToolTip;
var _local7:ISystemManager;
_local6 = new ToolTip();
_local7 = (_arg5) ? _arg5.systemManager : Application.application.systemManager;
_local7.toolTipChildren.addChild(_local6);
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
private function reset():void{
var _local1:ISystemManager;
showTimer.reset();
hideTimer.reset();
if (currentToolTip){
if (((showEffect) || (hideEffect))){
currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
EffectManager.endEffectsForTarget(currentToolTip);
_local1 = getSystemManager(previousTarget);
_local1.toolTipChildren.removeChild(DisplayObject(currentToolTip));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = _arg1;
}
private function showTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
if (isError){
currentTarget.addEventListener("change", changeHandler);
} else {
_local2 = getSystemManager(currentTarget);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
currentToolTip.visible = true;
if (!showEffect){
showEffectEnded();
};
}
private function effectEndHandler(_arg1:EffectEvent):void{
if (_arg1.effectInstance.effect == showEffect){
showEffectEnded();
} else {
if (_arg1.effectInstance.effect == hideEffect){
hideEffectEnded();
};
};
}
public function get hideDelay():Number{
return (_hideDelay);
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
public function get currentTarget():DisplayObject{
return (_currentTarget);
}
public function get hideEffect():Effect{
return (_hideEffect);
}
private function showEffectEnded():void{
var _local1:ToolTipEvent;
if (hideDelay == 0){
hideTip();
} else {
if (hideDelay < Infinity){
hideTimer.delay = hideDelay;
hideTimer.start();
};
};
if (currentTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
};
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
private function errorTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
public function get showDelay():Number{
return (_showDelay);
}
public function registerErrorString(_arg1:DisplayObject, _arg2:String):void{
var _local3:String;
_local3 = IValidatorListener(_arg1).errorString;
if (((!(_local3)) && (_arg2))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
} else {
if (((_local3) && (!(_arg2)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
};
};
}
private function initialize():void{
if (!showTimer){
showTimer = new Timer(0, 1);
showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler);
};
if (!hideTimer){
hideTimer = new Timer(0, 1);
hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler);
};
if (!scrubTimer){
scrubTimer = new Timer(0, 1);
};
initialized = true;
}
public function destroyToolTip(_arg1:IToolTip):void{
var _local2:ISystemManager;
_local2 = _arg1.systemManager;
_local2.toolTipChildren.removeChild(DisplayObject(_arg1));
}
private function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
private function changeHandler(_arg1:Event):void{
reset();
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject):Rectangle{
var _local2:Point;
_local2 = new Point(0, 0);
_local2 = _arg1.localToGlobal(_local2);
return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height));
}
private function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Rectangle;
var _local6:Point;
var _local7:IToolTip;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local3 = currentToolTip.screen.width;
_local4 = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local8 = NaN;
_local9 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local8 = ((_local3 - _local1) - 4);
_local9 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local8;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
Object(toolTipClass).maxWidth = _local9;
} else {
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
};
if ((currentToolTip.height + 2) < _local5.top){
_local2 = (_local5.top - (currentToolTip.height + 2));
} else {
_local2 = (_local5.bottom + 2);
if (!isNaN(_local8)){
Object(toolTipClass).maxWidth = _local8;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
if (!isNaN(_local9)){
Object(toolTipClass).maxWidth = _local9;
};
};
};
sizeTip(currentToolTip);
_local6 = new Point(_local1, _local2);
_local7 = currentToolTip;
_local6 = DisplayObject(_local7).root.globalToLocal(_local6);
_local1 = _local6.x;
_local2 = _local6.y;
} else {
_local1 = (Application.application.mouseX + 11);
_local2 = (Application.application.mouseY + 22);
_local10 = currentToolTip.width;
if ((_local1 + _local10) > _local3){
_local1 = (_local3 - _local10);
};
_local11 = currentToolTip.height;
if ((_local2 + _local11) > _local4){
_local2 = (_local4 - _local11);
};
};
currentToolTip.move(_local1, _local2);
}
private function errorTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
private function findTarget(_arg1:DisplayObject):void{
while (_arg1) {
if ((_arg1 is IValidatorListener)){
currentText = IValidatorListener(_arg1).errorString;
if (((!((currentText == null))) && (!((currentText == ""))))){
currentTarget = _arg1;
isError = true;
return;
};
};
if ((_arg1 is IToolTipManagerClient)){
currentText = IToolTipManagerClient(_arg1).toolTip;
if (currentText != null){
currentTarget = _arg1;
isError = false;
return;
};
};
_arg1 = _arg1.parent;
};
currentText = null;
currentTarget = null;
}
public function registerToolTip(_arg1:DisplayObject, _arg2:String):void{
var _local3:String;
if ((_arg1 is IToolTipManagerClient)){
_local3 = IToolTipManagerClient(_arg1).toolTip;
};
if (((!(_local3)) && (_arg2))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
} else {
if (((_local3) && (!(_arg2)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
};
};
}
public function set hideDelay(_arg1:Number):void{
_hideDelay = _arg1;
}
private function getSystemManager(_arg1:DisplayObject):ISystemManager{
return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null);
}
public function set currentTarget(_arg1:DisplayObject):void{
_currentTarget = _arg1;
}
public function set showEffect(_arg1:Effect):void{
_showEffect = _arg1;
}
public function sizeTip(_arg1:IToolTip):void{
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight());
}
public function set hideEffect(_arg1:Effect):void{
_hideEffect = _arg1;
}
private function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
private function targetChanged():void{
var _local1:ToolTipEvent;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
reset();
if (currentTarget){
if (currentText == ""){
return;
};
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
currentTarget.dispatchEvent(_local1);
if ((((showDelay == 0)) || (scrubTimer.running))){
createTip();
initializeTip();
positionTip();
showTip();
} else {
showTimer.delay = showDelay;
showTimer.start();
};
};
}
private function initializeTip():void{
if ((currentToolTip is ToolTip)){
ToolTip(currentToolTip).text = currentText;
};
if (((isError) && ((currentToolTip is IStyleClient)))){
IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
};
sizeTip(currentToolTip);
if ((currentToolTip is IStyleClient)){
if (showEffect){
IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
};
if (hideEffect){
IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
};
};
if (((showEffect) || (hideEffect))){
currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
}
public function get showEffect():Effect{
return (_showEffect);
}
private function hideTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
if (currentToolTip){
currentToolTip.visible = false;
};
if (isError){
if (currentTarget){
currentTarget.removeEventListener("change", changeHandler);
};
} else {
if (previousTarget){
_local2 = getSystemManager(previousTarget);
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
};
if (!hideEffect){
hideEffectEnded();
};
}
private function createTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
currentTarget.dispatchEvent(_local1);
if (_local1.toolTip){
currentToolTip = _local1.toolTip;
} else {
currentToolTip = new toolTipClass();
};
currentToolTip.visible = false;
_local2 = getSystemManager(currentTarget);
_local2.toolTipChildren.addChild(DisplayObject(currentToolTip));
}
public static function getInstance():IToolTipManager{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 225
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
import mx.core.*;
public class LoaderConfig {
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var _url:String = null;
mx_internal static var _parameters:Object;
public static function get url():String{
return (_url);
}
public static function get parameters():Object{
return (_parameters);
}
}
}//package mx.messaging.config
Section 226
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import mx.core.*;
import flash.events.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function get error():Boolean;
function get factory():IFlexModuleFactory;
function release():void;
function get data():Object;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void;
function get url():String;
function set data(_arg1:Object):void;
function get setup():Boolean;
function publish(_arg1:IFlexModuleFactory):void;
function unload():void;
}
}//package mx.modules
Section 227
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "2.0.1.0";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
referenced = false;
super();
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function get error():Boolean{
return (info.error);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local3 = new ModuleEvent(ModuleEvent.PROGRESS);
_local3.bytesLoaded = info.size;
_local3.bytesTotal = info.size;
dispatchEvent(_local3);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2);
};
};
}
public function get data():Object{
return (_data);
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo;
_local2 = (moduleList[_arg1] as _slot3);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var className:String;
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
className = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as _slot3);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
numReferences = 0;
_error = false;
_loaded = false;
_ready = false;
_setup = false;
super();
_url = _arg1;
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as _slot4);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
var _local2:ModuleEvent;
_error = true;
_local2 = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent;
_local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:URLRequest;
var _local4:LoaderContext;
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_url.indexOf("published://") == 0){
return;
};
_local3 = new URLRequest(_url);
_local4 = new LoaderContext();
_local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local4.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local4.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local3, _local4);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function get url():String{
return (_url);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
bytesTotal = 0;
super();
}
}
Section 228
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 229
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.text.*;
import flash.events.*;
import mx.events.*;
import mx.graphics.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public class DownloadProgressBar extends Sprite implements IPreloaderDisplay {
private var _stageHeight:Number;// = 375
private var _percentRect:Rectangle;
private var _percentObj:TextField;
private var _backgroundSize:String;// = ""
private var _showLabel:Boolean;// = true
private var _value:Number;// = 0
private var _backgroundAlpha:Number;// = 1
private var _backgroundImage:Object;
private var _backgroundColor:uint;
protected var DOWNLOAD_PERCENTAGE:uint;// = 60
private var _labelObj:TextField;
private var _barFrameSprite:Sprite;
private var _maximum:Number;// = 0
private var _startTime:int;
private var _preloader:Sprite;
private var _displayTime:int;
protected var MINIMUM_DISPLAY_TIME:uint;// = 0
private var _stageWidth:Number;// = 500
private var _downloadingLabel:String;// = "Loading"
private var _showProgressBar:Boolean;// = true
private var _yOffset:Number;// = 20
private var _initProgressCount:uint;// = 0
private var _barSprite:Sprite;
private var _visible:Boolean;// = false
private var _barRect:RoundedRectangle;
private var _showingDisplay:Boolean;// = false
private var _initProgressTotal:uint;// = 12
private var _startedInit:Boolean;// = false
private var _labelRect:Rectangle;
private var _showPercentage:Boolean;// = false
private var _startedLoading:Boolean;// = false
private var _displayStartCount:uint;// = 0
private var _borderRect:RoundedRectangle;
private var _xOffset:Number;// = 20
private var _label:String;// = ""
private var _barFrameRect:RoundedRectangle;
mx_internal static const VERSION:String = "2.0.1.0";
private static var _initializingLabel:String = "Initializing";
public function DownloadProgressBar(){
MINIMUM_DISPLAY_TIME = 0;
DOWNLOAD_PERCENTAGE = 60;
_showProgressBar = true;
_labelRect = labelRect;
_percentRect = percentRect;
_borderRect = borderRect;
_barFrameRect = barFrameRect;
_barRect = barRect;
_xOffset = 20;
_yOffset = 20;
_maximum = 0;
_value = 0;
_startedLoading = false;
_startedInit = false;
_showingDisplay = false;
_displayStartCount = 0;
_initProgressCount = 0;
_initProgressTotal = 12;
_visible = false;
_backgroundAlpha = 1;
_backgroundSize = "";
_stageHeight = 375;
_stageWidth = 500;
_downloadingLabel = "Loading";
_label = "";
_showLabel = true;
_showPercentage = false;
super();
}
private function calcScale():void{
var _local1:Number;
if ((((stageWidth < 160)) || ((stageHeight < 120)))){
scaleX = 1;
scaleY = 1;
} else {
if ((((stageWidth < 240)) || ((stageHeight < 150)))){
createChildren();
_local1 = Math.min((stageWidth / 240), (stageHeight / 150));
scaleX = _local1;
scaleY = _local1;
} else {
createChildren();
};
};
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.color = 0x333333;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
protected function rslCompleteHandler(_arg1:RSLEvent):void{
label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal);
}
protected function set showLabel(_arg1:Boolean):void{
_showLabel = _arg1;
draw();
}
private function calcBackgroundSize():Number{
var _local1:Number;
var _local2:int;
_local1 = NaN;
if (backgroundSize){
_local2 = backgroundSize.indexOf("%");
if (_local2 != -1){
_local1 = Number(backgroundSize.substr(0, _local2));
};
};
return (_local1);
}
protected function rslErrorHandler(_arg1:RSLEvent):void{
_preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_preloader.removeEventListener(Event.COMPLETE, completeHandler);
_preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
if (!_showingDisplay){
show();
_showingDisplay = true;
};
label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal);
}
protected function get barFrameRect():RoundedRectangle{
return (new RoundedRectangle(14, 40, 154, 4));
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
}
protected function get borderRect():RoundedRectangle{
return (new RoundedRectangle(0, 0, 182, 60, 4));
}
protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{
return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2)))));
}
private function timerHandler(_arg1:Event=null):void{
dispatchEvent(new Event(Event.COMPLETE));
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:int;
_local2 = _arg1.bytesLoaded;
_local3 = _arg1.bytesTotal;
_local4 = (getTimer() - _startTime);
if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){
if (!_startedLoading){
show();
label = downloadingLabel;
_startedLoading = true;
};
setProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
public function get backgroundSize():String{
return (_backgroundSize);
}
override public function get visible():Boolean{
return (_visible);
}
protected function center(_arg1:Number, _arg2:Number):void{
_xOffset = Math.floor(((_arg1 - _borderRect.width) / 2));
_yOffset = Math.floor(((_arg2 - _borderRect.height) / 2));
}
protected function get barRect():RoundedRectangle{
return (new RoundedRectangle(14, 39, 154, 6, 0));
}
protected function rslProgressHandler(_arg1:RSLEvent):void{
}
public function set backgroundSize(_arg1:String):void{
_backgroundSize = _arg1;
}
private function initCompleteHandler(_arg1:Event):void{
var _local2:int;
var _local3:Timer;
_local2 = (getTimer() - _displayTime);
if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){
_local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1);
_local3.addEventListener(TimerEvent.TIMER, timerHandler);
_local3.start();
} else {
timerHandler();
};
}
protected function get percentFormat():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.align = "right";
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
private function calcY(_arg1:Number):Number{
return ((_arg1 + _yOffset));
}
protected function setProgress(_arg1:Number, _arg2:Number):void{
if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){
_value = Number(_arg1);
_maximum = Number(_arg2);
draw();
};
}
protected function get downloadingLabel():String{
return (_downloadingLabel);
}
private function calcX(_arg1:Number):Number{
return ((_arg1 + _xOffset));
}
protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{
return ((((_arg1 > 300)) && ((_arg2 == 2))));
}
private function drawProgressBar(_arg1:Number):void{
var _local2:Graphics;
var _local3:Array;
var _local4:Array;
var _local5:Matrix;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local2 = _barSprite.graphics;
_local2.clear();
_local3 = [0xFFFFFF, 0xFFFFFF];
_local4 = [0, 0xFF];
_local5 = new Matrix();
_local6 = ((_barRect.width * _arg1) / 100);
_local7 = (_local6 / 2);
_local8 = (_barRect.height - 4);
_local9 = calcX(_barRect.x);
_local10 = (calcY(_barRect.y) + 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, _local8);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, _local8);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = calcY(_barRect.y);
_local11 = ((_local10 + _local8) - 1);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = (calcY(_barRect.y) + 1);
_local11 = ((calcY(_barRect.y) + _local8) - 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
}
public function get backgroundImage():Object{
return (_backgroundImage);
}
public function set stageWidth(_arg1:Number):void{
_stageWidth = _arg1;
}
public function get backgroundAlpha():Number{
if (!isNaN(_backgroundAlpha)){
return (_backgroundAlpha);
};
return (1);
}
public function set preloader(_arg1:Sprite):void{
_preloader = _arg1;
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
}
public function get backgroundColor():uint{
return (_backgroundColor);
}
protected function set showPercentage(_arg1:Boolean):void{
_showPercentage = _arg1;
draw();
}
override public function set visible(_arg1:Boolean):void{
if (((!(_visible)) && (_arg1))){
show();
} else {
if (((_visible) && (!(_arg1)))){
hide();
};
};
_visible = _arg1;
}
protected function get labelRect():Rectangle{
return (new Rectangle(14, 17, 100, 16));
}
private function show():void{
_showingDisplay = true;
calcScale();
draw();
_displayTime = getTimer();
}
protected function createChildren():void{
var _local1:Graphics;
var _local2:TextField;
var _local3:TextField;
var _local4:Graphics;
var _local5:Matrix;
var _local6:RectangularDropShadow;
_local1 = graphics;
if (backgroundImage != null){
loadBackgroundImage(backgroundImage);
};
_barFrameSprite = new Sprite();
_barSprite = new Sprite();
addChild(_barFrameSprite);
addChild(_barSprite);
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2));
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local4 = _barFrameSprite.graphics;
_local5 = new Matrix();
_local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y));
_local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5);
_local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.endFill();
_labelObj = new TextField();
_labelObj.x = calcX(_labelRect.x);
_labelObj.y = calcY(_labelRect.y);
_labelObj.width = _labelRect.width;
_labelObj.height = _labelRect.height;
_labelObj.selectable = false;
_labelObj.defaultTextFormat = labelFormat;
addChild(_labelObj);
_percentObj = new TextField();
_percentObj.x = calcX(_percentRect.x);
_percentObj.y = calcY(_percentRect.y);
_percentObj.width = _percentRect.width;
_percentObj.height = _percentRect.height;
_percentObj.selectable = false;
_percentObj.defaultTextFormat = percentFormat;
addChild(_percentObj);
_local6 = new RectangularDropShadow();
_local6.color = 0;
_local6.angle = 90;
_local6.alpha = 0.6;
_local6.distance = 2;
_local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius)));
_local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height);
_local1.lineStyle(1, 0xFFFFFF, 0.3);
_local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y));
_local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y));
}
private function loadBackgroundImage(_arg1:Object):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var classOrString = _arg1;
if (((classOrString) && ((classOrString as Class)))){
cls = Class(classOrString);
initBackgroundImage(new (cls));
} else {
if (((classOrString) && ((classOrString is String)))){
try {
cls = Class(getDefinitionByName(String(classOrString)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(classOrString)), loaderContext);
};
};
};
}
private function hide():void{
}
private function draw():void{
var _local1:Number;
if (_startedLoading){
if (!_startedInit){
_local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100));
} else {
_local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE));
};
} else {
_local1 = getPercentLoaded(_value, _maximum);
};
if (_labelObj){
_labelObj.text = _label;
};
if (_percentObj){
if (!_showPercentage){
_percentObj.visible = false;
_percentObj.text = "";
} else {
_percentObj.text = (String(_local1) + "%");
};
};
if (((_barSprite) && (_barFrameSprite))){
if (!_showProgressBar){
_barSprite.visible = false;
_barFrameSprite.visible = false;
} else {
drawProgressBar(_local1);
};
};
}
protected function initProgressHandler(_arg1:Event):void{
var _local2:int;
var _local3:Number;
_local2 = (getTimer() - _startTime);
_initProgressCount++;
if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){
_displayStartCount = _initProgressCount;
show();
} else {
if (_showingDisplay){
if (!_startedInit){
_startedInit = true;
label = initializingLabel;
};
_local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount));
setProgress(_local3, 100);
};
};
}
protected function get label():String{
return (_label);
}
protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){
return (0);
};
_local3 = ((100 * _arg1) / _arg2);
if (((isNaN(_local3)) || ((_local3 <= 0)))){
return (0);
};
if (_local3 > 99){
return (99);
};
return (Math.round(_local3));
}
protected function set downloadingLabel(_arg1:String):void{
_downloadingLabel = _arg1;
}
public function get stageWidth():Number{
return (_stageWidth);
}
public function set stageHeight(_arg1:Number):void{
_stageHeight = _arg1;
}
protected function get showPercentage():Boolean{
return (_showPercentage);
}
public function initialize():void{
_startTime = getTimer();
center(stageWidth, stageHeight);
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
addChildAt(_arg1, 0);
_local2 = _arg1.width;
_local3 = _arg1.height;
_local4 = calcBackgroundSize();
if (isNaN(_local4)){
_local7 = 1;
_local8 = 1;
} else {
_local9 = (_local4 * 0.01);
_local7 = ((_local9 * stageWidth) / _local2);
_local8 = ((_local9 * stageHeight) / _local3);
};
_arg1.scaleX = _local7;
_arg1.scaleY = _local8;
_local5 = Math.round((0.5 * (stageWidth - (_local2 * _local7))));
_local6 = Math.round((0.5 * (stageHeight - (_local3 * _local8))));
_arg1.x = _local5;
_arg1.y = _local6;
if (!isNaN(backgroundAlpha)){
_arg1.alpha = backgroundAlpha;
};
}
public function set backgroundImage(_arg1:Object):void{
_backgroundImage = _arg1;
}
public function set backgroundAlpha(_arg1:Number):void{
_backgroundAlpha = _arg1;
}
public function set backgroundColor(_arg1:uint):void{
_backgroundColor = _arg1;
}
private function loader_completeHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
}
public function get stageHeight():Number{
return (_stageHeight);
}
protected function get percentRect():Rectangle{
return (new Rectangle(108, 4, 34, 16));
}
protected function completeHandler(_arg1:Event):void{
}
protected function set label(_arg1:String):void{
if (!(_arg1 is Function)){
_label = _arg1;
};
draw();
}
protected function get showLabel():Boolean{
return (_showLabel);
}
public static function get initializingLabel():String{
return (_initializingLabel);
}
public static function set initializingLabel(_arg1:String):void{
_initializingLabel = _arg1;
}
}
}//package mx.preloaders
Section 230
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay)
package mx.preloaders {
import flash.display.*;
import flash.events.*;
public interface IPreloaderDisplay extends IEventDispatcher {
function get stageHeight():Number;
function set backgroundAlpha(_arg1:Number):void;
function get stageWidth():Number;
function set backgroundColor(_arg1:uint):void;
function set preloader(_arg1:Sprite):void;
function get backgroundAlpha():Number;
function get backgroundColor():uint;
function get backgroundSize():String;
function set stageWidth(_arg1:Number):void;
function set stageHeight(_arg1:Number):void;
function set backgroundImage(_arg1:Object):void;
function get backgroundImage():Object;
function set backgroundSize(_arg1:String):void;
function initialize():void;
}
}//package mx.preloaders
Section 231
//Preloader (mx.preloaders.Preloader)
package mx.preloaders {
import flash.display.*;
import mx.core.*;
import flash.events.*;
import mx.events.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public class Preloader extends Sprite {
private var showDisplay:Boolean;
private var timer:Timer;
private var rslIndex:int;// = 0
private var rslDone:Boolean;// = false
private var rslLibs:Array;
private var displayClass:IPreloaderDisplay;// = null
mx_internal static const VERSION:String = "2.0.1.0";
public function Preloader(){
displayClass = null;
rslIndex = 0;
rslDone = false;
super();
}
mx_internal function rslCompleteHandler(_arg1:Event, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_COMPLETE);
_local3.bytesLoaded = _arg2.total;
_local3.bytesTotal = _arg2.total;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
dispatchEvent(_local3);
loadRSL(++rslIndex);
}
private function appProgressHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
}
mx_internal function rslErrorHandler(_arg1:ErrorEvent, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_ERROR);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
_local3.errorText = _arg1.text;
dispatchEvent(_local3);
}
private function displayClassCompleteHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
}
private function timerHandler(_arg1:TimerEvent):void{
var _local2:Object;
var _local3:int;
var _local4:int;
if (!root){
return;
};
_local2 = getByteValues();
_local3 = _local2.loaded;
_local4 = _local2.total;
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4));
if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.reset();
dispatchEvent(new Event(Event.COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
};
}
private function getByteValues():Object{
var _local1:LoaderInfo;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = root.loaderInfo;
_local2 = _local1.bytesLoaded;
_local3 = _local1.bytesTotal;
_local4 = (rslLibs) ? rslLibs.length : 0;
_local5 = 0;
while (_local5 < _local4) {
_local2 = (_local2 + rslLibs[_local5].loaded);
_local3 = (_local3 + rslLibs[_local5].total);
_local5++;
};
return ({loaded:_local2, total:_local3});
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
}
public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null):void{
var _local11:int;
var _local12:int;
var _local13:URLRequest;
var _local14:int;
var _local15:RSLNode;
root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (((_arg9) && ((_arg9.length > 0)))){
rslLibs = [];
_local11 = _arg9.length;
_local12 = 0;
while (_local12 < _local11) {
_local13 = new URLRequest(_arg9[_local12]);
_local14 = 0;
if (((_arg10) && ((_arg10.length == _arg9.length)))){
_local14 = _arg10[_local12];
};
_local15 = new RSLNode(_local13, _local12, _local14, this);
rslLibs.push(_local15);
_local12++;
};
loadRSL(0);
} else {
rslDone = true;
};
this.showDisplay = _arg1;
timer = new Timer(10);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
if (_arg1){
displayClass = new (_arg2);
displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler);
addChild(DisplayObject(displayClass));
displayClass.backgroundColor = _arg3;
displayClass.backgroundAlpha = _arg4;
displayClass.backgroundImage = _arg5;
displayClass.backgroundSize = _arg6;
displayClass.stageWidth = _arg7;
displayClass.stageHeight = _arg8;
displayClass.initialize();
displayClass.preloader = this;
};
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
dispatchAppEndEvent();
}
mx_internal function rslProgressHandler(_arg1:ProgressEvent, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_PROGRESS);
_local3.bytesLoaded = _arg1.bytesLoaded;
_local3.bytesTotal = _arg1.bytesTotal;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
dispatchEvent(_local3);
}
private function loadRSL(_arg1:int):void{
var _local2:RSLNode;
var _local3:Loader;
var _local4:LoaderContext;
if (_arg1 < rslLibs.length){
_local2 = rslLibs[_arg1];
_local3 = new Loader();
_local3.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _local2.progressHandler);
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, _local2.completeHandler);
_local3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _local2.errorHandler);
_local3.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _local2.errorHandler);
_local4 = new LoaderContext();
_local4.applicationDomain = ApplicationDomain.currentDomain;
_local3.load(_local2.url, _local4);
} else {
rslDone = true;
};
}
public function registerApplication(_arg1:IEventDispatcher):void{
_arg1.addEventListener("validatePropertiesComplete", appProgressHandler);
_arg1.addEventListener("validateSizeComplete", appProgressHandler);
_arg1.addEventListener("validateDisplayListComplete", appProgressHandler);
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
}
private function dispatchAppEndEvent(_arg1:Object=null):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
if (!showDisplay){
displayClassCompleteHandler(null);
};
}
}
}//package mx.preloaders
import mx.core.*;
import flash.events.*;
import flash.net.*;
class RSLNode {
public var completed:Boolean;// = false
public var loaded:uint;// = 0
public var total:uint;// = 0
public var index:int;
public var errorText:String;
public var url:URLRequest;
public var owner:Preloader;
private function RSLNode(_arg1:URLRequest, _arg2:int, _arg3:int, _arg4:Preloader){
total = 0;
loaded = 0;
completed = false;
super();
this.url = _arg1;
this.index = _arg2;
this.total = _arg3;
this.owner = _arg4;
}
public function errorHandler(_arg1:ErrorEvent):void{
errorText = _arg1.text;
completed = true;
loaded = 0;
total = 0;
var _local2 = owner;
_local2.mx_internal::rslErrorHandler(_arg1, this);
}
public function progressHandler(_arg1:ProgressEvent):void{
loaded = _arg1.bytesLoaded;
total = _arg1.bytesTotal;
var _local2 = owner;
_local2.mx_internal::rslProgressHandler(_arg1, this);
}
public function completeHandler(_arg1:Event):void{
completed = true;
var _local2 = owner;
_local2.mx_internal::rslCompleteHandler(_arg1, this);
}
}
Section 232
//Locale (mx.resources.Locale)
package mx.resources {
import mx.managers.*;
public class Locale {
private var _language:String;
private var _variant:String;
private var _country:String;
private var localeStr:String;
mx_internal static const VERSION:String = "2.0.1.0";
private static var currentLocale:Locale;
public function Locale(_arg1:String){
var _local2:Array;
super();
this.localeStr = _arg1;
_local2 = _arg1.split("_");
if (_local2.length > 0){
_language = _local2[0];
};
if (_local2.length > 1){
_country = _local2[1];
};
if (_local2.length > 2){
_variant = _local2[2];
};
}
public function get variant():String{
return (_variant);
}
public function get country():String{
return (_country);
}
public function get language():String{
return (_language);
}
public function toString():String{
return (localeStr);
}
public static function getCurrent(_arg1:ISystemManager):Locale{
var _local2:Class;
if (!currentLocale){
_local2 = Class(_arg1.getDefinitionByName("mx.generated.GeneratedLocale"));
if (_local2){
currentLocale = new (_local2);
};
};
return (currentLocale);
}
}
}//package mx.resources
Section 233
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle {
private var content:Object;
private var bundleName:String;
mx_internal static const VERSION:String = "2.0.1.0";
protected function getContent():Object{
return (null);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
_local2 = getObject(_arg1).split(",");
_local3 = _local2.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getString(_arg1:String):String{
return (String(getObject(_arg1)));
}
private function initialize(_arg1:String):void{
bundleName = _arg1;
content = getContent();
if (!content){
throw (new Error(("No content found in resource bundle " + bundleName)));
};
}
public function getObject(_arg1:String):Object{
var _local2:Object;
_local2 = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String;
_local3 = getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getNumber(_arg1:String):Number{
return (Number(getObject(_arg1)));
}
private static function getDefinitionByName(_arg1:String, _arg2:ApplicationDomain):Object{
var _local3:Object;
if (_arg2.hasDefinition(_arg1)){
_local3 = _arg2.getDefinition(_arg1);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:Class;
var _local4:Object;
var _local5:ResourceBundle;
if (_arg2 == null){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = Class(getDefinitionByName((_arg1 + "_properties"), _arg2));
if (!_local3){
_local3 = Class(getDefinitionByName(String(_arg1), _arg2));
};
if (_local3){
_local4 = new (_local3);
if ((_local4 is ResourceBundle)){
_local5 = ResourceBundle(_local4);
_local5.initialize(String(_arg1));
return (_local5);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 234
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 235
//ApplicationBackground (mx.skins.halo.ApplicationBackground)
package mx.skins.halo {
import flash.display.*;
import mx.utils.*;
import mx.skins.*;
public class ApplicationBackground extends ProgrammaticSkin {
mx_internal static const VERSION:String = "2.0.1.0";
override public function get measuredWidth():Number{
return (8);
}
override public function get measuredHeight():Number{
return (8);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Graphics;
var _local4:Array;
var _local5:Array;
var _local6:uint;
super.updateDisplayList(_arg1, _arg2);
_local3 = graphics;
_local4 = getStyle("backgroundGradientColors");
_local5 = getStyle("backgroundGradientAlphas");
if (!_local4){
_local6 = getStyle("backgroundColor");
if (isNaN(_local6)){
_local6 = 0xFFFFFF;
};
_local4 = [];
_local4[0] = ColorUtil.adjustBrightness(_local6, 15);
_local4[1] = ColorUtil.adjustBrightness(_local6, -25);
};
if (!_local5){
_local5 = [1, 1];
};
_local3.clear();
drawRoundRect(0, 0, _arg1, _arg2, 0, _local4, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
}
}
}//package mx.skins.halo
Section 236
//BrokenImageBorderSkin (mx.skins.halo.BrokenImageBorderSkin)
package mx.skins.halo {
import flash.display.*;
import mx.skins.*;
public class BrokenImageBorderSkin extends ProgrammaticSkin {
mx_internal static const VERSION:String = "2.0.1.0";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Graphics;
super.updateDisplayList(_arg1, _arg2);
_local3 = graphics;
_local3.clear();
_local3.lineStyle(1, getStyle("borderColor"));
_local3.drawRect(0, 0, _arg1, _arg2);
}
}
}//package mx.skins.halo
Section 237
//BusyCursor (mx.skins.halo.BusyCursor)
package mx.skins.halo {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
public class BusyCursor extends FlexSprite {
private var hourHand:Shape;
private var minuteHand:Shape;
mx_internal static const VERSION:String = "2.0.1.0";
public function BusyCursor(){
var _local1:CSSStyleDeclaration;
var _local2:Class;
var _local3:DisplayObject;
var _local4:Number;
var _local5:Number;
var _local6:Graphics;
super();
_local1 = StyleManager.getStyleDeclaration("CursorManager");
_local2 = _local1.getStyle("busyCursorBackground");
_local3 = new (_local2);
if ((_local3 is InteractiveObject)){
InteractiveObject(_local3).mouseEnabled = false;
};
addChild(_local3);
_local4 = -0.5;
_local5 = -0.5;
minuteHand = new FlexShape();
minuteHand.name = "minuteHand";
_local6 = minuteHand.graphics;
_local6.beginFill(0);
_local6.moveTo(_local4, _local5);
_local6.lineTo((1 + _local4), (0 + _local5));
_local6.lineTo((1 + _local4), (5 + _local5));
_local6.lineTo((0 + _local4), (5 + _local5));
_local6.lineTo((0 + _local4), (0 + _local5));
_local6.endFill();
addChild(minuteHand);
hourHand = new FlexShape();
hourHand.name = "hourHand";
_local6 = hourHand.graphics;
_local6.beginFill(0);
_local6.moveTo(_local4, _local5);
_local6.lineTo((4 + _local4), (0 + _local5));
_local6.lineTo((4 + _local4), (1 + _local5));
_local6.lineTo((0 + _local4), (1 + _local5));
_local6.lineTo((0 + _local4), (0 + _local5));
_local6.endFill();
addChild(hourHand);
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event):void{
minuteHand.rotation = (minuteHand.rotation + 12);
hourHand.rotation = (hourHand.rotation + 1);
}
}
}//package mx.skins.halo
Section 238
//ButtonSkin (mx.skins.halo.ButtonSkin)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.controls.*;
import mx.utils.*;
import mx.skins.*;
public class ButtonSkin extends Border {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cache:Object = {};
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:uint;
var _local4:Number;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:uint;
var _local9:Object;
var _local10:Number;
var _local11:Number;
var _local12:Boolean;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
var _local21:Array;
var _local22:Array;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderColor");
_local4 = getStyle("cornerRadius");
_local5 = getStyle("fillAlphas");
_local6 = getStyle("fillColors");
StyleManager.getColorNames(_local6);
_local7 = getStyle("highlightAlphas");
_local8 = getStyle("themeColor");
_local9 = calcDerivedStyles(_local8, _local6[0], _local6[1]);
_local10 = ColorUtil.adjustBrightness2(_local3, -50);
_local11 = ColorUtil.adjustBrightness2(_local8, -25);
_local12 = false;
if ((parent is Button)){
_local12 = Button(parent).emphasized;
};
_local13 = Math.max(0, _local4);
_local14 = Math.max(0, (_local4 - 1));
_local15 = Math.max(0, (_local4 - 2));
graphics.clear();
switch (name){
case "selectedUpSkin":
case "selectedOverSkin":
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local6[1], _local6[1]], 1, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
break;
case "upSkin":
_local17 = [_local6[0], _local6[1]];
_local18 = [_local5[0], _local5[1]];
if (_local12){
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:2, y:2, w:(_arg1 - 4), h:(_arg2 - 4), r:(_local4 - 2)});
drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _local15, _local17, _local18, verticalGradientMatrix(2, 2, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
} else {
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
};
break;
case "overSkin":
if (_local6.length > 2){
_local19 = [_local6[2], _local6[3]];
} else {
_local19 = [_local6[0], _local6[1]];
};
if (_local5.length > 2){
_local20 = [_local5[2], _local5[3]];
} else {
_local20 = [_local5[0], _local5[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local19, _local20, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "downSkin":
case "selectedDownSkin":
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "disabledSkin":
case "selectedDisabledSkin":
_local21 = [_local6[0], _local6[1]];
_local22 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))];
drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local21, _local22, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
break;
};
}
override public function get measuredWidth():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_WIDTH);
}
override public function get measuredHeight():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_HEIGHT);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint):Object{
var _local4:String;
var _local5:Object;
_local4 = HaloColors.getCacheKey(_arg1, _arg2, _arg3);
if (!cache[_local4]){
_local5 = (cache[_local4] = {});
HaloColors.addHaloColors(_local5, _arg1, _arg2, _arg3);
};
return (cache[_local4]);
}
}
}//package mx.skins.halo
Section 239
//CheckBoxIcon (mx.skins.halo.CheckBoxIcon)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class CheckBoxIcon extends Border {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cache:Object = {};
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:uint;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:Object;
var _local10:Number;
var _local11:Number;
var _local12:Boolean;
var _local13:Array;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
var _local19:Graphics;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderColor");
_local4 = getStyle("fillAlphas");
_local5 = getStyle("fillColors");
StyleManager.getColorNames(_local5);
_local6 = getStyle("highlightAlphas");
_local7 = getStyle("themeColor");
_local8 = 2831164;
_local9 = calcDerivedStyles(_local7, _local3, _local5[0], _local5[1]);
_local10 = ColorUtil.adjustBrightness2(_local3, -50);
_local11 = ColorUtil.adjustBrightness2(_local7, -25);
_local12 = false;
_local19 = graphics;
_local19.clear();
switch (name){
case "upIcon":
_local13 = [_local5[0], _local5[1]];
_local14 = [_local4[0], _local4[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local13, _local14, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "overIcon":
if (_local5.length > 2){
_local15 = [_local5[2], _local5[3]];
} else {
_local15 = [_local5[0], _local5[1]];
};
if (_local4.length > 2){
_local16 = [_local4[2], _local4[3]];
} else {
_local16 = [_local4[0], _local4[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local7, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "downIcon":
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local7, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "disabledIcon":
_local17 = [_local5[0], _local5[1]];
_local18 = [Math.max(0, (_local4[0] - 15)), Math.max(0, (_local4[1] - 15))];
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
break;
case "selectedUpIcon":
_local12 = true;
_local13 = [_local5[0], _local5[1]];
_local14 = [_local4[0], _local4[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local13, _local14, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "selectedOverIcon":
_local12 = true;
if (_local5.length > 2){
_local15 = [_local5[2], _local5[3]];
} else {
_local15 = [_local5[0], _local5[1]];
};
if (_local4.length > 2){
_local16 = [_local4[2], _local4[3]];
} else {
_local16 = [_local4[0], _local4[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local7, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "selectedDownIcon":
_local12 = true;
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local7, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2)));
break;
case "selectedDisabledIcon":
_local12 = true;
_local8 = 0x999999;
_local17 = [_local5[0], _local5[1]];
_local18 = [Math.max(0, (_local4[0] - 0.15)), Math.max(0, (_local4[1] - 0.15))];
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2)));
break;
};
if (_local12){
_local19.beginFill(_local8);
_local19.moveTo(3, 5);
_local19.lineTo(5, 10);
_local19.lineTo(7, 10);
_local19.lineTo(12, 2);
_local19.lineTo(13, 1);
_local19.lineTo(11, 1);
_local19.lineTo(6.5, 7);
_local19.lineTo(5, 5);
_local19.lineTo(3, 5);
_local19.endFill();
};
}
override public function get measuredWidth():Number{
return (14);
}
override public function get measuredHeight():Number{
return (14);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local5:String;
var _local6:Object;
_local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 240
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.graphics.*;
import mx.utils.*;
import mx.skins.*;
public class HaloBorder extends RectangularBorder {
private var _borderMetrics:EdgeMetrics;
private var dropShadow:RectangularDropShadow;
mx_internal static const VERSION:String = "2.0.1.0";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local2:String;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
_local2 = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
private function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local9:Number;
var _local10:String;
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
_local9 = getStyle("shadowDistance");
_local10 = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
private function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number;
var _local8:Number;
var _local9:Graphics;
_local7 = width;
_local8 = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
_local9 = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
private function getBackgroundColor():Object{
var _local1:IUIComponent;
var _local2:Object;
_local1 = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (_local2){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
private function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:String;
var _local4:Object;
var _local5:Array;
var _local6:Number;
var _local7:String;
var _local8:Object;
var _local9:uint;
var _local10:uint;
var _local11:String;
var _local12:Number;
var _local13:uint;
var _local14:Boolean;
var _local15:uint;
var _local16:Array;
var _local17:Array;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:uint;
var _local22:Boolean;
var _local23:Number;
var _local24:Object;
var _local25:Boolean;
var _local26:Object;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Object;
var _local31:Graphics;
var _local32:Number;
var _local33:Number;
var _local34:Container;
var _local35:EdgeMetrics;
var _local36:Boolean;
var _local37:Number;
var _local38:Array;
var _local39:uint;
var _local40:Boolean;
var _local41:Number;
var _local42:Number;
var _local43:Number;
var _local44:EdgeMetrics;
var _local45:Number;
var _local46:Number;
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderStyle");
_local4 = getBackgroundColor();
_local5 = getStyle("highlightAlphas");
_local7 = "backgroundAlpha";
_local23 = 0;
_local24 = null;
_local25 = false;
_local31 = graphics;
_local31.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local10 = getStyle("borderColor");
_local27 = ColorUtil.adjustBrightness2(_local10, -40);
_local28 = ColorUtil.adjustBrightness2(_local10, 25);
_local29 = ColorUtil.adjustBrightness2(_local10, 40);
_local30 = _local4;
if ((((_local30 === null)) || ((_local30 === "")))){
_local30 = _local10;
};
draw3dBorder(_local28, _local27, _local29, Number(_local30), Number(_local30), Number(_local30));
break;
case "outset":
_local10 = getStyle("borderColor");
_local27 = ColorUtil.adjustBrightness2(_local10, -40);
_local28 = ColorUtil.adjustBrightness2(_local10, -25);
_local29 = ColorUtil.adjustBrightness2(_local10, 40);
_local30 = _local4;
if ((((_local30 === null)) || ((_local30 === "")))){
_local30 = _local10;
};
draw3dBorder(_local28, _local29, _local27, Number(_local30), Number(_local30), Number(_local30));
break;
case "alert":
case "default":
_local32 = getStyle("backgroundAlpha");
_local6 = getStyle("borderAlpha");
_local7 = "borderAlpha";
_local23 = getStyle("cornerRadius");
_local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local33 = (_local25) ? _local23 : 0;
drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local33, _local33);
if (!_local25){
_local24 = {};
};
_local34 = (parent as Container);
if (_local34){
_local35 = _local34.viewMetrics;
_local8 = {x:_local35.left, y:_local35.top, w:Math.max(0, ((_arg1 - _local35.left) - _local35.right)), h:Math.max(0, ((_arg2 - _local35.top) - _local35.bottom)), r:0};
if ((((_local8.w > 0)) && ((_local8.h > 0)))){
if (_local32 != _local6){
drawDropShadow(_local8.x, _local8.y, _local8.w, _local8.h, 0, 0, 0, 0);
};
_local31.beginFill(Number(_local4), _local32);
_local31.drawRect(_local8.x, _local8.y, _local8.w, _local8.h);
_local31.endFill();
};
};
_local4 = getStyle("borderColor");
break;
case "dropdown":
_local15 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local15)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local15, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
_local4 = null;
break;
case "menuBorder":
_local10 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local10, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
_local4 = null;
break;
};
_local17 = getStyle("footerColors");
_local36 = !((_local17 == null));
_local37 = getStyle("borderAlpha");
if (_local36){
_local31.lineStyle(0, ((_local17.length > 0)) ? _local17[1] : _local17[0], _local37);
_local31.moveTo(0, 0);
_local31.lineTo(_arg1, 0);
_local31.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
_local23 = IStyleClient(parent.parent).getStyle("cornerRadius");
_local37 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(_local23)){
_local23 = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
_local23 = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local17.length > 1)) && (!((_local17[0] == _local17[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(_local23 - 1), br:(_local23 - 1)}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
_local4 = null;
break;
case "applicationControlBar":
_local16 = getStyle("fillColors");
_local6 = getStyle("backgroundAlpha");
_local5 = getStyle("highlightAlphas");
_local38 = getStyle("fillAlphas");
_local14 = getStyle("docked");
_local39 = uint(_local4);
_local23 = getStyle("cornerRadius");
if (!_local23){
_local23 = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), _local23, _local23, _local23, _local23);
if (_local4){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local39, _local6, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local16, _local38, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:_local23, tr:_local23, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:_local23, tr:_local23, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:_local23, tr:_local23, bl:0, br:0}});
_local4 = null;
break;
default:
_local10 = getStyle("borderColor");
_local12 = getStyle("borderThickness");
_local11 = getStyle("borderSides");
_local40 = true;
_local23 = getStyle("cornerRadius");
_local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local41 = Math.max((_local23 - _local12), 0);
_local26 = {x:_local12, y:_local12, w:(_arg1 - (_local12 * 2)), h:(_arg2 - (_local12 * 2)), r:_local41};
if (!_local25){
_local24 = {tl:_local23, tr:_local23, bl:0, br:0};
_local26.r = {tl:_local41, tr:_local41, bl:0, br:0};
};
if (_local11 != "left top right bottom"){
_local26.r = {tl:_local41, tr:_local41, bl:(_local25) ? _local41 : 0, br:(_local25) ? _local41 : 0};
_local24 = {tl:_local23, tr:_local23, bl:(_local25) ? _local23 : 0, br:(_local25) ? _local23 : 0};
_local11 = _local11.toLowerCase();
if (_local11.indexOf("left") == -1){
_local26.x = 0;
_local26.w = (_local26.w + _local12);
_local26.r.tl = 0;
_local26.r.bl = 0;
_local24.tl = 0;
_local24.bl = 0;
_local40 = false;
};
if (_local11.indexOf("top") == -1){
_local26.y = 0;
_local26.h = (_local26.h + _local12);
_local26.r.tl = 0;
_local26.r.tr = 0;
_local24.tl = 0;
_local24.tr = 0;
_local40 = false;
};
if (_local11.indexOf("right") == -1){
_local26.w = (_local26.w + _local12);
_local26.r.tr = 0;
_local26.r.br = 0;
_local24.tr = 0;
_local24.br = 0;
_local40 = false;
};
if (_local11.indexOf("bottom") == -1){
_local26.h = (_local26.h + _local12);
_local26.r.bl = 0;
_local26.r.br = 0;
_local24.bl = 0;
_local24.br = 0;
_local40 = false;
};
};
if ((((_local23 == 0)) && (_local40))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local31.beginFill(_local10);
_local31.drawRect(0, 0, _arg1, _arg2);
_local31.drawRect(_local12, _local12, (_arg1 - (2 * _local12)), (_arg2 - (2 * _local12)));
_local31.endFill();
} else {
if (_local24){
drawDropShadow(0, 0, _arg1, _arg2, _local24.tl, _local24.tr, _local24.br, _local24.bl);
drawRoundRect(0, 0, _arg1, _arg2, _local24, _local10, 1, null, null, null, _local26);
_local24.tl = Math.max((_local23 - _local12), 0);
_local24.tr = Math.max((_local23 - _local12), 0);
_local24.bl = (_local25) ? Math.max((_local23 - _local12), 0) : 0;
_local24.br = (_local25) ? Math.max((_local23 - _local12), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local23, _local23);
drawRoundRect(0, 0, _arg1, _arg2, _local23, _local10, 1, null, null, null, _local26);
_local23 = Math.max((getStyle("cornerRadius") - _local12), 0);
};
};
};
};
if (((((((!((_local4 === null))) && (!((_local4 === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local42 = Number(_local4);
_local43 = 1;
_local44 = borderMetrics;
if (((((isNaN(_local42)) || ((_local4 === "")))) || ((_local4 === null)))){
_local43 = 0;
_local42 = 0xFFFFFF;
} else {
_local43 = getStyle(_local7);
};
if (((!((_local23 == 0))) || (_local8))){
_local45 = _local44.bottom;
if (_local24){
_local46 = (_local25) ? _local23 : 0;
_local24 = {tl:_local23, tr:_local23, bl:_local46, br:_local46};
drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local24, _local42, _local43, null, GradientType.LINEAR, null, _local8);
} else {
drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local23, _local42, _local43, null, GradientType.LINEAR, null, _local8);
};
} else {
_local31.beginFill(_local42, _local43);
_local31.drawRect(_local44.left, _local44.top, ((_arg1 - _local44.right) - _local44.left), ((_arg2 - _local44.bottom) - _local44.top));
_local31.endFill();
};
};
}
}
}//package mx.skins.halo
Section 241
//HaloColors (mx.skins.halo.HaloColors)
package mx.skins.halo {
import mx.utils.*;
public class HaloColors {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cache:Object = {};
public static function getCacheKey(... _args):String{
return (_args.join(","));
}
public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{
var _local5:String;
var _local6:Object;
_local5 = getCacheKey(_arg2, _arg3, _arg4);
_local6 = cache[_local5];
if (!_local6){
_local6 = (cache[_local5] = {});
_local6.themeColLgt = ColorUtil.adjustBrightness(_arg2, 100);
_local6.themeColDrk1 = ColorUtil.adjustBrightness(_arg2, -75);
_local6.themeColDrk2 = ColorUtil.adjustBrightness(_arg2, -25);
_local6.fillColorBright1 = ColorUtil.adjustBrightness2(_arg3, 15);
_local6.fillColorBright2 = ColorUtil.adjustBrightness2(_arg4, 15);
_local6.fillColorPress1 = ColorUtil.adjustBrightness2(_arg2, 85);
_local6.fillColorPress2 = ColorUtil.adjustBrightness2(_arg2, 60);
_local6.bevelHighlight1 = ColorUtil.adjustBrightness2(_arg3, 40);
_local6.bevelHighlight2 = ColorUtil.adjustBrightness2(_arg4, 40);
};
_arg1.themeColLgt = _local6.themeColLgt;
_arg1.themeColDrk1 = _local6.themeColDrk1;
_arg1.themeColDrk2 = _local6.themeColDrk2;
_arg1.fillColorBright1 = _local6.fillColorBright1;
_arg1.fillColorBright2 = _local6.fillColorBright2;
_arg1.fillColorPress1 = _local6.fillColorPress1;
_arg1.fillColorPress2 = _local6.fillColorPress2;
_arg1.bevelHighlight1 = _local6.bevelHighlight1;
_arg1.bevelHighlight2 = _local6.bevelHighlight2;
}
}
}//package mx.skins.halo
Section 242
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function set inheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function registerEffects(_arg1:Array):void{
}
public function getClassStyleDeclarations():Array{
return ([]);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:Number;
var _local10:Number;
var _local11:Graphics;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("focusBlendMode");
_local4 = getStyle("focusAlpha");
_local5 = getStyle("focusColor");
_local6 = getStyle("cornerRadius");
_local7 = getStyle("focusThickness");
_local8 = getStyle("focusRoundedCorners");
_local9 = getStyle("themeColor");
_local10 = _local5;
if (!_local10){
_local10 = _local9;
};
_local11 = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
}
}//package mx.skins.halo
Section 243
//ScrollArrowSkin (mx.skins.halo.ScrollArrowSkin)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.controls.scrollClasses.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollArrowSkin extends Border {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cache:Object = {};
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:uint;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:uint;
var _local9:Boolean;
var _local10:uint;
var _local11:Object;
var _local12:Boolean;
var _local13:Array;
var _local14:Graphics;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("backgroundColor");
_local4 = getStyle("borderColor");
_local5 = getStyle("fillAlphas");
_local6 = getStyle("fillColors");
StyleManager.getColorNames(_local6);
_local7 = getStyle("highlightAlphas");
_local8 = getStyle("themeColor");
_local9 = (name.charAt(0) == "u");
_local10 = 0x111111;
_local11 = calcDerivedStyles(_local8, _local4, _local6[0], _local6[1]);
_local12 = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (((_local9) && (!(_local12)))){
_local13 = [_local4, _local11.borderColorDrk1];
} else {
_local13 = [_local11.borderColorDrk1, _local11.borderColorDrk2];
};
_local14 = graphics;
_local14.clear();
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
if (name.indexOf("Disabled") == -1){
drawRoundRect(0, 0, _arg1, _arg2, 0, _local3, 1);
};
switch (name){
case "upArrowUpSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowUpSkin":
_local15 = [_local6[0], _local6[1]];
_local16 = [_local5[0], _local5[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowOverSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowOverSkin":
if (_local6.length > 2){
_local17 = [_local6[2], _local6[3]];
} else {
_local17 = [_local6[0], _local6[1]];
};
if (_local5.length > 2){
_local18 = [_local5[2], _local5[3]];
} else {
_local18 = [_local5[0], _local5[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 1);
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowDownSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local12) ? horizontalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8) : verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowDownSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
default:
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
return;
};
_local14.beginFill(_local10);
if (_local9){
_local14.moveTo((_arg1 / 2), 6);
_local14.lineTo((_arg1 - 5), (_arg2 - 6));
_local14.lineTo(5, (_arg2 - 6));
_local14.lineTo((_arg1 / 2), 6);
} else {
_local14.moveTo((_arg1 / 2), (_arg2 - 6));
_local14.lineTo((_arg1 - 5), 6);
_local14.lineTo(5, 6);
_local14.lineTo((_arg1 / 2), (_arg2 - 6));
};
_local14.endFill();
}
override public function get measuredWidth():Number{
return (ScrollBar.THICKNESS);
}
override public function get measuredHeight():Number{
return (ScrollBar.THICKNESS);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local5:String;
var _local6:Object;
_local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -25);
_local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 244
//ScrollThumbSkin (mx.skins.halo.ScrollThumbSkin)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollThumbSkin extends Border {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cache:Object = {};
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:uint;
var _local5:Number;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:Object;
var _local12:Number;
var _local13:Object;
var _local14:Object;
var _local15:Boolean;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("backgroundColor");
_local4 = getStyle("borderColor");
_local5 = getStyle("cornerRadius");
_local6 = getStyle("fillAlphas");
_local7 = getStyle("fillColors");
StyleManager.getColorNames(_local7);
_local8 = getStyle("highlightAlphas");
_local9 = getStyle("themeColor");
_local10 = 7305079;
_local11 = calcDerivedStyles(_local9, _local4, _local7[0], _local7[1]);
_local12 = Math.max((_local5 - 1), 0);
_local13 = {tl:0, tr:_local12, bl:0, br:_local12};
_local12 = Math.max((_local12 - 1), 0);
_local14 = {tl:0, tr:_local12, bl:0, br:_local12};
_local15 = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
graphics.clear();
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, _local3, 1);
switch (name){
case "thumbUpSkin":
default:
_local17 = [_local7[0], _local7[1]];
_local18 = [_local6[0], _local6[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local4, _local11.borderColorDrk1], 1, (_local15) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local17, _local18, (_local15) ? horizontalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)));
if (_local15){
drawRoundRect(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2), 0, [0xFFFFFF, 0xFFFFFF], _local8, horizontalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
} else {
drawRoundRect(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2), _local14, [0xFFFFFF, 0xFFFFFF], _local8, (_local15) ? horizontalGradientMatrix(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2)) : verticalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
};
break;
case "thumbOverSkin":
if (_local7.length > 2){
_local19 = [_local7[2], _local7[3]];
} else {
_local19 = [_local7[0], _local7[1]];
};
if (_local6.length > 2){
_local20 = [_local6[2], _local6[3]];
} else {
_local20 = [_local6[0], _local6[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk1], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local19, _local20, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDownSkin":
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local13, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDisabledSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, 0x999999, 0.5);
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, 0xFFFFFF, 0.5);
break;
};
_local16 = Math.floor(((_arg1 / 2) - 4));
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 4)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor((_arg2 / 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 4)), 5, 1, 0, 0, 0.4);
}
override public function get measuredWidth():Number{
return (15);
}
override public function get measuredHeight():Number{
return (11);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local5:String;
var _local6:Object;
_local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 245
//ScrollTrackSkin (mx.skins.halo.ScrollTrackSkin)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class ScrollTrackSkin extends Border {
mx_internal static const VERSION:String = "2.0.1.0";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Array;
var _local4:uint;
var _local5:uint;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("trackColors");
StyleManager.getColorNames(_local3);
_local4 = ColorUtil.adjustBrightness2(getStyle("borderColor"), -20);
_local5 = ColorUtil.adjustBrightness2(_local4, -30);
graphics.clear();
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local4, _local5], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local3, 1, horizontalGradientMatrix(1, 1, ((_arg1 / 3) * 2), (_arg2 - 2)));
}
override public function get measuredWidth():Number{
return (16);
}
override public function get measuredHeight():Number{
return (1);
}
}
}//package mx.skins.halo
Section 246
//TitleBackground (mx.skins.halo.TitleBackground)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class TitleBackground extends ProgrammaticSkin {
mx_internal static const VERSION:String = "2.0.1.0";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:Array;
var _local7:Boolean;
var _local8:Number;
var _local9:Graphics;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderAlpha");
_local4 = getStyle("cornerRadius");
_local5 = getStyle("highlightAlphas");
_local6 = getStyle("headerColors");
_local7 = !((_local6 == null));
StyleManager.getColorNames(_local6);
_local8 = ColorUtil.adjustBrightness2((_local6) ? _local6[1] : 0xFFFFFF, -20);
_local9 = graphics;
_local9.clear();
if (_arg2 < 3){
return;
};
if (_local7){
_local9.lineStyle(0, _local8, _local3);
_local9.moveTo(0, _arg2);
_local9.lineTo(_arg1, _arg2);
_local9.lineStyle(0, 0, 0);
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, _local6, _local3, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 0, _arg1, (_arg2 / 2), {tl:_local4, tr:_local4, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, (_arg2 / 2)));
};
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:_local4, tr:_local4, bl:0, br:0}});
}
}
}//package mx.skins.halo
Section 247
//ToolTipBorder (mx.skins.halo.ToolTipBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.graphics.*;
import mx.skins.*;
import flash.filters.*;
public class ToolTipBorder extends RectangularBorder {
private var _borderMetrics:EdgeMetrics;
private var dropShadow:RectangularDropShadow;
mx_internal static const VERSION:String = "2.0.1.0";
override public function get borderMetrics():EdgeMetrics{
var _local1:String;
if (_borderMetrics){
return (_borderMetrics);
};
_local1 = getStyle("borderStyle");
switch (_local1){
case "errorTipRight":
_borderMetrics = new EdgeMetrics(15, 1, 3, 3);
break;
case "errorTipAbove":
_borderMetrics = new EdgeMetrics(3, 1, 3, 15);
break;
case "errorTipBelow":
_borderMetrics = new EdgeMetrics(3, 13, 3, 3);
break;
default:
_borderMetrics = new EdgeMetrics(3, 1, 3, 3);
break;
};
return (_borderMetrics);
}
override public function styleChanged(_arg1:String):void{
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:String;
var _local4:uint;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:uint;
var _local9:Number;
var _local10:Graphics;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderStyle");
_local4 = getStyle("backgroundColor");
_local5 = getStyle("backgroundAlpha");
_local6 = getStyle("borderColor");
_local7 = getStyle("cornerRadius");
_local8 = getStyle("shadowColor");
_local9 = 0.1;
_local10 = graphics;
_local10.clear();
filters = [];
switch (_local3){
case "toolTip":
drawRoundRect(3, 1, (_arg1 - 6), (_arg2 - 4), _local7, _local4, _local5);
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = 3;
dropShadow.angle = 90;
dropShadow.color = 0;
dropShadow.alpha = 0.4;
dropShadow.tlRadius = (_local7 + 2);
dropShadow.trRadius = (_local7 + 2);
dropShadow.blRadius = (_local7 + 2);
dropShadow.brRadius = (_local7 + 2);
dropShadow.drawShadow(graphics, 3, 0, (_arg1 - 6), (_arg2 - 4));
break;
case "errorTipRight":
drawRoundRect(11, 0, (_arg1 - 11), (_arg2 - 2), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(11, 7);
_local10.lineTo(0, 13);
_local10.lineTo(11, 19);
_local10.moveTo(11, 7);
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
case "errorTipAbove":
drawRoundRect(0, 0, _arg1, (_arg2 - 13), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(9, (_arg2 - 13));
_local10.lineTo(15, (_arg2 - 2));
_local10.lineTo(21, (_arg2 - 13));
_local10.moveTo(9, (_arg2 - 13));
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
case "errorTipBelow":
drawRoundRect(0, 11, _arg1, (_arg2 - 13), 3, _local6, _local5);
_local10.beginFill(_local6, _local5);
_local10.moveTo(9, 11);
_local10.lineTo(15, 0);
_local10.lineTo(21, 11);
_local10.moveTo(10, 11);
_local10.endFill();
filters = [new DropShadowFilter(2, 90, 0, 0.4)];
break;
};
}
}
}//package mx.skins.halo
Section 248
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin {
mx_internal static const VERSION:String = "2.0.1.0";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 249
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.display.*;
import mx.managers.*;
import flash.geom.*;
import mx.styles.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient {
private var _initialized:Boolean;// = false
private var invalidateDisplayListFlag:Boolean;// = false
private var _height:Number;
private var _styleName:IStyleClient;
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
private var _nestLevel:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
invalidateDisplayListFlag = false;
_initialized = false;
_nestLevel = 0;
_processedDescriptors = false;
_updateCompletePendingFlag = true;
super();
_width = measuredWidth;
_height = measuredHeight;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function invalidateSize():void{
}
public function getStyle(_arg1:String){
return (_styleName.getStyle(_arg1));
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local12:Graphics;
var _local13:Number;
var _local14:Array;
var _local15:Object;
_local12 = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get measuredHeight():Number{
return (0);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
override public function get width():Number{
return (_width);
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
public function invalidateProperties():void{
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function get styleName():Object{
return (_styleName);
}
public function validateProperties():void{
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
}
}//package mx.skins
Section 250
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.resources.*;
import flash.system.*;
import flash.net.*;
import flash.utils.*;
import mx.utils.*;
public class RectangularBorder extends Border {
private var backgroundImageWidth:Number;
private var backgroundImageStyle:Object;
mx_internal var loader:Loader;
private var backgroundMask:Shape;
private var backgroundImageHeight:Number;
private var _backgroundImageRect:Rectangle;
private var backgroundImage:DisplayObject;
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceNotLoaded:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("skins", ApplicationDomain.currentDomain);
public function RectangularBorder(){
addEventListener(Event.REMOVED, removedHandler);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var newStyle:Object;
var cls:Class;
var imgParent:DisplayObjectContainer;
var childrenList:IChildList;
var newStyleObj:DisplayObject;
var loaderContext:LoaderContext;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
newStyle = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
backgroundImageStyle = newStyle;
if (backgroundImage){
imgParent = backgroundImage.parent;
childrenList = ((imgParent is Container)) ? Container(imgParent).rawChildren : IChildList(imgParent);
childrenList.removeChild(backgroundImage);
};
backgroundImage = null;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
throw (new Error(StringUtil.substitute(resourceNotLoaded, newStyle)));
};
};
};
};
if (backgroundImage){
adjustBackgroundImage();
};
}
private function completeEventHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (!parent){
return;
};
_local2 = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
adjustBackgroundImage();
dispatchEvent(_arg1.clone());
}
mx_internal function get backgroundImageRect():Rectangle{
return (_backgroundImageRect);
}
private function getBackgroundSize():Number{
var _local1:Number;
var _local2:Object;
var _local3:int;
_local1 = NaN;
_local2 = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
mx_internal function adjustBackgroundImage():void{
var _local1:DisplayObject;
var _local2:EdgeMetrics;
var _local3:Boolean;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Graphics;
_local1 = parent;
_local2 = ((_local1 is Container)) ? Container(_local1).viewMetrics : borderMetrics;
_local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageRect){
_local9 = _backgroundImageRect.width;
_local10 = _backgroundImageRect.height;
} else {
_local9 = ((width - _local2.left) - _local2.right);
_local10 = ((height - _local2.top) - _local2.bottom);
};
_local4 = getBackgroundSize();
if (isNaN(_local4)){
_local11 = 1;
_local12 = 1;
} else {
_local13 = (_local4 * 0.01);
_local11 = ((_local13 * _local9) / backgroundImageWidth);
_local12 = ((_local13 * _local10) / backgroundImageHeight);
};
backgroundImage.scaleX = _local11;
backgroundImage.scaleY = _local12;
_local5 = Math.round((0.5 * (_local9 - (backgroundImageWidth * _local11))));
_local6 = Math.round((0.5 * (_local10 - (backgroundImageHeight * _local12))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
backgroundMask.x = _local2.left;
backgroundMask.y = _local2.top;
if (((_local3) && ((_local1 is Container)))){
_local5 = (_local5 - Container(_local1).horizontalScrollPosition);
_local6 = (_local6 - Container(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local5);
backgroundImage.y = (backgroundImage.y + _local6);
_local7 = ((width - _local2.left) - _local2.right);
_local8 = ((height - _local2.top) - _local2.bottom);
if (((!((backgroundMask.width == _local7))) || (!((backgroundMask.height == _local8))))){
_local14 = backgroundMask.graphics;
_local14.clear();
_local14.beginFill(0xFFFFFF);
_local14.drawRect(0, 0, _local7, _local8);
_local14.endFill();
};
}
private function errorEventHandler(_arg1:Event):void{
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local2:IChildList;
var _local3:int;
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
_local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent);
backgroundMask = new FlexShape();
backgroundMask.name = "backgroundMask";
backgroundMask.x = 0;
backgroundMask.y = 0;
_local2.addChild(backgroundMask);
_local3 = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local3 + 1));
backgroundImage.mask = backgroundMask;
}
mx_internal function set backgroundImageRect(_arg1:Rectangle):void{
_backgroundImageRect = _arg1;
invalidateDisplayList();
}
mx_internal function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
_local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent);
if (backgroundImage){
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
if (backgroundMask){
_local2.removeChild(backgroundMask);
backgroundMask = null;
};
}
private static function loadResources():void{
resourceNotLoaded = packageResources.getString("notLoaded");
}
loadResources();
}
}//package mx.skins
Section 251
//IOverride (mx.states.IOverride)
package mx.states {
import mx.core.*;
public interface IOverride {
function initialize():void;
function remove(_arg1:UIComponent):void;
function apply(_arg1:UIComponent):void;
}
}//package mx.states
Section 252
//State (mx.states.State)
package mx.states {
import flash.events.*;
import mx.events.*;
public class State extends EventDispatcher {
public var name:String;
private var initialized:Boolean;// = false
public var overrides:Array;
public var basedOn:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function State(){
initialized = false;
overrides = [];
super();
}
mx_internal function initialize():void{
var _local1:int;
if (!initialized){
initialized = true;
_local1 = 0;
while (_local1 < overrides.length) {
IOverride(overrides[_local1]).initialize();
_local1++;
};
};
}
mx_internal function dispatchExitState():void{
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
}
mx_internal function dispatchEnterState():void{
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
}
}
}//package mx.states
Section 253
//Transition (mx.states.Transition)
package mx.states {
import mx.effects.*;
public class Transition {
public var effect:Effect;
public var toState:String;// = "*"
public var fromState:String;// = "*"
mx_internal static const VERSION:String = "2.0.1.0";
public function Transition(){
fromState = "*";
toState = "*";
super();
}
}
}//package mx.states
Section 254
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.display.*;
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import flash.utils.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
public var defaultFactory:Function;
public var factory:Function;
protected var overrides:Object;
private var clones:Dictionary;
mx_internal var selectorRefCount:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
private static const NOT_A_COLOR:uint = 4294967295;
private static var styleManager:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager);
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
selectorRefCount = 0;
super();
if (_arg1){
StyleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject):Object{
var nodeAddedToChain:Boolean;
var p:String;
var emptyObjectFactory:Function;
var chain = _arg1;
var target = _arg2;
nodeAddedToChain = false;
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object;
_local1 = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:Object;
_local3 = getStyle(_arg1);
_local4 = false;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
_local5 = SystemManagerGlobals.topLevelSystemManagers;
_local6 = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
_local5 = StyleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local4[_arg1] = _arg2;
};
}
}
}//package mx.styles
Section 255
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function styleChanged(_arg1:String):void;
function set styleName(_arg1:Object):void;
function get styleName():Object;
}
}//package mx.styles
Section 256
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get styleDeclaration():CSSStyleDeclaration;
function get className():String;
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function set nonInheritingStyles(_arg1:Object):void;
function get inheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function get nonInheritingStyles():Object;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function getStyle(_arg1:String);
function setStyle(_arg1:String, _arg2):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 257
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get inheritingStyles():Object;
function styleDeclarationsChanged():void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function registerInheritingStyle(_arg1:String):void;
function get typeSelectorCache():Object;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function isValidStyleValue(_arg1):Boolean;
function getColorNames(_arg1:Array):void;
function isColorName(_arg1:String):Boolean;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function set typeSelectorCache(_arg1:Object):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 258
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 259
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import mx.core.*;
import flash.events.*;
public class StyleManager {
mx_internal static const VERSION:String = "2.0.1.0";
public static const NOT_A_COLOR:uint = 4294967295;
private static var impl:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager);
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (impl.loadStyleDeclarations(_arg1, _arg2, _arg3));
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 260
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import mx.core.*;
import mx.managers.*;
import flash.events.*;
import mx.events.*;
import mx.modules.*;
import mx.resources.*;
import flash.system.*;
import flash.utils.*;
import mx.utils.*;
public class StyleManagerImpl implements IStyleManager {
private var resourceUnableToLoad:String;// = null
private var _stylesRoot:Object;
private var styleModules:Object;
private var packageResources:ResourceBundle;
private var _inheritingStyles:Object;
private var _typeSelectorCache:Object;
private var selectors:Object;
mx_internal static const VERSION:String = "2.0.1.0";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
packageResources = ResourceBundle.getResourceBundle("styles", ApplicationDomain.currentDomain);
resourceUnableToLoad = null;
selectors = {};
styleModules = {};
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
selectors[_arg1] = _arg2;
typeSelectorCache = new Object();
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:uint;
if (!_arg1){
return;
};
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function styleDeclarationsChanged():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:SystemManager;
_local1 = SystemManagerGlobals.topLevelSystemManagers;
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = SystemManager(_local1[_local3]);
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
var module:IModuleInfo;
var readyHandler:Function;
var styleEventDispatcher:StyleEventDispatcher;
var errorHandler:Function;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var trustContent = _arg3;
module = ModuleManager.getModule(url);
readyHandler = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule;
_local2 = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
errorHandler = function (_arg1:ModuleEvent):void{
var _local2:String;
var _local3:StyleEvent;
if (resourceUnableToLoad == null){
loadResources();
};
_local2 = StringUtil.substitute(resourceUnableToLoad, _arg1.errorText, url);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
if (trustContent){
module.load(ApplicationDomain.currentDomain, SecurityDomain.currentDomain);
} else {
module.load();
};
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local3:StyleModuleInfo;
var _local4:IModuleInfo;
_local3 = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
private function loadResources():void{
resourceUnableToLoad = packageResources.getString("unableToLoad");
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function initProtoChainRoots():void{
if (!stylesRoot){
stylesRoot = selectors["global"].addStyleToProtoChain({}, null);
};
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration;
_local3 = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (selectors[_arg1]);
}
public static function getInstance():IStyleManager{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.events.*;
import mx.modules.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
public var readyHandler:Function;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 261
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import mx.core.*;
import flash.display.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "2.0.1.0";
public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{
var _local2:IStyleClient;
var _local3:Object;
var _local4:Object;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:CSSStyleDeclaration;
_local2 = IStyleClient(_arg1.styleName);
_local3 = _local2.nonInheritingStyles;
if (((!(_local3)) || ((_local3 == UIComponent.STYLE_UNINITIALIZED)))){
_local3 = StyleManager.stylesRoot;
if (_local3.effects){
_arg1.registerEffects(_local3.effects);
};
};
_local4 = _local2.inheritingStyles;
if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){
_local4 = StyleManager.stylesRoot;
};
_local5 = _arg1.getClassStyleDeclarations();
_local6 = _local5.length;
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local4 = _local8.addStyleToProtoChain(_local4, DisplayObject(_arg1));
_local4 = addProperties(_local4, _local2, true);
_local3 = _local8.addStyleToProtoChain(_local3, DisplayObject(_arg1));
_local3 = addProperties(_local3, _local2, false);
if (_local8.effects){
_arg1.registerEffects(_local8.effects);
};
_local7++;
};
_arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, DisplayObject(_arg1)) : _local4;
_arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local3, DisplayObject(_arg1)) : _local3;
}
private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:CSSStyleDeclaration;
var _local9:CSSStyleDeclaration;
_local4 = _arg2.getClassStyleDeclarations();
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_arg1 = _local8.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
if (_local8.effects){
_arg2.registerEffects(_local8.effects);
};
_local6++;
};
_local7 = _arg2.styleName;
if (_local7){
if (typeof(_local7) == "object"){
if ((_local7 is CSSStyleDeclaration)){
_local9 = CSSStyleDeclaration(_local7);
} else {
_arg1 = addProperties(_arg1, IStyleClient(_local7), _arg3);
};
} else {
_local9 = StyleManager.getStyleDeclaration(("." + _local7));
};
if (_local9){
_arg1 = _local9.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
if (_local9.effects){
_arg2.registerEffects(_local9.effects);
};
};
};
if (_arg2.styleDeclaration){
_arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
};
return (_arg1);
}
public static function initTextField(_arg1:UITextField):void{
var _local2:Object;
var _local3:CSSStyleDeclaration;
var _local4:Object;
var _local5:Object;
_local2 = _arg1.styleName;
if (_local2){
if (typeof(_local2) == "object"){
if ((_local2 is CSSStyleDeclaration)){
_local3 = CSSStyleDeclaration(_local2);
} else {
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles;
return;
};
} else {
_local3 = StyleManager.getStyleDeclaration(("." + _local2));
};
};
_local4 = IStyleClient(_arg1.parent).inheritingStyles;
_local5 = StyleManager.stylesRoot;
if (!_local4){
_local4 = StyleManager.stylesRoot;
};
if (_local3){
_local4 = _local3.addStyleToProtoChain(_local4, _arg1);
_local5 = _local3.addStyleToProtoChain(_local5, _arg1);
};
_arg1.inheritingStyles = _local4;
_arg1.nonInheritingStyles = _local5;
}
}
}//package mx.styles
Section 262
//ArrayUtil (mx.utils.ArrayUtil)
package mx.utils {
public class ArrayUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function getItemIndex(_arg1:Object, _arg2:Array):int{
var _local3:int;
var _local4:int;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] === _arg1){
return (_local4);
};
_local4++;
};
return (-1);
}
public static function toArray(_arg1:Object):Array{
if (!_arg1){
return ([]);
};
if ((_arg1 is Array)){
return ((_arg1 as Array));
};
return ([_arg1]);
}
}
}//package mx.utils
Section 263
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local6 = ((_arg2 >> 16) & 0xFF);
_local7 = ((_arg2 >> 8) & 0xFF);
_local8 = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
_local4 = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
_local5 = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 264
//DescribeTypeCache (mx.utils.DescribeTypeCache)
package mx.utils {
import mx.binding.*;
import flash.utils.*;
public class DescribeTypeCache {
mx_internal static const VERSION:String = "2.0.1.0";
private static var cacheHandlers:Object = {};
private static var typeCache:Object = {};
public static function describeType(_arg1):DescribeTypeCacheRecord{
var _local2:String;
var _local3:XML;
var _local4:DescribeTypeCacheRecord;
if ((_arg1 is String)){
_local2 = _arg1;
} else {
_local2 = getQualifiedClassName(_arg1);
};
if ((_local2 in typeCache)){
return (typeCache[_local2]);
};
if ((_arg1 is String)){
_arg1 = getDefinitionByName(_arg1);
};
_local3 = describeType(_arg1);
_local4 = new DescribeTypeCacheRecord();
_local4.typeDescription = _local3;
_local4.typeName = _local2;
typeCache[_local2] = _local4;
return (_local4);
}
public static function registerCacheHandler(_arg1:String, _arg2:Function):void{
cacheHandlers[_arg1] = _arg2;
}
static function extractValue(_arg1:String, _arg2:DescribeTypeCacheRecord){
if ((_arg1 in cacheHandlers)){
return (cacheHandlers[_arg1](_arg2));
};
return (undefined);
}
private static function bindabilityInfoHandler(_arg1:DescribeTypeCacheRecord){
return (new BindabilityInfo(_arg1.typeDescription));
}
registerCacheHandler("bindabilityInfo", bindabilityInfoHandler);
}
}//package mx.utils
Section 265
//DescribeTypeCacheRecord (mx.utils.DescribeTypeCacheRecord)
package mx.utils {
import flash.utils.*;
public dynamic class DescribeTypeCacheRecord extends Proxy {
private var cache:Object;
public var typeDescription:XML;
public var typeName:String;
public function DescribeTypeCacheRecord(){
cache = {};
super();
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:*;
_local2 = cache[_arg1];
if (_local2 === undefined){
_local2 = DescribeTypeCache.extractValue(_arg1, this);
cache[_arg1] = _local2;
};
return (_local2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
var _local2:*;
if ((_arg1 in cache)){
return (true);
};
_local2 = DescribeTypeCache.extractValue(_arg1, this);
if (_local2 === undefined){
return (false);
};
cache[_arg1] = _local2;
return (true);
}
}
}//package mx.utils
Section 266
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local10 = (_arg2 + _arg4);
_local11 = (_arg3 + _arg5);
_local12 = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
_local13 = (_arg9 * 0.292893218813453);
_local14 = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 267
//IXMLNotifiable (mx.utils.IXMLNotifiable)
package mx.utils {
public interface IXMLNotifiable {
function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void;
}
}//package mx.utils
Section 268
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 269
//object_proxy (mx.utils.object_proxy)
package mx.utils {
public namespace object_proxy = "http://www.adobe.com/2006/actionscript/flash/objectproxy";
}//package mx.utils
Section 270
//ObjectProxy (mx.utils.ObjectProxy)
package mx.utils {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
public dynamic class ObjectProxy extends Proxy implements IExternalizable, IPropertyChangeNotifier {
protected var notifiers:Object;
protected var propertyList:Array;
private var _proxyLevel:int;
protected var dispatcher:EventDispatcher;
protected var proxyClass:Class;
private var _item:Object;
private var _id:String;
public function ObjectProxy(_arg1:Object=null, _arg2:String=null, _arg3:int=-1){
proxyClass = ObjectProxy;
super();
if (!_arg1){
_arg1 = {};
};
_item = _arg1;
_proxyLevel = _arg3;
notifiers = {};
dispatcher = new EventDispatcher(this);
if (_arg2){
_id = _arg2;
} else {
_id = UIDUtil.createUID();
};
}
public function dispatchEvent(_arg1:Event):Boolean{
return (dispatcher.dispatchEvent(_arg1));
}
public function willTrigger(_arg1:String):Boolean{
return (dispatcher.willTrigger(_arg1));
}
public function readExternal(_arg1:IDataInput):void{
var _local2:Object;
_local2 = _arg1.readObject();
_item = _local2;
}
public function writeExternal(_arg1:IDataOutput):void{
_arg1.writeObject(_item);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:Object;
_local2 = null;
if (notifiers[_arg1.toString()]){
return (notifiers[_arg1]);
};
_local2 = _item[_arg1];
if (_local2){
if ((((_proxyLevel == 0)) || (ObjectUtil.isSimple(_local2)))){
return (_local2);
};
_local2 = getComplexProperty(_arg1, _local2);
};
return (_local2);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
return ((_arg1 in _item));
}
public function get uid():String{
return (_id);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
if (_arg1 == 0){
setupPropertyList();
};
if (_arg1 < propertyList.length){
return ((_arg1 + 1));
};
return (0);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:*;
var _local4:IPropertyChangeNotifier;
var _local5:PropertyChangeEvent;
_local3 = _item[_arg1];
if (_local3 !== _arg2){
_item[_arg1] = _arg2;
_local4 = IPropertyChangeNotifier(notifiers[_arg1]);
if (_local4){
_local4.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
delete notifiers[_arg1];
};
if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){
if ((_arg1 is QName)){
_arg1 = QName(_arg1).localName;
};
_local5 = PropertyChangeEvent.createUpdateEvent(this, _arg1.toString(), _local3, _arg2);
dispatcher.dispatchEvent(_local5);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (propertyList[(_arg1 - 1)]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
var _local2:IPropertyChangeNotifier;
var _local3:Object;
var _local4:Boolean;
var _local5:PropertyChangeEvent;
_local2 = IPropertyChangeNotifier(notifiers[_arg1]);
if (_local2){
_local2.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
delete notifiers[_arg1];
};
_local3 = _item[_arg1];
_local4 = delete _item[_arg1];
if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){
_local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.DELETE;
_local5.property = _arg1;
_local5.oldValue = _local3;
_local5.source = this;
dispatcher.dispatchEvent(_local5);
};
return (_local4);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
return (_item[_arg1].apply(_item, _args));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
protected function setupPropertyList():void{
var _local1:String;
if (getQualifiedClassName(_item) == "Object"){
propertyList = [];
for (_local1 in _item) {
propertyList.push(_local1);
};
} else {
propertyList = ObjectUtil.getClassInfo(_item, null, {includeReadOnly:true, uris:["*"]}).properties;
};
}
object_proxy function getComplexProperty(_arg1, _arg2){
if ((_arg2 is IPropertyChangeNotifier)){
_arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
notifiers[_arg1] = _arg2;
return (_arg2);
};
if (getQualifiedClassName(_arg2) == "Object"){
_arg2 = new proxyClass(_item[_arg1], null, ((_proxyLevel > 0)) ? (_proxyLevel - 1) : _proxyLevel);
_arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
notifiers[_arg1] = _arg2;
return (_arg2);
};
return (_arg2);
}
public function set uid(_arg1:String):void{
_id = _arg1;
}
public function hasEventListener(_arg1:String):Boolean{
return (dispatcher.hasEventListener(_arg1));
}
public function propertyChangeHandler(_arg1:PropertyChangeEvent):void{
dispatcher.dispatchEvent(_arg1);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){
return (_item[propertyList[(_arg1 - 1)]]);
}
object_proxy function get object():Object{
return (_item);
}
}
}//package mx.utils
Section 271
//ObjectUtil (mx.utils.ObjectUtil)
package mx.utils {
import flash.utils.*;
import mx.collections.*;
import flash.xml.*;
public class ObjectUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var refCount:int = 0;
private static var CLASS_INFO_CACHE:Object = {};
private static function recordMetadata(_arg1:XMLList):Object{
var result:Object;
var prop:XML;
var propName:String;
var metadataList:XMLList;
var metadata:Object;
var md:XML;
var mdName:String;
var argsList:XMLList;
var value:Object;
var arg:XML;
var existing:Object;
var argKey:String;
var argValue:String;
var existingArray:Array;
var properties = _arg1;
result = null;
try {
for each (prop in properties) {
propName = prop.attribute("name").toString();
metadataList = prop.metadata;
if (metadataList.length() > 0){
if (result == null){
result = {};
};
metadata = {};
result[propName] = metadata;
for each (md in metadataList) {
mdName = md.attribute("name").toString();
argsList = md.arg;
value = {};
for each (arg in argsList) {
argKey = arg.attribute("key").toString();
if (argKey != null){
argValue = arg.attribute("value").toString();
value[argKey] = argValue;
};
};
existing = metadata[mdName];
if (existing != null){
if ((existing is Array)){
existingArray = (existing as Array);
} else {
existingArray = [];
};
existingArray.push(value);
existing = existingArray;
} else {
existing = value;
};
metadata[mdName] = existing;
};
};
};
} catch(e:Error) {
};
return (result);
}
public static function hasMetadata(_arg1:Object, _arg2:String, _arg3:String, _arg4:Array=null, _arg5:Object=null):Boolean{
var _local6:Object;
var _local7:Object;
_local6 = getClassInfo(_arg1, _arg4, _arg5);
_local7 = _local6["metadata"];
return (internalHasMetadata(_local7, _arg2, _arg3));
}
private static function byteArrayCompare(_arg1:ByteArray, _arg2:ByteArray):int{
var _local3:int;
var _local4:int;
_local3 = 0;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local3 = -1;
} else {
_local3 = 1;
};
} else {
_arg1.position = 0;
_arg2.position = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
_local3 = numericCompare(_arg1.readByte(), _arg2.readByte());
if (_local3 != 0){
_local4 = _arg1.length;
};
_local4++;
};
};
return (_local3);
}
private static function arrayCompare(_arg1:Array, _arg2:Array, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local6:int;
var _local7:int;
_local6 = 0;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local6 = -1;
} else {
_local6 = 1;
};
} else {
_local7 = 0;
while (_local7 < _arg1.length) {
_local6 = internalCompare(_arg1[_local7], _arg2[_local7], _arg3, _arg4, _arg5);
if (_local6 != 0){
_local7 = _arg1.length;
};
_local7++;
};
};
return (_local6);
}
public static function compare(_arg1:Object, _arg2:Object, _arg3:int=-1):int{
return (internalCompare(_arg1, _arg2, 0, _arg3, new Dictionary(true)));
}
private static function listCompare(_arg1:IList, _arg2:IList, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local6:int;
var _local7:int;
_local6 = 0;
if (_arg1.length != _arg2.length){
if (_arg1.length < _arg2.length){
_local6 = -1;
} else {
_local6 = 1;
};
} else {
_local7 = 0;
while (_local7 < _arg1.length) {
_local6 = internalCompare(_arg1.getItemAt(_local7), _arg2.getItemAt(_local7), (_arg3 + 1), _arg4, _arg5);
if (_local6 != 0){
_local7 = _arg1.length;
};
_local7++;
};
};
return (_local6);
}
private static function internalCompare(_arg1:Object, _arg2:Object, _arg3:int, _arg4:int, _arg5:Dictionary):int{
var _local6:String;
var _local7:String;
var _local8:int;
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Array;
var _local13:Array;
var _local14:QName;
var _local15:Object;
var _local16:Object;
var _local17:int;
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
if ((_arg1 is ObjectProxy)){
_arg1 = ObjectProxy(_arg1).object_proxy::object;
};
if ((_arg2 is ObjectProxy)){
_arg2 = ObjectProxy(_arg2).object_proxy::object;
};
_local6 = typeof(_arg1);
_local7 = typeof(_arg2);
_local8 = 0;
if (_local6 == _local7){
switch (_local6){
case "boolean":
_local8 = numericCompare(Number(_arg1), Number(_arg2));
break;
case "number":
_local8 = numericCompare((_arg1 as Number), (_arg2 as Number));
break;
case "string":
_local8 = stringCompare((_arg1 as String), (_arg2 as String));
break;
case "object":
_local9 = ((_arg4 > 0)) ? (_arg4 - 1) : _arg4;
_local10 = _arg5[_arg1];
_local11 = _arg5[_arg2];
if (((_local10) && (!(_local11)))){
return (1);
};
if (((_local11) && (!(_local10)))){
return (-1);
};
if (((_local11) && (_local10))){
return (0);
};
_arg5[_arg1] = true;
_arg5[_arg2] = true;
if (((!((_arg4 == -1))) && ((_arg3 > _arg4)))){
_local8 = stringCompare(_arg1.toString(), _arg2.toString());
} else {
if ((((_arg1 is Array)) && ((_arg2 is Array)))){
_local8 = arrayCompare((_arg1 as Array), (_arg2 as Array), _arg3, _arg4, _arg5);
} else {
if ((((_arg1 is Date)) && ((_arg2 is Date)))){
_local8 = dateCompare((_arg1 as Date), (_arg2 as Date));
} else {
if ((((_arg1 is IList)) && ((_arg2 is IList)))){
_local8 = listCompare((_arg1 as IList), (_arg2 as IList), _arg3, _arg4, _arg5);
} else {
if ((((_arg1 is ByteArray)) && ((_arg2 is ByteArray)))){
_local8 = byteArrayCompare((_arg1 as ByteArray), (_arg2 as ByteArray));
} else {
if (getQualifiedClassName(_arg1) == getQualifiedClassName(_arg2)){
_local12 = getClassInfo(_arg1).properties;
if (getQualifiedClassName(_arg1) == "Object"){
_local13 = getClassInfo(_arg2).properties;
_local8 = arrayCompare(_local12, _local13, _arg3, _local9, _arg5);
};
if (_local8 != 0){
return (_local8);
};
_local17 = 0;
while (_local17 < _local12.length) {
_local14 = _local12[_local17];
_local15 = _arg1[_local14];
_local16 = _arg2[_local14];
_local8 = internalCompare(_local15, _local16, (_arg3 + 1), _local9, _arg5);
if (_local8 != 0){
_local17 = _local12.length;
};
_local17++;
};
} else {
return (1);
};
};
};
};
};
};
break;
};
} else {
return (stringCompare(_local6, _local7));
};
return (_local8);
}
private static function internalToString(_arg1:Object, _arg2:int=0, _arg3:Dictionary=null, _arg4:Array=null, _arg5:Array=null):String{
var _local6:String;
var _local7:String;
var _local8:Object;
var _local9:Array;
var _local10:Object;
var _local11:Boolean;
var _local12:*;
var _local13:int;
_local7 = ((_arg1 == null)) ? "null" : typeof(_arg1);
switch (_local7){
case "boolean":
case "number":
return (_arg1.toString());
case "string":
return ((("\"" + _arg1.toString()) + "\""));
case "object":
if ((_arg1 is Date)){
return (_arg1.toString());
};
if ((_arg1 is XMLNode)){
return (_arg1.toString());
};
if ((_arg1 is Class)){
return ((("(" + getQualifiedClassName(_arg1)) + ")"));
};
_local8 = getClassInfo(_arg1, _arg5, {includeReadOnly:true, uris:_arg4});
_local9 = _local8.properties;
_local6 = (("(" + _local8.name) + ")");
if (_arg3 == null){
_arg3 = new Dictionary(true);
};
_local10 = _arg3[_arg1];
if (_local10 != null){
_local6 = (_local6 + ("#" + int(_local10)));
return (_local6);
};
if (_arg1 != null){
_local6 = (_local6 + ("#" + refCount.toString()));
_arg3[_arg1] = refCount;
refCount++;
};
_local11 = (_arg1 is Array);
_arg2 = (_arg2 + 2);
_local13 = 0;
while (_local13 < _local9.length) {
_local6 = newline(_local6, _arg2);
_local12 = _local9[_local13];
if (_local11){
_local6 = (_local6 + "[");
};
_local6 = (_local6 + _local12.toString());
if (_local11){
_local6 = (_local6 + "] ");
} else {
_local6 = (_local6 + " = ");
};
_local6 = (_local6 + internalToString(_arg1[_local12], _arg2, _arg3, _arg4, _arg5));
_local13++;
};
_arg2 = (_arg2 - 2);
return (_local6);
case "xml":
return (_arg1.toString());
default:
return ((("(" + _local7) + ")"));
};
}
public static function toString(_arg1:Object, _arg2:Array=null, _arg3:Array=null):String{
refCount = 0;
return (internalToString(_arg1, 0, null, _arg2, _arg3));
}
public static function getClassInfo(_arg1:Object, _arg2:Array=null, _arg3:Object=null):Object{
var n:int;
var i:int;
var result:Object;
var propertyNames:Array;
var cacheKey:String;
var className:String;
var classAlias:String;
var properties:XMLList;
var prop:XML;
var dynamic:Boolean;
var metadataInfo:Object;
var excludeObject:Object;
var isArray:Boolean;
var classInfo:XML;
var numericIndex:Boolean;
var p:String;
var pi:Number;
var uris:Array;
var uri:String;
var qName:QName;
var j:int;
var obj = _arg1;
var excludes = _arg2;
var options = _arg3;
if ((obj is ObjectProxy)){
obj = ObjectProxy(obj).object_proxy::object;
};
if (options == null){
options = {includeReadOnly:true, uris:null, includeTransient:true};
};
propertyNames = [];
dynamic = false;
if (typeof(obj) == "xml"){
className = "XML";
properties = obj.text();
if (properties.length()){
propertyNames.push("*");
};
properties = obj.attributes();
} else {
classInfo = DescribeTypeCache.describeType(obj).typeDescription;
className = classInfo.@name.toString();
classAlias = classInfo.@alias.toString();
dynamic = (classInfo.@isDynamic.toString() == "true");
if (options.includeReadOnly){
properties = (classInfo..accessor.(@access != "writeonly") + classInfo..variable);
} else {
properties = (classInfo..accessor.(@access == "readwrite") + classInfo..variable);
};
numericIndex = false;
};
if (!dynamic){
cacheKey = getCacheKey(obj, excludes, options);
result = CLASS_INFO_CACHE[cacheKey];
if (result != null){
return (result);
};
};
result = {};
result["name"] = className;
result["alias"] = classAlias;
result["properties"] = propertyNames;
result["dynamic"] = dynamic;
var _local5 = recordMetadata(properties);
metadataInfo = _local5;
result["metadata"] = _local5;
excludeObject = {};
if (excludes){
n = excludes.length;
i = 0;
while (i < n) {
excludeObject[excludes[i]] = 1;
i = (i + 1);
};
};
isArray = (className == "Array");
if (dynamic){
for (p in obj) {
if (excludeObject[p] != 1){
if (isArray){
pi = parseInt(p);
if (isNaN(pi)){
propertyNames.push(new QName("", p));
} else {
propertyNames.push(pi);
};
} else {
propertyNames.push(new QName("", p));
};
};
};
numericIndex = ((isArray) && (!(isNaN(Number(p)))));
};
if ((((className == "Object")) || (isArray))){
} else {
if (className == "XML"){
n = properties.length();
i = 0;
while (i < n) {
p = properties[i].name();
if (excludeObject[p] != 1){
propertyNames.push(new QName("", ("@" + p)));
};
i = (i + 1);
};
} else {
n = properties.length();
uris = options.uris;
i = 0;
while (i < n) {
prop = properties[i];
p = prop.@name.toString();
uri = prop.@uri.toString();
if (excludeObject[p] == 1){
} else {
if (((!(options.includeTransient)) && (internalHasMetadata(metadataInfo, p, "Transient")))){
} else {
if (uris != null){
if ((((uris.length == 1)) && ((uris[0] == "*")))){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push();
} catch(e:Error) {
};
} else {
j = 0;
while (j < uris.length) {
uri = uris[j];
if (prop.@uri.toString() == uri){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push(qName);
} catch(e:Error) {
};
};
j = (j + 1);
};
};
} else {
if (uri.length == 0){
qName = new QName(uri, p);
try {
obj[qName];
propertyNames.push(qName);
} catch(e:Error) {
};
};
};
};
};
i = (i + 1);
};
};
};
propertyNames.sort((Array.CASEINSENSITIVE | (numericIndex) ? Array.NUMERIC : 0));
i = 0;
while (i < (propertyNames.length - 1)) {
if (propertyNames[i].toString() == propertyNames[(i + 1)].toString()){
propertyNames.splice(i, 1);
i = (i - 1);
};
i = (i + 1);
};
if (!dynamic){
cacheKey = getCacheKey(obj, excludes, options);
CLASS_INFO_CACHE[cacheKey] = result;
};
return (result);
}
private static function internalHasMetadata(_arg1:Object, _arg2:String, _arg3:String):Boolean{
var _local4:Object;
if (_arg1 != null){
_local4 = _arg1[_arg2];
if (_local4 != null){
if (_local4[_arg3] != null){
return (true);
};
};
};
return (false);
}
private static function newline(_arg1:String, _arg2:int=0):String{
var _local3:String;
var _local4:int;
_local3 = _arg1;
_local3 = (_local3 + "\n");
_local4 = 0;
while (_local4 < _arg2) {
_local3 = (_local3 + " ");
_local4++;
};
return (_local3);
}
public static function copy(_arg1:Object):Object{
var _local2:ByteArray;
var _local3:Object;
_local2 = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
_local3 = _local2.readObject();
return (_local3);
}
public static function dateCompare(_arg1:Date, _arg2:Date):int{
var _local3:Number;
var _local4:Number;
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
_local3 = _arg1.getTime();
_local4 = _arg2.getTime();
if (_local3 < _local4){
return (-1);
};
if (_local3 > _local4){
return (1);
};
return (0);
}
private static function getCacheKey(_arg1:Object, _arg2:Array=null, _arg3:Object=null):String{
var _local4:String;
var _local5:uint;
var _local6:String;
var _local7:String;
var _local8:String;
_local4 = getQualifiedClassName(_arg1);
if (_arg2 != null){
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = (_arg2[_local5] as String);
if (_local6 != null){
_local4 = (_local4 + _local6);
};
_local5++;
};
};
if (_arg3 != null){
for (_local7 in _arg3) {
_local4 = (_local4 + _local7);
_local8 = (_arg3[_local7] as String);
if (_local8 != null){
_local4 = (_local4 + _local8);
};
};
};
return (_local4);
}
public static function stringCompare(_arg1:String, _arg2:String, _arg3:Boolean=false):int{
var _local4:int;
if ((((_arg1 == null)) && ((_arg2 == null)))){
return (0);
};
if (_arg1 == null){
return (1);
};
if (_arg2 == null){
return (-1);
};
if (_arg3){
_arg1 = _arg1.toLocaleLowerCase();
_arg2 = _arg2.toLocaleLowerCase();
};
_local4 = _arg1.localeCompare(_arg2);
if (_local4 < -1){
_local4 = -1;
} else {
if (_local4 > 1){
_local4 = 1;
};
};
return (_local4);
}
public static function isSimple(_arg1:Object):Boolean{
var _local2:String;
_local2 = typeof(_arg1);
switch (_local2){
case "number":
case "string":
case "boolean":
return (true);
case "object":
return ((((_arg1 is Date)) || ((_arg1 is Array))));
};
return (false);
}
public static function numericCompare(_arg1:Number, _arg2:Number):int{
if (((isNaN(_arg1)) && (isNaN(_arg2)))){
return (0);
};
if (isNaN(_arg1)){
return (1);
};
if (isNaN(_arg2)){
return (-1);
};
if (_arg1 < _arg2){
return (-1);
};
if (_arg1 > _arg2){
return (1);
};
return (0);
}
}
}//package mx.utils
Section 272
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function trim(_arg1:String):String{
var _local2:int;
var _local3:int;
_local2 = 0;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
_local3 = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local3:uint;
var _local4:Array;
var _local5:int;
_local3 = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
_local5 = 0;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 273
//UIDUtil (mx.utils.UIDUtil)
package mx.utils {
import mx.core.*;
import flash.utils.*;
public class UIDUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static const ALPHA_CHARS:String = "0123456789ABCDEF";
private static var uidDictionary:Dictionary = new Dictionary(true);
public static function createUID():String{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:Number;
_local1 = "";
_local2 = 0;
while (_local2 < 8) {
_local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15))));
_local2++;
};
_local2 = 0;
while (_local2 < 3) {
_local1 = (_local1 + "-");
_local3 = 0;
while (_local3 < 4) {
_local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15))));
_local3++;
};
_local2++;
};
_local1 = (_local1 + "-");
_local4 = new Date().getTime();
_local1 = (_local1 + ("0000000" + _local4.toString(16).toUpperCase()).substr(-8));
_local2 = 0;
while (_local2 < 4) {
_local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15))));
_local2++;
};
return (_local1);
}
public static function getUID(_arg1:Object):String{
var result:String;
var xitem:XML;
var nodeKind:String;
var notificationFunction:Function;
var item = _arg1;
result = null;
if (item == null){
return (result);
};
if ((item is IUID)){
result = IUID(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IUID(item).uid = result;
};
} else {
if ((((item is IPropertyChangeNotifier)) && (!((item is IUIComponent))))){
result = IPropertyChangeNotifier(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IPropertyChangeNotifier(item).uid = result;
};
} else {
if ((item is String)){
return ((item as String));
};
try {
if ((((item is XMLList)) && ((item.length == 1)))){
item = item[0];
};
if ((item is XML)){
xitem = XML(item);
nodeKind = xitem.nodeKind();
if ((((nodeKind == "text")) || ((nodeKind == "attribute")))){
return (xitem.toString());
};
notificationFunction = xitem.notification();
if (!(notificationFunction is Function)){
notificationFunction = XMLNotifier.initializeXMLForNotification(xitem);
};
if (notificationFunction["uid"] == undefined){
result = (notificationFunction["uid"] = createUID());
};
result = notificationFunction["uid"];
} else {
if (("mx_internal_uid" in item)){
return (item.mx_internal_uid);
};
if (("uid" in item)){
return (item.uid);
};
result = uidDictionary[item];
if (!result){
result = createUID();
try {
item.mx_internal_uid = result;
} catch(e:Error) {
uidDictionary[item] = result;
};
};
};
} catch(e:Error) {
result = item.toString();
};
};
};
return (result);
}
}
}//package mx.utils
Section 274
//XMLNotifier (mx.utils.XMLNotifier)
package mx.utils {
import flash.utils.*;
public class XMLNotifier {
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:XMLNotifier;
public function XMLNotifier(_arg1:XMLNotifierSingleton){
}
public function watchXML(_arg1:Object, _arg2:IXMLNotifiable):void{
var _local3:XML;
var _local4:Object;
var _local5:Dictionary;
_local3 = XML(_arg1);
_local4 = _local3.notification();
if (!(_local4 is Function)){
_local4 = initializeXMLForNotification(_local3);
};
if (_local4["watched"] == undefined){
_local5 = new Dictionary(true);
_local4["watched"] = _local5;
} else {
_local5 = _local4["watched"];
};
_local5[_arg2] = true;
}
public function unwatchXML(_arg1:Object, _arg2:IXMLNotifiable):void{
var _local3:XML;
var _local4:Object;
var _local5:Dictionary;
_local3 = XML(_arg1);
_local4 = _local3.notification();
if (!(_local4 is Function)){
_local4 = initializeXMLForNotification(_local3);
};
if (_local4["watched"] != undefined){
_local5 = _local4["watched"];
delete _local5[_arg2];
};
}
public static function getInstance():XMLNotifier{
if (!instance){
instance = new XMLNotifier(new XMLNotifierSingleton());
};
return (instance);
}
mx_internal static function initializeXMLForNotification(_arg1:XML):Function{
var notificationFunction:Function;
var node = _arg1;
notificationFunction = function (_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{
var _local7:Dictionary;
var _local8:Object;
_local7 = arguments.callee.watched;
if (_local7 != null){
for (_local8 in _local7) {
IXMLNotifiable(_local8).xmlNotification(_arg1, _arg2, _arg3, _arg4, _arg5);
};
};
};
node.setNotification(notificationFunction);
return (notificationFunction);
}
}
}//package mx.utils
class XMLNotifierSingleton {
private function XMLNotifierSingleton(){
}
}
Section 275
//IValidatorListener (mx.validators.IValidatorListener)
package mx.validators {
import mx.events.*;
public interface IValidatorListener {
function set errorString(_arg1:String):void;
function get validationSubField():String;
function validationResultHandler(_arg1:ValidationResultEvent):void;
function set validationSubField(_arg1:String):void;
function get errorString():String;
}
}//package mx.validators
Section 276
//ValidationResult (mx.validators.ValidationResult)
package mx.validators {
public class ValidationResult {
public var errorCode:String;
public var errorMessage:String;
public var subField:String;
public var isError:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){
this.isError = _arg1;
this.subField = _arg2;
this.errorMessage = _arg4;
this.errorCode = _arg3;
}
}
}//package mx.validators
Section 277
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 278
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 279
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 280
//_AlertStyle (_AlertStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _AlertStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("Alert");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Alert", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.borderColor = 8821927;
this.paddingLeft = 10;
this.color = 0xFFFFFF;
this.roundedBottomCorners = true;
this.paddingRight = 10;
this.backgroundAlpha = 0.9;
this.paddingBottom = 2;
this.borderAlpha = 0.9;
this.buttonStyleName = "alertButtonStyle";
this.backgroundColor = 8821927;
};
};
}
}
}//package
Section 281
//_ApplicationStyle (_ApplicationStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ApplicationStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("Application");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Application", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 24;
this.paddingLeft = 24;
this.backgroundGradientAlphas = [1, 1];
this.horizontalAlign = "center";
this.paddingRight = 24;
this.backgroundImage = ApplicationBackground;
this.paddingBottom = 24;
this.backgroundSize = "100%";
this.backgroundColor = 8821927;
};
};
}
}
}//package
Section 282
//_ButtonStyle (_ButtonStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ButtonStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("Button");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Button", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingLeft = 3;
this.fontWeight = "bold";
this.upSkin = ButtonSkin;
this.verticalGap = 2;
this.overSkin = ButtonSkin;
this.selectedDisabledSkin = ButtonSkin;
this.textAlign = "center";
this.cornerRadius = 4;
this.selectedDownSkin = ButtonSkin;
this.paddingRight = 3;
this.selectedUpSkin = ButtonSkin;
this.selectedOverSkin = ButtonSkin;
this.downSkin = ButtonSkin;
this.horizontalGap = 2;
this.disabledSkin = ButtonSkin;
};
};
}
}
}//package
Section 283
//_CheckBoxStyle (_CheckBoxStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _CheckBoxStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("CheckBox");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("CheckBox", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.selectedDisabledIcon = CheckBoxIcon;
this.fontWeight = "normal";
this.selectedOverIcon = CheckBoxIcon;
this.upSkin = null;
this.overIcon = CheckBoxIcon;
this.overSkin = null;
this.selectedDisabledSkin = null;
this.selectedDownIcon = CheckBoxIcon;
this.disabledIcon = CheckBoxIcon;
this.textAlign = "left";
this.selectedDownSkin = null;
this.selectedUpSkin = null;
this.selectedOverSkin = null;
this.upIcon = CheckBoxIcon;
this.downSkin = null;
this.selectedUpIcon = CheckBoxIcon;
this.disabledSkin = null;
this.downIcon = CheckBoxIcon;
};
};
}
}
}//package
Section 284
//_comboDropDownStyle (_comboDropDownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropDownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".comboDropDown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropDown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.cornerRadius = 0;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 285
//_ContainerStyle (_ContainerStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _ContainerStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("Container");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Container", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "none";
};
};
}
}
}//package
Section 286
//_ControlBarStyle (_ControlBarStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _ControlBarStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("ControlBar");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ControlBar", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 10;
this.disabledOverlayAlpha = 0;
this.paddingLeft = 10;
this.paddingRight = 10;
this.verticalAlign = "middle";
this.paddingBottom = 10;
this.borderStyle = "controlBar";
};
};
}
}
}//package
Section 287
//_Corovan_FlexInit (_Corovan_FlexInit)
package {
import mx.core.*;
import mx.styles.*;
import mx.effects.*;
import flash.net.*;
import mx.collections.*;
import mx.utils.*;
public class _Corovan_FlexInit {
public static function init(_arg1:IFlexModuleFactory):void{
var _local2:Array;
var _local3:int;
var _local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("addedEffect", "added");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("completeEffect", "complete");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("creationCompleteEffect", "creationComplete");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("focusInEffect", "focusIn");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("focusOutEffect", "focusOut");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("hideEffect", "hide");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("mouseDownEffect", "mouseDown");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("mouseUpEffect", "mouseUp");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("moveEffect", "move");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("removedEffect", "removed");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("resizeEffect", "resize");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("resizeEndEffect", "resizeEnd");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("resizeStartEffect", "resizeStart");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("rollOutEffect", "rollOut");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("rollOverEffect", "rollOver");
_local4 = EffectManager;
_local4.mx_internal::registerEffectTrigger("showEffect", "show");
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
_local2 = ["fontWeight", "modalTransparencyBlur", "textRollOverColor", "backgroundDisabledColor", "textIndent", "barColor", "fontSize", "kerning", "footerColors", "textAlign", "fontStyle", "modalTransparencyDuration", "textSelectedColor", "modalTransparency", "fontGridFitType", "disabledColor", "fontAntiAliasType", "modalTransparencyColor", "dropShadowColor", "themeColor", "letterSpacing", "fontFamily", "color", "fontThickness", "errorColor", "headerColors", "fontSharpness"];
_local3 = 0;
while (_local3 < _local2.length) {
StyleManager.registerInheritingStyle(_local2[_local3]);
_local3++;
};
}
}
}//package
Section 288
//_Corovan_mx_managers_SystemManager (_Corovan_mx_managers_SystemManager)
package {
import mx.core.*;
import mx.managers.*;
import flash.system.*;
import game.*;
public class _Corovan_mx_managers_SystemManager extends SystemManager implements IFlexModuleFactory {
override public function info():Object{
return ({currentDomain:ApplicationDomain.currentDomain, applicationComplete:"OnStart();", backgroundGradientColors:"[#846C4B, #000000]", deactivate:"{KeyboardMapper.UnpressAll();}", height:"340", layout:"absolute", mainClassName:"Corovan", mixins:["_Corovan_FlexInit", "_alertButtonStyleStyle", "_ControlBarStyle", "_ScrollBarStyle", "_activeTabStyleStyle", "_textAreaHScrollBarStyleStyle", "_ToolTipStyle", "_CheckBoxStyle", "_comboDropDownStyle", "_ContainerStyle", "_textAreaVScrollBarStyleStyle", "_globalStyle", "_windowStatusStyle", "_windowStylesStyle", "_PanelStyle", "_activeButtonStyleStyle", "_errorTipStyle", "_richTextEditorTextAreaStyleStyle", "_CursorManagerStyle", "_todayStyleStyle", "_dateFieldPopupStyle", "_plainStyle", "_dataGridStylesStyle", "_ApplicationStyle", "_SWFLoaderStyle", "_headerDateTextStyle", "_ButtonStyle", "_AlertStyle", "_opaquePanelStyle", "_weekDayStyleStyle", "_headerDragProxyStyleStyle", "_game_components_MainFormWatcherSetupUtil", "_game_components_CamelWatcherSetupUtil", "_game_components_ScoreWatcherSetupUtil", "_game_components_GameTimerWatcherSetupUtil", "_game_components_WarehouseWatcherSetupUtil", "_game_components_TowerWatcherSetupUtil"], preloader:CorovanPreloader, width:"440"});
}
override public function create(... _args):Object{
var _local2:String;
var _local3:Class;
var _local4:Object;
if ((((_args.length == 0)) || ((_args[0] is String)))){
_local2 = null;
if (_args.length == 0){
_local2 = "Corovan";
} else {
_local2 = String(_args[0]);
};
_local3 = Class(getDefinitionByName(_local2));
if (_local3 != null){
_local4 = new (_local3);
if ((_local4 is IFlexModule)){
IFlexModule(_local4).moduleFactory = this;
};
return (_local4);
} else {
return (null);
};
//unresolved jump
};
return (super.create.apply(this, _args));
}
}
}//package
Section 289
//_CursorManagerStyle (_CursorManagerStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _CursorManagerStyle {
private static var _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102:Class = _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102;
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("CursorManager");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("CursorManager", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.busyCursor = BusyCursor;
this.busyCursorBackground = _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102;
};
};
}
}
}//package
Section 290
//_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102 (_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102)
package {
import mx.core.*;
public class _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_899393102 extends SpriteAsset {
}
}//package
Section 291
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 292
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 293
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 4;
this.borderColor = 13510953;
this.paddingLeft = 4;
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.paddingBottom = 4;
this.borderStyle = "errorTipRight";
};
};
}
}
}//package
Section 294
//_game_components_CamelWatcherSetupUtil (_game_components_CamelWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import mx.binding.*;
import game.components.*;
public class _game_components_CamelWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var _local5:Watcher;
_arg4[2] = new PropertyWatcher("width", {widthChanged:true});
_arg4[2].addListener(_arg3[1]);
_arg4[2].propertyGetter = _arg2;
_arg4[2].updateParent(_arg1);
_arg3[0].uiComponentWatcher = 1;
_arg3[0].execute();
_arg3[1].uiComponentWatcher = 2;
_arg3[1].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
Camel.watcherSetupUtil = new (_game_components_CamelWatcherSetupUtil);
}
}
}//package
Section 295
//_game_components_GameTimerWatcherSetupUtil (_game_components_GameTimerWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import mx.binding.*;
import game.components.*;
public class _game_components_GameTimerWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var _local5:Watcher;
_arg4[1] = new PropertyWatcher("idTimer", {propertyChange:true});
_arg4[2] = new PropertyWatcher("text", {valueCommit:true});
_arg4[1].addListener(_arg3[0]);
_arg4[1].propertyGetter = _arg2;
_arg4[1].updateParent(_arg1);
_arg4[2].addListener(_arg3[0]);
_arg4[1].addChild(_arg4[2]);
_arg3[0].uiComponentWatcher = 1;
_arg3[0].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
GameTimer.watcherSetupUtil = new (_game_components_GameTimerWatcherSetupUtil);
}
}
}//package
Section 296
//_game_components_MainFormWatcherSetupUtil (_game_components_MainFormWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import game.*;
import mx.binding.*;
import game.components.*;
public class _game_components_MainFormWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var tempWatcher:Watcher;
var target = _arg1;
var propertyGetter = _arg2;
var bindings = _arg3;
var watchers = _arg4;
watchers[19] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[20] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[21] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[94] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[95] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[96] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[55] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[56] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[57] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[52] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[53] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[54] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[73] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[74] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[75] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[40] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[41] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[42] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[70] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[71] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[72] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[43] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[44] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[45] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[16] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[17] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[18] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[7] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[8] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[9] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[100] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[101] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[102] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[13] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[14] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[15] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[46] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[47] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[48] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[82] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[83] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[84] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[76] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[77] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[78] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[22] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[23] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[24] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[1] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[2] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[3] = new PropertyWatcher("GUIStatsBkg", {propertyChange:true});
watchers[58] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[59] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[60] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[67] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[68] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[69] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[64] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[65] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[66] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[25] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[26] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[27] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[37] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[38] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[39] = new PropertyWatcher("GUIButtonBorder", {propertyChange:true});
watchers[79] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[80] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[81] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[85] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[86] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[87] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[88] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[89] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[90] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[49] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[50] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[51] = new PropertyWatcher("GUIButtonBorder", {propertyChange:true});
watchers[91] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[92] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[93] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[4] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[5] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[6] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[34] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[35] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[36] = new PropertyWatcher("GUIButtonTextColor", {propertyChange:true});
watchers[28] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[29] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[30] = new PropertyWatcher("GUIButtonBkg", {propertyChange:true});
watchers[10] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[11] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[12] = new PropertyWatcher("GUIStatsTextColor", {propertyChange:true});
watchers[103] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[104] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[105] = new PropertyWatcher("GUIButtonBorder", {propertyChange:true});
watchers[31] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[32] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[33] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[61] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[62] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[63] = new PropertyWatcher("GUIButtonBorder", {propertyChange:true});
watchers[97] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[98] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[99] = new PropertyWatcher("GUIButtonDarkBorder", {propertyChange:true});
watchers[19].addListener(bindings[6]);
watchers[19].updateParent(GameUtils);
watchers[20].addListener(bindings[6]);
watchers[20].parentWatcher = watchers[19];
watchers[19].addChild(watchers[20]);
watchers[21].addListener(bindings[6]);
watchers[20].addChild(watchers[21]);
watchers[94].addListener(bindings[31]);
watchers[94].updateParent(GameUtils);
watchers[95].addListener(bindings[31]);
watchers[95].parentWatcher = watchers[94];
watchers[94].addChild(watchers[95]);
watchers[96].addListener(bindings[31]);
watchers[95].addChild(watchers[96]);
watchers[55].addListener(bindings[18]);
watchers[55].updateParent(GameUtils);
watchers[56].addListener(bindings[18]);
watchers[56].parentWatcher = watchers[55];
watchers[55].addChild(watchers[56]);
watchers[57].addListener(bindings[18]);
watchers[56].addChild(watchers[57]);
watchers[52].addListener(bindings[17]);
watchers[52].updateParent(GameUtils);
watchers[53].addListener(bindings[17]);
watchers[53].parentWatcher = watchers[52];
watchers[52].addChild(watchers[53]);
watchers[54].addListener(bindings[17]);
watchers[53].addChild(watchers[54]);
watchers[73].addListener(bindings[24]);
watchers[73].updateParent(GameUtils);
watchers[74].addListener(bindings[24]);
watchers[74].parentWatcher = watchers[73];
watchers[73].addChild(watchers[74]);
watchers[75].addListener(bindings[24]);
watchers[74].addChild(watchers[75]);
watchers[40].addListener(bindings[13]);
watchers[40].updateParent(GameUtils);
watchers[41].addListener(bindings[13]);
watchers[41].parentWatcher = watchers[40];
watchers[40].addChild(watchers[41]);
watchers[42].addListener(bindings[13]);
watchers[41].addChild(watchers[42]);
watchers[70].addListener(bindings[23]);
watchers[70].updateParent(GameUtils);
watchers[71].addListener(bindings[23]);
watchers[71].parentWatcher = watchers[70];
watchers[70].addChild(watchers[71]);
watchers[72].addListener(bindings[23]);
watchers[71].addChild(watchers[72]);
watchers[43].addListener(bindings[14]);
watchers[43].updateParent(GameUtils);
watchers[44].addListener(bindings[14]);
watchers[44].parentWatcher = watchers[43];
watchers[43].addChild(watchers[44]);
watchers[45].addListener(bindings[14]);
watchers[44].addChild(watchers[45]);
watchers[16].addListener(bindings[5]);
watchers[16].updateParent(GameUtils);
watchers[17].addListener(bindings[5]);
watchers[17].parentWatcher = watchers[16];
watchers[16].addChild(watchers[17]);
watchers[18].addListener(bindings[5]);
watchers[17].addChild(watchers[18]);
watchers[7].addListener(bindings[2]);
watchers[7].updateParent(GameUtils);
watchers[8].addListener(bindings[2]);
watchers[8].parentWatcher = watchers[7];
watchers[7].addChild(watchers[8]);
watchers[9].addListener(bindings[2]);
watchers[8].addChild(watchers[9]);
watchers[100].addListener(bindings[33]);
watchers[100].updateParent(GameUtils);
watchers[101].addListener(bindings[33]);
watchers[101].parentWatcher = watchers[100];
watchers[100].addChild(watchers[101]);
watchers[102].addListener(bindings[33]);
watchers[101].addChild(watchers[102]);
watchers[13].addListener(bindings[4]);
watchers[13].updateParent(GameUtils);
watchers[14].addListener(bindings[4]);
watchers[14].parentWatcher = watchers[13];
watchers[13].addChild(watchers[14]);
watchers[15].addListener(bindings[4]);
watchers[14].addChild(watchers[15]);
watchers[46].addListener(bindings[15]);
watchers[46].updateParent(GameUtils);
watchers[47].addListener(bindings[15]);
watchers[47].parentWatcher = watchers[46];
watchers[46].addChild(watchers[47]);
watchers[48].addListener(bindings[15]);
watchers[47].addChild(watchers[48]);
watchers[82].addListener(bindings[27]);
watchers[82].updateParent(GameUtils);
watchers[83].addListener(bindings[27]);
watchers[83].parentWatcher = watchers[82];
watchers[82].addChild(watchers[83]);
watchers[84].addListener(bindings[27]);
watchers[83].addChild(watchers[84]);
watchers[76].addListener(bindings[25]);
watchers[76].updateParent(GameUtils);
watchers[77].addListener(bindings[25]);
watchers[77].parentWatcher = watchers[76];
watchers[76].addChild(watchers[77]);
watchers[78].addListener(bindings[25]);
watchers[77].addChild(watchers[78]);
watchers[22].addListener(bindings[7]);
watchers[22].updateParent(GameUtils);
watchers[23].addListener(bindings[7]);
watchers[23].parentWatcher = watchers[22];
watchers[22].addChild(watchers[23]);
watchers[24].addListener(bindings[7]);
watchers[23].addChild(watchers[24]);
watchers[1].addListener(bindings[0]);
watchers[1].updateParent(GameUtils);
watchers[2].addListener(bindings[0]);
watchers[2].parentWatcher = watchers[1];
watchers[1].addChild(watchers[2]);
watchers[3].addListener(bindings[0]);
watchers[2].addChild(watchers[3]);
watchers[58].addListener(bindings[19]);
watchers[58].updateParent(GameUtils);
watchers[59].addListener(bindings[19]);
watchers[59].parentWatcher = watchers[58];
watchers[58].addChild(watchers[59]);
watchers[60].addListener(bindings[19]);
watchers[59].addChild(watchers[60]);
watchers[67].addListener(bindings[22]);
watchers[67].updateParent(GameUtils);
watchers[68].addListener(bindings[22]);
watchers[68].parentWatcher = watchers[67];
watchers[67].addChild(watchers[68]);
watchers[69].addListener(bindings[22]);
watchers[68].addChild(watchers[69]);
watchers[64].addListener(bindings[21]);
watchers[64].updateParent(GameUtils);
watchers[65].addListener(bindings[21]);
watchers[65].parentWatcher = watchers[64];
watchers[64].addChild(watchers[65]);
watchers[66].addListener(bindings[21]);
watchers[65].addChild(watchers[66]);
watchers[25].addListener(bindings[8]);
watchers[25].updateParent(GameUtils);
watchers[26].addListener(bindings[8]);
watchers[26].parentWatcher = watchers[25];
watchers[25].addChild(watchers[26]);
watchers[27].addListener(bindings[8]);
watchers[26].addChild(watchers[27]);
watchers[37].addListener(bindings[12]);
watchers[37].updateParent(GameUtils);
watchers[38].addListener(bindings[12]);
watchers[38].parentWatcher = watchers[37];
watchers[37].addChild(watchers[38]);
watchers[39].addListener(bindings[12]);
watchers[38].addChild(watchers[39]);
watchers[79].addListener(bindings[26]);
watchers[79].updateParent(GameUtils);
watchers[80].addListener(bindings[26]);
watchers[80].parentWatcher = watchers[79];
watchers[79].addChild(watchers[80]);
watchers[81].addListener(bindings[26]);
watchers[80].addChild(watchers[81]);
watchers[85].addListener(bindings[28]);
watchers[85].updateParent(GameUtils);
watchers[86].addListener(bindings[28]);
watchers[86].parentWatcher = watchers[85];
watchers[85].addChild(watchers[86]);
watchers[87].addListener(bindings[28]);
watchers[86].addChild(watchers[87]);
watchers[88].addListener(bindings[29]);
watchers[88].updateParent(GameUtils);
watchers[89].addListener(bindings[29]);
watchers[89].parentWatcher = watchers[88];
watchers[88].addChild(watchers[89]);
watchers[90].addListener(bindings[29]);
watchers[89].addChild(watchers[90]);
watchers[49].addListener(bindings[16]);
watchers[49].updateParent(GameUtils);
watchers[50].addListener(bindings[16]);
watchers[50].parentWatcher = watchers[49];
watchers[49].addChild(watchers[50]);
watchers[51].addListener(bindings[16]);
watchers[50].addChild(watchers[51]);
watchers[91].addListener(bindings[30]);
watchers[91].updateParent(GameUtils);
watchers[92].addListener(bindings[30]);
watchers[92].parentWatcher = watchers[91];
watchers[91].addChild(watchers[92]);
watchers[93].addListener(bindings[30]);
watchers[92].addChild(watchers[93]);
watchers[4].addListener(bindings[1]);
watchers[4].updateParent(GameUtils);
watchers[5].addListener(bindings[1]);
watchers[5].parentWatcher = watchers[4];
watchers[4].addChild(watchers[5]);
watchers[6].addListener(bindings[1]);
watchers[5].addChild(watchers[6]);
watchers[34].addListener(bindings[11]);
watchers[34].updateParent(GameUtils);
watchers[35].addListener(bindings[11]);
watchers[35].parentWatcher = watchers[34];
watchers[34].addChild(watchers[35]);
watchers[36].addListener(bindings[11]);
watchers[35].addChild(watchers[36]);
watchers[28].addListener(bindings[9]);
watchers[28].updateParent(GameUtils);
watchers[29].addListener(bindings[9]);
watchers[29].parentWatcher = watchers[28];
watchers[28].addChild(watchers[29]);
watchers[30].addListener(bindings[9]);
watchers[29].addChild(watchers[30]);
watchers[10].addListener(bindings[3]);
watchers[10].updateParent(GameUtils);
watchers[11].addListener(bindings[3]);
watchers[11].parentWatcher = watchers[10];
watchers[10].addChild(watchers[11]);
watchers[12].addListener(bindings[3]);
watchers[11].addChild(watchers[12]);
watchers[103].addListener(bindings[34]);
watchers[103].updateParent(GameUtils);
watchers[104].addListener(bindings[34]);
watchers[104].parentWatcher = watchers[103];
watchers[103].addChild(watchers[104]);
watchers[105].addListener(bindings[34]);
watchers[104].addChild(watchers[105]);
watchers[31].addListener(bindings[10]);
watchers[31].updateParent(GameUtils);
watchers[32].addListener(bindings[10]);
watchers[32].parentWatcher = watchers[31];
watchers[31].addChild(watchers[32]);
watchers[33].addListener(bindings[10]);
watchers[32].addChild(watchers[33]);
watchers[61].addListener(bindings[20]);
watchers[61].updateParent(GameUtils);
watchers[62].addListener(bindings[20]);
watchers[62].parentWatcher = watchers[61];
watchers[61].addChild(watchers[62]);
watchers[63].addListener(bindings[20]);
watchers[62].addChild(watchers[63]);
watchers[97].addListener(bindings[32]);
watchers[97].updateParent(GameUtils);
watchers[98].addListener(bindings[32]);
watchers[98].parentWatcher = watchers[97];
watchers[97].addChild(watchers[98]);
watchers[99].addListener(bindings[32]);
watchers[98].addChild(watchers[99]);
bindings[0].execute();
bindings[1].execute();
bindings[2].execute();
bindings[3].execute();
bindings[4].execute();
bindings[5].execute();
bindings[6].execute();
bindings[7].execute();
bindings[8].execute();
bindings[9].execute();
bindings[10].execute();
bindings[11].execute();
bindings[12].execute();
bindings[13].execute();
bindings[14].execute();
bindings[15].execute();
bindings[16].execute();
bindings[17].execute();
bindings[18].execute();
bindings[19].execute();
bindings[20].execute();
bindings[21].execute();
bindings[22].execute();
bindings[23].execute();
bindings[24].execute();
bindings[25].execute();
bindings[26].execute();
bindings[27].execute();
bindings[28].execute();
bindings[29].execute();
bindings[30].execute();
bindings[31].execute();
bindings[32].execute();
bindings[33].execute();
bindings[34].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
MainForm.watcherSetupUtil = new (_game_components_MainFormWatcherSetupUtil);
}
}
}//package
Section 297
//_game_components_ScoreWatcherSetupUtil (_game_components_ScoreWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import game.*;
import mx.binding.*;
import game.components.*;
public class _game_components_ScoreWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var tempWatcher:Watcher;
var target = _arg1;
var propertyGetter = _arg2;
var bindings = _arg3;
var watchers = _arg4;
watchers[3] = new FunctionReturnWatcher("GetGameCore", target, function ():Array{
return ([]);
}, null);
watchers[4] = new FunctionReturnWatcher("GetCurrentLevelSettings", target, function ():Array{
return ([]);
}, null);
watchers[5] = new PropertyWatcher("GUIMoneyTextColor", {propertyChange:true});
watchers[1] = new PropertyWatcher("idScore", {propertyChange:true});
watchers[2] = new PropertyWatcher("text", {valueCommit:true});
watchers[3].addListener(bindings[1]);
watchers[3].updateParent(GameUtils);
watchers[4].addListener(bindings[1]);
watchers[4].parentWatcher = watchers[3];
watchers[3].addChild(watchers[4]);
watchers[5].addListener(bindings[1]);
watchers[4].addChild(watchers[5]);
watchers[1].addListener(bindings[0]);
watchers[1].propertyGetter = propertyGetter;
watchers[1].updateParent(target);
watchers[2].addListener(bindings[0]);
watchers[1].addChild(watchers[2]);
bindings[0].uiComponentWatcher = 1;
bindings[0].execute();
bindings[1].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
Score.watcherSetupUtil = new (_game_components_ScoreWatcherSetupUtil);
}
}
}//package
Section 298
//_game_components_TowerWatcherSetupUtil (_game_components_TowerWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import mx.binding.*;
import game.components.*;
public class _game_components_TowerWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var _local5:Watcher;
_arg4[2] = new PropertyWatcher("idBlock", {propertyChange:true});
_arg4[2].addListener(_arg3[1]);
_arg4[2].propertyGetter = _arg2;
_arg4[2].updateParent(_arg1);
_arg3[0].uiComponentWatcher = 1;
_arg3[0].execute();
_arg3[1].uiComponentWatcher = 2;
_arg3[1].execute();
_arg3[2].execute();
_arg3[3].uiComponentWatcher = 3;
_arg3[3].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
Tower.watcherSetupUtil = new (_game_components_TowerWatcherSetupUtil);
}
}
}//package
Section 299
//_game_components_WarehouseWatcherSetupUtil (_game_components_WarehouseWatcherSetupUtil)
package {
import mx.core.*;
import flash.display.*;
import mx.binding.*;
import game.components.*;
public class _game_components_WarehouseWatcherSetupUtil extends Sprite implements IWatcherSetupUtil {
public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{
var _local5:Watcher;
_arg4[1] = new PropertyWatcher("idBlock", {propertyChange:true});
_arg4[1].addListener(_arg3[0]);
_arg4[1].propertyGetter = _arg2;
_arg4[1].updateParent(_arg1);
_arg3[0].uiComponentWatcher = 1;
_arg3[0].execute();
}
public static function init(_arg1:IFlexModuleFactory):void{
Warehouse.watcherSetupUtil = new (_game_components_WarehouseWatcherSetupUtil);
}
}
}//package
Section 300
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.stroked = false;
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.fontStyle = "normal";
this.borderSides = "left top right bottom";
this.borderThickness = 1;
this.modalTransparencyDuration = 100;
this.useRollOver = true;
this.strokeWidth = 1;
this.filled = true;
this.borderColor = 12040892;
this.horizontalGridLines = false;
this.horizontalGridLineColor = 0xF7F7F7;
this.shadowCapColor = 14015965;
this.fontGridFitType = "pixel";
this.horizontalAlign = "left";
this.disabledColor = 11187123;
this.modalTransparencyColor = 0xDDDDDD;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.selectionDuration = 250;
this.bevel = true;
this.fillColor = 0xFFFFFF;
this.focusBlendMode = "normal";
this.dropShadowEnabled = false;
this.textRollOverColor = 2831164;
this.textIndent = 0;
this.fontSize = 10;
this.openDuration = 250;
this.closeDuration = 250;
this.kerning = false;
this.paddingTop = 0;
this.highlightAlphas = [0.3, 0];
this.cornerRadius = 0;
this.horizontalGap = 8;
this.textSelectedColor = 2831164;
this.paddingLeft = 0;
this.modalTransparency = 0.5;
this.roundedBottomCorners = true;
this.repeatDelay = 500;
this.selectionDisabledColor = 0xDDDDDD;
this.fontAntiAliasType = "advanced";
this.focusSkin = HaloFocusRect;
this.verticalGap = 6;
this.leading = 2;
this.shadowColor = 0xEEEEEE;
this.backgroundAlpha = 1;
this.focusAlpha = 0.4;
this.borderAlpha = 1;
this.focusThickness = 2;
this.themeColor = 40447;
this.backgroundSize = "auto";
this.indicatorGap = 14;
this.letterSpacing = 0;
this.fontFamily = "Verdana";
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.color = 734012;
this.paddingRight = 0;
this.errorColor = 0xFF0000;
this.verticalAlign = "top";
this.focusRoundedCorners = "tl tr bl br";
this.shadowDistance = 2;
this.repeatInterval = 35;
};
};
}
}
}//package
Section 301
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 302
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 303
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 304
//_PanelStyle (_PanelStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _PanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var effects:Array;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("Panel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Panel", style, false);
effects = style.mx_internal::effects;
if (!effects){
effects = (style.mx_internal::effects = new Array());
};
effects.push("resizeEndEffect");
effects.push("resizeStartEffect");
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xE2E2E2;
this.paddingLeft = 0;
this.roundedBottomCorners = false;
this.dropShadowEnabled = true;
this.resizeStartEffect = "Dissolve";
this.statusStyleName = "windowStatus";
this.borderAlpha = 0.4;
this.borderStyle = "default";
this.paddingBottom = 0;
this.resizeEndEffect = "Dissolve";
this.paddingTop = 0;
this.borderThicknessRight = 10;
this.titleStyleName = "windowStyles";
this.cornerRadius = 4;
this.paddingRight = 0;
this.borderThicknessLeft = 10;
this.titleBackgroundSkin = TitleBackground;
this.borderThickness = 0;
this.borderThicknessTop = 2;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 305
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 306
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 307
//_ScrollBarStyle (_ScrollBarStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ScrollBarStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("ScrollBar");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ScrollBar", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 12040892;
this.downArrowOverSkin = ScrollArrowSkin;
this.thumbDownSkin = ScrollThumbSkin;
this.upArrowOverSkin = ScrollArrowSkin;
this.thumbOverSkin = ScrollThumbSkin;
this.downArrowDownSkin = ScrollArrowSkin;
this.downArrowDisabledSkin = ScrollArrowSkin;
this.downArrowUpSkin = ScrollArrowSkin;
this.thumbUpSkin = ScrollThumbSkin;
this.trackColors = [9738651, 0xE7E7E7];
this.upArrowDisabledSkin = ScrollArrowSkin;
this.cornerRadius = 4;
this.upArrowUpSkin = ScrollArrowSkin;
this.trackSkin = ScrollTrackSkin;
this.upArrowDownSkin = ScrollArrowSkin;
};
};
}
}
}//package
Section 308
//_SWFLoaderStyle (_SWFLoaderStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _SWFLoaderStyle {
private static var _embed_css_Assets_swf___brokenImage_1902780792:Class = _SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1902780792;
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("SWFLoader");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("SWFLoader", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.brokenImageSkin = _embed_css_Assets_swf___brokenImage_1902780792;
this.borderStyle = "none";
this.brokenImageBorderSkin = BrokenImageBorderSkin;
};
};
}
}
}//package
Section 309
//_SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1902780792 (_SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1902780792)
package {
import mx.core.*;
public class _SWFLoaderStyle__embed_css_Assets_swf___brokenImage_1902780792 extends SpriteAsset {
}
}//package
Section 310
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 311
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 312
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 313
//_ToolTipStyle (_ToolTipStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ToolTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("ToolTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ToolTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.borderColor = 9542041;
this.paddingLeft = 4;
this.cornerRadius = 2;
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.borderSkin = ToolTipBorder;
this.backgroundAlpha = 0.95;
this.paddingBottom = 2;
this.borderStyle = "toolTip";
this.backgroundColor = 16777164;
};
};
}
}
}//package
Section 314
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 315
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 316
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 317
//collections_properties (collections_properties)
package {
import mx.resources.*;
public class collections_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["findCondition"] = "Find criteria must contain all sort fields leading up to ''{0}''.";
_local1["noComparatorSortField"] = "Cannot determine comparator for SortField with name ''{0}''.";
_local1["outOfBounds"] = "Index '{0}' specified is out of bounds.";
_local1["invalidBookmark"] = "Invalid bookmark.";
_local1["nonUnique"] = "Non-unique values in items.";
_local1["incorrectAddition"] = "Attempt to add an item already in the view.";
_local1["findRestriction"] = "Find criteria must contain at least one sort field value.";
_local1["invalidType"] = "Incorrect type. Must be of type XML or a XMLList that contains one XML object. ";
_local1["unknownMode"] = "Unknown find mode.";
_local1["invalidIndex"] = "Invalid index: '{0}'.";
_local1["invalidRemove"] = "Cannot remove when current is beforeFirst or afterLast.";
_local1["unknownProperty"] = "Unknown Property: '{0}'.";
_local1["invalidInsert"] = "Cannot insert when current is beforeFirst.";
_local1["itemNotFound"] = "Cannot find when view is not sorted.";
_local1["bookmarkInvalid"] = "Bookmark no longer valid.";
_local1["noComparator"] = "Cannot determine comparator for '{0}'.";
_local1["invalidCursor"] = "Cursor no longer valid.";
_local1["noItems"] = "No items to search.";
_local1["bookmarkNotFound"] = "Bookmark is not from this view.";
return (_local1);
}
}
}//package
Section 318
//controls_properties (controls_properties)
package {
import mx.resources.*;
public class controls_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["undefinedParameter"] = "CuePoint parameter undefined.";
_local1["nullURL"] = "Null URL sent to VideoPlayer.load.";
_local1["incorrectType"] = "Type must be 0, 1 or 2.";
_local1["okLabel"] = "OK";
_local1["unsortedCuePoint"] = "Unsorted cuePoint found after time: '{0}'.";
_local1["noLabel"] = "No";
_local1["wrongNumParams"] = "Num params must be number.";
_local1["wrongDisabled"] = "Disabled must be number.";
_local1["wrongTime"] = "Time must be number.";
_local1["dayNamesShortest"] = "S, M, T, W, T, F, S";
_local1["cannotSwitchRTMP"] = "Cannot switch between multiple absolute RTMP URLs. Must use meta tag base attribute.";
_local1["wrongType"] = "Type must be number.";
_local1["unhandledEvent"] = "Unhandled MenuEvent.";
_local1["firstDayOfWeek"] = "0";
_local1["rootNotSMIL"] = "URL: \"'{0}'\" Root node not smil: '{1}'.";
_local1["nameNotFound"] = "Base RTMP URL must include application name: '{0}'.";
_local1["errorMessages"] = "No bitrate match, must be no Cannot delete default VideoPlayer.";
_local1["missingParameter"] = "Fpad URL must include uri parameter: '{0}'.";
_local1["rootNotFound"] = "URL: \"'{0}'\" No root node found; if file is an flv, it must have a .flv extension.";
_local1["unexpectedEnd"] = "Unexpected end of cuePoint param string.";
_local1["errWrongContainer"] = "ERROR: The dataProvider of '{0}' must not contain objects of type flash.display.DisplayObject.";
_local1["invalidCall"] = "Cannot call reconnect on an http connection.";
_local1["cancelLabel"] = "Cancel";
_local1["errWrongType"] = "ERROR: The dataProvider of '{0}' must be String, ViewStack, Array, or IList.";
_local1["badArgs"] = "Bad args to _play.";
_local1["missingRoot"] = "URL: \"'{0}'\" No root node found; if URL is for an flv, it must have a .flv extension and take no parameters.";
_local1["notLoadable"] = "Unable to load '{0}'.";
_local1["wrongName"] = "Name cannot be undefined or null.";
_local1["wrongTimeName"] = "Time must be number and/or name must not be undefined or null.";
_local1["yesLabel"] = "Yes";
_local1["wrongURL"] = "When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.";
_local1["undefinedArray"] = "CuePoint.array undefined.";
_local1["missingProxy"] = "URL: \"'{0}'\" fpad xml requires proxy tag.";
_local1["unknownInput"] = "Unknown inputType '{0}'.";
_local1["missingAttributeSrc"] = "URL: \"'{0}'\" Attribute src is required in '{1}' tag.";
_local1["yearSymbol"] = " ";
_local1["outOfRange"] = "Index out of range.";
_local1["wrongIndex"] = "CuePoint.index must be number between -1 and cuePoint.array.length.";
_local1["notImplemented"] = "'{0}' not implemented yet.";
_local1["label"] = "LOADING %3%%";
_local1["wrongFormat"] = "Unexpected cuePoint parameter format.";
_local1["tagNotFound"] = "URL: \"'{0}'\" At least one video of ref tag is required.";
_local1["cannotSwitchFPAD"] = "Cannot switch between multiple absolute fpad URLs. Must use meta tag base attribute.";
_local1["unsupportedMode"] = "IMEMode:{0} not supported.";
_local1["cannotDisable"] = "Cannot disable actionscript cue points.";
_local1["missingAttributes"] = "URL: \"'{0}'\" Tag '{1}' requires attributes id, width, and height. Width and height must be numbers greater than or equal to 0.";
_local1["notfpad"] = "URL: \"'{0}'\" Root node not fpad.";
_local1["wrongParameter"] = "Fpad URL uri parameter must be rtmp URL: '{0}'.";
_local1["illegalAttributes"] = "Illegal meta tag base attribute: '{0}'.";
return (_local1);
}
}
}//package
Section 319
//core_properties (core_properties)
package {
import mx.resources.*;
public class core_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["multipleChildSets_ClassAndInstance"] = "Multiple sets of visual children have been specified for this component (component definition and component instance).";
_local1["multipleChildSets_ClassAndSubclass"] = "Multiple sets of visual children have been specified for this component (base component definition and derived component definition).";
_local1["notExecuting"] = "Repeater is not executing.";
_local1["truncationIndicator"] = "...";
_local1["stateUndefined"] = "Undefined state '{0}'.";
_local1["scrollDirection"] = "Unknown scroll direction '{0}'.";
_local1["viewSource"] = "View Source";
return (_local1);
}
}
}//package
Section 320
//Corovan (Corovan)
package {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.text.*;
import game.*;
import mx.controls.*;
import mx.containers.*;
import mx.binding.*;
import flash.system.*;
import flash.net.*;
import game.components.*;
import flash.utils.*;
import flash.media.*;
import game.mochi.*;
import flash.ui.*;
import flash.external.*;
import flash.accessibility.*;
import flash.debugger.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.xml.*;
public class Corovan extends Application {
private var _1194491742idBack:Image;
private var _documentDescriptor_:UIComponentDescriptor;
public var _bindingsByDestination:Object;
private var _embed_mxml__bin_embed_backgrounds_mail_png_2108497525:Class;
public var idMainForm:MainForm;
private var _1636231626idMusic:CheckBox;
private var _1393180609idStartCanvas:Canvas;
private var _1149962201idBanner:SWFLoader;
private var _1160888412idWaitLabel:Label;
public var _bindingsBeginWithWord:Object;
private var mBanner:Banner;
private var _1084071866idBeforeBanner:Label;
private var _1403162087idStartButton:Canvas;
mx_internal static var _Corovan_StylesInit_done:Boolean = false;
public function Corovan(){
_documentDescriptor_ = new UIComponentDescriptor({type:Application, propertiesFactory:function ():Object{
return ({height:340, width:440, childDescriptors:[new UIComponentDescriptor({type:Label, id:"idBeforeBanner", stylesFactory:function ():void{
this.verticalCenter = 0;
this.horizontalCenter = 0;
this.fontWeight = "bold";
this.fontSize = 15;
this.fontFamily = "Arial";
this.color = 0xFFFFFF;
}, propertiesFactory:function ():Object{
return ({visible:true, text:"Please, wait..."});
}}), new UIComponentDescriptor({type:Label, id:"idWaitLabel", stylesFactory:function ():void{
this.verticalCenter = 0;
this.horizontalCenter = 0;
this.fontWeight = "bold";
this.fontSize = 15;
this.fontFamily = "Arial";
this.color = 0xFFFFFF;
}, propertiesFactory:function ():Object{
return ({visible:false, text:"Loading..."});
}}), new UIComponentDescriptor({type:Canvas, id:"idStartCanvas", propertiesFactory:function ():Object{
return ({percentWidth:100, percentHeight:100, x:0, y:0, visible:false, childDescriptors:[new UIComponentDescriptor({type:Image, id:"idBack", propertiesFactory:function ():Object{
return ({x:62.5, y:119, source:_embed_mxml__bin_embed_backgrounds_mail_png_2108497525});
}}), new UIComponentDescriptor({type:Canvas, id:"idStartButton", stylesFactory:function ():void{
this.verticalCenter = 99;
this.horizontalCenter = 0;
this.backgroundAlpha = 0.5;
this.backgroundColor = 14396725;
this.borderStyle = "solid";
this.cornerRadius = 5;
this.borderColor = 13273874;
}, propertiesFactory:function ():Object{
return ({width:90, height:24, childDescriptors:[new UIComponentDescriptor({type:Label, stylesFactory:function ():void{
this.verticalCenter = 0;
this.horizontalCenter = 0;
this.fontWeight = "bold";
}, propertiesFactory:function ():Object{
return ({text:"Start"});
}}), new UIComponentDescriptor({type:Canvas, events:{click:"___Canvas3_click", mouseOver:"___Canvas3_mouseOver", mouseOut:"___Canvas3_mouseOut"}, stylesFactory:function ():void{
this.borderStyle = "solid";
this.cornerRadius = 5;
this.borderColor = 16703336;
}, propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100, buttonMode:true, useHandCursor:true});
}})]});
}}), new UIComponentDescriptor({type:CheckBox, id:"idMusic", stylesFactory:function ():void{
this.verticalCenter = 127;
this.horizontalCenter = 5;
this.fontWeight = "bold";
this.fontFamily = "Verdana";
this.fillColors = [0xFFFF00, 0x800000];
this.themeColor = 16766344;
this.color = 0xFFFFFF;
this.borderColor = 16703336;
this.textRollOverColor = 16766344;
this.textSelectedColor = 0xFFFFFF;
}, propertiesFactory:function ():Object{
return ({visible:false, label:"Music", height:16});
}})]});
}}), new UIComponentDescriptor({type:SWFLoader, id:"idBanner", propertiesFactory:function ():Object{
return ({x:0, y:0, percentWidth:100, percentHeight:100});
}})]});
}});
_embed_mxml__bin_embed_backgrounds_mail_png_2108497525 = Corovan__embed_mxml__bin_embed_backgrounds_mail_png_2108497525;
super();
mx_internal::_document = this;
if (!this.styleDeclaration){
this.styleDeclaration = new CSSStyleDeclaration();
};
this.styleDeclaration.defaultFactory = function ():void{
this.backgroundGradientColors = [8678475, 0];
};
mx_internal::_Corovan_StylesInit();
this.height = 340;
this.width = 440;
this.layout = "absolute";
this.addEventListener("deactivate", ___Application1_deactivate);
this.addEventListener("applicationComplete", ___Application1_applicationComplete);
}
public function GetGameCore():GameCore{
return (this.idMainForm.mGameCore);
}
public function ___Canvas3_click(_arg1:MouseEvent):void{
OnStartClick();
}
public function get idBanner():SWFLoader{
return (this._1149962201idBanner);
}
public function get idStartCanvas():Canvas{
return (this._1393180609idStartCanvas);
}
public function set idStartButton(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1403162087idStartButton;
if (_local2 !== _arg1){
this._1403162087idStartButton = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idStartButton", _local2, _arg1));
};
}
public function get idBeforeBanner():Label{
return (this._1084071866idBeforeBanner);
}
public function set idStartCanvas(_arg1:Canvas):void{
var _local2:Object;
_local2 = this._1393180609idStartCanvas;
if (_local2 !== _arg1){
this._1393180609idStartCanvas = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idStartCanvas", _local2, _arg1));
};
}
public function set idBeforeBanner(_arg1:Label):void{
var _local2:Object;
_local2 = this._1084071866idBeforeBanner;
if (_local2 !== _arg1){
this._1084071866idBeforeBanner = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBeforeBanner", _local2, _arg1));
};
}
public function set idBanner(_arg1:SWFLoader):void{
var _local2:Object;
_local2 = this._1149962201idBanner;
if (_local2 !== _arg1){
this._1149962201idBanner = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBanner", _local2, _arg1));
};
}
public function get idBack():Image{
return (this._1194491742idBack);
}
public function ___Canvas3_mouseOut(_arg1:MouseEvent):void{
idStartButton.setStyle("backgroundAlpha", 0.5);
}
public function set idBack(_arg1:Image):void{
var _local2:Object;
_local2 = this._1194491742idBack;
if (_local2 !== _arg1){
this._1194491742idBack = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idBack", _local2, _arg1));
};
}
public function OnStartClick():void{
idMainForm = new MainForm();
idMainForm.initialize();
idMainForm.setStyle("horizontalScrollPolicy", "off");
idMainForm.setStyle("verticalScrollPolicy", "off");
idMainForm.width = 440;
idMainForm.height = 340;
idMainForm.x = 0;
idMainForm.y = 0;
this.idStartCanvas.visible = false;
this.idWaitLabel.visible = true;
this.addChild(idMainForm);
this.setChildIndex(this.idBanner, (this.getChildren().length - 1));
}
public function OnStart():void{
mBanner = new Banner();
this.idBanner.addChild(mBanner);
MochiAd.showPreGameAd({clip:mBanner, id:"36aadcffdc4a8a7a", res:"440x340", ad_finished:GameBegin});
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyboardMapper.OnKeyDown, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyboardMapper.OnKeyUp, false, 0, true);
stage.frameRate = 30;
stage.scaleMode = StageScaleMode.NO_SCALE;
this.setFocus();
}
public function get idMusic():CheckBox{
return (this._1636231626idMusic);
}
private function OnLoadURLSettings(_arg1:Event):void{
var _local2:XML;
_local2 = new XML(_arg1.target.data);
GameUtils.BASE_URL = String(_local2.attribute("base"));
Security.loadPolicyFile((GameUtils.BASE_URL + "crossdomainpolicy.xml"));
}
public function get idStartButton():Canvas{
return (this._1403162087idStartButton);
}
mx_internal function _Corovan_StylesInit():void{
var _local1:CSSStyleDeclaration;
var _local2:Array;
if (mx_internal::_Corovan_StylesInit_done){
return;
};
mx_internal::_Corovan_StylesInit_done = true;
var _local3 = StyleManager;
_local3.mx_internal::initProtoChainRoots();
}
public function ___Canvas3_mouseOver(_arg1:MouseEvent):void{
idStartButton.setStyle("backgroundAlpha", 1);
}
public function ___Application1_applicationComplete(_arg1:FlexEvent):void{
OnStart();
}
public function ___Application1_deactivate(_arg1:Event):void{
KeyboardMapper.UnpressAll();
}
public function set idWaitLabel(_arg1:Label):void{
var _local2:Object;
_local2 = this._1160888412idWaitLabel;
if (_local2 !== _arg1){
this._1160888412idWaitLabel = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idWaitLabel", _local2, _arg1));
};
}
override public function initialize():void{
mx_internal::setDocumentDescriptor(_documentDescriptor_);
super.initialize();
}
public function get idWaitLabel():Label{
return (this._1160888412idWaitLabel);
}
public function GameBegin():void{
Security.loadPolicyFile("http://games.mochiads.com/c/g/corovan-the-game/crossdomainpolicy.xml");
ResourceManager.GetURLLoader("http://games.mochiads.com/c/g/corovan-the-game/URLSettings.xml", OnLoadURLSettings);
MochiServices.connect("36aadcffdc4a8a7a", mBanner);
this.idBeforeBanner.visible = false;
this.idStartCanvas.visible = true;
}
public function set idMusic(_arg1:CheckBox):void{
var _local2:Object;
_local2 = this._1636231626idMusic;
if (_local2 !== _arg1){
this._1636231626idMusic = _arg1;
dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "idMusic", _local2, _arg1));
};
}
}
}//package
Section 321
//Corovan__embed_mxml__bin_embed_backgrounds_mail_png_2108497525 (Corovan__embed_mxml__bin_embed_backgrounds_mail_png_2108497525)
package {
import mx.core.*;
public class Corovan__embed_mxml__bin_embed_backgrounds_mail_png_2108497525 extends BitmapAsset {
}
}//package
Section 322
//effects_properties (effects_properties)
package {
import mx.resources.*;
public class effects_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["incorrectTrigger"] = "The Zoom effect can not be triggered by a moveEffect trigger.";
_local1["incorrectSource"] = "Source property must be a Class or String.";
return (_local1);
}
}
}//package
Section 323
//skins_properties (skins_properties)
package {
import mx.resources.*;
public class skins_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["notLoaded"] = "Unable to load '{0}'.";
return (_local1);
}
}
}//package
Section 324
//styles_properties (styles_properties)
package {
import mx.resources.*;
public class styles_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["unableToLoad"] = "Unable to load style({0}): {1}.";
return (_local1);
}
}
}//package