Section 1
//FlxAnim (com.adamatomic.flixel.data.FlxAnim)
package com.adamatomic.flixel.data {
public class FlxAnim {
public var delay:Number;
public var frames:Array;
public var looped:Boolean;
public var name:String;
public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){
name = _arg1;
delay = (1 / _arg3);
frames = _arg2;
looped = _arg4;
}
}
}//package com.adamatomic.flixel.data
Section 2
//FlxFactory (com.adamatomic.flixel.data.FlxFactory)
package com.adamatomic.flixel.data {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class FlxFactory extends MovieClip {
protected var className:String;
private var bits:Array;
private var ImgBit:Class;
private var bmpBar:Bitmap;
private var Buffer:Sprite;
private var ImgBar:Class;
protected var myURL:String;
public function FlxFactory(){
var _local1:Bitmap;
var _local3:TextFormat;
var _local4:TextField;
ImgBar = FlxFactory_ImgBar;
ImgBit = FlxFactory_ImgBit;
super();
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
if (((((((!((myURL == null))) && ((myURL.length > 0)))) && ((root.loaderInfo.url.indexOf(myURL) < 0)))) && ((root.loaderInfo.url.indexOf("localhost") < 0)))){
_local1 = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295));
addChild(_local1);
_local3 = new TextFormat();
_local3.color = 0;
_local3.size = 16;
_local3.align = "center";
_local3.bold = true;
_local4 = new TextField();
_local4.width = (_local1.width - 16);
_local4.height = (_local1.height - 16);
_local4.y = 8;
_local4.multiline = true;
_local4.wordWrap = true;
_local4.defaultTextFormat = _local3;
_local4.text = (("Hi there! It looks like somebody copied this game without my permission. It is meant to be played ad-free! If you would like to play it at my site with NO annoying ads, just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nThanks, and have fun!");
addChild(_local4);
_local4.addEventListener(MouseEvent.CLICK, goToMyURL);
_local1.addEventListener(MouseEvent.CLICK, goToMyURL);
return;
};
Buffer = new Sprite();
Buffer.scaleX = 2;
Buffer.scaleY = 2;
addChild(Buffer);
bmpBar = new ImgBar();
bmpBar.x = (((stage.stageWidth / Buffer.scaleX) - bmpBar.width) / 2);
bmpBar.y = (((stage.stageHeight / Buffer.scaleY) - bmpBar.height) / 2);
Buffer.addChild(bmpBar);
bits = new Array();
var _local2:uint;
while (_local2 < 9) {
_local1 = new ImgBit();
_local1.visible = false;
_local1.x = ((bmpBar.x + 2) + (_local2 * 3));
_local1.y = (bmpBar.y + 2);
bits.push(_local1);
Buffer.addChild(_local1);
_local2++;
};
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function goToMyURL(_arg1:MouseEvent=null):void{
navigateToURL(new URLRequest(("http://" + myURL)));
}
private function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:Class;
var _local4:Object;
var _local5:uint;
graphics.clear();
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
_local3 = Class(getDefinitionByName(className));
if (_local3){
_local4 = new (_local3);
addChild((_local4 as DisplayObject));
};
_local2 = (bits.length - 1);
while (_local2 >= 0) {
bits.pop();
_local2--;
};
removeChild(Buffer);
} else {
_local5 = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 10);
_local2 = 0;
while ((((_local2 < _local5)) && ((_local2 < bits.length)))) {
bits[_local2].visible = true;
_local2++;
};
};
}
}
}//package com.adamatomic.flixel.data
Section 3
//FlxFactory_ImgBar (com.adamatomic.flixel.data.FlxFactory_ImgBar)
package com.adamatomic.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBar extends BitmapAsset {
}
}//package com.adamatomic.flixel.data
Section 4
//FlxFactory_ImgBit (com.adamatomic.flixel.data.FlxFactory_ImgBit)
package com.adamatomic.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBit extends BitmapAsset {
}
}//package com.adamatomic.flixel.data
Section 5
//FlxLogoPixel (com.adamatomic.flixel.data.FlxLogoPixel)
package com.adamatomic.flixel.data {
import flash.display.*;
public class FlxLogoPixel extends Sprite {
private var _curLayer:uint;
private var _layers:Array;
public function FlxLogoPixel(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:uint){
x = _arg1;
y = _arg2;
_layers = new Array();
var _local6:Array = new Array(4294901760, 4278255360, 4278190335, 4294967040, 4278255615);
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _arg5))));
var _local7:uint;
while (_local7 < _local6.length) {
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _local6[_arg4]))));
++_arg4;
if (_arg4 >= _local6.length){
_arg4 = 0;
};
_local7++;
};
_curLayer = (_layers.length - 1);
}
public function update():void{
if (_curLayer == 0){
return;
};
if (_layers[_curLayer].alpha >= 0.1){
_layers[_curLayer].alpha = (_layers[_curLayer].alpha - 0.1);
} else {
_layers[_curLayer].alpha = 0;
_curLayer--;
};
}
}
}//package com.adamatomic.flixel.data
Section 6
//FlxArray (com.adamatomic.flixel.FlxArray)
package com.adamatomic.flixel {
public dynamic class FlxArray extends Array {
public function getNonexist():FlxCore{
if (this.length <= 0){
return (null);
};
var _local1:uint;
do {
if (!(this[_local1] as FlxCore).exists){
return (this[_local1]);
};
++_local1;
} while (_local1 < this.length);
return (null);
}
public function add(_arg1:Object):Object{
var _local2:uint;
while (_local2 < this.length) {
if (this[_local2] == null){
return ((this[_local2] = _arg1));
};
_local2++;
};
return (this[(this.push(_arg1) - 1)]);
}
public function remove(_arg1:Object, _arg2:Boolean=false):void{
removeAt(indexOf(_arg1), _arg2);
}
public function removeAt(_arg1:uint, _arg2:Boolean=false):void{
if (_arg2){
this.splice(_arg1, 1);
} else {
this[_arg1] = null;
};
}
public function killAt(_arg1:uint):void{
if ((this[_arg1] is FlxCore)){
this[_arg1].kill();
};
}
public function clear():void{
this.length = 0;
}
public function kill(_arg1:FlxCore):void{
killAt(indexOf(_arg1));
}
public static function getRandom(_arg1:Array):Object{
return (_arg1[Math.floor((Math.random() * _arg1.length))]);
}
}
}//package com.adamatomic.flixel
Section 7
//FlxBlock (com.adamatomic.flixel.FlxBlock)
package com.adamatomic.flixel {
import flash.display.*;
import flash.geom.*;
public class FlxBlock extends FlxCore {
private var _p:Point;
private var _pixels:BitmapData;
private var _rects:FlxArray;
private var _tileSize:uint;
public function FlxBlock(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:Class, _arg6:uint=0){
var _local7:uint;
super();
x = _arg1;
y = _arg2;
width = _arg3;
height = _arg4;
if (_arg5 == null){
return;
};
_pixels = FlxG.addBitmap(_arg5);
_rects = new FlxArray();
_p = new Point();
_tileSize = _pixels.height;
_local7 = Math.ceil((width / _tileSize));
var _local8:uint = Math.ceil((height / _tileSize));
width = (_local7 * _tileSize);
height = (_local8 * _tileSize);
var _local9:uint = (_local7 * _local8);
var _local10:uint = (_pixels.width / _tileSize);
var _local11:uint;
while (_local11 < _local9) {
if ((Math.random() * (_local10 + _arg6)) > _arg6){
_rects.push(new Rectangle((_tileSize * Math.floor((Math.random() * _local10))), 0, _tileSize, _tileSize));
} else {
_rects.push(null);
};
_local11++;
};
}
override public function render():void{
super.render();
getScreenXY(_p);
var _local1:int = _p.x;
var _local2:uint;
while (_local2 < _rects.length) {
if (_rects[_local2] != null){
FlxG.buffer.copyPixels(_pixels, _rects[_local2], _p, null, null, true);
};
_p.x = (_p.x + _tileSize);
if (_p.x >= (_local1 + width)){
_p.x = _local1;
_p.y = (_p.y + _tileSize);
};
_local2++;
};
}
}
}//package com.adamatomic.flixel
Section 8
//FlxButton (com.adamatomic.flixel.FlxButton)
package com.adamatomic.flixel {
import flash.geom.*;
public class FlxButton extends FlxCore {
private var _onTO:Point;
private var _pressed:Boolean;
private var _onT:FlxText;
private var _callback:Function;
private var _off:FlxSprite;
private var _onToggle:Boolean;
private var _offTO:Point;
private var _offT:FlxText;
private var _on:FlxSprite;
public function FlxButton(_arg1:int, _arg2:int, _arg3:FlxSprite, _arg4:Function, _arg5:FlxSprite=null, _arg6:FlxText=null, _arg7:FlxText=null){
x = _arg1;
y = _arg2;
_off = _arg3;
if (_arg5 == null){
_on = _off;
} else {
_on = _arg5;
};
width = _off.width;
height = _off.height;
if (_arg6 != null){
_offT = _arg6;
};
if (_arg7 == null){
_onT = _offT;
} else {
_onT = _arg7;
};
if (_offT != null){
_offTO = new Point(_offT.x, _offT.y);
};
if (_onT != null){
_onTO = new Point(_onT.x, _onT.y);
};
_off.scrollFactor = scrollFactor;
_on.scrollFactor = scrollFactor;
if (_offT != null){
_offT.scrollFactor = scrollFactor;
_onT.scrollFactor = scrollFactor;
};
_callback = _arg4;
_onToggle = false;
_pressed = false;
updatePositions();
}
override public function update():void{
super.update();
if (((((!((_off == null))) && (_off.exists))) && (_off.active))){
_off.update();
};
if (((((!((_on == null))) && (_on.exists))) && (_on.active))){
_on.update();
};
if (_offT != null){
if (((((!((_offT == null))) && (_offT.exists))) && (_offT.active))){
_offT.update();
};
if (((((!((_onT == null))) && (_onT.exists))) && (_onT.active))){
_onT.update();
};
};
visibility(false);
if (_off.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
if (!FlxG.kMouse){
_pressed = false;
} else {
if (!_pressed){
_pressed = true;
_callback();
};
};
visibility(!(_pressed));
};
if (_onToggle){
visibility(_off.visible);
};
updatePositions();
}
private function visibility(_arg1:Boolean):void{
if (_arg1){
_off.visible = false;
if (_offT != null){
_offT.visible = false;
};
_on.visible = true;
if (_onT != null){
_onT.visible = true;
};
} else {
_on.visible = false;
if (_onT != null){
_onT.visible = false;
};
_off.visible = true;
if (_offT != null){
_offT.visible = true;
};
};
}
override public function render():void{
super.render();
if (((((!((_off == null))) && (_off.exists))) && (_off.visible))){
_off.render();
};
if (((((!((_on == null))) && (_on.exists))) && (_on.visible))){
_on.render();
};
if (_offT != null){
if (((((!((_offT == null))) && (_offT.exists))) && (_offT.visible))){
_offT.render();
};
if (((((!((_onT == null))) && (_onT.exists))) && (_onT.visible))){
_onT.render();
};
};
}
public function switchOff():void{
_onToggle = false;
}
public function on():Boolean{
return (_onToggle);
}
private function updatePositions():void{
_off.x = x;
_off.y = y;
if (_offT){
_offT.x = (_offTO.x + x);
_offT.y = (_offTO.y + y);
};
_on.x = x;
_on.y = y;
if (_onT){
_onT.x = (_onTO.x + x);
_onT.y = (_onTO.y + y);
};
}
public function switchOn():void{
_onToggle = true;
}
}
}//package com.adamatomic.flixel
Section 9
//FlxCore (com.adamatomic.flixel.FlxCore)
package com.adamatomic.flixel {
import flash.geom.*;
public class FlxCore {
private var _flicker:Boolean;
public var active:Boolean;
public var visible:Boolean;
public var width:uint;
private var _flickerTimer:Number;
public var exists:Boolean;
public var height:uint;
public var dead:Boolean;
public var x:Number;
public var y:Number;
public var scrollFactor:Point;
public function FlxCore(){
exists = true;
active = true;
visible = true;
dead = false;
x = 0;
y = 0;
width = 0;
height = 0;
scrollFactor = new Point(1, 1);
_flicker = false;
_flickerTimer = -1;
}
public function update():void{
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
}
public function flicker(_arg1:Number=1):void{
_flickerTimer = _arg1;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = x;
var _local5:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){
return (false);
};
return (true);
}
public function render():void{
}
public function kill():void{
exists = false;
dead = true;
}
protected function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor(x) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor(y) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hitFloor():Boolean{
return (true);
}
public function hitCeiling():Boolean{
return (true);
}
public function overlaps(_arg1:FlxCore):Boolean{
var _local2:Number = x;
var _local3:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local2 = (_local2 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local3 = (_local3 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
var _local4:Number = _arg1.x;
var _local5:Number = _arg1.y;
if (((!((_arg1.scrollFactor.x == 1))) || (!((_arg1.scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * _arg1.scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * _arg1.scrollFactor.y)));
};
if ((((((((_local4 <= (_local2 - _arg1.width))) || ((_local4 >= (_local2 + width))))) || ((_local5 <= (_local3 - _arg1.height))))) || ((_local5 >= (_local3 + height))))){
return (false);
};
return (true);
}
public function flickering():Boolean{
return ((_flickerTimer >= 0));
}
public function onScreen():Boolean{
var _local1:Point = new Point();
getScreenXY(_local1);
if (((((((((_local1.x + width) < 0)) || ((_local1.x > FlxG.width)))) || (((_local1.y + height) < 0)))) || ((_local1.y > FlxG.height)))){
return (false);
};
return (true);
}
public function hitWall():Boolean{
return (true);
}
public function collide(_arg1:FlxSprite):void{
if ((((Math.abs((((_arg1.x + (_arg1.width >> 1)) - x) - (width >> 1))) > ((width >> 1) + (_arg1.width >> 1)))) && ((Math.abs((((_arg1.y + (_arg1.height >> 1)) - y) - (height >> 1))) > ((height >> 1) + (_arg1.height >> 1)))))){
return;
};
var _local2:Boolean;
if ((Math.abs(_arg1.velocity.x) > Math.abs(_arg1.velocity.y))){
_local2 = false;
};
var _local3:Boolean;
var _local4:Boolean;
if (_local2){
if (_arg1.velocity.y > 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), (_arg1.y + _arg1.height))){
if (_arg1.hitFloor()){
_arg1.y = (y - _arg1.height);
};
} else {
_local4 = true;
};
} else {
if (_arg1.velocity.y < 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), _arg1.y)){
if (_arg1.hitCeiling()){
_arg1.y = (y + height);
};
} else {
_local4 = true;
};
};
};
if (_arg1.velocity.x < 0){
if (overlapsPoint(_arg1.x, (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x + width);
};
} else {
_local3 = true;
};
} else {
if (_arg1.velocity.x > 0){
if (overlapsPoint((_arg1.x + _arg1.width), (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x - _arg1.width);
};
} else {
_local3 = true;
};
};
};
} else {
if (_arg1.velocity.x < 0){
if (overlapsPoint(_arg1.x, (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x + width);
};
} else {
_local3 = true;
};
} else {
if (_arg1.velocity.x > 0){
if (overlapsPoint((_arg1.x + _arg1.width), (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x - _arg1.width);
};
} else {
_local3 = true;
};
};
};
if (_arg1.velocity.y > 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), (_arg1.y + _arg1.height))){
if (_arg1.hitFloor()){
_arg1.y = (y - _arg1.height);
};
} else {
_local4 = true;
};
} else {
if (_arg1.velocity.y < 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), _arg1.y)){
if (_arg1.hitCeiling()){
_arg1.y = (y + height);
};
} else {
_local4 = true;
};
};
};
};
if (((!(_local4)) && (!(_local3)))){
return;
};
var _local5 = (_arg1.width >> 3);
if (_local5 < 1){
_local5 = 1;
};
if (((_local4) && (_local3))){
if (_local2){
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
};
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
} else {
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
};
};
} else {
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
} else {
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
};
};
}
}
}//package com.adamatomic.flixel
Section 10
//FlxEmitter (com.adamatomic.flixel.FlxEmitter)
package com.adamatomic.flixel {
import flash.geom.*;
public class FlxEmitter extends FlxCore {
public var maxVelocity:Point;
private var _maxRotation:Number;
private var _delay:Number;
private var _sprites:FlxArray;
private var _gravity:Number;
private var _minRotation:Number;
private var _drag:Number;
private var _particle:uint;
private var _timer:Number;
public var minVelocity:Point;
public function FlxEmitter(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint, _arg5:FlxArray=null, _arg6:Number=-1, _arg7:Number=-100, _arg8:Number=100, _arg9:Number=-100, _arg10:Number=100, _arg11:Number=-360, _arg12:Number=360, _arg13:Number=500, _arg14:Number=0, _arg15:Class=null, _arg16:uint=0, _arg17:Boolean=false, _arg18:FlxLayer=null){
var _local19:uint;
super();
visible = false;
x = _arg1;
y = _arg2;
width = _arg3;
height = _arg4;
minVelocity = new Point(_arg7, _arg9);
maxVelocity = new Point(_arg8, _arg10);
_minRotation = _arg11;
_maxRotation = _arg12;
_gravity = _arg13;
_drag = _arg14;
_delay = _arg6;
if (_arg15 != null){
_sprites = new FlxArray();
_local19 = 0;
while (_local19 < _arg16) {
if (_arg17){
(_sprites.add(new FlxSprite(_arg15, 0, 0, true)) as FlxSprite).randomFrame();
} else {
_sprites.add(new FlxSprite(_arg15));
};
_local19++;
};
_local19 = 0;
while (_local19 < _sprites.length) {
if (_arg18 == null){
FlxG.state.add(_sprites[_local19]);
} else {
_arg18.add(_sprites[_local19]);
};
_local19++;
};
} else {
_sprites = _arg5;
};
kill();
if (_delay > 0){
reset();
};
}
public function emit():void{
var _local1:FlxSprite = _sprites[_particle];
_local1.exists = true;
_local1.x = (x - (_local1.width >> 1));
if (width != 0){
_local1.x = (_local1.x + (Math.random() * width));
};
_local1.y = (y - (_local1.height >> 1));
if (height != 0){
_local1.y = (_local1.y + (Math.random() * height));
};
_local1.velocity.x = minVelocity.x;
if (minVelocity.x != maxVelocity.x){
_local1.velocity.x = (_local1.velocity.x + (Math.random() * (maxVelocity.x - minVelocity.x)));
};
_local1.velocity.y = minVelocity.y;
if (minVelocity.y != maxVelocity.y){
_local1.velocity.y = (_local1.velocity.y + (Math.random() * (maxVelocity.y - minVelocity.y)));
};
_local1.acceleration.y = _gravity;
_local1.angularVelocity = _minRotation;
if (_minRotation != _maxRotation){
_local1.angularVelocity = (_local1.angularVelocity + (Math.random() * (_maxRotation - _minRotation)));
};
if (_local1.angularVelocity != 0){
_local1.angle = ((Math.random() * 360) - 180);
};
_local1.drag.x = _drag;
_local1.drag.y = _drag;
_particle++;
if (_particle >= _sprites.length){
_particle = 0;
};
_local1.onEmit();
}
override public function update():void{
var _local1:uint;
_timer = (_timer + FlxG.elapsed);
if (_delay < 0){
if (_timer > -(_delay)){
kill();
return;
};
if (!_sprites[0].exists){
_local1 = 0;
while (_local1 < _sprites.length) {
emit();
_local1++;
};
};
return;
};
while (_timer > _delay) {
_timer = (_timer - _delay);
emit();
};
}
override public function kill():void{
active = false;
var _local1:uint;
while (_local1 < _sprites.length) {
_sprites[_local1].exists = false;
_local1++;
};
}
public function reset():void{
active = true;
_timer = 0;
_particle = 0;
}
}
}//package com.adamatomic.flixel
Section 11
//FlxG (com.adamatomic.flixel.FlxG)
package com.adamatomic.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
public class FlxG {
public static const LEFT:uint = 0;
public static const A:uint = 4;
public static const B:uint = 5;
public static const MOUSE:uint = 6;
public static const UP:uint = 2;
public static const DOWN:uint = 3;
public static const RIGHT:uint = 1;
public static var kMouse:Boolean;
public static var kLeft:Boolean;
public static var scores:FlxArray;
private static var _music:Sound;
public static var height:uint;
public static var kB:Boolean;
private static var _volume:Number;
public static var kA:Boolean;
public static var buffer:BitmapData;
private static var _fade:Function;
public static var kUp:Boolean;
public static var levels:FlxArray;
public static var kRight:Boolean;
private static var _muted:uint;
private static var _musicPosition:Number;
private static var _oldKeys:Array;
private static var _cache:Object;
public static var level:uint;
public static var state:FlxState;
public static var score:uint;
private static var _log:Function;
private static var _scrollTarget:Point;
public static var elapsed:Number;
public static var mouse:Point;
public static var followTarget:FlxCore;
public static var kDown:Boolean;
public static var followLead:Point;
public static var width:uint;
public static var followLerp:Number;
public static var scroll:Point;
private static var _keys:Array;
private static var _setCursor:Function;
private static var _quake:Function;
private static var _musicVolume:Number;
public static var followMin:Point;
private static var _flash:Function;
public static var followMax:Point;
private static var _masterVolume:Number;
private static var _musicChannel:SoundChannel;
private static var _switchState:Function;
public static function getVolume():Number{
return (_volume);
}
public static function collideArrays(_arg1:FlxArray, _arg2:FlxArray):void{
var _local3:uint;
var _local4:uint;
var _local5:FlxCore;
var _local6:FlxSprite;
if (_arg1 === _arg2){
_local3 = 0;
while (_local3 < _arg1.length) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = (_local3 + 1);
while (_local4 < _arg2.length) {
_local6 = _arg2[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < _arg1.length) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = 0;
while (_local4 < _arg2.length) {
_local6 = _arg2[_local4];
if ((((((((_local5 === _local6)) || ((_local6 == null)))) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
};
}
public static function setVolume(_arg1:Number):void{
_volume = _arg1;
adjustMusicVolume();
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
static function doFollow():void{
if (followTarget != null){
if (((followTarget.exists) && (!(followTarget.dead)))){
_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1));
_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1));
if (((!((followLead == null))) && ((followTarget is FlxSprite)))){
_scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x));
_scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y));
};
};
scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed));
scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed));
if (followMin != null){
if (scroll.x > followMin.x){
scroll.x = followMin.x;
};
if (scroll.y > followMin.y){
scroll.y = followMin.y;
};
};
if (followMax != null){
if (scroll.x < followMax.x){
scroll.x = followMax.x;
};
if (scroll.y < followMax.y){
scroll.y = followMax.y;
};
};
};
}
public static function addBitmap(_arg1:Class, _arg2:Boolean=false):BitmapData{
var _local6:BitmapData;
var _local7:Matrix;
var _local3:Boolean;
var _local4:String = String(_arg1);
if ((((_cache[_local4] == undefined)) || ((_cache[_local4] == null)))){
_cache[_local4] = new (_arg1).bitmapData;
if (_arg2){
_local3 = true;
};
};
var _local5:BitmapData = _cache[_local4];
if (((((!(_local3)) && (_arg2))) && ((_local5.width == new (_arg1).bitmapData.width)))){
_local3 = true;
};
if (_local3){
_local6 = new BitmapData((_local5.width << 1), _local5.height, true, 0);
_local6.draw(_local5);
_local7 = new Matrix();
_local7.scale(-1, 1);
_local7.translate(_local6.width, 0);
_local6.draw(_local5, _local7);
_local5 = _local6;
};
return (_local5);
}
public static function pressed(_arg1:uint):Boolean{
return ((_keys[_arg1] > 0));
}
public static function play(_arg1:Class, _arg2:Number=1):void{
new (_arg1).play(0, 0, new SoundTransform((((_arg2 * _muted) * _volume) * _masterVolume)));
}
public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{
var _local5:Number;
if (_arg2 != 0){
_arg1 = (_arg1 + (_arg2 * FlxG.elapsed));
} else {
if (_arg3 != 0){
_local5 = (_arg3 * FlxG.elapsed);
if ((_arg1 - _local5) > 0){
_arg1 = (_arg1 - _local5);
} else {
if ((_arg1 + _local5) < 0){
_arg1 = (_arg1 + _local5);
} else {
_arg1 = 0;
};
};
};
};
if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){
if (_arg1 > _arg4){
_arg1 = _arg4;
} else {
if (_arg1 < -(_arg4)){
_arg1 = -(_arg4);
};
};
};
return (_arg1);
}
static function setGameData(_arg1:uint, _arg2:uint, _arg3:Function, _arg4:Function, _arg5:Function, _arg6:Function, _arg7:Function, _arg8:Function):void{
_cache = new Object();
width = _arg1;
height = _arg2;
_muted = 1;
_volume = 1;
_musicVolume = 1;
_masterVolume = 0.5;
_musicPosition = -1;
mouse = new Point();
_switchState = _arg3;
_log = _arg4;
_quake = _arg5;
_flash = _arg6;
_fade = _arg7;
_setCursor = _arg8;
unfollow();
_keys = new Array();
_oldKeys = new Array();
var _local9:uint;
while (_local9 < 7) {
_keys.push(0);
_oldKeys.push(0);
_local9++;
};
FlxG.levels = new FlxArray();
FlxG.scores = new FlxArray();
level = 0;
score = 0;
}
public static function stopMusic():void{
_musicPosition = 0;
if (_musicChannel != null){
_musicChannel.stop();
_musicChannel = null;
};
}
public static function justReleased(_arg1:uint):Boolean{
return ((_keys[_arg1] == -1));
}
public static function playMusic():void{
if (_musicPosition < 0){
return;
};
if (_musicPosition == 0){
if (_musicChannel == null){
_musicChannel = _music.play(0, 9999, new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume)));
};
} else {
_musicChannel = _music.play(_musicPosition, 0, new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume)));
_musicChannel.addEventListener(Event.SOUND_COMPLETE, loopMusic);
};
_musicPosition = 0;
}
public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint):BitmapData{
var _local4:String = ((((_arg1 + "x") + _arg2) + ":") + _arg3);
if ((((_cache[_local4] == undefined)) || ((_cache[_local4] == null)))){
_cache[_local4] = new BitmapData(_arg1, _arg2, true, _arg3);
};
return (_cache[_local4]);
}
public static function log(_arg1:String):void{
_log(_arg1);
}
static function pressKey(_arg1:uint):void{
if (_keys[_arg1] > 0){
_keys[_arg1] = 1;
} else {
_keys[_arg1] = 2;
};
}
public static function setCursor(_arg1:Class):void{
_setCursor(_arg1);
}
public static function overlapArray(_arg1:FlxArray, _arg2:FlxCore, _arg3:Function):void{
var _local4:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local5:uint;
while (_local5 < _arg1.length) {
_local4 = _arg1[_local5];
if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){
} else {
if (_local4.overlaps(_arg2)){
_arg3(_local4, _arg2);
};
};
_local5++;
};
}
static function updateKeys():void{
var _local1:uint;
while (_local1 < 7) {
if ((((_oldKeys[_local1] == -1)) && ((_keys[_local1] == -1)))){
_keys[_local1] = 0;
} else {
if ((((_oldKeys[_local1] == 2)) && ((_keys[_local1] == 2)))){
_keys[_local1] = 1;
};
};
_oldKeys[_local1] = _keys[_local1];
_local1++;
};
mouse.x = (state.mouseX - scroll.x);
mouse.y = (state.mouseY - scroll.y);
}
public static function overlapArrays(_arg1:FlxArray, _arg2:FlxArray, _arg3:Function):void{
var _local4:uint;
var _local5:uint;
var _local6:FlxCore;
var _local7:FlxCore;
if (_arg1 === _arg2){
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = (_local4 + 1);
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
} else {
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = 0;
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
};
}
public static function getMusicVolume():Number{
return (_musicVolume);
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
scroll = new Point();
_scrollTarget = new Point();
}
public static function getMute():Boolean{
if (_muted == 0){
return (true);
};
return (false);
}
public static function justPressed(_arg1:uint):Boolean{
return ((_keys[_arg1] == 2));
}
private static function adjustMusicVolume():void{
if (_muted < 0){
_muted = 0;
} else {
if (_muted > 1){
_muted = 1;
};
};
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
if (_musicVolume < 0){
_musicVolume = 0;
} else {
if (_musicVolume > 1){
_musicVolume = 1;
};
};
if (_masterVolume < 0){
_masterVolume = 0;
} else {
if (_masterVolume > 1){
_masterVolume = 1;
};
};
if (_musicChannel != null){
_musicChannel.soundTransform = new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume));
};
}
static function getMasterVolume():Number{
return (_masterVolume);
}
public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{
followLead = new Point(_arg1, _arg2);
}
public static function setMute(_arg1:Boolean):void{
if (_arg1){
_muted = 0;
} else {
_muted = 1;
};
adjustMusicVolume();
}
public static function follow(_arg1:FlxCore, _arg2:Number=1):void{
followTarget = _arg1;
followLerp = _arg2;
scroll.x = (_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1)));
scroll.y = (_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1)));
}
public static function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_fade(_arg1, _arg2, _arg3, _arg4);
}
public static function collideArray(_arg1:FlxArray, _arg2:FlxSprite):void{
var _local3:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = _arg1[_local4];
if ((((((((_local3 === _arg2)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_local3.collide(_arg2);
};
_local4++;
};
}
public static function switchState(_arg1:Class):void{
_switchState(_arg1);
}
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1));
}
static function setMasterVolume(_arg1:Number):void{
_masterVolume = _arg1;
adjustMusicVolume();
}
public static function pauseMusic():void{
if (_musicChannel == null){
_musicPosition = -1;
return;
};
_musicPosition = _musicChannel.position;
_musicChannel.stop();
while (_musicPosition >= _music.length) {
_musicPosition = (_musicPosition - _music.length);
};
_musicChannel = null;
}
public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0):void{
followMin = new Point(-(_arg1), -(_arg2));
followMax = new Point((-(_arg3) + width), (-(_arg4) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
}
public static function collideArray2(_arg1:FlxCore, _arg2:FlxArray):void{
var _local3:FlxSprite;
if ((((((_arg1 == null)) || (!(_arg1.exists)))) || (_arg1.dead))){
return;
};
var _local4:uint;
while (_local4 < _arg2.length) {
_local3 = _arg2[_local4];
if ((((((((_arg1 === _local3)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_arg1.collide(_local3);
};
_local4++;
};
}
public static function setMusicVolume(_arg1:Number):void{
_musicVolume = _arg1;
adjustMusicVolume();
}
public static function setMusic(_arg1:Class, _arg2:Number=1, _arg3:Boolean=true):void{
stopMusic();
_music = new (_arg1);
_musicVolume = _arg2;
if (_arg3){
playMusic();
};
}
static function releaseKey(_arg1:uint):void{
if (_keys[_arg1] > 0){
_keys[_arg1] = -1;
} else {
_keys[_arg1] = 0;
};
}
private static function loopMusic(_arg1:Event=null):void{
if (_musicChannel == null){
return;
};
_musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
_musicChannel = null;
playMusic();
}
public static function resetKeys():void{
kUp = (kDown = (kLeft = (kRight = (kA = (kB = (kMouse = false))))));
var _local1:uint;
while (_local1 < _keys.length) {
_keys[_local1] = 0;
_local1++;
};
}
public static function quake(_arg1:Number, _arg2:Number=0.5):void{
_quake(_arg1, _arg2);
}
public static function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_flash(_arg1, _arg2, _arg3, _arg4);
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Point{
var _local6:Number = ((-(_arg5) / 180) * Math.PI);
var _local7:Number = (_arg1 - _arg3);
var _local8:Number = (_arg4 - _arg2);
return (new Point(((_arg3 + (Math.cos(_local6) * _local7)) - (Math.sin(_local6) * _local8)), (_arg4 - ((Math.sin(_local6) * _local7) + (Math.cos(_local6) * _local8)))));
}
}
}//package com.adamatomic.flixel
Section 12
//FlxGame (com.adamatomic.flixel.FlxGame)
package com.adamatomic.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import com.adamatomic.flixel.data.*;
import flash.ui.*;
public class FlxGame extends Sprite {
private const MAX_CONSOLE_LINES:uint = 0x0100;
private const MAX_ELAPSED:Number = 0.0333;
private var _bmpFront:Bitmap;
private var ImgKeyC:Class;
private var _FPS:Array;
private var _flashDelay:Number;
private var ImgKeyMinus:Class;
private var SndBeep:Class;
private var _console:Sprite;
private var _flashHelper:Number;
private var ImgKeyX:Class;
private var _logoFade:Bitmap;
private var _help:Array;
private var _consoleYT:Number;
private var _quakeIntensity:Number;
private var _elapsed:Number;
private var _consoleY:Number;
private var _flipped:Boolean;
private var _total:uint;
private var _soundTrayBars:Array;
private var junk:String;// = "FlxGame_junk"
private var ImgKeyMouse:Class;
private var _flashComplete:Function;
private var _paused:Boolean;
private var _focusPopup:Sprite;
private var _quakeTimer:Number;
private var _fade:Bitmap;
private var _fc:uint;
private var _buffer:Sprite;
private var _poweredBy:Bitmap;
private var _consoleText:TextField;
private var _fSound:Class;
private var _soundTray:Sprite;
private var _frame:Class;
private var _cursor:Bitmap;
private var ImgKeyPlus:Class;
private var ImgPoweredBy:Class;
private var _soundTrayTimer:Number;
private var SndFlixel:Class;
private var _gy:int;
private var _fpsUpdate:Boolean;
private var _gx:int;
private var _curState:FlxState;
private var ImgKeysArrows:Class;
private var _showLogo:Boolean;
private var _curFPS:uint;
private var _created:Boolean;
private var _focusField:TextField;
private var _consoleFPS:TextField;
private var _fadeComplete:Function;
private var _iState:Class;
private var _bmpBack:Bitmap;
private var _consoleLines:Array;
private var _logoTimer:Number;
private var _quakeLength:Number;
private var _logoComplete:Boolean;
private var _f:FlxArray;
private var _fadeHelper:Number;
private var _fadeDelay:Number;
private var ImgKey0:Class;
private var ImgKey1:Class;
private var _flash:Bitmap;
private var _z:uint;
private var _bgc:Number;
public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2, _arg5:Number=4278190080, _arg6:Boolean=true, _arg7:Number=4294967295, _arg8:Class=null, _arg9:Class=null, _arg10:uint=0, _arg11:uint=0){
ImgPoweredBy = FlxGame_ImgPoweredBy;
ImgKeyX = FlxGame_ImgKeyX;
ImgKeyC = FlxGame_ImgKeyC;
ImgKeyMouse = FlxGame_ImgKeyMouse;
ImgKeysArrows = FlxGame_ImgKeysArrows;
ImgKeyMinus = FlxGame_ImgKeyMinus;
ImgKeyPlus = FlxGame_ImgKeyPlus;
ImgKey0 = FlxGame_ImgKey0;
ImgKey1 = FlxGame_ImgKey1;
SndBeep = FlxGame_SndBeep;
SndFlixel = FlxGame_SndFlixel;
super();
_z = _arg4;
_gx = _arg10;
_gy = _arg11;
_bgc = _arg5;
_fc = _arg7;
FlxG.setGameData(_arg1, _arg2, switchState, log, quake, flash, fade, setCursor);
_created = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
_elapsed = 0;
_total = 0;
_fpsUpdate = true;
Mouse.hide();
_logoComplete = false;
_f = null;
_quakeTimer = 0;
_quakeIntensity = 0;
_quakeLength = 0;
if (_arg8 == null){
_fSound = SndFlixel;
} else {
_fSound = _arg8;
};
_curState = null;
_frame = _arg9;
_iState = _arg3;
_FPS = new Array(8);
_curFPS = 0;
_paused = false;
_help = new Array();
_help.push("A Button");
_help.push("B Button");
_help.push("Mouse");
_help.push("Move");
_showLogo = _arg6;
}
private function onFocus(_arg1:Event=null):void{
Mouse.hide();
_focusPopup.visible = false;
FlxG.resetKeys();
_paused = false;
FlxG.playMusic();
}
private function log(_arg1:String):void{
var _local2:String;
var _local3:uint;
if (_arg1 == null){
_arg1 = "ERROR: NULL GAME LOG MESSAGE";
};
if (_console == null){
trace(_arg1);
return;
};
_consoleLines.push(_arg1);
if (_consoleLines.length > MAX_CONSOLE_LINES){
_consoleLines.shift();
_local2 = "";
_local3 = 0;
while (_local3 < _consoleLines.length) {
_local2 = (_local2 + (_consoleLines[_local3] + "\n"));
_local3++;
};
_consoleText.text = _local2;
} else {
_consoleText.appendText((_arg1 + "\n"));
};
_consoleText.scrollV = _consoleText.height;
}
private function setCursor(_arg1:Class):void{
if (_cursor != null){
_buffer.removeChild(_cursor);
};
_cursor = (_buffer.addChild(new (_arg1)) as Bitmap);
}
protected function help(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:String=null):void{
if (_arg1 != null){
_help[0] = _arg1;
};
if (_arg2 != null){
_help[1] = _arg2;
};
if (_arg3 != null){
_help[2] = _arg3;
};
if (_arg4 != null){
_help[3] = _arg4;
};
}
private function toggleConsole():void{
if (_consoleYT == (_gy * _z)){
_consoleYT = ((_gy * _z) - (FlxG.height * _z));
} else {
_consoleYT = (_gy * _z);
_console.visible = true;
};
}
private function showSoundTray():void{
FlxG.play(SndBeep);
_soundTrayTimer = 1;
_soundTray.y = (_gy * _z);
_soundTray.visible = true;
var _local1:uint = Math.round((FlxG.getMasterVolume() * 10));
if (FlxG.getMute()){
_local1 = 0;
};
var _local2:uint;
while (_local2 < _soundTrayBars.length) {
if (_local2 < _local1){
_soundTrayBars[_local2].alpha = 1;
} else {
_soundTrayBars[_local2].alpha = 0.5;
};
_local2++;
};
}
private function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg1 == 0){
_fade.visible = false;
return;
};
if (((!(_arg4)) && (_fade.visible))){
return;
};
_fade.bitmapData.fillRect(new Rectangle(0, 0, _fade.width, _fade.height), _arg1);
_fadeDelay = _arg2;
_fadeComplete = _arg3;
_fadeHelper = 0;
_fade.alpha = 0;
_fade.visible = true;
}
private function onMouseUp(_arg1:MouseEvent):void{
FlxG.kMouse = false;
FlxG.releaseKey(6);
}
private function onKeyUp(_arg1:KeyboardEvent):void{
var _local3:uint;
var _local4:uint;
var _local5:Bitmap;
var _local2:String = String.fromCharCode(_arg1.charCode);
if (_arg1.keyCode == 37){
FlxG.kLeft = false;
FlxG.releaseKey(0);
} else {
if (_arg1.keyCode == 39){
FlxG.kRight = false;
FlxG.releaseKey(1);
} else {
if (_arg1.keyCode == 38){
FlxG.kUp = false;
FlxG.releaseKey(2);
} else {
if (_arg1.keyCode == 40){
FlxG.kDown = false;
FlxG.releaseKey(3);
} else {
if ((((((_local2 == "x")) || ((_local2 == "X")))) || ((_arg1.keyCode == Keyboard.TAB)))){
FlxG.kA = false;
FlxG.releaseKey(4);
} else {
if ((((((_local2 == "c")) || ((_local2 == "C")))) || ((_arg1.keyCode == Keyboard.SPACE)))){
FlxG.kB = false;
FlxG.releaseKey(5);
} else {
if ((((_local2 == "0")) || ((_local2 == ")")))){
FlxG.setMute(!(FlxG.getMute()));
showSoundTray();
} else {
if ((((_local2 == "-")) || ((_local2 == "_")))){
FlxG.setMute(false);
FlxG.setMasterVolume((FlxG.getMasterVolume() - 0.1));
showSoundTray();
} else {
if ((((_local2 == "+")) || ((_local2 == "=")))){
FlxG.setMute(false);
FlxG.setMasterVolume((FlxG.getMasterVolume() + 0.1));
showSoundTray();
} else {
if ((((((((_local2 == "1")) || ((_local2 == "!")))) || ((_local2 == "~")))) || ((_local2 == "`")))){
toggleConsole();
} else {
if (_arg1.keyCode == Keyboard.ESCAPE){
stage.displayState = "fullScreen";
_local3 = (FlxG.width * _z);
_local4 = (FlxG.height * _z);
if (_frame != null){
_local5 = new _frame();
_local3 = (_local5.width * _z);
_local4 = (_local5.height * _z);
};
x = ((stage.fullScreenWidth - _local3) / 2);
y = ((stage.fullScreenHeight - _local4) / 2);
};
};
};
};
};
};
};
};
};
};
};
}
private function onEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local4:uint;
var _local5:Bitmap;
var _local6:uint;
var _local7:uint;
var _local8:int;
var _local9:int;
var _local10:ColorTransform;
var _local11:TextField;
var _local12:Bitmap;
var _local13:uint;
var _local14:uint;
var _local15:Bitmap;
var _local3:uint = getTimer();
_elapsed = ((_local3 - _total) / 1000);
_total = _local3;
FlxG.elapsed = _elapsed;
if (FlxG.elapsed > MAX_ELAPSED){
FlxG.elapsed = MAX_ELAPSED;
};
if (_logoComplete){
if (_soundTrayTimer > 0){
_soundTrayTimer = (_soundTrayTimer - _elapsed);
} else {
if (_soundTray.y > -(_soundTray.height)){
_soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2));
if (_soundTray.y < -(_soundTray.height)){
_soundTray.visible = false;
};
};
};
if (_console.visible){
_FPS[_curFPS] = (1 / _elapsed);
if (++_curFPS >= _FPS.length){
_curFPS = 0;
};
_fpsUpdate = !(_fpsUpdate);
if (_fpsUpdate){
_local4 = 0;
_local2 = 0;
while (_local2 < _FPS.length) {
_local4 = (_local4 + _FPS[_local2]);
_local2++;
};
_consoleFPS.text = (Math.floor((_local4 / _FPS.length)) + " fps");
};
};
if (_consoleY < _consoleYT){
_consoleY = (_consoleY + ((FlxG.height * 10) * _elapsed));
} else {
if (_consoleY > _consoleYT){
_consoleY = (_consoleY - ((FlxG.height * 10) * _elapsed));
};
};
if (_consoleY > (_gy * _z)){
_consoleY = (_gy * _z);
} else {
if (_consoleY < ((_gy * _z) - (FlxG.height * _z))){
_consoleY = ((_gy * _z) - (FlxG.height * _z));
_console.visible = false;
};
};
_console.y = Math.floor(_consoleY);
if (!_paused){
FlxG.updateKeys();
if (_cursor != null){
_cursor.x = (FlxG.mouse.x + FlxG.scroll.x);
_cursor.y = (FlxG.mouse.y + FlxG.scroll.y);
};
FlxG.doFollow();
_curState.update();
if (_quakeTimer > 0){
_quakeTimer = (_quakeTimer + _elapsed);
if (_quakeTimer > _quakeLength){
_quakeTimer = 0;
_buffer.x = 0;
_buffer.y = 0;
} else {
_buffer.x = (((((Math.random() * _quakeIntensity) * FlxG.width) * 2) - (_quakeIntensity * FlxG.width)) * _z);
_buffer.y = (((((Math.random() * _quakeIntensity) * FlxG.height) * 2) - (_quakeIntensity * FlxG.height)) * _z);
};
};
if (_flash.visible){
_flashHelper = (_flashHelper - (_elapsed / _flashDelay));
_flash.alpha = _flashHelper;
if (_flash.alpha <= 0){
_flash.visible = false;
if (_flashComplete != null){
_flashComplete();
};
};
};
if (((_fade.visible) && (!((_fade.alpha == 1))))){
_fadeHelper = (_fadeHelper + (_elapsed / _fadeDelay));
_fade.alpha = _fadeHelper;
if (_fade.alpha >= 1){
_fade.alpha = 1;
if (_fadeComplete != null){
_fadeComplete();
};
};
};
if (_flipped){
_bmpFront.bitmapData.fillRect(new Rectangle(0, 0, _bmpFront.width, _bmpFront.height), _bgc);
FlxG.buffer = _bmpFront.bitmapData;
} else {
_bmpBack.bitmapData.fillRect(new Rectangle(0, 0, _bmpBack.width, _bmpBack.height), _bgc);
FlxG.buffer = _bmpBack.bitmapData;
};
_curState.render();
_bmpBack.visible = !((_bmpFront.visible = _flipped));
_flipped = !(_flipped);
};
} else {
if (_created){
if (!_showLogo){
_logoComplete = true;
switchState(_iState);
} else {
if (_f == null){
_f = new FlxArray();
_local6 = 1;
if (FlxG.height > 200){
_local6 = 2;
};
_local7 = (32 * _local6);
_local8 = (((FlxG.height * _z) / 2) - (_local7 * 2));
_local9 = (((FlxG.width * _z) / 2) - _local7);
_f.push((addChild(new FlxLogoPixel((_local9 + _local7), _local8, _local7, 0, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + _local7), _local7, 1, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + (_local7 * 2)), _local7, 2, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel((_local9 + _local7), (_local8 + (_local7 * 2)), _local7, 3, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + (_local7 * 3)), _local7, 4, _fc)) as FlxLogoPixel));
_poweredBy = new ImgPoweredBy();
_poweredBy.scaleX = _local6;
_poweredBy.scaleY = _local6;
_poweredBy.x = (((FlxG.width * _z) / 2) - (_poweredBy.width / 2));
_poweredBy.y = ((_local8 + (_local7 * 4)) + 16);
_local10 = new ColorTransform();
_local10.color = _fc;
_poweredBy.bitmapData.colorTransform(new Rectangle(0, 0, _poweredBy.width, _poweredBy.height), _local10);
addChild(_poweredBy);
_logoFade = (addChild(new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 4278190080))) as Bitmap);
_logoFade.x = (_gx * _z);
_logoFade.y = (_gy * _z);
if (_fSound != null){
new _fSound().play(0, 0, new SoundTransform(0.35, 0));
};
};
_logoTimer = (_logoTimer + _elapsed);
_local2 = 0;
while (_local2 < _f.length) {
_f[_local2].update();
_local2++;
};
if (_logoFade.alpha > 0){
_logoFade.alpha = (_logoFade.alpha - (_elapsed * 0.5));
};
if (_logoTimer > 2){
removeChild(_poweredBy);
_local2 = 0;
while (_local2 < _f.length) {
removeChild(_f[_local2]);
_local2++;
};
_f.clear();
removeChild(_logoFade);
switchState(_iState);
_logoComplete = true;
};
};
} else {
if (root != null){
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 90;
_buffer = new Sprite();
_buffer.scaleX = _z;
_buffer.scaleY = _z;
addChild(_buffer);
_bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, _bgc));
_bmpBack.x = _gx;
_bmpBack.y = _gy;
_buffer.addChild(_bmpBack);
_bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, _bgc));
_bmpFront.x = _bmpBack.x;
_bmpFront.y = _bmpBack.y;
_buffer.addChild(_bmpFront);
_flipped = false;
_flash = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z)));
_flash.x = (_gx * _z);
_flash.y = (_gy * _z);
_flash.visible = false;
addChild(_flash);
_fade = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z)));
_fade.x = (_gx * _z);
_fade.y = (_gy * _z);
_fade.visible = false;
addChild(_fade);
_console = new Sprite();
_console.visible = false;
_console.x = (_gx * _z);
_console.y = ((_gy * _z) - (FlxG.height * _z));
_consoleYT = (_consoleY = _console.y);
_local5 = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 2130706432));
_console.addChild(_local5);
_consoleText = new TextField();
_consoleText.width = _local5.width;
_consoleText.height = _local5.height;
_consoleText.multiline = true;
_consoleText.wordWrap = true;
_consoleText.embedFonts = true;
_consoleText.antiAliasType = AntiAliasType.NORMAL;
_consoleText.gridFitType = GridFitType.PIXEL;
_consoleText.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF);
_console.addChild(_consoleText);
_consoleFPS = new TextField();
_consoleFPS.width = _local5.width;
_consoleFPS.height = 20;
_consoleFPS.multiline = true;
_consoleFPS.wordWrap = true;
_consoleFPS.embedFonts = true;
_consoleFPS.antiAliasType = AntiAliasType.NORMAL;
_consoleFPS.gridFitType = GridFitType.PIXEL;
_consoleFPS.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right");
_console.addChild(_consoleFPS);
_consoleLines = new Array();
addChild(_console);
log("flixel v1.25");
log("---------------------------------------");
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_focusPopup = new Sprite();
_focusPopup.visible = false;
if (FlxG.width > 160){
_focusPopup.scaleX = 2;
_focusPopup.scaleY = 2;
};
_focusPopup.x = ((_gx * _z) + (8 * _z));
_focusPopup.y = ((_gy * _z) + ((FlxG.height * _z) / 4));
_local5 = new Bitmap(new BitmapData(160, 100, true, 3204448256));
_focusPopup.x = (((_gx + (FlxG.width / 2)) * _z) - ((_local5.width / 2) * _focusPopup.scaleX));
_focusPopup.y = (((_gy + (FlxG.height / 2)) * _z) - ((_local5.height / 2) * _focusPopup.scaleY));
_focusPopup.addChild(_local5);
_local11 = new TextField();
_local11.width = _local5.width;
_local11.height = 20;
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, null, null, null, null, null, "center");
_local11.text = "GAME PAUSED";
_local11.y = 7;
_focusPopup.addChild(_local11);
_local12 = (_focusPopup.addChild(new ImgKeyX()) as Bitmap);
_local12.x = 4;
_local12.y = 36;
_local12 = (_focusPopup.addChild(new ImgKeyC()) as Bitmap);
_local12.x = 4;
_local12.y = (36 + 14);
_local12 = (_focusPopup.addChild(new ImgKeyMouse()) as Bitmap);
_local12.x = 4;
_local12.y = ((36 + 14) + 14);
_local12 = (_focusPopup.addChild(new ImgKeysArrows()) as Bitmap);
_local12.x = 4;
_local12.y = (((36 + 14) + 14) + 14);
_local12 = (_focusPopup.addChild(new ImgKeyMinus()) as Bitmap);
_local12.x = 84;
_local12.y = 36;
_local12 = (_focusPopup.addChild(new ImgKeyPlus()) as Bitmap);
_local12.x = 84;
_local12.y = (36 + 14);
_local12 = (_focusPopup.addChild(new ImgKey0()) as Bitmap);
_local12.x = 84;
_local12.y = ((36 + 14) + 14);
_local12 = (_focusPopup.addChild(new ImgKey1()) as Bitmap);
_local12.x = 84;
_local12.y = (((36 + 14) + 14) + 14);
_local11 = new TextField();
_local11.width = (_local5.width / 2);
_local11.height = (_local5.height - 20);
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "left", null, null, null, 4);
_local11.text = "";
_local2 = 0;
while (_local2 < _help.length) {
if (_local2 == (_help.length - 1)){
_local11.appendText(" ");
};
if (_help[_local2] != null){
_local11.appendText(_help[_local2]);
};
_local11.appendText("\n");
_local2++;
};
_local11.x = 15;
_local11.y = 35;
_focusPopup.addChild(_local11);
_local11 = new TextField();
_local11.width = (_local5.width / 2);
_local11.height = (_local5.height - 20);
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "left", null, null, null, 4);
_local11.text = "Sound Down\nSound Up\nMute\nConsole";
_local11.x = 95;
_local11.y = 35;
_focusPopup.addChild(_local11);
addChild(_focusPopup);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
_local5 = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gx + (FlxG.width / 2)) * _z) - ((_local5.width / 2) * _soundTray.scaleX));
_soundTray.addChild(_local5);
_local11 = new TextField();
_local11.width = _local5.width;
_local11.height = _local5.height;
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(_local11);
_local11.text = "VOLUME";
_local11.y = 16;
_local13 = 10;
_local14 = 14;
_soundTrayBars = new Array();
_local2 = 0;
while (_local2 < 10) {
_local5 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF));
_local5.x = _local13;
_local5.y = _local14;
_soundTrayBars.push(_soundTray.addChild(_local5));
_local13 = (_local13 + 6);
_local14--;
_local2++;
};
addChild(_soundTray);
stage.addEventListener(Event.DEACTIVATE, onFocusLost);
stage.addEventListener(Event.ACTIVATE, onFocus);
if (_frame != null){
_local15 = new _frame();
_local15.scaleX = _z;
_local15.scaleY = _z;
addChild(_local15);
};
_created = true;
_logoTimer = 0;
};
};
};
}
private function switchState(_arg1:Class):void{
FlxG.unfollow();
FlxG.resetKeys();
_quakeTimer = 0;
_buffer.x = 0;
_buffer.y = 0;
if (_cursor != null){
_buffer.removeChild(_cursor);
_cursor = null;
};
var _local2:FlxState = new (_arg1);
_buffer.addChild(_local2);
if (_curState != null){
_buffer.swapChildren(_local2, _curState);
_buffer.removeChild(_curState);
_curState.destroy();
};
_fade.visible = false;
_curState = _local2;
}
private function onMouseDown(_arg1:MouseEvent):void{
FlxG.kMouse = true;
FlxG.pressKey(6);
}
private function onKeyDown(_arg1:KeyboardEvent):void{
var _local2:String = String.fromCharCode(_arg1.charCode);
if (_arg1.keyCode == 37){
FlxG.kLeft = true;
FlxG.pressKey(0);
} else {
if (_arg1.keyCode == 39){
FlxG.kRight = true;
FlxG.pressKey(1);
} else {
if (_arg1.keyCode == 38){
FlxG.kUp = true;
FlxG.pressKey(2);
} else {
if (_arg1.keyCode == 40){
FlxG.kDown = true;
FlxG.pressKey(3);
} else {
if ((((((_local2 == "x")) || ((_local2 == "X")))) || ((_arg1.keyCode == Keyboard.TAB)))){
FlxG.kA = true;
FlxG.pressKey(4);
} else {
if ((((((_local2 == "c")) || ((_local2 == "C")))) || ((_arg1.keyCode == Keyboard.SPACE)))){
FlxG.kB = true;
FlxG.pressKey(5);
};
};
};
};
};
};
}
private function quake(_arg1:Number, _arg2:Number=0.5):void{
_quakeIntensity = _arg1;
_quakeLength = _arg2;
_quakeTimer = 0.01;
}
private function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg1 == 0){
_flash.visible = false;
return;
};
if (((!(_arg4)) && (_flash.visible))){
return;
};
_flash.bitmapData.fillRect(new Rectangle(0, 0, _flash.width, _flash.height), _arg1);
_flashDelay = _arg2;
_flashComplete = _arg3;
_flashHelper = 1;
_flash.alpha = 1;
_flash.visible = true;
}
private function onFocusLost(_arg1:Event=null):void{
if (((!((x == 0))) || (!((y == 0))))){
x = 0;
y = 0;
};
Mouse.show();
_focusPopup.visible = true;
_paused = true;
FlxG.pauseMusic();
}
}
}//package com.adamatomic.flixel
Section 13
//FlxGame_ImgKey0 (com.adamatomic.flixel.FlxGame_ImgKey0)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKey0 extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 14
//FlxGame_ImgKey1 (com.adamatomic.flixel.FlxGame_ImgKey1)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKey1 extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 15
//FlxGame_ImgKeyC (com.adamatomic.flixel.FlxGame_ImgKeyC)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyC extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 16
//FlxGame_ImgKeyMinus (com.adamatomic.flixel.FlxGame_ImgKeyMinus)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyMinus extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 17
//FlxGame_ImgKeyMouse (com.adamatomic.flixel.FlxGame_ImgKeyMouse)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyMouse extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 18
//FlxGame_ImgKeyPlus (com.adamatomic.flixel.FlxGame_ImgKeyPlus)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyPlus extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 19
//FlxGame_ImgKeysArrows (com.adamatomic.flixel.FlxGame_ImgKeysArrows)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeysArrows extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 20
//FlxGame_ImgKeyX (com.adamatomic.flixel.FlxGame_ImgKeyX)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyX extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 21
//FlxGame_ImgPoweredBy (com.adamatomic.flixel.FlxGame_ImgPoweredBy)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgPoweredBy extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 22
//FlxGame_junk (com.adamatomic.flixel.FlxGame_junk)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_junk extends FontAsset {
}
}//package com.adamatomic.flixel
Section 23
//FlxGame_SndBeep (com.adamatomic.flixel.FlxGame_SndBeep)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_SndBeep extends SoundAsset {
}
}//package com.adamatomic.flixel
Section 24
//FlxGame_SndFlixel (com.adamatomic.flixel.FlxGame_SndFlixel)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_SndFlixel extends SoundAsset {
}
}//package com.adamatomic.flixel
Section 25
//FlxLayer (com.adamatomic.flixel.FlxLayer)
package com.adamatomic.flixel {
public class FlxLayer extends FlxCore {
private var _children:FlxArray;
public function FlxLayer(){
_children = new FlxArray();
}
public function add(_arg1:FlxCore):FlxCore{
return ((_children.add(_arg1) as FlxCore));
}
override public function render():void{
super.render();
var _local1:uint;
while (_local1 < _children.length) {
if (((((!((_children[_local1] == null))) && (_children[_local1].exists))) && (_children[_local1].visible))){
_children[_local1].render();
};
_local1++;
};
}
override public function update():void{
super.update();
var _local1:uint;
while (_local1 < _children.length) {
if (((((!((_children[_local1] == null))) && (_children[_local1].exists))) && (_children[_local1].active))){
_children[_local1].update();
};
_local1++;
};
}
public function destroy():void{
_children.clear();
}
}
}//package com.adamatomic.flixel
Section 26
//FlxSprite (com.adamatomic.flixel.FlxSprite)
package com.adamatomic.flixel {
import flash.display.*;
import flash.geom.*;
import com.adamatomic.flixel.data.*;
public class FlxSprite extends FlxCore {
public var acceleration:Point;
public var finished:Boolean;
public var angularAcceleration:Number;
private var _alpha:Number;
private var _animations:FlxArray;
public var offset:Point;
private var _callback:Function;
protected var _curAnim:FlxAnim;
public var drag:Point;
public var angularDrag:Number;
private var _pZero:Point;
private var _flipped:uint;
public var pixels:BitmapData;
public var scale:Point;
private var _pixels:BitmapData;
public var angle:Number;
public var thrust:Number;
public var maxThrust:Number;
public var velocity:Point;
public var maxAngular:Number;
public var angularVelocity:Number;
public var maxVelocity:Point;
public var health:Number;
private var _bh:uint;
private var _p:Point;
private var _r:Rectangle;
private var _bw:uint;
private var _frameTimer:Number;
private var _facing:Boolean;
protected var _curFrame:uint;
public static const RIGHT:Boolean = true;
public static const LEFT:Boolean = false;
public function FlxSprite(_arg1:Class=null, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:uint=0, _arg7:uint=0, _arg8:uint=0){
if (_arg1 == null){
pixels = FlxG.createBitmap(_arg6, _arg7, _arg8);
} else {
pixels = FlxG.addBitmap(_arg1, _arg5);
};
x = _arg2;
y = _arg3;
if (_arg6 == 0){
if (_arg4){
_arg6 = pixels.height;
} else {
_arg6 = pixels.width;
};
};
width = (_bw = _arg6);
height = (_bh = pixels.height);
offset = new Point();
velocity = new Point();
acceleration = new Point();
drag = new Point();
maxVelocity = new Point(10000, 10000);
angle = 0;
angularVelocity = 0;
angularAcceleration = 0;
angularDrag = 0;
maxAngular = 10000;
thrust = 0;
scale = new Point(1, 1);
finished = false;
_facing = true;
_animations = new FlxArray();
if (_arg5){
_flipped = (pixels.width >> 1);
} else {
_flipped = 0;
};
_curAnim = null;
_curFrame = 0;
_frameTimer = 0;
_p = new Point(x, y);
_pZero = new Point();
_r = new Rectangle(0, 0, _bw, _bh);
_pixels = new BitmapData(width, height);
_pixels.copyPixels(pixels, _r, _pZero);
health = 1;
alpha = 1;
_callback = null;
}
override protected function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor((y - offset.y)) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
kill();
};
}
override public function render():void{
var _local1:Matrix;
if (!visible){
return;
};
getScreenXY(_p);
if (((((!((angle == 0))) || (!((scale.x == 1))))) || (!((scale.y == 1))))){
_local1 = new Matrix();
_local1.translate(-((_bw >> 1)), -((_bh >> 1)));
_local1.scale(scale.x, scale.y);
if (angle != 0){
_local1.rotate(((Math.PI * 2) * (angle / 360)));
};
_local1.translate((_p.x + (_bw >> 1)), (_p.y + (_bh >> 1)));
FlxG.buffer.draw(_pixels, _local1);
return;
};
FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true);
}
public function randomFrame():void{
_pixels.copyPixels(pixels, new Rectangle((Math.floor((Math.random() * (pixels.width / _bw))) * _bw), 0, _bw, _bh), _pZero);
}
private function calcFrame():void{
var _local1:uint;
if (_curAnim == null){
_pixels.copyPixels(pixels, _r, _pZero);
} else {
_local1 = (_curAnim.frames[_curFrame] * _bw);
if (((!(_facing)) && ((_flipped > 0)))){
_local1 = (((_flipped << 1) - _local1) - _bw);
};
_pixels.copyPixels(pixels, new Rectangle(_local1, 0, _bw, _bh), _pZero);
};
if (_alpha != 1){
_pixels.colorTransform(_r, new ColorTransform(1, 1, 1, _alpha));
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _curAnim.frames[_curFrame]);
};
}
override public function hitCeiling():Boolean{
velocity.y = 0;
return (true);
}
public function play(_arg1:String, _arg2:Boolean=false):void{
if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){
return;
};
_curFrame = 0;
_frameTimer = 0;
var _local3:uint;
while (_local3 < _animations.length) {
if (_animations[_local3].name == _arg1){
finished = false;
_curAnim = _animations[_local3];
calcFrame();
return;
};
_local3++;
};
}
override public function hitFloor():Boolean{
velocity.y = 0;
return (true);
}
override public function update():void{
var _local1:Point;
var _local2:Point;
super.update();
if (!active){
return;
};
if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){
_frameTimer = (_frameTimer + FlxG.elapsed);
if (_frameTimer > _curAnim.delay){
_frameTimer = (_frameTimer - _curAnim.delay);
if (_curFrame == (_curAnim.frames.length - 1)){
if (_curAnim.looped){
_curFrame = 0;
};
finished = true;
} else {
_curFrame++;
};
calcFrame();
};
};
angle = (angle + ((angularVelocity = FlxG.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed));
if (thrust != 0){
_local1 = FlxG.rotatePoint(-(thrust), 0, 0, 0, angle);
_local2 = FlxG.rotatePoint(-(maxThrust), 0, 0, 0, angle);
maxVelocity.x = Math.abs(_local2.x);
maxVelocity.y = Math.abs(_local2.y);
} else {
_local1 = _pZero;
};
x = (x + ((velocity.x = FlxG.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x)) * FlxG.elapsed));
y = (y + ((velocity.y = FlxG.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y)) * FlxG.elapsed));
}
public function set alpha(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
};
if (_arg1 < 0){
_arg1 = 0;
};
_alpha = _arg1;
calcFrame();
}
public function addAnimationCallback(_arg1:Function):void{
_callback = _arg1;
}
public function onEmit():void{
}
public function set facing(_arg1:Boolean):void{
var _local2 = !((_facing == _arg1));
_facing = _arg1;
if (_local2){
calcFrame();
};
}
public function specificFrame(_arg1:uint):void{
_pixels.copyPixels(pixels, new Rectangle((_arg1 * _bw), 0, _bw, _bh), _pZero);
}
public function get facing():Boolean{
return (_facing);
}
public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{
_animations.add(new FlxAnim(_arg1, _arg2, _arg3, _arg4));
}
public function get alpha():Number{
return (_alpha);
}
override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = x;
var _local5:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if (_arg3){
return (_pixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _local4), (_arg2 - _local5))));
};
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){
return (false);
};
return (true);
}
override public function hitWall():Boolean{
velocity.x = 0;
return (true);
}
}
}//package com.adamatomic.flixel
Section 27
//FlxState (com.adamatomic.flixel.FlxState)
package com.adamatomic.flixel {
import flash.display.*;
public class FlxState extends Sprite {
private var _layer:FlxLayer;
public function FlxState(){
_layer = new FlxLayer();
FlxG.state = this;
}
public function add(_arg1:FlxCore):FlxCore{
return (_layer.add(_arg1));
}
public function render():void{
_layer.render();
}
public function update():void{
_layer.update();
}
public function destroy():void{
_layer.destroy();
}
}
}//package com.adamatomic.flixel
Section 28
//FlxText (com.adamatomic.flixel.FlxText)
package com.adamatomic.flixel {
import flash.geom.*;
import flash.text.*;
public class FlxText extends FlxCore {
private var _ox:Number;
private var _oy:Number;
public var _tf:TextField;
private var _mtx:Matrix;
public var angle:Number;
private var _oa:Number;
public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint, _arg5:String, _arg6:uint=0, _arg7:String=null, _arg8:uint=8, _arg9:String=null, _arg10:Number=0){
_ox = (x = _arg1);
_oy = (y = _arg2);
_oa = (angle = _arg10);
width = _arg3;
height = _arg4;
if (_arg7 == null){
_arg7 = "system";
};
if (_arg5 == null){
_arg5 = "";
};
_tf = new TextField();
_tf.width = width;
_tf.height = height;
_tf.embedFonts = true;
_tf.selectable = false;
_tf.sharpness = 100;
_tf.defaultTextFormat = new TextFormat(_arg7, _arg8, _arg6, null, null, null, null, null, _arg9);
_tf.text = _arg5;
_mtx = new Matrix();
_mtx.translate(-((width >> 1)), -((height >> 1)));
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
_mtx.translate((Math.floor(x) + (width >> 1)), (Math.floor(y) + (height >> 1)));
}
public function setColor(_arg1:uint):void{
var _local2:TextFormat = _tf.defaultTextFormat;
_local2.color = _arg1;
_tf.defaultTextFormat = _local2;
_tf.text = _tf.text;
}
public function setText(_arg1:String):void{
_tf.text = _arg1;
}
override public function update():void{
super.update();
var _local1:Point = new Point();
getScreenXY(_local1);
if (((((!((_ox == _local1.x))) || (!((_oy == _local1.y))))) || (!((_oa == angle))))){
_mtx = new Matrix();
_mtx.translate(-((width >> 1)), -((height >> 1)));
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
_mtx.translate((_local1.x + (width >> 1)), (_local1.y + (height >> 1)));
_ox = _local1.x;
_oy = _local1.y;
};
}
override public function render():void{
FlxG.buffer.draw(_tf, _mtx);
}
}
}//package com.adamatomic.flixel
Section 29
//FlxTilemap (com.adamatomic.flixel.FlxTilemap)
package com.adamatomic.flixel {
import flash.display.*;
import flash.geom.*;
public class FlxTilemap extends FlxCore {
private var heightInTiles:uint;
private var _screenRows:uint;
private var _ci:uint;
private var _data:FlxArray;
private var _pixels:BitmapData;
private var _tileSize:uint;
private var _rects:FlxArray;
private var _p:Point;
private var _block:FlxBlock;
private var widthInTiles:uint;
private var _screenCols:uint;
public function FlxTilemap(_arg1:String, _arg2:Class, _arg3:uint=1, _arg4:uint=1){
var _local5:uint;
var _local6:Array;
super();
_ci = _arg3;
widthInTiles = 0;
heightInTiles = 0;
_data = new FlxArray();
var _local7:Array = _arg1.split("\n");
heightInTiles = _local7.length;
var _local8:uint;
while (_local8 < heightInTiles) {
_local6 = _local7[_local8].split(",");
if (_local6.length <= 1){
heightInTiles--;
} else {
if (widthInTiles == 0){
widthInTiles = _local6.length;
};
_local5 = 0;
while (_local5 < widthInTiles) {
_data.push(uint(_local6[_local5]));
_local5++;
};
};
_local8++;
};
_pixels = FlxG.addBitmap(_arg2);
_rects = new FlxArray();
_p = new Point();
_tileSize = _pixels.height;
width = (widthInTiles * _tileSize);
height = (heightInTiles * _tileSize);
var _local9:uint = (widthInTiles * heightInTiles);
var _local10:uint;
while (_local10 < _local9) {
if (_data[_local10] >= _arg4){
_rects.push(new Rectangle((_tileSize * _data[_local10]), 0, _tileSize, _tileSize));
} else {
_rects.push(null);
};
_local10++;
};
_block = new FlxBlock(0, 0, _tileSize, _tileSize, null);
_screenRows = (Math.ceil((FlxG.height / _tileSize)) + 1);
if (_screenRows > heightInTiles){
_screenRows = heightInTiles;
};
_screenCols = (Math.ceil((FlxG.width / _tileSize)) + 1);
if (_screenCols > widthInTiles){
_screenCols = widthInTiles;
};
}
override public function collide(_arg1:FlxSprite):void{
var _local6:uint;
var _local2:uint = Math.floor(((_arg1.x - x) / _tileSize));
var _local3:uint = Math.floor(((_arg1.y - y) / _tileSize));
var _local4:uint = (Math.ceil((_arg1.width / _tileSize)) + 1);
var _local5:uint = (Math.ceil((_arg1.height / _tileSize)) + 1);
var _local7:uint;
while (_local7 < _local5) {
if ((((_local7 < 0)) || ((_local7 >= heightInTiles)))){
} else {
_local6 = 0;
while (_local6 < _local4) {
if ((((_local6 < 0)) || ((_local6 >= widthInTiles)))){
} else {
if (_data[((((_local3 + _local7) * widthInTiles) + _local2) + _local6)] >= _ci){
_block.x = (x + ((_local2 + _local6) * _tileSize));
_block.y = (y + ((_local3 + _local7) * _tileSize));
_block.collide(_arg1);
};
};
_local6++;
};
};
_local7++;
};
}
override public function render():void{
var _local5:uint;
var _local6:uint;
super.render();
getScreenXY(_p);
var _local1:int = Math.floor((-(_p.x) / _tileSize));
var _local2:int = Math.floor((-(_p.y) / _tileSize));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > (widthInTiles - _screenCols)){
_local1 = (widthInTiles - _screenCols);
};
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > (heightInTiles - _screenRows)){
_local2 = (heightInTiles - _screenRows);
};
var _local3:int = ((_local2 * widthInTiles) + _local1);
_p.x = (_p.x + (_local1 * _tileSize));
_p.y = (_p.y + (_local2 * _tileSize));
var _local4:int = _p.x;
var _local7:uint;
while (_local7 < _screenRows) {
_local6 = _local3;
_local5 = 0;
while (_local5 < _screenCols) {
if (_rects[_local6] != null){
FlxG.buffer.copyPixels(_pixels, _rects[_local6], _p, null, null, true);
};
_local6++;
_p.x = (_p.x + _tileSize);
_local5++;
};
_local3 = (_local3 + widthInTiles);
_p.x = _local4;
_p.y = (_p.y + _tileSize);
_local7++;
};
}
}
}//package com.adamatomic.flixel
Section 30
//Storage (com.twofoldsecret.data.Storage)
package com.twofoldsecret.data {
import com.adamatomic.flixel.*;
import flash.net.*;
public class Storage {
private static const KEY:String = "com.twofoldsecret.island";
private static var cache:Object;
private static function writeCached(_arg1:String, _arg2:Object):void{
if (!Storage.cache){
Storage.cache = {};
};
Storage.cache[_arg1] = _arg2;
}
public static function write(_arg1:String, _arg2:Object):void{
var so:SharedObject;
var key = _arg1;
var data = _arg2;
try {
so = SharedObject.getLocal(KEY);
so.data[key] = data;
so.flush();
} catch(e:Error) {
FlxG.log(("Writing to SharedObject failed: " + e.message));
};
Storage.writeCached(key, data);
}
public static function read(_arg1:String):Object{
var key = _arg1;
try {
return (Storage.readCached(key));
} catch(e:Error) {
};
var so:SharedObject = SharedObject.getLocal(KEY);
return (so.data[key]);
}
private static function readCached(_arg1:String):Object{
if (Storage.cache[_arg1] != null){
return (Storage.cache[_arg1]);
};
throw (new Error((("Can't find key " + _arg1) + " in cache")));
}
public static function isSet(_arg1:String):Boolean{
var key = _arg1;
try {
return (!((Storage.read(key) == null)));
} catch(e:Error) {
return (false);
};
return (false);
}
public static function clear():void{
var _local1:SharedObject = SharedObject.getLocal(KEY);
_local1.clear();
Storage.cache = {};
}
}
}//package com.twofoldsecret.data
Section 31
//Button (com.twofoldsecret.ui.Button)
package com.twofoldsecret.ui {
import com.adamatomic.flixel.*;
public class Button extends FlxButton {
private var Button100Image:Class;
private var Button100OverImage:Class;
private var onClick:Function;
private var Button120OverImage:Class;
private var text:FlxText;
private var button:FlxButton;
private var Button120Image:Class;
public function Button(_arg1:int, _arg2:int, _arg3:String, _arg4:Function, _arg5:int=50){
var _local8:FlxSprite;
var _local9:FlxSprite;
Button100Image = Button_Button100Image;
Button100OverImage = Button_Button100OverImage;
Button120Image = Button_Button120Image;
Button120OverImage = Button_Button120OverImage;
if (_arg5 == 50){
_local8 = new FlxSprite(Button100Image);
_local9 = new FlxSprite(Button100OverImage);
} else {
_local8 = new FlxSprite(Button120Image);
_local9 = new FlxSprite(Button120OverImage);
};
var _local6:FlxText = new FlxText(0, 0, _local8.width, 12, _arg3, 4294967295, null, 8, "center");
var _local7:FlxText = new FlxText(0, 0, _local8.width, 12, _arg3, 0, null, 8, "center");
super(_arg1, _arg2, _local8, _arg4, _local9, _local6, _local7);
}
}
}//package com.twofoldsecret.ui
Section 32
//Button_Button100Image (com.twofoldsecret.ui.Button_Button100Image)
package com.twofoldsecret.ui {
import mx.core.*;
public class Button_Button100Image extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 33
//Button_Button100OverImage (com.twofoldsecret.ui.Button_Button100OverImage)
package com.twofoldsecret.ui {
import mx.core.*;
public class Button_Button100OverImage extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 34
//Button_Button120Image (com.twofoldsecret.ui.Button_Button120Image)
package com.twofoldsecret.ui {
import mx.core.*;
public class Button_Button120Image extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 35
//Button_Button120OverImage (com.twofoldsecret.ui.Button_Button120OverImage)
package com.twofoldsecret.ui {
import mx.core.*;
public class Button_Button120OverImage extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 36
//Cursor (com.twofoldsecret.ui.Cursor)
package com.twofoldsecret.ui {
import com.adamatomic.flixel.*;
public class Cursor {
private static var CursorImage:Class = Cursor_CursorImage;
private static var CursorNoneImage:Class = Cursor_CursorNoneImage;
public static function show():void{
FlxG.setCursor(CursorImage);
}
public static function hide():void{
FlxG.setCursor(CursorNoneImage);
}
}
}//package com.twofoldsecret.ui
Section 37
//Cursor_CursorImage (com.twofoldsecret.ui.Cursor_CursorImage)
package com.twofoldsecret.ui {
import mx.core.*;
public class Cursor_CursorImage extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 38
//Cursor_CursorNoneImage (com.twofoldsecret.ui.Cursor_CursorNoneImage)
package com.twofoldsecret.ui {
import mx.core.*;
public class Cursor_CursorNoneImage extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 39
//FlashState (com.twofoldsecret.ui.FlashState)
package com.twofoldsecret.ui {
import flash.events.*;
import flash.display.*;
import com.adamatomic.flixel.*;
import flash.utils.*;
public class FlashState extends FlxState {
protected var hideTimer:Timer;
protected var oldFrameRate:Number;
protected var pauseTimer:Timer;
protected var loader:Loader;
public static var swf:Class;
public static var pauseLength:Number = 1;
public static var allowedDomains:Array = [];
public static var frameRate:Number = 45;
public static var duration:Number;
public static var nextState:Class;
protected function showFlash(_arg1:Event):void{
this.loader.x = 0;
this.loader.y = 0;
this.loader.width = FlxG.width;
this.loader.height = FlxG.height;
this.stage.addChild(this.loader);
this.hideTimer = new Timer((FlashState.duration * 1000));
this.hideTimer.addEventListener(TimerEvent.TIMER, this.hideFlash);
this.hideTimer.start();
this.pauseTimer = new Timer(((FlashState.duration + FlashState.pauseLength) * 1000));
this.pauseTimer.addEventListener(TimerEvent.TIMER, this.checkDomain);
this.pauseTimer.start();
}
override public function update():void{
if (this.loader == null){
this.loader = new Loader();
this.oldFrameRate = this.stage.frameRate;
this.stage.frameRate = FlashState.frameRate;
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.showFlash);
this.loader.loadBytes(new FlashState.swf());
};
}
protected function checkDomain(_arg1:TimerEvent=null):void{
var _local2:RegExp;
this.pauseTimer.stop();
if (FlashState.allowedDomains.length > 0){
_local2 = new RegExp((("^https?://(" + FlashState.allowedDomains) + ")/"), "i");
if (!_local2.test(FlxG.state.root.loaderInfo.url)){
return;
};
};
FlxG.switchState(FlashState.nextState);
}
protected function hideFlash(_arg1:TimerEvent):void{
this.stage.frameRate = this.oldFrameRate;
this.loader.unload();
this.hideTimer.stop();
}
}
}//package com.twofoldsecret.ui
Section 40
//FlxInputText (com.twofoldsecret.ui.FlxInputText)
package com.twofoldsecret.ui {
import flash.events.*;
import com.adamatomic.flixel.*;
import flash.text.*;
public class FlxInputText extends FlxText {
public var customFilterPattern:RegExp;
private var nextFrameHide:Boolean;// = false
public var forceUpperCase:Boolean;// = false
public var onEnter:Function;// = null
public var filterMode:uint;// = 0
public static const CUSTOM_FILTER:uint = 4;
public static const ONLY_ALPHANUMERIC:uint = 3;
public static const ONLY_NUMERIC:uint = 2;
public static const ONLY_ALPHA:uint = 1;
public static const NO_FILTER:uint = 0;
public function FlxInputText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint, _arg5:String, _arg6:uint=0, _arg7:String=null, _arg8:uint=8, _arg9:String=null, _arg10:Number=0){
customFilterPattern = /[]*/g;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
_tf.selectable = true;
_tf.type = TextFieldType.INPUT;
_tf.background = true;
_tf.backgroundColor = (~(_arg6) & 0xFFFFFF);
_tf.border = true;
_tf.borderColor = _arg6;
_tf.visible = false;
_tf.addEventListener(Event.ENTER_FRAME, onEnterFrame);
_tf.addEventListener(Event.REMOVED_FROM_STAGE, onInputFieldRemoved);
_tf.addEventListener(Event.CHANGE, onTextChange);
FlxG.state.addChild(_tf);
}
public function set backgroundVisible(_arg1:Boolean):void{
_tf.background = _arg1;
}
public function set borderVisible(_arg1:Boolean):void{
_tf.border = _arg1;
}
private function onInputFieldRemoved(_arg1:Event):void{
_tf.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_tf.removeEventListener(Event.REMOVED, onInputFieldRemoved);
_tf.removeEventListener(Event.CHANGE, onTextChange);
}
public function get backgroundColor():uint{
return (_tf.backgroundColor);
}
override public function render():void{
_tf.x = x;
_tf.y = y;
_tf.visible = true;
nextFrameHide = false;
}
public function get borderColor():uint{
return (_tf.borderColor);
}
public function focus():void{
_tf.stage.focus = _tf;
}
public function getText():String{
return (_tf.text);
}
public function get backgroundVisible():Boolean{
return (_tf.background);
}
public function get borderVisible():Boolean{
return (_tf.border);
}
public function setMaxLength(_arg1:uint):void{
_tf.maxChars = _arg1;
}
public function set backgroundColor(_arg1:uint):void{
_tf.backgroundColor = _arg1;
}
public function set borderColor(_arg1:uint):void{
_tf.borderColor = _arg1;
}
private function onEnterFrame(_arg1:Event):void{
if (nextFrameHide){
_tf.visible = false;
};
nextFrameHide = true;
}
private function onTextChange(_arg1:Event):void{
var _local2:RegExp;
if (forceUpperCase){
_tf.text = _tf.text.toUpperCase();
};
if (filterMode != NO_FILTER){
switch (filterMode){
case ONLY_ALPHA:
_local2 = /[^a-zA-Z]*/g;
break;
case ONLY_NUMERIC:
_local2 = /[^0-9]*/g;
break;
case ONLY_ALPHANUMERIC:
_local2 = /[^a-zA-Z0-9]*/g;
break;
case CUSTOM_FILTER:
_local2 = customFilterPattern;
break;
default:
throw (new Error((("FlxInputText: Unknown filterMode (" + filterMode) + ")")));
};
_tf.text = _tf.text.replace(_local2, "");
};
}
}
}//package com.twofoldsecret.ui
Section 41
//LogoState (com.twofoldsecret.ui.LogoState)
package com.twofoldsecret.ui {
import com.adamatomic.flixel.*;
public class LogoState extends FlxState {
private var showingLogo:Boolean;
private var clickable:Boolean;
private var currentStep:int;
private var logoSteps:Array;
private static const WIDTH:int = 100;
private static const HEIGHT:int = 60;
private static const COPYRIGHT_COLOR:uint = 4291611852;
private static const HOME_TEXT:String = " Click anywhere to play this game on twofoldsecret.com. ";
private static const HOME_URL:String = "http://twofoldsecret.com/";
private static const SHOW_AD:Boolean = true;
private static const ALLOWED_DOMAINS:Array = [""];
private static const COPYRIGHT:String = " (c) %y, all rights sadly reserved ";
private static var Logo1Image:Class = LogoState_Logo1Image;
private static var LogoSound:Class = LogoState_LogoSound;
private static var Logo2Image:Class = LogoState_Logo2Image;
public static var nextState:Class;
public function LogoState(){
var _local4:FlxSprite;
super();
var _local1:int = ((FlxG.width - WIDTH) / 2);
var _local2:int = ((FlxG.height - HEIGHT) / 2);
var _local3:String = COPYRIGHT.replace("%y", new Date().fullYear);
this.showingLogo = true;
this.clickable = false;
this.logoSteps = [new FlxSprite(Logo1Image, _local1, _local2), new FlxSprite(Logo2Image, _local1, _local2)];
this.currentStep = 0;
for each (_local4 in this.logoSteps) {
_local4.alpha = 0;
this.add(_local4);
};
this.add(new FlxText(0, 226, FlxG.width, 14, _local3, COPYRIGHT_COLOR, null, 8, "center"));
FlxG.play(LogoSound);
}
private function getDomain():String{
return (FlxG.state.root.loaderInfo.url);
}
override public function update():void{
if (((this.clickable) && (FlxG.justPressed(FlxG.MOUSE)))){
FlxG.openURL(HOME_URL);
};
if (this.showingLogo){
this.logoSteps[this.currentStep].alpha = (this.logoSteps[this.currentStep].alpha + (FlxG.elapsed * ((this.currentStep)==0) ? 0.75 : 0.5));
if (this.logoSteps[this.currentStep].alpha >= 1){
this.logoSteps[this.currentStep].alpha = 1;
this.currentStep++;
if (this.currentStep == this.logoSteps.length){
this.showingLogo = false;
};
};
} else {
this.check();
};
}
private function check():void{
FlxG.fade(4278190080, 3.5, function ():void{
FlxG.switchState(LogoState.nextState);
});
}
}
}//package com.twofoldsecret.ui
Section 42
//LogoState_Logo1Image (com.twofoldsecret.ui.LogoState_Logo1Image)
package com.twofoldsecret.ui {
import mx.core.*;
public class LogoState_Logo1Image extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 43
//LogoState_Logo2Image (com.twofoldsecret.ui.LogoState_Logo2Image)
package com.twofoldsecret.ui {
import mx.core.*;
public class LogoState_Logo2Image extends BitmapAsset {
}
}//package com.twofoldsecret.ui
Section 44
//LogoState_LogoSound (com.twofoldsecret.ui.LogoState_LogoSound)
package com.twofoldsecret.ui {
import mx.core.*;
public class LogoState_LogoSound extends SoundAsset {
}
}//package com.twofoldsecret.ui
Section 45
//ShadowText (com.twofoldsecret.ui.ShadowText)
package com.twofoldsecret.ui {
import com.adamatomic.flixel.*;
public class ShadowText extends FlxText {
private var shadow:FlxText;
public function ShadowText(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String, _arg6:FlxLayer, _arg7:int=8, _arg8:uint=4294967295, _arg9:uint=4278190080):void{
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg8, null, _arg7);
this.shadow = new FlxText((_arg1 + 1), (_arg2 + 1), _arg3, _arg4, _arg5, _arg9, null, _arg7);
_arg6.add(this.shadow);
_arg6.add(this);
}
override public function setText(_arg1:String):void{
this.shadow.setText(_arg1);
super.setText(_arg1);
}
public function setScrollFactor(_arg1:Number=0, _arg2:Number=0):void{
this.scrollFactor.x = _arg1;
this.scrollFactor.y = _arg2;
this.shadow.scrollFactor.x = _arg1;
this.shadow.scrollFactor.y = _arg2;
}
}
}//package com.twofoldsecret.ui
Section 46
//Random (com.twofoldsecret.utils.Random)
package com.twofoldsecret.utils {
public class Random {
public static function choiceOf(... _args):Object{
return (_slot1.itemFrom(_args));
}
public static function intBetween(_arg1:int, _arg2:int):int{
return (Math.floor(_slot1.numberBetween(_arg1, _arg2)));
}
public static function shuffle(_arg1:Array):Array{
var _local2:Array = [];
while (_arg1.length > 0) {
_local2.push(_arg1.splice(Math.round((Math.random() * (_arg1.length - 1))), 1)[0]);
};
return (_local2);
}
public static function itemFrom(_arg1:Array):Object{
return (_arg1[_slot1.intBetween(0, _arg1.length)]);
}
public static function numberBetween(_arg1:Number, _arg2:Number):Number{
return (((Math.random() * (_arg2 - _arg1)) + _arg1));
}
}
}//package com.twofoldsecret.utils
Section 47
//Time (com.twofoldsecret.utils.Time)
package com.twofoldsecret.utils {
public class Time {
public static const MSECS_IN_SEC:int = 1000;
public static const MSECS_IN_MIN:int = 60000;
public static const AM:String = "am";
public static const MONTHS:Array = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
public static const MSECS_IN_HR:int = 3600000;
public static const PM:String = "pm";
public static function formatTime(_arg1:Date):String{
var _local4:String;
var _local2:Boolean;
var _local3:int = _arg1.hours;
if (_local3 > 12){
_local2 = false;
_local3 = (_local3 - 12);
};
if (_local3 == 0){
_local3 = 12;
};
_local4 = (_local3 + ":");
if (_arg1.minutes < 10){
_local4 = (_local4 + "0");
};
_local4 = (_local4 + _arg1.minutes);
_local4 = (_local4 + (" " + (_local2) ? AM : PM));
return (_local4);
}
public static function formatDate(_arg1:Date):String{
return (((((_arg1.date + " ") + MONTHS[_arg1.month]) + " ") + _arg1.fullYear));
}
public static function formatInterval(_arg1:Number):String{
var _local4:int;
var _local2 = "";
if (_arg1 > MSECS_IN_HR){
_local2 = (_local2 + (Math.floor((_arg1 / MSECS_IN_HR)) + "h"));
_arg1 = (_arg1 % MSECS_IN_HR);
};
if (_arg1 > MSECS_IN_MIN){
_local4 = (_arg1 / MSECS_IN_MIN);
if ((((_local4 < 10)) && (!((_local2 == ""))))){
_local2 = (_local2 + "0");
};
_local2 = (_local2 + (_local4 + "m"));
_arg1 = (_arg1 % MSECS_IN_MIN);
};
var _local3:int = (_arg1 / MSECS_IN_SEC);
if ((((_local3 < 10)) && (!((_local2.indexOf("m") == -1))))){
_local2 = (_local2 + "0");
};
_local2 = (_local2 + (_local3 + "s"));
return (_local2);
}
}
}//package com.twofoldsecret.utils
Section 48
//HighScore (island.data.HighScore)
package island.data {
import com.adamatomic.flixel.*;
import com.twofoldsecret.utils.*;
public class HighScore {
public var start:Date;
public var end:Date;
public var powerups:int;
public var flowers:int;
public var difficulty:int;
private static const DIFFICULTY_NAMES:Array = ["Easy", "Medium", "Hard"];
public static const HEIGHT:int = 30;
private static const NORMAL_COLOR:uint = 4294967295;
private static const DIFFICULTY_COLORS:Array = [4278255360, 4294967295, 4294901760];
private static const HIGHLIGHT_COLOR:uint = 4294967040;
public function HighScore(_arg1:Date, _arg2:Date, _arg3:int, _arg4:int, _arg5:int){
this.start = _arg1;
this.end = _arg2;
this.flowers = _arg3;
this.powerups = _arg4;
this.difficulty = _arg5;
}
public function serialize():Object{
return ({start:this.start, end:this.end, flowers:this.flowers, powerups:this.powerups, difficulty:this.difficulty});
}
public function draw(_arg1:FlxState, _arg2:int, _arg3:int, _arg4:Boolean):void{
var _local5:uint = (_arg4) ? HIGHLIGHT_COLOR : NORMAL_COLOR;
var _local6:uint = DIFFICULTY_COLORS[this.difficulty];
var _local7:String = Time.formatInterval(this.duration());
var _local8:String = (this.flowers + ((this.flowers)==1) ? " flower" : " flowers");
var _local9:String = (this.powerups + ((this.powerups)==1) ? " item" : " items");
var _local10:String = DIFFICULTY_NAMES[this.difficulty];
var _local11:String = ((Time.formatTime(this.end) + ", ") + Time.formatDate(this.end));
_arg1.add(new FlxText(_arg2, _arg3, 110, 20, _local7, _local5, null, 16));
_arg1.add(new FlxText((_arg2 + 125), _arg3, 60, 12, _local8, _local5));
_arg1.add(new FlxText((_arg2 + 125), (_arg3 + 12), 60, 12, _local9, _local5));
_arg1.add(new FlxText((_arg2 + 195), _arg3, 120, 12, _local11, _local5));
_arg1.add(new FlxText((_arg2 + 195), (_arg3 + 12), 120, 12, _local10, _local6));
}
public function betterThan(_arg1:HighScore):Boolean{
if (this.difficulty == _arg1.difficulty){
return ((this.duration() > _arg1.duration()));
};
return ((this.difficulty > _arg1.difficulty));
}
public function duration():int{
if (((!((this.start == null))) && (!((this.end == null))))){
return ((this.end.time - this.start.time));
};
return (-1);
}
public static function deserialize(_arg1:Object):HighScore{
return (new HighScore(_arg1.start, _arg1.end, _arg1.flowers, _arg1.powerups, _arg1.difficulty));
}
public static function deserializeMany(_arg1:Array):Array{
var _local3:Object;
var _local2:Array = [];
for each (_local3 in _arg1) {
_local2.push(HighScore.deserialize(_local3));
};
return (_local2);
}
public static function serializeMany(_arg1:Array):Array{
var _local3:Object;
var _local2:Array = [];
for each (_local3 in _arg1) {
_local2.push((_local3 as HighScore).serialize());
};
return (_local2);
}
}
}//package island.data
Section 49
//RuinsFactory (island.data.RuinsFactory)
package island.data {
import com.adamatomic.flixel.*;
import flash.utils.*;
import island.world.*;
import com.twofoldsecret.utils.*;
public class RuinsFactory {
private var RuinsText:Class;
private var ruins:Array;
public static const RUIN_FACTOR:Number = 0.1;
public function RuinsFactory():void{
RuinsText = RuinsFactory_RuinsText;
super();
var _local1:String = (new RuinsText() as ByteArray).toString();
this.ruins = _local1.split("###");
this.ruins = Random.shuffle(this.ruins);
FlxG.log((this.ruins.length.toString() + " ruins available"));
}
public function addRuins(_arg1:OverworldMap, _arg2:int, _arg3:int):void{
if (this.ruins.length == 0){
throw (new Error("No more ruins available"));
};
var _local4:String = (Random.itemFrom(this.ruins) as String);
var _local5:int = _arg2;
var _local6:int;
while (_local6 < _local4.length) {
switch (_local4.charAt(_local6)){
case ".":
if (Math.random() > RUIN_FACTOR){
_arg1.setTile(_arg2, _arg3, "ruinbrick");
};
break;
case "X":
if (Math.random() > RUIN_FACTOR){
_arg1.setTile(_arg2, _arg3, "ruinstatue");
};
break;
case "\n":
_arg3++;
_arg2 = (_local5 - 1);
break;
default:
break;
};
_arg2++;
_local6++;
};
}
}
}//package island.data
Section 50
//RuinsFactory_RuinsText (island.data.RuinsFactory_RuinsText)
package island.data {
import mx.core.*;
public class RuinsFactory_RuinsText extends ByteArrayAsset {
}
}//package island.data
Section 51
//Stats (island.data.Stats)
package island.data {
import com.twofoldsecret.data.*;
public class Stats {
public static const ENDINGS:Object = {NORMAL:1, ESCAPE:2, MURDER:4};
private static function init():void{
if (!Storage.isSet("wins")){
Storage.write("wins", 0);
};
if (!Storage.isSet("losses")){
Storage.write("losses", 0);
};
if (!Storage.isSet("endings")){
Storage.write("endings", 0);
};
}
public static function addLoss():void{
Stats.init();
Storage.write("losses", ((Storage.read("losses") as int) + 1));
}
public static function getLosses():int{
Stats.init();
return ((Storage.read("losses") as int));
}
public static function describe():String{
Stats.init();
var _local1:int = (Storage.read("wins") as int);
var _local2:int = (Storage.read("losses") as int);
var _local3:int = (Storage.read("endings") as int);
var _local4:int;
var _local5 = "You have won ";
if (_local2 > 0){
_local5 = (_local5 + Math.floor(((_local1 / (_local1 + _local2)) * 100)));
_local5 = (_local5 + "% of the");
} else {
if (Storage.read("wins") > 0){
_local5 = (_local5 + "every");
} else {
return ("");
};
};
_local5 = (_local5 + " time, and seen ");
if ((_local3 & 1) == 1){
_local4++;
};
if ((_local3 & 2) == 2){
_local4++;
};
if ((_local3 & 4) == 4){
_local4++;
};
_local5 = (_local5 + (_local4 + " of 3 endings."));
return (_local5);
}
public static function addWin(_arg1:int):void{
Stats.init();
Storage.write("wins", ((Storage.read("wins") as int) + 1));
Storage.write("endings", ((Storage.read("endings") as int) | _arg1));
}
public static function getWins():int{
Stats.init();
return ((Storage.read("wins") as int));
}
}
}//package island.data
Section 52
//TextFactory (island.data.TextFactory)
package island.data {
import com.adamatomic.flixel.*;
import flash.utils.*;
import com.twofoldsecret.data.*;
import com.twofoldsecret.utils.*;
public class TextFactory {
private var TabletsText:Class;
private var NoFlowersText:Class;
private var text:Object;
private var TwinOfferText:Class;
private var TruthsText:Class;
private var StartTruthText:Class;
private var HintsText:Class;
private var StartLetterText:Class;
public function TextFactory():void{
TabletsText = TextFactory_TabletsText;
HintsText = TextFactory_HintsText;
TruthsText = TextFactory_TruthsText;
StartLetterText = TextFactory_StartLetterText;
StartTruthText = TextFactory_StartTruthText;
NoFlowersText = TextFactory_NoFlowersText;
TwinOfferText = TextFactory_TwinOfferText;
super();
this.text = new Object();
this.parse(TabletsText, "tablet");
FlxG.log((this.text["tablet"].length + " tablets available"));
this.parse(HintsText, "hint");
FlxG.log((this.text["hint"].length + " hints available"));
this.parse(TruthsText, "truth");
FlxG.log((this.text["truth"].length + " truths available"));
this.parse(StartLetterText, "startLetter");
this.parse(StartTruthText, "startTruth");
this.parse(NoFlowersText, "noFlowers", false);
this.parse(TwinOfferText, "twinOffer", false);
}
public function retrieve(_arg1:String):String{
if (this.text[_arg1].length == 0){
throw (new Error(("No text bits left for key " + _arg1)));
};
return (this.text[_arg1].pop());
}
public function hasText(_arg1:String):Boolean{
if (this.text[_arg1] == null){
return (false);
};
if (this.text[_arg1].length == 0){
return (false);
};
return (true);
}
private function parse(_arg1:Class, _arg2:String, _arg3:Boolean=true):void{
var _local4:String = (new (_arg1) as ByteArray).toString();
var _local5:String = (Storage.read("playerName") as String);
var _local6:String = (Storage.read("girlName") as String);
this.text[_arg2] = _local4.split("###");
var _local7:int;
while (_local7 < this.text[_arg2].length) {
this.text[_arg2][_local7] = this.text[_arg2][_local7].replace("%p", _local5);
this.text[_arg2][_local7] = this.text[_arg2][_local7].replace("%g", _local6);
_local7++;
};
if (_arg3){
this.text[_arg2] = Random.shuffle(this.text[_arg2]);
};
}
}
}//package island.data
Section 53
//TextFactory_HintsText (island.data.TextFactory_HintsText)
package island.data {
import mx.core.*;
public class TextFactory_HintsText extends ByteArrayAsset {
}
}//package island.data
Section 54
//TextFactory_NoFlowersText (island.data.TextFactory_NoFlowersText)
package island.data {
import mx.core.*;
public class TextFactory_NoFlowersText extends ByteArrayAsset {
}
}//package island.data
Section 55
//TextFactory_StartLetterText (island.data.TextFactory_StartLetterText)
package island.data {
import mx.core.*;
public class TextFactory_StartLetterText extends ByteArrayAsset {
}
}//package island.data
Section 56
//TextFactory_StartTruthText (island.data.TextFactory_StartTruthText)
package island.data {
import mx.core.*;
public class TextFactory_StartTruthText extends ByteArrayAsset {
}
}//package island.data
Section 57
//TextFactory_TabletsText (island.data.TextFactory_TabletsText)
package island.data {
import mx.core.*;
public class TextFactory_TabletsText extends ByteArrayAsset {
}
}//package island.data
Section 58
//TextFactory_TruthsText (island.data.TextFactory_TruthsText)
package island.data {
import mx.core.*;
public class TextFactory_TruthsText extends ByteArrayAsset {
}
}//package island.data
Section 59
//TextFactory_TwinOfferText (island.data.TextFactory_TwinOfferText)
package island.data {
import mx.core.*;
public class TextFactory_TwinOfferText extends ByteArrayAsset {
}
}//package island.data
Section 60
//Caption (island.hud.Caption)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.state.*;
import com.twofoldsecret.ui.*;
public class Caption extends FlxLayer {
protected var origin:Point;
protected var text:ShadowText;
var appearing:Boolean;
public var content:String;
protected var controller:PlayState;
protected var appearIndex:Number;
private static const SLACK:Number = 40;
private static const COLOR:uint = 4294967295;
private static const RECT:Rectangle = new Rectangle(10, 80, 300, 230);
public function Caption(_arg1:PlayState, _arg2:Rectangle=null):void{
if (!_arg2){
_arg2 = RECT;
};
this.controller = _arg1;
this.appearing = false;
this.visible = false;
this.active = false;
this.text = new ShadowText(_arg2.x, _arg2.y, _arg2.width, _arg2.height, "", this, 8, COLOR);
this.text.setScrollFactor(0, 0);
this.controller.hudLayer.add(this);
}
public function disappear():void{
FlxG.log("Caption disappearing");
this.visible = false;
this.active = false;
this.content = "";
this.appearing = false;
}
public function show(_arg1:String):void{
this.content = _arg1;
this.appear();
}
public function skipToEnd():void{
this.appearIndex = this.content.length;
}
override public function update():void{
if (this.appearing){
this.appearIndex++;
this.text.setText(this.content.substring(0, this.appearIndex));
if (this.appearIndex >= this.content.length){
this.appearing = false;
};
};
if ((((Math.abs((this.origin.x - this.controller.player.x)) > SLACK)) || ((Math.abs((this.origin.y - this.controller.player.y)) > SLACK)))){
this.disappear();
};
super.update();
}
public function appear():void{
if (!this.appearing){
FlxG.log("Caption appearing");
this.active = true;
this.visible = true;
this.origin = new Point(this.controller.player.x, this.controller.player.y);
this.appearing = true;
this.appearIndex = 0;
};
}
}
}//package island.hud
Section 61
//CaptionSequence (island.hud.CaptionSequence)
package island.hud {
import com.adamatomic.flixel.*;
import island.state.*;
public class CaptionSequence extends FlxLayer {
private var onComplete:Function;
private var current:int;
private var controller:PlayState;
private var captions:Array;
public function CaptionSequence(_arg1:PlayState){
this.controller = _arg1;
this.controller.hudLayer.add(this);
this.active = false;
}
override public function update():void{
if (((((((FlxG.justPressed(FlxG.UP)) || (FlxG.justPressed(FlxG.DOWN)))) || (FlxG.justPressed(FlxG.LEFT)))) || (FlxG.justPressed(FlxG.RIGHT)))){
if (this.controller.caption.appearing){
this.controller.caption.skipToEnd();
} else {
this.showNext();
};
};
}
public function show(_arg1:Array, _arg2:Function=null):void{
this.captions = _arg1;
this.onComplete = _arg2;
this.current = -1;
this.active = true;
this.controller.player.resetSpeed();
this.controller.player.controllable = false;
this.showNext();
}
private function showNext():void{
if (++this.current < this.captions.length){
this.controller.caption.show(this.captions[this.current]);
} else {
this.controller.player.controllable = true;
this.controller.caption.disappear();
this.active = false;
if (this.onComplete != null){
this.onComplete();
};
};
}
}
}//package island.hud
Section 62
//CaveTones (island.hud.CaveTones)
package island.hud {
import com.adamatomic.flixel.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class CaveTones extends FlxLayer {
private const MIN_VOLUME:Number = 0.25;
private const TONE_LENGTH:Number = 3.5;
private const WIND_LENGTH:Number = 7;
private var nextTone:Number;
private var Wind1Sound:Class;
private var Tone2Sound:Class;
private var Tone1Sound:Class;
private var Wind2Sound:Class;
private var Tone3Sound:Class;
private var nextWind:Number;
private var controller:PlayState;
public function CaveTones(_arg1:PlayState):void{
Tone1Sound = CaveTones_Tone1Sound;
Tone2Sound = CaveTones_Tone2Sound;
Tone3Sound = CaveTones_Tone3Sound;
Wind1Sound = CaveTones_Wind1Sound;
Wind2Sound = CaveTones_Wind2Sound;
super();
this.controller = _arg1;
this.controller.fxLayer.add(this);
this.reset();
}
public function reset():void{
this.nextTone = TONE_LENGTH;
this.nextWind = 0.5;
}
override public function update():void{
this.nextWind = (this.nextWind - FlxG.elapsed);
if (this.nextWind < 0){
FlxG.play((Random.choiceOf(Wind1Sound, Wind2Sound) as Class), Random.numberBetween(MIN_VOLUME, 0.1));
this.nextWind = Random.numberBetween(WIND_LENGTH, (WIND_LENGTH * 1.5));
};
if (this.controller.regions.currentRegion().pickups.length == 0){
return;
};
this.nextTone = (this.nextTone - FlxG.elapsed);
if (this.nextTone < 0){
FlxG.play((Random.choiceOf(Tone1Sound, Tone2Sound, Tone3Sound) as Class), Random.numberBetween(MIN_VOLUME, 1));
this.nextTone = Random.numberBetween(TONE_LENGTH, (TONE_LENGTH * 1.5));
};
}
}
}//package island.hud
Section 63
//CaveTones_Tone1Sound (island.hud.CaveTones_Tone1Sound)
package island.hud {
import mx.core.*;
public class CaveTones_Tone1Sound extends SoundAsset {
}
}//package island.hud
Section 64
//CaveTones_Tone2Sound (island.hud.CaveTones_Tone2Sound)
package island.hud {
import mx.core.*;
public class CaveTones_Tone2Sound extends SoundAsset {
}
}//package island.hud
Section 65
//CaveTones_Tone3Sound (island.hud.CaveTones_Tone3Sound)
package island.hud {
import mx.core.*;
public class CaveTones_Tone3Sound extends SoundAsset {
}
}//package island.hud
Section 66
//CaveTones_Wind1Sound (island.hud.CaveTones_Wind1Sound)
package island.hud {
import mx.core.*;
public class CaveTones_Wind1Sound extends SoundAsset {
}
}//package island.hud
Section 67
//CaveTones_Wind2Sound (island.hud.CaveTones_Wind2Sound)
package island.hud {
import mx.core.*;
public class CaveTones_Wind2Sound extends SoundAsset {
}
}//package island.hud
Section 68
//Lamplight (island.hud.Lamplight)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.state.*;
public class Lamplight extends FlxSprite {
private var controller:PlayState;
private var LamplightImage:Class;
public function Lamplight(_arg1:PlayState):void{
LamplightImage = Lamplight_LamplightImage;
super(LamplightImage, 0, 0);
this.controller = _arg1;
this.controller.fxLayer.add(this);
}
override public function update():void{
var _local1:PlayState = (FlxG.state as PlayState);
var _local2:Point = new Point(_local1.player.x, _local1.player.y);
_local2.x = (_local2.x + (_local1.player.width / 2));
_local2.y = (_local2.y + (_local1.player.height / 2));
this.x = (_local2.x - (this.width / 2));
this.y = (_local2.y - (this.height / 2));
super.update();
}
}
}//package island.hud
Section 69
//Lamplight_LamplightImage (island.hud.Lamplight_LamplightImage)
package island.hud {
import mx.core.*;
public class Lamplight_LamplightImage extends BitmapAsset {
}
}//package island.hud
Section 70
//Minimap (island.hud.Minimap)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.world.*;
import island.state.*;
public class Minimap extends FlxLayer {
private var caveSprites:Array;
private var overworldSprite:FlxSprite;
private var ratio:Point;
private var playerSprite:FlxSprite;
private var spiritSprites:Array;
private var overworld:Overworld;
private static const MAP_COLOR:uint = 1711276032;
private static const RECT:Rectangle = new Rectangle(10, 10, 50, 50);
private static const PLAYER_COLOR:uint = 3154116607;
private static const SMALL_DOT_SIZE:int = 2;
private static const SPIRIT_COLOR:uint = 3154051072;
private static const DOT_SIZE:int = 2;
private static const CAVE_COLOR:uint = 3154116352;
public function Minimap(_arg1:Overworld):void{
var _local3:FlxSprite;
var _local4:Point;
var _local5:FlxSprite;
var _local6:FlxSprite;
super();
this.overworld = _arg1;
var _local2:Point = this.overworld.map.pixelSize();
this.ratio = new Point((RECT.width / _local2.x), (RECT.height / _local2.y));
this.overworldSprite = new FlxSprite(null, RECT.x, RECT.y, false, false, RECT.width, RECT.height, MAP_COLOR);
this.overworldSprite.scrollFactor.x = 0;
this.overworldSprite.scrollFactor.y = 0;
this.overworldSprite.visible = false;
this.overworldSprite.active = false;
this.add(this.overworldSprite);
this.playerSprite = new FlxSprite(null, 0, 0, false, false, DOT_SIZE, DOT_SIZE, PLAYER_COLOR);
this.playerSprite.scrollFactor.x = 0;
this.playerSprite.scrollFactor.y = 0;
this.playerSprite.visible = false;
this.add(this.playerSprite);
this.spiritSprites = [];
for each (_local3 in this.overworld.spirits) {
_local5 = new FlxSprite(null, 0, 0, false, false, DOT_SIZE, DOT_SIZE, SPIRIT_COLOR);
_local5.scrollFactor.x = 0;
_local5.scrollFactor.y = 0;
_local5.visible = false;
this.spiritSprites.push(_local5);
this.add(_local5);
};
this.caveSprites = [];
for each (_local4 in this.overworld.map.caves) {
_local4 = this.overworld.map.tile2pixel(_local4);
_local4.x = (Math.floor((_local4.x * this.ratio.x)) + RECT.x);
_local4.y = (Math.floor((_local4.y * this.ratio.y)) + RECT.y);
_local6 = new FlxSprite(null, _local4.x, _local4.y, false, false, SMALL_DOT_SIZE, SMALL_DOT_SIZE, CAVE_COLOR);
_local6.scrollFactor.x = 0;
_local6.scrollFactor.y = 0;
_local6.visible = false;
this.caveSprites.push(_local6);
this.add(_local6);
};
(FlxG.state as PlayState).hudLayer.add(this);
}
public function show(_arg1:String):void{
var _local2:FlxSprite;
var _local3:FlxSprite;
if (!this.overworldSprite.visible){
this.overworldSprite.visible = true;
};
switch (_arg1){
case "player":
this.playerSprite.visible = true;
break;
case "spirits":
for each (_local2 in this.spiritSprites) {
_local2.visible = true;
};
break;
case "caves":
for each (_local3 in this.caveSprites) {
_local3.visible = true;
};
break;
};
}
override public function update():void{
var _local3:FlxSprite;
var _local1:Point = new Point(((RECT.x + RECT.width) - DOT_SIZE), ((RECT.y + RECT.height) - DOT_SIZE));
if (this.playerSprite.visible){
_local3 = this.overworld.player;
this.playerSprite.x = (this.overworldSprite.x + Math.floor((_local3.x * this.ratio.x)));
this.playerSprite.y = (this.overworldSprite.y + Math.floor((_local3.y * this.ratio.y)));
};
var _local2:int;
while (_local2 < this.overworld.spirits.length) {
if (((this.overworld.spirits[_local2].exists) && (this.spiritSprites[_local2].visible))){
this.spiritSprites[_local2].x = Math.min((this.overworldSprite.x + Math.floor((this.overworld.spirits[_local2].x * this.ratio.x))), _local1.x);
this.spiritSprites[_local2].y = Math.min((this.overworldSprite.y + Math.floor((this.overworld.spirits[_local2].y * this.ratio.y))), _local1.y);
} else {
this.spiritSprites[_local2].visible = false;
};
_local2++;
};
}
public function markVisited(_arg1:int):void{
this.overworldSprite.visible = true;
this.caveSprites[_arg1].visible = true;
this.caveSprites[_arg1].alpha = 0.5;
}
}
}//package island.hud
Section 71
//PickupCounter (island.hud.PickupCounter)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.state.*;
import island.item.*;
import com.twofoldsecret.ui.*;
public class PickupCounter extends FlxLayer {
private var FlowerIcon:Class;
private var flowerNumber:Number;
private var powerupCount:Number;
private var powerupLayer:FlxLayer;
private var flowerCount:ShadowText;
private var flowerFlash:FlxSprite;
private var flowerIcon:FlxSprite;
private var controller:PlayState;
private static const POWERUP_SPACING:int = 14;
private static const ICON_SIZE:int = 10;
private static const POSITION:Point = new Point(275, 10);
private static const POWERUP_MARGIN:int = 25;
private static const TEXT_SIZE:int = 100;
private static const ICON_OFFSET:int = -3;
private static const POWERUP_Y:int = 25;
public function PickupCounter(_arg1:PlayState):void{
FlowerIcon = PickupCounter_FlowerIcon;
super();
this.controller = _arg1;
this.flowerFlash = new FlxSprite(null, (POSITION.x - 2), (POSITION.y - 2), false, false, ((FlxG.width - POSITION.x) + 2), 12, 4294901760);
this.flowerFlash.scrollFactor.x = 0;
this.flowerFlash.scrollFactor.y = 0;
this.flowerFlash.visible = false;
this.add(this.flowerFlash);
this.flowerIcon = new FlxSprite(FlowerIcon, POSITION.x, POSITION.y);
this.flowerIcon.scrollFactor.x = 0;
this.flowerIcon.scrollFactor.y = 0;
this.add(this.flowerIcon);
this.flowerCount = new ShadowText((POSITION.x + ICON_SIZE), (POSITION.y + ICON_OFFSET), TEXT_SIZE, 8, "", this);
this.flowerCount.setScrollFactor(0, 0);
this.flowerNumber = -1;
this.powerupLayer = new FlxLayer();
this.powerupCount = 0;
this.add(this.powerupLayer);
this.controller.hudLayer.add(this);
}
override public function update():void{
if (this.flowerFlash.visible){
this.flowerFlash.alpha = (this.flowerFlash.alpha - (FlxG.elapsed * 0.75));
if (this.flowerFlash.alpha <= 0){
this.flowerFlash.visible = false;
};
};
if (this.flowerNumber != this.controller.player.flowers){
this.flowerCount.setText(("x " + this.controller.player.flowers));
this.flowerNumber = this.controller.player.flowers;
};
if (this.powerupCount != this.controller.player.powerups.length){
this.refreshPowerups();
};
super.update();
}
public function flashFlowers():void{
this.flowerFlash.visible = true;
this.flowerFlash.alpha = 1;
}
private function refreshPowerups():void{
var _local2:Powerup;
var _local3:FlxSprite;
var _local1:int = (FlxG.width - POWERUP_MARGIN);
this.powerupLayer.destroy();
for each (_local2 in this.controller.player.powerups) {
_local3 = new FlxSprite(_local2.icon, _local1, POWERUP_Y);
_local3.scrollFactor.x = 0;
_local3.scrollFactor.y = 0;
this.powerupLayer.add(_local3);
_local1 = (_local1 - POWERUP_SPACING);
};
this.powerupCount = this.controller.player.powerups.length;
}
}
}//package island.hud
Section 72
//PickupCounter_FlowerIcon (island.hud.PickupCounter_FlowerIcon)
package island.hud {
import mx.core.*;
public class PickupCounter_FlowerIcon extends BitmapAsset {
}
}//package island.hud
Section 73
//QuickCaption (island.hud.QuickCaption)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.state.*;
public class QuickCaption extends Caption {
public function QuickCaption(_arg1:PlayState):void{
super(_arg1, new Rectangle(10, (FlxG.height - 22), (FlxG.width - 10), 8));
}
override public function appear():void{
FlxG.log("QuickCaption appearing");
this.text.setText(this.content);
this.active = true;
this.visible = true;
this.origin = new Point(this.controller.player.x, this.controller.player.y);
}
}
}//package island.hud
Section 74
//SpiritSonar (island.hud.SpiritSonar)
package island.hud {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.sprite.*;
import island.world.*;
import island.state.*;
public class SpiritSonar extends FlxLayer {
private var atmosphere:FlxSprite;
private var halo:FlxSprite;
private var overworld:Overworld;
private static const HALO_COLOR:uint = 1728053247;
private static const QUAKE_RATIO:Number = 0.75;
private static const MAX_QUAKE:Number = 0.02;
private static const ATMOSPHERE_COLOR:uint = 3137351725;
private static const ATMOSPHERE_RATIO:Number = 2;
private static const WIND_RATIO:Number = 3;
private static const MIN_WIND:Number = 0.02;
public function SpiritSonar(_arg1:Overworld):void{
this.overworld = _arg1;
this.atmosphere = new FlxSprite(null, 0, 0, false, false, FlxG.width, FlxG.height, ATMOSPHERE_COLOR);
this.atmosphere.scrollFactor.x = 0;
this.atmosphere.scrollFactor.y = 0;
this.add(this.atmosphere);
this.halo = new FlxSprite(null, 0, 0, false, false, FlxG.width, FlxG.height, HALO_COLOR);
this.halo.scrollFactor.x = 0;
this.halo.scrollFactor.y = 0;
this.add(this.halo);
(FlxG.state as PlayState).fxLayer.add(this);
this.reset();
}
override public function update():void{
var _local3:Spirit;
var _local4:int;
var _local5:Number;
var _local1 = 99999999;
var _local2:int = this.overworld.spirits[0].awareness;
for each (_local3 in this.overworld.spirits) {
if (!_local3.exists){
} else {
_local4 = Point.distance(new Point(this.overworld.player.x, this.overworld.player.y), new Point(_local3.x, _local3.y));
_local1 = Math.min(_local1, _local4);
};
};
if (!(this.overworld.player as Player).invulnerable){
_local5 = (1 - (_local1 / (_local2 * WIND_RATIO)));
_local5 = Math.min(_local5, 1);
_local5 = Math.max(_local5, MIN_WIND);
FlxG.setMusicVolume(_local5);
this.halo.alpha = Math.max(0, (this.halo.alpha - (FlxG.elapsed * 2)));
} else {
this.halo.alpha = Math.min(1, (this.halo.alpha + (FlxG.elapsed * 2)));
FlxG.setMusicVolume(0);
};
if (_local1 < (_local2 * ATMOSPHERE_RATIO)){
this.atmosphere.alpha = (1 - (_local1 / (_local2 * ATMOSPHERE_RATIO)));
} else {
this.atmosphere.alpha = 0;
};
if (_local1 < (_local2 * QUAKE_RATIO)){
FlxG.quake(((1 - (_local1 / (_local2 * QUAKE_RATIO))) * MAX_QUAKE), 0.2);
};
}
public function reset():void{
this.atmosphere.alpha = 0;
this.halo.alpha = 0;
FlxG.setMusicVolume(MIN_WIND);
}
}
}//package island.hud
Section 75
//Beacon (island.item.Beacon)
package island.item {
import com.adamatomic.flixel.*;
import island.sprite.*;
import island.world.*;
public class Beacon extends FlxBlock {
private var region:Region;
private var BeaconImage:Class;
private static const MIN_ALPHA:Number = 0.1;
private static const WIDTH:int = 20;
private static const HEIGHT:int = 20;
public function Beacon(_arg1:int, _arg2:int, _arg3:Region){
BeaconImage = Beacon_BeaconImage;
super(_arg1, _arg2, WIDTH, HEIGHT, BeaconImage);
this.region = _arg3;
this.region.itemLayer.add(this);
}
override public function collide(_arg1:FlxSprite):void{
if ((_arg1 is Shade)){
if (_arg1.alpha <= MIN_ALPHA){
return;
};
if (((((((((_arg1.x + _arg1.width) <= this.x)) || ((_arg1.x >= (this.x + this.width))))) || ((_arg1.y >= (this.y + this.height))))) || (((_arg1.y + _arg1.height) <= this.y)))){
return;
};
_arg1.kill();
} else {
super.collide(_arg1);
};
}
}
}//package island.item
Section 76
//Beacon_BeaconImage (island.item.Beacon_BeaconImage)
package island.item {
import mx.core.*;
public class Beacon_BeaconImage extends BitmapAsset {
}
}//package island.item
Section 77
//Door (island.item.Door)
package island.item {
import com.adamatomic.flixel.*;
import island.sprite.*;
import island.world.*;
import island.state.*;
public class Door extends FlxBlock {
private var DoorSound:Class;
private var DoorImage:Class;
private var PurpleDoorImage:Class;
private var BlueDoorImage:Class;
private var region:Region;
private var key:String;
private static const WIDTH:int = 16;
private static const HEIGHT:int = 16;
public function Door(_arg1:int, _arg2:int, _arg3:String, _arg4:Region):void{
BlueDoorImage = Door_BlueDoorImage;
PurpleDoorImage = Door_PurpleDoorImage;
DoorImage = Door_DoorImage;
DoorSound = Door_DoorSound;
var _local5:Class = ((_arg3)=="bluekey") ? BlueDoorImage : PurpleDoorImage;
super(_arg1, _arg2, WIDTH, HEIGHT, _local5);
this.region = _arg4;
this.key = _arg3;
this.region.itemLayer.add(this);
}
override public function collide(_arg1:FlxSprite):void{
var _local2:Player = (_arg1 as Player);
if (((((((((_local2.x + _local2.width) <= this.x)) || ((_local2.x >= (this.x + this.width))))) || ((_local2.y >= (this.y + this.height))))) || (((_local2.y + _local2.height) <= this.y)))){
return;
};
if (_local2.hasPowerup(this.key)){
this.kill();
} else {
(FlxG.state as PlayState).quickCaption.show("You do not have a key that unlocks this door.");
super.collide(_local2);
};
}
override public function kill():void{
FlxG.play(DoorSound);
super.kill();
}
}
}//package island.item
Section 78
//Door_BlueDoorImage (island.item.Door_BlueDoorImage)
package island.item {
import mx.core.*;
public class Door_BlueDoorImage extends BitmapAsset {
}
}//package island.item
Section 79
//Door_DoorImage (island.item.Door_DoorImage)
package island.item {
import mx.core.*;
public class Door_DoorImage extends BitmapAsset {
}
}//package island.item
Section 80
//Door_DoorSound (island.item.Door_DoorSound)
package island.item {
import mx.core.*;
public class Door_DoorSound extends SoundAsset {
}
}//package island.item
Section 81
//Door_PurpleDoorImage (island.item.Door_PurpleDoorImage)
package island.item {
import mx.core.*;
public class Door_PurpleDoorImage extends BitmapAsset {
}
}//package island.item
Section 82
//Flower (island.item.Flower)
package island.item {
import com.adamatomic.flixel.*;
import island.sprite.*;
import island.world.*;
public class Flower extends FlxSprite {
private var PickupSound:Class;
private var region:Region;
private var FlowerImage:Class;
private static const FPS:Number = 3;
public function Flower(_arg1:int, _arg2:int, _arg3:Region):void{
FlowerImage = Flower_FlowerImage;
PickupSound = Flower_PickupSound;
super(FlowerImage, _arg1, _arg2, true);
this.addAnimation("glow", [0, 1, 2, 3], Flower.FPS);
this.region = _arg3;
this.region.itemLayer.add(this);
}
override public function update():void{
this.play("glow");
super.update();
}
override public function kill():void{
(this.region.player as Player).flowers++;
this.region.pickups.remove(this);
FlxG.play(PickupSound);
new FlowerConfetti(this);
super.kill();
}
}
}//package island.item
Section 83
//Flower_FlowerImage (island.item.Flower_FlowerImage)
package island.item {
import mx.core.*;
public class Flower_FlowerImage extends BitmapAsset {
}
}//package island.item
Section 84
//Flower_PickupSound (island.item.Flower_PickupSound)
package island.item {
import mx.core.*;
public class Flower_PickupSound extends SoundAsset {
}
}//package island.item
Section 85
//FlowerConfetti (island.item.FlowerConfetti)
package island.item {
import com.adamatomic.flixel.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class FlowerConfetti extends FlxEmitter {
private static const COLORS:Array = [4288553132, 4291908575, 4280375805];
public function FlowerConfetti(_arg1:Flower):void{
var _local5:uint;
var _local6:FlxSprite;
var _local2:FlxArray = new FlxArray();
var _local3:PlayState = (FlxG.state as PlayState);
var _local4:int;
while (_local4 < 10) {
_local5 = (Random.itemFrom(COLORS) as uint);
_local6 = new FlxSprite(null, 0, 0, false, false, 2, 2, _local5);
_local3.fxLayer.add(_local6);
_local2.add(_local6);
_local4++;
};
super(_arg1.x, _arg1.y, _arg1.width, _arg1.height, _local2, -1.5, -10, 10, 10, 10, -360, 360, 0, 0);
_local3.fxLayer.add(this);
this.reset();
}
}
}//package island.item
Section 86
//Letter (island.item.Letter)
package island.item {
import com.adamatomic.flixel.*;
import island.world.*;
import island.state.*;
import island.utils.*;
public class Letter extends FlxSprite implements IReadable {
private var LetterImage:Class;
private var hint:String;
private var truth:String;
private var reading:Boolean;
private static const FPS:int = 3;
public function Letter(_arg1:int, _arg2:int, _arg3:Region=null, _arg4:String="", _arg5:String="", _arg6:Boolean=true):void{
LetterImage = Letter_LetterImage;
var _local7:PlayState = (FlxG.state as PlayState);
if (_arg4 == ""){
_arg4 = _local7.textFactory.retrieve("hint");
};
if (_arg5 == ""){
_arg5 = _local7.textFactory.retrieve("truth");
};
super(LetterImage, _arg1, _arg2, true);
this.hint = _arg4;
this.truth = _arg5;
if (!_arg6){
this.scale.x = 1.25;
this.scale.y = 1.25;
this.width = (this.width * 1.25);
this.height = (this.height * 1.25);
};
this.addAnimation("normal", [0]);
this.addAnimation("glasses", [1, 2], FPS);
if (_arg3){
_arg3.itemLayer.add(this);
};
}
override public function update():void{
if ((FlxG.state as PlayState).player.hasPowerup("glasses")){
this.play("glasses");
} else {
this.play("normal");
};
super.update();
}
public function read():void{
var _local1:PlayState = (FlxG.state as PlayState);
var _local2:String = (_local1.player.hasPowerup("glasses")) ? this.truth : this.hint;
if (_local1.caption.content != _local2){
_local1.caption.show(_local2);
};
}
}
}//package island.item
Section 87
//Letter_LetterImage (island.item.Letter_LetterImage)
package island.item {
import mx.core.*;
public class Letter_LetterImage extends BitmapAsset {
}
}//package island.item
Section 88
//Powerup (island.item.Powerup)
package island.item {
import com.adamatomic.flixel.*;
import island.sprite.*;
import island.state.*;
public class Powerup extends FlxSprite {
public var icon:Class;
public var id:String;
private var description:String;
private var PowerupSound:Class;
public static const LOOKUP:Object = {amulet:{image:AmuletImage, icon:AmuletIconImage, description:"A warm, protective feeling washes over you."}, bluekey:{image:BlueKeyImage, icon:BlueKeyIconImage, description:"You've found a key the color of the sky."}, compass:{image:CompassImage, icon:CompassIconImage, description:"You now know where you must go.", onPickup:function ():void{
(FlxG.state as PlayState).minimap.show("caves");
}}, crystalball:{image:CrystalBallImage, icon:CrystalBallIconImage, description:"You gain a new awareness of the sinister.", onPickup:function ():void{
(FlxG.state as PlayState).minimap.show("spirits");
}}, glasses:{image:GlassesImage, icon:GlassesIconImage, description:"The world becomes uncomfortably sharp."}, map:{image:MapImage, icon:MapIconImage, description:"You feel more certain of where you are.", onPickup:function ():void{
(FlxG.state as PlayState).minimap.show("player");
}}, purplekey:{image:PurpleKeyImage, icon:PurpleKeyIconImage, description:"You've found a peculiarly purple key."}, raft:{image:RaftImage, icon:RaftIconImage, description:"You can now leave the island.", onPickup:function ():void{
(FlxG.state as PlayState).overworld.pickups = new FlxArray();
(FlxG.state as PlayState).overworld.itemLayer.visible = false;
}}, shoes:{image:ShoesImage, icon:ShoesIconImage, description:"You feel quicker... but oddly, less agile.", onPickup:function ():void{
var _local1:* = (FlxG.state as PlayState).player;
_local1.maxSpeed = (Spirit.MAX_SPEED * 1.5);
_local1.friction = (Spirit.MAX_SPEED * 1.5);
_local1.accel = 2;
_local1.resetSpeed();
}}, teleporter:{image:TeleporterImage, icon:TeleporterIconImage, description:"You feel displaceable. [Hold two opposing arrow keys to use.]"}};
private static var ShoesIconImage:Class = Powerup_ShoesIconImage;
private static var TeleporterImage:Class = Powerup_TeleporterImage;
private static var MapIconImage:Class = Powerup_MapIconImage;
private static var GlassesIconImage:Class = Powerup_GlassesIconImage;
private static var CompassImage:Class = Powerup_CompassImage;
private static var RaftImage:Class = Powerup_RaftImage;
private static var PurpleKeyIconImage:Class = Powerup_PurpleKeyIconImage;
private static var CompassIconImage:Class = Powerup_CompassIconImage;
private static var TeleporterIconImage:Class = Powerup_TeleporterIconImage;
private static var RaftIconImage:Class = Powerup_RaftIconImage;
private static var BlueKeyImage:Class = Powerup_BlueKeyImage;
private static var BlueKeyIconImage:Class = Powerup_BlueKeyIconImage;
private static var PurpleKeyImage:Class = Powerup_PurpleKeyImage;
private static var CrystalBallImage:Class = Powerup_CrystalBallImage;
private static var CrystalBallIconImage:Class = Powerup_CrystalBallIconImage;
private static var GlassesImage:Class = Powerup_GlassesImage;
private static var ShoesImage:Class = Powerup_ShoesImage;
private static var AmuletIconImage:Class = Powerup_AmuletIconImage;
private static var AmuletImage:Class = Powerup_AmuletImage;
private static var MapImage:Class = Powerup_MapImage;
public function Powerup(_arg1:String):void{
PowerupSound = Powerup_PowerupSound;
super(LOOKUP[_arg1].image, 0, 0);
this.id = _arg1;
this.icon = LOOKUP[_arg1].icon;
this.description = LOOKUP[_arg1].description;
}
override public function kill():void{
var _local1:PlayState = (FlxG.state as PlayState);
_local1.player.powerups.push(this);
_local1.quickCaption.show(this.description);
FlxG.play(PowerupSound);
if (LOOKUP[this.id].onPickup){
LOOKUP[this.id].onPickup();
};
_local1.regions.currentRegion().pickups.remove(this, true);
super.kill();
}
}
}//package island.item
Section 89
//Powerup_AmuletIconImage (island.item.Powerup_AmuletIconImage)
package island.item {
import mx.core.*;
public class Powerup_AmuletIconImage extends BitmapAsset {
}
}//package island.item
Section 90
//Powerup_AmuletImage (island.item.Powerup_AmuletImage)
package island.item {
import mx.core.*;
public class Powerup_AmuletImage extends BitmapAsset {
}
}//package island.item
Section 91
//Powerup_BlueKeyIconImage (island.item.Powerup_BlueKeyIconImage)
package island.item {
import mx.core.*;
public class Powerup_BlueKeyIconImage extends BitmapAsset {
}
}//package island.item
Section 92
//Powerup_BlueKeyImage (island.item.Powerup_BlueKeyImage)
package island.item {
import mx.core.*;
public class Powerup_BlueKeyImage extends BitmapAsset {
}
}//package island.item
Section 93
//Powerup_CompassIconImage (island.item.Powerup_CompassIconImage)
package island.item {
import mx.core.*;
public class Powerup_CompassIconImage extends BitmapAsset {
}
}//package island.item
Section 94
//Powerup_CompassImage (island.item.Powerup_CompassImage)
package island.item {
import mx.core.*;
public class Powerup_CompassImage extends BitmapAsset {
}
}//package island.item
Section 95
//Powerup_CrystalBallIconImage (island.item.Powerup_CrystalBallIconImage)
package island.item {
import mx.core.*;
public class Powerup_CrystalBallIconImage extends BitmapAsset {
}
}//package island.item
Section 96
//Powerup_CrystalBallImage (island.item.Powerup_CrystalBallImage)
package island.item {
import mx.core.*;
public class Powerup_CrystalBallImage extends BitmapAsset {
}
}//package island.item
Section 97
//Powerup_GlassesIconImage (island.item.Powerup_GlassesIconImage)
package island.item {
import mx.core.*;
public class Powerup_GlassesIconImage extends BitmapAsset {
}
}//package island.item
Section 98
//Powerup_GlassesImage (island.item.Powerup_GlassesImage)
package island.item {
import mx.core.*;
public class Powerup_GlassesImage extends BitmapAsset {
}
}//package island.item
Section 99
//Powerup_MapIconImage (island.item.Powerup_MapIconImage)
package island.item {
import mx.core.*;
public class Powerup_MapIconImage extends BitmapAsset {
}
}//package island.item
Section 100
//Powerup_MapImage (island.item.Powerup_MapImage)
package island.item {
import mx.core.*;
public class Powerup_MapImage extends BitmapAsset {
}
}//package island.item
Section 101
//Powerup_PowerupSound (island.item.Powerup_PowerupSound)
package island.item {
import mx.core.*;
public class Powerup_PowerupSound extends SoundAsset {
}
}//package island.item
Section 102
//Powerup_PurpleKeyIconImage (island.item.Powerup_PurpleKeyIconImage)
package island.item {
import mx.core.*;
public class Powerup_PurpleKeyIconImage extends BitmapAsset {
}
}//package island.item
Section 103
//Powerup_PurpleKeyImage (island.item.Powerup_PurpleKeyImage)
package island.item {
import mx.core.*;
public class Powerup_PurpleKeyImage extends BitmapAsset {
}
}//package island.item
Section 104
//Powerup_RaftIconImage (island.item.Powerup_RaftIconImage)
package island.item {
import mx.core.*;
public class Powerup_RaftIconImage extends BitmapAsset {
}
}//package island.item
Section 105
//Powerup_RaftImage (island.item.Powerup_RaftImage)
package island.item {
import mx.core.*;
public class Powerup_RaftImage extends BitmapAsset {
}
}//package island.item
Section 106
//Powerup_ShoesIconImage (island.item.Powerup_ShoesIconImage)
package island.item {
import mx.core.*;
public class Powerup_ShoesIconImage extends BitmapAsset {
}
}//package island.item
Section 107
//Powerup_ShoesImage (island.item.Powerup_ShoesImage)
package island.item {
import mx.core.*;
public class Powerup_ShoesImage extends BitmapAsset {
}
}//package island.item
Section 108
//Powerup_TeleporterIconImage (island.item.Powerup_TeleporterIconImage)
package island.item {
import mx.core.*;
public class Powerup_TeleporterIconImage extends BitmapAsset {
}
}//package island.item
Section 109
//Powerup_TeleporterImage (island.item.Powerup_TeleporterImage)
package island.item {
import mx.core.*;
public class Powerup_TeleporterImage extends BitmapAsset {
}
}//package island.item
Section 110
//Tablet (island.item.Tablet)
package island.item {
import com.adamatomic.flixel.*;
import island.world.*;
import island.state.*;
import island.utils.*;
public class Tablet extends FlxSprite implements IReadable {
private var region:Region;
private var TabletImage:Class;
private var content:String;
public function Tablet(_arg1:Number, _arg2:Number, _arg3:Region):void{
TabletImage = Tablet_TabletImage;
super(TabletImage, _arg1, _arg2);
this.content = (FlxG.state as PlayState).textFactory.retrieve("tablet");
this.region = _arg3;
this.region.itemLayer.add(this);
}
public function read():void{
if ((FlxG.state as PlayState).caption.content != this.content){
(FlxG.state as PlayState).caption.show(this.content);
};
}
}
}//package island.item
Section 111
//Tablet_TabletImage (island.item.Tablet_TabletImage)
package island.item {
import mx.core.*;
public class Tablet_TabletImage extends BitmapAsset {
}
}//package island.item
Section 112
//Girl (island.sprite.Girl)
package island.sprite {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.data.*;
import island.state.*;
import island.item.*;
import com.twofoldsecret.data.*;
public class Girl extends FlxSprite {
protected var interrupted:Boolean;
protected var found:Boolean;
private var GirlImage:Class;
protected static const INTERRUPT_DISTANCE:int = 60;
protected static const PROMPT:String = "
[Press any arrow key to continue.]";
protected static const MUSIC_DISTANCE:int = 1250;
protected static const FPS:int = 3;
public function Girl(_arg1:Class=null){
GirlImage = Girl_GirlImage;
if (_arg1 == null){
_arg1 = GirlImage;
};
super(_arg1, 0, 0, true, false);
this.addAnimation("normal", [0]);
this.addAnimation("spirit", [1, 2], FPS);
this.found = false;
this.interrupted = false;
}
override public function update():void{
var _local1:PlayState = (FlxG.state as PlayState);
var _local2:Player = _local1.player;
var _local3:Number = Point.distance(new Point(this.x, this.y), new Point(_local2.x, _local2.y));
if (((!(this.interrupted)) && ((_local3 < INTERRUPT_DISTANCE)))){
this.interrupt(_local2);
};
if ((FlxG.state as PlayState).player.hasPowerup("glasses")){
this.play("spirit");
} else {
this.play("normal");
};
FlxG.setMusicVolume((1 - (_local3 / MUSIC_DISTANCE)));
super.update();
}
override public function kill():void{
var self:Girl;
var state:PlayState;
self = this;
state = (FlxG.state as PlayState);
var wantedFlowers = 25;
var captions:Array = [];
if (!found){
found = true;
if (state.player.hasKillerTouch){
state.player.controllable = false;
state.player.velocity.x = 0;
state.player.velocity.y = 0;
state.player.hasKillerTouch = false;
state.player.killedGirl = true;
Spirit.deathFx(function ():void{
var _local1:Powerup = new Powerup("raft");
_local1.x = self.x;
_local1.y = self.y;
state.regions.currentRegion().itemLayer.add(_local1);
state.regions.currentRegion().pickups.add(_local1);
self.exists = false;
state.player.y = (state.player.y + 20);
state.player.controllable = true;
});
} else {
state.stopTimer();
HighScoreState.lastPlay = state.toHighScore();
while (state.player.flowers >= wantedFlowers) {
wantedFlowers = (wantedFlowers * 2);
};
captions[0] = (Storage.read("playerName") + ", You found me!\n\n");
if (Stats.getLosses() == 0){
if (Stats.getWins() == 0){
captions[0] = (captions[0] + "The first time is always the hardest, isn't it?");
} else {
captions[0] = (captions[0] + "You're really good at this, aren't you? I'm impressed.");
};
} else {
switch (PlayState.difficulty){
case PlayState.EASY:
captions[0] = (captions[0] + "Maybe you're ready to try something more difficult?");
break;
case PlayState.MEDIUM:
captions[0] = (captions[0] + "I knew you could do it.");
break;
case PlayState.HARD:
captions[0] = (captions[0] + "... Was it too hard?");
};
};
captions[0] = (captions[0] + PROMPT);
if (state.player.flowers != 0){
captions[1] = (state.player.flowers + " flower");
if (state.player.flowers != 1){
captions[1] = (captions[1] + "s");
};
captions[1] = (captions[1] + "...\n\n");
if (state.player.flowers < 25){
captions[1] = (captions[1] + ("I've always loved flowers. They never look old, do they?\n" + "They always glow when you bring them to your face."));
} else {
if (state.player.flowers < 50){
captions[1] = (captions[1] + (("Purple is my favorite color. I've heard it's the color of magic,\n" + "but that's silly. Don't you think? If anything, it should be blue,\n") + "the color of the sky and the ocean. They both have no end."));
} else {
if (state.player.flowers < 100){
captions[1] = (captions[1] + (((("You brought me flowers the second time we met. Ones\n" + "exactly like these... you told me then that they grew in\n") + "the city gardens, that they were named anemones. You\n") + "weren't supposed to take them but you did. Do these\n") + "look familiar to you? They're not quite right, I know."));
} else {
captions[1] = (captions[1] + (((((("You really are dedicated to me. I never doubted it, I mean...\n" + "but this shows it in a way I never thought you would. You\n") + "loved talking about love. Do you remember? You had so\n") + "many grand speeches for me and I believed none of them,\n") + "because you were so young. Everything was forever for\n") + "you. You didn't know then how aging softens you. Do you\n") + "know now? You're not so old, don't worry."));
};
};
};
captions[1] = (captions[1] + ("\n\nThese are lovely. But if you brought me " + wantedFlowers));
captions[1] = (captions[1] + (" instead..." + PROMPT));
} else {
captions[1] = "You didn't bring me any flowers...\n\n";
captions[1] = (captions[1] + "It's okay. I understand. What's matters is that you tried.\n");
captions[1] = (captions[1] + "I know you wanted to bring me a gift. Strange things can\n");
captions[1] = (captions[1] + "happen along the way.\n\nNext time, though, can you try to ");
captions[1] = (captions[1] + ("bring me a dozen?" + PROMPT));
};
captions[2] = ("Escape the island? Yes, we must.\n\nBut first let me kiss you..." + PROMPT);
state.captionSequence.show(captions, function ():void{
state.player.controllable = false;
FlxG.fade(4294967295, 4, function ():void{
Stats.addWin(Stats.ENDINGS.NORMAL);
FlxG.switchState(HighScoreState);
});
});
};
};
}
public function interrupt(_arg1:Player):void{
var _local2:Array = [];
var _local3:PlayState = (FlxG.state as PlayState);
var _local4:String = (Storage.read("playerName") as String);
if (_arg1.hasKillerTouch){
_local2[0] = (((_local4 + ", what's wrong? You look... different...\n\n") + "Please don't come near me...\n\nPlease...") + PROMPT);
} else {
if (!_arg1.hasPickedFlower){
while (_local3.textFactory.hasText("noFlowers")) {
_local2.unshift((_local3.textFactory.retrieve("noFlowers") + PROMPT));
};
};
};
if (_local2.length > 0){
_local3.captionSequence.show(_local2);
};
this.interrupted = true;
}
}
}//package island.sprite
Section 113
//Girl_GirlImage (island.sprite.Girl_GirlImage)
package island.sprite {
import mx.core.*;
public class Girl_GirlImage extends BitmapAsset {
}
}//package island.sprite
Section 114
//Player (island.sprite.Player)
package island.sprite {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.data.*;
import island.world.*;
import island.state.*;
import island.item.*;
import com.twofoldsecret.utils.*;
public class Player extends FlxSprite {
public var friction:int;
public var controllable:Boolean;
private var direction:String;
public var powerups:FlxArray;
private var shrunk:Boolean;
private var controller:PlayState;
public var invulnerable:Boolean;
public var hasPickedFlower:Boolean;
private var teleportCooldown:Number;
public var killedGirl:Boolean;
public var maxSpeed:int;
private var teleportSounded:Boolean;
private var TeleportCompleteSound:Class;
private var teleporting:Boolean;
private var teleportTimer:Number;
public var accel:int;
private var PlayerImage:Class;
private var TeleportCancelSound:Class;
public var flowers:int;
public var hasKillerTouch:Boolean;
private var TeleportStartSound:Class;
private static const TELEPORT_TIME:Number = 2;
private static const WIDTH:Number = 10;
public static const SPEED:Number = 75;
public static const FPS:Number = 10;
private static const GROW_FACTOR:Number = 1.5;
private static const TELEPORT_COOLDOWN:Number = 1.5;
public function Player(_arg1:Number, _arg2:Number, _arg3:PlayState):void{
PlayerImage = Player_PlayerImage;
TeleportStartSound = Player_TeleportStartSound;
TeleportCancelSound = Player_TeleportCancelSound;
TeleportCompleteSound = Player_TeleportCompleteSound;
super(PlayerImage, _arg1, _arg2, true, true);
this.accel = SPEED;
this.maxSpeed = SPEED;
this.friction = (SPEED * 5);
this.health = 1;
this.invulnerable = false;
this.flowers = 0;
this.powerups = new FlxArray();
this.controller = _arg3;
this.shrunk = true;
this.controllable = true;
this.hasPickedFlower = false;
this.hasKillerTouch = false;
this.killedGirl = false;
this.teleporting = false;
this.teleportCooldown = 0;
this.resetSpeed();
this.width = WIDTH;
this.addAnimation("up", [0, 1], FPS);
this.addAnimation("down", [2, 3], FPS);
this.addAnimation("left", [4, 5], FPS);
this.addAnimation("upspirit", [6, 7], FPS);
this.addAnimation("downspirit", [8, 9], FPS);
this.addAnimation("leftspirit", [10, 11], FPS);
}
public function shrink():void{
if (this.shrunk){
return;
};
this.scale = new Point(1, 1);
this.width = (this.width / GROW_FACTOR);
this.height = (this.height / GROW_FACTOR);
this.shrunk = true;
}
public function grow():void{
if (!this.shrunk){
return;
};
this.scale = new Point(GROW_FACTOR, GROW_FACTOR);
this.width = (this.width * GROW_FACTOR);
this.height = (this.height * GROW_FACTOR);
this.shrunk = false;
}
public function scent():Number{
return ((this.flowers * 5));
}
public function teleport():void{
var _local3:Point;
var _local1:PlayState = (FlxG.state as PlayState);
var _local2:Region = _local1.regions.currentRegion();
FlxG.log("Player teleports");
FlxG.play(TeleportCompleteSound);
FlxG.flash(4294967295, 0.5);
if ((_local2 is Overworld)){
_local3 = (Random.itemFrom((_local2 as Overworld).map.teleportSpots) as Point);
this.x = _local3.x;
this.y = _local3.y;
} else {
_local1.enter(-1);
};
this.alpha = 1;
this.teleportCooldown = TELEPORT_COOLDOWN;
}
public function resetSpeed():void{
this.maxVelocity.x = this.maxSpeed;
this.maxVelocity.y = this.maxSpeed;
this.drag.x = this.friction;
this.drag.y = this.friction;
this.velocity.x = 0;
this.velocity.y = 0;
this.controllable = true;
}
public function removePowerup(_arg1:String):void{
var _local2:Powerup;
for each (_local2 in this.powerups) {
if (_local2.id == _arg1){
this.powerups.remove(_local2, true);
return;
};
};
}
override public function update():void{
var _local1:String;
if (this.controllable){
if (FlxG.kLeft){
if (this.velocity.x == 0){
this.direction = "left";
};
this.velocity.x = (this.velocity.x - ((this.accel * FlxG.elapsed) * 100));
};
if (FlxG.kRight){
if (this.velocity.x == 0){
this.direction = "right";
};
this.velocity.x = (this.velocity.x + ((this.accel * FlxG.elapsed) * 100));
};
if (FlxG.kUp){
if (this.velocity.y == 0){
this.direction = "up";
};
this.velocity.y = (this.velocity.y - ((this.accel * FlxG.elapsed) * 100));
};
if (FlxG.kDown){
if (this.velocity.y == 0){
this.direction = "down";
};
this.velocity.y = (this.velocity.y + ((this.accel * FlxG.elapsed) * 100));
};
};
if (((!((this.velocity.x == 0))) || (!((this.velocity.y == 0))))){
if (Math.abs(this.velocity.x) > Math.abs(this.velocity.y)){
_local1 = "left";
this.facing = (this.velocity.x > 0);
} else {
_local1 = ((this.velocity.y)>0) ? "down" : "up";
this.facing = true;
};
if (this.hasKillerTouch){
_local1 = (_local1 + "spirit");
};
this.play(_local1);
} else {
this.play(null);
};
if (this.hasPowerup("teleporter")){
if (this.teleportCooldown > 0){
this.teleportCooldown = (this.teleportCooldown - FlxG.elapsed);
};
if (this.teleportCooldown <= 0){
if (((((FlxG.kLeft) && (FlxG.kRight))) || (((FlxG.kUp) && (FlxG.kDown))))){
if (!this.teleporting){
FlxG.log("Player is beginning to teleport");
this.teleporting = true;
this.teleportSounded = false;
this.teleportTimer = TELEPORT_TIME;
} else {
this.teleportTimer = (this.teleportTimer - FlxG.elapsed);
this.alpha = (this.teleportTimer / TELEPORT_TIME);
if (((!(this.teleportSounded)) && (((TELEPORT_TIME - this.teleportTimer) > 0.5)))){
FlxG.play(TeleportStartSound);
this.teleportSounded = true;
};
if (this.teleportTimer <= 0){
this.teleporting = false;
this.teleport();
};
};
} else {
if (this.teleporting){
FlxG.log("Player cancelled teleport");
if ((TELEPORT_TIME - this.teleportTimer) > 0.5){
FlxG.play(TeleportCancelSound);
};
this.alpha = 1;
this.teleporting = false;
};
};
};
};
if (this.flowers > 0){
this.hasPickedFlower = true;
};
super.update();
}
public function eject(_arg1:int, _arg2:int):void{
this.drag.x = 0;
this.drag.y = 0;
this.maxVelocity.x = _arg1;
this.maxVelocity.y = _arg2;
this.velocity.x = _arg1;
this.velocity.y = _arg2;
this.controllable = false;
}
override public function kill():void{
FlxG.log("Player has died");
super.kill();
FlxG.fade(4294901760, 3, function ():void{
Stats.addLoss();
FlxG.stopMusic();
FlxG.switchState(GameOverState);
}, true);
}
public function hasPowerup(_arg1:String):Boolean{
var _local2:Powerup;
for each (_local2 in this.powerups) {
if (_local2.id == _arg1){
return (true);
};
};
return (false);
}
}
}//package island.sprite
Section 115
//Player_PlayerImage (island.sprite.Player_PlayerImage)
package island.sprite {
import mx.core.*;
public class Player_PlayerImage extends BitmapAsset {
}
}//package island.sprite
Section 116
//Player_TeleportCancelSound (island.sprite.Player_TeleportCancelSound)
package island.sprite {
import mx.core.*;
public class Player_TeleportCancelSound extends SoundAsset {
}
}//package island.sprite
Section 117
//Player_TeleportCompleteSound (island.sprite.Player_TeleportCompleteSound)
package island.sprite {
import mx.core.*;
public class Player_TeleportCompleteSound extends SoundAsset {
}
}//package island.sprite
Section 118
//Player_TeleportStartSound (island.sprite.Player_TeleportStartSound)
package island.sprite {
import mx.core.*;
public class Player_TeleportStartSound extends SoundAsset {
}
}//package island.sprite
Section 119
//Shade (island.sprite.Shade)
package island.sprite {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.world.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class Shade extends FlxSprite {
public var strength:int;
private var lastCollision:Point;
private var speed:Number;
private var FlowersLostSound:Class;
private var ShadeImage:Class;
private var EjectionSound:Class;
private var ShadeDeathSound:Class;
private var region:Cave;
private var rotation:Number;
private var direction:String;
private static const EJECTION_VELOCITY:int = 1000;
private static const WIDTH:Number = 15;
private static const OPACITY_RANGE:int = 125;
private static const MAX_OPACITY:Number = 0.9;
private static const ROTATIONS:Array = [0, 90, 180, 270];
private static const SWITCH_RANGE:int = 40;
public function Shade(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Cave){
ShadeImage = Shade_ShadeImage;
ShadeDeathSound = Shade_ShadeDeathSound;
FlowersLostSound = Shade_FlowersLostSound;
EjectionSound = Shade_EjectionSound;
super(ShadeImage, _arg1, _arg2, true, true);
this.width = Shade.WIDTH;
this.strength = _arg3;
this.region = _arg4;
this.region.spriteLayer.add(this);
this.rotation = (Random.itemFrom(Shade.ROTATIONS) as Number);
this.speed = Random.intBetween((Player.SPEED * 0.1), (Player.SPEED * 1.25));
this.maxVelocity.x = this.speed;
this.maxVelocity.y = this.speed;
this.drag.x = (this.speed * 5);
this.drag.y = (this.speed * 5);
this.addAnimation("up", [0, 1], (Player.FPS / 2));
this.addAnimation("down", [2, 3], (Player.FPS / 2));
this.addAnimation("left", [4, 5], (Player.FPS / 2));
}
override public function update():void{
var alreadyRotated:Boolean;
var animation:String;
var size:Point = this.region.map.pixelSize();
var distance:Number = Point.distance(new Point(this.x, this.y), new Point(this.region.player.x, this.region.player.y));
if (distance < Shade.OPACITY_RANGE){
this.alpha = ((1 - (distance / Shade.OPACITY_RANGE)) * Shade.MAX_OPACITY);
} else {
this.alpha = 0;
};
if (FlxG.kLeft){
this.translateMotion("left");
} else {
if (FlxG.kRight){
this.translateMotion("right");
};
};
if (FlxG.kUp){
this.translateMotion("up");
} else {
if (FlxG.kDown){
this.translateMotion("down");
};
};
if (this.y < (FlxG.height / 2)){
this.rotation = 180;
};
if (this.y > (size.y - (FlxG.height / 2))){
this.rotation = 0;
};
alreadyRotated = false;
var region:Cave = (this.region as Cave);
FlxG.overlapArray(region.shades, this, function (_arg1:FlxSprite, _arg2:Shade):void{
if (!alreadyRotated){
alreadyRotated = true;
_arg2.switchRotation();
};
});
this.y = Math.max(this.y, (FlxG.height / 2));
this.y = Math.min(this.y, (size.y - (FlxG.height / 2)));
var playerArray:FlxArray = new FlxArray();
playerArray.push(this.region.player);
FlxG.overlapArray(playerArray, this, function (_arg1:Player, _arg2:Shade):void{
if (_arg1.flowers > 0){
FlxG.log((("Shade dinged player for " + _arg2.strength) + " flowers"));
(FlxG.state as PlayState).pickupCounter.flashFlowers();
FlxG.play(FlowersLostSound);
_arg1.flowers = Math.max((_arg1.flowers - _arg2.strength), 0);
} else {
FlxG.log("Shade ejected player from cave");
FlxG.flash(2298413056, 0.5, null, true);
FlxG.play(EjectionSound);
_arg2.region.ejectingPlayer = true;
_arg1.eject(0, EJECTION_VELOCITY);
};
_arg2.kill();
});
if (((!((this.velocity.x == 0))) || (!((this.velocity.y == 0))))){
if (Math.abs(this.velocity.x) > Math.abs(this.velocity.y)){
animation = "left";
this.facing = (this.velocity.x > 0);
} else {
animation = ((this.velocity.y)>0) ? "down" : "up";
this.facing = true;
};
this.play(animation);
} else {
this.play(null);
};
super.update();
}
private function switchRotation():void{
if (((this.lastCollision) && ((Point.distance(this.lastCollision, new Point(this.x, this.y)) < SWITCH_RANGE)))){
return;
};
this.rotation = ((this.rotation + ((Math.random())>0.5) ? -90 : 90) % 360);
this.lastCollision = new Point(this.x, this.y);
}
override public function kill():void{
FlxG.play(ShadeDeathSound);
new ShadeExplosion(this);
super.kill();
}
private function translateMotion(_arg1:String):void{
switch (_arg1){
case "up":
switch (this.rotation){
case 90:
_arg1 = "right";
break;
case 180:
_arg1 = "down";
break;
case 270:
_arg1 = "left";
break;
};
break;
case "down":
switch (this.rotation){
case 90:
_arg1 = "left";
break;
case 180:
_arg1 = "up";
break;
case 270:
_arg1 = "right";
break;
};
break;
case "left":
switch (this.rotation){
case 90:
_arg1 = "up";
break;
case 180:
_arg1 = "right";
break;
case 270:
_arg1 = "down";
break;
};
break;
case "right":
switch (this.rotation){
case 90:
_arg1 = "down";
break;
case 180:
_arg1 = "left";
break;
case 270:
_arg1 = "up";
break;
};
break;
};
if (_arg1 == "up"){
if (this.velocity.y == 0){
this.direction = "up";
};
this.velocity.y = (this.velocity.y - ((this.speed * FlxG.elapsed) * 100));
};
if (_arg1 == "down"){
if (this.velocity.y == 0){
this.direction = "down";
};
this.velocity.y = (this.velocity.y + ((this.speed * FlxG.elapsed) * 100));
};
if (_arg1 == "left"){
if (this.velocity.x == 0){
this.direction = "left";
};
this.velocity.x = (this.velocity.x - ((this.speed * FlxG.elapsed) * 100));
};
if (_arg1 == "right"){
if (this.velocity.x == 0){
this.direction = "right";
};
this.velocity.x = (this.velocity.x + ((this.speed * FlxG.elapsed) * 100));
};
}
override public function hitCeiling():Boolean{
this.switchRotation();
return (true);
}
override public function hitFloor():Boolean{
this.switchRotation();
return (true);
}
override public function hitWall():Boolean{
this.switchRotation();
return (true);
}
}
}//package island.sprite
Section 120
//Shade_EjectionSound (island.sprite.Shade_EjectionSound)
package island.sprite {
import mx.core.*;
public class Shade_EjectionSound extends SoundAsset {
}
}//package island.sprite
Section 121
//Shade_FlowersLostSound (island.sprite.Shade_FlowersLostSound)
package island.sprite {
import mx.core.*;
public class Shade_FlowersLostSound extends SoundAsset {
}
}//package island.sprite
Section 122
//Shade_ShadeDeathSound (island.sprite.Shade_ShadeDeathSound)
package island.sprite {
import mx.core.*;
public class Shade_ShadeDeathSound extends SoundAsset {
}
}//package island.sprite
Section 123
//Shade_ShadeImage (island.sprite.Shade_ShadeImage)
package island.sprite {
import mx.core.*;
public class Shade_ShadeImage extends BitmapAsset {
}
}//package island.sprite
Section 124
//ShadeExplosion (island.sprite.ShadeExplosion)
package island.sprite {
import com.adamatomic.flixel.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class ShadeExplosion extends FlxEmitter {
public static const COLORS:Array = [872171078, 1727809094, 2583447110, 3153872454, 3724297798];
public function ShadeExplosion(_arg1:Shade):void{
var _local5:uint;
var _local6:FlxSprite;
var _local2:FlxArray = new FlxArray();
var _local3:PlayState = (FlxG.state as PlayState);
var _local4:int;
while (_local4 < 10) {
_local5 = (Random.itemFrom(COLORS) as uint);
_local6 = new FlxSprite(null, 0, 0, false, false, 4, 4, _local5);
_local3.fxLayer.add(_local6);
_local2.add(_local6);
_local4++;
};
super(_arg1.x, _arg1.y, _arg1.width, _arg1.height, _local2, -0.5, -25, 25, -25, 25, 90, 180, 0, 10);
_local3.fxLayer.add(this);
this.reset();
}
}
}//package island.sprite
Section 125
//Spirit (island.sprite.Spirit)
package island.sprite {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.world.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class Spirit extends FlxSprite {
private var yRange:Array;
private var name:String;
private var DetectedSound:Class;
private var ignoringPlayer:Boolean;
private var target:Point;
private var DevouredSound:Class;
private var home:Point;
private var BanishedSound:Class;
private var xRange:Array;
private var parts:FlxArray;
private var seekingPlayer:Boolean;
private var EscapedSound:Class;
var region:Region;
public var awareness:int;
private var stun:Number;
public static const ACCELERATION:int = 100;
private static const AWARENESS_RATIO:Number = 6E-5;
public static const MAX_SPEED:int = 80;
private static const STUN_TIMER:int = 5;
private static const FORGET_RATIO:Number = 1.025;
private static const PART_DENSITY:Number = 0.002;
private static var DeathSound:Class = Spirit_DeathSound;
public function Spirit(_arg1:String, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Array, _arg7:Array, _arg8:Region):void{
DetectedSound = Spirit_DetectedSound;
EscapedSound = Spirit_EscapedSound;
BanishedSound = Spirit_BanishedSound;
DevouredSound = Spirit_DevouredSound;
super(null, _arg4, _arg5, false, false, _arg2, _arg3);
this.home = new Point(_arg4, _arg5);
this.xRange = _arg6;
this.yRange = _arg7;
this.region = _arg8;
this.name = _arg1;
this.stun = 0;
this.parts = new FlxArray();
var _local9:int = ((this.width * this.height) * PART_DENSITY);
FlxG.log(((("Adding " + _local9) + " parts to ") + this.name));
var _local10:int;
while (_local10 < _local9) {
this.parts.push(new SpiritPart(this));
_local10++;
};
this.awareness = ((_arg8.tilemap.width * _arg8.tilemap.height) * AWARENESS_RATIO);
FlxG.log(((this.name + "'s awareness is ") + this.awareness));
this.pickTarget();
this.region.spriteLayer.add(this);
}
public function harm(_arg1:Player, _arg2:FlxSprite=null):void{
if (_arg1.hasKillerTouch){
_arg1.hasKillerTouch = false;
this.die();
} else {
if (_arg1.invulnerable){
this.banish();
} else {
if (_arg1.hasPowerup("amulet")){
_arg1.removePowerup("amulet");
this.banish();
} else {
FlxG.play(DevouredSound);
GameOverState.message = (this.name + " found you");
_arg1.kill();
};
};
};
}
public function die():void{
var self:Spirit;
self = this;
this.ignoringPlayer = true;
this.flicker(0);
this.velocity.x = 0;
this.velocity.y = 0;
this.acceleration.x = 0;
this.acceleration.y = 0;
this.stun = 99999;
Spirit.deathFx(function ():void{
self.kill();
});
}
override public function update():void{
var _local2:Array;
var _local4:FlxArray;
var _local1:Player = (this.region.player as Player);
var _local3:int = Point.distance(new Point(x, y), new Point(_local1.x, _local1.y));
if (!this.region.active){
if (this.seekingPlayer){
FlxG.flash(2281766656, 0.5, null, true);
FlxG.play(EscapedSound);
this.pickTarget();
};
return;
};
if (this.stun > 0){
this.stun = (this.stun - FlxG.elapsed);
if (this.stun > 0){
super.update();
return;
};
this.stun = 0;
FlxG.log((this.name + " is no longer stunned"));
};
if (((((!(this.ignoringPlayer)) && (!(_local1.invulnerable)))) && ((_local3 < (this.awareness + _local1.scent()))))){
if (!this.seekingPlayer){
FlxG.log((this.name + " has sensed player"));
FlxG.play(DetectedSound);
FlxG.flash(4294901760, 0.1, null, true);
FlxG.quake(0.01, 0.5);
this.velocity.x = 0;
this.velocity.y = 0;
this.maxVelocity.x = MAX_SPEED;
this.maxVelocity.y = MAX_SPEED;
this.seekingPlayer = true;
};
this.target.x = this.region.player.x;
this.target.y = this.region.player.y;
} else {
if (((this.seekingPlayer) && ((_local3 > ((this.awareness + _local1.scent()) * FORGET_RATIO))))){
this.seekingPlayer = false;
FlxG.log((this.name + " has lost sight of player"));
FlxG.flash(2281766656, 0.5, null, true);
FlxG.play(EscapedSound);
this.maxVelocity.x = (MAX_SPEED / 2);
this.maxVelocity.y = (MAX_SPEED / 2);
this.pickTarget();
};
};
if (((((!(this.seekingPlayer)) && ((Math.abs((x - this.target.x)) <= width)))) && ((Math.abs((y - this.target.y)) <= height)))){
FlxG.log((this.name + " has reached target"));
this.pickTarget();
};
if (Math.abs((x - this.target.x)) >= MAX_SPEED){
if (x < this.target.x){
this.acceleration.x = ((ACCELERATION * FlxG.elapsed) * 100);
} else {
this.acceleration.x = (0 - ((ACCELERATION * FlxG.elapsed) * 100));
};
};
if (Math.abs((y - this.target.y)) >= MAX_SPEED){
if (y < this.target.y){
this.acceleration.y = ((ACCELERATION * FlxG.elapsed) * 100);
} else {
this.acceleration.y = (0 - ((ACCELERATION * FlxG.elapsed) * 100));
};
};
this.x = Math.max(x, this.xRange[0]);
this.x = Math.min(x, this.xRange[1]);
this.y = Math.max(y, this.yRange[0]);
this.y = Math.min(y, this.yRange[1]);
if (!this.ignoringPlayer){
_local4 = new FlxArray();
_local4.push(this.region.player);
FlxG.overlapArrays(_local4, this.parts, this.harm);
};
super.update();
}
public function banish():void{
FlxG.log(((this.name + " has been banished to ") + this.home.toString()));
this.ignoringPlayer = true;
this.seekingPlayer = false;
this.target.x = this.home.x;
this.target.y = this.home.y;
this.flicker(0);
FlxG.play(BanishedSound);
FlxG.flash(4294967295, 2);
}
private function pickTarget():void{
if (this.ignoringPlayer){
this.ignoringPlayer = false;
this.stun = STUN_TIMER;
FlxG.log((((this.name + " stunned for ") + this.stun) + "s"));
};
if (!this.target){
this.target = new Point();
};
this.target.x = Random.intBetween(this.xRange[0], this.xRange[1]);
this.target.y = Random.intBetween(this.yRange[0], this.yRange[1]);
this.maxVelocity.x = (MAX_SPEED / 2);
this.maxVelocity.y = (MAX_SPEED / 2);
this.flicker(-1);
FlxG.log(((this.name + " now seeks ") + this.target.toString()));
}
override public function kill():void{
var _local1:SpiritPart;
FlxG.log((this.name + " has died"));
for each (_local1 in this.parts) {
_local1.kill();
};
super.kill();
}
public function drift():void{
var _local2:int;
var _local1:Player = (this.region.player as Player);
FlxG.log((this.name + " drifts away"));
this.seekingPlayer = false;
if ((((_local1.x > this.xRange[0])) && ((_local1.x < this.xRange[1])))){
_local2 = ((this.xRange[1] - this.xRange[0]) / 2);
this.x = (_local2 + (_local2 - _local1.x));
};
if ((((_local1.y > this.yRange[0])) && ((_local1.y < this.yRange[1])))){
_local2 = ((this.yRange[1] - this.yRange[0]) / 2);
this.y = (_local2 + (_local2 - _local1.y));
};
if (Math.abs((this.y - _local1.y)) < this.awareness){
if (this.y < _local1.y){
this.y = (this.y - (this.awareness * 1.5));
} else {
this.y = (this.y + (this.awareness * 1.5));
};
};
if (Math.abs((this.x - _local1.x)) < this.awareness){
if (this.x < _local1.x){
this.x = (this.x - (this.awareness * 1.5));
} else {
this.x = (this.x + (this.awareness * 1.5));
};
};
}
override public function flicker(_arg1:Number=1):void{
var _local2:SpiritPart;
for each (_local2 in this.parts) {
_local2.flicker(_arg1);
};
}
public static function deathFx(_arg1:Function=null):void{
var INTERVAL:Number;
var DURATION:Number;
var QUAKE_INTENSITY:Number;
var timeLeft:Number;
var color:uint;
var deathThroe:Function;
var onComplete = _arg1;
deathThroe = function ():void{
timeLeft = (timeLeft - INTERVAL);
color = ((color)==4294967295) ? 4294901760 : 4294967295;
if (timeLeft > 0){
FlxG.quake((QUAKE_INTENSITY * (timeLeft / DURATION)), INTERVAL);
FlxG.flash(color, INTERVAL, deathThroe);
} else {
FlxG.flash(4294967295, 20);
if (onComplete != null){
onComplete();
};
};
};
INTERVAL = 0.05;
DURATION = 2.5;
QUAKE_INTENSITY = 0.1;
timeLeft = DURATION;
color = 4294967295;
FlxG.play(DeathSound);
deathThroe();
}
}
}//package island.sprite
Section 126
//Spirit_BanishedSound (island.sprite.Spirit_BanishedSound)
package island.sprite {
import mx.core.*;
public class Spirit_BanishedSound extends SoundAsset {
}
}//package island.sprite
Section 127
//Spirit_DeathSound (island.sprite.Spirit_DeathSound)
package island.sprite {
import mx.core.*;
public class Spirit_DeathSound extends SoundAsset {
}
}//package island.sprite
Section 128
//Spirit_DetectedSound (island.sprite.Spirit_DetectedSound)
package island.sprite {
import mx.core.*;
public class Spirit_DetectedSound extends SoundAsset {
}
}//package island.sprite
Section 129
//Spirit_DevouredSound (island.sprite.Spirit_DevouredSound)
package island.sprite {
import mx.core.*;
public class Spirit_DevouredSound extends SoundAsset {
}
}//package island.sprite
Section 130
//Spirit_EscapedSound (island.sprite.Spirit_EscapedSound)
package island.sprite {
import mx.core.*;
public class Spirit_EscapedSound extends SoundAsset {
}
}//package island.sprite
Section 131
//SpiritPart (island.sprite.SpiritPart)
package island.sprite {
import flash.geom.*;
import com.adamatomic.flixel.*;
import com.twofoldsecret.utils.*;
public class SpiritPart extends FlxSprite {
private var posOffset:Point;
private var Eye1Image:Class;
private var Wing3Image:Class;
private var Wing1Image:Class;
private var Eye2Image:Class;
private var changeInterval:Number;
private var parent:Spirit;
private var Wing4Image:Class;
private var Wing2Image:Class;
private var changeTimer:Number;
private var Eye3Image:Class;
private var type:String;
private static const TYPES:Array = ["wing", "eye"];
private static const EYE_CHANCE:Number = 0.2;
private static const MAX_CHANGE:Number = 0.25;
public function SpiritPart(_arg1:Spirit){
var _local2:Class;
Wing1Image = SpiritPart_Wing1Image;
Wing2Image = SpiritPart_Wing2Image;
Wing3Image = SpiritPart_Wing3Image;
Wing4Image = SpiritPart_Wing4Image;
Eye1Image = SpiritPart_Eye1Image;
Eye2Image = SpiritPart_Eye2Image;
Eye3Image = SpiritPart_Eye3Image;
this.type = ((Math.random())<EYE_CHANCE) ? "eye" : "wing";
if (this.type == "eye"){
_local2 = (Random.itemFrom([Eye1Image, Eye2Image, Eye3Image]) as Class);
} else {
_local2 = (Random.itemFrom([Wing1Image, Wing2Image, Wing3Image]) as Class);
};
super(_local2, 0, 0, true, true);
this.addAnimation("normal", [0], 1);
this.parent = _arg1;
this.changeInterval = Random.numberBetween(0, MAX_CHANGE);
this.change();
this.parent.region.spriteLayer.add(this);
}
override public function update():void{
this.changeTimer = (this.changeTimer - FlxG.elapsed);
if (this.changeTimer < 0){
this.change();
};
this.x = (this.parent.x + this.posOffset.x);
this.y = (this.parent.y + this.posOffset.y);
this.play("normal");
super.update();
}
private function change():void{
var _local2:Number;
var _local3:Number;
var _local1:int = (Random.choiceOf(1, 2) as int);
this.posOffset = new Point((this.parent.width / 2), (this.parent.height / 2));
if (this.type == "wing"){
if (Math.random() > 0.5){
_local2 = (this.parent.width / 2);
_local3 = (this.parent.height / 4);
} else {
_local2 = (this.parent.width / 4);
_local3 = (this.parent.height / 2);
};
} else {
_local2 = (this.parent.width / 6);
_local3 = (this.parent.height / 6);
};
this.posOffset.x = (this.posOffset.x + Random.numberBetween((0 - _local2), _local2));
this.posOffset.y = (this.posOffset.y + Random.numberBetween((0 - _local3), _local3));
this.facing = (Math.random() > 0.5);
this.scale.x = _local1;
this.scale.y = _local1;
this.changeTimer = this.changeInterval;
}
}
}//package island.sprite
Section 132
//SpiritPart_Eye1Image (island.sprite.SpiritPart_Eye1Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Eye1Image extends BitmapAsset {
}
}//package island.sprite
Section 133
//SpiritPart_Eye2Image (island.sprite.SpiritPart_Eye2Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Eye2Image extends BitmapAsset {
}
}//package island.sprite
Section 134
//SpiritPart_Eye3Image (island.sprite.SpiritPart_Eye3Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Eye3Image extends BitmapAsset {
}
}//package island.sprite
Section 135
//SpiritPart_Wing1Image (island.sprite.SpiritPart_Wing1Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Wing1Image extends BitmapAsset {
}
}//package island.sprite
Section 136
//SpiritPart_Wing2Image (island.sprite.SpiritPart_Wing2Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Wing2Image extends BitmapAsset {
}
}//package island.sprite
Section 137
//SpiritPart_Wing3Image (island.sprite.SpiritPart_Wing3Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Wing3Image extends BitmapAsset {
}
}//package island.sprite
Section 138
//SpiritPart_Wing4Image (island.sprite.SpiritPart_Wing4Image)
package island.sprite {
import mx.core.*;
public class SpiritPart_Wing4Image extends BitmapAsset {
}
}//package island.sprite
Section 139
//Twin (island.sprite.Twin)
package island.sprite {
import com.adamatomic.flixel.*;
import island.state.*;
public class Twin extends Girl {
private var TouchGrantedSound:Class;
private var grantedTouch:Boolean;
private var TwinImage:Class;
public function Twin():void{
TwinImage = Twin_TwinImage;
TouchGrantedSound = Twin_TouchGrantedSound;
super(TwinImage);
this.addAnimation("glow", [0, 1], FPS);
this.grantedTouch = false;
}
override public function update():void{
this.play("glow");
super.update();
}
override public function interrupt(_arg1:Player):void{
var _local2:PlayState = (FlxG.state as PlayState);
var _local3:Array = [];
if (!_local2.player.hasKillerTouch){
while (_local2.textFactory.hasText("twinOffer")) {
_local3.unshift((_local2.textFactory.retrieve("twinOffer") + PROMPT));
};
};
_local2.captionSequence.show(_local3);
this.interrupted = true;
}
override public function kill():void{
var _local1:PlayState = (FlxG.state as PlayState);
if (!this.grantedTouch){
_local1.player.hasKillerTouch = true;
this.grantedTouch = true;
FlxG.play(TouchGrantedSound);
FlxG.flash(4290389451, 4);
};
super.collide(_local1.player);
}
}
}//package island.sprite
Section 140
//Twin_TouchGrantedSound (island.sprite.Twin_TouchGrantedSound)
package island.sprite {
import mx.core.*;
public class Twin_TouchGrantedSound extends SoundAsset {
}
}//package island.sprite
Section 141
//Twin_TwinImage (island.sprite.Twin_TwinImage)
package island.sprite {
import mx.core.*;
public class Twin_TwinImage extends BitmapAsset {
}
}//package island.sprite
Section 142
//ClearState (island.state.ClearState)
package island.state {
import com.adamatomic.flixel.*;
import com.twofoldsecret.ui.*;
import com.twofoldsecret.data.*;
public class ClearState extends FlxState {
private const TITLE:String = "Clear All Data";
private const WARNING:String;
private var TitleDimmedImage:Class;
public function ClearState(){
WARNING = ("Are you sure you want to do this? This will delete all high\n" + "scores as well as names you have entered.");
TitleDimmedImage = ClearState_TitleDimmedImage;
super();
this.add(new FlxSprite(TitleDimmedImage, 0, 0));
this.add(new FlxText(0, 50, FlxG.width, 20, TITLE, 4294967295, null, 16, "center"));
this.add(new FlxText(10, 80, (FlxG.width - 20), 100, WARNING, 4294967295));
this.add(new Button(75, 120, " Clear All ", function ():void{
Storage.clear();
FlxG.switchState(HighScoreState);
}));
this.add(new Button((FlxG.width - 125), 120, "Cancel", function ():void{
FlxG.switchState(HighScoreState);
}));
Cursor.show();
}
}
}//package island.state
Section 143
//ClearState_TitleDimmedImage (island.state.ClearState_TitleDimmedImage)
package island.state {
import mx.core.*;
public class ClearState_TitleDimmedImage extends BitmapAsset {
}
}//package island.state
Section 144
//CreditsState (island.state.CreditsState)
package island.state {
import com.adamatomic.flixel.*;
import com.twofoldsecret.ui.*;
public class CreditsState extends FlxState {
private var FlixelImage:Class;
private var TitleDimmedImage:Class;
private static const SUBHEAD:uint = 4292730333;
private static const NORMAL:uint = 4294967295;
public function CreditsState(){
TitleDimmedImage = CreditsState_TitleDimmedImage;
FlixelImage = CreditsState_FlixelImage;
super();
this.add(new FlxSprite(TitleDimmedImage, 0, 0));
this.add(new FlxText(10, 10, (FlxG.width - 20), 14, "We are:", SUBHEAD));
this.add(new FlxText(40, 30, 110, 28, "Chris Klimas\ncode, text, beeps", NORMAL));
this.add(new FlxText(160, 30, 150, 28, "Joel Haddock\ngraphics, music", NORMAL));
this.add(new FlxText(10, 60, (FlxG.width - 20), 14, "Our grateful acknowledgment to:", SUBHEAD));
this.add(new FlxText(40, 70, (FlxG.width - 50), 36, "Adam Atomic and the Flixel community, for the\nFlixel framework; Tomas Pettersson, for sfxr;\nMartin Sebastian Wain, for FlxInputText", NORMAL));
this.add(new FlxText(10, 110, (FlxG.width - 20), 14, "And our testers:", SUBHEAD));
this.add(new FlxText(40, 130, (FlxG.width - 50), 28, "Austin Auclair, Colin Caret, Dave Chipkin,\nKatie Scarborough, Heather Van De Mark, et al", NORMAL));
this.add(new FlxText(10, 160, (FlxG.width - 20), 14, "Visit us on:", SUBHEAD));
this.add(new Button(40, 180, "The Web", function ():void{
FlxG.openURL("http://twofoldsecret.com/");
}, 200));
this.add(new Button(110, 180, " Facebook ", function ():void{
FlxG.openURL("http://www.facebook.com/pages/Twofold-Secret/288464856345");
}, 200));
this.add(new Button(180, 180, " Twitter ", function ():void{
FlxG.openURL("http://twitter.com/twofoldsecret");
}, 200));
this.add(new Button(260, 220, "OK", function ():void{
StartState.animate = false;
FlxG.switchState(StartState);
}));
Cursor.show();
}
}
}//package island.state
Section 145
//CreditsState_FlixelImage (island.state.CreditsState_FlixelImage)
package island.state {
import mx.core.*;
public class CreditsState_FlixelImage extends BitmapAsset {
}
}//package island.state
Section 146
//CreditsState_TitleDimmedImage (island.state.CreditsState_TitleDimmedImage)
package island.state {
import mx.core.*;
public class CreditsState_TitleDimmedImage extends BitmapAsset {
}
}//package island.state
Section 147
//GameOverState (island.state.GameOverState)
package island.state {
import com.adamatomic.flixel.*;
import com.twofoldsecret.ui.*;
public class GameOverState extends FlxState {
private var TitleDimmedImage:Class;
public static var message:String;
public function GameOverState(){
TitleDimmedImage = GameOverState_TitleDimmedImage;
super();
var y:int = ((FlxG.height - 82) / 2);
var x:int = ((FlxG.width - 120) / 2);
this.add(new FlxSprite(TitleDimmedImage, 0, 0));
this.add(new FlxText(0, y, FlxG.width, 80, GameOverState.message, 4294967295, null, 16, "center"));
this.add(new Button(x, (y + 35), " Play Again ", function ():void{
FlxG.fade(4278190080, 0.75, function ():void{
FlxG.switchState(PlayState);
});
}, 120));
this.add(new Button((x + 70), (y + 35), "Main Menu", function ():void{
StartState.animate = false;
FlxG.switchState(StartState);
}, 120));
FlxG.flash(4278190080, 0.5);
Cursor.show();
}
}
}//package island.state
Section 148
//GameOverState_TitleDimmedImage (island.state.GameOverState_TitleDimmedImage)
package island.state {
import mx.core.*;
public class GameOverState_TitleDimmedImage extends BitmapAsset {
}
}//package island.state
Section 149
//HighScoreState (island.state.HighScoreState)
package island.state {
import com.adamatomic.flixel.*;
import island.data.*;
import com.twofoldsecret.ui.*;
import com.twofoldsecret.data.*;
public class HighScoreState extends FlxState {
private var lastWasRanked:Boolean;
private var WaveSound:Class;
private var TitleDimmedImage:Class;
private static const NUM_RANKED:int = 4;
private static const RANKED:String = "Congratulations! You were fast enough to be ranked.";
private static const TITLE:String = "Best Playthroughs";
private static const SORRY:String = "Sorry, you were not fast enough to be ranked.";
private static const NO_SCORES:String = "You have not completed this game yet.";
public static var lastPlay:HighScore;
public function HighScoreState(){
var i:int;
var score:HighScore;
TitleDimmedImage = HighScoreState_TitleDimmedImage;
WaveSound = HighScoreState_WaveSound;
super();
if (Storage.read("highScores") == null){
Storage.write("highScores", []);
};
var rankedScores:Array = HighScore.deserializeMany((Storage.read("highScores") as Array));
this.lastWasRanked = false;
if (HighScoreState.lastPlay != null){
if (rankedScores.length < NUM_RANKED){
rankedScores.push(HighScoreState.lastPlay);
this.lastWasRanked = true;
} else {
i = 0;
while (i < rankedScores.length) {
if (HighScoreState.lastPlay.betterThan(rankedScores[i])){
rankedScores = rankedScores.splice(i, 0, HighScoreState.lastPlay);
rankedScores = rankedScores.splice(NUM_RANKED);
this.lastWasRanked = true;
break;
};
i = (i + 1);
};
};
Storage.write("highScores", HighScore.serializeMany(rankedScores));
};
this.add(new FlxSprite(TitleDimmedImage, 0, 0));
this.add(new FlxText(0, 20, FlxG.width, 20, TITLE, 4294967295, null, 16, "center"));
var y = 74;
if (HighScoreState.lastPlay != null){
if (this.lastWasRanked){
this.add(new FlxText(10, 52, (FlxG.width - 20), 12, RANKED, 4294967040));
} else {
this.add(new FlxText(10, 52, (FlxG.width - 20), 12, SORRY, 4294967295));
};
};
if (rankedScores.length > 0){
for each (score in rankedScores) {
score.draw(this, 10, y, (score == HighScoreState.lastPlay));
y = (y + HighScore.HEIGHT);
};
} else {
this.add(new FlxText(10, 52, FlxG.width, 12, NO_SCORES, 4294967040));
};
this.add(new FlxText(10, 200, (FlxG.width - 20), 14, Stats.describe(), 4294967295));
this.add(new Button(10, 220, "Main Menu", function ():void{
StartState.animate = false;
FlxG.switchState(StartState);
}, 200));
this.add(new Button(250, 220, " Clear All ", function ():void{
FlxG.switchState(ClearState);
}, 200));
Cursor.show();
}
}
}//package island.state
Section 150
//HighScoreState_TitleDimmedImage (island.state.HighScoreState_TitleDimmedImage)
package island.state {
import mx.core.*;
public class HighScoreState_TitleDimmedImage extends BitmapAsset {
}
}//package island.state
Section 151
//HighScoreState_WaveSound (island.state.HighScoreState_WaveSound)
package island.state {
import mx.core.*;
public class HighScoreState_WaveSound extends SoundAsset {
}
}//package island.state
Section 152
//LeaveState (island.state.LeaveState)
package island.state {
import com.adamatomic.flixel.*;
import flash.utils.*;
import com.twofoldsecret.ui.*;
public class LeaveState extends FlxState {
private var LeaveGirlText:Class;
private var LeaveNoGirlText:Class;
private var textIndex:int;// = 0
private var LeaveNoGirlImage:Class;
private var sourceText:String;
private var text:FlxText;
private var LeaveGirlImage:Class;
private var button:Button;
private var timer:Number;
private var WaveSound:Class;
private static const TEXT_SPEED:Number = 0.05;
private static const INITIAL_DELAY:Number = 3.5;
public static var withGirl:Boolean = true;
public function LeaveState(){
WaveSound = LeaveState_WaveSound;
LeaveGirlImage = LeaveState_LeaveGirlImage;
LeaveNoGirlImage = LeaveState_LeaveNoGirlImage;
LeaveGirlText = LeaveState_LeaveGirlText;
LeaveNoGirlText = LeaveState_LeaveNoGirlText;
var bg:Class = (LeaveState.withGirl) ? LeaveGirlImage : LeaveNoGirlImage;
var text:Class = (LeaveState.withGirl) ? LeaveGirlText : LeaveNoGirlText;
super();
this.textIndex = 0;
this.sourceText = (new (text) as ByteArray).toString();
this.timer = INITIAL_DELAY;
this.text = new FlxText(10, 12, (FlxG.width - 20), 200, "", 4278190080);
this.button = new Button(0xFF, 220, "Main Menu", function ():void{
FlxG.fade(4278190080, 0.75, function ():void{
FlxG.switchState(StartState);
});
}, 200);
this.button.visible = false;
this.add(new FlxSprite(bg, 0, 0));
this.add(this.text);
this.add(this.button);
FlxG.flash(4278190080, 3);
FlxG.setMusic(WaveSound);
FlxG.playMusic();
}
override public function update():void{
if (this.textIndex == this.sourceText.length){
super.update();
return;
};
this.timer = (this.timer - FlxG.elapsed);
if (this.timer <= 0){
this.textIndex = Math.min((this.textIndex + 1), this.sourceText.length);
this.text.setText(this.sourceText.substring(0, this.textIndex));
if ((((((this.textIndex < (this.sourceText.length - 1))) && ((this.sourceText.charAt(this.textIndex) == "\n")))) && ((this.sourceText.charAt((this.textIndex + 1)) == "\n")))){
this.timer = (TEXT_SPEED * 15);
} else {
this.timer = TEXT_SPEED;
};
if (this.textIndex == this.sourceText.length){
this.button.visible = true;
Cursor.show();
};
};
super.update();
}
}
}//package island.state
Section 153
//LeaveState_LeaveGirlImage (island.state.LeaveState_LeaveGirlImage)
package island.state {
import mx.core.*;
public class LeaveState_LeaveGirlImage extends BitmapAsset {
}
}//package island.state
Section 154
//LeaveState_LeaveGirlText (island.state.LeaveState_LeaveGirlText)
package island.state {
import mx.core.*;
public class LeaveState_LeaveGirlText extends ByteArrayAsset {
}
}//package island.state
Section 155
//LeaveState_LeaveNoGirlImage (island.state.LeaveState_LeaveNoGirlImage)
package island.state {
import mx.core.*;
public class LeaveState_LeaveNoGirlImage extends BitmapAsset {
}
}//package island.state
Section 156
//LeaveState_LeaveNoGirlText (island.state.LeaveState_LeaveNoGirlText)
package island.state {
import mx.core.*;
public class LeaveState_LeaveNoGirlText extends ByteArrayAsset {
}
}//package island.state
Section 157
//LeaveState_WaveSound (island.state.LeaveState_WaveSound)
package island.state {
import mx.core.*;
public class LeaveState_WaveSound extends SoundAsset {
}
}//package island.state
Section 158
//NameState (island.state.NameState)
package island.state {
import flash.events.*;
import com.adamatomic.flixel.*;
import com.twofoldsecret.ui.*;
import com.twofoldsecret.data.*;
public class NameState extends FlxState {
private var listenersAdded:Boolean;
private var step:int;
private var PlayerImage:Class;
private var girl:FlxSprite;
private var TitleDimmedImage:Class;
private var player:FlxSprite;
private var BeepSound:Class;
private var prompt:FlxText;
private var button:Button;
private var field:FlxInputText;
private var GirlImage:Class;
private static const PLAYER_PROMPT:String = "You have such a handsome face.
What's your name?";
private static const GIRL_PROMPT:String = "I was never named.
What's the prettiest girl's name you know?";
private static const NAME_LENGTH:int = 12;
public function NameState(){
PlayerImage = NameState_PlayerImage;
GirlImage = NameState_GirlImage;
BeepSound = NameState_BeepSound;
TitleDimmedImage = NameState_TitleDimmedImage;
super();
this.step = 0;
this.listenersAdded = false;
this.player = new FlxSprite(PlayerImage, 75, 100, true, false);
this.player.scale.x = 3;
this.player.scale.y = 3;
this.player.specificFrame(2);
this.girl = new FlxSprite(GirlImage, 60, 100, true, false);
this.girl.scale.x = 2;
this.girl.scale.y = 2;
this.girl.visible = false;
var _local1:int = ((this.player.x + this.player.width) + 12);
var _local2:int = (this.player.y - 16);
this.prompt = new FlxText(_local1, _local2, FlxG.width, 80, PLAYER_PROMPT, 4294967295, null, 8);
this.field = new FlxInputText(_local1, (_local2 + 40), (FlxG.width - 20), 12, "", 4278237952);
this.field.backgroundVisible = false;
this.field.borderVisible = false;
this.field.setMaxLength(NAME_LENGTH);
this.button = new Button((_local1 + 2), (_local2 + 60), "OK", this.advance);
this.add(new FlxSprite(TitleDimmedImage, 0, 0));
this.add(this.player);
this.add(this.girl);
this.add(this.prompt);
this.add(this.field);
this.add(this.button);
this.addListeners();
Cursor.show();
FlxG.log("NameState inited");
}
override public function update():void{
if (this.field.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
Cursor.hide();
} else {
Cursor.show();
};
if (!this.listenersAdded){
this.addListeners();
};
this.field.focus();
super.update();
}
public function advance():void{
if (this.field.getText() == ""){
FlxG.play(BeepSound);
return;
};
if (this.step == 0){
Storage.write("playerName", this.field.getText());
this.player.visible = false;
this.girl.visible = true;
this.prompt.setText(GIRL_PROMPT);
this.field.setText("");
this.step++;
} else {
Storage.write("girlName", this.field.getText());
this.removeListeners();
FlxG.fade(4278190080, 0.75, function ():void{
this.stage.focus = null;
FlxG.switchState(PlayState);
});
};
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if ((((_arg1.charCode == 13)) || ((_arg1.charCode == 10)))){
this.advance();
};
}
private function removeListeners():void{
this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDown);
}
private function addListeners():void{
if (this.stage != null){
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.onKeyDown);
this.listenersAdded = true;
};
}
}
}//package island.state
Section 159
//NameState_BeepSound (island.state.NameState_BeepSound)
package island.state {
import mx.core.*;
public class NameState_BeepSound extends SoundAsset {
}
}//package island.state
Section 160
//NameState_GirlImage (island.state.NameState_GirlImage)
package island.state {
import mx.core.*;
public class NameState_GirlImage extends BitmapAsset {
}
}//package island.state
Section 161
//NameState_PlayerImage (island.state.NameState_PlayerImage)
package island.state {
import mx.core.*;
public class NameState_PlayerImage extends BitmapAsset {
}
}//package island.state
Section 162
//NameState_TitleDimmedImage (island.state.NameState_TitleDimmedImage)
package island.state {
import mx.core.*;
public class NameState_TitleDimmedImage extends BitmapAsset {
}
}//package island.state
Section 163
//PlayState (island.state.PlayState)
package island.state {
import com.adamatomic.flixel.*;
import island.data.*;
import island.sprite.*;
import island.world.*;
import island.item.*;
import com.twofoldsecret.ui.*;
import island.hud.*;
import com.twofoldsecret.utils.*;
public class PlayState extends FlxState {
public var caves:FlxArray;
public var captionSequence:CaptionSequence;
public var endTime:Date;
public var overworld:Overworld;
public var startTime:Date;
public var spiritSonar:SpiritSonar;
public var mapLayer:FlxLayer;
public var lamplight:Lamplight;
public var regions:RegionHistory;
public var hudLayer:FlxLayer;
public var spriteLayer:FlxLayer;
public var textFactory:TextFactory;
public var fxLayer:FlxLayer;
public var pickupCounter:PickupCounter;
public var player:Player;
public var minimap:Minimap;
public var caption:Caption;
public var caveTones:CaveTones;
public var itemLayer:FlxLayer;
public var quickCaption:QuickCaption;
public var ruinsFactory:RuinsFactory;
private static const SHADE_STRENGTH:Object = [1, 3, 5];
public static const EASY:int = 0;
public static const HARD:int = 2;
public static const MEDIUM:int = 1;
public static var difficulty:int;
public function PlayState(){
var _local4:String;
var _local5:int;
super();
this.ruinsFactory = new RuinsFactory();
this.textFactory = new TextFactory();
this.hudLayer = new FlxLayer();
this.fxLayer = new FlxLayer();
this.player = new Player(0, 0, this);
this.regions = new RegionHistory(player);
this.caves = new FlxArray();
var _local1:Array = ["crystalball", "compass", "map"];
var _local2:Array = ["amulet", "shoes", "teleporter", "glasses"];
if (PlayState.difficulty == EASY){
_local1.pop();
};
if (PlayState.difficulty != HARD){
_local2.pop();
};
_local1 = Random.shuffle(_local1);
_local2 = Random.shuffle(_local2);
var _local3:int = SHADE_STRENGTH[PlayState.difficulty];
FlxG.log(("Shade strength is " + _local3));
switch (PlayState.difficulty){
case EASY:
this.overworld = new Overworld(125, 125, 5, 5, 100);
for each (_local4 in _local1) {
this.caves.push(new Cave(_local3, new Powerup(_local4)));
};
_local5 = 0;
while (_local5 < 2) {
this.caves.push(new Cave(_local3, new Powerup(_local2.pop())));
_local5++;
};
this.caves.push(new Cave(_local3, new Girl(), 70, 0, 8));
break;
case MEDIUM:
this.overworld = new Overworld(150, 150, 8, 10, 150);
this.caves.push(new Cave(_local3, new Powerup(_local1.pop())));
this.caves.push(new Cave(_local3, new Powerup(_local2.pop())));
this.caves.push(new Cave(_local3, new Powerup("bluekey")));
_local5 = 0;
while (_local5 < 3) {
this.caves.push(new Cave(_local3, new Letter(0, 0)));
_local5++;
};
this.caves.push(new Cave(_local3, new Powerup(_local2.pop())));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
this.caves.push(new Cave(_local3, new Girl(), 70, 0, 8));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
break;
case HARD:
this.overworld = new Overworld(175, 175, 12, 15, 175);
this.caves.push(new Cave(_local3, new Powerup(_local2.pop())));
this.caves.push(new Cave(_local3, new Powerup(_local1.pop())));
_local5 = 0;
while (_local5 < 2) {
this.caves.push(new Cave(_local3, new Letter(0, 0)));
_local5++;
};
this.caves.push(new Cave(_local3, new Powerup("bluekey")));
this.caves.push(new Cave(_local3, new Powerup(_local2.pop())));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
this.caves.push(new Cave(_local3, new Powerup(_local1.pop())));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
this.caves.push(new Cave(_local3, new Letter(0, 0)));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
this.caves.push(new Cave(_local3, new Powerup("purplekey")));
this.overworld.lockCave((this.caves.length - 1), "bluekey");
this.caves.push(new Cave(_local3, new Letter(0, 0)));
this.overworld.lockCave((this.caves.length - 1), "purplekey");
_local5 = 0;
while (_local5 < 2) {
this.caves.push(new Cave(_local3, new Girl(), 70, 0, 8));
this.overworld.lockCave((this.caves.length - 1), "purplekey");
_local5++;
};
break;
};
FlxG.log((("Populated " + this.caves.length) + " caves"));
this.caption = new Caption(this);
this.quickCaption = new QuickCaption(this);
this.captionSequence = new CaptionSequence(this);
this.spiritSonar = new SpiritSonar(overworld);
this.minimap = new Minimap(overworld);
this.pickupCounter = new PickupCounter(this);
this.lamplight = new Lamplight(this);
this.caveTones = new CaveTones(this);
this.add(regions);
this.add(fxLayer);
this.add(hudLayer);
if (PlayState.difficulty == EASY){
this.minimap.show("player");
};
this.enter(-1);
FlxG.follow(player, 5);
Cursor.hide();
this.quickCaption.show("Move with the arrow keys.");
FlxG.log("PlayState inited");
this.startTime = new Date();
}
public function toHighScore():HighScore{
return (new HighScore(this.startTime, this.endTime, this.player.flowers, this.player.powerups.length, PlayState.difficulty));
}
public function stopTimer():void{
this.endTime = new Date();
}
public function enter(_arg1:Number):void{
if (_arg1 == -1){
FlxG.log("Entering overworld");
this.caveTones.active = false;
this.lamplight.active = false;
this.lamplight.visible = false;
this.spiritSonar.active = true;
this.spiritSonar.visible = true;
this.spiritSonar.reset();
this.minimap.active = true;
this.minimap.visible = true;
this.player.shrink();
this.regions.switchTo(overworld);
FlxG.flash(1442840575, 1.5, null, true);
} else {
FlxG.log(("Entering cave " + _arg1));
FlxG.setMusicVolume(0);
this.caveTones.active = true;
this.caveTones.reset();
this.lamplight.active = true;
this.lamplight.visible = true;
this.spiritSonar.active = false;
this.spiritSonar.visible = false;
this.minimap.active = false;
this.minimap.visible = false;
this.minimap.markVisited(_arg1);
this.player.grow();
this.regions.switchTo(this.caves[_arg1]);
FlxG.flash(4278190080, 0.75, null, true);
};
FlxG.follow(player, 5);
}
}
}//package island.state
Section 164
//StartState (island.state.StartState)
package island.state {
import flash.display.*;
import com.adamatomic.flixel.*;
import com.twofoldsecret.ui.*;
import com.twofoldsecret.data.*;
public class StartState extends FlxState {
private var TitleImage:Class;
private var TitleGirlImage:Class;
private var TitleSkyImage:Class;
private var TitleFlowersImage:Class;
private var TitleGrassImage:Class;
private var TitleSandImage:Class;
private var animated:Array;
private var textLayer:FlxLayer;
private var TitleSeaImage:Class;
private var currentlyAnimating:int;
private var branding:Bitmap;
private var ArmorImage:Class;
private var WaveSound:Class;
private static const BUTTON_X:int = 155;
private static const BUTTON_Y:int = 220;
private static const DIRECTIONS:String = "Choose a difficulty level:";
private static const TITLE:String = "Where We Remain";
private static const SUBTITLE:String = "A Twofold Secret Game";
public static var animate:Boolean = true;
public function StartState():void{
var _local1:int;
WaveSound = StartState_WaveSound;
TitleImage = StartState_TitleImage;
TitleGirlImage = StartState_TitleGirlImage;
TitleSandImage = StartState_TitleSandImage;
TitleSeaImage = StartState_TitleSeaImage;
TitleGrassImage = StartState_TitleGrassImage;
TitleFlowersImage = StartState_TitleFlowersImage;
TitleSkyImage = StartState_TitleSkyImage;
ArmorImage = StartState_ArmorImage;
super();
this.textLayer = new FlxLayer();
FlxG.setMusic(WaveSound);
FlxG.playMusic();
if (StartState.animate){
this.animated = [];
this.animated[0] = new FlxSprite(TitleGirlImage, 0, 0);
this.animated[1] = new FlxSprite(TitleSandImage, 0, 0);
this.animated[2] = new FlxSprite(TitleSeaImage, 0, 0);
this.animated[3] = new FlxSprite(TitleGrassImage, 0, 0);
this.animated[4] = new FlxSprite(TitleFlowersImage, 0, 0);
this.animated[5] = new FlxSprite(TitleSkyImage, 0, 0);
_local1 = 0;
while (_local1 < this.animated.length) {
this.add(this.animated[_local1]);
this.animated[_local1].alpha = 0;
_local1++;
};
this.addTitle();
this.currentlyAnimating = 0;
} else {
this.add(new FlxSprite(TitleImage, 0, 0));
this.addTitle();
this.addUI();
};
this.add(this.textLayer);
FlxG.log("StartState inited");
}
override public function update():void{
var _local1:FlxSprite;
var _local2:Number;
if (StartState.animate){
_local1 = this.animated[this.currentlyAnimating];
_local2 = ((this.currentlyAnimating)==(this.animated.length - 1)) ? 0.3 : 2;
_local1.alpha = (_local1.alpha + (FlxG.elapsed * _local2));
if (_local1.alpha >= 1){
_local1.alpha = 1;
if (this.currentlyAnimating < (this.animated.length - 1)){
this.currentlyAnimating++;
if (this.currentlyAnimating == (this.animated.length - 2)){
this.addUI();
};
} else {
StartState.animate = false;
};
};
};
super.update();
}
private function begin(_arg1:int):void{
var difficulty = _arg1;
PlayState.difficulty = difficulty;
if (((Storage.isSet("playerName")) && (Storage.isSet("girlName")))){
FlxG.fade(4278190080, 0.75, function ():void{
FlxG.switchState(PlayState);
});
} else {
FlxG.switchState(NameState);
};
}
private function addUI():void{
var self:StartState;
self = this;
this.branding = new Bitmap(new ArmorImage().bitmapData);
this.branding.x = 10;
this.branding.y = (BUTTON_Y - 60);
this.addChild(this.branding);
new ShadowText(190, 205, 140, 12, DIRECTIONS, this.textLayer);
this.add(new Button(BUTTON_X, BUTTON_Y, "Beginner", function ():void{
self.begin(PlayState.EASY);
}));
this.add(new Button((BUTTON_X + 55), BUTTON_Y, "Normal", function ():void{
self.begin(PlayState.MEDIUM);
}));
this.add(new Button((BUTTON_X + 110), BUTTON_Y, " Expert ", function ():void{
self.begin(PlayState.HARD);
}));
this.add(new Button(10, (BUTTON_Y - 30), " Records ", function ():void{
HighScoreState.lastPlay = null;
FlxG.switchState(HighScoreState);
}, 200));
this.add(new Button(10, (BUTTON_Y - 15), "Hints", function ():void{
FlxG.openURL("http://armorgames.com/guide/where-we-remain-hints");
}, 200));
this.add(new Button(10, BUTTON_Y, " Credits ", function ():void{
FlxG.switchState(CreditsState);
}, 200));
Cursor.show();
}
private function addTitle():void{
this.add(new FlxText(10, 10, (FlxG.width - 20), 32, TITLE, 4278190080, null, 16));
this.add(new FlxText(10, 32, (FlxG.width - 20), 32, SUBTITLE, 4278190080));
}
}
}//package island.state
Section 165
//StartState_ArmorImage (island.state.StartState_ArmorImage)
package island.state {
import mx.core.*;
public class StartState_ArmorImage extends BitmapAsset {
}
}//package island.state
Section 166
//StartState_TitleFlowersImage (island.state.StartState_TitleFlowersImage)
package island.state {
import mx.core.*;
public class StartState_TitleFlowersImage extends BitmapAsset {
}
}//package island.state
Section 167
//StartState_TitleGirlImage (island.state.StartState_TitleGirlImage)
package island.state {
import mx.core.*;
public class StartState_TitleGirlImage extends BitmapAsset {
}
}//package island.state
Section 168
//StartState_TitleGrassImage (island.state.StartState_TitleGrassImage)
package island.state {
import mx.core.*;
public class StartState_TitleGrassImage extends BitmapAsset {
}
}//package island.state
Section 169
//StartState_TitleImage (island.state.StartState_TitleImage)
package island.state {
import mx.core.*;
public class StartState_TitleImage extends BitmapAsset {
}
}//package island.state
Section 170
//StartState_TitleSandImage (island.state.StartState_TitleSandImage)
package island.state {
import mx.core.*;
public class StartState_TitleSandImage extends BitmapAsset {
}
}//package island.state
Section 171
//StartState_TitleSeaImage (island.state.StartState_TitleSeaImage)
package island.state {
import mx.core.*;
public class StartState_TitleSeaImage extends BitmapAsset {
}
}//package island.state
Section 172
//StartState_TitleSkyImage (island.state.StartState_TitleSkyImage)
package island.state {
import mx.core.*;
public class StartState_TitleSkyImage extends BitmapAsset {
}
}//package island.state
Section 173
//StartState_WaveSound (island.state.StartState_WaveSound)
package island.state {
import mx.core.*;
public class StartState_WaveSound extends SoundAsset {
}
}//package island.state
Section 174
//IReadable (island.utils.IReadable)
package island.utils {
public interface IReadable {
function read():void;
}
}//package island.utils
Section 175
//Cave (island.world.Cave)
package island.world {
import flash.geom.*;
import com.adamatomic.flixel.*;
import flash.utils.*;
import island.sprite.*;
import island.state.*;
import island.utils.*;
import island.item.*;
import com.twofoldsecret.utils.*;
public class Cave extends Region {
public var shades:FlxArray;
private var morphed:Boolean;
public var beacons:FlxArray;
private var GirlSong:Class;
public var ejectingPlayer:Boolean;
public var map:CaveMap;
private var TwinSong:Class;
private static const SAFE_ZONE:Number = 5;
public function Cave(_arg1:int, _arg2:FlxSprite=null, _arg3:int=0, _arg4:Number=0, _arg5:int=0):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:Point;
GirlSong = Cave_GirlSong;
TwinSong = Cave_TwinSong;
if (_arg3 == 0){
_arg3 = (Random.choiceOf(25, 35, 45) as int);
};
if (_arg4 == 0){
_arg4 = (Random.choiceOf(0.3, 0.4, 0.5) as Number);
};
if (_arg5 == 0){
_arg5 = ((Random.choiceOf(1, 5) as Number) * 2);
};
super();
this.map = new CaveMap(_arg3, _arg5, this);
this.tilemap = this.map.tilemap;
this.shades = new FlxArray();
this.beacons = new FlxArray();
this.ejectingPlayer = false;
this.morphed = false;
if (((_arg2) && (!((_arg2 is Girl))))){
_local6 = Math.floor((this.map.height * _arg4));
_local7 = 0;
while (_local7 < _local6) {
_local9 = Random.intBetween(SAFE_ZONE, (this.map.height - SAFE_ZONE));
_local10 = Random.intBetween(this.map.xRange[_local9][0], (this.map.xRange[_local9][1] - 1));
_local11 = this.map.tile2pixel(new Point(_local10, _local9));
this.shades.push(new Shade(_local11.x, _local11.y, _arg1, this));
_local7++;
};
_local8 = Math.floor((this.map.height / 10));
_local7 = 0;
while (_local7 < _local8) {
_local9 = Random.intBetween(SAFE_ZONE, (this.map.height - SAFE_ZONE));
_local10 = Random.intBetween(this.map.xRange[_local9][0], this.map.xRange[_local9][1]);
_local11 = this.map.tile2pixel(new Point(_local10, _local9));
this.beacons.push(new Beacon(_local11.x, _local11.y, this));
_local7++;
};
};
if (_arg2){
_local10 = (this.map.xRange[4][1] - ((this.map.xRange[4][1] - this.map.xRange[4][0]) / 2));
_local11 = this.map.tile2pixel(new Point(_local10, 4));
_arg2.x = _local11.x;
_arg2.y = _local11.y;
this.itemLayer.add(_arg2);
if ((((_arg2 is Powerup)) || ((_arg2 is Girl)))){
this.pickups.push(_arg2);
};
if ((_arg2 is IReadable)){
this.readables.push(_arg2);
};
};
}
private function setMusic():void{
var _local2:FlxSprite;
var _local1:PlayState = (FlxG.state as PlayState);
for each (_local2 in this.pickups) {
if (getQualifiedClassName(_local2) == "island.sprite::Girl"){
FlxG.setMusic(GirlSong);
_local1.caveTones.active = false;
};
if (getQualifiedClassName(_local2) == "island.sprite::Twin"){
FlxG.setMusic(TwinSong);
_local1.caveTones.active = false;
};
};
FlxG.setMusicVolume(0);
FlxG.playMusic();
}
private function morph():void{
var _local2:Girl;
var _local3:FlxSprite;
var _local4:Cave;
var _local5:Powerup;
var _local6:Twin;
var _local1:Player = (this.player as Player);
for each (_local3 in this.pickups) {
if (getQualifiedClassName(_local3) == "island.sprite::Girl"){
_local2 = (_local3 as Girl);
break;
};
};
if (_local2 != null){
if (!_local1.hasPickedFlower){
FlxG.log("Player has never picked a flower, offering raft");
_local2.x = (_local2.x + this.map.tileSize);
_local5 = new Powerup("raft");
_local5.x = (_local2.x - (this.map.tileSize * 3));
_local5.y = _local2.y;
this.pickups.push(_local5);
this.itemLayer.add(_local5);
};
_local2 = null;
for each (_local4 in (FlxG.state as PlayState).caves) {
if (_local4 == this){
} else {
for each (_local3 in _local4.pickups) {
if (getQualifiedClassName(_local3) == "island.sprite::Girl"){
_local2 = (_local3 as Girl);
break;
};
};
if (_local2 != null){
FlxG.log("Replacing girl in other cave with twin");
_local2.visible = false;
_local2.active = false;
_local4.pickups.remove(_local2, true);
_local6 = new Twin();
_local6.x = _local2.x;
_local6.y = _local2.y;
_local4.pickups.push(_local6);
_local4.itemLayer.add(_local6);
};
};
};
};
this.morphed = true;
}
override public function update():void{
var _local3:Shade;
var _local1:Point = this.map.pixelSize();
var _local2:PlayState = (FlxG.state as PlayState);
if (!this.ejectingPlayer){
this.tilemap.collide(this.player);
for each (_local3 in this.shades) {
this.tilemap.collide(_local3);
};
FlxG.collideArray(this.beacons, this.player);
FlxG.collideArrays(this.beacons, this.shades);
};
if (this.player.y > _local1.y){
_local2.enter(-1);
};
super.update();
}
override public function onExit():void{
var _local1:FlxSprite;
for each (_local1 in this.pickups) {
if (getQualifiedClassName(_local1) == "island.sprite::Twin"){
this.pickups.remove(pickups, true);
_local1.exists = false;
};
};
}
override public function onReturn():void{
onEnter();
this.ejectingPlayer = false;
var _local1:Point = this.map.pixelSize();
FlxG.followBounds(0, 0, _local1.x, _local1.y);
this.setMusic();
}
override public function onEnter():void{
var _local1:Point;
if (!this.morphed){
this.morph();
};
_local1 = this.map.pixelSize();
this.player.x = (_local1.x / 2);
this.player.y = (_local1.y - this.player.height);
FlxG.followBounds(0, 0, _local1.x, _local1.y);
this.setMusic();
}
}
}//package island.world
Section 176
//Cave_GirlSong (island.world.Cave_GirlSong)
package island.world {
import mx.core.*;
public class Cave_GirlSong extends SoundAsset {
}
}//package island.world
Section 177
//Cave_TwinSong (island.world.Cave_TwinSong)
package island.world {
import mx.core.*;
public class Cave_TwinSong extends SoundAsset {
}
}//package island.world
Section 178
//CaveMap (island.world.CaveMap)
package island.world {
import com.adamatomic.flixel.*;
public class CaveMap extends Map {
public var xRange:Array;
private var tunnelInset:int;
private var CaveImage:Class;
public static const MIN_WIDTH:int = 7;
public static const TILE_SIZE:Number = 20;
public function CaveMap(_arg1:Number, _arg2:int, _arg3:Region):void{
CaveImage = CaveMap_CaveImage;
super(Math.floor((FlxG.width / CaveMap.TILE_SIZE)), _arg1, _arg3);
this.tunnelInset = _arg2;
this.xRange = [];
this.tileClass = CaveImage;
this.tileSize = 20;
this.wallOffset = 1;
this.tiles = {ground:0, darkness:1};
this.generate();
}
override protected function generate():void{
var _local5:int;
var _local6:int;
var _local1:int;
while (_local1 < this.width) {
this.setTile(_local1, 0, "darkness");
_local1++;
};
this.tunnelInset = 2;
var _local2:int = (this.width - this.tunnelInset);
var _local3 = 1;
var _local4:int = (this.height - 1);
while (_local4 > 0) {
_local5 = ((this.width - _local2) / 2);
_local6 = (_local5 + _local2);
_local5 = (_local5 + _local3);
_local6 = (_local6 + _local3);
this.xRange[_local4] = [_local5, _local6];
_local1 = 0;
while (_local1 < _local5) {
this.setTile(_local1, _local4, "darkness");
_local1++;
};
_local1 = _local6;
while (_local1 < this.width) {
this.setTile(_local1, _local4, "darkness");
_local1++;
};
this.setTile(0, _local4, "darkness");
this.setTile((this.width - 1), _local4, "darkness");
if ((((_local2 > CaveMap.MIN_WIDTH)) && ((Math.random() < 0.09)))){
_local2 = (_local2 - 2);
};
if (Math.random() < 0.3){
_local3 = (_local3 + ((Math.random())>0.5) ? -1 : 1);
_local3 = Math.max((1 - ((this.width - _local2) / 2)), _local3);
_local3 = Math.min((((this.width - _local2) / 2) - 1), _local3);
};
_local4--;
};
super.generate();
}
}
}//package island.world
Section 179
//CaveMap_CaveImage (island.world.CaveMap_CaveImage)
package island.world {
import mx.core.*;
public class CaveMap_CaveImage extends BitmapAsset {
}
}//package island.world
Section 180
//Map (island.world.Map)
package island.world {
import flash.geom.*;
import com.adamatomic.flixel.*;
public class Map {
protected var tiles:Object;
public var width:Number;
var tileSize:Number;
protected var map:Array;
public var height:Number;
protected var tileClass:Class;
public var tilemap:FlxTilemap;
public var region:Region;
protected var wallOffset:Number;
public function Map(_arg1:Number, _arg2:Number, _arg3:Region){
this.width = _arg1;
this.height = _arg2;
this.region = _arg3;
this.erase();
}
public function tile2pixel(_arg1:Point):Point{
return (new Point((_arg1.x * this.tileSize), (_arg1.y * this.tileSize)));
}
protected function toTilemap():FlxTilemap{
var _local3:int;
var _local1 = "";
var _local2:int;
while (_local2 < this.height) {
_local3 = 0;
while (_local3 < this.width) {
_local1 = (_local1 + this.map[_local3][_local2]);
if (_local3 == (this.width - 1)){
_local1 = (_local1 + "\n");
} else {
_local1 = (_local1 + ",");
};
_local3++;
};
_local2++;
};
return (new FlxTilemap(_local1, this.tileClass, this.wallOffset, 0));
}
public function rectOverlaps(_arg1:Rectangle, _arg2:String):Boolean{
var _local4:Point;
var _local5:Point;
var _local3:Array = [new Point(_arg1.x, _arg1.y), new Point((_arg1.x + _arg1.width), _arg1.y), new Point(_arg1.x, (_arg1.y + _arg1.height)), new Point((_arg1.x + _arg1.width), (_arg1.y + _arg1.height))];
for each (_local4 in _local3) {
_local5 = this.pixel2tile(_local4);
if (this.getTile(_local5.x, _local5.y) == this.tiles[_arg2]){
return (true);
};
};
return (false);
}
public function pixel2tile(_arg1:Point):Point{
return (new Point((_arg1.x / this.tileSize), (_arg1.y / this.tileSize)));
}
public function isWall(_arg1:String):Boolean{
return ((this.tiles[_arg1] >= this.wallOffset));
}
public function getTile(_arg1:int, _arg2:int):String{
if ((((((((_arg1 < 0)) || ((_arg1 >= this.width)))) || ((_arg2 < 0)))) || ((_arg2 >= this.height)))){
throw (new Error((((("Bad coordinates (" + _arg1) + ", ") + _arg2) + ")")));
};
return (this.map[_arg1][_arg2]);
}
protected function erase():void{
var _local2:int;
this.map = [];
var _local1:int;
while (_local1 < this.width) {
this.map[_local1] = [];
_local2 = 0;
while (_local2 < this.height) {
this.map[_local1][_local2] = 0;
_local2++;
};
_local1++;
};
}
public function setTile(_arg1:int, _arg2:int, _arg3:String):void{
if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= this.width)))) || ((_arg2 >= this.height)))){
return;
};
this.map[_arg1][_arg2] = this.tiles[_arg3];
}
protected function generate():void{
this.tilemap = this.toTilemap();
this.region.mapLayer.add(this.tilemap);
}
public function pixelSize():Point{
return (new Point((this.width * this.tileSize), (this.height * this.tileSize)));
}
}
}//package island.world
Section 181
//Overworld (island.world.Overworld)
package island.world {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.data.*;
import island.sprite.*;
import island.state.*;
import island.item.*;
public class Overworld extends Region {
public var spirits:FlxArray;
public var doors:FlxArray;
private var WindSound:Class;
private var ShelteredSound:Class;
public var map:OverworldMap;
private static const MAP_HEIGHT:Number = 150;
private static const MAP_WIDTH:Number = 150;
public function Overworld(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
var _local9:int;
var _local10:Point;
ShelteredSound = Overworld_ShelteredSound;
WindSound = Overworld_WindSound;
super();
this.doors = new FlxArray();
this.map = new OverworldMap(_arg1, _arg2, 125, _arg3, this);
this.tilemap = this.map.tilemap;
var _local6:Point = this.map.pixelSize();
var _local7:Point = this.map.pixelSize();
this.map.pixelSize().x = (_local7.x / 2);
_local7.y = (_local7.y / 2);
this.spirits = new FlxArray();
this.spirits.push(new Spirit("Boreas", _arg5, _arg5, _local7.x, 0, [0, _local6.x], [0, _local7.y], this));
this.spirits.push(new Spirit("Notus", _arg5, _arg5, _local7.x, _local6.y, [0, _local6.x], [_local7.y, _local6.y], this));
var _local8 = 100;
_local9 = 0;
while (_local9 < _local8) {
_local10 = this.map.pickupSpot();
this.pickups.push(new Flower(_local10.x, _local10.y, this));
_local9++;
};
_local9 = 0;
while (_local9 < _arg4) {
_local10 = this.map.pickupSpot();
this.readables.push(new Tablet(_local10.x, _local10.y, this));
_local9++;
};
this.readables.push(new Letter((_local7.x - 16), (_local7.y + 48), this, (FlxG.state as PlayState).textFactory.retrieve("startLetter"), (FlxG.state as PlayState).textFactory.retrieve("startTruth")));
this.pickups.push(new Flower((_local7.x + 16), (_local7.y + 48), this));
}
override public function update():void{
var player:Player;
var rect:Rectangle;
var i:int;
var cave:Point;
var yDist:int;
var xDist:int;
var spirit:Spirit;
var state:PlayState = (FlxG.state as PlayState);
player = (this.player as Player);
this.tilemap.collide(player);
FlxG.collideArray(this.doors, player);
if (((!((player.velocity.x == 0))) || (!((player.velocity.y == 0))))){
rect = new Rectangle(player.x, player.y, player.width, player.height);
if (((!(player.invulnerable)) && (this.map.rectOverlaps(rect, "ruinbrick")))){
player.invulnerable = true;
FlxG.play(ShelteredSound);
};
if (((player.invulnerable) && (!(this.map.rectOverlaps(rect, "ruinbrick"))))){
player.invulnerable = false;
};
i = 0;
while (i < this.map.caves.length) {
cave = this.map.tile2pixel(new Point(this.map.caves[i].x, this.map.caves[i].y));
yDist = Math.abs((player.y - cave.y));
xDist = Math.abs((player.x - cave.x));
if ((((yDist < (this.map.tileSize / 2))) && ((xDist < (this.map.tileSize / 2))))){
state.enter(i);
};
i = (i + 1);
};
if (((this.map.bumpingEdge(player)) && (player.hasPowerup("raft")))){
FlxG.log("Player has left island");
player.controllable = false;
player.velocity.x = 0;
player.velocity.y = 0;
FlxG.setMusicVolume(0);
for each (spirit in this.spirits) {
spirit.active = false;
};
FlxG.fade(4278190080, 4, function ():void{
if (player.killedGirl){
Stats.addWin(Stats.ENDINGS.MURDER);
} else {
Stats.addWin(Stats.ENDINGS.ESCAPE);
};
LeaveState.withGirl = !(player.killedGirl);
FlxG.switchState(LeaveState);
});
};
};
super.update();
}
override public function onReturn():void{
var _local2:Spirit;
this.player.y = (this.player.y + (this.map.tileSize / 2));
var _local1:Point = this.map.pixelSize();
FlxG.followBounds(0, 0, _local1.x, _local1.y);
(this.player as Player).resetSpeed();
for each (_local2 in this.spirits) {
_local2.drift();
};
FlxG.setMusic(WindSound);
FlxG.playMusic();
}
override public function onEnter():void{
var _local1:Point = this.map.pixelSize();
this.player.x = (_local1.x / 2);
this.player.y = (_local1.y / 2);
FlxG.followBounds(0, 0, _local1.x, _local1.y);
FlxG.setMusic(WindSound);
FlxG.playMusic();
}
public function lockCave(_arg1:int, _arg2:String):void{
var _local3:Point = this.map.tile2pixel(this.map.caves[_arg1]);
this.doors.push(new Door(_local3.x, _local3.y, _arg2, this));
}
}
}//package island.world
Section 182
//Overworld_ShelteredSound (island.world.Overworld_ShelteredSound)
package island.world {
import mx.core.*;
public class Overworld_ShelteredSound extends SoundAsset {
}
}//package island.world
Section 183
//Overworld_WindSound (island.world.Overworld_WindSound)
package island.world {
import mx.core.*;
public class Overworld_WindSound extends SoundAsset {
}
}//package island.world
Section 184
//OverworldMap (island.world.OverworldMap)
package island.world {
import flash.geom.*;
import com.adamatomic.flixel.*;
import island.state.*;
import com.twofoldsecret.utils.*;
public class OverworldMap extends Map {
public var numCaves:Number;
public var caves:Array;
public var teleportSpots:Array;
public var numPickups:Number;
var pickupSpots:Array;
private var OverworldImage:Class;
public static const CENTER:Number = 5;
public static const SAND_WIDTH:Number = 15;
public static const BORDER:Number = 3;
public function OverworldMap(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Region):void{
OverworldImage = OverworldMap_OverworldImage;
super(_arg1, _arg2, _arg5);
this.tileClass = OverworldImage;
this.tileSize = 16;
this.wallOffset = 4;
this.tiles = {ground:0, sand:1, ruinbrick:2, cave:3, water:4, mountain:5, greenbush:6, redbush:7, ruinstatue:8};
this.numPickups = _arg3;
this.pickupSpots = [];
this.numCaves = _arg4;
this.caves = [];
this.teleportSpots = [];
this.myErase();
this.generate();
}
protected function myErase():void{
var _local2:int;
this.map = [];
var _local1:int;
while (_local1 < this.width) {
this.map[_local1] = [];
_local2 = 0;
while (_local2 < this.height) {
this.mySetTile(_local1, _local2, "ground");
_local2++;
};
_local1++;
};
}
public function mySetTile(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{
if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= this.width)))) || ((_arg2 >= this.height)))){
return;
};
if (this.map[_arg1][_arg2] == this.tiles.cave){
return;
};
if (((_arg4) && (!((this.map[_arg1][_arg2] == this.tiles.ground))))){
return;
};
if (((((this.isWall(_arg3)) && ((Math.abs((_arg1 - (this.width / 2))) < CENTER)))) && ((Math.abs((_arg2 - (this.height / 2))) < CENTER)))){
return;
};
if ((((((_arg3 == "mountain")) && ((Math.abs((_arg1 - (this.width / 2))) < (CENTER * 2))))) && ((Math.abs((_arg2 - (this.height / 2))) < (CENTER * 2))))){
return;
};
if ((((_arg3 == "ground")) && ((((((((_arg1 < SAND_WIDTH)) || ((_arg1 > (this.width - SAND_WIDTH))))) || ((_arg2 < SAND_WIDTH)))) || ((_arg2 > (this.height - SAND_WIDTH))))))){
_arg3 = "sand";
};
super.setTile(_arg1, _arg2, _arg3);
}
private function addMountains():void{
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local1:Date = new Date();
var _local2:int = (this.width * this.height);
var _local3:int = (Math.floor((Math.random() * (_local2 / 200))) + (_local2 / 500));
var _local4:int;
while (_local4 < _local3) {
_local5 = [Random.intBetween(0, this.width), Random.intBetween(0, this.height)];
_local6 = Random.intBetween(3, 20);
_local7 = 1;
if (Math.random() > 0.5){
_local8 = 0;
while (_local8 < _local6) {
_local9 = (_local5[0] + _local8);
_local10 = (_local5[1] - (_local7 / 2));
_local11 = 0;
while (_local11 <= _local7) {
this.mySetTile(_local9, _local10, "mountain");
_local10++;
_local11++;
};
if (Math.random() > 0.5){
if (_local8 < (_local6 / 2)){
_local7 = (_local7 + 3);
} else {
_local7 = (_local7 - 3);
};
};
_local7 = Math.max(_local7, 1);
_local8++;
};
} else {
_local8 = 0;
while (_local8 < _local6) {
_local10 = (_local5[1] + _local8);
_local9 = (_local5[0] - (_local7 / 2));
_local11 = 0;
while (_local11 <= _local7) {
this.mySetTile(_local9, _local10, "mountain");
_local9++;
_local11++;
};
if (Math.random() > 0.5){
if (_local8 < (_local6 / 2)){
_local7 = (_local7 + 3);
} else {
_local7 = (_local7 - 3);
};
};
_local7 = Math.max(_local7, 1);
_local8++;
};
};
_local4++;
};
FlxG.log((((("Added " + _local3) + " mountain lines: ") + (new Date().time - _local1.time)) + "ms"));
}
public function bumpingEdge(_arg1:FlxSprite):Boolean{
var _local2:int = ((BORDER * this.tileSize) + 2);
if ((((_arg1.velocity.x < 0)) && ((_arg1.x < _local2)))){
return (true);
};
if ((((_arg1.velocity.x > 0)) && ((_arg1.x > (this.tilemap.width - (_local2 * 1.25)))))){
return (true);
};
if ((((_arg1.velocity.y < 0)) && ((_arg1.y < _local2)))){
return (true);
};
if ((((_arg1.velocity.y > 0)) && ((_arg1.y > (this.tilemap.height - (_local2 * 1.25)))))){
return (true);
};
return (false);
}
private function addPickupsAndCaves():void{
var _local8:Point;
var _local11:int;
var _local12:Array;
var _local13:Array;
var _local1:Array = [];
var _local2:Array = [];
var _local3:Array = [];
var _local4:Array = [];
var _local5:Boolean;
var _local6:Date = new Date();
var _local7:int;
while (_local7 < this.width) {
_local1[_local7] = [];
_local11 = 0;
while (_local11 < this.height) {
_local1[_local7][_local11] = false;
_local11++;
};
_local7++;
};
_local2.push(new Point(Math.floor((this.width / 2)), Math.floor((this.height / 2))));
while ((_local8 = _local2.pop())) {
_local1[_local8.x][_local8.y] = true;
this.teleportSpots.push(new Point((_local8.x * this.tileSize), (_local8.y * this.tileSize)));
if (this.map[_local8.x][_local8.y] == this.tiles.ground){
_local3.push(new Point((_local8.x * this.tileSize), (_local8.y * this.tileSize)));
};
if ((((((((this.map[_local8.x][(_local8.y - 1)] == this.tiles["mountain"])) && ((this.map[(_local8.x - 1)][(_local8.y - 1)] == this.tiles["mountain"])))) && ((this.map[(_local8.x + 1)][(_local8.y - 1)] == this.tiles["mountain"])))) && ((this.map[_local8.x][(_local8.y - 2)] == this.tiles["mountain"])))){
_local4.push(new Point(_local8.x, (_local8.y - 1)));
};
_local12 = [[(_local8.x - 1), _local8.y], [(_local8.x + 1), _local8.y], [_local8.x, (_local8.y - 1)], [_local8.x, (_local8.y + 1)]];
for each (_local13 in _local12) {
if ((((((((_local13[0] < 0)) || ((_local13[0] >= this.width)))) || ((_local13[1] < 0)))) || ((_local13[1] >= this.height)))){
} else {
if (((!(_local1[_local13[0]][_local13[1]])) && ((this.map[_local13[0]][_local13[1]] < this.wallOffset)))){
_local2.push(new Point(_local13[0], _local13[1]));
};
};
};
};
var _local9:int = Math.floor(((_local3.length - 1) / this.numPickups));
var _local10:int = Math.floor(((_local4.length - 1) / this.numCaves));
_local7 = 0;
while (_local7 < _local3.length) {
this.pickupSpots.push(_local3[_local7]);
_local7 = (_local7 + _local9);
};
_local7 = 0;
while (_local7 < _local4.length) {
this.caves.push(_local4[_local7]);
this.mySetTile(_local4[_local7].x, _local4[_local7].y, "cave");
if (this.caves.length == this.numCaves){
break;
};
_local7 = (_local7 + _local10);
};
FlxG.log((("Pickups and caves added: " + (new Date().time - _local6.time)) + "ms"));
}
private function addBorder():void{
var _local3:int;
var _local1:Date = new Date();
var _local2:int;
while (_local2 < this.width) {
_local3 = 0;
while (_local3 < BORDER) {
this.mySetTile(_local2, _local3, "water");
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < this.width) {
_local3 = (this.height - BORDER);
while (_local3 < this.height) {
this.mySetTile(_local2, _local3, "water");
_local3++;
};
_local2++;
};
_local3 = 0;
while (_local3 < this.height) {
_local2 = 0;
while (_local2 < BORDER) {
this.mySetTile(_local2, _local3, "water");
_local2++;
};
_local3++;
};
_local3 = 0;
while (_local3 < this.height) {
_local2 = (this.width - BORDER);
while (_local2 < this.width) {
this.mySetTile(_local2, _local3, "water");
_local2++;
};
_local3++;
};
FlxG.log((("Ocean border added: " + (new Date().time - _local1.time)) + "ms"));
}
private function addFoliage():void{
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:int;
var _local10:int;
var _local1:Date = new Date();
var _local2:int = ((this.width * this.height) / 35);
var _local3:int;
while (_local3 < _local2) {
_local5 = Math.floor((Math.random() * this.width));
_local6 = Math.floor((Math.random() * this.height));
this.mySetTile(_local5, _local6, ((Math.random())>0.75) ? "redbush" : "greenbush", true);
_local3++;
};
var _local4:int = ((this.width * this.height) / 100);
_local3 = 0;
while (_local3 < _local4) {
_local5 = Random.intBetween(0, this.width);
_local6 = Random.intBetween(0, this.height);
_local7 = Random.intBetween(2, 5);
_local8 = ((Math.random())>0.75) ? "redbush" : "greenbush";
_local9 = 0;
while (_local9 < _local7) {
_local10 = 0;
while (_local10 < _local7) {
if (Math.random() > 0.25){
this.mySetTile((_local5 + _local9), (_local6 + _local10), _local8, true);
};
_local10++;
};
_local9++;
};
_local9 = (_local5 + 1);
while (_local9 < ((_local5 + _local7) - 1)) {
if (Math.random() > 0.25){
this.mySetTile(_local9, (_local6 - 1), _local8, true);
};
if (Math.random() > 0.25){
this.mySetTile(_local9, (_local6 + _local7), _local8, true);
};
_local9++;
};
_local9 = (_local6 + 1);
while (_local9 < ((_local6 + _local7) - 1)) {
if (Math.random() > 0.25){
this.mySetTile((_local5 - 1), _local9, _local8, true);
};
if (Math.random() > 0.25){
this.mySetTile((_local5 + _local7), _local9, _local8, true);
};
_local9++;
};
_local3++;
};
FlxG.log((((((("Added " + _local2) + " trees and ") + _local4) + " groves: ") + (new Date().time - _local1.time)) + "ms"));
}
private function addRuins():void{
var _local4:int;
var _local5:int;
var _local1:Date = new Date();
var _local2:int = ((this.width * this.height) / 5000);
var _local3:int;
while (_local3 < _local2) {
_local4 = Random.intBetween(0, this.width);
_local5 = Random.intBetween(0, this.height);
(FlxG.state as PlayState).ruinsFactory.addRuins(this, _local4, _local5);
_local3++;
};
FlxG.log((((("Added " + _local2) + " ruins: ") + (new Date().time - _local1.time)) + "ms"));
}
override protected function generate():void{
var _local1:Date = new Date();
this.addMountains();
this.addFoliage();
this.addPonds();
this.addRuins();
this.addBorder();
this.addPickupsAndCaves();
super.generate();
FlxG.log((((((("OverworldMap generated, " + this.width) + "x") + this.height) + ": ") + (new Date().time - _local1.time)) + "ms"));
}
public function pickupSpot():Point{
if (this.pickupSpots.length == 0){
throw (new Error("Don't have any pickup spots left"));
};
return (this.pickupSpots.pop());
}
private function addPonds():void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local1:Date = new Date();
var _local2:int = ((this.width * this.height) / 2000);
var _local3:int;
while (_local3 < _local2) {
_local4 = Random.intBetween((SAND_WIDTH * 2), (this.width - (SAND_WIDTH * 2)));
_local5 = Random.intBetween((SAND_WIDTH * 2), (this.height - (SAND_WIDTH * 2)));
_local6 = Random.intBetween(2, 6);
_local7 = 0;
while (_local7 < _local6) {
_local8 = 0;
while (_local8 < _local6) {
this.mySetTile((_local4 + _local7), (_local5 + _local8), "water");
_local8++;
};
_local7++;
};
_local7 = (_local4 - 1);
while (_local7 < ((_local4 + _local6) + 1)) {
this.mySetTile(_local7, (_local5 - 1), "ground");
this.mySetTile(_local7, (_local5 + _local6), "ground");
_local7++;
};
_local7 = (_local5 - 1);
while (_local7 < ((_local5 + _local6) + 1)) {
this.mySetTile((_local4 - 1), _local7, "ground");
this.mySetTile((_local4 + _local6), _local7, "ground");
_local7++;
};
_local3++;
};
FlxG.log((((("Added " + _local2) + " ponds: ") + (new Date().time - _local1.time)) + "ms"));
}
}
}//package island.world
Section 185
//OverworldMap_OverworldImage (island.world.OverworldMap_OverworldImage)
package island.world {
import mx.core.*;
public class OverworldMap_OverworldImage extends BitmapAsset {
}
}//package island.world
Section 186
//Region (island.world.Region)
package island.world {
import com.adamatomic.flixel.*;
import island.utils.*;
public class Region extends FlxLayer {
public var player:FlxSprite;
public var readables:FlxArray;
public var mapLayer:FlxLayer;
public var spriteLayer:FlxLayer;
public var tilemap:FlxTilemap;
public var pickups:FlxArray;
public var itemLayer:FlxLayer;
public function Region(_arg1:FlxSprite=null, _arg2:FlxTilemap=null, _arg3:FlxArray=null, _arg4:FlxArray=null){
this.player = _arg1;
this.tilemap = _arg2;
this.pickups = (_arg3) ? _arg3 : new FlxArray();
this.readables = (_arg4) ? _arg4 : new FlxArray();
this.mapLayer = new FlxLayer();
this.add(mapLayer);
this.itemLayer = new FlxLayer();
this.add(itemLayer);
this.spriteLayer = new FlxLayer();
this.add(spriteLayer);
}
override public function update():void{
FlxG.overlapArray(this.pickups, this.player, function (_arg1:FlxSprite, _arg2:FlxCore):void{
_arg1.kill();
});
FlxG.overlapArray(this.readables, this.player, function (_arg1:IReadable, _arg2:FlxCore):void{
_arg1.read();
});
super.update();
}
public function onReturn():void{
}
public function onEnter():void{
}
public function onExit():void{
}
}
}//package island.world
Section 187
//RegionHistory (island.world.RegionHistory)
package island.world {
import flash.geom.*;
import com.adamatomic.flixel.*;
public class RegionHistory extends FlxLayer {
private var player:FlxSprite;
public var current:Object;
private var states:FlxArray;
public function RegionHistory(_arg1:FlxSprite):void{
this.states = new FlxArray();
this.player = _arg1;
}
public function switchTo(_arg1:Region):void{
var _local2:Object;
if (this.current){
this.current.playerPos = new Point(player.x, player.y);
this.current.region.active = false;
this.current.region.visible = false;
this.current.region.onExit();
};
for each (_local2 in this.states) {
if (_local2.region == _arg1){
this.player.x = _local2.playerPos.x;
this.player.y = _local2.playerPos.y;
this.current = _local2;
_local2.region.active = true;
_local2.region.visible = true;
_local2.region.onReturn();
return;
};
};
_local2 = {playerPos:new Point(), region:_arg1};
this.states.push(_local2);
this.current = _local2;
this.player.velocity.x = 0;
this.player.velocity.y = 0;
add(_arg1);
_arg1.player = this.player;
_arg1.spriteLayer.add(this.player);
_arg1.onEnter();
}
public function currentRegion():Region{
if (this.current){
return (this.current.region);
};
return (null);
}
}
}//package island.world
Section 188
//IAutomationObject (mx.automation.IAutomationObject)
package mx.automation {
import flash.events.*;
public interface IAutomationObject {
function createAutomationIDPart(_arg1:IAutomationObject):Object;
function get automationName():String;
function get showInAutomationHierarchy():Boolean;
function set automationName(_arg1:String):void;
function getAutomationChildAt(_arg1:int):IAutomationObject;
function get automationDelegate():Object;
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 189
//Binding (mx.binding.Binding)
package mx.binding {
import flash.utils.*;
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 disabledRequests:Dictionary;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
private var wrappedFunctionSuccessful:Boolean;
mx_internal var _isEnabled:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){
this.document = _arg1;
this.srcFunc = _arg2;
this.destFunc = _arg3;
this.destString = _arg4;
_isEnabled = true;
isExecuting = false;
isHandlingEvent = false;
hasHadValue = false;
uiComponentWatcher = -1;
BindingManager.addBinding(_arg1, _arg4, this);
}
private function registerDisabledExecute(_arg1:Object):void{
if (_arg1 != null){
disabledRequests = ((disabledRequests)!=null) ? disabledRequests : new Dictionary(true);
disabledRequests[_arg1] = true;
};
}
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 watcherFired(_arg1:Boolean, _arg2:int):void{
var commitEvent = _arg1;
var cloneIndex = _arg2;
if (isHandlingEvent){
return;
};
try {
isHandlingEvent = true;
execute(cloneIndex);
} finally {
isHandlingEvent = false;
};
}
private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{
var _local4:uint;
var _local3:uint = _arg1.length();
if (_local3 == _arg2.length()){
_local4 = 0;
while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) {
_local4++;
};
return ((_local4 == _local3));
//unresolved jump
};
return (false);
}
mx_internal function set isEnabled(_arg1:Boolean):void{
_isEnabled = _arg1;
if (_arg1){
processDisabledRequests();
};
}
private function processDisabledRequests():void{
var _local1:Object;
if (disabledRequests != null){
for (_local1 in disabledRequests) {
execute(_local1);
};
disabledRequests = null;
};
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (!isEnabled){
if (o != null){
registerDisabledExecute(o);
};
return;
};
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
mx_internal function get isEnabled():Boolean{
return (_isEnabled);
}
private function innerExecute():void{
var _local1:Object = 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 190
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "3.4.0.9271";
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 is IBindingClient)) || (_arg1.hasOwnProperty("_bindingsByDestination")))))) && (_arg1._bindingsByDestination))) && (_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 = _arg1.indexOf(".");
var _local3:int = _arg1.indexOf("[");
if (_local2 == _local3){
return (_arg1);
};
var _local4:int = Math.min(_local2, _local3);
if (_local4 == -1){
_local4 = Math.max(_local2, _local3);
};
return (_arg1.substr(0, _local4));
}
public static function setEnabled(_arg1:Object, _arg2:Boolean):void{
var _local3:Array;
var _local4:uint;
var _local5:Binding;
if ((((_arg1 is IBindingClient)) && (_arg1._bindings))){
_local3 = (_arg1._bindings as Array);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
_local5.isEnabled = _arg2;
_local4++;
};
};
}
}
}//package mx.binding
Section 191
//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 = "3.4.0.9271";
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 192
//IBindingClient (mx.binding.IBindingClient)
package mx.binding {
public interface IBindingClient {
}
}//package mx.binding
Section 193
//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 = "3.4.0.9271";
public function ItemPendingError(_arg1:String){
super(_arg1);
}
public function get responders():Array{
return (_responders);
}
public function addResponder(_arg1:IResponder):void{
if (!_responders){
_responders = [];
};
_responders.push(_arg1);
}
}
}//package mx.collections.errors
Section 194
//IFlexContextMenu (mx.controls.IFlexContextMenu)
package mx.controls {
import flash.display.*;
public interface IFlexContextMenu {
function setContextMenu(_arg1:InteractiveObject):void;
function unsetContextMenu(_arg1:InteractiveObject):void;
}
}//package mx.controls
Section 195
//ToolTip (mx.controls.ToolTip)
package mx.controls {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent {
private var textChanged:Boolean;
private var _text:String;
protected var textField:IUITextField;
mx_internal var border:IFlexDisplayObject;
mx_internal static const VERSION:String = "3.4.0.9271";
public static var maxWidth:Number = 300;
public function ToolTip(){
mouseEnabled = false;
}
public function set fontContext(_arg1:IFlexModuleFactory):void{
this.moduleFactory = _arg1;
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
invalidateDisplayList();
};
}
override protected function commitProperties():void{
var _local1:int;
var _local2:TextFormat;
super.commitProperties();
if (((hasFontContextChanged()) && (!((textField == null))))){
_local1 = getChildIndex(DisplayObject(textField));
removeTextField();
createTextField(_local1);
invalidateSize();
textChanged = true;
};
if (textChanged){
_local2 = textField.getTextFormat();
_local2.leftMargin = 0;
_local2.rightMargin = 0;
textField.defaultTextFormat = _local2;
textField.text = _text;
textChanged = false;
};
}
mx_internal function getTextField():IUITextField{
return (textField);
}
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));
};
createTextField(-1);
}
override protected function measure():void{
var _local7:Number;
super.measure();
var _local1:EdgeMetrics = borderMetrics;
var _local2:Number = (_local1.left + getStyle("paddingLeft"));
var _local3:Number = (_local1.top + getStyle("paddingTop"));
var _local4:Number = (_local1.right + getStyle("paddingRight"));
var _local5:Number = (_local1.bottom + getStyle("paddingBottom"));
var _local6:Number = (_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);
}
public function get fontContext():IFlexModuleFactory{
return (moduleFactory);
}
public function set text(_arg1:String):void{
_text = _arg1;
textChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function get text():String{
return (_text);
}
mx_internal function removeTextField():void{
if (textField){
removeChild(DisplayObject(textField));
textField = null;
};
}
mx_internal function createTextField(_arg1:int):void{
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.autoSize = TextFieldAutoSize.LEFT;
textField.mouseEnabled = false;
textField.multiline = true;
textField.selectable = false;
textField.wordWrap = false;
textField.styleName = this;
if (_arg1 == -1){
addChild(DisplayObject(textField));
} else {
addChildAt(DisplayObject(textField), _arg1);
};
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:EdgeMetrics = borderMetrics;
var _local4:Number = (_local3.left + getStyle("paddingLeft"));
var _local5:Number = (_local3.top + getStyle("paddingTop"));
var _local6:Number = (_local3.right + getStyle("paddingRight"));
var _local7:Number = (_local3.bottom + getStyle("paddingBottom"));
var _local8:Number = (_local4 + _local6);
var _local9:Number = (_local5 + _local7);
border.setActualSize(_arg1, _arg2);
textField.move(_local4, _local5);
textField.setActualSize((_arg1 - _local8), (_arg2 - _local9));
}
private function get borderMetrics():EdgeMetrics{
if ((border is IRectangularBorder)){
return (IRectangularBorder(border).borderMetrics);
};
return (EdgeMetrics.EMPTY);
}
}
}//package mx.controls
Section 196
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 197
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.4.0.9271";
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 198
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.0.9271";
}
}//package mx.core
Section 199
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var type:Class;
public var document:Object;
private var _properties:Object;
public var propertiesFactory:Function;
public var id:String;
mx_internal static const VERSION:String = "3.4.0.9271";
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 200
//ContainerGlobals (mx.core.ContainerGlobals)
package mx.core {
import flash.display.*;
import mx.managers.*;
public class ContainerGlobals {
public static var focusedContainer:InteractiveObject;
public static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{
var _local6:IFocusManager;
var _local7:IButton;
var _local3:InteractiveObject = _arg2;
var _local4:InteractiveObject = _arg2;
var _local5:IUIComponent;
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 IContainer)))) && (IContainer(_local4).defaultButton))){
break;
};
};
if (((!((ContainerGlobals.focusedContainer == _local4))) || ((((ContainerGlobals.focusedContainer == null)) && ((_local4 == null)))))){
if (!_local4){
_local4 = InteractiveObject(_local5);
};
if (((_local4) && ((_local4 is IContainer)))){
_local6 = IContainer(_local4).focusManager;
if (!_local6){
return;
};
_local7 = (IContainer(_local4).defaultButton as IButton);
if (_local7){
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = (_local7 as IButton);
} else {
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = null;
};
};
};
}
}
}//package mx.core
Section 201
//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 = "3.4.0.9271";
public function DragSource(){
dataHolder = {};
formatHandlers = {};
_formats = [];
super();
}
public function hasFormat(_arg1:String):Boolean{
var _local2:int = _formats.length;
var _local3:int;
while (_local3 < _local2) {
if (_formats[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function addData(_arg1:Object, _arg2:String):void{
_formats.push(_arg2);
dataHolder[_arg2] = _arg1;
}
public function dataForFormat(_arg1:String):Object{
var _local2:Object = 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 get formats():Array{
return (_formats);
}
}
}//package mx.core
Section 202
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const 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 203
//EmbeddedFont (mx.core.EmbeddedFont)
package mx.core {
public class EmbeddedFont {
private var _fontName:String;
private var _fontStyle:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public function EmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean){
_fontName = _arg1;
_fontStyle = EmbeddedFontRegistry.getFontStyle(_arg2, _arg3);
}
public function get fontStyle():String{
return (_fontStyle);
}
public function get fontName():String{
return (_fontName);
}
}
}//package mx.core
Section 204
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry)
package mx.core {
import flash.utils.*;
import flash.text.*;
public class EmbeddedFontRegistry implements IEmbeddedFontRegistry {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var fonts:Object = {};
private static var instance:IEmbeddedFontRegistry;
public function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory{
var _local4:int;
var _local5:Object;
var _local3:Dictionary = fonts[createFontKey(_arg1)];
if (_local3){
_local4 = _local3[_arg2];
if (_local4){
return (_arg2);
};
for (_local5 in _local3) {
return ((_local5 as IFlexModuleFactory));
};
};
return (null);
}
public function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local5:int;
var _local6:Object;
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (_local4 != null){
delete _local4[_arg2];
_local5 = 0;
for (_local6 in _local4) {
_local5++;
};
if (_local5 == 0){
delete fonts[_local3];
};
};
}
public function getFonts():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in fonts) {
_local1.push(createEmbeddedFont(_local2));
};
return (_local1);
}
public function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (!_local4){
_local4 = new Dictionary(true);
fonts[_local3] = _local4;
};
_local4[_arg2] = 1;
}
public static function registerFonts(_arg1:Object, _arg2:IFlexModuleFactory):void{
var _local4:Object;
var _local5:Object;
var _local6:String;
var _local7:Boolean;
var _local8:Boolean;
var _local3:IEmbeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
for (_local4 in _arg1) {
_local5 = _arg1[_local4];
for (_local6 in _local5) {
if (_local5[_local6] == false){
} else {
if (_local6 == "regular"){
_local7 = false;
_local8 = false;
} else {
if (_local6 == "boldItalic"){
_local7 = true;
_local8 = true;
} else {
if (_local6 == "bold"){
_local7 = true;
_local8 = false;
} else {
if (_local6 == "italic"){
_local7 = false;
_local8 = true;
};
};
};
};
_local3.registerFont(new EmbeddedFont(String(_local4), _local7, _local8), _arg2);
};
};
};
}
public static function getInstance():IEmbeddedFontRegistry{
if (!instance){
instance = new (EmbeddedFontRegistry);
};
return (instance);
}
public static function getFontStyle(_arg1:Boolean, _arg2:Boolean):String{
var _local3:String = FontStyle.REGULAR;
if (((_arg1) && (_arg2))){
_local3 = FontStyle.BOLD_ITALIC;
} else {
if (_arg1){
_local3 = FontStyle.BOLD;
} else {
if (_arg2){
_local3 = FontStyle.ITALIC;
};
};
};
return (_local3);
}
private static function createFontKey(_arg1:EmbeddedFont):String{
return ((_arg1.fontName + _arg1.fontStyle));
}
private static function createEmbeddedFont(_arg1:String):EmbeddedFont{
var _local2:String;
var _local3:Boolean;
var _local4:Boolean;
var _local5:int = endsWith(_arg1, FontStyle.REGULAR);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD_ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, true));
};
_local5 = endsWith(_arg1, FontStyle.ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, true));
};
return (new EmbeddedFont("", false, false));
}
private static function endsWith(_arg1:String, _arg2:String):int{
var _local3:int = _arg1.lastIndexOf(_arg2);
if ((((_local3 > 0)) && (((_local3 + _arg2.length) == _arg1.length)))){
return (_local3);
};
return (-1);
}
}
}//package mx.core
Section 205
//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 = "3.4.0.9271";
}
}//package mx.core
Section 206
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.4.0.9271";
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 207
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.4.0.9271";
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 208
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.4.0.9271";
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 209
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.4.0.9271";
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 210
//FlexTextField (mx.core.FlexTextField)
package mx.core {
import flash.text.*;
import mx.utils.*;
public class FlexTextField extends TextField {
mx_internal static const VERSION:String = "3.4.0.9271";
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 211
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.4.0.9271";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 212
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.0.9271";
}
}//package mx.core
Section 213
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 214
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 215
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
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 setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 216
//IConstraintClient (mx.core.IConstraintClient)
package mx.core {
public interface IConstraintClient {
function setConstraintValue(_arg1:String, _arg2):void;
function getConstraintValue(_arg1:String);
}
}//package mx.core
Section 217
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import flash.media.*;
import flash.text.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 218
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function set cacheHeuristic(_arg1:Boolean):void;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function get cachePolicy():String;
function set id(_arg1:String):void;
function registerEffects(_arg1:Array):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function get descriptor():UIComponentDescriptor;
}
}//package mx.core
Section 219
//IEmbeddedFontRegistry (mx.core.IEmbeddedFontRegistry)
package mx.core {
public interface IEmbeddedFontRegistry {
function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory;
function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function getFonts():Array;
}
}//package mx.core
Section 220
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 221
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 222
//IFlexModule (mx.core.IFlexModule)
package mx.core {
public interface IFlexModule {
function set moduleFactory(_arg1:IFlexModuleFactory):void;
function get moduleFactory():IFlexModuleFactory;
}
}//package mx.core
Section 223
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
import flash.utils.*;
public interface IFlexModuleFactory {
function get preloadedRSLs():Dictionary;
function allowInsecureDomain(... _args):void;
function create(... _args):Object;
function allowDomain(... _args):void;
function info():Object;
}
}//package mx.core
Section 224
//IFontContextComponent (mx.core.IFontContextComponent)
package mx.core {
public interface IFontContextComponent {
function get fontContext():IFlexModuleFactory;
function set fontContext(_arg1:IFlexModuleFactory):void;
}
}//package mx.core
Section 225
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function set imeMode(_arg1:String):void;
function get imeMode():String;
}
}//package mx.core
Section 226
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 227
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 228
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 229
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 230
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 231
//IRepeater (mx.core.IRepeater)
package mx.core {
public interface IRepeater {
function get container():IContainer;
function set startingIndex(_arg1:int):void;
function get startingIndex():int;
function set recycleChildren(_arg1:Boolean):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:IContainer, _arg2:Boolean):void;
function get currentIndex():int;
function get dataProvider():Object;
function set count(_arg1:int):void;
}
}//package mx.core
Section 232
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 233
//IStateClient (mx.core.IStateClient)
package mx.core {
public interface IStateClient {
function get currentState():String;
function set currentState(_arg1:String):void;
}
}//package mx.core
Section 234
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 235
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 236
//ISWFLoader (mx.core.ISWFLoader)
package mx.core {
import flash.geom.*;
public interface ISWFLoader extends ISWFBridgeProvider {
function getVisibleApplicationRect(_arg1:Boolean=false):Rectangle;
function set loadForCompatibility(_arg1:Boolean):void;
function get loadForCompatibility():Boolean;
}
}//package mx.core
Section 237
//ITextFieldFactory (mx.core.ITextFieldFactory)
package mx.core {
import flash.text.*;
public interface ITextFieldFactory {
function createTextField(_arg1:IFlexModuleFactory):TextField;
}
}//package mx.core
Section 238
//IToolTip (mx.core.IToolTip)
package mx.core {
import flash.geom.*;
public interface IToolTip extends IUIComponent {
function set text(_arg1:String):void;
function get screen():Rectangle;
function get text():String;
}
}//package mx.core
Section 239
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
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 set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 240
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 241
//IUITextField (mx.core.IUITextField)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.managers.*;
import flash.text.*;
public interface IUITextField extends IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent {
function replaceText(_arg1:int, _arg2:int, _arg3:String):void;
function get doubleClickEnabled():Boolean;
function get nestLevel():int;
function get caretIndex():int;
function set doubleClickEnabled(_arg1:Boolean):void;
function get maxScrollH():int;
function set nestLevel(_arg1:int):void;
function get numLines():int;
function get scrollH():int;
function setColor(_arg1:uint):void;
function get maxScrollV():int;
function getImageReference(_arg1:String):DisplayObject;
function get scrollV():int;
function get border():Boolean;
function get text():String;
function get styleSheet():StyleSheet;
function getCharBoundaries(_arg1:int):Rectangle;
function get background():Boolean;
function set scrollH(_arg1:int):void;
function getFirstCharInParagraph(_arg1:int):int;
function get type():String;
function replaceSelectedText(_arg1:String):void;
function set borderColor(_arg1:uint):void;
function get alwaysShowSelection():Boolean;
function get sharpness():Number;
function get tabIndex():int;
function get textColor():uint;
function set defaultTextFormat(_arg1:TextFormat):void;
function get condenseWhite():Boolean;
function get displayAsPassword():Boolean;
function get autoSize():String;
function setSelection(_arg1:int, _arg2:int):void;
function set scrollV(_arg1:int):void;
function set useRichTextClipboard(_arg1:Boolean):void;
function get selectionBeginIndex():int;
function get selectable():Boolean;
function set border(_arg1:Boolean):void;
function set multiline(_arg1:Boolean):void;
function set background(_arg1:Boolean):void;
function set embedFonts(_arg1:Boolean):void;
function set text(_arg1:String):void;
function get selectionEndIndex():int;
function set mouseWheelEnabled(_arg1:Boolean):void;
function appendText(_arg1:String):void;
function get antiAliasType():String;
function set styleSheet(_arg1:StyleSheet):void;
function set nonInheritingStyles(_arg1:Object):void;
function set textColor(_arg1:uint):void;
function get wordWrap():Boolean;
function getLineIndexAtPoint(_arg1:Number, _arg2:Number):int;
function get htmlText():String;
function set tabIndex(_arg1:int):void;
function get thickness():Number;
function getLineIndexOfChar(_arg1:int):int;
function get bottomScrollV():int;
function set restrict(_arg1:String):void;
function set alwaysShowSelection(_arg1:Boolean):void;
function getTextFormat(_arg1:int=-1, _arg2:int=-1):TextFormat;
function set sharpness(_arg1:Number):void;
function set type(_arg1:String):void;
function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void;
function set gridFitType(_arg1:String):void;
function getUITextFormat():UITextFormat;
function set inheritingStyles(_arg1:Object):void;
function setFocus():void;
function get borderColor():uint;
function set condenseWhite(_arg1:Boolean):void;
function get textWidth():Number;
function getLineOffset(_arg1:int):int;
function set displayAsPassword(_arg1:Boolean):void;
function set autoSize(_arg1:String):void;
function get defaultTextFormat():TextFormat;
function get useRichTextClipboard():Boolean;
function get nonZeroTextHeight():Number;
function set backgroundColor(_arg1:uint):void;
function get embedFonts():Boolean;
function set selectable(_arg1:Boolean):void;
function get multiline():Boolean;
function set maxChars(_arg1:int):void;
function get textHeight():Number;
function get nonInheritingStyles():Object;
function getLineText(_arg1:int):String;
function set focusRect(_arg1:Object):void;
function get mouseWheelEnabled():Boolean;
function get restrict():String;
function getParagraphLength(_arg1:int):int;
function set mouseEnabled(_arg1:Boolean):void;
function get gridFitType():String;
function get inheritingStyles():Object;
function set ignorePadding(_arg1:Boolean):void;
function set antiAliasType(_arg1:String):void;
function get backgroundColor():uint;
function getCharIndexAtPoint(_arg1:Number, _arg2:Number):int;
function set tabEnabled(_arg1:Boolean):void;
function get maxChars():int;
function get focusRect():Object;
function get ignorePadding():Boolean;
function get mouseEnabled():Boolean;
function get length():int;
function set wordWrap(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function set thickness(_arg1:Number):void;
function getLineLength(_arg1:int):int;
function truncateToFit(_arg1:String=null):Boolean;
function set htmlText(_arg1:String):void;
function getLineMetrics(_arg1:int):TextLineMetrics;
function getStyle(_arg1:String);
}
}//package mx.core
Section 242
//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 243
//ResourceModuleRSLItem (mx.core.ResourceModuleRSLItem)
package mx.core {
import flash.events.*;
import mx.events.*;
import mx.resources.*;
public class ResourceModuleRSLItem extends RSLItem {
mx_internal static const VERSION:String = "3.4.0.9271";
public function ResourceModuleRSLItem(_arg1:String){
super(_arg1);
}
private function resourceErrorHandler(_arg1:ResourceEvent):void{
var _local2:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);
_local2.text = _arg1.errorText;
super.itemErrorHandler(_local2);
}
override public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:IResourceManager = ResourceManager.getInstance();
var _local7:IEventDispatcher = _local6.loadResourceModule(url);
_local7.addEventListener(ResourceEvent.PROGRESS, itemProgressHandler);
_local7.addEventListener(ResourceEvent.COMPLETE, itemCompleteHandler);
_local7.addEventListener(ResourceEvent.ERROR, resourceErrorHandler);
}
}
}//package mx.core
Section 244
//RSLItem (mx.core.RSLItem)
package mx.core {
import flash.events.*;
import flash.display.*;
import mx.events.*;
import flash.system.*;
import flash.net.*;
import mx.utils.*;
public class RSLItem {
protected var chainedSecurityErrorHandler:Function;
public var total:uint;// = 0
public var loaded:uint;// = 0
private var completed:Boolean;// = false
protected var chainedRSLErrorHandler:Function;
protected var chainedIOErrorHandler:Function;
protected var chainedCompleteHandler:Function;
private var errorText:String;
protected var chainedProgressHandler:Function;
public var urlRequest:URLRequest;
public var rootURL:String;
protected var url:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public function RSLItem(_arg1:String, _arg2:String=null){
this.url = _arg1;
this.rootURL = _arg2;
}
public function itemProgressHandler(_arg1:ProgressEvent):void{
loaded = _arg1.bytesLoaded;
total = _arg1.bytesTotal;
if (chainedProgressHandler != null){
chainedProgressHandler(_arg1);
};
}
public function itemErrorHandler(_arg1:ErrorEvent):void{
errorText = decodeURI(_arg1.text);
completed = true;
loaded = 0;
total = 0;
trace(errorText);
if ((((_arg1.type == IOErrorEvent.IO_ERROR)) && (!((chainedIOErrorHandler == null))))){
chainedIOErrorHandler(_arg1);
} else {
if ((((_arg1.type == SecurityErrorEvent.SECURITY_ERROR)) && (!((chainedSecurityErrorHandler == null))))){
chainedSecurityErrorHandler(_arg1);
} else {
if ((((_arg1.type == RSLEvent.RSL_ERROR)) && (!((chainedRSLErrorHandler == null))))){
chainedRSLErrorHandler(_arg1);
};
};
};
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:Loader = new Loader();
var _local7:LoaderContext = new LoaderContext();
urlRequest = new URLRequest(LoaderUtil.createAbsoluteURL(rootURL, url));
_local6.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, itemProgressHandler);
_local6.contentLoaderInfo.addEventListener(Event.COMPLETE, itemCompleteHandler);
_local6.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, itemErrorHandler);
_local6.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, itemErrorHandler);
_local7.applicationDomain = ApplicationDomain.currentDomain;
_local6.load(urlRequest, _local7);
}
public function itemCompleteHandler(_arg1:Event):void{
completed = true;
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
}
}
}//package mx.core
Section 245
//RSLListLoader (mx.core.RSLListLoader)
package mx.core {
import flash.events.*;
public class RSLListLoader {
private var chainedSecurityErrorHandler:Function;
private var chainedIOErrorHandler:Function;
private var rslList:Array;
private var chainedRSLErrorHandler:Function;
private var chainedCompleteHandler:Function;
private var currentIndex:int;// = 0
private var chainedProgressHandler:Function;
mx_internal static const VERSION:String = "3.4.0.9271";
public function RSLListLoader(_arg1:Array){
rslList = [];
super();
this.rslList = _arg1;
}
private function loadNext():void{
if (!isDone()){
currentIndex++;
if (currentIndex < rslList.length){
rslList[currentIndex].load(chainedProgressHandler, listCompleteHandler, listIOErrorHandler, listSecurityErrorHandler, chainedRSLErrorHandler);
};
};
}
public function getIndex():int{
return (currentIndex);
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
currentIndex = -1;
loadNext();
}
private function listCompleteHandler(_arg1:Event):void{
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
loadNext();
}
public function isDone():Boolean{
return ((currentIndex >= rslList.length));
}
private function listSecurityErrorHandler(_arg1:Event):void{
if (chainedSecurityErrorHandler != null){
chainedSecurityErrorHandler(_arg1);
};
}
public function getItemCount():int{
return (rslList.length);
}
public function getItem(_arg1:int):RSLItem{
if ((((_arg1 < 0)) || ((_arg1 >= rslList.length)))){
return (null);
};
return (rslList[_arg1]);
}
private function listIOErrorHandler(_arg1:Event):void{
if (chainedIOErrorHandler != null){
chainedIOErrorHandler(_arg1);
};
}
}
}//package mx.core
Section 246
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 247
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.0.9271";
}
}//package mx.core
Section 248
//SWFBridgeGroup (mx.core.SWFBridgeGroup)
package mx.core {
import flash.events.*;
import flash.utils.*;
import mx.managers.*;
public class SWFBridgeGroup implements ISWFBridgeGroup {
private var _parentBridge:IEventDispatcher;
private var _childBridges:Dictionary;
private var _groupOwner:ISystemManager;
mx_internal static const VERSION:String = "3.4.0.9271";
public function SWFBridgeGroup(_arg1:ISystemManager){
_groupOwner = _arg1;
}
public function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider{
if (!_childBridges){
return (null);
};
return (ISWFBridgeProvider(_childBridges[_arg1]));
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
var _local2:Object;
if (((!(_childBridges)) || (!(_arg1)))){
return;
};
for (_local2 in _childBridges) {
if (_local2 == _arg1){
delete _childBridges[_local2];
};
};
}
public function get parentBridge():IEventDispatcher{
return (_parentBridge);
}
public function containsBridge(_arg1:IEventDispatcher):Boolean{
var _local2:Object;
if (((parentBridge) && ((parentBridge == _arg1)))){
return (true);
};
for (_local2 in _childBridges) {
if (_arg1 == _local2){
return (true);
};
};
return (false);
}
public function set parentBridge(_arg1:IEventDispatcher):void{
_parentBridge = _arg1;
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void{
if (!_childBridges){
_childBridges = new Dictionary();
};
_childBridges[_arg1] = _arg2;
}
public function getChildBridges():Array{
var _local2:Object;
var _local1:Array = [];
for (_local2 in _childBridges) {
_local1.push(_local2);
};
return (_local1);
}
}
}//package mx.core
Section 249
//TextFieldFactory (mx.core.TextFieldFactory)
package mx.core {
import flash.utils.*;
import flash.text.*;
public class TextFieldFactory implements ITextFieldFactory {
private var textFields:Dictionary;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var instance:ITextFieldFactory;
public function TextFieldFactory(){
textFields = new Dictionary(true);
super();
}
public function createTextField(_arg1:IFlexModuleFactory):TextField{
var _local4:Object;
var _local2:TextField;
var _local3:Dictionary = textFields[_arg1];
if (_local3){
for (_local4 in _local3) {
_local2 = TextField(_local4);
break;
};
};
if (!_local2){
if (_arg1){
_local2 = TextField(_arg1.create("flash.text.TextField"));
} else {
_local2 = new TextField();
};
if (!_local3){
_local3 = new Dictionary(true);
};
_local3[_local2] = 1;
textFields[_arg1] = _local3;
};
return (_local2);
}
public static function getInstance():ITextFieldFactory{
if (!instance){
instance = new (TextFieldFactory);
};
return (instance);
}
}
}//package mx.core
Section 250
//UIComponent (mx.core.UIComponent)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import mx.modules.*;
import mx.resources.*;
import mx.managers.*;
import flash.text.*;
import mx.automation.*;
import mx.controls.*;
import mx.states.*;
import mx.effects.*;
import mx.graphics.*;
import mx.binding.*;
import mx.utils.*;
import mx.validators.*;
public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener, IStateClient, IConstraintClient {
private var cachedEmbeddedFont:EmbeddedFont;// = null
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 _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;
mx_internal var overlayReferenceCount:int;// = 0
private var hasFontContextBeenSaved:Boolean;// = false
private var _repeaterIndices:Array;
private var oldExplicitWidth:Number;
mx_internal var _descriptor:UIComponentDescriptor;
private var _initialized:Boolean;// = false
private var _focusEnabled:Boolean;// = true
private var cacheAsBitmapCount:int;// = 0
private var requestedCurrentState:String;
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
mx_internal var invalidateSizeFlag:Boolean;// = false
private var _scaleX:Number;// = 1
private var _scaleY:Number;// = 1
private var _styleDeclaration:CSSStyleDeclaration;
private var _resourceManager:IResourceManager;
mx_internal var _affectedProperties:Object;
mx_internal var _documentDescriptor:UIComponentDescriptor;
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 _explicitWidth:Number;
private var _enabled:Boolean;// = false
public var states:Array;
private var _mouseFocusEnabled:Boolean;// = true
private var oldHeight:Number;// = 0
private var _currentStateChanged:Boolean;
private var cachedTextFormat:UITextFormat;
mx_internal var _height:Number;
private var _automationDelegate:IAutomationObject;
private var _percentWidth:Number;
private var _automationName:String;// = null
private var _isEffectStarted:Boolean;// = false
private var _styleName:Object;
private var lastUnscaledWidth:Number;
mx_internal var _document:Object;
mx_internal var _errorString:String;// = ""
private var oldExplicitHeight:Number;
private var _nestLevel:int;// = 0
private var _systemManagerDirty:Boolean;// = false
private var _explicitHeight:Number;
mx_internal var _toolTip:String;
private var _filters:Array;
private var _focusPane:Sprite;
private var playStateTransition:Boolean;// = true
private var _nonInheritingStyles:Object;
private var _showInAutomationHierarchy:Boolean;// = true
private var _moduleFactory:IFlexModuleFactory;
private var preventDrawFocus:Boolean;// = false
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;
mx_internal var _explicitMinWidth:Number;
private var lastUnscaledHeight:Number;
mx_internal var _explicitMaxWidth:Number;
private var _measuredMinHeight:Number;// = 0
private var _uid:String;
private var _currentTransitionEffect:IEffect;
private var _updateCompletePendingFlag:Boolean;// = false
private var oldMinHeight:Number;
private var _flexContextMenu:IFlexContextMenu;
mx_internal var _explicitMinHeight:Number;
private var _percentHeight:Number;
private var oldEmbeddedFontContext:IFlexModuleFactory;// = null
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 = "3.4.0.9271";
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");
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
public function UIComponent(){
methodQueue = [];
_resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
states = [];
transitions = [];
_effectsStarted = [];
_affectedProperties = {};
_endingEffectInstances = [];
super();
focusRect = false;
tabEnabled = (this is IFocusManagerComponent);
tabChildren = false;
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);
};
resourcesChanged();
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
_width = super.width;
_height = super.height;
}
override public function get filters():Array{
return ((_filters) ? _filters : super.filters);
}
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 _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
if (!_arg1){
_arg1 = this;
};
if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){
return;
};
var _local2:IFocusManager = focusManager;
if (!_local2){
return;
};
var _local3:IFlexDisplayObject = 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 IProgrammaticSkin)){
IProgrammaticSkin(_local3).validateNow();
};
};
};
}
mx_internal function setUnscaledWidth(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleX));
if (_explicitWidth == _local2){
return;
};
if (!isNaN(_local2)){
_percentWidth = NaN;
};
_explicitWidth = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
private function isOnDisplayList():Boolean{
var p:DisplayObjectContainer;
try {
p = (_parent) ? _parent : super.parent;
} catch(e:SecurityError) {
return (true);
};
return ((p) ? true : false);
}
public function set nestLevel(_arg1:int):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:ILayoutManagerClient;
var _local6:IUITextField;
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 IUITextField);
if (_local6){
_local6.nestLevel = (_arg1 + 1);
};
};
_local4++;
};
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function callLaterDispatcher(_arg1:Event):void{
var callLaterErrorEvent:DynamicEvent;
var event = _arg1;
UIComponentGlobals.callLaterDispatcherCount++;
if (!UIComponentGlobals.catchCallLaterExceptions){
callLaterDispatcher2(event);
} else {
try {
callLaterDispatcher2(event);
} catch(e:Error) {
callLaterErrorEvent = new DynamicEvent("callLaterError");
callLaterErrorEvent.error = e;
systemManager.dispatchEvent(callLaterErrorEvent);
};
};
UIComponentGlobals.callLaterDispatcherCount--;
}
public function getStyle(_arg1:String){
return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]);
}
final mx_internal function get $width():Number{
return (super.width);
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _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 = [];
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;
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function get errorString():String{
return (_errorString);
}
mx_internal function setUnscaledHeight(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleY));
if (_explicitHeight == _local2){
return;
};
if (!isNaN(_local2)){
_percentHeight = NaN;
};
_explicitHeight = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
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 getVisibleRect(_arg1:DisplayObject=null):Rectangle{
if (!_arg1){
_arg1 = DisplayObject(systemManager);
};
var _local2:DisplayObject = ($parent) ? $parent : parent;
if (!_local2){
return (new Rectangle());
};
var _local3:Point = new Point(x, y);
_local3 = _local2.localToGlobal(_local3);
var _local4:Rectangle = new Rectangle(_local3.x, _local3.y, width, height);
var _local5:DisplayObject = this;
var _local6:Rectangle = new Rectangle();
do {
if ((_local5 is UIComponent)){
if (UIComponent(_local5).$parent){
_local5 = UIComponent(_local5).$parent;
} else {
_local5 = UIComponent(_local5).parent;
};
} else {
_local5 = _local5.parent;
};
if (((_local5) && (_local5.scrollRect))){
_local6 = _local5.scrollRect.clone();
_local3 = _local5.localToGlobal(_local6.topLeft);
_local6.x = _local3.x;
_local6.y = _local3.y;
_local4 = _local4.intersection(_local6);
};
} while (((_local5) && (!((_local5 == _arg1)))));
return (_local4);
}
public function invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((isOnDisplayList()) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
};
}
mx_internal function initThemeColor():Boolean{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Array;
var _local7:int;
var _local8:CSSStyleDeclaration;
var _local1:Object = _styleName;
if (_styleDeclaration){
_local2 = _styleDeclaration.getStyle("themeColor");
_local3 = _styleDeclaration.getStyle("rollOverColor");
_local4 = _styleDeclaration.getStyle("selectionColor");
};
if ((((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_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 === null)) || (!(StyleManager.isValidStyleValue(_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 === null))) && (StyleManager.isValidStyleValue(_local2)))){
break;
};
_local7++;
};
};
if (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
return (true);
};
return (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (!(isNaN(_local3))))) && (!(isNaN(_local4)))));
}
override public function get scaleX():Number{
return (_scaleX);
}
public function get uid():String{
if (!_uid){
_uid = toString();
};
return (_uid);
}
override public function get mouseX():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseX] === undefined)))){
return (super.mouseX);
};
return (globalToLocal(new Point(root[fakeMouseX], 0)).x);
}
override public function stopDrag():void{
super.stopDrag();
invalidateProperties();
dispatchEvent(new Event("xChanged"));
dispatchEvent(new Event("yChanged"));
}
public function get focusPane():Sprite{
return (_focusPane);
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
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 get isDocument():Boolean{
return ((document == this));
}
public function set validationSubField(_arg1:String):void{
_validationSubField = _arg1;
}
override public function get scaleY():Number{
return (_scaleY);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function createInFontContext(_arg1:Class):Object{
hasFontContextBeenSaved = true;
var _local2:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local3:String = getStyle("fontWeight");
var _local4:String = getStyle("fontStyle");
var _local5 = (_local3 == "bold");
var _local6 = (_local4 == "italic");
oldEmbeddedFontContext = getFontContext(_local2, _local5, _local6);
var _local7:Object = createInModuleContext((oldEmbeddedFontContext) ? oldEmbeddedFontContext : moduleFactory, getQualifiedClassName(_arg1));
if (_local7 == null){
_local7 = new (_arg1);
};
return (_local7);
}
public function get screen():Rectangle{
var _local1:ISystemManager = systemManager;
return ((_local1) ? _local1.screen : null);
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus(DisplayObject(_arg1.target))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
};
ContainerGlobals.checkFocus(_arg1.relatedObject, this);
};
}
public function hasFontContextChanged():Boolean{
if (!hasFontContextBeenSaved){
return (false);
};
var _local1:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local2:String = getStyle("fontWeight");
var _local3:String = getStyle("fontStyle");
var _local4 = (_local2 == "bold");
var _local5 = (_local3 == "italic");
var _local6:EmbeddedFont = getEmbeddedFont(_local1, _local4, _local5);
var _local7:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(_local6, moduleFactory);
return (!((_local7 == oldEmbeddedFontContext)));
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
override public function get visible():Boolean{
return (_visible);
}
mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{
if (!overlay){
overlayColor = _arg1;
overlay = new UIComponent();
overlay.name = "overlay";
overlay.$visible = true;
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));
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set explicitMinHeight(_arg1:Number):void{
if (_explicitMinHeight == _arg1){
return;
};
_explicitMinHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinHeightChanged"));
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
mx_internal function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function stylesInitialized():void{
}
public function set errorString(_arg1:String):void{
var _local2:String = _errorString;
_errorString = _arg1;
ToolTipManager.registerErrorString(this, _local2, _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;
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
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"));
}
public function set uid(_arg1:String):void{
this._uid = _arg1;
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
if (automationDelegate){
return (automationDelegate.createAutomationIDPart(_arg1));
};
return (null);
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
if (automationDelegate){
return (automationDelegate.getAutomationChildAt(_arg1));
};
return (null);
}
mx_internal function get isEffectStarted():Boolean{
return (_isEffectStarted);
}
override public function get parent():DisplayObjectContainer{
try {
return ((_parent) ? _parent : super.parent);
} catch(e:SecurityError) {
};
return (null);
}
override public function get mouseY():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseY] === undefined)))){
return (super.mouseY);
};
return (globalToLocal(new Point(0, root[fakeMouseY])).y);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
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();
};
}
private function focusObj_resizeHandler(_arg1:ResizeEvent):void{
adjustFocusRect();
}
mx_internal function adjustSizesForScaleChanges():void{
var _local3:Number;
var _local1:Number = scaleX;
var _local2:Number = 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.mask = null;
_focusPane = null;
};
}
public function determineTextFormatFromStyles():UITextFormat{
var _local2:String;
var _local1:UITextFormat = cachedTextFormat;
if (!_local1){
_local2 = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ",");
_local1 = new UITextFormat(getNonNullSystemManager(), _local2);
_local1.moduleFactory = moduleFactory;
_local1.align = _inheritingStyles.textAlign;
_local1.bold = (_inheritingStyles.fontWeight == "bold");
_local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor;
_local1.font = _local2;
_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 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);
}
private function focusObj_scrollHandler(_arg1:Event):void{
adjustFocusRect();
}
final mx_internal function get $x():Number{
return (super.x);
}
final mx_internal function get $y():Number{
return (super.y);
}
public function setConstraintValue(_arg1:String, _arg2):void{
setStyle(_arg1, _arg2);
}
protected function resourcesChanged():void{
}
public function registerEffects(_arg1:Array):void{
var _local4:String;
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]);
if (((!((_local4 == null))) && (!((_local4 == ""))))){
addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
_local3++;
};
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
private function filterChangeHandler(_arg1:Event):void{
super.filters = _filters;
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function set explicitHeight(_arg1:Number):void{
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
override public function set x(_arg1:Number):void{
if (super.x == _arg1){
return;
};
super.x = _arg1;
invalidateProperties();
dispatchEvent(new Event("xChanged"));
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
_showInAutomationHierarchy = _arg1;
}
override public function set y(_arg1:Number):void{
if (super.y == _arg1){
return;
};
super.y = _arg1;
invalidateProperties();
dispatchEvent(new Event("yChanged"));
}
private function resourceManager_changeHandler(_arg1:Event):void{
resourcesChanged();
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
_systemManagerDirty = false;
}
mx_internal function getFocusObject():DisplayObject{
var _local1:IFocusManager = focusManager;
if (((!(_local1)) || (!(_local1.focusPane)))){
return (null);
};
return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0));
}
public function set percentWidth(_arg1:Number):void{
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2:DisplayObjectContainer = _arg1.parent;
if (((_local2) && (!((_local2 is Loader))))){
_local2.removeChild(_arg1);
};
var _local3:int = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren;
addingChild(_arg1);
$addChildAt(_arg1, _local3);
childAdded(_arg1);
return (_arg1);
}
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;
if ((_local2 is String)){
_local2 = parseInt(String(_arg1));
} else {
_local2 = Number(_arg1);
};
if (isNaN(_local2)){
_local2 = StyleManager.getColorName(_arg1);
};
var _local3:Number = ColorUtil.adjustBrightness2(_local2, 50);
var _local4:Number = ColorUtil.adjustBrightness2(_local2, 70);
setStyle("selectionColor", _local3);
setStyle("rollOverColor", _local4);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function get id():String{
return (_id);
}
override public function get height():Number{
return (_height);
}
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 = repeaters;
if (_local2.length == 0){
return (null);
};
if (_arg1 == -1){
_arg1 = (_local2.length - 1);
};
return (_local2[_arg1].getItemAt(repeaterIndices[_arg1]));
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object = (((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);
}
mx_internal function getFontContext(_arg1:String, _arg2:Boolean, _arg3:Boolean):IFlexModuleFactory{
return (embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(_arg1, _arg2, _arg3), moduleFactory));
}
public function get instanceIndex():int{
return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1);
}
public function set measuredWidth(_arg1:Number):void{
_measuredWidth = _arg1;
}
public function effectFinished(_arg1:IEffectInstance):void{
_endingEffectInstances.push(_arg1);
invalidateProperties();
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
}
mx_internal function set isEffectStarted(_arg1:Boolean):void{
_isEffectStarted = _arg1;
}
mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
if (!_arg3){
_arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0);
};
var _local4:Graphics = _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();
}
public function get instanceIndices():Array{
return ((_instanceIndices) ? _instanceIndices.slice(0) : null);
}
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));
}
mx_internal function removingChild(_arg1:DisplayObject):void{
}
mx_internal function getEffectsForProperty(_arg1:String):Array{
return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []);
}
override public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = getChildAt(_arg1);
removingChild(_local2);
$removeChild(_local2);
childRemoved(_local2);
return (_local2);
}
protected function measure():void{
measuredMinWidth = 0;
measuredMinHeight = 0;
measuredWidth = 0;
measuredHeight = 0;
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
mx_internal function getNonNullSystemManager():ISystemManager{
var _local1:ISystemManager = systemManager;
if (!_local1){
_local1 = ISystemManager(SystemManager.getSWFRoot(this));
};
if (!_local1){
return (SystemManagerGlobals.topLevelSystemManagers[0]);
};
return (_local1);
}
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 _local3:int;
var _local4:IEffectInstance;
var _local5:IEffectInstance;
var _local6:Array;
var _local7:int;
var _local8:String;
var _local9:int;
var _local2:int = (_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;
if (((_local4) && (_local4.hideFocusRing))){
preventDrawFocus = false;
};
}
private function commitCurrentState():void{
var _local3:StateChangeEvent;
var _local1:IEffect = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null;
var _local2:String = findCommonBaseState(_currentState, requestedCurrentState);
var _local4:String = (_currentState) ? _currentState : "";
var _local5:State = 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 includeInLayout():Boolean{
return (_includeInLayout);
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
public function set maxWidth(_arg1:Number):void{
if (explicitMaxWidth == _arg1){
return;
};
explicitMaxWidth = _arg1;
}
public function validateDisplayList():void{
var _local1:ISystemManager;
var _local2:Number;
var _local3:Number;
if (invalidateDisplayListFlag){
_local1 = (parent as ISystemManager);
if (_local1){
if ((((_local1 is SystemManagerProxy)) || ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))))){
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
};
_local2 = ((scaleX == 0)) ? 0 : (width / scaleX);
_local3 = ((scaleY == 0)) ? 0 : (height / scaleY);
if (Math.abs((_local2 - lastUnscaledWidth)) < 1E-5){
_local2 = lastUnscaledWidth;
};
if (Math.abs((_local3 - lastUnscaledHeight)) < 1E-5){
_local3 = lastUnscaledHeight;
};
updateDisplayList(_local2, _local3);
lastUnscaledWidth = _local2;
lastUnscaledHeight = _local3;
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 set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function setFocus():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.addEventListener(FlexEvent.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
private function getTransition(_arg1:String, _arg2:String):IEffect{
var _local6:Transition;
var _local3:IEffect;
var _local4:int;
if (!transitions){
return (null);
};
if (!_arg1){
_arg1 = "";
};
if (!_arg2){
_arg2 = "";
};
var _local5:int;
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 initialized(_arg1:Boolean):void{
_initialized = _arg1;
if (_arg1){
setVisible(_visible, true);
dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
};
}
final mx_internal function set $y(_arg1:Number):void{
super.y = _arg1;
}
public function owns(_arg1:DisplayObject):Boolean{
var child = _arg1;
var childList:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (childList.contains(child)){
return (true);
};
try {
while (((child) && (!((child == this))))) {
if ((child is IUIComponent)){
child = IUIComponent(child).owner;
} else {
child = child.parent;
};
};
} catch(e:SecurityError) {
return (false);
};
return ((child == 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 $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);
};
};
};
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function effectStarted(_arg1:IEffectInstance):void{
var _local4:String;
_effectsStarted.push(_arg1);
var _local2:Array = _arg1.effect.getAffectedProperties();
var _local3:int;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_affectedProperties[_local4] == undefined){
_affectedProperties[_local4] = [];
};
_affectedProperties[_local4].push(_arg1);
_local3++;
};
isEffectStarted = true;
if (_arg1.hideFocusRing){
preventDrawFocus = true;
drawFocus(false);
};
}
final mx_internal function set $x(_arg1:Number):void{
super.x = _arg1;
}
private function applyState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
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();
};
}
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);
}
override public function get width():Number{
return (_width);
}
final mx_internal function get $parent():DisplayObjectContainer{
return (super.parent);
}
public function set explicitMinWidth(_arg1:Number):void{
if (_explicitMinWidth == _arg1){
return;
};
_explicitMinWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (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 _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local1:Boolean;
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 = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function drawFocus(_arg1:Boolean):void{
var _local4:DisplayObjectContainer;
var _local5:Class;
if (!parent){
return;
};
var _local2:DisplayObject = getFocusObject();
var _local3:Sprite = (focusManager) ? focusManager.focusPane : null;
if (((_arg1) && (!(preventDrawFocus)))){
_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){
hasFocusRect = false;
if (_local2){
_local2.visible = false;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = null;
};
};
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);
};
};
}
public function get flexContextMenu():IFlexContextMenu{
return (_flexContextMenu);
}
private function get indexedID():String{
var _local1:String = id;
var _local2:Array = instanceIndices;
if (_local2){
_local1 = (_local1 + (("[" + _local2.join("][")) + "]"));
};
return (_local1);
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = (document) ? document : ApplicationGlobals.application;
};
if ((((_arg1 is UIComponent)) && ((UIComponent(_arg1).moduleFactory == null)))){
if (moduleFactory != null){
UIComponent(_arg1).moduleFactory = moduleFactory;
} else {
if ((((document is IFlexModule)) && (!((document.moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = document.moduleFactory;
} else {
if ((((parent is UIComponent)) && (!((UIComponent(parent).moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = UIComponent(parent).moduleFactory;
};
};
};
};
if ((((((_arg1 is IFontContextComponent)) && ((!(_arg1) is UIComponent)))) && ((IFontContextComponent(_arg1).fontContext == null)))){
IFontContextComponent(_arg1).fontContext = moduleFactory;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
} else {
if ((_arg1 is IUITextField)){
IUITextField(_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 IUITextField)) && (IUITextField(_arg1).inheritingStyles))){
StyleProtoChain.initTextField(IUITextField(_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();
};
}
public function set repeaterIndices(_arg1:Array):void{
_repeaterIndices = _arg1;
}
protected function initializationComplete():void{
processedDescriptors = true;
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
var _local4:UIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as UIComponent);
if (!_local4){
} else {
if ((((_local4.moduleFactory == null)) || ((_local4.moduleFactory == _moduleFactory)))){
_local4.moduleFactory = _arg1;
};
};
_local3++;
};
_moduleFactory = _arg1;
}
private function focusObj_removedHandler(_arg1:Event):void{
if (_arg1.target != this){
return;
};
var _local2:DisplayObject = 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) && (((_systemManager.stage) || (_systemManager.useSWFBridge()))))){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_systemManager.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_systemManager.stage){
_systemManager.stage.invalidate();
};
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if ((this is IRawChildrenContainer)){
_local2 = IRawChildrenContainer(this).rawChildren;
} else {
_local2 = IChildList(this);
};
var _local3:int;
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 _local5:ISimpleStyleClient;
cachedTextFormat = null;
var _local3:int = numChildren;
var _local4:int;
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{
if (_explicitMaxWidth == _arg1){
return;
};
_explicitMaxWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxWidthChanged"));
}
public function set document(_arg1:Object):void{
var _local4:IUIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as IUIComponent);
if (!_local4){
} else {
if ((((_local4.document == _document)) || ((_local4.document == ApplicationGlobals.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();
};
};
};
}
public function get validationSubField():String{
return (_validationSubField);
}
override public function dispatchEvent(_arg1:Event):Boolean{
if (dispatchEventHook != null){
dispatchEventHook(_arg1, this);
};
return (super.dispatchEvent(_arg1));
}
public function set id(_arg1:String):void{
_id = _arg1;
}
private function overlay_resizeHandler(_arg1:Event):void{
fillOverlay(overlay, overlayColor, null);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
final mx_internal function get $height():Number{
return (super.height);
}
protected function attachOverlay():void{
addChild(overlay);
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
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"));
};
}
public function get numAutomationChildren():int{
if (automationDelegate){
return (automationDelegate.numAutomationChildren);
};
return (0);
}
public function get parentApplication():Object{
var _local2:UIComponent;
var _local1:Object = systemManager.document;
if (_local1 == this){
_local2 = (_local1.systemManager.parent as UIComponent);
_local1 = (_local2) ? _local2.systemManager.document : null;
};
return (_local1);
}
public function localToContent(_arg1:Point):Point{
return (_arg1);
}
public function get repeaterIndex():int{
return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1);
}
private function removeState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
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{
if (_arg1 == "styleName"){
styleName = _arg2;
return;
};
if (EffectManager.getEventForEffectTrigger(_arg1) != ""){
EffectManager.setStyle(_arg1, this);
};
var _local3:Boolean = StyleManager.isInheritingStyle(_arg1);
var _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED));
var _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 showInAutomationHierarchy():Boolean{
return (_showInAutomationHierarchy);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (((!(_systemManager)) || (_systemManagerDirty))){
_local1 = root;
if ((_systemManager is SystemManagerProxy)){
} else {
if (((_local1) && (!((_local1 is Stage))))){
_systemManager = (_local1 as ISystemManager);
} else {
if (_local1){
_systemManager = (Stage(_local1).getChildAt(0) as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
} else {
if ((_local2 is ISystemManager)){
_systemManager = (_local2 as ISystemManager);
break;
};
};
_local2 = _local2.parent;
};
};
};
};
_systemManagerDirty = false;
};
return (_systemManager);
}
private function isBaseState(_arg1:String):Boolean{
return (((!(_arg1)) || ((_arg1 == ""))));
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
cachedTextFormat = null;
invalidateDisplayList();
dispatchEvent(new Event("enabledChanged"));
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
private function setFocusLater(_arg1:Event=null):void{
var _local2:ISystemManager = 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 initializeRepeaterArrays(_arg1:IRepeaterClient):void{
if (((((((_arg1) && (_arg1.instanceIndices))) && (((!(_arg1.isDocument)) || (!((_arg1 == descriptor.document))))))) && (!(_instanceIndices)))){
_instanceIndices = _arg1.instanceIndices;
_repeaters = _arg1.repeaters;
_repeaterIndices = _arg1.repeaterIndices;
};
}
public function get baselinePosition():Number{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return (NaN);
};
if (!validateBaselinePosition()){
return (NaN);
};
var _local1:TextLineMetrics = measureText("Wj");
if (height < ((2 + _local1.ascent) + 2)){
return (int((height + ((_local1.ascent - height) / 2))));
};
return ((2 + _local1.ascent));
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function set instanceIndices(_arg1:Array):void{
_instanceIndices = _arg1;
}
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 ([]);
}
private function addedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is ISystemManager)){
_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 addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3:DisplayObjectContainer = _arg1.parent;
if (((_local3) && (!((_local3 is Loader))))){
_local3.removeChild(_arg1);
};
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 get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth);
}
override public function set alpha(_arg1:Number):void{
super.alpha = _arg1;
dispatchEvent(new Event("alphaChanged"));
}
private function removedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
_systemManagerDirty = true;
}
public function callLater(_arg1:Function, _arg2:Array=null):void{
methodQueue.push(new MethodQueueElement(_arg1, _arg2));
var _local3:ISystemManager = systemManager;
if (((_local3) && (((_local3.stage) || (_local3.useSWFBridge()))))){
if (!listeningForRender){
_local3.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local3.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_local3.stage){
_local3.stage.invalidate();
};
};
}
public function get initialized():Boolean{
return (_initialized);
}
private function callLaterDispatcher2(_arg1:Event):void{
var _local6:MethodQueueElement;
if (UIComponentGlobals.callLaterSuspendCount > 0){
return;
};
var _local2:ISystemManager = systemManager;
if (((((_local2) && (((_local2.stage) || (_local2.useSWFBridge()))))) && (listeningForRender))){
_local2.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local2.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
var _local3:Array = methodQueue;
methodQueue = [];
var _local4:int = _local3.length;
var _local5:int;
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{
if (((!(states)) || (isBaseState(_arg1)))){
return (null);
};
var _local2:int;
while (_local2 < states.length) {
if (states[_local2].name == _arg1){
return (states[_local2]);
};
_local2++;
};
var _local3:String = resourceManager.getString("core", "stateUndefined", [_arg1]);
throw (new ArgumentError(_local3));
}
public function validateProperties():void{
if (invalidatePropertiesFlag){
commitProperties();
invalidatePropertiesFlag = false;
};
}
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 cache:Array;
var myRoot:DisplayObject;
var s:CSSStyleDeclaration;
var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this);
if (factory != null){
myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
} else {
myRoot = SystemManager.getSWFRoot(this);
if (!myRoot){
return ([]);
};
myApplicationDomain = myRoot.loaderInfo.applicationDomain;
};
var className:String = getQualifiedClassName(this);
className = className.replace("::", ".");
cache = StyleManager.typeSelectorCache[className];
if (cache){
return (cache);
};
var decls:Array = [];
var classNames:Array = [];
var caches:Array = [];
var declcache:Array = [];
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 set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
private function initializeState(_arg1:String):void{
var _local2:State = getState(_arg1);
while (_local2) {
_local2.initialize();
_local2 = getState(_local2.basedOn);
};
}
mx_internal function initProtoChain():void{
var _local1:CSSStyleDeclaration;
var _local7:Object;
var _local8:CSSStyleDeclaration;
if (styleName){
if ((styleName is CSSStyleDeclaration)){
_local1 = CSSStyleDeclaration(styleName);
} else {
if ((((styleName is IFlexDisplayObject)) || ((styleName is IStyleClient)))){
StyleProtoChain.initProtoChainForUIComponentStyleName(this);
return;
};
if ((styleName is String)){
_local1 = StyleManager.getStyleDeclaration(("." + styleName));
};
};
};
var _local2:Object = StyleManager.stylesRoot;
if (((_local2) && (_local2.effects))){
registerEffects(_local2.effects);
};
var _local3:IStyleClient = (parent as IStyleClient);
if (_local3){
_local7 = _local3.inheritingStyles;
if (_local7 == UIComponent.STYLE_UNINITIALIZED){
_local7 = _local2;
};
} else {
if (isPopUp){
if ((((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) && (_owner))) && ((_owner is IStyleClient)))){
_local7 = IStyleClient(_owner).inheritingStyles;
} else {
_local7 = ApplicationGlobals.application.inheritingStyles;
};
} else {
_local7 = StyleManager.stylesRoot;
};
};
var _local4:Array = getClassStyleDeclarations();
var _local5:int = _local4.length;
var _local6:int;
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() : []);
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
$removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
private function focusObj_moveHandler(_arg1:MoveEvent):void{
adjustFocusRect();
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_styleDeclaration);
}
override public function get doubleClickEnabled():Boolean{
return (super.doubleClickEnabled);
}
public function contentToLocal(_arg1:Point):Point{
return (_arg1);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (_currentStateChanged){
_currentStateChanged = false;
commitCurrentState();
validateNow();
};
removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
}
public function set measuredHeight(_arg1:Number):void{
_measuredHeight = _arg1;
}
protected function createChildren():void{
}
public function get activeEffects():Array{
return (_effectsStarted);
}
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 regenerateStyleCache(_arg1:Boolean):void{
var _local5:DisplayObject;
initProtoChain();
var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
var _local3:int = _local2.numChildren;
var _local4:int;
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 IUITextField)){
if (IUITextField(_local5).inheritingStyles){
StyleProtoChain.initTextField(IUITextField(_local5));
};
};
};
_local4++;
};
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus(DisplayObject(_arg1.target))){
drawFocus(false);
};
}
public function getFocus():InteractiveObject{
var _local1:ISystemManager = systemManager;
if (!_local1){
return (null);
};
if (UIComponentGlobals.nextFocusObject){
return (UIComponentGlobals.nextFocusObject);
};
return (_local1.stage.focus);
}
public function endEffectsStarted():void{
var _local1:int = _effectsStarted.length;
var _local2:int;
while (_local2 < _local1) {
_effectsStarted[_local2].end();
_local2++;
};
}
protected function get unscaledHeight():Number{
return ((height / Math.abs(scaleY)));
}
public function get enabled():Boolean{
return (_enabled);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
cacheAsBitmapCount = (_arg1) ? 1 : 0;
}
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 getConstraintValue(_arg1:String){
return (getStyle(_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 get cursorManager():ICursorManager{
var _local2:ICursorManager;
var _local1:DisplayObject = parent;
while (_local1) {
if ((((_local1 is IUIComponent)) && (("cursorManager" in _local1)))){
_local2 = _local1["cursorManager"];
return (_local2);
};
_local1 = _local1.parent;
};
return (CursorManager.getInstance());
}
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 get repeater():IRepeater{
return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null);
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function initialize():void{
if (initialized){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
createChildren();
childrenCreated();
initializeAccessibility();
initializationComplete();
}
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 set percentHeight(_arg1:Number):void{
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
final mx_internal function set $visible(_arg1:Boolean):void{
super.visible = _arg1;
}
private function findCommonBaseState(_arg1:String, _arg2:String):String{
var _local3:State = getState(_arg1);
var _local4:State = getState(_arg2);
if (((!(_local3)) || (!(_local4)))){
return ("");
};
if (((isBaseState(_local3.basedOn)) && (isBaseState(_local4.basedOn)))){
return ("");
};
var _local5:Array = getBaseStates(_local3);
var _local6:Array = getBaseStates(_local4);
var _local7 = "";
while (_local5[(_local5.length - 1)] == _local6[(_local6.length - 1)]) {
_local7 = _local5.pop();
_local6.pop();
if (((!(_local5.length)) || (!(_local6.length)))){
break;
};
};
if (((_local5.length) && ((_local5[(_local5.length - 1)] == _local4.name)))){
_local7 = _local4.name;
} else {
if (((_local6.length) && ((_local6[(_local6.length - 1)] == _local3.name)))){
_local7 = _local3.name;
};
};
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);
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function set explicitMaxHeight(_arg1:Number):void{
if (_explicitMaxHeight == _arg1){
return;
};
_explicitMaxHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxHeightChanged"));
}
public function get focusManager():IFocusManager{
if (_focusManager){
return (_focusManager);
};
var _local1:DisplayObject = 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);
}
protected function get resourceManager():IResourceManager{
return (_resourceManager);
}
mx_internal function validateBaselinePosition():Boolean{
var _local1:Number;
var _local2:Number;
if (!parent){
return (false);
};
if ((((width == 0)) && ((height == 0)))){
validateNow();
_local1 = getExplicitOrMeasuredWidth();
_local2 = getExplicitOrMeasuredHeight();
setActualSize(_local1, _local2);
};
validateNow();
return (true);
}
mx_internal function cancelAllCallLaters():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (listeningForRender){
_local1.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local1.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
};
methodQueue.splice(0);
}
private function updateCompleteHandler(_arg1:FlexEvent):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
processEffectFinished(_endingEffectInstances);
_endingEffectInstances = [];
}
public function styleChanged(_arg1:String):void{
if ((((this is IFontContextComponent)) && (hasFontContextChanged()))){
invalidateProperties();
};
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 _local13:Number;
var _local14:Array;
var _local15:Matrix;
var _local16:Object;
var _local12:Graphics = 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;
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{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _arg1);
dispatchEvent(new Event("toolTipChanged"));
}
public function set repeaters(_arg1:Array):void{
_repeaters = _arg1;
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function measureText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureText(_arg1));
}
public function get styleName():Object{
return (_styleName);
}
protected function createInModuleContext(_arg1:IFlexModuleFactory, _arg2:String):Object{
var _local3:Object;
if (_arg1){
_local3 = _arg1.create(_arg2);
};
return (_local3);
}
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);
}
protected function childrenCreated():void{
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function set flexContextMenu(_arg1:IFlexContextMenu):void{
if (_flexContextMenu){
_flexContextMenu.unsetContextMenu(this);
};
_flexContextMenu = _arg1;
if (_arg1 != null){
_flexContextMenu.setContextMenu(this);
};
}
public function set explicitWidth(_arg1:Number):void{
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
private function setBorderColorForErrorString():void{
if (((!(_errorString)) || ((_errorString.length == 0)))){
if (!isNaN(origBorderColor)){
setStyle("borderColor", origBorderColor);
saveBorderColor = true;
};
} else {
if (saveBorderColor){
saveBorderColor = false;
origBorderColor = getStyle("borderColor");
};
setStyle("borderColor", getStyle("errorColor"));
};
styleChanged("themeColor");
var _local1:IFocusManager = focusManager;
var _local2:DisplayObject = (_local1) ? DisplayObject(_local1.getFocus()) : null;
if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){
drawFocus(true);
};
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
if (!invalidateSizeFlag){
invalidateSizeFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
};
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
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;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
public static function resumeBackgroundProcessing():void{
var _local1:ISystemManager;
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 251
//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 = "3.4.0.9271";
public static const OFF:String = "off";
}
}//package mx.core
Section 252
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
mx_internal var instanceIndices:Array;
public var stylesFactory:Function;
public var effects:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
mx_internal static const VERSION:String = "3.4.0.9271";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 253
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 254
//UITextField (mx.core.UITextField)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import mx.styles.*;
import mx.resources.*;
import mx.managers.*;
import flash.text.*;
import mx.automation.*;
import mx.utils.*;
public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUITextField {
private var _enabled:Boolean;// = true
private var untruncatedText:String;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var cachedTextFormat:TextFormat;
private var _automationDelegate:IAutomationObject;
private var _automationName:String;
private var _styleName:Object;
private var _document:Object;
mx_internal var _toolTip:String;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _moduleFactory:IFlexModuleFactory;
private var _initialized:Boolean;// = false
private var _nonInheritingStyles:Object;
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
private var invalidateDisplayListFlag:Boolean;// = true
mx_internal var explicitColor:uint;// = 4294967295
private var _processedDescriptors:Boolean;// = true
private var _updateCompletePendingFlag:Boolean;// = false
private var explicitHTMLText:String;// = null
mx_internal var _parent:DisplayObjectContainer;
private var _imeMode:String;// = null
private var resourceManager:IResourceManager;
mx_internal var styleChangedFlag:Boolean;// = true
private var _ignorePadding:Boolean;// = true
private var _owner:DisplayObjectContainer;
private var _explicitWidth:Number;
mx_internal static const TEXT_WIDTH_PADDING:int = 5;
mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var truncationIndicatorResource:String;
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
mx_internal static var debuggingBorders:Boolean = false;
public function UITextField(){
resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
super();
super.text = "";
focusRect = false;
selectable = false;
tabEnabled = false;
if (debuggingBorders){
border = true;
};
if (!truncationIndicatorResource){
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
};
addEventListener(Event.CHANGE, changeHandler);
addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function get nestLevel():int{
return (_nestLevel);
}
private function textFieldStyleChangeHandler(_arg1:Event):void{
if (explicitHTMLText != null){
super.htmlText = explicitHTMLText;
};
}
public function truncateToFit(_arg1:String=null):Boolean{
var _local4:String;
if (!_arg1){
_arg1 = truncationIndicatorResource;
};
validateNow();
var _local2:String = super.text;
untruncatedText = _local2;
var _local3:Number = width;
if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > (_local3 + 1E-14))))){
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 set nestLevel(_arg1:int):void{
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
StyleProtoChain.initTextField(this);
styleChangedFlag = true;
validateNow();
};
}
public function get minHeight():Number{
return (0);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
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 className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _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();
}
override public function replaceText(_arg1:int, _arg2:int, _arg3:String):void{
super.replaceText(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textReplace"));
}
private function creatingSystemManager():ISystemManager{
return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
public function get explicitMinHeight():Number{
return (NaN);
}
public function get focusPane():Sprite{
return (null);
}
public function getTextStyles():TextFormat{
var _local1:TextFormat = 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);
}
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 getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function get showInAutomationHierarchy():Boolean{
return (true);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get systemManager():ISystemManager{
var _local2:IUIComponent;
var _local1:DisplayObject = parent;
while (_local1) {
_local2 = (_local1 as IUIComponent);
if (_local2){
return (_local2.systemManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function setStyle(_arg1:String, _arg2):void{
}
public function get percentWidth():Number{
return (NaN);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get baselinePosition():Number{
var _local1:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local1 = getLineMetrics(0);
return (((height - 4) - _local1.descent));
};
if (!parent){
return (NaN);
};
var _local2 = (text == "");
if (_local2){
super.text = "Wj";
};
_local1 = getLineMetrics(0);
if (_local2){
super.text = "";
};
return ((2 + _local1.ascent));
}
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 tweeningProperties():Array{
return (null);
}
public function get measuredWidth():Number{
validateNow();
if (!stage){
return ((textWidth + TEXT_WIDTH_PADDING));
};
return (((textWidth * transform.concatenatedMatrix.d) + TEXT_WIDTH_PADDING));
}
public function set tweeningProperties(_arg1:Array):void{
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
return (null);
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (width != _arg1){
width = _arg1;
};
if (height != _arg2){
height = _arg2;
};
}
public function get numAutomationChildren():int{
return (0);
}
public function set focusPane(_arg1:Sprite):void{
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
return (null);
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
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 maxWidth():Number{
return (UIComponent.DEFAULT_MAX_WIDTH);
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function get initialized():Boolean{
return (_initialized);
}
public function invalidateDisplayList():void{
invalidateDisplayListFlag = true;
}
public function invalidateProperties():void{
}
override public function insertXMLText(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{
super.insertXMLText(_arg1, _arg2, _arg3, _arg4);
dispatchEvent(new Event("textInsert"));
}
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 showInAutomationHierarchy(_arg1:Boolean):void{
}
private function resourceManager_changeHandler(_arg1:Event):void{
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
if (untruncatedText != null){
super.text = untruncatedText;
truncateToFit();
};
}
public function set measuredMinWidth(_arg1:Number):void{
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
public function get explicitMinWidth():Number{
return (NaN);
}
public function set percentWidth(_arg1:Number):void{
}
public function get imeMode():String{
return (_imeMode);
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set systemManager(_arg1:ISystemManager):void{
}
public function get explicitMaxWidth():Number{
return (NaN);
}
public function get document():Object{
return (_document);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function get enabled():Boolean{
return (_enabled);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function get automationTabularData():Object{
return (null);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function get measuredMinWidth():Number{
return (0);
}
public function set isPopUp(_arg1:Boolean):void{
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredHeight():Number{
validateNow();
if (!stage){
return ((textHeight + TEXT_HEIGHT_PADDING));
};
return (((textHeight * transform.concatenatedMatrix.a) + TEXT_HEIGHT_PADDING));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function setFocus():void{
systemManager.stage.focus = this;
}
public function initialize():void{
}
public function set percentHeight(_arg1:Number):void{
}
public function resolveAutomationIDPart(_arg1:Object):Array{
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getUITextFormat():UITextFormat{
validateNow();
var _local1:UITextFormat = new UITextFormat(creatingSystemManager());
_local1.moduleFactory = moduleFactory;
_local1.copyFrom(getTextFormat());
_local1.antiAliasType = antiAliasType;
_local1.gridFitType = gridFitType;
_local1.sharpness = sharpness;
_local1.thickness = thickness;
return (_local1);
}
private function changeHandler(_arg1:Event):void{
explicitHTMLText = null;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
public function get nonZeroTextHeight():Number{
var _local1:Number;
if (super.text == ""){
super.text = "Wj";
_local1 = textHeight;
super.text = "";
return (_local1);
};
return (textHeight);
}
public function owns(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
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 get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
this.visible = _arg1;
}
public function get maxHeight():Number{
return (UIComponent.DEFAULT_MAX_HEIGHT);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function get isPopUp():Boolean{
return (false);
}
public function set ignorePadding(_arg1:Boolean):void{
_ignorePadding = _arg1;
styleChanged(null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (parent){
StyleProtoChain.initTextField(this);
styleChanged("styleName");
};
}
public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (("callLater" in parent)){
Object(parent).callLater(validateNow);
};
};
}
public function get percentHeight():Number{
return (NaN);
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
public function get explicitMaxHeight():Number{
return (NaN);
}
public function get styleName():Object{
return (_styleName);
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function validateNow():void{
var _local1:TextFormat;
var _local2:EmbeddedFont;
var _local3:IFlexModuleFactory;
var _local4: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();
if (_local1.font){
_local2 = getEmbeddedFont(_local1.font, _local1.bold, _local1.italic);
_local3 = embeddedFontRegistry.getAssociatedModuleFactory(_local2, moduleFactory);
if (_local3 != null){
embedFonts = true;
} else {
_local4 = creatingSystemManager();
embedFonts = ((!((_local4 == null))) && (_local4.isFontFaceEmbedded(_local1)));
};
} else {
embedFonts = getStyle("embedFonts");
};
if (getStyle("fontAntiAliasType") != undefined){
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 set toolTip(_arg1:String):void{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _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 get ignorePadding():Boolean{
return (_ignorePadding);
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
invalidateDisplayListFlag = true;
}
public function set measuredMinHeight(_arg1:Number):void{
}
public function get measuredMinHeight():Number{
return (0);
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
}
}//package mx.core
Section 255
//UITextFormat (mx.core.UITextFormat)
package mx.core {
import mx.managers.*;
import flash.text.*;
public class UITextFormat extends TextFormat {
private var systemManager:ISystemManager;
public var sharpness:Number;
public var gridFitType:String;
public var antiAliasType:String;
public var thickness:Number;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var _moduleFactory:IFlexModuleFactory;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
private static var _textFieldFactory:ITextFieldFactory;
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 set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
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;
letterSpacing = _arg1.letterSpacing;
blockIndent = _arg1.blockIndent;
bullet = _arg1.bullet;
display = _arg1.display;
indent = _arg1.indent;
kerning = _arg1.kerning;
tabStops = _arg1.tabStops;
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function measureText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, false, _arg2));
}
private function measure(_arg1:String, _arg2:Boolean, _arg3:Boolean):TextLineMetrics{
if (!_arg1){
_arg1 = "";
};
var _local4:Boolean;
var _local5:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(font, bold, italic), moduleFactory);
_local4 = !((_local5 == null));
if (_local5 == null){
_local5 = systemManager;
};
var _local6:TextField;
_local6 = TextField(textFieldFactory.createTextField(_local5));
if (_arg2){
_local6.htmlText = "";
} else {
_local6.text = "";
};
_local6.defaultTextFormat = this;
if (font){
_local6.embedFonts = ((_local4) || (((!((systemManager == null))) && (systemManager.isFontFaceEmbedded(this)))));
} else {
_local6.embedFonts = false;
};
_local6.antiAliasType = antiAliasType;
_local6.gridFitType = gridFitType;
_local6.sharpness = sharpness;
_local6.thickness = thickness;
if (_arg2){
_local6.htmlText = _arg1;
} else {
_local6.text = _arg1;
};
var _local7:TextLineMetrics = _local6.getLineMetrics(0);
if (indent != null){
_local7.width = (_local7.width + indent);
};
if (_arg3){
_local7.width = Math.ceil(_local7.width);
_local7.height = Math.ceil(_local7.height);
};
return (_local7);
}
public function measureHTMLText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, true, _arg2));
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
private static function get textFieldFactory():ITextFieldFactory{
if (!_textFieldFactory){
_textFieldFactory = ITextFieldFactory(Singleton.getInstance("mx.core::ITextFieldFactory"));
};
return (_textFieldFactory);
}
}
}//package mx.core
Section 256
//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 = "3.4.0.9271";
public function AddRemoveEffectTargetFilter(){
filterProperties = ["parent"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
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 257
//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 = "3.4.0.9271";
public function HideShowEffectTargetFilter(){
filterProperties = ["visible"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
return ((_local5.end["visible"] == show));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 258
//PropertyChanges (mx.effects.effectClasses.PropertyChanges)
package mx.effects.effectClasses {
public class PropertyChanges {
public var target:Object;
public var start:Object;
public var end:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
public function PropertyChanges(_arg1:Object){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 259
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance)
package mx.effects.effectClasses {
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class TweenEffectInstance extends EffectInstance {
private var _seekTime:Number;// = 0
public var easingFunction:Function;
public var tween:Tween;
mx_internal var needToLayout:Boolean;// = false
mx_internal static const VERSION:String = "3.4.0.9271";
public function TweenEffectInstance(_arg1:Object){
super(_arg1);
}
override public function stop():void{
super.stop();
if (tween){
tween.stop();
};
}
mx_internal function applyTweenStartValues():void{
if (duration > 0){
onTweenUpdate(tween.getCurrentValue(0));
};
}
override public function get playheadTime():Number{
if (tween){
return ((tween.playheadTime + super.playheadTime));
};
return (0);
}
protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{
var _local6:Tween = 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);
}
private function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
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);
}
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 onTweenEnd(_arg1:Object):void{
onTweenUpdate(_arg1);
tween = null;
if (needToLayout){
UIComponentGlobals.layoutManager.validateNow();
};
finishRepeat();
}
public function onTweenUpdate(_arg1:Object):void{
}
override public function pause():void{
super.pause();
if (tween){
tween.pause();
};
}
public function seek(_arg1:Number):void{
if (tween){
tween.seek(_arg1);
} else {
_seekTime = _arg1;
};
}
}
}//package mx.effects.effectClasses
Section 260
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.events.*;
import mx.effects.*;
public class ZoomInstance extends TweenEffectInstance {
private var newY:Number;
public var originY:Number;
private var origX:Number;
private var origY:Number;
public var originX:Number;
private var origPercentHeight:Number;
public var zoomWidthFrom:Number;
public var zoomWidthTo:Number;
private var newX:Number;
public var captureRollEvents:Boolean;
private var origPercentWidth:Number;
public var zoomHeightFrom:Number;
private var origScaleX:Number;
public var zoomHeightTo:Number;
private var origScaleY:Number;
private var scaledOriginX:Number;
private var scaledOriginY:Number;
private var show:Boolean;// = true
private var _mouseHasMoved:Boolean;// = false
mx_internal static const VERSION:String = "3.4.0.9271";
public function ZoomInstance(_arg1:Object){
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))));
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){
show = false;
};
}
private function getScaleFromHeight(_arg1:Number):Number{
return ((_arg1 / (target.height / Math.abs(target.scaleY))));
}
private function applyPropertyChanges():void{
var _local2:Boolean;
var _local3:Boolean;
var _local1:PropertyChanges = 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"];
};
};
}
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 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 (hideOnEffectEnd){
EffectManager.suspendEventHandling();
target.scaleX = origScaleX;
target.scaleY = origScaleY;
target.move(origX, origY);
EffectManager.resumeEventHandling();
};
}
override public function onTweenUpdate(_arg1:Object):void{
EffectManager.suspendEventHandling();
if (Math.abs((newX - target.x)) > 0.1){
origX = (origX + (Number(target.x.toFixed(1)) - newX));
};
if (Math.abs((newY - target.y)) > 0.1){
origY = (origY + (Number(target.y.toFixed(1)) - newY));
};
target.scaleX = _arg1[0];
target.scaleY = _arg1[1];
var _local2:Number = (_arg1[0] / origScaleX);
var _local3:Number = (_arg1[1] / origScaleY);
var _local4:Number = (scaledOriginX * _local2);
var _local5:Number = (scaledOriginY * _local3);
newX = ((scaledOriginX - _local4) + origX);
newY = ((scaledOriginY - _local5) + origY);
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
if (tween){
tween.needToLayout = true;
} else {
needToLayout = true;
};
EffectManager.resumeEventHandling();
}
}
}//package mx.effects.effectClasses
Section 261
//Effect (mx.effects.Effect)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import mx.managers.*;
import mx.effects.effectClasses.*;
public class Effect extends EventDispatcher implements IEffect {
private var _perElementOffset:Number;// = 0
private var _hideFocusRing:Boolean;// = false
private var _customFilter:EffectTargetFilter;
public var repeatCount:int;// = 1
public var suspendBackgroundProcessing:Boolean;// = false
public var startDelay:int;// = 0
private var _relevantProperties:Array;
private var _callValidateNow:Boolean;// = false
mx_internal var applyActualDimensions:Boolean;// = true
private var _filter:String;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var durationExplicitlySet:Boolean;// = false
public var repeatDelay:int;// = 0
private var _targets:Array;
mx_internal var propertyChangesArray:Array;
mx_internal var filterObject:EffectTargetFilter;
protected var endValuesCaptured:Boolean;// = false
public var instanceClass:Class;
private var _duration:Number;// = 500
private var isPaused:Boolean;// = false
private var _relevantStyles:Array;
private var _instances:Array;
mx_internal static const VERSION:String = "3.4.0.9271";
public function Effect(_arg1:Object=null){
_instances = [];
instanceClass = IEffectInstance;
_relevantStyles = [];
_targets = [];
super();
this.target = _arg1;
}
public function get targets():Array{
return (_targets);
}
public function set targets(_arg1:Array):void{
var _local2:int = _arg1.length;
var _local3:int = (_local2 - 1);
while (_local3 > 0) {
if (_arg1[_local3] == null){
_arg1.splice(_local3, 1);
};
_local3--;
};
_targets = _arg1;
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
public function get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
var _local3:IEffectInstance;
var _local1:int = _instances.length;
var _local2:int = _local1;
while (_local2 >= 0) {
_local3 = IEffectInstance(_instances[_local2]);
if (_local3){
_local3.stop();
};
_local2--;
};
}
public function captureStartValues():void{
if (targets.length > 0){
propertyChangesArray = captureValues(null, true);
_callValidateNow = true;
};
endValuesCaptured = false;
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local3:int;
var _local4:int;
var _local6:Object;
var _local7:Object;
var _local8:int;
var _local9:int;
if (!_arg1){
_arg1 = [];
_local3 = targets.length;
_local4 = 0;
while (_local4 < _local3) {
_arg1.push(new PropertyChanges(targets[_local4]));
_local4++;
};
};
var _local5:Array = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local5) && ((_local5.length > 0)))){
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local7 = _arg1[_local4].target;
_local6 = (_arg2) ? _arg1[_local4].start : _arg1[_local4].end;
_local8 = _local5.length;
_local9 = 0;
while (_local9 < _local8) {
_local6[_local5[_local9]] = getValueFromTarget(_local7, _local5[_local9]);
_local9++;
};
_local4++;
};
};
var _local10:Array = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local7 = _arg1[_local4].target;
_local6 = (_arg2) ? _arg1[_local4].start : _arg1[_local4].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local6[_local10[_local9]] = _local7.getStyle(_local10[_local9]);
_local9++;
};
_local4++;
};
};
return (_arg1);
}
protected function getValueFromTarget(_arg1:Object, _arg2:String){
if ((_arg2 in _arg1)){
return (_arg1[_arg2]);
};
return (undefined);
}
public function set target(_arg1:Object):void{
_targets.splice(0);
if (_arg1){
_targets[0] = _arg1;
};
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set perElementOffset(_arg1:Number):void{
_perElementOffset = _arg1;
}
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 duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
public function play(_arg1:Array=null, _arg2:Boolean=false):Array{
var _local6:IEffectInstance;
if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){
if (_callValidateNow){
LayoutManager.getInstance().validateNow();
};
if (!endValuesCaptured){
propertyChangesArray = captureValues(propertyChangesArray, false);
};
propertyChangesArray = stripUnchangedValues(propertyChangesArray);
applyStartValues(propertyChangesArray, this.targets);
};
var _local3:Array = createInstances(_arg1);
var _local4:int = _local3.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = IEffectInstance(_local3[_local5]);
Object(_local6).playReversed = _arg2;
_local6.startEffect();
_local5++;
};
return (_local3);
}
public function captureEndValues():void{
propertyChangesArray = captureValues(propertyChangesArray, false);
endValuesCaptured = true;
}
protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
if (filterObject){
return (filterObject.filterInstance(_arg1, effectTargetHost, _arg2));
};
return (true);
}
public function get customFilter():EffectTargetFilter{
return (_customFilter);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
public function set relevantProperties(_arg1:Array):void{
_relevantProperties = _arg1;
}
public function captureMoreStartValues(_arg1:Array):void{
var _local2:Array;
if (_arg1.length > 0){
_local2 = captureValues(null, true);
propertyChangesArray = propertyChangesArray.concat(_local2);
};
}
public function deleteInstance(_arg1:IEffectInstance):void{
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
var _local2:int = _instances.length;
var _local3:int;
while (_local3 < _local2) {
if (_instances[_local3] === _arg1){
_instances.splice(_local3, 1);
};
_local3++;
};
}
public function get filter():String{
return (_filter);
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function get target():Object{
if (_targets.length > 0){
return (_targets[0]);
};
return (null);
}
public function get duration():Number{
return (_duration);
}
public function set customFilter(_arg1:EffectTargetFilter):void{
_customFilter = _arg1;
filterObject = _arg1;
}
public function get perElementOffset():Number{
return (_perElementOffset);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get isPlaying():Boolean{
return (((_instances) && ((_instances.length > 0))));
}
protected function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance = IEffectInstance(_arg1.effectInstance);
deleteInstance(_local2);
dispatchEvent(_arg1);
}
public function get relevantProperties():Array{
if (_relevantProperties){
return (_relevantProperties);
};
return (getAffectedProperties());
}
public function createInstance(_arg1:Object=null):IEffectInstance{
var _local6:int;
var _local7:int;
if (!_arg1){
_arg1 = this.target;
};
var _local2:IEffectInstance;
var _local3:PropertyChanges;
var _local4:Boolean;
var _local5:Boolean;
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 (triggerEvent){
_local2.initEffect(triggerEvent);
};
};
return (_local2);
}
protected function effectStartHandler(_arg1:EffectEvent):void{
dispatchEvent(_arg1);
}
public function getAffectedProperties():Array{
return ([]);
}
public function set relevantStyles(_arg1:Array):void{
_relevantStyles = _arg1;
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
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 initInstance(_arg1:IEffectInstance):void{
_arg1.duration = duration;
Object(_arg1).durationExplicitlySet = durationExplicitlySet;
_arg1.effect = this;
_arg1.effectTargetHost = effectTargetHost;
_arg1.hideFocusRing = hideFocusRing;
_arg1.repeatCount = repeatCount;
_arg1.repeatDelay = repeatDelay;
_arg1.startDelay = startDelay;
_arg1.suspendBackgroundProcessing = suspendBackgroundProcessing;
}
mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:Boolean;
var _local3:Array = relevantProperties;
var _local4:int = _arg1.length;
var _local5:int;
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 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--;
};
};
}
public function get relevantStyles():Array{
return (_relevantStyles);
}
public function createInstances(_arg1:Array=null):Array{
var _local6:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
var _local2:Array = [];
var _local3:int = _arg1.length;
var _local4:Number = 0;
var _local5:int;
while (_local5 < _local3) {
_local6 = createInstance(_arg1[_local5]);
if (_local6){
_local6.startDelay = (_local6.startDelay + _local4);
_local4 = (_local4 + perElementOffset);
_local2.push(_local6);
};
_local5++;
};
triggerEvent = null;
return (_local2);
}
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 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;
case "addItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {added:true};
break;
case "removeItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {removed:true};
break;
case "replacedItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replaced:true};
break;
case "replacementItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replacement:true};
break;
default:
filterObject = null;
break;
};
};
}
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++;
};
};
}
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 _local3:Object;
var _local2:int;
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 262
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import mx.effects.effectClasses.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var _hideFocusRing:Boolean;
private var delayStartTime:Number;// = 0
mx_internal var stopRepeat:Boolean;// = false
private var playCount:int;// = 0
private var _repeatCount:int;// = 0
private var _suspendBackgroundProcessing:Boolean;// = false
mx_internal var delayTimer:Timer;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var parentCompositeEffectInstance:EffectInstance;
mx_internal var durationExplicitlySet:Boolean;// = false
private var _effect:IEffect;
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 = "3.4.0.9271";
public function EffectInstance(_arg1:Object){
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 get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
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 UIComponent)){
UIComponent(target).effectFinished(this);
};
EffectManager.effectFinished(this);
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
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:IEffect):void{
_effect = _arg1;
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _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 = NaN;
if (repeatCount > 0){
_local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
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 get suspendBackgroundProcessing():Boolean{
return (_suspendBackgroundProcessing);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
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():IEffect{
return (_effect);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get target():Object{
return (_target);
}
public function startEffect():void{
EffectManager.effectStarted(this);
if ((target is UIComponent)){
UIComponent(target).effectStarted(this);
};
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 get duration():Number{
if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){
return (parentCompositeEffectInstance.duration);
};
return (_duration);
}
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 263
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import flash.utils.*;
import mx.resources.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var _resourceManager:IResourceManager;
private static var effects:Dictionary = new Dictionary(true);
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 = {};
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);
}
private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local9:String;
var _local10:String;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:EffectInstance;
var _local3:Effect = createEffectForType(_arg2, _arg1.type);
if (!_local3){
return;
};
if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){
_local9 = resourceManager.getString("effects", "incorrectTrigger");
throw (new Error(_local9));
};
if (_arg2.initialized == false){
_local10 = _arg1.type;
if ((((((((((_local10 == MoveEvent.MOVE)) || ((_local10 == ResizeEvent.RESIZE)))) || ((_local10 == FlexEvent.SHOW)))) || ((_local10 == FlexEvent.HIDE)))) || ((_local10 == Event.CHANGE)))){
_local3 = null;
return;
};
};
if ((_local3.target is IUIComponent)){
_local11 = IUIComponent(_local3.target).tweeningProperties;
if (((_local11) && ((_local11.length > 0)))){
_local12 = _local3.getAffectedProperties();
_local4 = _local11.length;
_local6 = _local12.length;
_local5 = 0;
while (_local5 < _local4) {
_local7 = 0;
while (_local7 < _local6) {
if (_local11[_local5] == _local12[_local7]){
_local3 = null;
return;
};
_local7++;
};
_local5++;
};
};
};
if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){
_local13 = _local3.getAffectedProperties();
_local5 = 0;
while (_local5 < _local13.length) {
_local14 = _local3.target.getEffectsForProperty(_local13[_local5]);
if (_local14.length > 0){
if (_arg1.type == ResizeEvent.RESIZE){
return;
};
_local7 = 0;
while (_local7 < _local14.length) {
_local15 = _local14[_local7];
if ((((_arg1.type == FlexEvent.SHOW)) && (_local15.hideOnEffectEnd))){
_local15.target.removeEventListener(FlexEvent.SHOW, _local15.eventHandler);
_local15.hideOnEffectEnd = false;
};
_local15.end();
_local7++;
};
};
_local5++;
};
};
_local3.triggerEvent = _arg1;
_local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler);
lastEffectCreated = _local3;
var _local8:Array = _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 endEffectsForTarget(_arg1:IUIComponent):void{
var _local4:EffectInstance;
var _local2:int = effectsPlaying.length;
var _local3:int = (_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;
_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);
}
mx_internal static function effectFinished(_arg1:EffectInstance):void{
delete effects[_arg1];
}
mx_internal static function effectsInEffect():Boolean{
var _local1:*;
for (_local1 in effects) {
return (true);
};
return (false);
}
mx_internal static function effectEndHandler(_arg1:EffectEvent):void{
var _local5:DisplayObject;
var _local6:DisplayObjectContainer;
var _local2:IEffectInstance = _arg1.effectInstance;
var _local3:int = effectsPlaying.length;
var _local4:int = (_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 = 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 cls:Class;
var effectObj:Effect;
var doc:Object;
var target = _arg1;
var type = _arg2;
var trigger:String = effectTriggersForEvent[type];
if (trigger == ""){
trigger = (type + "Effect");
};
var value:Object = 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 = ApplicationGlobals.application;
};
effectObj = doc[value];
} else {
if ((value is Effect)){
effectObj = Effect(value);
};
};
if (effectObj){
effectObj.target = target;
return (effectObj);
};
} catch(e:Error) {
};
var effectClass:Class = Class(target.systemManager.getDefinitionByName(("mx.effects." + value)));
if (effectClass){
return (new effectClass(target));
};
return (null);
}
mx_internal static function effectStarted(_arg1:EffectInstance):void{
effects[_arg1] = 1;
}
public static function resumeEventHandling():void{
eventHandlingSuspendCount--;
}
mx_internal static function startVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, false);
}
mx_internal static function endVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, false);
}
private static function get resourceManager():IResourceManager{
if (!_resourceManager){
_resourceManager = ResourceManager.getInstance();
};
return (_resourceManager);
}
}
}//package mx.effects
class EffectNode {
public var factory:Effect;
public var instance:EffectInstance;
private function EffectNode(_arg1:Effect, _arg2:EffectInstance){
this.factory = _arg1;
this.instance = _arg2;
}
}
Section 264
//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;
public var requiredSemantics:Object;// = null
mx_internal static const VERSION:String = "3.4.0.9271";
public function EffectTargetFilter(){
filterFunction = defaultFilterFunctionEx;
filterProperties = [];
filterStyles = [];
super();
}
protected function defaultFilterFunctionEx(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
var _local4:String;
if (requiredSemantics){
for (_local4 in requiredSemantics) {
if (!_arg2){
return (false);
};
if (_arg2.getRendererSemanticValue(_arg3, _local4) != requiredSemantics[_local4]){
return (false);
};
};
return (true);
};
return (defaultFilterFunction(_arg1, _arg3));
}
protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local3:int = _arg1.length;
var _local4:int;
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);
}
public function filterInstance(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
if (filterFunction.length == 2){
return (filterFunction(_arg1, _arg3));
};
return (filterFunction(_arg1, _arg2, _arg3));
}
}
}//package mx.effects
Section 265
//IAbstractEffect (mx.effects.IAbstractEffect)
package mx.effects {
import flash.events.*;
public interface IAbstractEffect extends IEventDispatcher {
}
}//package mx.effects
Section 266
//IEffect (mx.effects.IEffect)
package mx.effects {
import flash.events.*;
public interface IEffect extends IAbstractEffect {
function captureMoreStartValues(_arg1:Array):void;
function get triggerEvent():Event;
function set targets(_arg1:Array):void;
function captureStartValues():void;
function get hideFocusRing():Boolean;
function get customFilter():EffectTargetFilter;
function get effectTargetHost():IEffectTargetHost;
function set triggerEvent(_arg1:Event):void;
function set hideFocusRing(_arg1:Boolean):void;
function captureEndValues():void;
function get target():Object;
function set customFilter(_arg1:EffectTargetFilter):void;
function get duration():Number;
function get perElementOffset():Number;
function get targets():Array;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function get relevantStyles():Array;
function set relevantProperties(_arg1:Array):void;
function set target(_arg1:Object):void;
function get className():String;
function get isPlaying():Boolean;
function deleteInstance(_arg1:IEffectInstance):void;
function set duration(_arg1:Number):void;
function createInstances(_arg1:Array=null):Array;
function end(_arg1:IEffectInstance=null):void;
function set perElementOffset(_arg1:Number):void;
function resume():void;
function stop():void;
function set filter(_arg1:String):void;
function createInstance(_arg1:Object=null):IEffectInstance;
function play(_arg1:Array=null, _arg2:Boolean=false):Array;
function pause():void;
function get relevantProperties():Array;
function get filter():String;
function reverse():void;
function getAffectedProperties():Array;
function set relevantStyles(_arg1:Array):void;
}
}//package mx.effects
Section 267
//IEffectInstance (mx.effects.IEffectInstance)
package mx.effects {
import flash.events.*;
import mx.effects.effectClasses.*;
public interface IEffectInstance {
function get playheadTime():Number;
function get triggerEvent():Event;
function set triggerEvent(_arg1:Event):void;
function get hideFocusRing():Boolean;
function initEffect(_arg1:Event):void;
function set startDelay(_arg1:int):void;
function get effectTargetHost():IEffectTargetHost;
function finishEffect():void;
function set hideFocusRing(_arg1:Boolean):void;
function finishRepeat():void;
function set repeatDelay(_arg1:int):void;
function get effect():IEffect;
function startEffect():void;
function get duration():Number;
function get target():Object;
function get startDelay():int;
function stop():void;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function set propertyChanges(_arg1:PropertyChanges):void;
function set effect(_arg1:IEffect):void;
function get className():String;
function set duration(_arg1:Number):void;
function set target(_arg1:Object):void;
function end():void;
function resume():void;
function get propertyChanges():PropertyChanges;
function set repeatCount(_arg1:int):void;
function reverse():void;
function get repeatCount():int;
function pause():void;
function get repeatDelay():int;
function set suspendBackgroundProcessing(_arg1:Boolean):void;
function play():void;
function get suspendBackgroundProcessing():Boolean;
}
}//package mx.effects
Section 268
//IEffectTargetHost (mx.effects.IEffectTargetHost)
package mx.effects {
public interface IEffectTargetHost {
function unconstrainRenderer(_arg1:Object):void;
function removeDataEffectItem(_arg1:Object):void;
function getRendererSemanticValue(_arg1:Object, _arg2:String):Object;
function addDataEffectItem(_arg1:Object):void;
}
}//package mx.effects
Section 269
//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
private var previousUpdateTime:Number;
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;
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 = "3.4.0.9271";
private static var timer:Timer = null;
private static var interval:Number = 10;
mx_internal 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, _arg6:Function=null, _arg7:Function=null){
userEquation = defaultEasingFunction;
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);
};
this.updateFunction = _arg6;
this.endFunction = _arg7;
if (_arg4 == 0){
id = -1;
endTween();
} else {
Tween.addTween(this);
};
}
mx_internal function get playheadTime():Number{
return (_playheadTime);
}
public function stop():void{
if (id >= 0){
Tween.removeTweenAt(id);
};
}
mx_internal function get playReversed():Boolean{
return (_invertValues);
}
mx_internal function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
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;
}
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 set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
public function endTween():void{
var _local1:TweenEvent = new TweenEvent(TweenEvent.TWEEN_END);
var _local2:Object = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
if (id >= 0){
Tween.removeTweenAt(id);
};
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
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 function doInterval():Boolean{
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
var _local5:TweenEvent;
var _local1:Boolean;
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 pause():void{
_isPlaying = false;
}
public function seek(_arg1:Number):void{
var _local2:Number = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
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 _local6:Tween;
var _local2:Boolean;
var _local3:Number = intervalTime;
intervalTime = getTimer();
var _local4:int = activeTweens.length;
var _local5:int = _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 _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
var _local2:int = activeTweens.length;
var _local3:int = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 270
//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 = "3.4.0.9271";
public function TweenEffect(_arg1:Object=null){
super(_arg1);
instanceClass = TweenEffectInstance;
}
protected function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
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);
}
}
}//package mx.effects
Section 271
//Zoom (mx.effects.Zoom)
package mx.effects {
import mx.effects.effectClasses.*;
public class Zoom extends TweenEffect {
public var zoomHeightFrom:Number;
public var zoomWidthTo:Number;
public var originX:Number;
public var zoomHeightTo:Number;
public var originY:Number;
public var captureRollEvents:Boolean;
public var zoomWidthFrom:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
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 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;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
}
}//package mx.effects
Section 272
//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 = "3.4.0.9271";
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 273
//DragEvent (mx.events.DragEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class DragEvent extends MouseEvent {
public var draggedItem:Object;
public var action:String;
public var dragInitiator:IUIComponent;
public var dragSource:DragSource;
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 = "3.4.0.9271";
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 = 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 274
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "3.4.0.9271";
public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
var _local2:String;
var _local1:DynamicEvent = new DynamicEvent(type, bubbles, cancelable);
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
}
}//package mx.events
Section 275
//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 = "3.4.0.9271";
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 276
//EventListenerRequest (mx.events.EventListenerRequest)
package mx.events {
import flash.events.*;
public class EventListenerRequest extends SWFBridgeRequest {
private var _priority:int;
private var _useWeakReference:Boolean;
private var _eventType:String;
private var _useCapture:Boolean;
public static const REMOVE_EVENT_LISTENER_REQUEST:String = "removeEventListenerRequest";
public static const ADD_EVENT_LISTENER_REQUEST:String = "addEventListenerRequest";
mx_internal static const VERSION:String = "3.4.0.9271";
public function EventListenerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:String=null, _arg5:Boolean=false, _arg6:int=0, _arg7:Boolean=false){
super(_arg1, false, false);
_eventType = _arg4;
_useCapture = _arg5;
_priority = _arg6;
_useWeakReference = _arg7;
}
public function get priority():int{
return (_priority);
}
public function get useWeakReference():Boolean{
return (_useWeakReference);
}
public function get eventType():String{
return (_eventType);
}
override public function clone():Event{
return (new EventListenerRequest(type, bubbles, cancelable, eventType, useCapture, priority, useWeakReference));
}
public function get useCapture():Boolean{
return (_useCapture);
}
public static function marshal(_arg1:Event):EventListenerRequest{
var _local2:Object = _arg1;
return (new EventListenerRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.eventType, _local2.useCapture, _local2.priority, _local2.useWeakReference));
}
}
}//package mx.events
Section 277
//FlexChangeEvent (mx.events.FlexChangeEvent)
package mx.events {
import flash.events.*;
public class FlexChangeEvent extends Event {
public var data:Object;
public static const REMOVE_CHILD_BRIDGE:String = "removeChildBridge";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const ADD_CHILD_BRIDGE:String = "addChildBridge";
public function FlexChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new FlexChangeEvent(type, bubbles, cancelable, data));
}
}
}//package mx.events
Section 278
//FlexEvent (mx.events.FlexEvent)
package mx.events {
import flash.events.*;
public class FlexEvent extends Event {
public static const ADD:String = "add";
public static const TRANSFORM_CHANGE:String = "transformChange";
public static const ENTER_FRAME:String = "flexEventEnterFrame";
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 RENDER:String = "flexEventRender";
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 = "3.4.0.9271";
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 279
//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 = "3.4.0.9271";
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 280
//InterManagerRequest (mx.events.InterManagerRequest)
package mx.events {
import flash.events.*;
public class InterManagerRequest extends Event {
public var value:Object;
public var name:String;
public static const TOOLTIP_MANAGER_REQUEST:String = "tooltipManagerRequest";
public static const SYSTEM_MANAGER_REQUEST:String = "systemManagerRequest";
public static const INIT_MANAGER_REQUEST:String = "initManagerRequest";
public static const DRAG_MANAGER_REQUEST:String = "dragManagerRequest";
public static const CURSOR_MANAGER_REQUEST:String = "cursorManagerRequest";
mx_internal static const VERSION:String = "3.4.0.9271";
public function InterManagerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.name = _arg4;
this.value = _arg5;
}
override public function clone():Event{
var _local1:InterManagerRequest = new InterManagerRequest(type, bubbles, cancelable, name, value);
return (_local1);
}
}
}//package mx.events
Section 281
//InvalidateRequestData (mx.events.InvalidateRequestData)
package mx.events {
public final class InvalidateRequestData {
public static const SIZE:uint = 4;
public static const PROPERTIES:uint = 2;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const DISPLAY_LIST:uint = 1;
}
}//package mx.events
Section 282
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 283
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
public class MoveEvent extends Event {
public var oldX:Number;
public var oldY:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
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 284
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
public class PropertyChangeEvent extends Event {
public var newValue:Object;
public var kind:String;
public var property:Object;
public var oldValue:Object;
public var source:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
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 = 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 285
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "3.4.0.9271";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 286
//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 = "3.4.0.9271";
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 287
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_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 ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 288
//RSLEvent (mx.events.RSLEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class RSLEvent extends ProgressEvent {
public var loaderInfo:LoaderInfo;
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 = "3.4.0.9271";
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 289
//SandboxMouseEvent (mx.events.SandboxMouseEvent)
package mx.events {
import flash.events.*;
public class SandboxMouseEvent extends Event {
public var buttonDown:Boolean;
public var altKey:Boolean;
public var ctrlKey:Boolean;
public var shiftKey:Boolean;
public static const CLICK_SOMEWHERE:String = "clickSomewhere";
public static const MOUSE_UP_SOMEWHERE:String = "mouseUpSomewhere";
public static const DOUBLE_CLICK_SOMEWHERE:String = "coubleClickSomewhere";
public static const MOUSE_WHEEL_SOMEWHERE:String = "mouseWheelSomewhere";
public static const MOUSE_DOWN_SOMEWHERE:String = "mouseDownSomewhere";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const MOUSE_MOVE_SOMEWHERE:String = "mouseMoveSomewhere";
public function SandboxMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Boolean=false){
super(_arg1, _arg2, _arg3);
this.ctrlKey = _arg4;
this.altKey = _arg5;
this.shiftKey = _arg6;
this.buttonDown = _arg7;
}
override public function clone():Event{
return (new SandboxMouseEvent(type, bubbles, cancelable, ctrlKey, altKey, shiftKey, buttonDown));
}
public static function marshal(_arg1:Event):SandboxMouseEvent{
var _local2:Object = _arg1;
return (new SandboxMouseEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown));
}
}
}//package mx.events
Section 290
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
public class StateChangeEvent extends Event {
public var newState:String;
public var oldState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "3.4.0.9271";
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 291
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.0.9271";
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 292
//SWFBridgeEvent (mx.events.SWFBridgeEvent)
package mx.events {
import flash.events.*;
public class SWFBridgeEvent extends Event {
public var data:Object;
public static const BRIDGE_FOCUS_MANAGER_ACTIVATE:String = "bridgeFocusManagerActivate";
public static const BRIDGE_WINDOW_ACTIVATE:String = "bridgeWindowActivate";
public static const BRIDGE_WINDOW_DEACTIVATE:String = "brdigeWindowDeactivate";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const BRIDGE_NEW_APPLICATION:String = "bridgeNewApplication";
public static const BRIDGE_APPLICATION_UNLOADING:String = "bridgeApplicationUnloading";
public static const BRIDGE_APPLICATION_ACTIVATE:String = "bridgeApplicationActivate";
public function SWFBridgeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new SWFBridgeEvent(type, bubbles, cancelable, data));
}
public static function marshal(_arg1:Event):SWFBridgeEvent{
var _local2:Object = _arg1;
return (new SWFBridgeEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.data));
}
}
}//package mx.events
Section 293
//SWFBridgeRequest (mx.events.SWFBridgeRequest)
package mx.events {
import flash.events.*;
public class SWFBridgeRequest extends Event {
public var requestor:IEventDispatcher;
public var data:Object;
public static const SHOW_MOUSE_CURSOR_REQUEST:String = "showMouseCursorRequest";
public static const DEACTIVATE_POP_UP_REQUEST:String = "deactivatePopUpRequest";
public static const SET_ACTUAL_SIZE_REQUEST:String = "setActualSizeRequest";
public static const MOVE_FOCUS_REQUEST:String = "moveFocusRequest";
public static const GET_VISIBLE_RECT_REQUEST:String = "getVisibleRectRequest";
public static const ADD_POP_UP_PLACE_HOLDER_REQUEST:String = "addPopUpPlaceHolderRequest";
public static const REMOVE_POP_UP_PLACE_HOLDER_REQUEST:String = "removePopUpPlaceHolderRequest";
public static const RESET_MOUSE_CURSOR_REQUEST:String = "resetMouseCursorRequest";
public static const ADD_POP_UP_REQUEST:String = "addPopUpRequest";
public static const GET_SIZE_REQUEST:String = "getSizeRequest";
public static const SHOW_MODAL_WINDOW_REQUEST:String = "showModalWindowRequest";
public static const ACTIVATE_FOCUS_REQUEST:String = "activateFocusRequest";
public static const DEACTIVATE_FOCUS_REQUEST:String = "deactivateFocusRequest";
public static const HIDE_MOUSE_CURSOR_REQUEST:String = "hideMouseCursorRequest";
public static const ACTIVATE_POP_UP_REQUEST:String = "activatePopUpRequest";
public static const IS_BRIDGE_CHILD_REQUEST:String = "isBridgeChildRequest";
public static const CAN_ACTIVATE_POP_UP_REQUEST:String = "canActivateRequestPopUpRequest";
public static const HIDE_MODAL_WINDOW_REQUEST:String = "hideModalWindowRequest";
public static const INVALIDATE_REQUEST:String = "invalidateRequest";
public static const SET_SHOW_FOCUS_INDICATOR_REQUEST:String = "setShowFocusIndicatorRequest";
public static const CREATE_MODAL_WINDOW_REQUEST:String = "createModalWindowRequest";
mx_internal static const VERSION:String = "3.4.0.9271";
public static const REMOVE_POP_UP_REQUEST:String = "removePopUpRequest";
public function SWFBridgeRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEventDispatcher=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.requestor = _arg4;
this.data = _arg5;
}
override public function clone():Event{
return (new SWFBridgeRequest(type, bubbles, cancelable, requestor, data));
}
public static function marshal(_arg1:Event):SWFBridgeRequest{
var _local2:Object = _arg1;
return (new SWFBridgeRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.requestor, _local2.data));
}
}
}//package mx.events
Section 294
//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 = "3.4.0.9271";
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 295
//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 = "3.4.0.9271";
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 296
//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 = "3.4.0.9271";
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 = "";
var _local2:int = results.length;
var _local3:int;
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 297
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.4.0.9271";
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 _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);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = 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 brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = 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 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 trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _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 298
//RoundedRectangle (mx.graphics.RoundedRectangle)
package mx.graphics {
import flash.geom.*;
public class RoundedRectangle extends Rectangle {
public var cornerRadius:Number;// = 0
mx_internal static const VERSION:String = "3.4.0.9271";
public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
super(_arg1, _arg2, _arg3, _arg4);
this.cornerRadius = _arg5;
}
}
}//package mx.graphics
Section 299
//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 = "3.4.0.9271";
public function PriorityQueue(){
arrayOfArrays = [];
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;
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 _local5:int;
var _local2:Object;
var _local3:int = maxPriority;
var _local4:int = _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;
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 _local4:int;
var _local2:Object;
var _local3:int = _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 300
//EventProxy (mx.managers.systemClasses.EventProxy)
package mx.managers.systemClasses {
import flash.events.*;
import mx.events.*;
import mx.managers.*;
import mx.utils.*;
public class EventProxy extends EventDispatcher {
private var systemManager:ISystemManager;
public function EventProxy(_arg1:ISystemManager){
this.systemManager = _arg1;
}
public function marshalListener(_arg1:Event):void{
var _local2:MouseEvent;
var _local3:SandboxMouseEvent;
if ((_arg1 is MouseEvent)){
_local2 = (_arg1 as MouseEvent);
_local3 = new SandboxMouseEvent(EventUtil.mouseEventMap[_arg1.type], false, false, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown);
systemManager.dispatchEventFromSWFBridges(_local3, null, true, true);
} else {
if (_arg1.type == Event.MOUSE_LEAVE){
_local3 = new SandboxMouseEvent(SandboxMouseEvent.MOUSE_UP_SOMEWHERE);
systemManager.dispatchEventFromSWFBridges(_local3, null, true, true);
systemManager.dispatchEvent(_local3);
};
};
}
}
}//package mx.managers.systemClasses
Section 301
//PlaceholderData (mx.managers.systemClasses.PlaceholderData)
package mx.managers.systemClasses {
import flash.events.*;
public class PlaceholderData {
public var bridge:IEventDispatcher;
public var data:Object;
public var id:String;
public function PlaceholderData(_arg1:String, _arg2:IEventDispatcher, _arg3:Object){
this.id = _arg1;
this.bridge = _arg2;
this.data = _arg3;
}
}
}//package mx.managers.systemClasses
Section 302
//RemotePopUp (mx.managers.systemClasses.RemotePopUp)
package mx.managers.systemClasses {
public class RemotePopUp {
public var window:Object;
public var bridge:Object;
public function RemotePopUp(_arg1:Object, _arg2:Object){
this.window = _arg1;
this.bridge = _arg2;
}
}
}//package mx.managers.systemClasses
Section 303
//CursorManager (mx.managers.CursorManager)
package mx.managers {
import mx.core.*;
public class CursorManager {
mx_internal static const VERSION:String = "3.4.0.9271";
public static const NO_CURSOR:int = 0;
private static var _impl:ICursorManager;
private static var implClassDependency:CursorManagerImpl;
public static function set currentCursorYOffset(_arg1:Number):void{
impl.currentCursorYOffset = _arg1;
}
mx_internal static function registerToUseBusyCursor(_arg1:Object):void{
impl.registerToUseBusyCursor(_arg1);
}
public static function get currentCursorID():int{
return (impl.currentCursorID);
}
public static function getInstance():ICursorManager{
return (impl);
}
public static function removeBusyCursor():void{
impl.removeBusyCursor();
}
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 set currentCursorID(_arg1:int):void{
impl.currentCursorID = _arg1;
}
mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{
impl.unRegisterToUseBusyCursor(_arg1);
}
private static function get impl():ICursorManager{
if (!_impl){
_impl = ICursorManager(Singleton.getInstance("mx.managers::ICursorManager"));
};
return (_impl);
}
public static function removeAllCursors():void{
impl.removeAllCursors();
}
public static function setBusyCursor():void{
impl.setBusyCursor();
}
public static function showCursor():void{
impl.showCursor();
}
public static function hideCursor():void{
impl.hideCursor();
}
public static function removeCursor(_arg1:int):void{
impl.removeCursor(_arg1);
}
public static function get currentCursorXOffset():Number{
return (impl.currentCursorXOffset);
}
public static function get currentCursorYOffset():Number{
return (impl.currentCursorYOffset);
}
public static function set currentCursorXOffset(_arg1:Number):void{
impl.currentCursorXOffset = _arg1;
}
}
}//package mx.managers
Section 304
//CursorManagerImpl (mx.managers.CursorManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
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:ISystemManager;// = null
private var cursorList:Array;
private var _currentCursorYOffset:Number;// = 0
private var cursorHolder:Sprite;
private var currentCursor:DisplayObject;
private var sandboxRoot:IEventDispatcher;// = null
private var showCustomCursor:Boolean;// = false
private var listenForContextMenu:Boolean;// = false
private var customCursorLeftStage:Boolean;// = false
private var _currentCursorID:int;// = 0
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 = "3.4.0.9271";
private static var instance:ICursorManager;
public function CursorManagerImpl(_arg1:ISystemManager=null){
cursorList = [];
busyCursorList = [];
sourceArray = [];
super();
if (((instance) && (!(_arg1)))){
throw (new Error("Instance already exists."));
};
if (_arg1){
this.systemManager = (_arg1 as ISystemManager);
} else {
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
};
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.CURSOR_MANAGER_REQUEST, marshalCursorManagerHandler, false, 0, true);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "update";
sandboxRoot.dispatchEvent(_local2);
}
private function mouseOverHandler(_arg1:MouseEvent):void{
sandboxRoot.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
mouseMoveHandler(_arg1);
}
public function set currentCursorYOffset(_arg1:Number):void{
var _local2:InterManagerRequest;
_currentCursorYOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorYOffset";
_local2.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public function get currentCursorXOffset():Number{
return (_currentCursorXOffset);
}
public function removeCursor(_arg1:int):void{
var _local2:Object;
var _local3:InterManagerRequest;
var _local4:CursorQueueItem;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "removeCursor";
_local3.value = _arg1;
sandboxRoot.dispatchEvent(_local3);
return;
};
for (_local2 in cursorList) {
_local4 = cursorList[_local2];
if (_local4.cursorID == _arg1){
cursorList.splice(_local2, 1);
showCurrentCursor();
break;
};
};
}
public function get currentCursorID():int{
return (_currentCursorID);
}
private function removeContextMenuHandlers():void{
var _local1:InteractiveObject;
var _local2:InteractiveObject;
if (listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
_local2 = (systemManager as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);
};
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);
};
listenForContextMenu = false;
};
}
private function marshalMouseMoveHandler(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (cursorHolder.visible){
cursorHolder.visible = false;
_local2 = new SWFBridgeRequest(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local3 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local3 = systemManager;
};
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
if (_local2.data){
Mouse.show();
};
};
}
public function set currentCursorID(_arg1:int):void{
var _local2:InterManagerRequest;
_currentCursorID = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorID";
_local2.value = currentCursorID;
sandboxRoot.dispatchEvent(_local2);
};
}
private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{
if (_arg1.priority < _arg2.priority){
return (-1);
};
if (_arg1.priority == _arg2.priority){
return (0);
};
return (1);
}
private function mouseOutHandler(_arg1:MouseEvent):void{
if ((((_arg1.relatedObject == null)) && ((cursorList.length > 0)))){
customCursorLeftStage = true;
hideCursor();
Mouse.show();
};
}
public function setBusyCursor():void{
var _local3:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "setBusyCursor";
sandboxRoot.dispatchEvent(_local3);
return;
};
var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
var _local2:Class = _local1.getStyle("busyCursor");
busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW));
}
private function findSource(_arg1:Object):int{
var _local2:int = sourceArray.length;
var _local3:int;
while (_local3 < _local2) {
if (sourceArray[_local3] === _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
private function showCurrentCursor():void{
var _local1:CursorQueueItem;
var _local2:InterManagerRequest;
var _local3:Point;
if (cursorList.length > 0){
if (!initialized){
cursorHolder = new FlexSprite();
cursorHolder.name = "cursorHolder";
cursorHolder.mouseEnabled = false;
cursorHolder.mouseChildren = false;
systemManager.addChildToSandboxRoot("cursorChildren", cursorHolder);
initialized = true;
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "initialized";
sandboxRoot.dispatchEvent(_local2);
};
_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;
};
if ((currentCursor is DisplayObjectContainer)){
DisplayObjectContainer(currentCursor).mouseChildren = false;
};
cursorHolder.addChild(currentCursor);
addContextMenuHandlers();
if ((systemManager is SystemManager)){
_local3 = new Point((SystemManager(systemManager).mouseX + _local1.x), (SystemManager(systemManager).mouseY + _local1.y));
_local3 = SystemManager(systemManager).localToGlobal(_local3);
_local3 = cursorHolder.parent.globalToLocal(_local3);
cursorHolder.x = _local3.x;
cursorHolder.y = _local3.y;
} else {
if ((systemManager is DisplayObject)){
_local3 = new Point((DisplayObject(systemManager).mouseX + _local1.x), (DisplayObject(systemManager).mouseY + _local1.y));
_local3 = DisplayObject(systemManager).localToGlobal(_local3);
_local3 = cursorHolder.parent.globalToLocal(_local3);
cursorHolder.x = (DisplayObject(systemManager).mouseX + _local1.x);
cursorHolder.y = (DisplayObject(systemManager).mouseY + _local1.y);
} else {
cursorHolder.x = _local1.x;
cursorHolder.y = _local1.y;
};
};
if (systemManager.useSWFBridge()){
sandboxRoot.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
} else {
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
sandboxRoot.addEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false, EventPriority.CURSOR_MANAGEMENT);
if (systemManager.useSWFBridge()){
sandboxRoot.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true, EventPriority.CURSOR_MANAGEMENT);
} else {
systemManager.stage.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
};
currentCursorID = _local1.cursorID;
currentCursorXOffset = _local1.x;
currentCursorYOffset = _local1.y;
};
} else {
showCustomCursor = false;
if (currentCursorID != CursorManager.NO_CURSOR){
currentCursorID = CursorManager.NO_CURSOR;
currentCursorXOffset = 0;
currentCursorYOffset = 0;
cursorHolder.removeChild(currentCursor);
removeSystemManagerHandlers();
removeContextMenuHandlers();
};
Mouse.show();
};
}
public function get currentCursorYOffset():Number{
return (_currentCursorYOffset);
}
private function contextMenu_menuSelectHandler(_arg1:ContextMenuEvent):void{
showCustomCursor = true;
sandboxRoot.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
public function hideCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = false;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "hideCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
public function showCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = true;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "showCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
private function marshalCursorManagerHandler(_arg1:Event):void{
var _local3:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:Object = _arg1;
switch (_local2.name){
case "initialized":
initialized = _local2.value;
break;
case "currentCursorID":
_currentCursorID = _local2.value;
break;
case "currentCursorXOffset":
_currentCursorXOffset = _local2.value;
break;
case "currentCursorYOffset":
_currentCursorYOffset = _local2.value;
break;
case "showCursor":
if (cursorHolder){
cursorHolder.visible = true;
};
break;
case "hideCursor":
if (cursorHolder){
cursorHolder.visible = false;
};
break;
case "setCursor":
if (cursorHolder){
_local2.value = setCursor.apply(this, _local2.value);
};
break;
case "removeCursor":
if (cursorHolder){
removeCursor.apply(this, [_local2.value]);
};
break;
case "removeAllCursors":
if (cursorHolder){
removeAllCursors();
};
break;
case "setBusyCursor":
if (cursorHolder){
setBusyCursor();
};
break;
case "removeBusyCursor":
if (cursorHolder){
removeBusyCursor();
};
break;
case "registerToUseBusyCursor":
if (cursorHolder){
registerToUseBusyCursor.apply(this, _local2.value);
};
break;
case "unRegisterToUseBusyCursor":
if (cursorHolder){
unRegisterToUseBusyCursor.apply(this, _local2.value);
};
break;
case "update":
if (cursorHolder){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "initialized";
_local3.value = true;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorID";
_local3.value = currentCursorID;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorXOffset";
_local3.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorYOffset";
_local3.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local3);
};
};
}
public function removeAllCursors():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeAllCursors";
sandboxRoot.dispatchEvent(_local1);
return;
};
cursorList.splice(0);
showCurrentCursor();
}
private function completeHandler(_arg1:Event):void{
var _local2:int = findSource(_arg1.target);
if (_local2 != -1){
sourceArray.splice(_local2, 1);
removeBusyCursor();
};
}
public function removeBusyCursor():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeBusyCursor";
sandboxRoot.dispatchEvent(_local1);
return;
};
if (busyCursorList.length > 0){
removeCursor(int(busyCursorList.pop()));
};
}
private function addContextMenuHandlers():void{
var _local1:InteractiveObject;
var _local2:InteractiveObject;
if (!listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
_local2 = (systemManager as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true, EventPriority.CURSOR_MANAGEMENT);
listenForContextMenu = true;
};
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true, EventPriority.CURSOR_MANAGEMENT);
listenForContextMenu = true;
};
};
}
public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
var _local7:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local7 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local7.name = "setCursor";
_local7.value = [_arg1, _arg2, _arg3, _arg4];
sandboxRoot.dispatchEvent(_local7);
return ((_local7.value as int));
};
var _local5:int = nextCursorID++;
var _local6:CursorQueueItem = new CursorQueueItem();
_local6.cursorID = _local5;
_local6.cursorClass = _arg1;
_local6.priority = _arg2;
_local6.x = _arg3;
_local6.y = _arg4;
if (systemManager){
_local6.systemManager = systemManager;
} else {
_local6.systemManager = ApplicationGlobals.application.systemManager;
};
cursorList.push(_local6);
cursorList.sort(priorityCompare);
showCurrentCursor();
return (_local5);
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:int = findSource(_arg1.target);
if (_local2 == -1){
sourceArray.push(_arg1.target);
setBusyCursor();
};
}
private function removeSystemManagerHandlers():void{
if (systemManager.useSWFBridge()){
sandboxRoot.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
} else {
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
};
sandboxRoot.removeEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false);
if (systemManager.useSWFBridge()){
sandboxRoot.removeEventListener(MouseEvent.MOUSE_OUT, mouseMoveHandler, true);
} else {
systemManager.stage.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true);
};
}
public function registerToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "registerToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local4:SWFBridgeRequest;
var _local5:IEventDispatcher;
var _local2:Point = new Point(_arg1.stageX, _arg1.stageY);
_local2 = cursorHolder.parent.globalToLocal(_local2);
_local2.x = (_local2.x + currentCursorXOffset);
_local2.y = (_local2.y + currentCursorYOffset);
cursorHolder.x = _local2.x;
cursorHolder.y = _local2.y;
var _local3:Object = _arg1.target;
if (((((!(overTextField)) && ((_local3 is TextField)))) && ((_local3.type == TextFieldType.INPUT)))){
overTextField = true;
showSystemCursor = true;
} else {
if (((overTextField) && (!((((_local3 is TextField)) && ((_local3.type == TextFieldType.INPUT))))))){
overTextField = false;
showCustomCursor = true;
} else {
showCustomCursor = true;
};
};
if (showSystemCursor){
showSystemCursor = false;
cursorHolder.visible = false;
Mouse.show();
};
if (showCustomCursor){
showCustomCursor = false;
cursorHolder.visible = true;
Mouse.hide();
_local4 = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local5 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local5 = systemManager;
};
_local4.requestor = _local5;
_local5.dispatchEvent(_local4);
};
}
public function unRegisterToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "unRegisterToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
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{
var _local2:InterManagerRequest;
_currentCursorXOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorXOffset";
_local2.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public static function getInstance():ICursorManager{
if (!instance){
instance = new (CursorManagerImpl);
};
return (instance);
}
}
}//package mx.managers
class CursorQueueItem {
public var priority:int;// = 2
public var cursorClass:Class;// = null
public var cursorID:int;// = 0
public var x:Number;
public var y:Number;
public var systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.4.0.9271";
private function CursorQueueItem(){
}
}
Section 305
//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 = "3.4.0.9271";
public static const LOW:int = 3;
}
}//package mx.managers
Section 306
//ICursorManager (mx.managers.ICursorManager)
package mx.managers {
public interface ICursorManager {
function removeAllCursors():void;
function set currentCursorYOffset(_arg1:Number):void;
function removeBusyCursor():void;
function unRegisterToUseBusyCursor(_arg1:Object):void;
function hideCursor():void;
function get currentCursorID():int;
function registerToUseBusyCursor(_arg1:Object):void;
function setBusyCursor():void;
function showCursor():void;
function set currentCursorID(_arg1:int):void;
function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int;
function removeCursor(_arg1:int):void;
function get currentCursorXOffset():Number;
function get currentCursorYOffset():Number;
function set currentCursorXOffset(_arg1:Number):void;
}
}//package mx.managers
Section 307
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 308
//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 309
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
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 310
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 311
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 312
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 313
//IToolTipManager2 (mx.managers.IToolTipManager2)
package mx.managers {
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public interface IToolTipManager2 {
function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function get scrubDelay():Number;
function set hideEffect(_arg1:IAbstractEffect):void;
function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip;
function set scrubDelay(_arg1:Number):void;
function set hideDelay(_arg1:Number):void;
function get currentTarget():DisplayObject;
function set showDelay(_arg1:Number):void;
function get showDelay():Number;
function get showEffect():IAbstractEffect;
function get hideDelay():Number;
function get currentToolTip():IToolTip;
function get hideEffect():IAbstractEffect;
function set currentToolTip(_arg1:IToolTip):void;
function get toolTipClass():Class;
function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function destroyToolTip(_arg1:IToolTip):void;
function set toolTipClass(_arg1:Class):void;
function sizeTip(_arg1:IToolTip):void;
function set currentTarget(_arg1:DisplayObject):void;
function set showEffect(_arg1:IAbstractEffect):void;
}
}//package mx.managers
Section 314
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function get toolTip():String;
function set toolTip(_arg1:String):void;
}
}//package mx.managers
Section 315
//LayoutManager (mx.managers.LayoutManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import mx.managers.layoutClasses.*;
public class LayoutManager extends EventDispatcher implements ILayoutManager {
private var invalidateClientPropertiesFlag:Boolean;// = false
private var invalidateDisplayListQueue:PriorityQueue;
private var updateCompleteQueue:PriorityQueue;
private var invalidateDisplayListFlag:Boolean;// = false
private var invalidateClientSizeFlag:Boolean;// = false
private var invalidateSizeQueue:PriorityQueue;
private var originalFrameRate:Number;
private var invalidatePropertiesFlag:Boolean;// = false
private var invalidatePropertiesQueue:PriorityQueue;
private var invalidateSizeFlag:Boolean;// = false
private var callLaterPending:Boolean;// = false
private var _usePhasedInstantiation:Boolean;// = false
private var callLaterObject:UIComponent;
private var targetLevel:int;// = 2147483647
mx_internal static const VERSION:String = "3.4.0.9271";
private static var instance:LayoutManager;
public function LayoutManager(){
updateCompleteQueue = new PriorityQueue();
invalidatePropertiesQueue = new PriorityQueue();
invalidateSizeQueue = new PriorityQueue();
invalidateDisplayListQueue = new PriorityQueue();
super();
}
public function set usePhasedInstantiation(_arg1:Boolean):void{
var sm:ISystemManager;
var stage:Stage;
var value = _arg1;
if (_usePhasedInstantiation != value){
_usePhasedInstantiation = value;
try {
sm = SystemManagerGlobals.topLevelSystemManagers[0];
stage = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (stage){
if (value){
originalFrameRate = stage.frameRate;
stage.frameRate = 1000;
} else {
stage.frameRate = originalFrameRate;
};
};
} catch(e:SecurityError) {
};
};
}
private function waitAFrame():void{
callLaterObject.callLater(doPhasedInstantiation);
}
public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{
var _local3:ILayoutManagerClient;
var _local4:int;
var _local5:Boolean;
var _local6:int = 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 validateProperties():void{
var _local1:ILayoutManagerClient = 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;
};
}
public function invalidateProperties(_arg1:ILayoutManagerClient):void{
if (((!(invalidatePropertiesFlag)) && (ApplicationGlobals.application.systemManager))){
invalidatePropertiesFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.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)) && (ApplicationGlobals.application.systemManager))){
invalidateDisplayListFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
} else {
if (((!(invalidateDisplayListFlag)) && (!(ApplicationGlobals.application.systemManager)))){
};
};
invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel);
}
private function validateDisplayList():void{
var _local1:ILayoutManagerClient = 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;
};
}
public function validateNow():void{
var _local1:int;
if (!usePhasedInstantiation){
_local1 = 0;
while (((callLaterPending) && ((_local1 < 100)))) {
doPhasedInstantiation();
};
};
}
private function validateSize():void{
var _local1:ILayoutManagerClient = 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;
};
}
private function doPhasedInstantiation():void{
var _local1:ILayoutManagerClient;
if (usePhasedInstantiation){
if (invalidatePropertiesFlag){
validateProperties();
ApplicationGlobals.application.dispatchEvent(new Event("validatePropertiesComplete"));
} else {
if (invalidateSizeFlag){
validateSize();
ApplicationGlobals.application.dispatchEvent(new Event("validateSizeComplete"));
} else {
if (invalidateDisplayListFlag){
validateDisplayList();
ApplicationGlobals.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 isInvalid():Boolean{
return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag)));
}
public function get usePhasedInstantiation():Boolean{
return (_usePhasedInstantiation);
}
public function invalidateSize(_arg1:ILayoutManagerClient):void{
if (((!(invalidateSizeFlag)) && (ApplicationGlobals.application.systemManager))){
invalidateSizeFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientSizeFlag = true;
};
invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel);
}
public static function getInstance():LayoutManager{
if (!instance){
instance = new (LayoutManager);
};
return (instance);
}
}
}//package mx.managers
Section 316
//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 = "3.4.0.9271";
public static const POPUP:String = "popup";
}
}//package mx.managers
Section 317
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.4.0.9271";
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 = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1));
return (_local2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = 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 = 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 (((!((_arg1 == owner))) && (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 = 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);
}
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);
}
}
}//package mx.managers
Section 318
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.text.*;
import mx.managers.systemClasses.*;
import mx.preloaders.*;
import mx.utils.*;
import mx.messaging.config.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager, ISWFBridgeProvider {
private var _stage:Stage;
mx_internal var nestLevel:int;// = 0
private var currentSandboxEvent:Event;
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var preloader:Preloader;
private var lastFrame:int;
private var _document:Object;
private var strongReferenceProxies:Dictionary;
private var _rawChildren:SystemRawChildrenList;
private var _topLevelSystemManager:ISystemManager;
private var _toolTipIndex:int;// = 0
private var _bridgeToFocusManager:Dictionary;
private var _explicitHeight:Number;
private var idToPlaceholder:Object;
private var _swfBridgeGroup:ISWFBridgeGroup;
private var _toolTipChildren:SystemChildrenList;
private var form:Object;
private var _width:Number;
private var initialized:Boolean;// = false
private var _focusPane:Sprite;
private var _fontList:Object;// = null
private var isStageRoot:Boolean;// = true
private var _popUpChildren:SystemChildrenList;
private var _topMostIndex:int;// = 0
private var nextFrameTimer:Timer;// = null
mx_internal var topLevel:Boolean;// = true
private var weakReferenceProxies:Dictionary;
private var _cursorIndex:int;// = 0
private var isBootstrapRoot:Boolean;// = false
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
mx_internal var _mouseX;
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var _cursorChildren:SystemChildrenList;
private var initCallbackFunctions:Array;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var isDispatchingResizeEvent:Boolean;
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
private var eventProxy:EventProxy;
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 = "3.4.0.9271";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
initCallbackFunctions = [];
forms = [];
weakReferenceProxies = new Dictionary(true);
strongReferenceProxies = new Dictionary(false);
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;
var _local1:Array = info()["compiledLocales"];
ResourceBundle.locale = (((!((_local1 == null))) && ((_local1.length > 0)))) ? _local1[0] : "en_US";
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.")));
};
if (((root) && (root.loaderInfo))){
root.loaderInfo.addEventListener(Event.INIT, initHandler);
};
}
private function removeEventListenerFromSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:IEventDispatcher=null):void{
var _local8:int;
if (!swfBridgeGroup){
return;
};
var _local5:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3);
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg4))))){
_local6.removeEventListener(_arg1, _arg2, _arg3);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg4){
IEventDispatcher(_local7[_local8]).removeEventListener(_arg1, _arg2, _arg3);
};
_local8++;
};
dispatchEventFromSWFBridges(_local5, _arg4);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local4:DisplayObjectContainer;
var _local2 = 1;
if (((!(topLevel)) && (parent))){
_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;
};
var _local3:Class = 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();
};
}
private function dispatchEventToOtherSystemManagers(_arg1:Event):void{
SystemManagerGlobals.dispatchingEventToOtherSystemManagers = true;
var _local2:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
if (_local2[_local4] != this){
_local2[_local4].dispatchEvent(_arg1);
};
_local4++;
};
SystemManagerGlobals.dispatchingEventToOtherSystemManagers = false;
}
private function idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
private function initManagerHandler(_arg1:Event):void{
var event = _arg1;
if (!SystemManagerGlobals.dispatchingEventToOtherSystemManagers){
dispatchEventToOtherSystemManagers(event);
};
if ((event is InterManagerRequest)){
return;
};
var name:String = event["name"];
try {
Singleton.getInstance(name);
} catch(e:Error) {
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
public function get preloadedRSLs():Dictionary{
return (null);
}
private function getSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
_local2.data = {width:measuredWidth, height:measuredHeight};
}
private function beforeUnloadHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (((topLevel) && (stage))){
_local2 = getSandboxRoot();
if (_local2 != this){
_local2.removeEventListener(Event.RESIZE, Stage_resizeHandler);
};
};
removeParentBridgeListeners();
dispatchEvent(_arg1);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function getVisibleRectRequestHandler(_arg1:Event):void{
var _local5:Rectangle;
var _local7:Point;
var _local8:IEventDispatcher;
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Rectangle = Rectangle(_local2.data);
var _local4:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(_local2.requestor));
var _local6:Boolean;
if (!DisplayObjectContainer(document).contains(_local4)){
_local6 = false;
};
if ((_local4 is ISWFLoader)){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
} else {
_local5 = _local4.getBounds(this);
_local7 = localToGlobal(_local5.topLeft);
_local5.x = _local7.x;
_local5.y = _local7.y;
};
_local3 = _local3.intersection(_local5);
_local2.data = _local3;
if (((_local6) && (useSWFBridge()))){
_local8 = swfBridgeGroup.parentBridge;
_local2.requestor = _local8;
_local8.dispatchEvent(_local2);
};
Object(_arg1).data = _local2.data;
}
mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local6:IStyleClient;
var _local3:Boolean;
var _local4:int = rawChildren.numChildren;
var _local5:int;
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);
};
}
private function addEventListenerToOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var _local6:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local6.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
if (_local6[_local8] != this){
_local6[_local8].addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
};
_local8++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
private function initHandler(_arg1:Event):void{
var bridgeEvent:SWFBridgeEvent;
var event = _arg1;
if (!isStageRoot){
if (root.loaderInfo.parentAllowsChild){
try {
if (((!(parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))) || (!(root.loaderInfo.sharedEvents.hasEventListener(SWFBridgeEvent.BRIDGE_NEW_APPLICATION))))){
isBootstrapRoot = true;
};
} catch(e:Error) {
};
};
};
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
if (useSWFBridge()){
swfBridgeGroup = new SWFBridgeGroup(this);
swfBridgeGroup.parentBridge = loaderInfo.sharedEvents;
addParentBridgeListeners();
bridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_NEW_APPLICATION);
bridgeEvent.data = swfBridgeGroup.parentBridge;
swfBridgeGroup.parentBridge.dispatchEvent(bridgeEvent);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
root.loaderInfo.addEventListener(Event.UNLOAD, unloadHandler, false, 0, true);
};
var sbRoot:DisplayObject = getSandboxRoot();
sbRoot.addEventListener(InterManagerRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
if (sbRoot == this){
addEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, multiWindowRedispatcher);
addEventListener("dispatchDragEvent", multiWindowRedispatcher);
addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
};
var docFrame:int = ((totalFrames)==1) ? 0 : 1;
addEventListener(Event.ENTER_FRAME, docFrameListener);
initialize();
}
mx_internal function findFocusManagerContainer(_arg1:SystemManagerProxy):IFocusManagerContainer{
var _local5:DisplayObject;
var _local2:IChildList = _arg1.rawChildren;
var _local3:int = _local2.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local5));
};
_local4++;
};
return (null);
}
private function addPlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:RemotePopUp;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
if (!forwardPlaceholderRequest(_local2, true)){
_local3 = new RemotePopUp(_local2.data.placeHolderId, _local2.requestor);
forms.push(_local3);
};
}
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 modalWindowRequestHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!preProcessModalWindowRequest(_local2, getSandboxRoot())){
return;
};
Singleton.getInstance("mx.managers::IPopUpManager");
dispatchEvent(_local2);
}
private function activateApplicationSandboxEventHandler(_arg1:Event):void{
if (!isTopLevelRoot()){
swfBridgeGroup.parentBridge.dispatchEvent(_arg1);
return;
};
activateForm(document);
}
public function getDefinitionByName(_arg1:String):Object{
var _local3:Object;
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain);
if (_local2.hasDefinition(_arg1)){
_local3 = _local2.getDefinition(_arg1);
};
return (_local3);
}
public function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].removeChild(_arg2);
} else {
removingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".removeChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childRemoved(_arg2);
};
}
private function removeEventListenerFromOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var _local4:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local4.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
if (_local4[_local6] != this){
_local4[_local6].removeEventListener(_arg1, _arg2, _arg3);
};
_local6++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
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 = (_arg1 - _cursorIndex);
_cursorIndex = _arg1;
}
mx_internal function addChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addChildBridgeListeners(_arg1);
return;
};
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
override public function getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt((applicationIndex + _arg1)));
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new SystemRawChildrenList(this);
};
return (_rawChildren);
}
private function findLastActiveForm(_arg1:Object):Object{
var _local2:int = forms.length;
var _local3:int = (forms.length - 1);
while (_local3 >= 0) {
if (((!((forms[_local3] == _arg1))) && (canActivatePopUp(forms[_local3])))){
return (forms[_local3]);
};
_local3--;
};
return (null);
}
private function multiWindowRedispatcher(_arg1:Event):void{
if (!SystemManagerGlobals.dispatchingEventToOtherSystemManagers){
dispatchEventToOtherSystemManagers(_arg1);
};
}
public function deployMouseShields(_arg1:Boolean):void{
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST, false, false, "mouseShield", _arg1);
getSandboxRoot().dispatchEvent(_local2);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
var priority = _arg4;
var useWeakReference = _arg5;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.addEventListener(type, listener, useCapture, priority, useWeakReference);
} else {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
} catch(error:SecurityError) {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
if (((stage) && ((type == Event.RENDER)))){
stage.invalidate();
};
return;
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
try {
if (stage){
stage.addEventListener(type, stageEventHandler, false, 0, true);
};
} catch(error:SecurityError) {
};
};
if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE){
try {
if (stage){
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
} else {
super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
};
} catch(error:SecurityError) {
super.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler, false, 0, true);
};
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
addEventListenerToSandboxes(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
addEventListenerToOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture, priority, useWeakReference);
};
if (getSandboxRoot() == this){
super.addEventListener(actualType, eventProxy.marshalListener, useCapture, priority, useWeakReference);
if (actualType == MouseEvent.MOUSE_UP){
try {
if (stage){
stage.addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener, useCapture, priority, useWeakReference);
} else {
super.addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener, useCapture, priority, useWeakReference);
};
} catch(e:SecurityError) {
super.addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener, useCapture, priority, useWeakReference);
};
};
};
super.addEventListener(type, listener, false, priority, useWeakReference);
return;
};
};
if ((((type == 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(type, listener, useCapture, priority, useWeakReference);
}
private function activateForm(_arg1:Object):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
if (!areRemotePopUpsEqual(form, _arg1)){
deactivateRemotePopUp(form);
};
} else {
_local2 = IFocusManagerContainer(form);
_local2.focusManager.deactivate();
};
};
};
form = _arg1;
if (isRemotePopUp(_arg1)){
activateRemotePopUp(_arg1);
} else {
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
};
updateLastActiveForm();
}
public function removeFocusManager(_arg1:IFocusManagerContainer):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (forms[_local3] == _arg1){
if (form == _arg1){
deactivate(_arg1);
};
dispatchDeactivatedWindowEvent(DisplayObject(_arg1));
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
private function getSandboxScreen():Rectangle{
var _local2:Rectangle;
var _local3:DisplayObject;
var _local4:InterManagerRequest;
var _local1:DisplayObject = getSandboxRoot();
if (_local1 == this){
_local2 = new Rectangle(0, 0, width, height);
} else {
if (_local1 == topLevelSystemManager){
_local3 = DisplayObject(topLevelSystemManager);
_local2 = new Rectangle(0, 0, _local3.width, _local3.height);
} else {
_local4 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false, "screen");
_local1.dispatchEvent(_local4);
_local2 = Rectangle(_local4.value);
};
};
return (_local2);
}
public function get focusPane():Sprite{
return (_focusPane);
}
override public function get mouseX():Number{
if (_mouseX === undefined){
return (super.mouseX);
};
return (_mouseX);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local3:int;
var _local4:DisplayObject;
var _local5:Boolean;
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:IChildList;
var _local12:DisplayObject;
var _local13:Boolean;
var _local14:int;
idleCounter = 0;
var _local2:IEventDispatcher = getSWFBridgeOfDisplayObject((_arg1.target as DisplayObject));
if (((_local2) && ((bridgeToFocusManager[_local2] == document.focusManager)))){
if (isTopLevelRoot()){
activateForm(document);
} else {
dispatchActivatedApplicationEvent();
};
return;
};
if (numModalWindows == 0){
if (((!(isTopLevelRoot())) || ((forms.length > 1)))){
_local3 = forms.length;
_local4 = DisplayObject(_arg1.target);
_local5 = document.rawChildren.contains(_local4);
while (_local4) {
_local6 = 0;
while (_local6 < _local3) {
_local7 = (isRemotePopUp(forms[_local6])) ? forms[_local6].window : forms[_local6];
if (_local7 == _local4){
_local8 = 0;
if (((((!((_local4 == form))) && ((_local4 is IFocusManagerContainer)))) || (((!(isTopLevelRoot())) && ((_local4 == form)))))){
if (isTopLevelRoot()){
activate(IFocusManagerContainer(_local4));
};
if (_local4 == document){
dispatchActivatedApplicationEvent();
} else {
if ((_local4 is DisplayObject)){
dispatchActivatedWindowEvent(DisplayObject(_local4));
};
};
};
if (popUpChildren.contains(_local4)){
_local11 = popUpChildren;
} else {
_local11 = this;
};
_local9 = _local11.getChildIndex(_local4);
_local10 = _local9;
_local3 = forms.length;
_local8 = 0;
for (;_local8 < _local3;_local8++) {
_local13 = isRemotePopUp(forms[_local8]);
if (_local13){
if ((forms[_local8].window is String)){
continue;
};
_local12 = forms[_local8].window;
} else {
_local12 = forms[_local8];
};
if (_local13){
_local14 = getChildListIndex(_local11, _local12);
if (_local14 > _local9){
_local10 = Math.max(_local14, _local10);
};
} else {
if (_local11.contains(_local12)){
if (_local11.getChildIndex(_local12) > _local9){
_local10 = Math.max(_local11.getChildIndex(_local12), _local10);
};
};
};
};
if ((((_local10 > _local9)) && (!(_local5)))){
_local11.setChildIndex(_local4, _local10);
};
return;
};
_local6++;
};
_local4 = _local4.parent;
};
} else {
dispatchActivatedApplicationEvent();
};
};
}
public function allowInsecureDomain(... _args):void{
}
private function removePopupRequestHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (popUpChildren.contains(_local2.data.window)){
popUpChildren.removeChild(_local2.data.window);
} else {
removeChild(DisplayObject(_local2.data.window));
};
if (_local2.data.modal){
numModalWindows--;
};
removeRemotePopUp(new RemotePopUp(_local2.data.window, _local2.requestor));
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {placeHolderId:NameUtil.displayObjectToString(_local2.data.window)});
dispatchEvent(_local3);
};
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
var _local3:IFocusManager;
var _local4:DisplayObject = _arg2;
while (_local4) {
if ((_local4 is IFocusManagerContainer)){
_local3 = IFocusManagerContainer(_local4).focusManager;
break;
};
_local4 = _local4.parent;
};
if (!_local3){
return;
};
if (!swfBridgeGroup){
swfBridgeGroup = new SWFBridgeGroup(this);
};
swfBridgeGroup.addChildBridge(_arg1, ISWFBridgeProvider(_arg2));
_local3.addSWFBridge(_arg1, _arg2);
if (!bridgeToFocusManager){
bridgeToFocusManager = new Dictionary();
};
bridgeToFocusManager[_arg1] = _local3;
addChildBridgeListeners(_arg1);
dispatchEvent(new FlexChangeEvent(FlexChangeEvent.ADD_CHILD_BRIDGE, false, false, _arg1));
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
if (!isStageRoot){
Stage_resizeHandler();
};
return (_screen);
}
private function resetMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = true;
};
};
}
private function preloader_rslCompleteHandler(_arg1:RSLEvent):void{
if (_arg1.loaderInfo){
preloadedRSLs[_arg1.loaderInfo] = _arg1.url.url;
};
}
mx_internal function set topMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _topMostIndex);
_topMostIndex = _arg1;
toolTipIndex = (toolTipIndex + _local2);
}
mx_internal function docFrameHandler(_arg1:Event=null):void{
var _local3:TextFieldFactory;
var _local5:int;
var _local6:int;
var _local7:Class;
Singleton.registerClass("mx.managers::IBrowserManager", Class(getDefinitionByName("mx.managers::BrowserManagerImpl")));
Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
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.managers::IToolTipManager2", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));
var _local2:Class;
_local2 = Class(getDefinitionByName("mx.managers::NativeDragManagerImpl"));
if (_local2 == null){
_local2 = Class(getDefinitionByName("mx.managers::DragManagerImpl"));
};
Singleton.registerClass("mx.managers::IDragManager", _local2);
Singleton.registerClass("mx.core::ITextFieldFactory", Class(getDefinitionByName("mx.core::TextFieldFactory")));
executeCallbacks();
doneExecutingInitCallbacks = true;
var _local4:Array = info()["mixins"];
if (((_local4) && ((_local4.length > 0)))){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = Class(getDefinitionByName(_local4[_local6]));
var _local8 = _local7;
_local8["init"](this);
_local6++;
};
};
installCompiledResourceBundles();
initializeTopLevelWindow(null);
deferredNextFrame();
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get preloaderBackgroundSize():String{
return (info()["backgroundSize"]);
}
public function isTopLevel():Boolean{
return (topLevel);
}
override public function get mouseY():Number{
if (_mouseY === undefined){
return (super.mouseY);
};
return (_mouseY);
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function deactivate(_arg1:IFocusManagerContainer):void{
deactivateForm(Object(_arg1));
}
private function preProcessModalWindowRequest(_arg1:SWFBridgeRequest, _arg2:DisplayObject):Boolean{
var _local3:IEventDispatcher;
var _local4:ISWFLoader;
var _local5:Rectangle;
if (_arg1.data.skip){
_arg1.data.skip = false;
if (useSWFBridge()){
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
_local3.dispatchEvent(_arg1);
};
return (false);
};
if (this != _arg2){
if ((((_arg1.type == SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST)) || ((_arg1.type == SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST)))){
_local4 = (swfBridgeGroup.getChildBridgeProvider(_arg1.requestor) as ISWFLoader);
if (_local4){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
_arg1.data.excludeRect = _local5;
if (!DisplayObjectContainer(document).contains(DisplayObject(_local4))){
_arg1.data.useExclude = false;
};
};
};
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
if (_arg1.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST){
_arg2.dispatchEvent(_arg1);
} else {
_local3.dispatchEvent(_arg1);
};
return (false);
};
_arg1.data.skip = false;
return (true);
}
private function resetMouseCursorTracking(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (isTopLevelRoot()){
SystemManagerGlobals.showMouseCursor = true;
} else {
if (swfBridgeGroup.parentBridge){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST);
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
};
};
}
mx_internal function addParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.addEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
public function get swfBridgeGroup():ISWFBridgeGroup{
if (topLevel){
return (_swfBridgeGroup);
};
if (topLevelSystemManager){
return (topLevelSystemManager.swfBridgeGroup);
};
return (null);
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
dispatchEvent(new FlexChangeEvent(FlexChangeEvent.REMOVE_CHILD_BRIDGE, false, false, _arg1));
var _local2:IFocusManager = IFocusManager(bridgeToFocusManager[_arg1]);
_local2.removeSWFBridge(_arg1);
swfBridgeGroup.removeChildBridge(_arg1);
delete bridgeToFocusManager[_arg1];
removeChildBridgeListeners(_arg1);
}
mx_internal function removeChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeChildBridgeListeners(_arg1);
return;
};
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var m:Number;
var n:Number;
var sandboxScreen:Rectangle;
var event = _arg1;
if (isDispatchingResizeEvent){
return;
};
var w:Number = 0;
var h:Number = 0;
try {
m = loaderInfo.width;
n = loaderInfo.height;
} catch(error:Error) {
if (!_screen){
_screen = new Rectangle();
};
return;
};
var align:String = StageAlign.TOP_LEFT;
try {
if (stage){
w = stage.stageWidth;
h = stage.stageHeight;
align = stage.align;
};
} catch(error:SecurityError) {
sandboxScreen = getSandboxScreen();
w = sandboxScreen.width;
h = sandboxScreen.height;
};
var x:Number = ((m - w) / 2);
var y:Number = ((n - h) / 2);
if (align == StageAlign.TOP){
y = 0;
} else {
if (align == StageAlign.BOTTOM){
y = (n - h);
} else {
if (align == StageAlign.LEFT){
x = 0;
} else {
if (align == StageAlign.RIGHT){
x = (m - w);
} else {
if ((((align == StageAlign.TOP_LEFT)) || ((align == "LT")))){
y = 0;
x = 0;
} else {
if (align == StageAlign.TOP_RIGHT){
y = 0;
x = (m - w);
} else {
if (align == StageAlign.BOTTOM_LEFT){
y = (n - h);
x = 0;
} else {
if (align == StageAlign.BOTTOM_RIGHT){
y = (n - h);
x = (m - w);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = x;
_screen.y = y;
_screen.width = w;
_screen.height = h;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (event){
resizeMouseCatcher();
isDispatchingResizeEvent = true;
dispatchEvent(event);
isDispatchingResizeEvent = false;
};
}
public function get swfBridge():IEventDispatcher{
if (swfBridgeGroup){
return (swfBridgeGroup.parentBridge);
};
return (null);
}
private function findRemotePopUp(_arg1:Object, _arg2:IEventDispatcher):RemotePopUp{
var _local5:RemotePopUp;
var _local3:int = forms.length;
var _local4:int;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
_local5 = RemotePopUp(forms[_local4]);
if ((((_local5.window == _arg1)) && ((_local5.bridge == _arg2)))){
return (_local5);
};
};
_local4++;
};
return (null);
}
public function info():Object{
return ({});
}
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));
}
private function removePlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:int;
var _local4:int;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!forwardPlaceholderRequest(_local2, false)){
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
if ((((forms[_local4].window == _local2.data.placeHolderId)) && ((forms[_local4].bridge == _local2.requestor)))){
forms.splice(_local4, 1);
break;
};
};
_local4++;
};
};
}
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;
};
}
mx_internal function removeParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.removeEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
override public function get parent():DisplayObjectContainer{
try {
return (super.parent);
} catch(e:SecurityError) {
};
return (null);
}
private function eventListenerRequestHandler(_arg1:Event):void{
var _local2:String;
if ((_arg1 is EventListenerRequest)){
return;
};
var _local3:EventListenerRequest = EventListenerRequest.marshal(_arg1);
if (_arg1.type == EventListenerRequest.ADD_EVENT_LISTENER_REQUEST){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(_local3.eventType, sandboxMouseListener, true, _local3.priority, _local3.useWeakReference, (_arg1.target as IEventDispatcher));
addEventListenerToOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true, _local3.priority, _local3.useWeakReference);
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.addEventListener(_local2, eventProxy.marshalListener, false, _local3.priority, _local3.useWeakReference);
};
super.addEventListener(_local2, eventProxy.marshalListener, true, _local3.priority, _local3.useWeakReference);
};
};
} else {
if (_arg1.type == EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST){
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
removeEventListenerFromOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true);
removeEventListenerFromSandboxes(_local3.eventType, sandboxMouseListener, true, (_arg1.target as IEventDispatcher));
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.removeEventListener(_local2, eventProxy.marshalListener);
};
super.removeEventListener(_local2, eventProxy.marshalListener, true);
};
};
};
};
}
mx_internal function set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
private function showMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
Object(_arg1).data = _local2.data;
} else {
if (eventProxy){
Object(_arg1).data = SystemManagerGlobals.showMouseCursor;
};
};
}
public function get childAllowsParent():Boolean{
try {
return (loaderInfo.childAllowsParent);
} catch(error:Error) {
};
return (false);
}
public function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:Event;
if (_arg4){
dispatchEventToOtherSystemManagers(_arg1);
};
if (!swfBridgeGroup){
return;
};
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg2))))){
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = _local6;
};
_local6.dispatchEvent(_local5);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
var _local8:int;
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg2){
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = IEventDispatcher(_local7[_local8]);
};
IEventDispatcher(_local7[_local8]).dispatchEvent(_local5);
};
_local8++;
};
currentSandboxEvent = null;
}
private function setActualSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
setActualSize(_local2.data.width, _local2.data.height);
}
private function executeCallbacks():void{
var _local1:Function;
if (((!(parent)) && (parentAllowsChild))){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
private function addPlaceholderId(_arg1:String, _arg2:String, _arg3:IEventDispatcher, _arg4:Object):void{
if (!_arg3){
throw (new Error());
};
if (!idToPlaceholder){
idToPlaceholder = [];
};
idToPlaceholder[_arg1] = new PlaceholderData(_arg2, _arg3, _arg4);
}
private function canActivateHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local6:PlaceholderData;
var _local7:RemotePopUp;
var _local8:SystemManagerProxy;
var _local9:IFocusManagerContainer;
var _local10:IEventDispatcher;
var _local2:Object = Object(_arg1);
var _local4:Object = _local2.data;
var _local5:String;
if ((_local2.data is String)){
_local6 = idToPlaceholder[_local2.data];
_local4 = _local6.data;
_local5 = _local6.id;
if (_local5 == null){
_local7 = findRemotePopUp(_local4, _local6.bridge);
if (_local7){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, IEventDispatcher(_local7.bridge), _local7.window);
if (_local7.bridge){
_local7.bridge.dispatchEvent(_local3);
_local2.data = _local3.data;
};
return;
};
};
};
if ((_local4 is SystemManagerProxy)){
_local8 = SystemManagerProxy(_local4);
_local9 = findFocusManagerContainer(_local8);
_local2.data = ((((_local8) && (_local9))) && (canActivateLocalComponent(_local9)));
} else {
if ((_local4 is IFocusManagerContainer)){
_local2.data = canActivateLocalComponent(_local4);
} else {
if ((_local4 is IEventDispatcher)){
_local10 = IEventDispatcher(_local4);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, _local10, _local5);
if (_local10){
_local10.dispatchEvent(_local3);
_local2.data = _local3.data;
};
} else {
throw (new Error());
};
};
};
}
private function docFrameListener(_arg1:Event):void{
if (currentFrame == 2){
removeEventListener(Event.ENTER_FRAME, docFrameListener);
if (totalFrames > 2){
addEventListener(Event.ENTER_FRAME, extraFrameListener);
};
docFrameHandler();
};
}
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);
}
private function addEventListenerToSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false, _arg6:IEventDispatcher=null):void{
var _local10:int;
var _local11:IEventDispatcher;
if (!swfBridgeGroup){
return;
};
var _local7:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3, _arg4, _arg5);
var _local8:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local8) && (!((_local8 == _arg6))))){
_local8.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
var _local9:Array = swfBridgeGroup.getChildBridges();
while (_local10 < _local9.length) {
_local11 = IEventDispatcher(_local9[_local10]);
if (_local11 != _arg6){
_local11.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
_local10++;
};
dispatchEventFromSWFBridges(_local7, _arg6);
}
private function forwardFormEvent(_arg1:SWFBridgeEvent):Boolean{
var _local3:DisplayObject;
if (isTopLevelRoot()){
return (false);
};
var _local2:IEventDispatcher = swfBridgeGroup.parentBridge;
if (_local2){
_local3 = getSandboxRoot();
_arg1.data.notifier = _local2;
if (_local3 == this){
if (!(_arg1.data.window is String)){
_arg1.data.window = NameUtil.displayObjectToString(DisplayObject(_arg1.data.window));
} else {
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local2.dispatchEvent(_arg1);
} else {
if ((_arg1.data.window is String)){
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local3.dispatchEvent(_arg1);
};
};
return (true);
}
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);
}
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);
}
public function create(... _args):Object{
var _local4:String;
var _local5:int;
var _local6:int;
var _local2:String = info()["mainClassName"];
if (_local2 == null){
_local4 = loaderInfo.loaderURL;
_local5 = _local4.lastIndexOf(".");
_local6 = _local4.lastIndexOf("/");
_local2 = _local4.substring((_local6 + 1), _local5);
};
var _local3:Class = Class(getDefinitionByName(_local2));
return ((_local3) ? new (_local3) : null);
}
override public function get stage():Stage{
var _local2:DisplayObject;
if (_stage){
return (_stage);
};
var _local1:Stage = super.stage;
if (_local1){
_stage = _local1;
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_stage = _topLevelSystemManager.stage;
return (_stage);
};
if (((!(isStageRoot)) && (topLevel))){
_local2 = getTopLevelRoot();
if (_local2){
_stage = _local2.stage;
return (_stage);
};
};
return (null);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
private function removeRemotePopUp(_arg1:RemotePopUp):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (isRemotePopUp(forms[_local3])){
if ((((forms[_local3].window == _arg1.window)) && ((forms[_local3].bridge == _arg1.bridge)))){
if (forms[_local3] == _arg1){
deactivateForm(_arg1);
};
forms.splice(_local3, 1);
break;
};
};
_local3++;
};
}
private function deactivateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function activate(_arg1:IFocusManagerContainer):void{
activateForm(_arg1);
}
public function getSandboxRoot():DisplayObject{
var parent:DisplayObject;
var lastParent:DisplayObject;
var loader:Loader;
var loaderInfo:LoaderInfo;
var sm:ISystemManager = this;
try {
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
if ((parent is Stage)){
return (DisplayObject(sm));
};
if (((parent) && (!(parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))))){
return (this);
};
lastParent = this;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true))){
return (lastParent);
};
if ((parent is Loader)){
loader = Loader(parent);
loaderInfo = loader.contentLoaderInfo;
if (!loaderInfo.childAllowsParent){
return (loaderInfo.content);
};
};
if (parent.hasEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST)){
lastParent = parent;
};
parent = parent.parent;
};
} catch(error:Error) {
};
return (((lastParent)!=null) ? lastParent : DisplayObject(sm));
}
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);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, (applicationIndex + _arg2));
}
public function get document():Object{
return (_document);
}
private function resizeMouseCatcher():void{
var g:Graphics;
var s:Rectangle;
if (mouseCatcher){
try {
g = mouseCatcher.graphics;
s = screen;
g.clear();
g.beginFill(0, 0);
g.drawRect(0, 0, s.width, s.height);
g.endFill();
} catch(e:SecurityError) {
};
};
}
private function extraFrameListener(_arg1:Event):void{
if (lastFrame == currentFrame){
return;
};
lastFrame = currentFrame;
if ((currentFrame + 1) > totalFrames){
removeEventListener(Event.ENTER_FRAME, extraFrameListener);
};
extraFrameHandler();
}
private function addPopupRequestHandler(_arg1:Event):void{
var _local3:Boolean;
var _local4:IChildList;
var _local6:ISWFBridgeProvider;
var _local7:SWFBridgeRequest;
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (_arg1.target != this){
_local6 = swfBridgeGroup.getChildBridgeProvider(IEventDispatcher(_arg1.target));
if (!SecurityUtil.hasMutualTrustBetweenParentAndChild(_local6)){
return;
};
};
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (((!(_local2.data.childList)) || ((_local2.data.childList == PopUpManagerChildList.PARENT)))){
_local3 = ((_local2.data.parent) && (popUpChildren.contains(_local2.data.parent)));
} else {
_local3 = (_local2.data.childList == PopUpManagerChildList.POPUP);
};
_local4 = (_local3) ? popUpChildren : this;
_local4.addChild(DisplayObject(_local2.data.window));
if (_local2.data.modal){
numModalWindows++;
};
var _local5:RemotePopUp = new RemotePopUp(_local2.data.window, _local2.requestor);
forms.push(_local5);
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local7 = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {window:_local2.data.window});
_local7.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(_local2.data.window));
dispatchEvent(_local7);
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
private function systemManagerHandler(_arg1:Event):void{
if (_arg1["name"] == "sameSandbox"){
_arg1["value"] = (currentSandboxEvent == _arg1["value"]);
return;
};
if (_arg1["name"] == "hasSWFBridges"){
_arg1["value"] = hasSWFBridges();
return;
};
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:String = _arg1["name"];
switch (_local2){
case "popUpChildren.addChild":
popUpChildren.addChild(_arg1["value"]);
break;
case "popUpChildren.removeChild":
popUpChildren.removeChild(_arg1["value"]);
break;
case "cursorChildren.addChild":
cursorChildren.addChild(_arg1["value"]);
break;
case "cursorChildren.removeChild":
cursorChildren.removeChild(_arg1["value"]);
break;
case "toolTipChildren.addChild":
toolTipChildren.addChild(_arg1["value"]);
break;
case "toolTipChildren.removeChild":
toolTipChildren.removeChild(_arg1["value"]);
break;
case "screen":
_arg1["value"] = screen;
break;
case "application":
_arg1["value"] = application;
break;
case "isTopLevelRoot":
_arg1["value"] = isTopLevelRoot();
break;
case "getVisibleApplicationRect":
_arg1["value"] = getVisibleApplicationRect();
break;
case "bringToFront":
if (_arg1["value"].topMost){
popUpChildren.setChildIndex(DisplayObject(_arg1["value"].popUp), (popUpChildren.numChildren - 1));
} else {
setChildIndex(DisplayObject(_arg1["value"].popUp), (numChildren - 1));
};
break;
};
}
private function activateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
mx_internal function set noTopMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _noTopMostIndex);
_noTopMostIndex = _arg1;
topMostIndex = (topMostIndex + _local2);
}
override public function getObjectsUnderPoint(_arg1:Point):Array{
var _local5:DisplayObject;
var _local6:Array;
var _local2:Array = [];
var _local3:int = topMostIndex;
var _local4:int;
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 get topMostIndex():int{
return (_topMostIndex);
}
mx_internal function regenerateStyleCache(_arg1:Boolean):void{
var _local5:IStyleClient;
var _local2:Boolean;
var _local3:int = rawChildren.numChildren;
var _local4:int;
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 addFocusManager(_arg1:IFocusManagerContainer):void{
forms.push(_arg1);
}
private function deactivateFormSandboxEventHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
if (((((isRemotePopUp(form)) && ((RemotePopUp(form).window == _local2.data.window)))) && ((RemotePopUp(form).bridge == _local2.data.notifier)))){
deactivateForm(form);
};
};
}
public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
if (topLevel){
_swfBridgeGroup = _arg1;
} else {
if (topLevelSystemManager){
SystemManager(topLevelSystemManager).swfBridgeGroup = _arg1;
};
};
}
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 _local6:Font;
var _local7:String;
var _local2:String = _arg1.font;
var _local3:Array = Font.enumerateFonts();
var _local4:int;
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);
};
var _local5:Object = embeddedFontList[_local2];
return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular)))))));
}
private function forwardPlaceholderRequest(_arg1:SWFBridgeRequest, _arg2:Boolean):Boolean{
if (isTopLevelRoot()){
return (false);
};
var _local3:Object;
var _local4:String;
if (_arg1.data.window){
_local3 = _arg1.data.window;
_arg1.data.window = null;
} else {
_local3 = _arg1.requestor;
_local4 = _arg1.data.placeHolderId;
_arg1.data.placeHolderId = ((NameUtil.displayObjectToString(this) + ".") + _arg1.data.placeHolderId);
};
if (_arg2){
addPlaceholderId(_arg1.data.placeHolderId, _local4, _arg1.requestor, _local3);
} else {
removePlaceholderId(_arg1.data.placeHolderId);
};
var _local5:DisplayObject = getSandboxRoot();
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
_arg1.requestor = _local6;
if (_local5 == this){
_local6.dispatchEvent(_arg1);
} else {
_local5.dispatchEvent(_arg1);
};
return (true);
}
public function getTopLevelRoot():DisplayObject{
var sm:ISystemManager;
var parent:DisplayObject;
var lastParent:DisplayObject;
try {
sm = this;
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
lastParent = parent;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
lastParent = parent;
parent = parent.parent;
};
} catch(error:SecurityError) {
};
return (null);
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.removeEventListener(type, listener, useCapture);
};
} catch(error:SecurityError) {
};
super.removeEventListener(type, listener, useCapture);
return;
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if ((((getSandboxRoot() == this)) && (eventProxy))){
super.removeEventListener(actualType, eventProxy.marshalListener, useCapture);
if (actualType == MouseEvent.MOUSE_UP){
try {
if (stage){
stage.removeEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener, useCapture);
};
} catch(e:SecurityError) {
};
super.removeEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener, useCapture);
};
};
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
removeEventListenerFromOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture);
};
removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
super.removeEventListener(type, listener, false);
return;
};
};
if (type == FlexEvent.IDLE){
super.removeEventListener(type, listener, useCapture);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(type, listener, useCapture);
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
if (!hasEventListener(type)){
try {
if (stage){
stage.removeEventListener(type, stageEventHandler, false);
};
} catch(error:SecurityError) {
};
};
};
if (type == SandboxMouseEvent.MOUSE_UP_SOMEWHERE){
if (!hasEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE)){
try {
if (stage){
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
};
} catch(error:SecurityError) {
};
super.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
};
};
}
private function extraFrameHandler(_arg1:Event=null):void{
var _local3:Class;
var _local2:Object = info()["frames"];
if (((_local2) && (_local2[currentLabel]))){
_local3 = Class(getDefinitionByName(_local2[currentLabel]));
var _local4 = _local3;
_local4["frame"](this);
};
deferredNextFrame();
}
public function isTopLevelRoot():Boolean{
return (((isStageRoot) || (isBootstrapRoot)));
}
public function get application():IUIComponent{
return (IUIComponent(_document));
}
override public function removeChildAt(_arg1:int):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChildAt((applicationIndex + _arg1)));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = super.getChildAt(_arg1);
removingChild(_local2);
super.removeChildAt(_arg1);
childRemoved(_local2);
return (_local2);
}
private function getSWFBridgeOfDisplayObject(_arg1:DisplayObject):IEventDispatcher{
var _local2:SWFBridgeRequest;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:IEventDispatcher;
var _local7:ISWFBridgeProvider;
if (swfBridgeGroup){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, false, false, null, _arg1);
_local3 = swfBridgeGroup.getChildBridges();
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = IEventDispatcher(_local3[_local5]);
_local7 = swfBridgeGroup.getChildBridgeProvider(_local6);
if (SecurityUtil.hasMutualTrustBetweenParentAndChild(_local7)){
_local6.dispatchEvent(_local2);
if (_local2.data == true){
return (_local6);
};
_local2.data = _arg1;
};
_local5++;
};
};
return (null);
}
private function deactivateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
deactivateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.deactivateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.deactivate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
return;
};
throw (new Error());
};
};
}
private function installCompiledResourceBundles():void{
var _local1:Object = this.info();
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : _local1["currentDomain"];
var _local3:Array = _local1["compiledLocales"];
var _local4:Array = _local1["compiledResourceBundleNames"];
var _local5:IResourceManager = ResourceManager.getInstance();
_local5.installCompiledResourceBundles(_local2, _local3, _local4);
if (!_local5.localeChain){
_local5.initializeLocaleChain(_local3);
};
}
private function deactivateForm(_arg1:Object):void{
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
deactivateRemotePopUp(form);
} else {
form.focusManager.deactivate();
};
form = findLastActiveForm(_arg1);
if (form){
if (isRemotePopUp(form)){
activateRemotePopUp(form);
} else {
form.focusManager.activate();
};
};
};
};
}
private function unloadHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
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 = (_arg1 - _toolTipIndex);
_toolTipIndex = _arg1;
cursorIndex = (cursorIndex + _local2);
}
private function hasSWFBridges():Boolean{
if (swfBridgeGroup){
return (true);
};
return (false);
}
private function updateLastActiveForm():void{
var _local1:int = forms.length;
if (_local1 < 2){
return;
};
var _local2 = -1;
var _local3:int;
while (_local3 < _local1) {
if (areFormsEqual(form, forms[_local3])){
_local2 = _local3;
break;
};
_local3++;
};
if (_local2 >= 0){
forms.splice(_local2, 1);
forms.push(form);
};
}
mx_internal function set bridgeToFocusManager(_arg1:Dictionary):void{
if (topLevel){
_bridgeToFocusManager = _arg1;
} else {
if (topLevelSystemManager){
SystemManager(topLevelSystemManager).bridgeToFocusManager = _arg1;
};
};
}
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);
}
private function sandboxMouseListener(_arg1:Event):void{
if ((_arg1 is SandboxMouseEvent)){
return;
};
var _local2:Event = SandboxMouseEvent.marshal(_arg1);
dispatchEventFromSWFBridges(_local2, (_arg1.target as IEventDispatcher));
var _local3:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = "sameSandbox";
_local3.value = _arg1;
getSandboxRoot().dispatchEvent(_local3);
if (!_local3.value){
dispatchEvent(_local2);
};
}
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"]);
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
private function dispatchInvalidateRequest():void{
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.INVALIDATE_REQUEST, false, false, _local1, (InvalidateRequestData.SIZE | InvalidateRequestData.DISPLAY_LIST));
_local1.dispatchEvent(_local2);
}
public function allowDomain(... _args):void{
}
public function get preloaderBackgroundColor():uint{
var _local1:* = info()["backgroundColor"];
if (_local1 == undefined){
return (StyleManager.NOT_A_COLOR);
};
return (StyleManager.getColorName(_local1));
}
public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
var _local2:Rectangle;
var _local3:Point;
var _local4:IEventDispatcher;
var _local5:SWFBridgeRequest;
if (!_arg1){
_arg1 = getBounds(DisplayObject(this));
_local2 = screen;
_local3 = new Point(Math.max(0, _arg1.x), Math.max(0, _arg1.y));
_local3 = localToGlobal(_local3);
_arg1.x = _local3.x;
_arg1.y = _local3.y;
_arg1.width = _local2.width;
_arg1.height = _local2.height;
};
if (useSWFBridge()){
_local4 = swfBridgeGroup.parentBridge;
_local5 = new SWFBridgeRequest(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, false, false, _local4, _arg1);
_local4.dispatchEvent(_local5);
_arg1 = Rectangle(_local5.data);
};
return (_arg1);
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
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;
};
};
if (((topLevel) && (useSWFBridge()))){
dispatchInvalidateRequest();
};
}
public function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].addChild(_arg2);
} else {
addingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".addChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childAdded(_arg2);
};
}
private function dispatchDeactivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
private function isBridgeChildHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:Object = Object(_arg1);
_local2.data = ((_local2.data) && (rawChildren.contains((_local2.data as DisplayObject))));
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
private function activateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
activateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.activateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.activate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
} else {
throw (new Error());
};
};
};
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
mx_internal function initialize():void{
var _local6:int;
var _local7:int;
var _local9:EmbeddedFontRegistry;
var _local13:Class;
var _local14:Object;
var _local15:RSLItem;
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);
preloader.addEventListener(RSLEvent.RSL_COMPLETE, preloader_rslCompleteHandler);
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
_popUpChildren.addChild(preloader);
var _local1:Array = info()["rsls"];
var _local2:Array = info()["cdRsls"];
var _local3:Boolean;
if (info()["usePreloader"] != undefined){
_local3 = info()["usePreloader"];
};
var _local4:Class = (info()["preloader"] as Class);
if (((_local3) && (!(_local4)))){
_local4 = DownloadProgressBar;
};
var _local5:Array = [];
if (((_local2) && ((_local2.length > 0)))){
_local13 = Class(getDefinitionByName("mx.core::CrossDomainRSLItem"));
_local6 = _local2.length;
_local7 = 0;
while (_local7 < _local6) {
_local14 = new _local13(_local2[_local7]["rsls"], _local2[_local7]["policyFiles"], _local2[_local7]["digests"], _local2[_local7]["types"], _local2[_local7]["isSigned"], LoaderUtil.normalizeURL(this.loaderInfo));
_local5.push(_local14);
_local7++;
};
};
if (((!((_local1 == null))) && ((_local1.length > 0)))){
_local6 = _local1.length;
_local7 = 0;
while (_local7 < _local6) {
_local15 = new RSLItem(_local1[_local7].url, LoaderUtil.normalizeURL(this.loaderInfo));
_local5.push(_local15);
_local7++;
};
};
Singleton.registerClass("mx.resources::IResourceManager", Class(getDefinitionByName("mx.resources::ResourceManagerImpl")));
var _local8:IResourceManager = ResourceManager.getInstance();
Singleton.registerClass("mx.core::IEmbeddedFontRegistry", Class(getDefinitionByName("mx.core::EmbeddedFontRegistry")));
Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
Singleton.registerClass("mx.styles::IStyleManager2", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
var _local10:String = loaderInfo.parameters["localeChain"];
if (((!((_local10 == null))) && (!((_local10 == ""))))){
_local8.localeChain = _local10.split(",");
};
var _local11:String = loaderInfo.parameters["resourceModuleURLs"];
var _local12:Array = (_local11) ? _local11.split(",") : null;
preloader.initialize(_local3, _local4, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, null, null, _local5, _local12);
}
public function useSWFBridge():Boolean{
if (isStageRoot){
return (false);
};
if (((!(topLevel)) && (topLevelSystemManager))){
return (topLevelSystemManager.useSWFBridge());
};
var sbRoot:DisplayObject = getSandboxRoot();
if (((topLevel) && (!((sbRoot == this))))){
return (true);
};
if (sbRoot == this){
try {
root.loaderInfo.parentAllowsChild;
if (((parentAllowsChild) && (childAllowsParent))){
try {
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isStageRoot", false, true))){
return (true);
};
} catch(e:Error) {
};
} else {
return (true);
};
} catch(e1:Error) {
return (false);
};
};
return (false);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
private function canActivatePopUp(_arg1:Object):Boolean{
var _local2:RemotePopUp;
var _local3:SWFBridgeRequest;
if (isRemotePopUp(_arg1)){
_local2 = RemotePopUp(_arg1);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, null, _local2.window);
IEventDispatcher(_local2.bridge).dispatchEvent(_local3);
return (_local3.data);
};
if (canActivateLocalComponent(_arg1)){
return (true);
};
return (false);
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
private function canActivateLocalComponent(_arg1:Object):Boolean{
if ((((((((_arg1 is Sprite)) && ((_arg1 is IUIComponent)))) && (Sprite(_arg1).visible))) && (IUIComponent(_arg1).enabled))){
return (true);
};
return (false);
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
preloader.removeEventListener(RSLEvent.RSL_COMPLETE, preloader_rslCompleteHandler);
_popUpChildren.removeChild(preloader);
preloader = null;
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));
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
var _local4:ISystemManager;
var _local5:DisplayObject;
initialized = true;
if (((!(parent)) && (parentAllowsChild))){
return;
};
if (!topLevel){
if (!parent){
return;
};
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_local4 = IUIComponent(_local3).systemManager;
if (((_local4) && (!(_local4.isTopLevel())))){
_local4 = _local4.topLevelSystemManager;
};
_topLevelSystemManager = _local4;
break;
};
_local3 = _local3.parent;
};
};
if (((isTopLevelRoot()) || ((getSandboxRoot() == this)))){
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
};
if (((isTopLevelRoot()) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
} else {
if (((topLevel) && (stage))){
_local5 = getSandboxRoot();
if (_local5 != this){
_local5.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
};
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (!LoaderConfig._url){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
LoaderConfig._swfVersion = loaderInfo.swfVersion;
};
if (((isStageRoot) && (stage))){
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(_width, _height);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
if (preloader){
preloader.registerApplication(_local2);
};
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
private function stageEventHandler(_arg1:Event):void{
if ((_arg1.target is Stage)){
mouseCatcher.dispatchEvent(_arg1);
};
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
mx_internal function get bridgeToFocusManager():Dictionary{
if (topLevel){
return (_bridgeToFocusManager);
};
if (topLevelSystemManager){
return (SystemManager(topLevelSystemManager).bridgeToFocusManager);
};
return (null);
}
public function get numModalWindows():int{
return (_numModalWindows);
}
private function areFormsEqual(_arg1:Object, _arg2:Object):Boolean{
if (_arg1 == _arg2){
return (true);
};
if ((((_arg1 is RemotePopUp)) && ((_arg2 is RemotePopUp)))){
return (areRemotePopUpsEqual(_arg1, _arg2));
};
return (false);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
private function removePlaceholderId(_arg1:String):void{
delete idToPlaceholder[_arg1];
}
mx_internal function dispatchActivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
override public function get width():Number{
return (_width);
}
private function dispatchActivatedApplicationEvent():void{
var _local2:SWFBridgeEvent;
var _local1:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local1){
_local2 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, false, false);
_local1.dispatchEvent(_local2);
};
}
private function otherSystemManagerMouseListener(_arg1:SandboxMouseEvent):void{
if (SystemManagerGlobals.dispatchingEventToOtherSystemManagers){
return;
};
dispatchEventFromSWFBridges(_arg1);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local2.name = "sameSandbox";
_local2.value = _arg1;
getSandboxRoot().dispatchEvent(_local2);
if (!_local2.value){
dispatchEvent(_arg1);
};
}
private function hideMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = false;
};
};
}
private function getTopLevelSystemManager(_arg1:DisplayObject):ISystemManager{
var _local3:ISystemManager;
var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.root);
if (((((!(_local2)) || ((_local2 is Stage)))) && ((_arg1 is IUIComponent)))){
_local2 = DisplayObjectContainer(IUIComponent(_arg1).systemManager);
};
if ((_local2 is ISystemManager)){
_local3 = ISystemManager(_local2);
if (!_local3.isTopLevel()){
_local3 = _local3.topLevelSystemManager;
};
};
return (_local3);
}
public function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean{
return (!((getSWFBridgeOfDisplayObject(_arg1) == null)));
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function get parentAllowsChild():Boolean{
try {
return (loaderInfo.parentAllowsChild);
} catch(error:Error) {
};
return (false);
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
private function mouseLeaveHandler(_arg1:Event):void{
dispatchEvent(new SandboxMouseEvent(SandboxMouseEvent.MOUSE_UP_SOMEWHERE));
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
private function activateFormSandboxEventHandler(_arg1:Event):void{
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
activateForm(new RemotePopUp(_local2.data.window, _local2.data.notifier));
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
addingChild(_arg1);
super.addChild(_arg1);
childAdded(_arg1);
return (_arg1);
}
public static function getSWFRoot(_arg1:Object):DisplayObject{
var p:*;
var sm:ISystemManager;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for (p in allSystemManagers) {
sm = (p as ISystemManager);
domain = sm.loaderInfo.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return ((sm as DisplayObject));
};
} catch(e:Error) {
};
};
return (null);
}
private static function areRemotePopUpsEqual(_arg1:Object, _arg2:Object):Boolean{
if (!(_arg1 is RemotePopUp)){
return (false);
};
if (!(_arg2 is RemotePopUp)){
return (false);
};
var _local3:RemotePopUp = RemotePopUp(_arg1);
var _local4:RemotePopUp = RemotePopUp(_arg2);
if ((((((_local3.window == _local4.window)) && (_local3.bridge))) && (_local4.bridge))){
return (true);
};
return (false);
}
private static function getChildListIndex(_arg1:IChildList, _arg2:Object):int{
var childList = _arg1;
var f = _arg2;
var index = -1;
try {
index = childList.getChildIndex(DisplayObject(f));
} catch(e:ArgumentError) {
};
return (index);
}
mx_internal static function registerInitCallback(_arg1:Function):void{
if (((!(allSystemManagers)) || (!(lastSystemManager)))){
return;
};
var _local2:SystemManager = lastSystemManager;
if (_local2.doneExecutingInitCallbacks){
_arg1(_local2);
} else {
_local2.initCallbackFunctions.push(_arg1);
};
}
private static function isRemotePopUp(_arg1:Object):Boolean{
return (!((_arg1 is IFocusManagerContainer)));
}
}
}//package mx.managers
Section 319
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
public static var dispatchingEventToOtherSystemManagers:Boolean;
}
}//package mx.managers
Section 320
//SystemManagerProxy (mx.managers.SystemManagerProxy)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import mx.utils.*;
public class SystemManagerProxy extends SystemManager {
private var _systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.4.0.9271";
public function SystemManagerProxy(_arg1:ISystemManager){
_systemManager = _arg1;
topLevel = true;
super.addEventListener(MouseEvent.MOUSE_DOWN, proxyMouseDownHandler, true);
}
override public function create(... _args):Object{
return (IFlexModuleFactory(_systemManager).create.apply(this, _args));
}
public function get systemManager():ISystemManager{
return (_systemManager);
}
override public function activate(_arg1:IFocusManagerContainer):void{
var _local3:Boolean;
var _local4:SWFBridgeEvent;
var _local2:IEventDispatcher = (_systemManager.swfBridgeGroup) ? _systemManager.swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local4 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local3) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local4);
};
}
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);
_systemManager.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function deactivateByProxy(_arg1:IFocusManagerContainer):void{
if (_arg1){
_arg1.focusManager.deactivate();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
_systemManager.removeEventListener(_arg1, _arg2, _arg3);
}
override public function get document():Object{
return (findFocusManagerContainer(this));
}
public function activateByProxy(_arg1:IFocusManagerContainer):void{
super.activate(_arg1);
}
override public function removeChildBridge(_arg1:IEventDispatcher):void{
_systemManager.removeChildBridge(_arg1);
}
override public function get swfBridgeGroup():ISWFBridgeGroup{
return (_systemManager.swfBridgeGroup);
}
override public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
_systemManager.addChildBridge(_arg1, _arg2);
}
override public function useSWFBridge():Boolean{
return (_systemManager.useSWFBridge());
}
override public function get screen():Rectangle{
return (_systemManager.screen);
}
override public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
}
private function proxyMouseDownHandler(_arg1:MouseEvent):void{
if (findFocusManagerContainer(this)){
SystemManager(_systemManager).dispatchActivatedWindowEvent(this);
};
}
override public function deactivate(_arg1:IFocusManagerContainer):void{
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:ISystemManager = _systemManager;
var _local3:IEventDispatcher = (_local2.swfBridgeGroup) ? _local2.swfBridgeGroup.parentBridge : null;
if (_local3){
_local4 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local3, window:(_local4) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local5);
};
}
override public function set document(_arg1:Object):void{
}
override public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
return (_systemManager.getVisibleApplicationRect(_arg1));
}
override public function getDefinitionByName(_arg1:String):Object{
return (_systemManager.getDefinitionByName(_arg1));
}
}
}//package mx.managers
Section 321
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.4.0.9271";
public function SystemRawChildrenList(_arg1:SystemManager){
this.owner = _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));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
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 get numChildren():int{
return (owner.mx_internal::$numChildren);
}
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 contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
}
}//package mx.managers
Section 322
//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 = "3.4.0.9271";
private static var implClassDependency:ToolTipManagerImpl;
private static var _impl:IToolTipManager2;
mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
impl.registerToolTip(_arg1, _arg2, _arg3);
}
public static function get enabled():Boolean{
return (impl.enabled);
}
public static function set enabled(_arg1:Boolean):void{
impl.enabled = _arg1;
}
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 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 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, _arg3:String):void{
impl.registerErrorString(_arg1, _arg2, _arg3);
}
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:IAbstractEffect):void{
impl.showEffect = _arg1;
}
private static function get impl():IToolTipManager2{
if (!_impl){
_impl = IToolTipManager2(Singleton.getInstance("mx.managers::IToolTipManager2"));
};
return (_impl);
}
public static function get hideDelay():Number{
return (impl.hideDelay);
}
public static function set hideEffect(_arg1:IAbstractEffect):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():IAbstractEffect{
return (impl.showEffect);
}
public static function get currentTarget():DisplayObject{
return (impl.currentTarget);
}
public static function get hideEffect():IAbstractEffect{
return (impl.hideEffect);
}
public static function set toolTipClass(_arg1:Class):void{
impl.toolTipClass = _arg1;
}
}
}//package mx.managers
Section 323
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import flash.utils.*;
import mx.styles.*;
import mx.controls.*;
import mx.effects.*;
import mx.validators.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager2 {
private var _enabled:Boolean;// = true
private var _showDelay:Number;// = 500
private var _hideEffect:IAbstractEffect;
mx_internal var hideTimer:Timer;
private var _scrubDelay:Number;// = 100
private var _toolTipClass:Class;
mx_internal var showTimer:Timer;
private var sandboxRoot:IEventDispatcher;// = null
mx_internal var currentText:String;
private var _currentToolTip:DisplayObject;
mx_internal var scrubTimer:Timer;
mx_internal var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var systemManager:ISystemManager;// = null
private var _showEffect:IAbstractEffect;
private var _hideDelay:Number;// = 10000
mx_internal var initialized:Boolean;// = false
mx_internal var isError:Boolean;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var instance:IToolTipManager2;
public function ToolTipManagerImpl(){
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.TOOLTIP_MANAGER_REQUEST, marshalToolTipManagerHandler, false, 0, true);
var _local1:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local1.name = "update";
sandboxRoot.dispatchEvent(_local1);
}
mx_internal function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
mx_internal function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
mx_internal 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 as IToolTip));
}
private function mouseIsOver(_arg1:DisplayObject):Boolean{
if (((!(_arg1)) || (!(_arg1.stage)))){
return (false);
};
if ((((_arg1.stage.mouseX == 0)) && ((_arg1.stage.mouseY == 0)))){
return (false);
};
return (_arg1.hitTestPoint(_arg1.stage.mouseX, _arg1.stage.mouseY, true));
}
mx_internal 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 = new ToolTip();
var _local7:ISystemManager = (_arg5) ? (_arg5.systemManager as ISystemManager) : (ApplicationGlobals.application.systemManager as ISystemManager);
_local7.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (_local6 as DisplayObject));
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
mx_internal 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 = (currentToolTip.systemManager as ISystemManager);
_local1.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = (_arg1 as DisplayObject);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
private function hideImmediately(_arg1:DisplayObject):void{
checkIfTargetChanged(null);
}
mx_internal function showTip():void{
var _local2:ISystemManager;
var _local1:ToolTipEvent = 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();
};
}
mx_internal 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 currentTarget():DisplayObject{
return (_currentTarget);
}
mx_internal 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 get hideEffect():IAbstractEffect{
return (_hideEffect);
}
mx_internal function changeHandler(_arg1:Event):void{
reset();
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
mx_internal function errorTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
public function get showDelay():Number{
return (_showDelay);
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
public function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
mx_internal 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 = (_arg1.systemManager as ISystemManager);
_local2.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", DisplayObject(_arg1));
}
mx_internal function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
private function marshalToolTipManagerHandler(_arg1:Event):void{
var _local2:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local3:Object = _arg1;
switch (_local3.name){
case "currentToolTip":
_currentToolTip = _local3.value;
break;
case ToolTipEvent.TOOL_TIP_HIDE:
if ((_currentToolTip is IToolTip)){
hideTip();
};
break;
case "update":
_arg1.stopImmediatePropagation();
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _currentToolTip;
sandboxRoot.dispatchEvent(_local2);
};
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject, _arg2:DisplayObject):Rectangle{
var _local3:Point = new Point(0, 0);
_local3 = _arg1.localToGlobal(_local3);
_local3 = _arg2.globalToLocal(_local3);
return (new Rectangle(_local3.x, _local3.y, _arg1.width, _arg1.height));
}
mx_internal function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local5:Rectangle;
var _local6:Number;
var _local7:Number;
var _local8:ISystemManager;
var _local9:Number;
var _local10:Number;
var _local11:Point;
var _local3:Number = currentToolTip.screen.width;
var _local4:Number = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget, currentToolTip.root);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local6 = NaN;
_local7 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local6 = ((_local3 - _local1) - 4);
_local7 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local6;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
} 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(_local6)){
Object(toolTipClass).maxWidth = _local6;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
};
};
sizeTip(currentToolTip);
if (!isNaN(_local7)){
Object(toolTipClass).maxWidth = _local7;
};
} else {
_local8 = getSystemManager(currentTarget);
_local1 = (DisplayObject(_local8).mouseX + 11);
_local2 = (DisplayObject(_local8).mouseY + 22);
_local9 = currentToolTip.width;
if ((_local1 + _local9) > _local3){
_local1 = (_local3 - _local9);
};
_local10 = currentToolTip.height;
if ((_local2 + _local10) > _local4){
_local2 = (_local4 - _local10);
};
_local11 = new Point(_local1, _local2);
_local11 = DisplayObject(_local8).localToGlobal(_local11);
_local11 = DisplayObject(sandboxRoot).globalToLocal(_local11);
_local1 = _local11.x;
_local2 = _local11.y;
};
currentToolTip.move(_local1, _local2);
}
mx_internal function errorTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
mx_internal 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, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
private function showImmediately(_arg1:DisplayObject):void{
var _local2:Number = ToolTipManager.showDelay;
ToolTipManager.showDelay = 0;
checkIfTargetChanged(_arg1);
ToolTipManager.showDelay = _local2;
}
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 sizeTip(_arg1:IToolTip):void{
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight());
}
public function set showEffect(_arg1:IAbstractEffect):void{
_showEffect = (_arg1 as IAbstractEffect);
}
mx_internal function targetChanged():void{
var _local1:ToolTipEvent;
var _local2:InterManagerRequest;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
if ((currentToolTip is IToolTip)){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
} else {
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = ToolTipEvent.TOOL_TIP_HIDE;
sandboxRoot.dispatchEvent(_local2);
};
};
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();
};
};
}
public function set hideEffect(_arg1:IAbstractEffect):void{
_hideEffect = (_arg1 as IAbstractEffect);
}
mx_internal function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
mx_internal function initializeTip():void{
if ((currentToolTip is IToolTip)){
IToolTip(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():IAbstractEffect{
return (_showEffect);
}
mx_internal function toolTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
mx_internal 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();
};
}
mx_internal function createTip():void{
var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
currentTarget.dispatchEvent(_local1);
if (_local1.toolTip){
currentToolTip = _local1.toolTip;
} else {
currentToolTip = new toolTipClass();
};
currentToolTip.visible = false;
var _local2:ISystemManager = (getSystemManager(currentTarget) as ISystemManager);
_local2.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
}
public static function getInstance():IToolTipManager2{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 324
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
public class LoaderConfig {
mx_internal static const VERSION:String = "3.4.0.9271";
mx_internal static var _parameters:Object;
mx_internal static var _swfVersion:uint;
mx_internal static var _url:String = null;
public static function get parameters():Object{
return (_parameters);
}
public static function get url():String{
return (_url);
}
public static function get swfVersion():uint{
return (_swfVersion);
}
}
}//package mx.messaging.config
Section 325
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 326
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.4.0.9271";
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.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4: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){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
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 factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
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);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
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);
loader.content.addEventListener("error", moduleErrorHandler);
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 FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = 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);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = 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, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.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(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(_local2);
}
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(){
}
}
Section 327
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 328
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import flash.utils.*;
import flash.system.*;
import flash.text.*;
import mx.graphics.*;
import flash.net.*;
public class DownloadProgressBar extends Sprite implements IPreloaderDisplay {
protected var MINIMUM_DISPLAY_TIME:uint;// = 0
private var _barFrameRect:RoundedRectangle;
private var _stageHeight:Number;// = 375
private var _stageWidth:Number;// = 500
private var _percentRect:Rectangle;
private var _percentObj:TextField;
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 _backgroundSize:String;// = ""
private var _initProgressTotal:uint;// = 12
private var _startedInit:Boolean;// = false
private var _showLabel:Boolean;// = true
private var _value:Number;// = 0
private var _labelRect:Rectangle;
private var _backgroundImage:Object;
private var _backgroundAlpha:Number;// = 1
private var _backgroundColor:uint;
private var _startedLoading:Boolean;// = false
private var _showPercentage:Boolean;// = false
private var _barFrameSprite:Sprite;
protected var DOWNLOAD_PERCENTAGE:uint;// = 60
private var _displayStartCount:uint;// = 0
private var _labelObj:TextField;
private var _borderRect:RoundedRectangle;
private var _maximum:Number;// = 0
private var _displayTime:int;
private var _label:String;// = ""
private var _preloader:Sprite;
private var _xOffset:Number;// = 20
private var _startTime:int;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var _initializingLabel:String = "Initializing";
public function DownloadProgressBar(){
_labelRect = labelRect;
_percentRect = percentRect;
_borderRect = borderRect;
_barFrameRect = barFrameRect;
_barRect = barRect;
super();
}
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 get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0x333333;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
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 percentRect():Rectangle{
return (new Rectangle(108, 4, 34, 16));
}
protected function set showLabel(_arg1:Boolean):void{
_showLabel = _arg1;
draw();
}
private function calcBackgroundSize():Number{
var _local2:int;
var _local1:Number = NaN;
if (backgroundSize){
_local2 = backgroundSize.indexOf("%");
if (_local2 != -1){
_local1 = Number(backgroundSize.substr(0, _local2));
};
};
return (_local1);
}
private function show():void{
_showingDisplay = true;
calcScale();
draw();
_displayTime = getTimer();
}
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);
};
};
};
}
protected function set showPercentage(_arg1:Boolean):void{
_showPercentage = _arg1;
draw();
}
protected function get barFrameRect():RoundedRectangle{
return (new RoundedRectangle(14, 40, 154, 4));
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
}
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);
var _local2:ErrorField = new ErrorField(this);
_local2.show(_arg1.errorText);
}
protected function rslCompleteHandler(_arg1:RSLEvent):void{
label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal);
}
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)))));
}
protected function createChildren():void{
var _local2:TextField;
var _local3:TextField;
var _local1:Graphics = graphics;
if (backgroundColor != 4294967295){
_local1.beginFill(backgroundColor, backgroundAlpha);
_local1.drawRect(0, 0, stageWidth, stageHeight);
};
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();
var _local4:Graphics = _barFrameSprite.graphics;
var _local5:Matrix = 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);
var _local6:RectangularDropShadow = 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 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);
};
};
}
private function timerHandler(_arg1:Event=null):void{
dispatchEvent(new Event(Event.COMPLETE));
}
private function hide():void{
}
public function get backgroundSize():String{
return (_backgroundSize);
}
protected function center(_arg1:Number, _arg2:Number):void{
_xOffset = Math.floor(((_arg1 - _borderRect.width) / 2));
_yOffset = Math.floor(((_arg2 - _borderRect.height) / 2));
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesLoaded;
var _local3:uint = _arg1.bytesTotal;
var _local4:int = (getTimer() - _startTime);
if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){
if (!_startedLoading){
show();
label = downloadingLabel;
_startedLoading = true;
};
setProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
protected function initProgressHandler(_arg1:Event):void{
var _local3:Number;
var _local2:int = (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 set downloadingLabel(_arg1:String):void{
_downloadingLabel = _arg1;
}
public function get stageWidth():Number{
return (_stageWidth);
}
protected function get showPercentage():Boolean{
return (_showPercentage);
}
override public function get visible():Boolean{
return (_visible);
}
public function set stageHeight(_arg1:Number):void{
_stageHeight = _arg1;
}
public function initialize():void{
_startTime = getTimer();
center(stageWidth, stageHeight);
}
protected function rslProgressHandler(_arg1:RSLEvent):void{
}
protected function get barRect():RoundedRectangle{
return (new RoundedRectangle(14, 39, 154, 6, 0));
}
protected function get percentFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.align = "right";
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function set backgroundImage(_arg1:Object):void{
_backgroundImage = _arg1;
}
private function calcX(_arg1:Number):Number{
return ((_arg1 + _xOffset));
}
private function calcY(_arg1:Number):Number{
return ((_arg1 + _yOffset));
}
public function set backgroundAlpha(_arg1:Number):void{
_backgroundAlpha = _arg1;
}
private function initCompleteHandler(_arg1:Event):void{
var _local3:Timer;
var _local2:int = (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();
};
}
public function set backgroundColor(_arg1:uint):void{
_backgroundColor = _arg1;
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
addChildAt(_arg1, 0);
var _local2:Number = _arg1.width;
var _local3:Number = _arg1.height;
var _local4:Number = 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;
var _local5:Number = Math.round((0.5 * (stageWidth - (_local2 * _local7))));
var _local6:Number = Math.round((0.5 * (stageHeight - (_local3 * _local8))));
_arg1.x = _local5;
_arg1.y = _local6;
if (!isNaN(backgroundAlpha)){
_arg1.alpha = backgroundAlpha;
};
}
public function set backgroundSize(_arg1:String):void{
_backgroundSize = _arg1;
}
protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{
return ((((_arg1 > 300)) && ((_arg2 == 2))));
}
protected function get downloadingLabel():String{
return (_downloadingLabel);
}
private function loader_completeHandler(_arg1:Event):void{
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
}
protected function setProgress(_arg1:Number, _arg2:Number):void{
if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){
_value = Number(_arg1);
_maximum = Number(_arg2);
draw();
};
}
public function get stageHeight():Number{
return (_stageHeight);
}
public function get backgroundImage():Object{
return (_backgroundImage);
}
public function get backgroundAlpha():Number{
if (!isNaN(_backgroundAlpha)){
return (_backgroundAlpha);
};
return (1);
}
private function drawProgressBar(_arg1:Number):void{
var _local11:Number;
var _local2:Graphics = _barSprite.graphics;
_local2.clear();
var _local3:Array = [0xFFFFFF, 0xFFFFFF];
var _local4:Array = [0, 0xFF];
var _local5:Matrix = new Matrix();
var _local6:Number = ((_barRect.width * _arg1) / 100);
var _local7:Number = (_local6 / 2);
var _local8:Number = (_barRect.height - 4);
var _local9:Number = calcX(_barRect.x);
var _local10:Number = (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 backgroundColor():uint{
return (_backgroundColor);
}
public function set stageWidth(_arg1:Number):void{
_stageWidth = _arg1;
}
protected function completeHandler(_arg1:Event):void{
}
protected function set label(_arg1:String):void{
if (!(_arg1 is Function)){
_label = _arg1;
};
draw();
}
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);
}
protected function get label():String{
return (_label);
}
protected function get labelRect():Rectangle{
return (new Rectangle(14, 17, 100, 16));
}
override public function set visible(_arg1:Boolean):void{
if (((!(_visible)) && (_arg1))){
show();
} else {
if (((_visible) && (!(_arg1)))){
hide();
};
};
_visible = _arg1;
}
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
import flash.display.*;
import flash.system.*;
import flash.text.*;
class ErrorField extends Sprite {
private const TEXT_MARGIN_PX:int = 10;
private const MAX_WIDTH_INCHES:int = 6;
private const MIN_WIDTH_INCHES:int = 2;
private var downloadProgressBar:DownloadProgressBar;
private function ErrorField(_arg1:DownloadProgressBar){
this.downloadProgressBar = _arg1;
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function show(_arg1:String):void{
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
return;
};
var _local2:Number = downloadProgressBar.stageWidth;
var _local3:Number = downloadProgressBar.stageHeight;
var _local4:TextField = new TextField();
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.multiline = true;
_local4.wordWrap = true;
_local4.background = true;
_local4.defaultTextFormat = labelFormat;
_local4.text = _arg1;
_local4.width = Math.max((MIN_WIDTH_INCHES * Capabilities.screenDPI), (_local2 - (TEXT_MARGIN_PX * 2)));
_local4.width = Math.min((MAX_WIDTH_INCHES * Capabilities.screenDPI), _local4.width);
_local4.y = Math.max(0, ((_local3 - TEXT_MARGIN_PX) - _local4.height));
_local4.x = ((_local2 - _local4.width) / 2);
downloadProgressBar.parent.addChild(this);
this.addChild(_local4);
}
}
Section 329
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay)
package mx.preloaders {
import flash.events.*;
import flash.display.*;
public interface IPreloaderDisplay extends IEventDispatcher {
function set backgroundAlpha(_arg1:Number):void;
function get stageHeight():Number;
function get stageWidth():Number;
function set backgroundColor(_arg1:uint):void;
function set preloader(_arg1:Sprite):void;
function get backgroundImage():Object;
function get backgroundSize():String;
function get backgroundAlpha():Number;
function set stageHeight(_arg1:Number):void;
function get backgroundColor():uint;
function set stageWidth(_arg1:Number):void;
function set backgroundImage(_arg1:Object):void;
function set backgroundSize(_arg1:String):void;
function initialize():void;
}
}//package mx.preloaders
Section 330
//Preloader (mx.preloaders.Preloader)
package mx.preloaders {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import flash.utils.*;
public class Preloader extends Sprite {
private var app:IEventDispatcher;// = null
private var showDisplay:Boolean;
private var timer:Timer;
private var rslDone:Boolean;// = false
private var displayClass:IPreloaderDisplay;// = null
private var rslListLoader:RSLListLoader;
mx_internal static const VERSION:String = "3.4.0.9271";
private function getByteValues():Object{
var _local1:LoaderInfo = root.loaderInfo;
var _local2:int = _local1.bytesLoaded;
var _local3:int = _local1.bytesTotal;
var _local4:int = (rslListLoader) ? rslListLoader.getItemCount() : 0;
var _local5:int;
while (_local5 < _local4) {
_local2 = (_local2 + rslListLoader.getItem(_local5).loaded);
_local3 = (_local3 + rslListLoader.getItem(_local5).total);
_local5++;
};
return ({loaded:_local2, total:_local3});
}
private function appProgressHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
}
private function dispatchAppEndEvent(_arg1:Object=null):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
if (!showDisplay){
displayClassCompleteHandler(null);
};
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
dispatchAppEndEvent();
}
mx_internal function rslErrorHandler(_arg1:ErrorEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR);
_local4.bytesLoaded = 0;
_local4.bytesTotal = 0;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
_local4.errorText = decodeURI(_arg1.text);
dispatchEvent(_local4);
}
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, _arg11:Array=null, _arg12:Array=null):void{
var _local13:int;
var _local14:int;
var _local15:RSLItem;
var _local16:ResourceModuleRSLItem;
if (((((!((_arg9 == null))) || (!((_arg10 == null))))) && (!((_arg11 == null))))){
throw (new Error("RSLs may only be specified by using libs and sizes or rslList, not both."));
};
root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (((_arg9) && ((_arg9.length > 0)))){
if (_arg11 == null){
_arg11 = [];
};
_local13 = _arg9.length;
_local14 = 0;
while (_local14 < _local13) {
_local15 = new RSLItem(_arg9[_local14]);
_arg11.push(_local15);
_local14++;
};
};
if (((_arg12) && ((_arg12.length > 0)))){
_local13 = _arg12.length;
_local14 = 0;
while (_local14 < _local13) {
_local16 = new ResourceModuleRSLItem(_arg12[_local14]);
_arg11.push(_local16);
_local14++;
};
};
rslListLoader = new RSLListLoader(_arg11);
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;
};
if (rslListLoader.getItemCount() > 0){
rslListLoader.load(mx_internal::rslProgressHandler, mx_internal::rslCompleteHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler);
} else {
rslDone = true;
};
}
mx_internal function rslProgressHandler(_arg1:ProgressEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS);
_local4.bytesLoaded = _arg1.bytesLoaded;
_local4.bytesTotal = _arg1.bytesTotal;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
}
public function registerApplication(_arg1:IEventDispatcher):void{
_arg1.addEventListener("validatePropertiesComplete", appProgressHandler);
_arg1.addEventListener("validateSizeComplete", appProgressHandler);
_arg1.addEventListener("validateDisplayListComplete", appProgressHandler);
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
this.app = _arg1;
}
mx_internal function rslCompleteHandler(_arg1:Event):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE);
_local4.bytesLoaded = _local3.total;
_local4.bytesTotal = _local3.total;
_local4.loaderInfo = LoaderInfo(_arg1.target);
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
rslDone = ((_local2 + 1) == _local4.rslTotal);
}
private function timerHandler(_arg1:TimerEvent):void{
if (!root){
return;
};
var _local2:Object = getByteValues();
var _local3:int = _local2.loaded;
var _local4:int = _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 displayClassCompleteHandler(_arg1:Event):void{
if (displayClass){
displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler);
};
if (root){
root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
};
if (app){
app.removeEventListener("validatePropertiesComplete", appProgressHandler);
app.removeEventListener("validateSizeComplete", appProgressHandler);
app.removeEventListener("validateDisplayListComplete", appProgressHandler);
app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
app = null;
};
dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
}
}
}//package mx.preloaders
Section 331
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 332
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 333
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 334
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
public class LocaleSorter {
mx_internal static const VERSION:String = "3.4.0.9271";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
Array.prototype.push.apply(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
Array.prototype.push.apply(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
Array.prototype.push.apply(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
Array.prototype.push.apply(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 335
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.4.0.9271";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 336
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 337
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local3:ResourceModuleInfo = resourceModules[_arg1];
if (!_local3){
return;
};
if (_local3.resourceModule){
_local4 = _local3.resourceModule.resourceBundles;
if (_local4){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _local4[_local6].locale;
_local8 = _local4[_local6].bundleName;
removeResourceBundle(_local7, _local8);
_local6++;
};
};
};
resourceModules[_arg1] = null;
delete resourceModules[_arg1];
_local3.moduleInfo.unload();
if (_arg2){
this.update();
};
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.events.*;
import mx.modules.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_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_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 338
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 339
//ButtonSkin (mx.skins.halo.ButtonSkin)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class ButtonSkin extends Border {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_WIDTH);
}
override public function get measuredHeight():Number{
return (UIComponent.DEFAULT_MEASURED_MIN_HEIGHT);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
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);
var _local3:uint = getStyle("borderColor");
var _local4:Number = getStyle("cornerRadius");
var _local5:Array = getStyle("fillAlphas");
var _local6:Array = getStyle("fillColors");
StyleManager.getColorNames(_local6);
var _local7:Array = getStyle("highlightAlphas");
var _local8:uint = getStyle("themeColor");
var _local9:Object = calcDerivedStyles(_local8, _local6[0], _local6[1]);
var _local10:Number = ColorUtil.adjustBrightness2(_local3, -50);
var _local11:Number = ColorUtil.adjustBrightness2(_local8, -25);
var _local12:Boolean;
if ((parent is IButton)){
_local12 = IButton(parent).emphasized;
};
var _local13:Number = Math.max(0, _local4);
var _local14:Number = Math.max(0, (_local4 - 1));
var _local15:Number = 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;
};
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint):Object{
var _local5:Object;
var _local4:String = 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 340
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.graphics.*;
import mx.skins.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.4.0.9271";
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 styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = 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(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 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)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0);
_local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0;
radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local11 = getStyle("highlightAlphas");
_local12 = (_local11) ? _local11[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = 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);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = 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();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal 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 public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} 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);
}
}
}//package mx.skins.halo
Section 341
//HaloColors (mx.skins.halo.HaloColors)
package mx.skins.halo {
import mx.utils.*;
public class HaloColors {
mx_internal static const VERSION:String = "3.4.0.9271";
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 = getCacheKey(_arg2, _arg3, _arg4);
var _local6:Object = 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 342
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_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 get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
if (_local3){
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));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 343
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.4.0.9271";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 344
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
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;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():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 _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = 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 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;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_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 move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 345
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.net.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.4.0.9271";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){
return;
};
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
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;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
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){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 346
//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 347
//State (mx.states.State)
package mx.states {
import flash.events.*;
import mx.events.*;
public class State extends EventDispatcher {
public var basedOn:String;
private var initialized:Boolean;// = false
public var overrides:Array;
public var name:String;
mx_internal static const VERSION:String = "3.4.0.9271";
public function State(){
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 348
//Transition (mx.states.Transition)
package mx.states {
import mx.effects.*;
public class Transition {
public var effect:IEffect;
public var toState:String;// = "*"
public var fromState:String;// = "*"
mx_internal static const VERSION:String = "3.4.0.9271";
}
}//package mx.states
Section 349
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.4.0.9271";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_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);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
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);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _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 createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
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;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_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) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 350
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 351
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 352
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):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 353
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 354
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 355
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.4.0.9271";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
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);
}
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 isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_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, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
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 get selectors():Array{
return (impl.selectors);
}
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 356
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.resources.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
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 function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
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 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 registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _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{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = 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();
};
}
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 isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = 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);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_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();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
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_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 357
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import mx.core.*;
import flash.display.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{
var _local9:CSSStyleDeclaration;
var _local2:IStyleClient = IStyleClient(_arg1.styleName);
var _local3:DisplayObject = (_arg1 as DisplayObject);
var _local4:Object = _local2.nonInheritingStyles;
if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){
_local4 = StyleManager.stylesRoot;
if (_local4.effects){
_arg1.registerEffects(_local4.effects);
};
};
var _local5:Object = _local2.inheritingStyles;
if (((!(_local5)) || ((_local5 == UIComponent.STYLE_UNINITIALIZED)))){
_local5 = StyleManager.stylesRoot;
};
var _local6:Array = _arg1.getClassStyleDeclarations();
var _local7:int = _local6.length;
if ((_local2 is StyleProxy)){
if (_local7 == 0){
_local4 = addProperties(_local4, _local2, false);
};
_local3 = (StyleProxy(_local2).source as DisplayObject);
};
var _local8:int;
while (_local8 < _local7) {
_local9 = _local6[_local8];
_local5 = _local9.addStyleToProtoChain(_local5, _local3);
_local5 = addProperties(_local5, _local2, true);
_local4 = _local9.addStyleToProtoChain(_local4, _local3);
_local4 = addProperties(_local4, _local2, false);
if (_local9.effects){
_arg1.registerEffects(_local9.effects);
};
_local8++;
};
_arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local5, _local3) : _local5;
_arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, _local3) : _local4;
}
private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{
var _local11:CSSStyleDeclaration;
var _local12:CSSStyleDeclaration;
var _local4:Object = ((((_arg2 is StyleProxy)) && (!(_arg3)))) ? StyleProxy(_arg2).filterMap : null;
var _local5:IStyleClient = _arg2;
while ((_local5 is StyleProxy)) {
_local5 = StyleProxy(_local5).source;
};
var _local6:DisplayObject = (_local5 as DisplayObject);
var _local7:Array = _arg2.getClassStyleDeclarations();
var _local8:int = _local7.length;
var _local9:int;
while (_local9 < _local8) {
_local11 = _local7[_local9];
_arg1 = _local11.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local11.effects){
_arg2.registerEffects(_local11.effects);
};
_local9++;
};
var _local10:Object = _arg2.styleName;
if (_local10){
if (typeof(_local10) == "object"){
if ((_local10 is CSSStyleDeclaration)){
_local12 = CSSStyleDeclaration(_local10);
} else {
_arg1 = addProperties(_arg1, IStyleClient(_local10), _arg3);
};
} else {
_local12 = StyleManager.getStyleDeclaration(("." + _local10));
};
if (_local12){
_arg1 = _local12.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local12.effects){
_arg2.registerEffects(_local12.effects);
};
};
};
if (_arg2.styleDeclaration){
_arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, _local6, _local4);
};
return (_arg1);
}
public static function initTextField(_arg1:IUITextField):void{
var _local3:CSSStyleDeclaration;
var _local2:Object = _arg1.styleName;
if (_local2){
if (typeof(_local2) == "object"){
if ((_local2 is CSSStyleDeclaration)){
_local3 = CSSStyleDeclaration(_local2);
} else {
if ((_local2 is StyleProxy)){
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = addProperties(StyleManager.stylesRoot, IStyleClient(_local2), false);
return;
};
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles;
return;
};
} else {
_local3 = StyleManager.getStyleDeclaration(("." + _local2));
};
};
var _local4:Object = IStyleClient(_arg1.parent).inheritingStyles;
var _local5:Object = StyleManager.stylesRoot;
if (!_local4){
_local4 = StyleManager.stylesRoot;
};
if (_local3){
_local4 = _local3.addStyleToProtoChain(_local4, DisplayObject(_arg1));
_local5 = _local3.addStyleToProtoChain(_local5, DisplayObject(_arg1));
};
_arg1.inheritingStyles = _local4;
_arg1.nonInheritingStyles = _local5;
}
}
}//package mx.styles
Section 358
//StyleProxy (mx.styles.StyleProxy)
package mx.styles {
import mx.core.*;
public class StyleProxy implements IStyleClient {
private var _source:IStyleClient;
private var _filterMap:Object;
mx_internal static const VERSION:String = "3.4.0.9271";
public function StyleProxy(_arg1:IStyleClient, _arg2:Object){
this.filterMap = _arg2;
this.source = _arg1;
}
public function styleChanged(_arg1:String):void{
return (_source.styleChanged(_arg1));
}
public function get filterMap():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? null : _filterMap);
}
public function set filterMap(_arg1:Object):void{
_filterMap = _arg1;
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_source.styleDeclaration);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
return (_source.notifyStyleChangeInChildren(_arg1, _arg2));
}
public function set inheritingStyles(_arg1:Object):void{
}
public function get source():IStyleClient{
return (_source);
}
public function get styleName():Object{
if ((_source.styleName is IStyleClient)){
return (new StyleProxy(IStyleClient(_source.styleName), filterMap));
};
return (_source.styleName);
}
public function registerEffects(_arg1:Array):void{
return (_source.registerEffects(_arg1));
}
public function regenerateStyleCache(_arg1:Boolean):void{
_source.regenerateStyleCache(_arg1);
}
public function get inheritingStyles():Object{
return (_source.inheritingStyles);
}
public function get className():String{
return (_source.className);
}
public function clearStyle(_arg1:String):void{
_source.clearStyle(_arg1);
}
public function getClassStyleDeclarations():Array{
return (_source.getClassStyleDeclarations());
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function setStyle(_arg1:String, _arg2):void{
_source.setStyle(_arg1, _arg2);
}
public function get nonInheritingStyles():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? _source.nonInheritingStyles : null);
}
public function set styleName(_arg1:Object):void{
_source.styleName = _arg1;
}
public function getStyle(_arg1:String){
return (_source.getStyle(_arg1));
}
public function set source(_arg1:IStyleClient):void{
_source = _arg1;
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_source.styleDeclaration = styleDeclaration;
}
}
}//package mx.styles
Section 359
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
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 = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_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 = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 360
//EventUtil (mx.utils.EventUtil)
package mx.utils {
import flash.events.*;
import mx.events.*;
public class EventUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var _sandboxEventMap:Object;
private static var _mouseEventMap:Object;
public static function get sandboxMouseEventMap():Object{
if (!_sandboxEventMap){
_sandboxEventMap = {};
_sandboxEventMap[SandboxMouseEvent.CLICK_SOMEWHERE] = MouseEvent.CLICK;
_sandboxEventMap[SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE] = MouseEvent.DOUBLE_CLICK;
_sandboxEventMap[SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE] = MouseEvent.MOUSE_DOWN;
_sandboxEventMap[SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE] = MouseEvent.MOUSE_MOVE;
_sandboxEventMap[SandboxMouseEvent.MOUSE_UP_SOMEWHERE] = MouseEvent.MOUSE_UP;
_sandboxEventMap[SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE] = MouseEvent.MOUSE_WHEEL;
};
return (_sandboxEventMap);
}
public static function get mouseEventMap():Object{
if (!_mouseEventMap){
_mouseEventMap = {};
_mouseEventMap[MouseEvent.CLICK] = SandboxMouseEvent.CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.DOUBLE_CLICK] = SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_DOWN] = SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_MOVE] = SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_UP] = SandboxMouseEvent.MOUSE_UP_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_WHEEL] = SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE;
};
return (_mouseEventMap);
}
}
}//package mx.utils
Section 361
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
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 = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_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;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_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 362
//LoaderUtil (mx.utils.LoaderUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
public class LoaderUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
mx_internal static var urlFilters:Array = [{searchString:"/[[DYNAMIC]]/", filterFunction:dynamicURLFilter}, {searchString:"/[[IMPORT]]/", filterFunction:importURLFilter}];
private static function importURLFilter(_arg1:String, _arg2:int):String{
var _local3:int = _arg1.indexOf("://");
return ((_arg1.substring(0, (_local3 + 3)) + _arg1.substring((_arg2 + 12))));
}
public static function normalizeURL(_arg1:LoaderInfo):String{
var _local3:int;
var _local4:String;
var _local5:Function;
var _local2:String = _arg1.url;
var _local6:uint = LoaderUtil.mx_internal::urlFilters.length;
var _local7:uint;
while (_local7 < _local6) {
_local4 = LoaderUtil.mx_internal::urlFilters[_local7].searchString;
_local3 = _local2.indexOf(_local4);
if (_local3 != -1){
_local5 = LoaderUtil.mx_internal::urlFilters[_local7].filterFunction;
_local2 = _local5(_local2, _local3);
};
_local7++;
};
return (_local2);
}
public static function createAbsoluteURL(_arg1:String, _arg2:String):String{
var _local4:int;
var _local5:int;
var _local3:String = _arg2;
if (((_arg1) && (!((((((_arg2.indexOf(":") > -1)) || ((_arg2.indexOf("/") == 0)))) || ((_arg2.indexOf("\\") == 0))))))){
_local4 = _arg1.indexOf("?");
if (_local4 != -1){
_arg1 = _arg1.substring(0, _local4);
};
_local4 = _arg1.indexOf("#");
if (_local4 != -1){
_arg1 = _arg1.substring(0, _local4);
};
_local5 = Math.max(_arg1.lastIndexOf("\\"), _arg1.lastIndexOf("/"));
if (_arg2.indexOf("./") == 0){
_arg2 = _arg2.substring(2);
} else {
while (_arg2.indexOf("../") == 0) {
_arg2 = _arg2.substring(3);
_local5 = Math.max(_arg1.lastIndexOf("\\", (_local5 - 1)), _arg1.lastIndexOf("/", (_local5 - 1)));
};
};
if (_local5 != -1){
_local3 = (_arg1.substr(0, (_local5 + 1)) + _arg2);
};
};
return (_local3);
}
private static function dynamicURLFilter(_arg1:String, _arg2:int):String{
return (_arg1.substring(0, _arg2));
}
}
}//package mx.utils
Section 363
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 364
//SecurityUtil (mx.utils.SecurityUtil)
package mx.utils {
import mx.core.*;
public class SecurityUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function hasMutualTrustBetweenParentAndChild(_arg1:ISWFBridgeProvider):Boolean{
if (((((_arg1) && (_arg1.childAllowsParent))) && (_arg1.parentAllowsChild))){
return (true);
};
return (false);
}
}
}//package mx.utils
Section 365
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.4.0.9271";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_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 _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
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 366
//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 367
//ValidationResult (mx.validators.ValidationResult)
package mx.validators {
public class ValidationResult {
public var subField:String;
public var errorCode:String;
public var isError:Boolean;
public var errorMessage:String;
mx_internal static const VERSION:String = "3.4.0.9271";
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 368
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 369
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 370
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 371
//_ButtonStyle (_ButtonStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ButtonStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Button");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Button", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.paddingTop = 2;
this.cornerRadius = 4;
this.textAlign = "center";
this.verticalGap = 2;
this.horizontalGap = 2;
this.skin = ButtonSkin;
this.paddingLeft = 10;
this.paddingBottom = 2;
this.paddingRight = 10;
};
};
}
}
}//package
Section 372
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.shadowDirection = "center";
this.fontWeight = "normal";
this.dropShadowEnabled = true;
this.leading = 0;
this.backgroundColor = 0xFFFFFF;
this.shadowDistance = 1;
this.cornerRadius = 0;
this.borderThickness = 0;
this.paddingLeft = 5;
this.paddingRight = 5;
};
};
}
}
}//package
Section 373
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 374
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.backgroundColor = 0xFFFFFF;
this.borderThickness = 0;
};
};
}
}
}//package
Section 375
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.borderStyle = "errorTipRight";
this.paddingTop = 4;
this.borderColor = 13510953;
this.color = 0xFFFFFF;
this.fontSize = 9;
this.shadowColor = 0;
this.paddingLeft = 4;
this.paddingBottom = 4;
this.paddingRight = 4;
};
};
}
}
}//package
Section 376
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fillColor = 0xFFFFFF;
this.kerning = false;
this.iconColor = 0x111111;
this.textRollOverColor = 2831164;
this.horizontalAlign = "left";
this.shadowCapColor = 14015965;
this.backgroundAlpha = 1;
this.filled = true;
this.textDecoration = "none";
this.roundedBottomCorners = true;
this.fontThickness = 0;
this.focusBlendMode = "normal";
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.horizontalGap = 8;
this.borderCapColor = 9542041;
this.buttonColor = 7305079;
this.indentation = 17;
this.selectionDisabledColor = 0xDDDDDD;
this.closeDuration = 250;
this.embedFonts = false;
this.paddingTop = 0;
this.letterSpacing = 0;
this.focusAlpha = 0.4;
this.bevel = true;
this.fontSize = 10;
this.shadowColor = 0xEEEEEE;
this.borderAlpha = 1;
this.paddingLeft = 0;
this.fontWeight = "normal";
this.indicatorGap = 14;
this.focusSkin = HaloFocusRect;
this.dropShadowEnabled = false;
this.leading = 2;
this.borderSkin = HaloBorder;
this.fontSharpness = 0;
this.modalTransparencyDuration = 100;
this.borderThickness = 1;
this.backgroundSize = "auto";
this.borderStyle = "inset";
this.borderColor = 12040892;
this.fontAntiAliasType = "advanced";
this.errorColor = 0xFF0000;
this.shadowDistance = 2;
this.horizontalGridLineColor = 0xF7F7F7;
this.stroked = false;
this.modalTransparencyColor = 0xDDDDDD;
this.cornerRadius = 0;
this.verticalAlign = "top";
this.textIndent = 0;
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.verticalGridLineColor = 14015965;
this.themeColor = 40447;
this.version = "3.0.0";
this.shadowDirection = "center";
this.modalTransparency = 0.5;
this.repeatInterval = 35;
this.openDuration = 250;
this.textAlign = "left";
this.fontFamily = "Verdana";
this.textSelectedColor = 2831164;
this.paddingBottom = 0;
this.strokeWidth = 1;
this.fontGridFitType = "pixel";
this.horizontalGridLines = false;
this.useRollOver = true;
this.verticalGridLines = true;
this.repeatDelay = 500;
this.fontStyle = "normal";
this.dropShadowColor = 0;
this.focusThickness = 2;
this.verticalGap = 6;
this.disabledColor = 11187123;
this.paddingRight = 0;
this.focusRoundedCorners = "tl tr bl br";
this.borderSides = "left top right bottom";
this.disabledIconColor = 0x999999;
this.modalTransparencyBlur = 3;
this.color = 734012;
this.selectionDuration = 250;
this.highlightAlphas = [0.3, 0];
};
};
}
}
}//package
Section 377
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 378
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 379
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingBottom = 2;
this.paddingRight = 2;
};
};
}
}
}//package
Section 380
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xFFFFFF;
this.backgroundColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderAlpha = 1;
};
};
}
}
}//package
Section 381
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.backgroundColor = 0xFFFFFF;
this.backgroundImage = "";
this.horizontalAlign = "left";
this.paddingLeft = 0;
this.paddingBottom = 0;
this.paddingRight = 0;
};
};
}
}
}//package
Section 382
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.textAlign = "left";
};
};
}
}
}//package
Section 383
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 384
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "inset";
this.borderColor = 14015965;
this.highlightColor = 12897484;
this.backgroundColor = 0xFFFFFF;
this.shadowCapColor = 14015965;
this.shadowColor = 14015965;
this.paddingLeft = 5;
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.paddingRight = 5;
};
};
}
}
}//package
Section 385
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 386
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 387
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0xFFFFFF;
this.textAlign = "center";
};
};
}
}
}//package
Section 388
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 389
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 390
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 391
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 392
//en_US$effects_properties (en_US$effects_properties)
package {
import mx.resources.*;
public class en_US$effects_properties extends ResourceBundle {
public function en_US$effects_properties(){
super("en_US", "effects");
}
override protected function getContent():Object{
var _local1:Object = {incorrectTrigger:"The Zoom effect can not be triggered by a moveEffect trigger.", incorrectSource:"Source property must be a Class or String."};
return (_local1);
}
}
}//package
Section 393
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 394
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 395
//Main (Main)
package {
import com.adamatomic.flixel.*;
import mx.events.*;
import island.state.*;
import com.twofoldsecret.ui.*;
public class Main extends FlxGame {
protected var _397959899ArmorAnimation:Class;
public function Main():void{
_397959899ArmorAnimation = Main_ArmorAnimation;
FlashState.swf = ArmorAnimation;
FlashState.allowedDomains = [".*armorgames.com"];
FlashState.duration = 4.6;
FlashState.nextState = LogoState;
LogoState.nextState = StartState;
super(320, 240, FlashState, 2, 4278190080, false);
this.help("Unused", "Unused", "Unused", "Move");
}
protected function set ArmorAnimation(_arg1:Class):void{
var _local2:Object = this._397959899ArmorAnimation;
if (_local2 !== _arg1){
this._397959899ArmorAnimation = _arg1;
this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "ArmorAnimation", _local2, _arg1));
};
}
protected function get ArmorAnimation():Class{
return (this._397959899ArmorAnimation);
}
}
}//package
Section 396
//Main_ArmorAnimation (Main_ArmorAnimation)
package {
import mx.core.*;
public class Main_ArmorAnimation extends ByteArrayAsset {
}
}//package
Section 397
//Preloader (Preloader)
package {
import com.adamatomic.flixel.data.*;
public class Preloader extends FlxFactory {
public function Preloader():void{
className = "Main";
super();
}
}
}//package