Section 1
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _subTweens:Array;
protected var _initted:Boolean;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _isDisplayObject:Boolean;
protected var _active:Boolean;
public var tweens:Array;
public var vars:Object;
public var initTime:int;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 8.02;
protected static var _all:Dictionary = new Dictionary();
private static var _sprite:Sprite = new Sprite();
protected static var _curTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:*;
super();
if (_arg1 == null){
return;
};
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_classInitted = true;
};
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((_all[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
delete _all[_arg1];
_all[_arg1] = new Dictionary(true);
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
_active = (((_arg2 == 0)) && ((this.delay == 0)));
this.target = _arg1;
_isDisplayObject = (_arg1 is DisplayObject);
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = (this.vars.alpha > 0);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
this.initTime = _curTime;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
this.startTime = _curTime;
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
_local5 = this.vars.visible;
if (this.vars.isTV == true){
_local5 = this.vars.exposedProps.visible;
};
if (((((!((_local5 == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = Boolean(_local5);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local7:String;
var _local6:Object = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
_subTweens[_subTweens.length] = _local6;
for (_local7 in _arg4) {
if (typeof(_arg4[_local7]) == "number"){
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:(_arg4[_local7] - _arg3[_local7]), sub:_local6, name:_arg1};
} else {
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:Number(_arg4[_local7]), sub:_local6, name:_arg1};
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
var _local5:Object = this.vars;
if (_local5.isTV == true){
_local5 = _local5.exposedProps;
};
if (((!(_arg1)) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(_local5, _all[this.target]);
};
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local6.length) {
if (((!((this.target[_local4] == _local6[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = {o:this.target, p:_local4.toString(), s:this.target[_local4], c:(_local6[_local4] - this.target[_local4]), name:_local4.toString()};
};
_local4++;
};
} else {
if (((((!((typeof(_local5.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (_local5.alpha != undefined){
_local8.alphaMultiplier = _local5.alpha;
delete _local5.alpha;
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_local5.tint == null))) && (!((_local5.tint == ""))))) || ((_local5.tint == 0)))))){
_local8.color = _local5.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
};
if (((!((_local5.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_local5.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
for (_local3 in _local5) {
if ((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_local5[_local3]) == "number"){
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:(_local5[_local3] - this.target[_local3]), name:_local3};
} else {
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:Number(_local5[_local3]), name:_local3};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local9 = this.tweens[_local4];
this.tweens[_local4].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local4--;
};
};
if ((((_local5.visible == true)) && (_isDisplayObject))){
this.target.visible = true;
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - (this.duration * 1000));
render(_curTime);
return;
};
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
if (((!(isNaN(this.vars.autoAlpha))) && ((this.target.alpha == 0)))){
this.target.visible = false;
} else {
if (this.vars.runBackwards != true){
this.target.visible = this.vars.visible;
};
};
};
if (this.vars.persist != true){
removeTween(this);
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
_all[_arg1.target][_arg1] = null;
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
var _local2:uint = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local2:uint;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number = _arg1.target.progress;
var _local3:Number = (1 - _local2);
var _local4:Object = _arg1.info.color;
var _local5:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 2
//HighScoreRceivedEvent (libs.com.gamelion.utils.HighScoreRceivedEvent)
package libs.com.gamelion.utils {
import flash.events.*;
public class HighScoreRceivedEvent extends Event {
private var m_highScores:Array;
public static const TOP_WEEK_SCORES:String = "topWeekScores";
public static const TOP_TODAY_SCORES:String = "topTodayScores";
public static const TOP_SCORES:String = "topScores";
public function HighScoreRceivedEvent(_arg1:String, _arg2:Array, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
m_highScores = _arg2;
}
public function get highScores():Array{
return (m_highScores);
}
}
}//package libs.com.gamelion.utils
Section 3
//HighScoreReceivedAllEvent (libs.com.gamelion.utils.HighScoreReceivedAllEvent)
package libs.com.gamelion.utils {
import flash.events.*;
public class HighScoreReceivedAllEvent extends Event {
private var m_allArrays:Object;
public static const TOP_ALL_SCORES:String = "topAllScores";
public function HighScoreReceivedAllEvent(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
m_allArrays = _arg2;
}
public function get highScores():Object{
return (m_allArrays);
}
}
}//package libs.com.gamelion.utils
Section 4
//HighScoreSavedEvent (libs.com.gamelion.utils.HighScoreSavedEvent)
package libs.com.gamelion.utils {
import flash.events.*;
public class HighScoreSavedEvent extends Event {
private var m_rank:int;
public static const COMPLETE:String = "complete";
public function HighScoreSavedEvent(_arg1:String, _arg2:int, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
m_rank = _arg2;
}
public function get rank():int{
return (m_rank);
}
}
}//package libs.com.gamelion.utils
Section 5
//HighScoresSystem (libs.com.gamelion.utils.HighScoresSystem)
package libs.com.gamelion.utils {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class HighScoresSystem extends Sprite {
private var connection:NetConnection;
public static const GET_SCORES_ERROR:String = "getScoresError";
public static const CONN_ERROR:String = "connError";
public static const DESCENDING_ORDER:String = "DESC";
public static const SAVE_SCORES_ERROR:String = "saveScoresError";
public static const ASCENDING_ORDER:String = "ASC";
public function HighScoresSystem(_arg1:String){
connection = new NetConnection();
connection.connect(_arg1);
connection.addEventListener(NetStatusEvent.NET_STATUS, ff);
}
public function getTopScores(_arg1:int, _arg2:int, _arg3:String="DESC"):void{
var _local4:Responder = new Responder(onGetTopScores, onFault);
connection.call("Scores.getTop", _local4, _arg1, _arg2, _arg3);
}
private function onFault(_arg1:Object):void{
dispatchEvent(new Event(HighScoresSystem.GET_SCORES_ERROR));
}
public function getTodayScores(_arg1:int, _arg2:int, _arg3:String="DESC"):void{
var _local4:Responder = new Responder(onGetTodayScores, onFault);
connection.call("Scores.getTodayTop", _local4, _arg1, _arg2, _arg3);
}
private function ff(_arg1:NetStatusEvent):void{
dispatchEvent(new Event(HighScoresSystem.CONN_ERROR));
}
private function onGetTodayScores(_arg1:Array):void{
dispatchEvent(new HighScoreRceivedEvent(HighScoreRceivedEvent.TOP_TODAY_SCORES, _arg1));
}
public function getAllScores(_arg1:int, _arg2:int, _arg3:String="DESC"):void{
var _local4:Responder = new Responder(onGetAllScores, onFault);
connection.call("Scores.getAll", _local4, _arg1, _arg2, _arg3);
}
public function getWeekScores(_arg1:int, _arg2:int, _arg3:String="DESC"):void{
var _local4:Responder = new Responder(onGetWeekScores, onFault);
connection.call("Scores.getWeekTop", _local4, _arg1, _arg2, _arg3);
}
public function saveScore(_arg1:int, _arg2:String, _arg3:int, _arg4:String="DESC", _arg5:String=null):void{
var _local6:Responder = new Responder(onSaveScore, onFault);
connection.call("Scores.save", _local6, _arg1, _arg2, _arg3, _arg4, _arg5);
}
private function onSaveScore(_arg1:int):void{
dispatchEvent(new HighScoreSavedEvent(HighScoreSavedEvent.COMPLETE, _arg1));
}
private function onGetAllScores(_arg1:Object):void{
dispatchEvent(new HighScoreReceivedAllEvent(HighScoreReceivedAllEvent.TOP_ALL_SCORES, _arg1));
}
private function onGetWeekScores(_arg1:Array):void{
dispatchEvent(new HighScoreRceivedEvent(HighScoreRceivedEvent.TOP_WEEK_SCORES, _arg1));
}
private function onGetTopScores(_arg1:Array):void{
dispatchEvent(new HighScoreRceivedEvent(HighScoreRceivedEvent.TOP_SCORES, _arg1));
}
}
}//package libs.com.gamelion.utils
Section 6
//ObjectPool (libs.de.polygonal.core.ObjectPool)
package libs.de.polygonal.core {
public class ObjectPool {
private var _head:ObjNode;
private var _usageCount:int;
private var _initSize:int;
private var _allocNode:ObjNode;
private var _tail:ObjNode;
private var _emptyNode:ObjNode;
private var _currSize:int;
private var _obj:Class;
private var _grow:Boolean;// = true
public function ObjectPool(_arg1:Boolean=false){
_grow = _arg1;
}
public function get size():int{
return (_currSize);
}
public function initialze(_arg1:String, _arg2:Array):void{
var _local3:ObjNode = _head;
while (_local3) {
_local3.data[_arg1].apply(_local3.data, _arg2);
if (_local3 == _tail){
break;
};
_local3 = _local3.next;
};
}
public function get wasteCount():int{
return ((_currSize - _usageCount));
}
public function get usageCount():int{
return (_usageCount);
}
public function deconstruct():void{
var _local2:ObjNode;
var _local1:ObjNode = _head;
while (_local1) {
_local2 = _local1.next;
_local1.next = null;
_local1.data = null;
_local1 = _local2;
};
_head = (_tail = (_emptyNode = (_allocNode = null)));
}
public function purge():void{
var _local1:int;
var _local2:ObjNode;
var _local3:Array;
var _local4:ObjNode;
var _local5:ObjNode;
var _local6:int;
if (_usageCount == 0){
if (_currSize == _initSize){
return;
};
if (_currSize > _initSize){
_local1 = 0;
_local2 = _head;
while (++_local1 < _initSize) {
_local2 = _local2.next;
};
_tail = _local2;
_allocNode = (_emptyNode = _head);
_currSize = _initSize;
return;
};
} else {
_local3 = [];
_local2 = _head;
while (_local2) {
if (!_local2.data){
var _temp1 = _local1;
_local1 = (_local1 + 1);
_local3[int(_temp1)] = _local2;
};
if (_local2 == _tail){
break;
};
_local2 = _local2.next;
};
_currSize = _local3.length;
_usageCount = _currSize;
_head = (_tail = _local3[0]);
_local1 = 1;
while (_local1 < _currSize) {
_local2 = _local3[_local1];
_local2.next = _head;
_head = _local2;
_local1++;
};
_emptyNode = (_allocNode = _head);
_tail.next = _head;
if (_usageCount < _initSize){
_currSize = _initSize;
_local4 = _tail;
_local5 = _tail;
_local6 = (_initSize - _usageCount);
_local1 = 0;
while (_local1 < _local6) {
_local2 = new ObjNode();
_local2.data = new _obj();
_local5.next = _local2;
_local5 = _local2;
_local1++;
};
_tail = _local5;
_tail.next = (_emptyNode = _head);
_allocNode = _local4.next;
};
};
}
public function allocate(_arg1:Class, _arg2:uint):void{
var _local3:ObjNode;
deconstruct();
_obj = _arg1;
_initSize = (_currSize = _arg2);
_head = (_tail = new ObjNode());
_head.data = new _obj();
var _local4 = 1;
while (_local4 < _initSize) {
_local3 = new ObjNode();
_local3.data = new _obj();
_local3.next = _head;
_head = _local3;
_local4++;
};
_emptyNode = (_allocNode = _head);
_tail.next = _head;
}
public function set object(_arg1):void{
if (_usageCount > 0){
_usageCount--;
_emptyNode.data = _arg1;
_emptyNode = _emptyNode.next;
};
}
public function get object(){
var _local1:ObjNode;
var _local2:ObjNode;
var _local3:ObjNode;
var _local4:int;
var _local5:*;
if (_usageCount == _currSize){
if (_grow){
_currSize = (_currSize + _initSize);
_local1 = _tail;
_local2 = _tail;
_local4 = 0;
while (_local4 < _initSize) {
_local3 = new ObjNode();
_local3.data = new _obj();
_local2.next = _local3;
_local2 = _local3;
_local4++;
};
_tail = _local2;
_tail.next = (_emptyNode = _head);
_allocNode = _local1.next;
return (object);
} else {
throw (new Error("object pool exhausted"));
};
} else {
_local5 = _allocNode.data;
_allocNode.data = null;
_allocNode = _allocNode.next;
_usageCount++;
};
return (_local5);
}
}
}//package libs.de.polygonal.core
class ObjNode {
public var data;
public var next:ObjNode;
private function ObjNode(){
}
}
Section 7
//Button (mp3Player.Button)
package mp3Player {
import flash.events.*;
import flash.display.*;
public class Button extends Sprite {
public var pressed:Boolean;// = false
private var buttonOver:Class;
private var buttonUp:Class;
private var button:Bitmap;
public var pressedEvent:String;
public static const SONG_BACK_OVER:Class = Button_SONG_BACK_OVER;
public static const SONG_MUTE:Class = Button_SONG_MUTE;
public static const TURN_OFF:Class = Button_TURN_OFF;
public static const SONG_MUTE_OVER:Class = Button_SONG_MUTE_OVER;
public static const SONG_BACK:Class = Button_SONG_BACK;
public static const VOLUME_UP_OVER:Class = Button_VOLUME_UP_OVER;
public static const SONG_PLAY_OVER:Class = Button_SONG_PLAY_OVER;
public static const SONG_PLAY:Class = Button_SONG_PLAY;
public static const SONG_FORWARD_OVER:Class = Button_SONG_FORWARD_OVER;
public static const VOLUME_UP:Class = Button_VOLUME_UP;
public static const VOLUME_DOWN:Class = Button_VOLUME_DOWN;
public static const TURN_OFF_OVER:Class = Button_TURN_OFF_OVER;
public static const VOLUME_DOWN_OVER:Class = Button_VOLUME_DOWN_OVER;
public static const SONG_FORWARD:Class = Button_SONG_FORWARD;
public function Button(_arg1:Class, _arg2:Class, _arg3:Class, _arg4:Boolean, _arg5:String){
this.buttonMode = true;
this.pressedEvent = _arg5;
button = new (_arg3);
addChild(button);
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
addEventListener(MouseEvent.CLICK, onMouseClick);
buttonUp = _arg3;
buttonOver = _arg1;
}
private function onMouseOut(_arg1:MouseEvent):void{
removeChild(button);
button = new buttonUp();
addChild(button);
}
private function onMouseClick(_arg1:MouseEvent):void{
dispatchEvent(new Event(pressedEvent));
}
private function onMouseOver(_arg1:MouseEvent):void{
removeChild(button);
button = new buttonOver();
addChild(button);
}
}
}//package mp3Player
Section 8
//Button_SONG_BACK (mp3Player.Button_SONG_BACK)
package mp3Player {
import mx.core.*;
public class Button_SONG_BACK extends BitmapAsset {
}
}//package mp3Player
Section 9
//Button_SONG_BACK_OVER (mp3Player.Button_SONG_BACK_OVER)
package mp3Player {
import mx.core.*;
public class Button_SONG_BACK_OVER extends BitmapAsset {
}
}//package mp3Player
Section 10
//Button_SONG_FORWARD (mp3Player.Button_SONG_FORWARD)
package mp3Player {
import mx.core.*;
public class Button_SONG_FORWARD extends BitmapAsset {
}
}//package mp3Player
Section 11
//Button_SONG_FORWARD_OVER (mp3Player.Button_SONG_FORWARD_OVER)
package mp3Player {
import mx.core.*;
public class Button_SONG_FORWARD_OVER extends BitmapAsset {
}
}//package mp3Player
Section 12
//Button_SONG_MUTE (mp3Player.Button_SONG_MUTE)
package mp3Player {
import mx.core.*;
public class Button_SONG_MUTE extends BitmapAsset {
}
}//package mp3Player
Section 13
//Button_SONG_MUTE_OVER (mp3Player.Button_SONG_MUTE_OVER)
package mp3Player {
import mx.core.*;
public class Button_SONG_MUTE_OVER extends BitmapAsset {
}
}//package mp3Player
Section 14
//Button_SONG_PLAY (mp3Player.Button_SONG_PLAY)
package mp3Player {
import mx.core.*;
public class Button_SONG_PLAY extends BitmapAsset {
}
}//package mp3Player
Section 15
//Button_SONG_PLAY_OVER (mp3Player.Button_SONG_PLAY_OVER)
package mp3Player {
import mx.core.*;
public class Button_SONG_PLAY_OVER extends BitmapAsset {
}
}//package mp3Player
Section 16
//Button_TURN_OFF (mp3Player.Button_TURN_OFF)
package mp3Player {
import mx.core.*;
public class Button_TURN_OFF extends BitmapAsset {
}
}//package mp3Player
Section 17
//Button_TURN_OFF_OVER (mp3Player.Button_TURN_OFF_OVER)
package mp3Player {
import mx.core.*;
public class Button_TURN_OFF_OVER extends BitmapAsset {
}
}//package mp3Player
Section 18
//Button_VOLUME_DOWN (mp3Player.Button_VOLUME_DOWN)
package mp3Player {
import mx.core.*;
public class Button_VOLUME_DOWN extends BitmapAsset {
}
}//package mp3Player
Section 19
//Button_VOLUME_DOWN_OVER (mp3Player.Button_VOLUME_DOWN_OVER)
package mp3Player {
import mx.core.*;
public class Button_VOLUME_DOWN_OVER extends BitmapAsset {
}
}//package mp3Player
Section 20
//Button_VOLUME_UP (mp3Player.Button_VOLUME_UP)
package mp3Player {
import mx.core.*;
public class Button_VOLUME_UP extends BitmapAsset {
}
}//package mp3Player
Section 21
//Button_VOLUME_UP_OVER (mp3Player.Button_VOLUME_UP_OVER)
package mp3Player {
import mx.core.*;
public class Button_VOLUME_UP_OVER extends BitmapAsset {
}
}//package mp3Player
Section 22
//SoundPlayer (mp3Player.SoundPlayer)
package mp3Player {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.errors.*;
public class SoundPlayer extends Sprite {
private var _offButton:Button;
private var _minusButton:Button;
private var _position:Number;
private var _plusButton:Button;
private var loopedSound:Sound;
private var _backwardButton:Button;
private var _playButton:Button;
private var _soundChanel2:SoundChannel;
private var _soundChanel3:SoundChannel;
private var soundToLoop:Sound;
private var _soundChanel1:SoundChannel;
private var _volume:Number;
private var _paused:Boolean;// = false
private var _playerBackground:Bitmap;
private var _playList:XMLList;
private var _forwardButton:Button;
private var _muteButton:Button;
private var _muted:Boolean;
private var _currentSong:Number;
private var _songs:Array;
private static var MUTE_CLICKED:String = "muteButtonClickedEvent";
private static var BACKWARD_CLICKED:String = "backwardButtonClickedEvent";
private static var PLUS_CLICKED:String = "plusButtonClickedEvent";
private static var DISPLAY_CLICKED:String = "displayClickedEvent";
private static var FORWARD_CLICKED:String = "forwardButtonClickedEvent";
private static var _soundPlayer:SoundPlayer;
public static var PLAYLIST_PATH:String = "http://www.playlion.com/games/arkanoid2/music/playlist.xml";
private static var PLAY_CLICKED:String = "playButtonClickedEvent";
public static var INIT_COMPLETED:String = "initCompleted";
private static var MINUS_CLICKED:String = "minusButtonClickedEvent";
public function SoundPlayer(_arg1:Function=null){
var _local2:URLLoader;
super();
if (_arg1 == getInstance){
_volume = 0.5;
_muted = false;
_backwardButton = new Button(Button.SONG_BACK_OVER, Button.SONG_BACK, Button.SONG_BACK, false, BACKWARD_CLICKED);
_backwardButton.x = 13;
_backwardButton.y = 54;
addChild(_backwardButton);
_playButton = new Button(Button.SONG_PLAY_OVER, Button.SONG_PLAY, Button.SONG_PLAY, false, PLAY_CLICKED);
_playButton.x = 35;
_playButton.y = 50;
addChild(_playButton);
_forwardButton = new Button(Button.SONG_FORWARD_OVER, Button.SONG_FORWARD, Button.SONG_FORWARD, false, FORWARD_CLICKED);
_forwardButton.x = 57;
_forwardButton.y = 43;
addChild(_forwardButton);
_minusButton = new Button(Button.VOLUME_DOWN_OVER, Button.VOLUME_DOWN, Button.VOLUME_DOWN, false, MINUS_CLICKED);
_minusButton.x = 26;
_minusButton.y = 100;
_minusButton.addEventListener(MINUS_CLICKED, onMinusClicked);
addChild(_minusButton);
_muteButton = new Button(Button.SONG_MUTE_OVER, Button.SONG_MUTE, Button.SONG_MUTE, true, MUTE_CLICKED);
_muteButton.x = 42;
_muteButton.y = 73;
_muteButton.addEventListener(MUTE_CLICKED, onMuteClicked);
addChild(_muteButton);
_offButton = new Button(Button.TURN_OFF_OVER, Button.TURN_OFF, Button.TURN_OFF, true, MUTE_CLICKED);
_offButton.x = 50;
_offButton.y = 12;
_offButton.addEventListener(MUTE_CLICKED, onMuteClicked);
addChild(_offButton);
_plusButton = new Button(Button.VOLUME_UP_OVER, Button.VOLUME_UP, Button.VOLUME_UP, false, PLUS_CLICKED);
_plusButton.x = 71;
_plusButton.y = 88;
_plusButton.addEventListener(PLUS_CLICKED, onPlusClicked);
addChild(_plusButton);
_local2 = new URLLoader();
_local2.addEventListener(Event.COMPLETE, initPlayer);
_local2.load(new URLRequest(PLAYLIST_PATH));
} else {
throw (new IllegalOperationError("This is a singleton class!!!"));
};
}
private function initPlayer(_arg1:Event):void{
var _local3:XML;
var _local4:Sound;
var _local5:URLRequest;
var _local6:SoundLoaderContext;
_playList = new XMLList(new XML(_arg1.target.data).mp3);
_currentSong = 0;
_position = 0;
var _local2:Boolean;
_songs = new Array();
for each (_local3 in _playList) {
_local4 = new Sound();
_local5 = new URLRequest(_local3.url);
_local6 = new SoundLoaderContext(25);
_local4.load(_local5, _local6);
_songs.push(_local4);
};
dispatchEvent(new Event(INIT_COMPLETED));
_backwardButton.addEventListener(BACKWARD_CLICKED, onBackwardClicked);
_playButton.addEventListener(PLAY_CLICKED, onPlayClicked);
_forwardButton.addEventListener(FORWARD_CLICKED, onForwardClicked);
}
private function onMinusClicked(_arg1:Event):void{
if (_volume > 0.1){
_volume = (_volume - 0.1);
};
if (_muted){
_muted = false;
_muteButton.pressed = false;
};
if (_soundChanel1){
_soundChanel1.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel2){
_soundChanel2.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel3){
_soundChanel3.soundTransform = new SoundTransform(_volume);
};
}
private function startLoop(_arg1:Event):void{
_soundChanel3.removeEventListener(Event.SOUND_COMPLETE, startLoop);
playLoopSound(soundToLoop);
}
public function play():void{
if (_soundChanel1 != null){
_soundChanel1.stop();
};
_soundChanel1 = _songs[_currentSong].play();
_soundChanel1.soundTransform = new SoundTransform(_volume);
_soundChanel1.addEventListener(Event.SOUND_COMPLETE, onForwardClicked, false, 0, true);
}
public function playSound(_arg1:Sound):void{
_soundChanel2 = _arg1.play();
_soundChanel2.soundTransform = new SoundTransform(_volume);
if (_muted){
_soundChanel2.soundTransform = new SoundTransform(0);
};
}
private function onPlusClicked(_arg1:Event):void{
if (_volume < 0.9){
_volume = (_volume + 0.1);
};
if (_muted){
_muted = false;
_muteButton.pressed = false;
};
if (_soundChanel1){
_soundChanel1.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel2){
_soundChanel2.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel3){
_soundChanel3.soundTransform = new SoundTransform(_volume);
};
}
private function onForwardClicked(_arg1:Event):void{
if (_currentSong < (_playList.length() - 1)){
_currentSong++;
} else {
_currentSong = 0;
};
_soundChanel1.stop();
_soundChanel1 = _songs[_currentSong].play();
if (_paused){
_position = 0;
_soundChanel1.stop();
};
if (_muted){
_soundChanel1.soundTransform = new SoundTransform(0);
} else {
_soundChanel1.soundTransform = new SoundTransform(_volume);
};
_soundChanel1.addEventListener(Event.SOUND_COMPLETE, onForwardClicked, false, 0, true);
}
public function startMusic():void{
onPlayClicked(null);
}
public function playSoundOnLoopChannel(_arg1:Sound, _arg2:Sound=null):void{
_soundChanel3 = _arg1.play();
_soundChanel3.soundTransform = new SoundTransform(_volume);
if (_muted){
_soundChanel3.soundTransform = new SoundTransform(0);
};
if (_arg2 != null){
soundToLoop = _arg2;
_soundChanel3.addEventListener(Event.SOUND_COMPLETE, startLoop, false, 0, true);
};
}
public function stopLoopSound():void{
if (_soundChanel3 == null){
return;
};
_soundChanel3.stop();
removeEventListener(Event.SOUND_COMPLETE, playLoopSound);
}
private function onPlayClicked(_arg1:Event):void{
if (_paused){
_paused = false;
_soundChanel1 = _songs[_currentSong].play(_position);
_soundChanel1.addEventListener(Event.SOUND_COMPLETE, onForwardClicked, false, 0, true);
_soundChanel1.soundTransform = new SoundTransform(_volume);
if (_muted){
_soundChanel1.soundTransform = new SoundTransform(0);
};
} else {
_paused = true;
_position = _soundChanel1.position;
_soundChanel1.stop();
};
}
private function onMuteClicked(_arg1:Event):void{
if (_muted){
_muted = false;
if (_soundChanel1){
_soundChanel1.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel2){
_soundChanel2.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel3){
_soundChanel3.soundTransform = new SoundTransform(_volume);
};
} else {
_muted = true;
if (_soundChanel1){
_soundChanel1.soundTransform = new SoundTransform(0);
};
if (_soundChanel2){
_soundChanel2.soundTransform = new SoundTransform(_volume);
};
if (_soundChanel3){
_soundChanel3.soundTransform = new SoundTransform(_volume);
};
};
}
public function playLoopSound(_arg1):void{
if ((_arg1 is Sound)){
loopedSound = _arg1;
};
_soundChanel3 = loopedSound.play();
_soundChanel3.soundTransform = new SoundTransform(_volume);
if (_muted){
_soundChanel3.soundTransform = new SoundTransform(0);
};
if (!_soundChanel3.willTrigger(Event.SOUND_COMPLETE)){
_soundChanel3.addEventListener(Event.SOUND_COMPLETE, playLoopSound, false, 0, true);
};
}
private function traceMsg(_arg1:Event):void{
dispatchEvent(new Event(INIT_COMPLETED));
}
private function onBackwardClicked(_arg1:Event):void{
if (_currentSong > 0){
_currentSong--;
} else {
_currentSong = (_playList.length() - 1);
};
_soundChanel1.stop();
_soundChanel1 = _songs[_currentSong].play();
if (_paused){
_position = 0;
_soundChanel1.stop();
};
if (_muted){
_soundChanel1.soundTransform = new SoundTransform(0);
} else {
_soundChanel1.soundTransform = new SoundTransform(_volume);
};
_soundChanel1.addEventListener(Event.SOUND_COMPLETE, onForwardClicked, false, 0, true);
}
public static function getInstance():SoundPlayer{
if (_soundPlayer == null){
_soundPlayer = new SoundPlayer(getInstance);
};
return (_soundPlayer);
}
}
}//package mp3Player
Section 23
//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 24
//Binding (mx.binding.Binding)
package mx.binding {
import mx.collections.errors.*;
public class Binding {
mx_internal var destFunc:Function;
mx_internal var srcFunc:Function;
mx_internal var destString:String;
mx_internal var document:Object;
private var hasHadValue:Boolean;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
mx_internal var isEnabled:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
private var wrappedFunctionSuccessful:Boolean;
mx_internal static const VERSION:String = "3.0.0.0";
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);
}
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);
}
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);
}
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;
};
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (!isEnabled){
return;
};
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
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 25
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "3.0.0.0";
static var debugDestinationStrings:Object = {};
public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:String;
if (((!(_arg2)) || ((_arg2 == "")))){
return;
};
if (((((((_arg1) && ((((_arg1 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 26
//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.0.0.0";
public function EvalBindingResponder(_arg1:Binding, _arg2:Object){
this.binding = _arg1;
this.object = _arg2;
}
public function fault(_arg1:Object):void{
}
public function result(_arg1:Object):void{
binding.execute(object);
}
}
}//package mx.binding
Section 27
//IBindingClient (mx.binding.IBindingClient)
package mx.binding {
public interface IBindingClient {
}
}//package mx.binding
Section 28
//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.0.0.0";
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 29
//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 30
//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.0.0.0";
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 31
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 32
//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.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 33
//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.0.0.0";
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 34
//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 35
//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.0.0.0";
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 36
//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.0.0.0";
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 37
//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.0.0.0";
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 38
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class EmbeddedFontRegistry implements IEmbeddedFontRegistry {
mx_internal static const VERSION:String = "3.0.0.0";
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 39
//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.0.0.0";
}
}//package mx.core
Section 40
//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.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 41
//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.0.0.0";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 42
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 43
//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.0.0.0";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 44
//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.0.0.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 45
//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.0.0.0";
public function FlexTextField(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 46
//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.0.0.0";
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 47
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 48
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 49
//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 50
//IChildList (mx.core.IChildList)
package mx.core {
import flash.geom.*;
import flash.display.*;
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 51
//IConstraintClient (mx.core.IConstraintClient)
package mx.core {
public interface IConstraintClient {
function setConstraintValue(_arg1:String, _arg2):void;
function getConstraintValue(_arg1:String);
}
}//package mx.core
Section 52
//IContainer (mx.core.IContainer)
package mx.core {
import flash.geom.*;
import flash.media.*;
import flash.display.*;
import mx.managers.*;
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 53
//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 54
//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 55
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 56
//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 57
//IFlexModule (mx.core.IFlexModule)
package mx.core {
public interface IFlexModule {
function set moduleFactory(_arg1:IFlexModuleFactory):void;
function get moduleFactory():IFlexModuleFactory;
}
}//package mx.core
Section 58
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 59
//IFontContextComponent (mx.core.IFontContextComponent)
package mx.core {
public interface IFontContextComponent {
function get fontContext():IFlexModuleFactory;
function set fontContext(_arg1:IFlexModuleFactory):void;
}
}//package mx.core
Section 60
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function set imeMode(_arg1:String):void;
function get imeMode():String;
}
}//package mx.core
Section 61
//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 62
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 63
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 64
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 65
//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 66
//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 67
//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 68
//IStateClient (mx.core.IStateClient)
package mx.core {
public interface IStateClient {
function get currentState():String;
function set currentState(_arg1:String):void;
}
}//package mx.core
Section 69
//ITextFieldFactory (mx.core.ITextFieldFactory)
package mx.core {
import flash.text.*;
public interface ITextFieldFactory {
function createTextField(_arg1:IFlexModuleFactory):TextField;
}
}//package mx.core
Section 70
//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 71
//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 72
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 73
//IUITextField (mx.core.IUITextField)
package mx.core {
import flash.geom.*;
import flash.display.*;
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 74
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 75
//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 76
//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.0.0.0";
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 77
//RSLItem (mx.core.RSLItem)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import flash.net.*;
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;
protected var url:String;
mx_internal static const VERSION:String = "3.0.0.0";
public function RSLItem(_arg1:String){
this.url = _arg1;
}
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(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 78
//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.0.0.0";
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 79
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.0.0.0";
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 80
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 81
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 82
//TextFieldFactory (mx.core.TextFieldFactory)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class TextFieldFactory implements ITextFieldFactory {
private var textFields:Dictionary;
mx_internal static const VERSION:String = "3.0.0.0";
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 83
//UIComponent (mx.core.UIComponent)
package mx.core {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
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 flash.utils.*;
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.0.0.0";
public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
mx_internal static var dispatchEventHook:Function;
private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY");
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var STYLE_UNINITIALIZED:Object = {};
private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX");
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();
};
}
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 invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((parent) && (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{
return ((_parent) ? _parent : super.parent);
}
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 = 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 (_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 == 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))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
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 _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (_local2.contains(_arg1)){
return (true);
};
while (((_arg1) && (!((_arg1 == this))))) {
if ((_arg1 is IUIComponent)){
_arg1 = IUIComponent(_arg1).owner;
} else {
_arg1 = _arg1.parent;
};
};
return ((_arg1 == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
_visible = _arg1;
if (!initialized){
return;
};
if ($visible == _arg1){
return;
};
$visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
final mx_internal function $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;
};
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){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_systemManager.stage.invalidate();
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _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 (((_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;
};
_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))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){
_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{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
}
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{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
_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))){
if (!listeningForRender){
_local3.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_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))) && (listeningForRender))){
_local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local2.stage.removeEventListener(Event.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))){
if (listeningForRender){
_local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local1.stage.removeEventListener(Event.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 84
//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.0.0.0";
public static const OFF:String = "off";
}
}//package mx.core
Section 85
//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.0.0.0";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 86
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.geom.*;
import flash.display.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public 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 87
//UITextField (mx.core.UITextField)
package mx.core {
import flash.events.*;
import flash.display.*;
import mx.styles.*;
import mx.resources.*;
import mx.managers.*;
import flash.text.*;
import mx.automation.*;
import flash.utils.*;
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.0.0.0";
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 88
//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.0.0.0";
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;
}
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 (_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 89
//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.0.0.0";
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 90
//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.0.0.0";
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 91
//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.0.0.0";
public function PropertyChanges(_arg1:Object){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 92
//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.0.0.0";
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 93
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class ZoomInstance extends TweenEffectInstance {
private var 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.0.0.0";
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.mx_internal::_width = _local2;
};
};
if (!isNaN(origPercentHeight)){
_local3 = target.height;
target.percentHeight = origPercentHeight;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target.mx_internal::_height = _local3;
};
};
super.onTweenEnd(_arg1);
if (mx_internal::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);
tween.mx_internal::needToLayout = true;
EffectManager.resumeEventHandling();
}
}
}//package mx.effects.effectClasses
Section 94
//Effect (mx.effects.Effect)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.managers.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class Effect extends EventDispatcher 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.0.0.0";
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{
var _local1:int;
var _local2:int;
if (targets.length > 0){
propertyChangesArray = [];
_callValidateNow = true;
_local1 = targets.length;
_local2 = 0;
while (_local2 < _local1) {
propertyChangesArray.push(new PropertyChanges(targets[_local2]));
_local2++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
};
endValuesCaptured = false;
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local3:Array = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local3) && ((_local3.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local3.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]);
_local9++;
};
_local7++;
};
};
var _local10:Array = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]);
_local9++;
};
_local7++;
};
};
return (_arg1);
}
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;
var _local3:int;
if (_arg1.length > 0){
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(new PropertyChanges(_arg1[_local3]));
_local3++;
};
_local2 = captureValues(_local2, 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 95
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var _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.0.0.0";
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 96
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import mx.resources.*;
import flash.utils.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.0.0.0";
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 97
//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.0.0.0";
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 98
//IAbstractEffect (mx.effects.IAbstractEffect)
package mx.effects {
import flash.events.*;
public interface IAbstractEffect extends IEventDispatcher {
}
}//package mx.effects
Section 99
//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 100
//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 101
//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 102
//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.0.0.0";
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 103
//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.0.0.0";
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 104
//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.0.0.0";
private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"];
public function Zoom(_arg1:Object=null){
super(_arg1);
instanceClass = ZoomInstance;
applyActualDimensions = false;
relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"];
}
override 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 105
//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.0.0.0";
public static const OVERLAY_CREATED:String = "overlayCreated";
public static const CHILD_ADD:String = "childAdd";
public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
}
override public function clone():Event{
return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject));
}
}
}//package mx.events
Section 106
//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.0.0.0";
public static const DRAG_OVER:String = "dragOver";
public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3);
this.dragInitiator = _arg4;
this.dragSource = _arg5;
this.action = _arg6;
this.ctrlKey = _arg7;
this.altKey = _arg8;
this.shiftKey = _arg9;
}
override public function clone():Event{
var _local1:DragEvent = 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 107
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "3.0.0.0";
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 108
//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.0.0.0";
public static const EFFECT_END:String = "effectEnd";
public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){
super(_arg1, _arg2, _arg3);
this.effectInstance = _arg4;
}
override public function clone():Event{
return (new EffectEvent(type, bubbles, cancelable, effectInstance));
}
}
}//package mx.events
Section 109
//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 INIT_COMPLETE:String = "initComplete";
public static const REMOVE:String = "remove";
public static const BUTTON_DOWN:String = "buttonDown";
public static const EXIT_STATE:String = "exitState";
public static const CREATION_COMPLETE:String = "creationComplete";
public static const REPEAT:String = "repeat";
public static const LOADING:String = "loading";
public static const REPEAT_START:String = "repeatStart";
public static const INITIALIZE:String = "initialize";
public static const ENTER_STATE:String = "enterState";
public static const URL_CHANGED:String = "urlChanged";
public static const REPEAT_END:String = "repeatEnd";
mx_internal static const VERSION:String = "3.0.0.0";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 110
//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.0.0.0";
public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
}
override public function clone():Event{
return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta));
}
}
}//package mx.events
Section 111
//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.0.0.0";
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 112
//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.0.0.0";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 113
//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.0.0.0";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent = 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 114
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "3.0.0.0";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 115
//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.0.0.0";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 116
//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.0.0.0";
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 117
//RSLEvent (mx.events.RSLEvent)
package mx.events {
import flash.events.*;
import flash.net.*;
public class RSLEvent extends ProgressEvent {
public var errorText:String;
public var rslIndex:int;
public var rslTotal:int;
public var url:URLRequest;
public static const RSL_PROGRESS:String = "rslProgress";
public static const RSL_ERROR:String = "rslError";
mx_internal static const VERSION:String = "3.0.0.0";
public static const RSL_COMPLETE:String = "rslComplete";
public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.rslIndex = _arg6;
this.rslTotal = _arg7;
this.url = _arg8;
this.errorText = _arg9;
}
override public function clone():Event{
return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText));
}
}
}//package mx.events
Section 118
//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.0.0.0";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 119
//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.0.0.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 120
//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.0.0.0";
public static const TOOL_TIP_START:String = "toolTipStart";
public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){
super(_arg1, _arg2, _arg3);
this.toolTip = _arg4;
}
override public function clone():Event{
return (new ToolTipEvent(type, bubbles, cancelable, toolTip));
}
}
}//package mx.events
Section 121
//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.0.0.0";
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_START:String = "tweenStart";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 122
//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.0.0.0";
public static const VALID:String = "valid";
public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.field = _arg4;
this.results = _arg5;
}
public function get message():String{
var _local1 = "";
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 123
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.0.0.0";
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 124
//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.0.0.0";
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 125
//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.0.0.0";
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 126
//CursorManager (mx.managers.CursorManager)
package mx.managers {
import mx.core.*;
public class CursorManager {
mx_internal static const VERSION:String = "3.0.0.0";
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 127
//CursorManagerImpl (mx.managers.CursorManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import flash.ui.*;
public class CursorManagerImpl implements ICursorManager {
private var showSystemCursor:Boolean;// = false
private var nextCursorID:int;// = 1
private var systemManager:ISystemManager;// = null
private var cursorList:Array;
private var _currentCursorYOffset:Number;// = 0
private var cursorHolder:Sprite;
private var currentCursor:DisplayObject;
private var _currentCursorID:int;// = 0
private var listenForContextMenu:Boolean;// = false
private var showCustomCursor:Boolean;// = false
private var initialized:Boolean;// = false
private var overTextField:Boolean;// = false
private var _currentCursorXOffset:Number;// = 0
private var busyCursorList:Array;
private var overLink:Boolean;// = false
private var sourceArray:Array;
mx_internal static const VERSION:String = "3.0.0.0";
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;
} else {
this.systemManager = ApplicationGlobals.application.systemManager;
};
}
public function set currentCursorYOffset(_arg1:Number):void{
_currentCursorYOffset = _arg1;
}
public function get currentCursorXOffset():Number{
return (_currentCursorXOffset);
}
public function removeCursor(_arg1:int):void{
var _local2:Object;
var _local3:CursorQueueItem;
for (_local2 in cursorList) {
_local3 = cursorList[_local2];
if (_local3.cursorID == _arg1){
cursorList.splice(_local2, 1);
showCurrentCursor();
break;
};
};
}
public function get currentCursorID():int{
return (_currentCursorID);
}
public function set currentCursorID(_arg1:int):void{
_currentCursorID = _arg1;
}
public function removeAllCursors():void{
cursorList.splice(0);
showCurrentCursor();
}
private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{
if (_arg1.priority < _arg2.priority){
return (-1);
};
if (_arg1.priority == _arg2.priority){
return (0);
};
return (1);
}
public function setBusyCursor():void{
var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
var _local2:Class = _local1.getStyle("busyCursor");
busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW));
}
public function showCursor():void{
if (cursorHolder){
cursorHolder.visible = true;
};
}
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:InteractiveObject;
var _local2:InteractiveObject;
var _local3:CursorQueueItem;
var _local4:ISystemManager;
if (cursorList.length > 0){
if (!initialized){
cursorHolder = new FlexSprite();
cursorHolder.name = "cursorHolder";
cursorHolder.mouseEnabled = false;
initialized = true;
};
_local3 = cursorList[0];
if (currentCursorID == CursorManager.NO_CURSOR){
Mouse.hide();
};
if (_local3.cursorID != currentCursorID){
if (cursorHolder.numChildren > 0){
cursorHolder.removeChildAt(0);
};
currentCursor = new _local3.cursorClass();
if (currentCursor){
if ((currentCursor is InteractiveObject)){
InteractiveObject(currentCursor).mouseEnabled = false;
};
_local4 = (_local3.systemManager) ? _local3.systemManager : ApplicationGlobals.application.systemManager;
if (((systemManager) && (!((systemManager == _local4))))){
systemManager.cursorChildren.removeChild(cursorHolder);
};
systemManager = _local4;
if (!systemManager.cursorChildren.contains(cursorHolder)){
systemManager.cursorChildren.addChild(cursorHolder);
};
cursorHolder.addChild(currentCursor);
if (!listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
listenForContextMenu = true;
};
_local2 = (systemManager as InteractiveObject);
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
listenForContextMenu = true;
};
};
if ((systemManager is SystemManager)){
cursorHolder.x = (SystemManager(systemManager).mouseX + _local3.x);
cursorHolder.y = (SystemManager(systemManager).mouseY + _local3.y);
} else {
if ((systemManager is DisplayObject)){
cursorHolder.x = (DisplayObject(systemManager).mouseX + _local3.x);
cursorHolder.y = (DisplayObject(systemManager).mouseY + _local3.y);
} else {
cursorHolder.x = _local3.x;
cursorHolder.y = _local3.y;
};
};
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
currentCursorID = _local3.cursorID;
currentCursorXOffset = _local3.x;
currentCursorYOffset = _local3.y;
};
} else {
if (currentCursorID != CursorManager.NO_CURSOR){
currentCursorID = CursorManager.NO_CURSOR;
currentCursorXOffset = 0;
currentCursorYOffset = 0;
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
cursorHolder.removeChild(currentCursor);
if (listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
};
_local2 = (systemManager as InteractiveObject);
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler);
};
listenForContextMenu = false;
};
};
Mouse.show();
};
}
public function get currentCursorYOffset():Number{
return (_currentCursorYOffset);
}
private function contextMenu_menuSelectHandler(_arg1:ContextMenuEvent):void{
showCustomCursor = true;
systemManager.stage.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
public function hideCursor():void{
if (cursorHolder){
cursorHolder.visible = false;
};
}
public function registerToUseBusyCursor(_arg1:Object):void{
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function completeHandler(_arg1:Event):void{
var _local2:int = findSource(_arg1.target);
if (_local2 != -1){
sourceArray.splice(_local2, 1);
removeBusyCursor();
};
}
public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
var _local5:int = 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();
};
}
public function removeBusyCursor():void{
if (busyCursorList.length > 0){
removeCursor(int(busyCursorList.pop()));
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
if ((systemManager is SystemManager)){
cursorHolder.x = (SystemManager(systemManager).mouseX + currentCursorXOffset);
cursorHolder.y = (SystemManager(systemManager).mouseY + currentCursorYOffset);
} else {
if ((systemManager is DisplayObject)){
cursorHolder.x = (DisplayObject(systemManager).mouseX + currentCursorXOffset);
cursorHolder.y = (DisplayObject(systemManager).mouseY + currentCursorYOffset);
} else {
cursorHolder.x = currentCursorXOffset;
cursorHolder.y = currentCursorYOffset;
};
};
var _local2:Object = _arg1.target;
if (((((!(overTextField)) && ((_local2 is TextField)))) && ((_local2.type == TextFieldType.INPUT)))){
overTextField = true;
showSystemCursor = true;
} else {
if (((overTextField) && (!((((_local2 is TextField)) && ((_local2.type == TextFieldType.INPUT))))))){
overTextField = false;
showCustomCursor = true;
};
};
if (showSystemCursor){
showSystemCursor = false;
cursorHolder.visible = false;
Mouse.show();
};
if (showCustomCursor){
showCustomCursor = false;
cursorHolder.visible = true;
Mouse.hide();
};
}
public function unRegisterToUseBusyCursor(_arg1:Object):void{
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.removeEventListener(Event.COMPLETE, completeHandler);
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function mouseOverHandler(_arg1:MouseEvent):void{
systemManager.stage.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
mouseMoveHandler(_arg1);
}
public function set currentCursorXOffset(_arg1:Number):void{
_currentCursorXOffset = _arg1;
}
public static function getInstance():ICursorManager{
if (!instance){
instance = new (CursorManagerImpl);
};
return (instance);
}
}
}//package mx.managers
class CursorQueueItem {
public var 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.0.0.0";
private function CursorQueueItem(){
}
}
Section 128
//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.0.0.0";
public static const LOW:int = 3;
}
}//package mx.managers
Section 129
//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 130
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
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 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 131
//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 132
//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 133
//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 134
//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 135
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function get toolTipChildren():IChildList;
function set focusPane(_arg1:Sprite):void;
function isTopLevel():Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
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 removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
}
}//package mx.managers
Section 136
//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 137
//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 138
//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.0.0.0";
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 _local2:Stage;
if (_usePhasedInstantiation != _arg1){
_usePhasedInstantiation = _arg1;
_local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (_arg1){
originalFrameRate = _local2.frameRate;
_local2.frameRate = 1000;
} else {
_local2.frameRate = originalFrameRate;
};
};
}
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;
};
};
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 139
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.0.0.0";
public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){
this.owner = _arg1;
this.lowerBoundReference = _arg2;
this.upperBoundReference = _arg3;
}
public function getChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = 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 (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 140
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import mx.events.*;
import mx.resources.*;
import flash.text.*;
import flash.utils.*;
import mx.preloaders.*;
import mx.messaging.config.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager {
mx_internal var nestLevel:int;// = 0
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var preloader:Preloader;
private var _document:Object;
private var _topLevelSystemManager:ISystemManager;
private var _toolTipIndex:int;// = 0
private var _rawChildren:SystemRawChildrenList;
private var _explicitHeight:Number;
private var _toolTipChildren:SystemChildrenList;
private var form:IFocusManagerContainer;
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 rslSizes:Array;// = null
private var _topMostIndex:int;// = 0
private var nextFrameTimer:Timer;// = null
private var topLevel:Boolean;// = true
private var _cursorIndex:int;// = 0
mx_internal var _mouseX;
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var _cursorChildren:SystemChildrenList;
private var initCallbackFunctions:Array;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
mx_internal var topLevelWindow:IUIComponent;
private static const IDLE_THRESHOLD:Number = 1000;
private static const IDLE_INTERVAL:Number = 100;
mx_internal static const VERSION:String = "3.0.0.0";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
initCallbackFunctions = [];
forms = [];
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);
};
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local4:DisplayObjectContainer;
var _local2 = 1;
if (!topLevel){
_local4 = parent.parent;
while (_local4) {
if ((_local4 is ILayoutManagerClient)){
_local2 = (ILayoutManagerClient(_local4).nestLevel + 1);
break;
};
_local4 = _local4.parent;
};
};
nestLevel = _local2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).systemManager = this;
};
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 idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
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);
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
private function initHandler(_arg1:Event):void{
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
var _local2:int = ((totalFrames)==1) ? 0 : 1;
addFrameScript(_local2, docFrameHandler);
var _local3:int = (_local2 + 1);
while (_local3 < totalFrames) {
addFrameScript(_local3, extraFrameHandler);
_local3++;
};
initialize();
}
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);
}
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 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;
}
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);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){
idleTimer = new Timer(IDLE_INTERVAL);
idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler);
idleTimer.start();
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
};
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
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);
};
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
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 _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:IChildList;
idleCounter = 0;
if (numModalWindows == 0){
if (forms.length > 1){
_local2 = forms.length;
_local3 = DisplayObject(_arg1.target);
_local4 = document.rawChildren.contains(_local3);
while (_local3) {
_local5 = 0;
while (_local5 < _local2) {
if (forms[_local5] == _local3){
_local6 = 0;
if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){
activate(IFocusManagerContainer(_local3));
};
if (popUpChildren.contains(_local3)){
_local9 = popUpChildren;
} else {
_local9 = this;
};
_local7 = _local9.getChildIndex(_local3);
_local8 = _local7;
_local2 = forms.length;
_local6 = 0;
while (_local6 < _local2) {
if (_local9.contains(forms[_local6])){
if (_local9.getChildIndex(forms[_local6]) > _local7){
_local8 = Math.max(_local9.getChildIndex(forms[_local6]), _local8);
};
};
_local6++;
};
if ((((_local8 > _local7)) && (!(_local4)))){
_local9.setChildIndex(_local3, _local8);
};
return;
};
_local5++;
};
_local3 = _local3.parent;
};
};
};
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
return (_screen);
}
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 _local2:TextFieldFactory;
var _local4:int;
var _local5:int;
var _local6: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")));
if (Capabilities.playerType == "Desktop"){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::NativeDragManagerImpl")));
if (Singleton.getClass("mx.managers::IDragManager") == null){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
} else {
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
Singleton.registerClass("mx.core::ITextFieldFactory", Class(getDefinitionByName("mx.core::TextFieldFactory")));
executeCallbacks();
doneExecutingInitCallbacks = true;
var _local3:Array = info()["mixins"];
if (((_local3) && ((_local3.length > 0)))){
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = Class(getDefinitionByName(_local3[_local5]));
var _local7 = _local6;
_local7["init"](this);
_local5++;
};
};
installCompiledResourceBundles();
initializeTopLevelWindow(null);
deferredNextFrame();
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var _local2:Number = stage.stageWidth;
var _local3:Number = stage.stageHeight;
var _local4:Number = loaderInfo.width;
var _local5:Number = loaderInfo.height;
var _local6:Number = ((_local4 - _local2) / 2);
var _local7:Number = ((_local5 - _local3) / 2);
var _local8:String = stage.align;
if (_local8 == StageAlign.TOP){
_local7 = 0;
} else {
if (_local8 == StageAlign.BOTTOM){
_local7 = (_local5 - _local3);
} else {
if (_local8 == StageAlign.LEFT){
_local6 = 0;
} else {
if (_local8 == StageAlign.RIGHT){
_local6 = (_local4 - _local2);
} else {
if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){
_local7 = 0;
_local6 = 0;
} else {
if (_local8 == StageAlign.TOP_RIGHT){
_local7 = 0;
_local6 = (_local4 - _local2);
} else {
if (_local8 == StageAlign.BOTTOM_LEFT){
_local7 = (_local5 - _local3);
_local6 = 0;
} else {
if (_local8 == StageAlign.BOTTOM_RIGHT){
_local7 = (_local5 - _local3);
_local6 = (_local4 - _local2);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = _local6;
_screen.y = _local7;
_screen.width = _local2;
_screen.height = _local3;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (_arg1){
resizeMouseCatcher();
dispatchEvent(_arg1);
};
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
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{
var _local2:IFocusManagerContainer;
var _local3:int;
var _local4:int;
var _local5:IFocusManagerContainer;
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
form.focusManager.deactivate();
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = forms[_local4];
if (_local5 == _arg1){
_local4 = (_local4 + 1);
while (_local4 < _local3) {
_local5 = forms[_local4];
if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
_local4++;
};
form = _local2;
break;
} else {
if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
};
_local4++;
};
if (form){
form.focusManager.activate();
};
};
};
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
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));
}
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 set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
private function executeCallbacks():void{
var _local1:Function;
if (!parent){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
public function get popUpChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.popUpChildren);
};
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
return (_popUpChildren);
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChild(_arg1));
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
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 _local1:Stage = super.stage;
if (_local1){
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
return (_topLevelSystemManager.stage);
};
return (null);
}
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);
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
private function mouseUpHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function activate(_arg1:IFocusManagerContainer):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
_local2 = form;
_local2.focusManager.deactivate();
};
};
form = _arg1;
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
}
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 _local1:Graphics;
if (mouseCatcher){
_local1 = mouseCatcher.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
_local1.endFill();
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
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);
}
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)))))));
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, _arg2);
}
mx_internal function childAdded(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_arg1 == FlexEvent.IDLE){
super.removeEventListener(_arg1, _arg2, _arg3);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(_arg1, _arg2, _arg3);
};
}
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 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 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.localeChain = _local3;
};
}
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);
}
public function get cursorChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.cursorChildren);
};
if (!_cursorChildren){
_cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex"));
};
return (_cursorChildren);
}
public function get preloaderBackgroundImage():Object{
return (info()["backgroundImage"]);
}
public function set numModalWindows(_arg1:int):void{
_numModalWindows = _arg1;
}
public function get preloaderBackgroundAlpha():Number{
return (info()["backgroundAlpha"]);
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
_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));
}
public function get preloaderBackgroundColor():uint{
var _local1:* = info()["backgroundColor"];
if (_local1 == undefined){
return (StyleManager.NOT_A_COLOR);
};
return (StyleManager.getColorName(_local1));
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
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);
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"]);
_local5.push(_local14);
_local7++;
};
};
if (((!((_local1 == null))) && ((_local1.length > 0)))){
_local6 = _local1.length;
_local7 = 0;
while (_local7 < _local6) {
_local15 = new RSLItem(_local1[_local7].url);
_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);
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
var _local2:DisplayObjectContainer;
if (((!(topLevel)) && (parent))){
_local2 = parent.parent;
while (_local2) {
if ((_local2 is IInvalidating)){
IInvalidating(_local2).invalidateSize();
IInvalidating(_local2).invalidateDisplayList();
return;
};
_local2 = _local2.parent;
};
};
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
initialized = true;
if (!parent){
return;
};
if (!topLevel){
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_topLevelSystemManager = IUIComponent(_local3).systemManager;
break;
};
_local3 = _local3.parent;
};
};
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
if (((topLevel) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (((topLevel) && (stage))){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
if (preloader){
preloader.registerApplication(_local2);
};
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
public function get numModalWindows():int{
return (_numModalWindows);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
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);
}
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);
};
}
}
}//package mx.managers
Section 141
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var bootstrapLoaderInfoURL:String;
}
}//package mx.managers
Section 142
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.0.0.0";
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 143
//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.0.0.0";
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 144
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import mx.events.*;
import mx.controls.*;
import mx.effects.*;
import flash.utils.*;
import mx.validators.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager2 {
private var _enabled:Boolean;// = true
mx_internal var isError:Boolean;
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 currentText:String;
mx_internal var showTimer:Timer;
private var _currentToolTip:IToolTip;
mx_internal var scrubTimer:Timer;
mx_internal var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var _showEffect:IAbstractEffect;
mx_internal var initialized:Boolean;// = false
private var _hideDelay:Number;// = 10000
mx_internal static const VERSION:String = "3.0.0.0";
private static var instance:IToolTipManager2;
public function ToolTipManagerImpl(){
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
}
mx_internal function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
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);
}
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 : ApplicationGlobals.application.systemManager;
_local7.toolTipChildren.addChild(_local6);
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
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;
_local1.toolTipChildren.removeChild(DisplayObject(currentToolTip));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = _arg1;
}
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 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;
_local2.toolTipChildren.removeChild(DisplayObject(_arg1));
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
mx_internal function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject):Rectangle{
var _local2:Point = new Point(0, 0);
_local2 = _arg1.localToGlobal(_local2);
return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height));
}
mx_internal function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local5:Rectangle;
var _local6:Point;
var _local7:IToolTip;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local3:Number = currentToolTip.screen.width;
var _local4:Number = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local8 = NaN;
_local9 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local8 = ((_local3 - _local1) - 4);
_local9 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local8;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
Object(toolTipClass).maxWidth = _local9;
} else {
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
};
if ((currentToolTip.height + 2) < _local5.top){
_local2 = (_local5.top - (currentToolTip.height + 2));
} else {
_local2 = (_local5.bottom + 2);
if (!isNaN(_local8)){
Object(toolTipClass).maxWidth = _local8;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
if (!isNaN(_local9)){
Object(toolTipClass).maxWidth = _local9;
};
};
};
sizeTip(currentToolTip);
_local6 = new Point(_local1, _local2);
_local7 = currentToolTip;
_local6 = DisplayObject(_local7).root.globalToLocal(_local6);
_local1 = _local6.x;
_local2 = _local6.y;
} else {
_local1 = (ApplicationGlobals.application.mouseX + 11);
_local2 = (ApplicationGlobals.application.mouseY + 22);
_local10 = currentToolTip.width;
if ((_local1 + _local10) > _local3){
_local1 = (_local3 - _local10);
};
_local11 = currentToolTip.height;
if ((_local2 + _local11) > _local4){
_local2 = (_local4 - _local11);
};
};
currentToolTip.move(_local1, _local2);
}
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());
}
mx_internal function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
mx_internal function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
public function set showEffect(_arg1:IAbstractEffect):void{
_showEffect = (_arg1 as IAbstractEffect);
}
public function set hideEffect(_arg1:IAbstractEffect):void{
_hideEffect = (_arg1 as IAbstractEffect);
}
mx_internal function targetChanged():void{
var _local1:ToolTipEvent;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
reset();
if (currentTarget){
if (currentText == ""){
return;
};
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
currentTarget.dispatchEvent(_local1);
if ((((showDelay == 0)) || (scrubTimer.running))){
createTip();
initializeTip();
positionTip();
showTip();
} else {
showTimer.delay = showDelay;
showTimer.start();
};
};
}
mx_internal function initializeTip():void{
if ((currentToolTip is ToolTip)){
ToolTip(currentToolTip).text = currentText;
};
if (((isError) && ((currentToolTip is IStyleClient)))){
IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
};
sizeTip(currentToolTip);
if ((currentToolTip is IStyleClient)){
if (showEffect){
IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
};
if (hideEffect){
IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
};
};
if (((showEffect) || (hideEffect))){
currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
}
public function get showEffect():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);
_local2.toolTipChildren.addChild(DisplayObject(currentToolTip));
}
public static function getInstance():IToolTipManager2{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 145
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
public class LoaderConfig {
mx_internal static const VERSION:String = "3.0.0.0";
mx_internal static var _url:String = null;
mx_internal static var _parameters:Object;
public static function get url():String{
return (_url);
}
public static function get parameters():Object{
return (_parameters);
}
}
}//package mx.messaging.config
Section 146
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=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 147
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.0.0.0";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import flash.net.*;
import flash.utils.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
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):void{
var _local3:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local3 = new ModuleEvent(ModuleEvent.PROGRESS);
_local3.bytesLoaded = info.size;
_local3.bytesTotal = info.size;
dispatchEvent(_local3);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2);
};
};
}
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);
};
} 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);
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);
}
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):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_url.indexOf("published://") == 0){
return;
};
var _local3:URLRequest = new URLRequest(_url);
var _local4:LoaderContext = new LoaderContext();
_local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local4.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local4.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local3, _local4);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
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 148
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 149
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import flash.text.*;
import mx.graphics.*;
import flash.net.*;
import flash.utils.*;
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.0.0.0";
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.parent);
_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 parentContainer:DisplayObjectContainer;
private function ErrorField(_arg1:DisplayObjectContainer){
this.parentContainer = _arg1;
}
public function show(_arg1:String):void{
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
return;
};
var _local2:Stage = parentContainer.stage;
var _local3:TextField = new TextField();
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.multiline = true;
_local3.wordWrap = true;
_local3.background = true;
_local3.defaultTextFormat = labelFormat;
_local3.text = _arg1;
_local3.width = Math.max((MIN_WIDTH_INCHES * Capabilities.screenDPI), (_local2.stageWidth - (TEXT_MARGIN_PX * 2)));
_local3.width = Math.min((MAX_WIDTH_INCHES * Capabilities.screenDPI), _local3.width);
_local3.y = Math.max(0, ((_local2.stageHeight - TEXT_MARGIN_PX) - _local3.height));
_local3.x = ((_local2.stageWidth - _local3.width) / 2);
parentContainer.addChild(this);
this.addChild(_local3);
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
}
Section 150
//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 151
//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.0.0.0";
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.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 152
//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 153
//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 findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 154
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 155
//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.0.0.0";
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 156
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.0.0.0";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
};
return (instance);
}
}
}//package mx.resources
Section 157
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import flash.utils.*;
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.0.0.0";
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 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 addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _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 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 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 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 getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
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 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));
}
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{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_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 158
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 159
//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.0.0.0";
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 160
//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.0.0.0";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function 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:Array;
var _local11: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 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
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)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, 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 161
//HaloColors (mx.skins.halo.HaloColors)
package mx.skins.halo {
import mx.utils.*;
public class HaloColors {
mx_internal static const VERSION:String = "3.0.0.0";
private static var cache:Object = {};
public static function getCacheKey(... _args):String{
return (_args.join(","));
}
public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{
var _local5:String = 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 162
//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.0.0.0";
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();
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 163
//ListDropIndicator (mx.skins.halo.ListDropIndicator)
package mx.skins.halo {
import flash.display.*;
import mx.skins.*;
public class ListDropIndicator extends ProgrammaticSkin {
public var direction:String;// = "horizontal"
mx_internal static const VERSION:String = "3.0.0.0";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Graphics = graphics;
_local3.clear();
_local3.lineStyle(2, 2831164);
if (direction == "horizontal"){
_local3.moveTo(0, 0);
_local3.lineTo(_arg1, 0);
} else {
_local3.moveTo(0, 0);
_local3.lineTo(0, _arg2);
};
}
}
}//package mx.skins.halo
Section 164
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.0.0.0";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 165
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.0.0.0";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return (_styleName.getStyle(_arg1));
}
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 166
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.net.*;
import flash.utils.*;
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.0.0.0";
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{
_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 167
//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 168
//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.0.0.0";
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 169
//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.0.0.0";
}
}//package mx.states
Section 170
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.managers.*;
import flash.utils.*;
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.0.0.0";
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 171
//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 172
//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 173
//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 174
//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 175
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 176
//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.0.0.0";
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 177
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
import flash.utils.*;
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.0.0.0";
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.modules.*;
import mx.events.*;
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);
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 178
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import mx.core.*;
import flash.display.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "3.0.0.0";
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 179
//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.0.0.0";
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 180
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_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 181
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_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 182
//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.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
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 183
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.0.0.0";
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 184
//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 185
//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.0.0.0";
public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){
this.isError = _arg1;
this.subField = _arg2;
this.errorMessage = _arg4;
this.errorCode = _arg3;
}
}
}//package mx.validators
Section 186
//_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 187
//_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 188
//_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 189
//_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 190
//_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 191
//_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 192
//_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 193
//_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 194
//_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 195
//_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 196
//_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 197
//_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 198
//_MenuStyle (_MenuStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _MenuStyle {
private static var _embed_css_Assets_swf_MenuRadioDisabled_1157646715:Class = _MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_1157646715;
private static var _embed_css_Assets_swf_MenuBranchEnabled_338070931:Class = _MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_338070931;
private static var _embed_css_Assets_swf_MenuRadioEnabled_412559174:Class = _MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_412559174;
private static var _embed_css_Assets_swf_MenuSeparator_1447594631:Class = _MenuStyle__embed_css_Assets_swf_MenuSeparator_1447594631;
private static var _embed_css_Assets_swf_MenuBranchDisabled_1617371390:Class = _MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_1617371390;
private static var _embed_css_Assets_swf_MenuCheckDisabled_122414394:Class = _MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_122414394;
private static var _embed_css_Assets_swf_MenuCheckEnabled_1701187995:Class = _MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_1701187995;
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Menu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Menu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.radioIcon = _embed_css_Assets_swf_MenuRadioEnabled_412559174;
this.borderStyle = "menuBorder";
this.paddingTop = 1;
this.rightIconGap = 15;
this.branchIcon = _embed_css_Assets_swf_MenuBranchEnabled_338070931;
this.checkDisabledIcon = _embed_css_Assets_swf_MenuCheckDisabled_122414394;
this.verticalAlign = "middle";
this.paddingLeft = 1;
this.paddingRight = 0;
this.checkIcon = _embed_css_Assets_swf_MenuCheckEnabled_1701187995;
this.radioDisabledIcon = _embed_css_Assets_swf_MenuRadioDisabled_1157646715;
this.dropShadowEnabled = true;
this.branchDisabledIcon = _embed_css_Assets_swf_MenuBranchDisabled_1617371390;
this.dropIndicatorSkin = ListDropIndicator;
this.separatorSkin = _embed_css_Assets_swf_MenuSeparator_1447594631;
this.horizontalGap = 6;
this.leftIconGap = 18;
this.paddingBottom = 1;
};
};
}
}
}//package
Section 199
//_MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_1617371390 (_MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_1617371390)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_1617371390 extends SpriteAsset {
}
}//package
Section 200
//_MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_338070931 (_MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_338070931)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_338070931 extends SpriteAsset {
}
}//package
Section 201
//_MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_122414394 (_MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_122414394)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_122414394 extends SpriteAsset {
}
}//package
Section 202
//_MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_1701187995 (_MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_1701187995)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_1701187995 extends SpriteAsset {
}
}//package
Section 203
//_MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_1157646715 (_MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_1157646715)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_1157646715 extends SpriteAsset {
}
}//package
Section 204
//_MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_412559174 (_MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_412559174)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_412559174 extends SpriteAsset {
}
}//package
Section 205
//_MenuStyle__embed_css_Assets_swf_MenuSeparator_1447594631 (_MenuStyle__embed_css_Assets_swf_MenuSeparator_1447594631)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuSeparator_1447594631 extends SpriteAsset {
}
}//package
Section 206
//_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 207
//_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 208
//_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 209
//_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 210
//_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 211
//_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 212
//_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 213
//_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 214
//_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 215
//_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 216
//_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 217
//Animation (Animation)
package {
import flash.media.*;
import flash.display.*;
public class Animation extends Sprite {
public var loopAnimation:Boolean;// = false
private var timePlaying:int;// = 0
private var FPS:int;// = 40
private var playing:Boolean;// = false
private var anim:MovieClip;
private var currentFrame:int;// = 0
private var animationSWF:MovieClip;
public static const EXPLOSION_SOUND:Sound = new EXPLOSION();
public static const ANIM_EXPLOSION:Class = Animation_ANIM_EXPLOSION;
private static const EXPLOSION:Class = Animation_EXPLOSION;
public function Animation(_arg1:Class){
animationSWF = new (_arg1);
addChild(animationSWF);
animationSWF.stop();
}
public function startAnimation(_arg1:int=0):void{
if (playing){
throw (new Error("Animation already being played"));
};
animationSWF.gotoAndStop(_arg1);
playing = true;
}
public function isPlaying():Boolean{
return (playing);
}
public function stop():void{
playing = false;
}
public function getFramesCount():int{
return (animationSWF.totalFrames);
}
public function updateAnimation(_arg1:int):Boolean{
if (!playing){
return (false);
};
timePlaying = (timePlaying + _arg1);
var _local2:int = ((FPS * timePlaying) / 1000);
if (_local2 >= animationSWF.totalFrames){
if (loopAnimation){
_local2 = (_local2 % animationSWF.totalFrames);
timePlaying = (timePlaying - ((animationSWF.totalFrames * 1000) / FPS));
} else {
removeChild(animationSWF);
playing = false;
return (false);
};
};
if (_local2 != currentFrame){
animationSWF.gotoAndStop(_local2);
currentFrame = _local2;
};
return (true);
}
}
}//package
Section 218
//Animation_ANIM_EXPLOSION (Animation_ANIM_EXPLOSION)
package {
import mx.core.*;
public class Animation_ANIM_EXPLOSION extends MovieClipAsset {
}
}//package
Section 219
//Animation_EXPLOSION (Animation_EXPLOSION)
package {
import mx.core.*;
public class Animation_EXPLOSION extends SoundAsset {
}
}//package
Section 220
//Ball (Ball)
package {
import flash.geom.*;
import flash.display.*;
public class Ball extends Sprite {
private var img:Bitmap;
private var invisibilityCounter:int;// = 0
private var blendingDelta:Number;// = 0.05
public var glued:Boolean;// = false
public var bonusSpeedMultiplayer:Number;// = 1
public var speedMultiplayer:Number;// = 1
private var EXPLOSIVEBALL_PNG:Class;
private var ballShadow:Bitmap;
public var directionVector:Point;
private var blendCounter:int;// = 0
public var VectorAngle:Number;// = 0
private var FIREBALL_PNG:Class;
private static const BALL_PNG:Class = Ball_BALL_PNG;
public static const RADIUS:int = 10;
public static const SPEED:int = 9;
public static const MAX_BOUNCE_ANGLE:int = 65;
public function Ball(_arg1:int, _arg2:int){
directionVector = new Point(0, -1);
FIREBALL_PNG = Ball_FIREBALL_PNG;
EXPLOSIVEBALL_PNG = Ball_EXPLOSIVEBALL_PNG;
super();
this.x = (_arg1 - RADIUS);
this.y = (_arg2 - RADIUS);
var _local3:ColorTransform = new ColorTransform(0, 0, 0, 1, -255, -255, -255);
img = new BALL_PNG();
ballShadow = new BALL_PNG();
ballShadow.bitmapData.colorTransform(new Rectangle(0, 0, img.width, img.height), _local3);
ballShadow.x = 4;
ballShadow.y = 6;
ballShadow.alpha = 0.3;
addChild(ballShadow);
addChild(img);
}
public function blend(_arg1:Number):void{
blendCounter = (blendCounter + _arg1);
if (blendCounter < 31){
return;
};
blendCounter = (blendCounter - 31);
if (alpha >= 1){
blendingDelta = (blendingDelta * -1);
};
if (alpha <= 0){
if (++invisibilityCounter < 6){
return;
};
blendingDelta = (blendingDelta * -1);
invisibilityCounter = 0;
};
alpha = (alpha + blendingDelta);
}
public function posAfterMove(_arg1:Number):Number{
var _local2:Number = (((((SPEED * speedMultiplayer) * directionVector.x) * bonusSpeedMultiplayer) * _arg1) / 31);
if ((((_local2 > 0)) && ((_local2 < 0.06)))){
_local2 = 0.06;
};
return ((x + _local2));
}
public function switchToExplosive():void{
removeChild(img);
img = new EXPLOSIVEBALL_PNG();
addChild(img);
}
public function switchToFire():void{
removeChild(img);
img = new FIREBALL_PNG();
addChild(img);
}
public function collideWithCorner(_arg1:Point):void{
var _local6:Number;
var _local2:Point = new Point((x + RADIUS), (y + RADIUS));
var _local3:Point = new Point(((_local2.x - _arg1.x) / Point.distance(_arg1, _local2)), ((_local2.y - _arg1.y) / Point.distance(_arg1, _local2)));
var _local4:Point = new Point((directionVector.x + (_local3.x * 2)), (directionVector.y + (_local3.y * 2)));
var _local5:Number = Point.distance(new Point(0, 0), _local4);
_local4.x = (_local4.x / _local5);
_local4.y = (_local4.y / _local5);
if (Math.abs(_local4.x) < 0.05){
_local6 = 90;
} else {
_local6 = Math.abs(Board.radianToDg(Math.atan((_local4.y / _local4.x))));
};
if (_local6 < 25){
_local6 = 25;
_local4.x = ((_local4.x < 0)) ? -0.9 : 0.9;
_local4.y = ((_local4.y < 0)) ? -0.42 : 0.42;
};
speedMultiplayer = 1;
x = (_arg1.x + (_local4.x * RADIUS));
y = (_arg1.y + (_local4.y * RADIUS));
directionVector = _local4;
}
public function switchToNormal():void{
removeChild(img);
img = new BALL_PNG();
addChild(img);
}
public function yPosAfterMove(_arg1:Number):Number{
return ((y + (((((SPEED * speedMultiplayer) * directionVector.y) * bonusSpeedMultiplayer) * _arg1) / 31)));
}
}
}//package
Section 221
//Ball_BALL_PNG (Ball_BALL_PNG)
package {
import mx.core.*;
public class Ball_BALL_PNG extends BitmapAsset {
}
}//package
Section 222
//Ball_EXPLOSIVEBALL_PNG (Ball_EXPLOSIVEBALL_PNG)
package {
import mx.core.*;
public class Ball_EXPLOSIVEBALL_PNG extends BitmapAsset {
}
}//package
Section 223
//Ball_FIREBALL_PNG (Ball_FIREBALL_PNG)
package {
import mx.core.*;
public class Ball_FIREBALL_PNG extends BitmapAsset {
}
}//package
Section 224
//Block (Block)
package {
import flash.media.*;
import flash.display.*;
public class Block extends Sprite {
private var shadowImg:Bitmap;
public var steel:Boolean;
public var bonus:int;// = 0
public var mobile:Boolean;
public var color:int;
private var bonusImg:Bitmap;
public var stone:Boolean;
public var hadCollision:Boolean;// = false
public var bonusRevealed:Boolean;// = false
public var gridRow:int;
private var blockImg:Bitmap;
public var gridColumn:int;
public var mobileDirection:int;// = 1
public static const FIRE_BONUS_PNG:Class = Block_FIRE_BONUS_PNG;
public static const VANISH_BONUS_PNG:Class = Block_VANISH_BONUS_PNG;
public static const DISCOVER_BONUS_SOUND:Sound = new DISCOVER_BONUS();
public static const SLOW_BONUS_PNG:Class = Block_SLOW_BONUS_PNG;
public static const SMALL_BLOCK_HEIGHT:int = 30;
public static const SHRINK_BONUS_PNG:Class = Block_SHRINK_BONUS_PNG;
public static const BLOCK_SMALL:int = 1;
public static const BONUS_VANISHING_BALL:int = 5;
private static const BLUE_BLOCK_PNG:Class = Block_BLUE_BLOCK_PNG;
private static const STAR_BONUS_PNG:Class = Block_STAR_BONUS_PNG;
public static const GROW_BONUS_PNG:Class = Block_GROW_BONUS_PNG;
public static const BONUS_EXPLODING_BALL:int = 3;
public static const BONUS_STAR:int = 19;
private static const STEEL_BLOCK_PNG:Class = Block_STEEL_BLOCK_PNG;
public static const BONUS_FIRE_BALL:int = 2;
public static const COLOR_WOOD:int = 0;
public static const BONUS_SHRINK_PLATFORM:int = 16;
public static const CHAIN_BONUS_PNG:Class = Block_CHAIN_BONUS_PNG;
private static const YELLOW_BLOCK_PNG:Class = Block_YELLOW_BLOCK_PNG;
private static const BLOCK_PNG:Class = Block_BLOCK_PNG;
public static const MOBILE_BLOCK_SPEED:int = 3;
public static const BONUS_LIFE:int = 18;
public static const BONUS_SLOW_BALL:int = 1;
private static const STONE_HIT_SOUND:Sound = new HIT_STONE_BLOCK();
private static const STONE_BLOCK_PNG:Class = Block_STONE_BLOCK_PNG;
public static const COLOR_STONE:int = 5;
private static const WOOD_HIT_SOUND:Sound = new HIT_WOOD_BLOCK();
private static const SPLIT_BONUS_PNG:Class = Block_SPLIT_BONUS_PNG;
private static const LIFE_BONUS_PNG:Class = Block_LIFE_BONUS_PNG;
public static const EXPLOSIVE_BONUS_PNG:Class = Block_EXPLOSIVE_BONUS_PNG;
public static const COLOR_BLUE:int = 1;
private static const QUESTION_MARK_BONUS_PNG:Class = Block_QUESTION_MARK_BONUS_PNG;
public static const NO_BONUS_PNG:Class = Block_NO_BONUS_PNG;
private static const GREEN_BLOCK_PNG:Class = Block_GREEN_BLOCK_PNG;
public static const BONUS_GROW_PLATFORM:int = 15;
public static const BONUS_CHAIN:int = 17;
public static const BONUS_SPLIT_BALL:int = 4;
public static const COLOR_GREEN:int = 2;
private static const RED_BLOCK_PNG:Class = Block_RED_BLOCK_PNG;
private static const HIT_STONE_BLOCK:Class = Block_HIT_STONE_BLOCK;
private static const DISCOVER_BONUS:Class = Block_DISCOVER_BONUS;
public static const COLOR_YELLOW:int = 4;
private static const HIT_STONE_BLOCK_PNG:Class = Block_HIT_STONE_BLOCK_PNG;
public static const COLOR_RED:int = 3;
public static const BONUS_NONE:int = 0;
private static const SHADOW_PNG:Class = Block_SHADOW_PNG;
private static const HIT_WOOD_BLOCK:Class = Block_HIT_WOOD_BLOCK;
public static const SMALL_BLOCK_WIDTH:int = 30;
public function Block(_arg1:int, _arg2:int, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false){
this.gridColumn = _arg1;
this.gridRow = _arg2;
this.x = (_arg1 * SMALL_BLOCK_WIDTH);
this.y = (_arg2 * SMALL_BLOCK_HEIGHT);
this.steel = _arg4;
this.stone = (_arg4) ? false : _arg5;
this.mobile = _arg6;
this.color = (_arg5) ? COLOR_STONE : _arg3;
if (_arg4){
blockImg = new STEEL_BLOCK_PNG();
} else {
switch (this.color){
case COLOR_BLUE:
blockImg = new BLUE_BLOCK_PNG();
break;
case COLOR_GREEN:
blockImg = new GREEN_BLOCK_PNG();
break;
case COLOR_RED:
blockImg = new RED_BLOCK_PNG();
break;
case COLOR_YELLOW:
blockImg = new YELLOW_BLOCK_PNG();
break;
case COLOR_STONE:
blockImg = new STONE_BLOCK_PNG();
break;
default:
blockImg = new BLOCK_PNG();
break;
};
};
shadowImg = new SHADOW_PNG();
draw();
}
public function toNormal():void{
stone = false;
removeChild(blockImg);
blockImg = new HIT_STONE_BLOCK_PNG();
addChild(blockImg);
}
public function addBonus(_arg1:int, _arg2:Boolean=false):void{
if (steel){
throw (new Error("can't add bonus to steel block"));
};
this.bonus = _arg1;
if (_arg2){
bonusImg = ((_arg1 == BONUS_STAR)) ? new STAR_BONUS_PNG() : new QUESTION_MARK_BONUS_PNG();
} else {
switch (_arg1){
case BONUS_SLOW_BALL:
bonusImg = new SLOW_BONUS_PNG();
break;
case BONUS_CHAIN:
bonusImg = new CHAIN_BONUS_PNG();
break;
case BONUS_EXPLODING_BALL:
bonusImg = new EXPLOSIVE_BONUS_PNG();
break;
case BONUS_FIRE_BALL:
bonusImg = new FIRE_BONUS_PNG();
break;
case BONUS_GROW_PLATFORM:
bonusImg = new GROW_BONUS_PNG();
break;
case BONUS_SHRINK_PLATFORM:
bonusImg = new SHRINK_BONUS_PNG();
break;
case BONUS_SPLIT_BALL:
bonusImg = new SPLIT_BONUS_PNG();
break;
case BONUS_VANISHING_BALL:
bonusImg = new VANISH_BONUS_PNG();
break;
case BONUS_LIFE:
bonusImg = new LIFE_BONUS_PNG();
break;
case BONUS_STAR:
bonusImg = new STAR_BONUS_PNG();
break;
};
};
}
public function move(_arg1:Number):void{
x = (x + (((MOBILE_BLOCK_SPEED * mobileDirection) * _arg1) / 31));
}
public function revealBonus():void{
addChild(bonusImg);
bonusRevealed = true;
}
private function draw():void{
this.addChild(blockImg);
addChild(shadowImg);
}
public function posAfterMove(_arg1:Number):Number{
return ((x + (((MOBILE_BLOCK_SPEED * mobileDirection) * _arg1) / 31)));
}
public function getDestroySound():Sound{
if (color == COLOR_STONE){
return (STONE_HIT_SOUND);
};
return (WOOD_HIT_SOUND);
}
}
}//package
Section 225
//Block_BLOCK_PNG (Block_BLOCK_PNG)
package {
import mx.core.*;
public class Block_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 226
//Block_BLUE_BLOCK_PNG (Block_BLUE_BLOCK_PNG)
package {
import mx.core.*;
public class Block_BLUE_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 227
//Block_CHAIN_BONUS_PNG (Block_CHAIN_BONUS_PNG)
package {
import mx.core.*;
public class Block_CHAIN_BONUS_PNG extends BitmapAsset {
}
}//package
Section 228
//Block_DISCOVER_BONUS (Block_DISCOVER_BONUS)
package {
import mx.core.*;
public class Block_DISCOVER_BONUS extends SoundAsset {
}
}//package
Section 229
//Block_EXPLOSIVE_BONUS_PNG (Block_EXPLOSIVE_BONUS_PNG)
package {
import mx.core.*;
public class Block_EXPLOSIVE_BONUS_PNG extends BitmapAsset {
}
}//package
Section 230
//Block_FIRE_BONUS_PNG (Block_FIRE_BONUS_PNG)
package {
import mx.core.*;
public class Block_FIRE_BONUS_PNG extends BitmapAsset {
}
}//package
Section 231
//Block_GREEN_BLOCK_PNG (Block_GREEN_BLOCK_PNG)
package {
import mx.core.*;
public class Block_GREEN_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 232
//Block_GROW_BONUS_PNG (Block_GROW_BONUS_PNG)
package {
import mx.core.*;
public class Block_GROW_BONUS_PNG extends BitmapAsset {
}
}//package
Section 233
//Block_HIT_STONE_BLOCK (Block_HIT_STONE_BLOCK)
package {
import mx.core.*;
public class Block_HIT_STONE_BLOCK extends SoundAsset {
}
}//package
Section 234
//Block_HIT_STONE_BLOCK_PNG (Block_HIT_STONE_BLOCK_PNG)
package {
import mx.core.*;
public class Block_HIT_STONE_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 235
//Block_HIT_WOOD_BLOCK (Block_HIT_WOOD_BLOCK)
package {
import mx.core.*;
public class Block_HIT_WOOD_BLOCK extends SoundAsset {
}
}//package
Section 236
//Block_LIFE_BONUS_PNG (Block_LIFE_BONUS_PNG)
package {
import mx.core.*;
public class Block_LIFE_BONUS_PNG extends BitmapAsset {
}
}//package
Section 237
//Block_NO_BONUS_PNG (Block_NO_BONUS_PNG)
package {
import mx.core.*;
public class Block_NO_BONUS_PNG extends BitmapAsset {
}
}//package
Section 238
//Block_QUESTION_MARK_BONUS_PNG (Block_QUESTION_MARK_BONUS_PNG)
package {
import mx.core.*;
public class Block_QUESTION_MARK_BONUS_PNG extends BitmapAsset {
}
}//package
Section 239
//Block_RED_BLOCK_PNG (Block_RED_BLOCK_PNG)
package {
import mx.core.*;
public class Block_RED_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 240
//Block_SHADOW_PNG (Block_SHADOW_PNG)
package {
import mx.core.*;
public class Block_SHADOW_PNG extends BitmapAsset {
}
}//package
Section 241
//Block_SHRINK_BONUS_PNG (Block_SHRINK_BONUS_PNG)
package {
import mx.core.*;
public class Block_SHRINK_BONUS_PNG extends BitmapAsset {
}
}//package
Section 242
//Block_SLOW_BONUS_PNG (Block_SLOW_BONUS_PNG)
package {
import mx.core.*;
public class Block_SLOW_BONUS_PNG extends BitmapAsset {
}
}//package
Section 243
//Block_SPLIT_BONUS_PNG (Block_SPLIT_BONUS_PNG)
package {
import mx.core.*;
public class Block_SPLIT_BONUS_PNG extends BitmapAsset {
}
}//package
Section 244
//Block_STAR_BONUS_PNG (Block_STAR_BONUS_PNG)
package {
import mx.core.*;
public class Block_STAR_BONUS_PNG extends BitmapAsset {
}
}//package
Section 245
//Block_STEEL_BLOCK_PNG (Block_STEEL_BLOCK_PNG)
package {
import mx.core.*;
public class Block_STEEL_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 246
//Block_STONE_BLOCK_PNG (Block_STONE_BLOCK_PNG)
package {
import mx.core.*;
public class Block_STONE_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 247
//Block_VANISH_BONUS_PNG (Block_VANISH_BONUS_PNG)
package {
import mx.core.*;
public class Block_VANISH_BONUS_PNG extends BitmapAsset {
}
}//package
Section 248
//Block_YELLOW_BLOCK_PNG (Block_YELLOW_BLOCK_PNG)
package {
import mx.core.*;
public class Block_YELLOW_BLOCK_PNG extends BitmapAsset {
}
}//package
Section 249
//BlockSmashParticle (BlockSmashParticle)
package {
import flash.geom.*;
import flash.display.*;
public class BlockSmashParticle extends Sprite {
private const pBlueImg:Bitmap;
private const pRedImg:Bitmap;
private const pWoodImg:Bitmap;
private const pGreenImg:Bitmap;
private const pYellowImg:Bitmap;
private const pStoneImg:Bitmap;
private const TIME_TO_LIVE:int = 2500;
public var speed:Number;// = 0.2
public var directionVector:Point;
private var particleImg:Bitmap;
public var timeDelta:Number;// = 0
public var timeLived:int;// = 0
public static const SIZE:int = 5;
private static const GRAVITY:Number = 3.5;
private static const PARTICLE_WOOD_PNG:Class = BlockSmashParticle_PARTICLE_WOOD_PNG;
public static const SPEED_MULTIPLAYER:Number = 0.2;
private static const PARTICLE_GREEN_PNG:Class = BlockSmashParticle_PARTICLE_GREEN_PNG;
private static const PARTICLE_STONE_PNG:Class = BlockSmashParticle_PARTICLE_STONE_PNG;
private static const PARTICLE_YELLOW_PNG:Class = BlockSmashParticle_PARTICLE_YELLOW_PNG;
private static const PARTICLE_RED_PNG:Class = BlockSmashParticle_PARTICLE_RED_PNG;
private static const PARTICLE_BLUE_PNG:Class = BlockSmashParticle_PARTICLE_BLUE_PNG;
public function BlockSmashParticle(){
directionVector = new Point();
pWoodImg = new PARTICLE_WOOD_PNG();
pRedImg = new PARTICLE_RED_PNG();
pYellowImg = new PARTICLE_YELLOW_PNG();
pGreenImg = new PARTICLE_GREEN_PNG();
pBlueImg = new PARTICLE_BLUE_PNG();
pStoneImg = new PARTICLE_STONE_PNG();
particleImg = pWoodImg;
super();
addChild(particleImg);
}
public function switchTo(_arg1:int):void{
removeChild(particleImg);
switch (_arg1){
case Block.COLOR_BLUE:
particleImg = pBlueImg;
break;
case Block.COLOR_GREEN:
particleImg = pGreenImg;
break;
case Block.COLOR_YELLOW:
particleImg = pYellowImg;
break;
case Block.COLOR_RED:
particleImg = pRedImg;
break;
case Block.COLOR_STONE:
particleImg = pStoneImg;
break;
default:
particleImg = pWoodImg;
break;
};
addChild(particleImg);
}
public function move(_arg1:Number):void{
x = (x + (((speed * directionVector.x) * (_arg1 - timeDelta)) / 31));
y = (y + (((speed * directionVector.y) * (_arg1 - timeDelta)) / 31));
directionVector.y = (directionVector.y + ((GRAVITY * (_arg1 - timeDelta)) / 31));
timeDelta = 0;
timeLived = (timeLived + (_arg1 - timeDelta));
if (timeLived > TIME_TO_LIVE){
alpha = (1 - (((timeLived - TIME_TO_LIVE) / 31) * 0.05));
};
}
public function randomizeSpeed():void{
speed = SPEED_MULTIPLAYER;
var _local1:Number = (Math.random() / 8);
_local1 = (_local1 * ((Math.random() < 0.5)) ? -1 : 1);
speed = (speed + _local1);
}
public function randomizeAngle(_arg1:int=15):void{
var _local2:Number = (Math.random() * _arg1);
_local2 = Board.dgToRadian(_local2);
_local2 = (_local2 * ((Math.random() < 0.5)) ? -1 : 1);
var _local3:Number = ((directionVector.x * Math.cos(_local2)) - (directionVector.y * Math.sin(_local2)));
var _local4:Number = ((directionVector.x * Math.sin(_local2)) + (directionVector.y * Math.cos(_local2)));
directionVector.x = _local3;
directionVector.y = _local4;
}
}
}//package
Section 250
//BlockSmashParticle_PARTICLE_BLUE_PNG (BlockSmashParticle_PARTICLE_BLUE_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_BLUE_PNG extends BitmapAsset {
}
}//package
Section 251
//BlockSmashParticle_PARTICLE_GREEN_PNG (BlockSmashParticle_PARTICLE_GREEN_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_GREEN_PNG extends BitmapAsset {
}
}//package
Section 252
//BlockSmashParticle_PARTICLE_RED_PNG (BlockSmashParticle_PARTICLE_RED_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_RED_PNG extends BitmapAsset {
}
}//package
Section 253
//BlockSmashParticle_PARTICLE_STONE_PNG (BlockSmashParticle_PARTICLE_STONE_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_STONE_PNG extends BitmapAsset {
}
}//package
Section 254
//BlockSmashParticle_PARTICLE_WOOD_PNG (BlockSmashParticle_PARTICLE_WOOD_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_WOOD_PNG extends BitmapAsset {
}
}//package
Section 255
//BlockSmashParticle_PARTICLE_YELLOW_PNG (BlockSmashParticle_PARTICLE_YELLOW_PNG)
package {
import mx.core.*;
public class BlockSmashParticle_PARTICLE_YELLOW_PNG extends BitmapAsset {
}
}//package
Section 256
//Board (Board)
package {
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import libs.de.polygonal.core.*;
import flash.ui.*;
public class Board extends Sprite {
private const activeNormalBallBonusDuration:int = 15000;
private const activeExplodingBallBonusDuration:int = 8000;
private var activePlatformBonus:int;// = 0
private var levelInProgress:Boolean;// = false
private var fireParticles:Array;
private var fireParticlePool:ObjectPool;
private var quitText:TextField;
private var bonusesHidden:Boolean;// = false
private var blocksForBonuses:Array;
private var destroyableBlocksCount:int;// = 0
private var starsCaught:int;// = 0
private var blocksToAdd:Array;
private var chainImg:Bitmap;
private var pauseText:TextField;
private var paused:Boolean;// = false
private var nextLevel:String;// = ""
private var balls:Array;
private var levelStarted:Boolean;// = false
private var splitBalls:Array;
private var paperCardImg:Bitmap;
private var loadingTimer:Timer;
private var lastAction:int;
private var platform:Platform;
private var activePlatformChainDuration:int;// = 10000
private var activeBallBonusStartTime:int;// = 0
private var splitHappened:Boolean;// = false
private var blocks:Array;
private var level:XML;
private var fallingBonuses:Array;
private var readFromXml:Boolean;// = true
private var fadeBoardTimer:Number;// = 0
private var blockParticles:Array;
private var starsRevealed:Boolean;// = false
private var activeBallBonusDuration:int;// = 15000
private var levelLoader:URLLoader;
private var activePlatformBonusDuration:int;// = 30000
private var date:Date;
private var animationsPlaying:Array;
private var timeToFade:int;// = 0
private var timeToMoveParticle:int;// = 0
private var mobileBlocks:Array;
private var levelPath:String;
private var pseudoRandomArray:Array;
private var activePlatformNormalBonusDuration:int;// = 30000
private var loadingFinished:Boolean;// = false
private var timerFinished:Boolean;// = false
private var fallingBonus:FallingBonus;
private var timeToNextParticle:int;// = 0
private var levelLoadingInfo:TextField;
private var activePlatformBonusStartTime:int;// = 0
private var board:Array;
private var blockParticlePool:ObjectPool;
private var format:TextFormat;
private var activeBallBonus:int;// = 0
private var ball:Ball;
public static const PLATFORM_POS_Y:int = 400;
public static const NR_OF_ROWS:int = 30;
private static const LIFE_LOST:Class = Board_LIFE_LOST;
public static const PLATFORM_START_POS_X:int = 189;
private static const PAPER_CARD_PNG:Class = Board_PAPER_CARD_PNG;
public static const GAME_LOST:String = "gameLost";
private static const LIFE_LOST_SOUND:Sound = new LIFE_LOST();
public static const GAME_FINISHED:String = "gameFinished";
public static const WIDTH:int = 450;
public static const HEIGHT:int = 480;
private static const CHAIN_PNG:Class = Board_CHAIN_PNG;
public static const GAME_WON:String = "gameWon";
public static const NR_OF_COLUMNS:int = 15;
public static const LOADING_MIN_TIME:int = 1000;
public static const CHAIN_POS_Y:int = (PLATFORM_POS_Y + Platform.NORMAL_HEIGHT);
private static var font:Class = Board_font;
public function Board(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
var _local5:int;
paperCardImg = new PAPER_CARD_PNG();
board = new Array(NR_OF_ROWS);
blocks = new Array();
mobileBlocks = new Array();
blocksToAdd = new Array();
blocksForBonuses = new Array();
balls = new Array();
fallingBonuses = new Array();
animationsPlaying = new Array();
fireParticles = new Array();
blockParticles = new Array();
blockParticlePool = new ObjectPool(true);
fireParticlePool = new ObjectPool(true);
levelLoadingInfo = new TextField();
format = new TextFormat();
levelLoader = new URLLoader();
splitBalls = new Array(2);
pseudoRandomArray = [-1, 1, -1, 1, -1, 1, -1, 1];
super();
this.starsRevealed = !(_arg2);
this.bonusesHidden = _arg3;
Main.points = 0;
Main.updateScore(0);
Main.livesNumber = (Main.isAdventure()) ? 3 : 6;
Main.updateLives();
loadingTimer = new Timer(LOADING_MIN_TIME, 0);
loadingTimer.addEventListener(TimerEvent.TIMER, levelLoaded, false, 0, true);
chainImg = new CHAIN_PNG();
this.levelPath = _arg1;
if ((WIDTH % Block.SMALL_BLOCK_WIDTH) != 0){
throw (new Error("Board size must be the multiplity of largest block width"));
};
var _local4:int;
while (_local4 < board.length) {
board[_local4] = new Array(NR_OF_COLUMNS);
_local5 = 0;
while (_local5 < NR_OF_COLUMNS) {
board[_local4][_local5] = 0;
_local5++;
};
_local4++;
};
blockParticlePool.allocate(BlockSmashParticle, 120);
fireParticlePool.allocate(FireParticle, 50);
addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, onRemoved, false, 0, true);
format.font = "Journal";
format.size = 30;
format.align = TextFormatAlign.CENTER;
levelLoadingInfo.selectable = false;
levelLoadingInfo.embedFonts = true;
levelLoadingInfo.defaultTextFormat = format;
levelLoadingInfo.text = "Loading, please wait";
levelLoadingInfo.autoSize = TextFieldAutoSize.CENTER;
levelLoadingInfo.x = ((WIDTH / 2) - (levelLoadingInfo.width / 2));
levelLoadingInfo.y = ((HEIGHT / 2) - (levelLoadingInfo.height / 2));
paperCardImg.x = (levelLoadingInfo.x - ((paperCardImg.width - levelLoadingInfo.width) / 2));
paperCardImg.y = (levelLoadingInfo.y - ((paperCardImg.height - levelLoadingInfo.height) / 2));
pauseText = new TextField();
pauseText.selectable = false;
pauseText.embedFonts = true;
pauseText.defaultTextFormat = format;
pauseText.text = "Pause";
pauseText.autoSize = TextFieldAutoSize.CENTER;
pauseText.y = HEIGHT;
pauseText.x = 20;
pauseText.addEventListener(MouseEvent.CLICK, pause, false, 0, true);
quitText = new TextField();
quitText.selectable = false;
quitText.embedFonts = true;
quitText.defaultTextFormat = format;
quitText.text = "Quit";
quitText.autoSize = TextFieldAutoSize.CENTER;
quitText.y = HEIGHT;
quitText.x = ((WIDTH - quitText.width) - 30);
quitText.addEventListener(MouseEvent.CLICK, endGame, false, 0, true);
}
private function onKeyPressed(_arg1:KeyboardEvent):void{
if (!levelStarted){
return;
};
platform.mouseSteering = false;
switch (_arg1.keyCode){
case Keyboard.RIGHT:
platform.startMove(Platform.RIGHT);
break;
case Keyboard.LEFT:
platform.startMove(Platform.LEFT);
break;
case 80:
pause();
break;
case 32:
if (balls.length > 0){
Ball(balls[0]).glued = false;
};
break;
case 81:
endGame();
break;
};
}
private function caughtBonus(_arg1:FallingBonus, _arg2:int):void{
Main.updateScore(50);
if (_arg1.type == activePlatformBonus){
activePlatformBonusStartTime = _arg2;
Main.platformBonusTimeBar.restart();
return;
};
var _local3:int = activePlatformBonus;
if (_arg1.type != Block.BONUS_STAR){
finishBonus(activePlatformBonus);
};
if ((((_arg1.type == Block.BONUS_SHRINK_PLATFORM)) && (!((_local3 == Block.BONUS_GROW_PLATFORM))))){
Main.mp3PlayerInstance.playSound(Platform.RUBBER_SHRINK_SOUND);
platform.shrinking = true;
platform.growing = false;
platform.returning = false;
platform.animCounter = 0;
activePlatformBonus = _arg1.type;
activePlatformBonusStartTime = _arg2;
activePlatformBonusDuration = activePlatformNormalBonusDuration;
Main.platformBonusTimeBar.restart();
Main.platformBonusTimeBar.ANIM_TIME = activePlatformBonusDuration;
Main.showBonusIcon(true, Block.SHRINK_BONUS_PNG);
};
if ((((_arg1.type == Block.BONUS_GROW_PLATFORM)) && (!((_local3 == Block.BONUS_SHRINK_PLATFORM))))){
Main.mp3PlayerInstance.playSound(Platform.RUBBER_GROW_SOUND);
platform.growing = true;
platform.shrinking = false;
platform.returning = false;
platform.animCounter = 0;
activePlatformBonus = _arg1.type;
activePlatformBonusStartTime = _arg2;
activePlatformBonusDuration = activePlatformNormalBonusDuration;
Main.platformBonusTimeBar.restart();
Main.platformBonusTimeBar.ANIM_TIME = activePlatformBonusDuration;
Main.showBonusIcon(true, Block.GROW_BONUS_PNG);
};
if (_arg1.type == Block.BONUS_CHAIN){
addChain();
activePlatformBonus = _arg1.type;
activePlatformBonusStartTime = _arg2;
activePlatformBonusDuration = activePlatformChainDuration;
Main.platformBonusTimeBar.restart();
Main.platformBonusTimeBar.ANIM_TIME = activePlatformBonusDuration;
Main.showBonusIcon(true, Block.CHAIN_BONUS_PNG);
};
if (_arg1.type == Block.BONUS_LIFE){
activePlatformBonus = Block.BONUS_NONE;
Main.livesNumber++;
Main.updateLives();
Main.mp3PlayerInstance.playSound(FallingBonus.EXTRA_LIFE_SOUND);
};
if (_arg1.type == Block.BONUS_STAR){
starsCaught++;
Main.instance.showStar(starsCaught);
Main.mp3PlayerInstance.playSound(FallingBonus.STAR_SOUND);
};
}
private function moveSmashedBlocksParticles(_arg1:Number):void{
var _local3:BlockSmashParticle;
var _local2:int;
while (_local2 < blockParticles.length) {
_local3 = blockParticles[_local2];
if (_local3.alpha <= 0){
removeFromArray(blockParticles, _local3);
removeChild(_local3);
blockParticlePool.object = _local3;
_local2--;
} else {
_local3.move(_arg1);
if (_local3.y > (PLATFORM_POS_Y + Platform.NORMAL_HEIGHT)){
_local3.alpha = (_local3.alpha - 0.05);
};
if (_local3.x <= 0){
_local3.x = (_local3.x * -1);
_local3.directionVector.x = (_local3.directionVector.x * -1);
};
if ((_local3.x + _local3.width) >= WIDTH){
_local3.x = ((WIDTH - ((_local3.x + _local3.width) - WIDTH)) - _local3.width);
_local3.directionVector.x = (_local3.directionVector.x * -1);
};
if (_local3.y <= 0){
_local3.directionVector.y = Math.abs(_local3.directionVector.y);
_local3.y = Math.abs(_local3.y);
};
};
_local2++;
};
}
private function addBonus(_arg1:int, _arg2:int=1, _arg3:Boolean=false):void{
var _local5:int;
var _local6:Block;
var _local4:int;
while (_local4 < _arg2) {
if (blocksForBonuses.length == 0){
throw (new Error("Theres more bonuses then non-steel blocks!"));
};
_local5 = (Math.random() * blocksForBonuses.length);
if (_local5 == blocksForBonuses.length){
_local5--;
};
_local6 = blocksForBonuses[_local5];
_local6.addBonus(_arg1, bonusesHidden);
removeFromArray(blocksForBonuses, _local6);
if (_arg3){
_local6.revealBonus();
};
_local4++;
};
}
private function getMBlockPassingThrough(_arg1:Number, _arg2:Number):Block{
var _local5:Block;
var _local3:int = (_arg2 / Block.SMALL_BLOCK_HEIGHT);
var _local4:int;
while (_local4 < mobileBlocks.length) {
_local5 = mobileBlocks[_local4];
if (_local5.steel){
} else {
if ((((((_local5.gridRow == _local3)) && ((_arg1 >= _local5.x)))) && ((_arg1 < (_local5.x + Block.SMALL_BLOCK_WIDTH))))){
return (_local5);
};
};
_local4++;
};
return (null);
}
private function onMouseMove(_arg1:MouseEvent):void{
if (!levelStarted){
return;
};
if (paused){
return;
};
platform.mouseSteering = true;
var _local2:Number = platform.x;
platform.x = (_arg1.stageX - x);
if (platform.x < 0){
platform.x = 0;
} else {
if ((platform.x + platform.pWidth) > WIDTH){
platform.x = (WIDTH - platform.pWidth);
};
};
if ((((balls.length > 0)) && (Ball(balls[0]).glued))){
Ball(balls[0]).x = (Ball(balls[0]).x + (platform.x - _local2));
};
}
private function destroyBlockAnimation(_arg1:Number, _arg2:Number, _arg3:Ball, _arg4:int, _arg5:int, _arg6:Boolean=false):void{
var _local8:int;
var _local9:BlockSmashParticle;
var _local7:int;
while (_local7 < 6) {
if (((_arg6) && ((((((_local7 == 1)) || ((_local7 == 2)))) || ((_local7 == 4)))))){
} else {
_local8 = 0;
while (_local8 < 3) {
if (((_arg6) && ((_local7 == 1)))){
} else {
_local9 = blockParticlePool.object;
_local9.scaleX = (_arg6) ? 0.8 : 1;
_local9.scaleY = (_arg6) ? 0.8 : 1;
_local9.timeDelta = _arg5;
_local9.timeLived = 0;
_local9.switchTo(_arg4);
_local9.alpha = 1;
_local9.x = (_arg1 + (_local7 * BlockSmashParticle.SIZE));
_local9.y = (_arg2 + ((_local8 * 2) * BlockSmashParticle.SIZE));
_local9.directionVector.x = ((((_arg1 + (_local7 * BlockSmashParticle.SIZE)) + (0.5 * BlockSmashParticle.SIZE)) - _arg3.x) - Ball.RADIUS);
_local9.directionVector.y = ((((_arg2 + ((_local8 * 2) * BlockSmashParticle.SIZE)) + BlockSmashParticle.SIZE) - _arg3.y) - Ball.RADIUS);
_local9.randomizeSpeed();
_local9.randomizeAngle();
_local9.rotation = (Math.random() * 180);
blockParticles.push(_local9);
addChild(_local9);
};
_local8++;
};
};
_local7++;
};
}
private function isMBlockAt(_arg1:int, _arg2:int):Boolean{
var _local4:Block;
var _local3:int;
while (_local3 < mobileBlocks.length) {
_local4 = mobileBlocks[_local3];
if ((((_local4.gridColumn == _arg2)) && ((_local4.gridRow == _arg1)))){
return (true);
};
_local3++;
};
return (false);
}
private function spawnParticle(_arg1:Class, _arg2:Number=0):void{
var _local7:Number;
var _local3:Ball = balls[0];
var _local4:FireParticle = fireParticlePool.object;
_local4.setTo(_arg1);
if (_arg2 < 0){
_local4.alphaDelta = 1;
};
var _local5:Point = new Point(_local3.directionVector.y, (-1 * _local3.directionVector.x));
var _local6:Number = Math.sqrt((Math.pow(_local5.x, 2) + Math.pow(_local5.y, 2)));
_local5.x = (_local5.x / _local6);
_local5.y = (_local5.y / _local6);
if (_arg1 == FireParticle.FIRE_PARTICLE_04){
_local7 = 0.4;
} else {
if (_arg1 == FireParticle.FIRE_PARTICLE_03){
_local7 = 0.5;
} else {
if (_arg1 == FireParticle.FIRE_PARTICLE_02){
_local7 = 0.3;
} else {
if (_arg1 == FireParticle.FIRE_PARTICLE_01){
_local7 = 0;
};
};
};
};
var _local8:Number = Math.random();
_local8 = (_local8 * ((Math.random() > 0.5)) ? 1 : -1);
_local8 = (_local8 * Math.random());
var _local9:Number = 4;
_local4.directionVector.x = (-1 * _local3.directionVector.x);
_local4.directionVector.y = (-1 * _local3.directionVector.y);
_local4.speed = 3;
_local4.alpha = 0.9;
_local4.x = (((_local3.x + Ball.RADIUS) - (_local4.width / 2)) + (((_local8 * Ball.RADIUS) * _local5.x) * _local7));
_local4.y = (((_local3.y + Ball.RADIUS) - (_local4.height / 2)) + (((_local8 * Ball.RADIUS) * _local5.y) * _local7));
fireParticles.push(_local4);
addChild(_local4);
}
private function onMouseClick(_arg1:MouseEvent):void{
if (!levelStarted){
return;
};
if (balls.length > 0){
Ball(balls[0]).glued = false;
};
}
private function createParticles(_arg1:Number):void{
if (_arg1 > 0){
timeToNextParticle = (timeToNextParticle + _arg1);
};
if ((((timeToNextParticle > 15)) || ((_arg1 < 0)))){
spawnParticle(FireParticle.FIRE_PARTICLE_03, _arg1);
spawnParticle(FireParticle.FIRE_PARTICLE_03, _arg1);
spawnParticle(FireParticle.FIRE_PARTICLE_02, _arg1);
spawnParticle(FireParticle.FIRE_PARTICLE_01, _arg1);
if (_arg1 > 0){
timeToNextParticle = (timeToNextParticle - 15);
};
};
}
private function constructFromXml(_arg1:XML):Boolean{
var _local2:XML;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:Boolean;
var _local9:String;
var _local10:Boolean;
var _local11:String;
var _local12:Boolean;
var _local13:String;
var _local14:int;
if (_arg1.child("blocks") == null){
return (false);
};
if (_arg1.blocks.child("block") == null){
return (false);
};
for each (_local2 in _arg1.blocks.children()) {
if (_local2.child("row") == null){
return (false);
};
_local3 = _local2.row;
if (_local2.child("column") == null){
return (false);
};
_local4 = _local2.column;
_local5 = ((_local2.child("color") == null)) ? 0 : _local5 = _local2.color;
_local5;
_local6 = ((_local2.child("bonus") == null)) ? 0 : _local6 = _local2.bonus;
_local6;
_local7 = ((_local2.child("steel") == null)) ? "false" : _local2.steel;
_local8 = (_local7.match("true")) ? true : false;
_local9 = ((_local2.child("stone") == null)) ? "false" : _local2.stone;
_local10 = (_local9.match("true")) ? true : false;
_local11 = ((_local2.child("mobile") == null)) ? "false" : _local2.mobile;
_local12 = (_local11.match("true")) ? true : false;
_local13 = ((_local2.child("direction") == null)) ? "right" : _local2.direction;
_local14 = (_local13.match("right")) ? 1 : -1;
if (((_local10) && (_local8))){
return (false);
};
if (((_local8) && (!((_local6 == Block.BONUS_NONE))))){
return (false);
};
addBlock(_local3, _local4, _local5, 0, _local8, _local10, _local12, _local14);
};
if (_arg1.child("bonuses") != null){
if (_arg1.bonuses.child("slow_ball") != null){
addBonus(Block.BONUS_SLOW_BALL, _arg1.bonuses.slow_ball);
};
if (_arg1.bonuses.child("fire_ball") != null){
addBonus(Block.BONUS_FIRE_BALL, _arg1.bonuses.fire_ball);
};
if (_arg1.bonuses.child("explosive_ball") != null){
addBonus(Block.BONUS_EXPLODING_BALL, _arg1.bonuses.explosive_ball);
};
if (_arg1.bonuses.child("split_ball") != null){
addBonus(Block.BONUS_SPLIT_BALL, _arg1.bonuses.split_ball);
};
if (_arg1.bonuses.child("grow_platform") != null){
addBonus(Block.BONUS_GROW_PLATFORM, _arg1.bonuses.grow_platform);
};
if (_arg1.bonuses.child("shrink_platform") != null){
addBonus(Block.BONUS_SHRINK_PLATFORM, _arg1.bonuses.shrink_platform);
};
if (_arg1.bonuses.child("vanishing_ball") != null){
addBonus(Block.BONUS_VANISHING_BALL, _arg1.bonuses.vanishing_ball);
};
if (_arg1.bonuses.child("chain") != null){
addBonus(Block.BONUS_CHAIN, _arg1.bonuses.chain);
};
if (_arg1.bonuses.child("life") != null){
addBonus(Block.BONUS_LIFE, _arg1.bonuses.life);
};
if (_arg1.bonuses.child("star") != null){
addBonus(Block.BONUS_STAR, _arg1.bonuses.star, starsRevealed);
};
};
Main.setPlaneRandomFactor(int(_arg1.plane_delay));
Main.setPlaneSpeedModifier(int(_arg1.plane_speed_mod));
return (true);
}
private function clean():void{
var _local2:int;
var _local3:FireParticle;
var _local4:BlockSmashParticle;
var _local1:int;
while (_local1 < board.length) {
board[_local1] = new Array(NR_OF_COLUMNS);
_local2 = 0;
while (_local2 < NR_OF_COLUMNS) {
board[_local1][_local2] = 0;
_local2++;
};
_local1++;
};
levelStarted = false;
if (activeBallBonus){
finishBonus(activeBallBonus, balls[0]);
};
if (activePlatformBonus){
finishBonus(activePlatformBonus);
};
mobileBlocks = new Array();
blocksToAdd = new Array();
balls = new Array();
fallingBonuses = new Array();
animationsPlaying = new Array();
while (fireParticles.length > 0) {
_local3 = fireParticles.pop();
removeChild(_local3);
fireParticlePool.object = _local3;
};
while (blockParticles.length > 0) {
_local4 = blockParticles.pop();
removeChild(_local4);
blockParticlePool.object = _local4;
};
while (this.numChildren > 0) {
this.removeChildAt(0);
};
}
public function finishBonus(_arg1:int, _arg2:Ball=null):void{
var _local3:Ball;
switch (_arg1){
case Block.BONUS_VANISHING_BALL:
if (_arg2 == null){
_arg2 = balls[0];
};
activeBallBonus = Block.BONUS_NONE;
_arg2.alpha = 1;
Main.ballBonusTimeBar.visible = false;
Main.showBonusIcon(false, Block.NO_BONUS_PNG);
break;
case Block.BONUS_SLOW_BALL:
if (_arg2 == null){
_arg2 = balls[0];
};
_arg2 = Ball(balls[0]);
_arg2.bonusSpeedMultiplayer = 1;
activeBallBonus = Block.BONUS_NONE;
Main.ballBonusTimeBar.visible = false;
Main.showBonusIcon(false, Block.NO_BONUS_PNG);
break;
case Block.BONUS_SPLIT_BALL:
if (_arg2 == null){
throw (new Error("no ball added for Ball Split ending event"));
};
while (balls.length > 0) {
_local3 = Ball(balls.pop());
if (_local3 != _arg2){
removeChild(_local3);
};
};
balls.push(_arg2);
activeBallBonus = Block.BONUS_NONE;
break;
case Block.BONUS_EXPLODING_BALL:
case Block.BONUS_FIRE_BALL:
if (_arg2 == null){
_arg2 = balls[0];
};
_arg2.switchToNormal();
activeBallBonus = Block.BONUS_NONE;
Main.ballBonusTimeBar.visible = false;
Main.showBonusIcon(false, Block.NO_BONUS_PNG);
break;
case Block.BONUS_CHAIN:
removeChild(chainImg);
activePlatformBonus = Block.BONUS_NONE;
Main.platformBonusTimeBar.visible = false;
Main.showBonusIcon(true, Block.NO_BONUS_PNG);
break;
case Block.BONUS_SHRINK_PLATFORM:
if (levelInProgress){
Main.mp3PlayerInstance.playSound(Platform.RUBBER_GROW_SOUND);
};
platform.returning = true;
platform.growing = false;
platform.shrinking = false;
platform.animCounter = 0;
activePlatformBonus = Block.BONUS_NONE;
Main.platformBonusTimeBar.visible = false;
Main.showBonusIcon(true, Block.NO_BONUS_PNG);
break;
case Block.BONUS_GROW_PLATFORM:
if (levelInProgress){
Main.mp3PlayerInstance.playSound(Platform.RUBBER_SHRINK_SOUND);
};
platform.returning = true;
platform.growing = false;
platform.shrinking = false;
platform.animCounter = 0;
activePlatformBonus = Block.BONUS_NONE;
Main.platformBonusTimeBar.visible = false;
Main.showBonusIcon(true, Block.NO_BONUS_PNG);
break;
};
}
private function boardFadeIn(_arg1:Event):void{
if (contains(levelLoadingInfo)){
removeChild(levelLoadingInfo);
removeChild(paperCardImg);
};
var _local2:int = ((new Date().getTime() - fadeBoardTimer) / 31);
if (alpha <= 1){
alpha = (0.05 * _local2);
Main.setPlaneAlpha(alpha);
} else {
alpha = 1;
removeEventListener(Event.ENTER_FRAME, boardFadeIn);
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
date = new Date();
lastAction = date.getTime();
Main.startTime();
levelStarted = true;
};
}
private function levelFromCode():void{
var _local2:int;
var _local1:int;
while (_local1 < 9) {
_local2 = 0;
while (_local2 < NR_OF_COLUMNS) {
if ((((_local1 == 1)) && ((_local2 == 5)))){
addBlock(_local1, _local2, (_local2 % 5), 0, false, true, true);
} else {
if ((((_local1 == 1)) && ((_local2 == 11)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_FIRE_BALL);
} else {
if ((((_local1 == 2)) && ((_local2 == 1)))){
addBlock(_local1, _local2, (_local2 % 5), 0, true, false, true);
} else {
if ((((_local1 == 2)) && ((_local2 == 3)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_EXPLODING_BALL);
} else {
if ((((_local1 == 2)) && ((_local2 == 9)))){
addBlock(_local1, _local2, (_local2 % 5), 0, true, false, true);
} else {
if ((((_local1 == 4)) && ((_local2 == 3)))){
addBlock(_local1, _local2, (_local2 % 5), 0, false, true, true);
} else {
if ((((_local1 == 4)) && ((_local2 == 8)))){
addBlock(_local1, _local2, (_local2 % 5), 0, false, true);
} else {
if ((((_local1 == 5)) && ((_local2 == 11)))){
addBlock(_local1, _local2, (_local2 % 5), 0, true);
} else {
if ((((_local1 == 6)) && ((_local2 == 3)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_SPLIT_BALL);
} else {
if ((((_local1 == 6)) && ((_local2 == 6)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_GROW_PLATFORM, false, true);
} else {
if ((((_local1 == 7)) && ((_local2 == 1)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_SHRINK_PLATFORM, false, false, true);
} else {
if ((((_local1 == 7)) && ((_local2 == 10)))){
addBlock(_local1, _local2, (_local2 % 5), 0, false, false, true);
} else {
if ((((_local1 == 1)) && ((_local2 == 8)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_CHAIN);
} else {
if ((((_local1 == 3)) && ((_local2 == 13)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_SHRINK_PLATFORM);
} else {
if ((((_local1 == 3)) && ((_local2 == 5)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_SLOW_BALL);
} else {
if ((((_local1 == 8)) && ((_local2 == 14)))){
addBlock(_local1, _local2, (_local2 % 5), Block.BONUS_VANISHING_BALL);
} else {
addBlock(_local1, _local2, (_local2 % 5));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
_local2++;
};
_local1++;
};
}
private function onKeyReleased(_arg1:KeyboardEvent):void{
if (!levelStarted){
return;
};
if (platform.mouseSteering){
return;
};
switch (_arg1.keyCode){
case Keyboard.RIGHT:
platform.stopMove(Platform.RIGHT);
break;
case Keyboard.LEFT:
platform.stopMove(Platform.LEFT);
break;
};
}
private function onAdded(_arg1:Event):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyReleased, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true);
stage.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);
alpha = 1;
stage.focus = this;
addChild(paperCardImg);
addChild(levelLoadingInfo);
loadingTimer.reset();
loadingTimer.start();
levelLoader.addEventListener(Event.COMPLETE, levelLoaded, false, 0, true);
levelLoader.load(new URLRequest((Main.LEVEL_PATH + levelPath)));
}
private function endGame(_arg1:MouseEvent=null):void{
removeEventListener(MouseEvent.CLICK, endGame);
dispatchEvent(new Event(GAME_LOST));
dispatchEvent(new Event(GAME_FINISHED));
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function moveParticle(_arg1:Number):void{
var _local3:FireParticle;
timeToFade = (timeToFade + _arg1);
var _local2:int;
while (_local2 < fireParticles.length) {
_local3 = fireParticles[_local2];
if (_local3.alpha <= 0){
removeChild(_local3);
removeFromArray(fireParticles, _local3);
fireParticlePool.object = _local3;
_local2--;
} else {
_local3.move(_arg1);
if (timeToFade > 15){
_local3.fade();
};
};
_local2++;
};
if (timeToFade > 15){
timeToFade = (timeToFade - 15);
};
}
private function onRemoved(_arg1:Event):void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyReleased);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
stage.removeEventListener(MouseEvent.CLICK, onMouseClick);
}
public function hideLoadingMsg():void{
if (contains(paperCardImg)){
removeChild(paperCardImg);
};
if (contains(levelLoadingInfo)){
removeChild(levelLoadingInfo);
};
}
public function showLoadingMsg(_arg1:Boolean=false):void{
addChild(paperCardImg);
addChild(levelLoadingInfo);
if (_arg1){
loadingTimer.reset();
loadingTimer.start();
};
}
private function boardFadeOut(_arg1:Event):void{
var _local2:int = ((new Date().getTime() - fadeBoardTimer) / 31);
if (alpha >= 0){
alpha = (1 - (0.05 * _local2));
Main.setPlaneAlpha(alpha);
} else {
alpha = 0;
removeEventListener(Event.ENTER_FRAME, boardFadeOut);
clean();
Main.resetPlane();
if (nextLevel != null){
if (Main.getStarsNeeded() <= starsCaught){
alpha = 1;
addChild(paperCardImg);
addChild(levelLoadingInfo);
loadingTimer.reset();
loadingTimer.start();
levelLoader.load(new URLRequest((Main.LEVEL_PATH + nextLevel)));
Main.clearBonusIcons(true);
Main.showBonusIcon(true, Block.NO_BONUS_PNG);
Main.showBonusIcon(false, Block.NO_BONUS_PNG);
} else {
dispatchEvent(new Event(GAME_LOST));
};
} else {
if (Main.getStarsNeeded() <= starsCaught){
dispatchEvent(new Event(GAME_FINISHED));
dispatchEvent(new Event(GAME_WON));
} else {
dispatchEvent(new Event(GAME_LOST));
};
};
};
}
private function resolveBonus(_arg1:Block, _arg2:int, _arg3:Ball):void{
var _local4:Ball;
if ((((_arg1.bonus == activeBallBonus)) && (!((activeBallBonus == Block.BONUS_SPLIT_BALL))))){
Main.updateScore(50);
activeBallBonusStartTime = _arg2;
Main.ballBonusTimeBar.restart();
return;
};
if ((((_arg1.bonus < Block.BONUS_GROW_PLATFORM)) && (!((activeBallBonus == _arg1.bonus))))){
finishBonus(activeBallBonus, _arg3);
};
switch (_arg1.bonus){
case Block.BONUS_VANISHING_BALL:
activeBallBonus = _arg1.bonus;
activeBallBonusStartTime = _arg2;
Main.updateScore(50);
activeBallBonusDuration = activeExplodingBallBonusDuration;
Main.ballBonusTimeBar.restart();
Main.ballBonusTimeBar.ANIM_TIME = activeExplodingBallBonusDuration;
Main.showBonusIcon(false, Block.VANISH_BONUS_PNG);
break;
case Block.BONUS_SLOW_BALL:
activeBallBonus = _arg1.bonus;
activeBallBonusStartTime = _arg2;
_arg3.bonusSpeedMultiplayer = 0.5;
Main.updateScore(50);
activeBallBonusDuration = activeNormalBallBonusDuration;
Main.ballBonusTimeBar.restart();
Main.ballBonusTimeBar.ANIM_TIME = activeNormalBallBonusDuration;
Main.showBonusIcon(false, Block.SLOW_BONUS_PNG);
break;
case Block.BONUS_FIRE_BALL:
activeBallBonus = _arg1.bonus;
activeBallBonusStartTime = _arg2;
_arg3.switchToFire();
Main.updateScore(50);
activeBallBonusDuration = activeNormalBallBonusDuration;
Main.ballBonusTimeBar.restart();
Main.ballBonusTimeBar.ANIM_TIME = activeNormalBallBonusDuration;
Main.showBonusIcon(false, Block.FIRE_BONUS_PNG);
break;
case Block.BONUS_EXPLODING_BALL:
activeBallBonus = _arg1.bonus;
activeBallBonusStartTime = _arg2;
_arg3.switchToExplosive();
Main.updateScore(50);
activeBallBonusDuration = activeExplodingBallBonusDuration;
Main.ballBonusTimeBar.restart();
Main.ballBonusTimeBar.ANIM_TIME = activeExplodingBallBonusDuration;
Main.showBonusIcon(false, Block.EXPLOSIVE_BONUS_PNG);
break;
case Block.BONUS_SPLIT_BALL:
activeBallBonus = _arg1.bonus;
activeBallBonusStartTime = _arg2;
_local4 = new Ball((_arg3.x + Ball.RADIUS), (_arg3.y + Ball.RADIUS));
_local4.directionVector.y = (-1 * _arg3.directionVector.y);
_local4.directionVector.x = (-1 * _arg3.directionVector.x);
_local4.speedMultiplayer = _arg3.speedMultiplayer;
addChild(_local4);
swapChildren(_local4, platform);
balls.push(_local4);
Main.updateScore(50);
splitBalls[0] = _arg3;
splitBalls[1] = _local4;
splitHappened = true;
break;
case Block.BONUS_SHRINK_PLATFORM:
case Block.BONUS_GROW_PLATFORM:
case Block.BONUS_CHAIN:
case Block.BONUS_LIFE:
case Block.BONUS_STAR:
fallingBonus = new FallingBonus(_arg1.x, _arg1.y, _arg1.bonus, bonusesHidden);
addChild(fallingBonus);
swapChildren(fallingBonus, platform);
fallingBonuses.push(fallingBonus);
break;
};
}
private function addBlock(_arg1:int, _arg2:int, _arg3:int=0, _arg4:int=0, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Boolean=false, _arg8:int=1):void{
var _local10:int;
if (board[_arg1][_arg2] != 0){
return;
};
var _local9:Block = new Block(_arg2, _arg1, _arg3, _arg5, _arg6, _arg7);
_local9.mobileDirection = _arg8;
if (_arg4 > 0){
_local9.addBonus(_arg4, bonusesHidden);
};
addToBlocksToAdd(_local9);
if (_arg7 == false){
_local10 = blocks.push(_local9);
board[_arg1][_arg2] = _local10;
} else {
mobileBlocks.push(_local9);
};
if (!_arg5){
destroyableBlocksCount++;
blocksForBonuses.push(_local9);
};
}
private function sortMobileBlocks():void{
var _local3:int;
var _local4:Block;
var _local5:Block;
var _local1:Boolean;
var _local2:int;
while (_local2 < mobileBlocks.length) {
_local1 = true;
_local3 = 0;
while (_local3 < ((mobileBlocks.length - _local2) - 1)) {
_local4 = mobileBlocks[_local3];
_local5 = mobileBlocks[(_local3 + 1)];
if (((_local4.gridRow * 100) + _local4.gridColumn) > ((_local5.gridRow * 100) + _local5.gridColumn)){
mobileBlocks[_local3] = _local5;
mobileBlocks[(_local3 + 1)] = _local4;
_local1 = false;
};
_local3++;
};
if (_local1){
break;
};
_local2++;
};
}
private function getTimeBonus():int{
var _local1:int = Main.getTime();
if (_local1 <= 30000){
return (500);
};
if (_local1 <= 60000){
return (400);
};
if (_local1 <= 90000){
return (300);
};
if (_local1 <= 120000){
return (200);
};
if (_local1 <= 150000){
return (100);
};
return (0);
}
private function addToBlocksToAdd(_arg1:Block):void{
var _local4:Block;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local2:int = ((_arg1.gridRow * 100) + _arg1.gridColumn);
if (blocksToAdd.length == 0){
blocksToAdd.push(_arg1);
return;
};
var _local3:int;
while (_local3 < blocksToAdd.length) {
_local4 = blocksToAdd[_local3];
_local5 = ((_local4.gridRow * 100) + _local4.gridColumn);
if (_local2 == _local5){
throw (new Error("adding brick to already used grid spot"));
};
if (_local2 > _local5){
if (_local3 == 0){
blocksToAdd.unshift(_arg1);
return;
};
_local6 = blocksToAdd.slice(0, _local3);
_local6.push(_arg1);
_local7 = blocksToAdd.slice(_local3);
blocksToAdd = _local6;
while (_local7.length > 0) {
blocksToAdd.push(_local7.shift());
};
return;
};
_local3++;
};
blocksToAdd.push(_arg1);
}
private function addChain():void{
chainImg.x = 0;
chainImg.y = CHAIN_POS_Y;
addChild(chainImg);
swapChildren(chainImg, platform);
}
private function levelLoaded(_arg1:Event):void{
if ((_arg1 is TimerEvent)){
timerFinished = true;
loadingTimer.stop();
} else {
level = new XML(_arg1.target.data);
loadingFinished = true;
};
if (((!(timerFinished)) || (!(loadingFinished)))){
return;
};
timerFinished = false;
loadingFinished = false;
if (readFromXml){
if (constructFromXml(level) == false){
throw (new Error("error loading level: xml file contains errors"));
};
} else {
levelFromCode();
};
addBlocksToDisplayList();
sortMobileBlocks();
blocksForBonuses = new Array();
ball = new Ball((PLATFORM_START_POS_X + (Platform.NORMAL_WIDTH / 2)), (PLATFORM_POS_Y - Ball.RADIUS));
ball.glued = true;
addChild(ball);
balls.push(ball);
platform = new Platform(PLATFORM_START_POS_X, PLATFORM_POS_Y);
addChild(platform);
alpha = 0;
addEventListener(Event.ENTER_FRAME, boardFadeIn, false, 0, true);
fadeBoardTimer = new Date().getTime();
levelInProgress = true;
starsCaught = 0;
if (!contains(pauseText)){
addChild(pauseText);
};
if (!contains(quitText)){
addChild(quitText);
};
}
private function removeFromArray(_arg1:Array, _arg2):void{
var _local4:*;
var _local3:Array = new Array();
while ((_local4 = _arg1.pop()) != _arg2) {
if (_local4 == null){
throw (new Error("element to remove not found in Array"));
};
_local3.push(_local4);
};
while (_local3.length > 0) {
_arg1.push(_local3.pop());
};
}
private function destroyBlock(_arg1:Block, _arg2:int, _arg3:int, _arg4:Ball, _arg5:Boolean=false):Boolean{
var _local6:Animation;
var _local7:Point;
var _local8:Block;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
if (_arg1.steel){
if (activeBallBonus == Block.BONUS_FIRE_BALL){
finishBonus(activeBallBonus);
};
return (true);
};
if (((((!((_arg1.bonus == 0))) && (!((activeBallBonus == Block.BONUS_FIRE_BALL))))) && (!((activeBallBonus == Block.BONUS_EXPLODING_BALL))))){
if (_arg1.bonusRevealed){
if (activeBallBonus != Block.BONUS_EXPLODING_BALL){
Main.mp3PlayerInstance.playSound(_arg1.getDestroySound());
};
resolveBonus(_arg1, _arg2, _arg4);
if (_arg1.mobile){
removeFromArray(mobileBlocks, _arg1);
} else {
board[_arg1.gridRow][_arg1.gridColumn] = 0;
};
destroyableBlocksCount--;
Main.updateScore(10);
removeChild(_arg1);
destroyBlockAnimation(_arg1.x, _arg1.y, _arg4, _arg1.color, _arg3);
return (false);
} else {
if (_arg1.stone){
_arg1.toNormal();
destroyBlockAnimation(_arg1.x, _arg1.y, _arg4, Block.COLOR_STONE, _arg3, true);
};
if (activeBallBonus != Block.BONUS_EXPLODING_BALL){
Main.mp3PlayerInstance.playSound(Block.DISCOVER_BONUS_SOUND);
};
_arg1.revealBonus();
return (false);
};
} else {
if (((_arg1.stone) && (!((activeBallBonus == Block.BONUS_FIRE_BALL))))){
_arg1.toNormal();
destroyBlockAnimation(_arg1.x, _arg1.y, _arg4, Block.COLOR_STONE, _arg3, true);
if (activeBallBonus != Block.BONUS_EXPLODING_BALL){
Main.mp3PlayerInstance.playSound(_arg1.getDestroySound());
};
if (activeBallBonus == Block.BONUS_EXPLODING_BALL){
_arg1.bonus = Block.BONUS_NONE;
};
} else {
if (_arg1.mobile){
removeFromArray(mobileBlocks, _arg1);
destroyableBlocksCount--;
Main.updateScore(10);
destroyBlockAnimation(_arg1.x, _arg1.y, _arg4, _arg1.color, _arg3);
if (activeBallBonus != Block.BONUS_EXPLODING_BALL){
Main.mp3PlayerInstance.playSound(_arg1.getDestroySound());
};
removeChild(_arg1);
} else {
if (board[_arg1.gridRow][_arg1.gridColumn] != 0){
board[_arg1.gridRow][_arg1.gridColumn] = 0;
Main.updateScore(10);
destroyableBlocksCount--;
destroyBlockAnimation(_arg1.x, _arg1.y, _arg4, _arg1.color, _arg3);
if (activeBallBonus != Block.BONUS_EXPLODING_BALL){
Main.mp3PlayerInstance.playSound(_arg1.getDestroySound());
};
removeChild(_arg1);
};
};
};
};
if ((((activeBallBonus == Block.BONUS_EXPLODING_BALL)) && (!(_arg5)))){
_local6 = new Animation(Animation.ANIM_EXPLOSION);
_local6.x = ((_arg1.x + (Block.SMALL_BLOCK_WIDTH / 2)) - (_local6.width / 2));
_local6.y = ((_arg1.y + (Block.SMALL_BLOCK_HEIGHT / 2)) - (_local6.height / 2));
_local6.startAnimation(0);
addChild(_local6);
animationsPlaying.push(_local6);
Main.mp3PlayerInstance.playSound(Animation.EXPLOSION_SOUND);
_local7 = new Point((_arg1.x + (Block.SMALL_BLOCK_WIDTH / 2)), (_arg1.y + (Block.SMALL_BLOCK_HEIGHT / 2)));
_local9 = -1;
while (_local9 < 2) {
_local10 = -1;
while (_local10 < 2) {
if ((((_local9 == 0)) && ((_local10 == 0)))){
} else {
_local11 = ((_local7.x + (_local9 * Block.SMALL_BLOCK_WIDTH)) / Block.SMALL_BLOCK_WIDTH);
_local12 = ((_local7.y + (_local10 * Block.SMALL_BLOCK_HEIGHT)) / Block.SMALL_BLOCK_HEIGHT);
if ((((((_local12 < 0)) || ((_local11 < 0)))) || ((_local11 >= NR_OF_COLUMNS)))){
} else {
if (board[_local12][_local11] != 0){
destroyBlock(blocks[(board[_local12][_local11] - 1)], _arg2, _arg3, _arg4, true);
} else {
_local8 = getMBlockPassingThrough((_local7.x + (_local9 * Block.SMALL_BLOCK_WIDTH)), (_local7.y + (_local10 * Block.SMALL_BLOCK_HEIGHT)));
if (_local8 != null){
destroyBlock(_local8, _arg2, _arg3, _arg4, true);
};
};
};
};
_local10++;
};
_local9++;
};
};
return (false);
}
private function onEnterFrame(_arg1:Event):void{
var _local11:FireParticle;
var _local12:Number;
var _local13:Array;
var _local14:int;
var _local15:Block;
var _local16:Number;
var _local17:int;
var _local18:Block;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:int;
var _local24:int;
var _local25:Point;
var _local26:int;
var _local27:int;
var _local28:int;
var _local29:int;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:int;
var _local35:Point;
var _local36:Point;
var _local37:Number;
var _local38:Number;
var _local39:Boolean;
var _local40:Collision;
var _local41:Animation;
date = new Date();
var _local2:int = date.getTime();
var _local3:int = (_local2 - lastAction);
var _local4:int;
var _local5:Collision = new Collision();
var _local6:Collision = new Collision();
var _local7:Boolean;
var _local8:int = _local3;
var _local9 = 3;
if (paused){
lastAction = _local2;
activeBallBonusStartTime = (activeBallBonusStartTime + _local8);
activePlatformBonusStartTime = (activePlatformBonusStartTime + _local8);
return;
};
if (destroyableBlocksCount == 0){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextLevel = Main.nextLevel();
levelInProgress = false;
if (!Main.isAdventure()){
fadeBoardTimer = new Date().getTime();
Main.instance.addEventListener(Main.COUNTDOWN_FINISHED, startCountDownAnimationFinished, false, 0, true);
Main.instance.startCountDownAnimation(getTimeBonus());
} else {
addEventListener(Event.ENTER_FRAME, boardFadeOut, false, 0, true);
fadeBoardTimer = new Date().getTime();
};
return;
};
var _local10:int;
while (_local10 < balls.length) {
ball = balls[_local10];
if (ball.y > HEIGHT){
removeChild(ball);
removeFromArray(balls, ball);
while (fireParticles.length > 0) {
_local11 = fireParticles.pop();
fireParticlePool.object = _local11;
removeChild(_local11);
};
};
if (balls.length == 0){
Main.livesNumber--;
Main.updateLives();
Main.mp3PlayerInstance.playSound(LIFE_LOST_SOUND);
if (Main.livesNumber == 0){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
dispatchEvent(new Event(GAME_FINISHED));
dispatchEvent(new Event(GAME_LOST));
return;
};
ball = new Ball((PLATFORM_START_POS_X + (Platform.NORMAL_WIDTH / 2)), (PLATFORM_POS_Y - Ball.RADIUS));
ball.glued = true;
addChild(ball);
balls.push(ball);
ball = null;
activeBallBonus = Block.BONUS_NONE;
if (activePlatformBonus != Block.BONUS_NONE){
finishBonus(activePlatformBonus);
};
Main.clearBonusIcons();
Main.showBonusIcon(true, Block.NO_BONUS_PNG);
Main.showBonusIcon(false, Block.NO_BONUS_PNG);
while (fallingBonuses.length > 0) {
fallingBonus = fallingBonuses.pop();
removeChild(fallingBonus);
};
removeChild(platform);
platform = new Platform(PLATFORM_START_POS_X, PLATFORM_POS_Y);
addChild(platform);
};
_local10++;
};
_local4 = 1;
while (_local4 <= _local3) {
if (platform.growing){
platform.grow();
};
if (platform.shrinking){
platform.shrink();
};
if (platform.returning){
platform.toNormal();
};
_local12 = platform.move(_local9);
if ((((balls.length > 0)) && (Ball(balls[0]).glued))){
Ball(balls[0]).x = (Ball(balls[0]).x + _local12);
};
_local10 = 0;
while (_local10 < fallingBonuses.length) {
fallingBonus = fallingBonuses[_local10];
fallingBonus.move(_local9);
if (fallingBonus.y > HEIGHT){
removeChild(fallingBonus);
removeFromArray(fallingBonuses, fallingBonus);
} else {
if (((((fallingBonus.y + fallingBonus.pHeight) > PLATFORM_POS_Y)) && ((fallingBonus.y < (PLATFORM_POS_Y + platform.pHeight))))){
if (((((fallingBonus.x + fallingBonus.pWidth) > platform.x)) && ((fallingBonus.x < (platform.x + platform.pWidth))))){
caughtBonus(fallingBonus, (_local2 + _local4));
removeChild(fallingBonus);
removeFromArray(fallingBonuses, fallingBonus);
};
};
};
_local10++;
};
_local13 = new Array();
_local10 = 0;
while (_local10 < mobileBlocks.length) {
_local15 = mobileBlocks[_local10];
_local16 = (_local15.hadCollision) ? _local15.x : _local15.posAfterMove(_local9);
_local15.hadCollision = false;
if ((((_local16 <= 0)) || (((_local16 + Block.SMALL_BLOCK_WIDTH) >= WIDTH)))){
_local15.mobileDirection = (_local15.mobileDirection * -1);
_local16 = _local15.x;
};
_local29 = ((_local15.mobileDirection < 0)) ? (_local16 / Block.SMALL_BLOCK_WIDTH) : ((_local16 + Block.SMALL_BLOCK_WIDTH) / Block.SMALL_BLOCK_WIDTH);
if (board[_local15.gridRow][_local29] != 0){
_local16 = _local15.x;
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
_local17 = 0;
while (_local17 < mobileBlocks.length) {
if (_local10 == _local17){
} else {
_local18 = mobileBlocks[_local17];
if (_local18.gridRow != _local15.gridRow){
} else {
if (Math.abs((_local16 - _local18.x)) < Block.SMALL_BLOCK_WIDTH){
_local16 = _local15.x;
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
};
};
_local17++;
};
_local15.x = _local16;
_local10++;
};
if (Ball(balls[0]).glued){
} else {
_local14 = 0;
while (_local14 < balls.length) {
ball = balls[_local14];
_local19 = ball.posAfterMove(_local9);
_local20 = ball.yPosAfterMove(_local9);
_local21 = (_local19 + Ball.RADIUS);
_local22 = (_local20 + Ball.RADIUS);
_local23 = (_local21 / Block.SMALL_BLOCK_WIDTH);
_local24 = (_local22 / Block.SMALL_BLOCK_HEIGHT);
_local25 = new Point(_local21, _local22);
if (_local19 < 0){
_local19 = (_local19 * -1);
ball.directionVector.x = (ball.directionVector.x * -1);
};
if ((_local19 + (2 * Ball.RADIUS)) > WIDTH){
_local19 = ((WIDTH - ((_local19 + (2 * Ball.RADIUS)) - WIDTH)) - (2 * Ball.RADIUS));
ball.directionVector.x = (ball.directionVector.x * -1);
};
if (_local20 < 0){
_local20 = (_local20 * -1);
ball.directionVector.y = (ball.directionVector.y * -1);
};
if (((((((_local20 + (2 * Ball.RADIUS)) >= CHAIN_POS_Y)) && ((activePlatformBonus == Block.BONUS_CHAIN)))) && (((_local20 + Ball.RADIUS) < CHAIN_POS_Y)))){
ball.directionVector.y = (ball.directionVector.y * -1);
_local20 = ((CHAIN_POS_Y - ((_local20 + (2 * Ball.RADIUS)) - CHAIN_POS_Y)) - (2 * Ball.RADIUS));
};
if ((_local20 + (2 * Ball.RADIUS)) >= PLATFORM_POS_Y){
if (((((((_local19 + Ball.RADIUS) >= platform.x)) && (((_local19 + Ball.RADIUS) <= (platform.x + platform.pWidth))))) && ((_local20 < (PLATFORM_POS_Y + platform.pHeight))))){
_local20 = ((PLATFORM_POS_Y - ((_local20 + (2 * Ball.RADIUS)) - PLATFORM_POS_Y)) - (2 * Ball.RADIUS));
ball.directionVector.y = (ball.directionVector.y * -1);
_local30 = (((ball.x + Ball.RADIUS) - platform.x) / platform.pWidth);
if (_local30 < 0){
_local30 = 0;
};
if (_local30 > 1){
_local30 = 1;
};
_local31 = (-90 + (_local30 * 180));
if (ball.directionVector.x == 0){
ball.VectorAngle = 0;
} else {
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
ball.VectorAngle = (ball.VectorAngle * ((ball.directionVector.x < 0)) ? -1 : 1);
};
if ((ball.VectorAngle + _local31) < (-1 * Ball.MAX_BOUNCE_ANGLE)){
_local31 = ((-1 * Ball.MAX_BOUNCE_ANGLE) - ball.VectorAngle);
};
if ((ball.VectorAngle + _local31) > Ball.MAX_BOUNCE_ANGLE){
_local31 = (Ball.MAX_BOUNCE_ANGLE - ball.VectorAngle);
};
_local32 = ((ball.directionVector.x * Math.cos(dgToRadian(_local31))) - (ball.directionVector.y * Math.sin(dgToRadian(_local31))));
_local33 = ((ball.directionVector.x * Math.sin(dgToRadian(_local31))) + (ball.directionVector.y * Math.cos(dgToRadian(_local31))));
if ((((Math.abs(_local32) < 0.05)) && ((Math.abs(ball.directionVector.x) < 0.05)))){
_local34 = (Math.random() * pseudoRandomArray.length);
_local34 = pseudoRandomArray[_local34];
_local32 = ((ball.directionVector.x * Math.cos(dgToRadian((_local34 * 3)))) - (ball.directionVector.y * Math.sin(dgToRadian((_local34 * 3)))));
_local33 = ((ball.directionVector.x * Math.sin(dgToRadian((_local34 * 3)))) + (ball.directionVector.y * Math.cos(dgToRadian((_local34 * 3)))));
};
ball.directionVector.x = _local32;
ball.directionVector.y = _local33;
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
ball.VectorAngle = (ball.VectorAngle * ((ball.directionVector.x < 0)) ? -1 : 1);
ball.speedMultiplayer = 1;
platform.hit = true;
Main.mp3PlayerInstance.playSound(Platform.BOUNCE_SOUND);
} else {
if ((((((((_local19 <= (platform.x + platform.pWidth))) && ((_local19 > platform.x)))) && (((_local20 + Ball.RADIUS) > PLATFORM_POS_Y)))) && ((_local20 < (PLATFORM_POS_Y + platform.pHeight))))){
_local19 = ((platform.x + platform.pWidth) + ((platform.x + platform.pWidth) - _local19));
ball.directionVector.x = Math.abs(ball.directionVector.x);
platform.x = (platform.x + (Platform.LEFT - 1));
Main.mp3PlayerInstance.playSound(Platform.BOUNCE_SOUND);
} else {
if (((((((((_local19 + (2 * Ball.RADIUS)) >= platform.x)) && ((_local19 < (platform.x + platform.pWidth))))) && (((_local20 + Ball.RADIUS) > PLATFORM_POS_Y)))) && ((_local20 < (PLATFORM_POS_Y + platform.pHeight))))){
_local19 = ((platform.x - ((_local19 + (2 * Ball.RADIUS)) - platform.x)) - (2 * Ball.RADIUS));
ball.directionVector.x = (-1 * Math.abs(ball.directionVector.x));
platform.x = (platform.x + (Platform.RIGHT - 1));
Main.mp3PlayerInstance.playSound(Platform.BOUNCE_SOUND);
} else {
_local25 = new Point((_local19 + Ball.RADIUS), (_local20 + Ball.RADIUS));
if ((((ball.directionVector.x >= 0)) && (((_local19 + Ball.RADIUS) < platform.x)))){
_local35 = new Point(platform.x, PLATFORM_POS_Y);
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
ball.directionVector.x = (-1 * Math.abs(ball.directionVector.x));
ball.directionVector.y = (-1 * Math.abs(ball.directionVector.y));
_local36 = new Point(ball.x, ball.y);
_local37 = (Point.distance(_local35, _local36) - Point.distance(_local35, _local25));
_local38 = ((Point.distance(_local35, _local36) - Ball.RADIUS) / _local37);
_local19 = ball.posAfterMove((_local9 * _local38));
_local20 = ball.yPosAfterMove((_local9 * _local38));
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
_local31 = ((-1 * Ball.MAX_BOUNCE_ANGLE) + ball.VectorAngle);
_local32 = ((ball.directionVector.x * Math.cos(dgToRadian(_local31))) - (ball.directionVector.y * Math.sin(dgToRadian(_local31))));
_local33 = ((ball.directionVector.x * Math.sin(dgToRadian(_local31))) + (ball.directionVector.y * Math.cos(dgToRadian(_local31))));
ball.directionVector.x = _local32;
ball.directionVector.y = _local33;
if (ball.directionVector.x == 0){
ball.VectorAngle = 0;
} else {
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
};
ball.speedMultiplayer = 1;
Main.mp3PlayerInstance.playSound(Platform.BOUNCE_SOUND);
};
} else {
(((ball.directionVector.x <= 0)) && (((_local19 + Ball.RADIUS) > (platform.x + platform.pWidth))));
};
_local35 = new Point((platform.x + platform.pWidth), PLATFORM_POS_Y);
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
ball.directionVector.x = Math.abs(ball.directionVector.x);
ball.directionVector.y = (-1 * Math.abs(ball.directionVector.y));
_local36 = new Point(ball.x, ball.y);
_local37 = (Point.distance(_local35, _local36) - Point.distance(_local35, _local25));
_local38 = ((Point.distance(_local35, _local36) - Ball.RADIUS) / _local37);
_local19 = ball.posAfterMove((_local9 * _local38));
_local20 = ball.yPosAfterMove((_local9 * _local38));
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
_local31 = (Ball.MAX_BOUNCE_ANGLE - ball.VectorAngle);
_local32 = ((ball.directionVector.x * Math.cos(dgToRadian(_local31))) - (ball.directionVector.y * Math.sin(dgToRadian(_local31))));
_local33 = ((ball.directionVector.x * Math.sin(dgToRadian(_local31))) + (ball.directionVector.y * Math.cos(dgToRadian(_local31))));
ball.directionVector.x = _local32;
ball.directionVector.y = _local33;
if (ball.directionVector.x == 0){
ball.VectorAngle = 0;
} else {
ball.VectorAngle = (90 - Math.abs(radianToDg(Math.atan((Math.abs(ball.directionVector.y) / Math.abs(ball.directionVector.x))))));
};
ball.speedMultiplayer = 1;
Main.mp3PlayerInstance.playSound(Platform.BOUNCE_SOUND);
};
};
};
};
};
_local26 = ((ball.directionVector.x < 0)) ? -1 : 1;
_local27 = ((ball.directionVector.y < 0)) ? -1 : 1;
_local21 = (_local19 + Ball.RADIUS);
_local22 = (_local20 + Ball.RADIUS);
_local28 = ((_local22 + (_local27 * Ball.RADIUS)) / Block.SMALL_BLOCK_HEIGHT);
_local29 = (_local21 / Block.SMALL_BLOCK_WIDTH);
if ((((_local29 < NR_OF_COLUMNS)) && (!((board[_local28][_local29] == 0))))){
_local39 = destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.directionVector.y = (ball.directionVector.y * -1);
_local20 = (_local20 + (_local27 * ((Math.abs((_local22 - ((_local28 + 0.5) * Block.SMALL_BLOCK_HEIGHT))) - (0.5 * Block.SMALL_BLOCK_HEIGHT)) - Ball.RADIUS)));
_local20 = (_local20 - (_local27 * 0.01));
};
if (((((_local39) && ((Math.abs(ball.directionVector.x) <= 0.08)))) && ((ball.directionVector.y < 0)))){
_local31 = ((ball.directionVector.x < 0)) ? -8 : 8;
_local32 = ((ball.directionVector.x * Math.cos(dgToRadian(_local31))) - (ball.directionVector.y * Math.sin(dgToRadian(_local31))));
_local33 = ((ball.directionVector.x * Math.sin(dgToRadian(_local31))) + (ball.directionVector.y * Math.cos(dgToRadian(_local31))));
ball.directionVector.x = _local32;
ball.directionVector.y = _local33;
};
};
_local21 = (_local19 + Ball.RADIUS);
_local22 = (_local20 + Ball.RADIUS);
_local28 = (_local22 / Block.SMALL_BLOCK_HEIGHT);
_local29 = ((_local21 + (_local26 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
if ((((_local29 < NR_OF_COLUMNS)) && (!((board[_local28][_local29] == 0))))){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.directionVector.x = (ball.directionVector.x * -1);
_local19 = (_local19 + (_local26 * ((Math.abs((_local21 - ((_local29 + 0.5) * Block.SMALL_BLOCK_HEIGHT))) - (0.5 * Block.SMALL_BLOCK_HEIGHT)) - Ball.RADIUS)));
};
};
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y < 0)))){
_local28 = (_local20 / Block.SMALL_BLOCK_HEIGHT);
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
if (((((!((_local28 == _local24))) && (!((_local29 == _local23))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local29 == _local23))))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
_local28 = ((_local20 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_HEIGHT);
if (((((!((_local29 == _local23))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
};
};
};
} else {
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y > 0)))){
_local28 = ((_local20 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_HEIGHT);
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
if (((((!((_local28 == _local24))) && (!((_local29 == _local23))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local29 == _local23))))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
_local28 = (_local20 / Block.SMALL_BLOCK_HEIGHT);
if (((((!((_local29 == _local23))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
};
};
};
} else {
if ((((ball.directionVector.x > 0)) && ((ball.directionVector.y > 0)))){
_local28 = ((_local20 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_HEIGHT);
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local28 == _local24))))) && (!((_local29 == _local23))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
if (((((!((_local29 == _local23))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
_local28 = (_local20 / Block.SMALL_BLOCK_HEIGHT);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local29 == _local23))))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
};
};
};
} else {
if ((((ball.directionVector.x > 0)) && ((ball.directionVector.y < 0)))){
_local28 = (_local20 / Block.SMALL_BLOCK_HEIGHT);
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local28 == _local24))))) && (!((_local29 == _local23))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = (_local19 / Block.SMALL_BLOCK_WIDTH);
if (((((!((_local29 == _local23))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local23 * Block.SMALL_BLOCK_WIDTH), (_local24 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
} else {
_local29 = ((_local19 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_WIDTH);
_local28 = ((_local20 + (2 * Ball.RADIUS)) / Block.SMALL_BLOCK_HEIGHT);
if ((((((((_local29 < NR_OF_COLUMNS)) && (!((_local29 == _local23))))) && (!((_local28 == _local24))))) && (!((board[_local28][_local29] == 0))))){
_local35 = new Point((_local29 * Block.SMALL_BLOCK_WIDTH), (_local28 * Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) <= Ball.RADIUS){
destroyBlock(blocks[(board[_local28][_local29] - 1)], (_local2 + _local4), _local4, ball);
if (activeBallBonus != Block.BONUS_FIRE_BALL){
ball.collideWithCorner(_local35);
};
};
};
};
};
};
};
};
};
_local10 = 0;
while (_local10 < mobileBlocks.length) {
_local40 = new Collision();
_local15 = mobileBlocks[_local10];
if ((((_local15.y > (_local20 + (2 * Ball.RADIUS)))) || (((_local15.y + Block.SMALL_BLOCK_HEIGHT) < _local20)))){
} else {
if ((((_local15.x > (_local19 + (2 * Ball.RADIUS)))) || (((_local15.x + Block.SMALL_BLOCK_HEIGHT) < _local19)))){
} else {
if ((((((((_local19 < (_local15.x + Block.SMALL_BLOCK_WIDTH))) && ((_local19 > _local15.x)))) && (((_local20 + Ball.RADIUS) > _local15.y)))) && (((_local20 + Ball.RADIUS) < (_local15.y + Block.SMALL_BLOCK_HEIGHT))))){
if ((ball.directionVector.x * _local15.mobileDirection) <= 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.changeX = true;
_local19 = ((_local15.x + Block.SMALL_BLOCK_WIDTH) + ((_local15.x + Block.SMALL_BLOCK_WIDTH) - _local19));
};
_local40.mBlockIndex = _local10;
_local13.push(_local40);
} else {
if (((((((((_local19 + (2 * Ball.RADIUS)) > _local15.x)) && ((_local19 < _local15.x)))) && (((_local20 + Ball.RADIUS) > _local15.y)))) && (((_local20 + Ball.RADIUS) < (_local15.y + Block.SMALL_BLOCK_HEIGHT))))){
if ((ball.directionVector.x * _local15.mobileDirection) <= 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.changeX = true;
_local19 = ((_local15.x - ((_local19 + (2 * Ball.RADIUS)) - _local15.x)) - (2 * Ball.RADIUS));
};
_local40.mBlockIndex = _local10;
_local13.push(_local40);
} else {
if (((((((((_local20 + (2 * Ball.RADIUS)) > _local15.y)) && ((_local20 < _local15.y)))) && (((_local19 + Ball.RADIUS) > _local15.x)))) && (((_local19 + Ball.RADIUS) < (_local15.x + Block.SMALL_BLOCK_WIDTH))))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.changeY = true;
_local20 = ((_local15.y - ((_local20 + (2 * Ball.RADIUS)) - _local15.y)) - (2 * Ball.RADIUS));
};
_local40.mBlockIndex = _local10;
_local13.push(_local40);
} else {
if ((((((((_local20 < (_local15.y + Block.SMALL_BLOCK_WIDTH))) && ((_local20 > _local15.y)))) && (((_local19 + Ball.RADIUS) > _local15.x)))) && (((_local19 + Ball.RADIUS) < (_local15.x + Block.SMALL_BLOCK_HEIGHT))))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.changeY = true;
_local20 = ((_local15.y + Block.SMALL_BLOCK_WIDTH) + ((_local15.y + Block.SMALL_BLOCK_WIDTH) - _local20));
};
_local40.mBlockIndex = _local10;
_local13.push(_local40);
} else {
_local25 = new Point((_local19 + Ball.RADIUS), (_local20 + Ball.RADIUS));
_local35 = new Point(_local15.x, _local15.y);
if (Point.distance(_local25, _local35) <= Ball.RADIUS){
_local40.mBlockIndex = _local10;
if ((((ball.directionVector.x >= 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x >= 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x < 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) > 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
};
};
};
_local13.push(_local40);
} else {
_local35 = new Point((_local15.x + Block.SMALL_BLOCK_WIDTH), _local15.y);
if (Point.distance(_local35, _local25) < Ball.RADIUS){
_local40.mBlockIndex = _local10;
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x > 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) > 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
};
};
};
_local13.push(_local40);
} else {
_local35 = new Point(_local15.x, (_local15.y + Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) < Ball.RADIUS){
_local40.mBlockIndex = _local10;
if ((((ball.directionVector.x >= 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x >= 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x < 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) > 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
};
};
};
_local13.push(_local40);
} else {
_local35 = new Point((_local15.x + Block.SMALL_BLOCK_WIDTH), (_local15.y + Block.SMALL_BLOCK_HEIGHT));
if (Point.distance(_local35, _local25) < Ball.RADIUS){
_local40.mBlockIndex = _local10;
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x <= 0)) && ((ball.directionVector.y > 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) < 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
} else {
if ((((ball.directionVector.x > 0)) && ((ball.directionVector.y < 0)))){
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) || (_local15.steel))){
_local40.corner = _local35;
};
if ((ball.directionVector.x * _local15.mobileDirection) > 0){
_local15.mobileDirection = (_local15.mobileDirection * -1);
};
};
};
};
_local13.push(_local40);
};
};
};
};
};
};
};
};
};
};
_local10++;
};
while (_local13.length > 0) {
_local40 = _local13.shift();
destroyBlock(mobileBlocks[_local40.mBlockIndex], (_local2 + _local4), _local4, ball);
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) && (_local40.changeX))){
ball.directionVector.x = (ball.directionVector.x * -1);
};
if (((!((activeBallBonus == Block.BONUS_FIRE_BALL))) && (_local40.changeY))){
ball.directionVector.y = (ball.directionVector.y * -1);
};
if (((((((!((activeBallBonus == Block.BONUS_FIRE_BALL))) && (!(_local40.changeX)))) && (!(_local40.changeY)))) && (!((_local40.corner == null))))){
ball.collideWithCorner(_local40.corner);
};
};
if (splitHappened){
if (Math.abs((splitBalls[0].directionVector.x - splitBalls[1].directionVector.x)) < 0.1){
_local32 = ((splitBalls[1].directionVector.x * Math.cos(dgToRadian(10))) - (splitBalls[1].directionVector.y * Math.sin(dgToRadian(10))));
_local33 = ((splitBalls[1].directionVector.x * Math.sin(dgToRadian(10))) + (splitBalls[1].directionVector.y * Math.cos(dgToRadian(10))));
_local31 = Math.abs(radianToDg(Math.atan((_local33 / _local32))));
if (_local31 < 25){
_local32 = ((splitBalls[1].directionVector.x * Math.cos(dgToRadian(-10))) - (splitBalls[1].directionVector.y * Math.sin(dgToRadian(-10))));
_local33 = ((splitBalls[1].directionVector.x * Math.sin(dgToRadian(-10))) + (splitBalls[1].directionVector.y * Math.cos(dgToRadian(-10))));
};
splitBalls[1].directionVector.x = _local32;
splitBalls[1].directionVector.y = _local33;
};
splitHappened = false;
};
ball.x = _local19;
ball.y = _local20;
if (fireParticles.length > 0){
moveParticle(_local9);
};
if (activeBallBonus == Block.BONUS_FIRE_BALL){
createParticles(_local9);
};
if (activeBallBonus == Block.BONUS_VANISHING_BALL){
ball.blend(_local9);
};
if (platform.hit){
platform.shake(_local9);
};
_local14++;
};
};
_local4 = (_local4 + _local9);
};
if (activeBallBonus == Block.BONUS_FIRE_BALL){
createParticles(-1);
};
if (blockParticles.length > 0){
moveSmashedBlocksParticles(_local8);
};
_local10 = 0;
while (_local10 < animationsPlaying.length) {
_local41 = animationsPlaying[_local10];
if (!_local41.updateAnimation(_local8)){
removeChild(_local41);
removeFromArray(animationsPlaying, _local41);
_local10--;
};
_local10++;
};
date = new Date();
Main.movePlain(_local8);
if (((!((activePlatformBonus == Block.BONUS_NONE))) && (Main.platformBonusTimeBar.updateTime(((_local2 + _local8) - activePlatformBonusStartTime))))){
finishBonus(activePlatformBonus);
};
if (((((!((activeBallBonus == Block.BONUS_NONE))) && (!((activeBallBonus == Block.BONUS_SPLIT_BALL))))) && (Main.ballBonusTimeBar.updateTime(((_local2 + _local8) - activeBallBonusStartTime))))){
finishBonus(activeBallBonus);
};
if (Main.updateTime(_local8)){
dispatchEvent(new Event(GAME_LOST));
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
return;
};
lastAction = date.getTime();
}
private function addBlocksToDisplayList():void{
while (blocksToAdd.length > 0) {
addChild(blocksToAdd.pop());
};
}
private function startCountDownAnimationFinished(_arg1:Event):void{
Main.instance.removeEventListener(Main.COUNTDOWN_FINISHED, startCountDownAnimationFinished);
addEventListener(Event.ENTER_FRAME, boardFadeOut, false, 0, true);
fadeBoardTimer = new Date().getTime();
}
private function getMBlockAt(_arg1:int, _arg2:int):Block{
var _local4:Block;
var _local3:int;
while (_local3 < mobileBlocks.length) {
_local4 = mobileBlocks[_local3];
if ((((_local4.gridColumn == _arg2)) && ((_local4.gridRow == _arg1)))){
return (_local4);
};
_local3++;
};
return (null);
}
private function pause(_arg1:MouseEvent=null):void{
paused = !(paused);
if (paused){
Main.pausePlaneSound();
} else {
Main.resumePlaneSound();
};
}
public static function dgToRadian(_arg1:Number):Number{
return (((_arg1 * 3.14) / 180));
}
public static function radianToDg(_arg1:Number):Number{
return (((_arg1 * 180) / 3.14));
}
}
}//package
Section 257
//Board_CHAIN_PNG (Board_CHAIN_PNG)
package {
import mx.core.*;
public class Board_CHAIN_PNG extends BitmapAsset {
}
}//package
Section 258
//Board_font (Board_font)
package {
import mx.core.*;
public class Board_font extends FontAsset {
}
}//package
Section 259
//Board_LIFE_LOST (Board_LIFE_LOST)
package {
import mx.core.*;
public class Board_LIFE_LOST extends SoundAsset {
}
}//package
Section 260
//Board_PAPER_CARD_PNG (Board_PAPER_CARD_PNG)
package {
import mx.core.*;
public class Board_PAPER_CARD_PNG extends BitmapAsset {
}
}//package
Section 261
//Collision (Collision)
package {
import flash.geom.*;
public class Collision {
public var mBlockIndex:int;// = -1
public var corner:Point;
public var changeX:Boolean;// = false
public var changeY:Boolean;// = false
}
}//package
Section 262
//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 263
//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 264
//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 265
//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 266
//FallingBonus (FallingBonus)
package {
import flash.geom.*;
import flash.media.*;
import flash.display.*;
public class FallingBonus extends Sprite {
public var pWidth:int;
public var pHeight:int;
public var type:int;
private var bonusImg:Bitmap;
private var bonusShadow:Bitmap;
public static const SPEED:int = 3;
public static const STAR_SOUND:Sound = new STAR();
private static const CHAIN_BONUS_PNG:Class = FallingBonus_CHAIN_BONUS_PNG;
private static const LIFE_BONUS_PNG:Class = FallingBonus_LIFE_BONUS_PNG;
private static const QUESTION_MARK_BONUS_PNG:Class = FallingBonus_QUESTION_MARK_BONUS_PNG;
private static const EXTRA_LIFE:Class = FallingBonus_EXTRA_LIFE;
private static const SHRINK_BONUS_PNG:Class = FallingBonus_SHRINK_BONUS_PNG;
private static const STAR:Class = FallingBonus_STAR;
public static const EXTRA_LIFE_SOUND:Sound = new EXTRA_LIFE();
private static const STAR_BONUS_PNG:Class = FallingBonus_STAR_BONUS_PNG;
private static const GROW_BONUS_PNG:Class = FallingBonus_GROW_BONUS_PNG;
public function FallingBonus(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean=false):void{
this.x = _arg1;
this.y = _arg2;
this.type = _arg3;
if (_arg4){
bonusImg = ((_arg3 == Block.BONUS_STAR)) ? new STAR_BONUS_PNG() : new QUESTION_MARK_BONUS_PNG();
bonusShadow = ((_arg3 == Block.BONUS_STAR)) ? new STAR_BONUS_PNG() : new QUESTION_MARK_BONUS_PNG();
} else {
switch (_arg3){
case Block.BONUS_SHRINK_PLATFORM:
bonusImg = new SHRINK_BONUS_PNG();
bonusShadow = new SHRINK_BONUS_PNG();
break;
case Block.BONUS_GROW_PLATFORM:
bonusImg = new GROW_BONUS_PNG();
bonusShadow = new GROW_BONUS_PNG();
break;
case Block.BONUS_CHAIN:
bonusImg = new CHAIN_BONUS_PNG();
bonusShadow = new CHAIN_BONUS_PNG();
break;
case Block.BONUS_LIFE:
bonusImg = new LIFE_BONUS_PNG();
bonusShadow = new LIFE_BONUS_PNG();
break;
case Block.BONUS_STAR:
bonusImg = new STAR_BONUS_PNG();
bonusShadow = new STAR_BONUS_PNG();
break;
};
};
pWidth = bonusImg.width;
pHeight = bonusImg.height;
var _local5:ColorTransform = new ColorTransform(0, 0, 0, 1, -255, -255, -255);
bonusShadow.bitmapData.colorTransform(new Rectangle(0, 0, bonusImg.width, bonusImg.height), _local5);
bonusShadow.x = 4;
bonusShadow.y = 8;
bonusShadow.alpha = 0.3;
addChild(bonusShadow);
addChild(bonusImg);
}
public function move(_arg1:int):void{
y = (y + ((SPEED * _arg1) / 31));
}
}
}//package
Section 267
//FallingBonus_CHAIN_BONUS_PNG (FallingBonus_CHAIN_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_CHAIN_BONUS_PNG extends BitmapAsset {
}
}//package
Section 268
//FallingBonus_EXTRA_LIFE (FallingBonus_EXTRA_LIFE)
package {
import mx.core.*;
public class FallingBonus_EXTRA_LIFE extends SoundAsset {
}
}//package
Section 269
//FallingBonus_GROW_BONUS_PNG (FallingBonus_GROW_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_GROW_BONUS_PNG extends BitmapAsset {
}
}//package
Section 270
//FallingBonus_LIFE_BONUS_PNG (FallingBonus_LIFE_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_LIFE_BONUS_PNG extends BitmapAsset {
}
}//package
Section 271
//FallingBonus_QUESTION_MARK_BONUS_PNG (FallingBonus_QUESTION_MARK_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_QUESTION_MARK_BONUS_PNG extends BitmapAsset {
}
}//package
Section 272
//FallingBonus_SHRINK_BONUS_PNG (FallingBonus_SHRINK_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_SHRINK_BONUS_PNG extends BitmapAsset {
}
}//package
Section 273
//FallingBonus_STAR (FallingBonus_STAR)
package {
import mx.core.*;
public class FallingBonus_STAR extends SoundAsset {
}
}//package
Section 274
//FallingBonus_STAR_BONUS_PNG (FallingBonus_STAR_BONUS_PNG)
package {
import mx.core.*;
public class FallingBonus_STAR_BONUS_PNG extends BitmapAsset {
}
}//package
Section 275
//FireParticle (FireParticle)
package {
import flash.geom.*;
import flash.display.*;
public class FireParticle extends Sprite {
public var directionVector:Point;
private var img:Bitmap;
public var speed:Number;
private var fp03Img:Bitmap;
private var fp02Img:Bitmap;
private var fp01Img:Bitmap;
public var alphaDelta:Number;
private var fp04Img:Bitmap;
public static const FIRE_PARTICLE_01:Class = FireParticle_FIRE_PARTICLE_01;
public static const FIRE_PARTICLE_02:Class = FireParticle_FIRE_PARTICLE_02;
public static const FIRE_PARTICLE_03:Class = FireParticle_FIRE_PARTICLE_03;
public static const FIRE_PARTICLE_04:Class = FireParticle_FIRE_PARTICLE_04;
public function FireParticle(){
directionVector = new Point();
fp02Img = new FIRE_PARTICLE_02();
fp01Img = new FIRE_PARTICLE_01();
fp03Img = new FIRE_PARTICLE_03();
fp04Img = new FIRE_PARTICLE_04();
img = fp01Img;
super();
addChild(img);
}
public function fade():void{
alpha = (alpha - alphaDelta);
}
public function move(_arg1:Number):void{
x = (x + (((speed * directionVector.x) * _arg1) / 31));
y = (y + (((speed * directionVector.y) * _arg1) / 31));
}
public function setTo(_arg1:Class):void{
removeChild(img);
if (_arg1 == FIRE_PARTICLE_04){
alphaDelta = 0.12;
img = fp04Img;
} else {
if (_arg1 == FIRE_PARTICLE_03){
alphaDelta = 0.1;
img = fp03Img;
} else {
if (_arg1 == FIRE_PARTICLE_02){
alphaDelta = 0.15;
img = fp02Img;
} else {
if (_arg1 == FIRE_PARTICLE_01){
alphaDelta = 0.34;
img = fp01Img;
};
};
};
};
addChild(img);
}
}
}//package
Section 276
//FireParticle_FIRE_PARTICLE_01 (FireParticle_FIRE_PARTICLE_01)
package {
import mx.core.*;
public class FireParticle_FIRE_PARTICLE_01 extends BitmapAsset {
}
}//package
Section 277
//FireParticle_FIRE_PARTICLE_02 (FireParticle_FIRE_PARTICLE_02)
package {
import mx.core.*;
public class FireParticle_FIRE_PARTICLE_02 extends BitmapAsset {
}
}//package
Section 278
//FireParticle_FIRE_PARTICLE_03 (FireParticle_FIRE_PARTICLE_03)
package {
import mx.core.*;
public class FireParticle_FIRE_PARTICLE_03 extends BitmapAsset {
}
}//package
Section 279
//FireParticle_FIRE_PARTICLE_04 (FireParticle_FIRE_PARTICLE_04)
package {
import mx.core.*;
public class FireParticle_FIRE_PARTICLE_04 extends BitmapAsset {
}
}//package
Section 280
//GLPreloader (GLPreloader)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class GLPreloader extends MovieClip {
private var card:Bitmap;
private var bg:Bitmap;
private var loading:TextField;
private static const CARD:Class = GLPreloader_CARD;
private static const font:Class = GLPreloader_font;
private static const BG_PNG:Class = GLPreloader_BG_PNG;
public static var format:TextFormat;
public function GLPreloader(){
var _local1:TextFormat;
loading = new TextField();
super();
stop();
_local1 = new TextFormat();
bg = new BG_PNG();
card = new CARD();
loading = new TextField();
card.x = ((720 - card.width) / 2);
card.y = ((600 - card.height) / 2);
_local1 = new TextFormat();
_local1.font = "Journal";
_local1.size = 40;
_local1.align = TextFormatAlign.CENTER;
_local1.color = 0;
loading.selectable = false;
loading.embedFonts = true;
loading.defaultTextFormat = _local1;
loading.text = "Loading... 0%";
loading.autoSize = TextFieldAutoSize.CENTER;
loading.x = (card.x + ((card.width - loading.width) / 2));
loading.y = (card.y + ((card.height - loading.height) / 2));
addChild(bg);
addChild(card);
addChild(loading);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
private function onProgress(_arg1:ProgressEvent):void{
var _local2:Number = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
loading.text = (("Loading... " + Math.round((_local2 * 100))) + "%");
}
private function onComplete(_arg1:Event):void{
var _local3:Object;
loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
removeChild(bg);
removeChild(card);
removeChild(loading);
bg = null;
card = null;
loading = null;
nextFrame();
var _local2:Class = Class(getDefinitionByName("Main"));
if (_local2){
_local3 = new (_local2);
addChild((_local3 as DisplayObject));
_local3.init(null);
};
}
}
}//package
Section 281
//GLPreloader_BG_PNG (GLPreloader_BG_PNG)
package {
import mx.core.*;
public class GLPreloader_BG_PNG extends BitmapAsset {
}
}//package
Section 282
//GLPreloader_CARD (GLPreloader_CARD)
package {
import mx.core.*;
public class GLPreloader_CARD extends BitmapAsset {
}
}//package
Section 283
//GLPreloader_font (GLPreloader_font)
package {
import mx.core.*;
public class GLPreloader_font extends FontAsset {
}
}//package
Section 284
//HighScoresGUI (HighScoresGUI)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class HighScoresGUI extends Sprite {
private var msgText:TextField;
private var continueText:TextField;
private var nameText:TextField;
private static const MAX_CHARS:int = 12;
private static const PAPER_CARD_PNG:Class = HighScoresGUI_PAPER_CARD_PNG;
public function HighScoresGUI(_arg1:Function){
msgText = new TextField();
nameText = new TextField();
continueText = new TextField();
super();
addChild(new PAPER_CARD_PNG());
Menu.format.color = 0;
msgText.selectable = false;
msgText.embedFonts = true;
msgText.defaultTextFormat = Menu.format;
msgText.multiline = true;
msgText.wordWrap = true;
msgText.x = 10;
msgText.y = 20;
msgText.width = (this.width - 20);
msgText.height = 200;
msgText.text = (("You scored " + Main.points) + "!\nEnter you name below");
addChild(msgText);
nameText.embedFonts = true;
nameText.defaultTextFormat = Menu.format;
nameText.x = 10;
nameText.y = 130;
nameText.width = (width - 20);
nameText.maxChars = MAX_CHARS;
nameText.type = TextFieldType.INPUT;
nameText.selectable = true;
addChild(nameText);
continueText.selectable = false;
continueText.embedFonts = true;
continueText.defaultTextFormat = Menu.format;
continueText.text = "Continue";
continueText.autoSize = TextFieldAutoSize.CENTER;
continueText.x = ((width - continueText.width) / 2);
continueText.y = 190;
continueText.addEventListener(MouseEvent.MOUSE_OVER, Menu.onMouseOver);
continueText.addEventListener(MouseEvent.MOUSE_OUT, Menu.onMouseOut);
continueText.addEventListener(MouseEvent.CLICK, _arg1);
addChild(continueText);
x = (Main.MENU_X + ((Board.WIDTH - width) / 2));
y = (Main.MENU_Y + ((Board.HEIGHT - height) / 2));
}
public function showSendOk(_arg1:int):void{
msgText.text = "Your score has been saved.\n";
removeChild(nameText);
continueText.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OUT));
}
public function showSendFailed():void{
msgText.text = "Problem connecting to database. Highscore has not been saved.";
removeChild(nameText);
continueText.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OUT));
}
private function getEnd(_arg1:int):String{
switch (_arg1){
case 1:
return ("st");
case 2:
return ("nd");
case 3:
return ("rd");
default:
return ("th");
};
}
public function getName():String{
return (nameText.text);
}
public function focusOnName():void{
stage.focus = nameText;
}
public function removeContListeners(_arg1:Function):void{
continueText.removeEventListener(MouseEvent.CLICK, _arg1);
continueText.removeEventListener(MouseEvent.MOUSE_OVER, Menu.onMouseOver);
continueText.removeEventListener(MouseEvent.MOUSE_OUT, Menu.onMouseOut);
}
public function addContListeners(_arg1:Function):void{
continueText.addEventListener(MouseEvent.CLICK, _arg1);
continueText.addEventListener(MouseEvent.MOUSE_OVER, Menu.onMouseOver);
continueText.addEventListener(MouseEvent.MOUSE_OUT, Menu.onMouseOut);
}
}
}//package
Section 285
//HighScoresGUI_PAPER_CARD_PNG (HighScoresGUI_PAPER_CARD_PNG)
package {
import mx.core.*;
public class HighScoresGUI_PAPER_CARD_PNG extends BitmapAsset {
}
}//package
Section 286
//HighscoresManager (HighscoresManager)
package {
import flash.events.*;
import libs.com.gamelion.utils.*;
import flash.errors.*;
public class HighscoresManager extends EventDispatcher {
private const gameId:int = 6;
private var testedScore:int;
private var highScoreSystem:HighScoresSystem;
public static const SCORE_IS_TOP_10:String = "ScoreTop10";
private static const SERVER_ADRESS:String = "http://www.playlion.com/amfphp/gateway.php";
public static const HIGHSCORE_CONN_ERROR:String = "DatabaseConnError";
public static const SCORE_IS_NOT_TOP_10:String = "ScoreNotTop10";
private static var _highscoresManager:HighscoresManager;
public function HighscoresManager(_arg1:Function=null){
if (_arg1 != getInstance){
throw (new IllegalOperationError("This class is a singleton class"));
};
highScoreSystem = new HighScoresSystem(SERVER_ADRESS);
}
private function onScoresSaved(_arg1:HighScoreSavedEvent):void{
highScoreSystem.removeEventListener(HighScoreSavedEvent.COMPLETE, onScoresSaved);
highScoreSystem.removeEventListener(HighScoresSystem.SAVE_SCORES_ERROR, onSaveScoresError);
highScoreSystem.removeEventListener(HighScoresSystem.CONN_ERROR, onSaveScoresError);
dispatchEvent(new HighScoreSavedEvent(HighScoreSavedEvent.COMPLETE, 0));
}
public function sendScore(_arg1:int, _arg2:String):void{
highScoreSystem.addEventListener(HighScoreSavedEvent.COMPLETE, onScoresSaved, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.SAVE_SCORES_ERROR, onSaveScoresError, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.CONN_ERROR, onSaveScoresError, false, 0, true);
highScoreSystem.saveScore(gameId, _arg2, _arg1, HighScoresSystem.DESCENDING_ORDER);
}
private function onSaveScoresError(_arg1:Event):void{
highScoreSystem.removeEventListener(HighScoreSavedEvent.COMPLETE, onScoresSaved);
highScoreSystem.removeEventListener(HighScoresSystem.SAVE_SCORES_ERROR, onSaveScoresError);
highScoreSystem.removeEventListener(HighScoresSystem.CONN_ERROR, onSaveScoresError);
dispatchEvent(new Event(HIGHSCORE_CONN_ERROR));
}
public function isScoreTop10(_arg1:int):void{
testedScore = _arg1;
highScoreSystem.addEventListener(HighScoreRceivedEvent.TOP_SCORES, onScoreTest, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.GET_SCORES_ERROR, onGetScoresError, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.CONN_ERROR, onGetScoresError, false, 0, true);
highScoreSystem.getTopScores(gameId, 10, HighScoresSystem.DESCENDING_ORDER);
}
private function onGetScoresError(_arg1:Event):void{
highScoreSystem.removeEventListener(HighScoreRceivedEvent.TOP_SCORES, onScoreTest);
highScoreSystem.removeEventListener(HighScoresSystem.GET_SCORES_ERROR, onGetScoresError);
highScoreSystem.removeEventListener(HighScoresSystem.CONN_ERROR, onGetScoresError);
dispatchEvent(new Event(SCORE_IS_NOT_TOP_10));
}
public function cleanTop10Listeners(_arg1:Function, _arg2:Function):void{
highScoreSystem.removeEventListener(HighScoreRceivedEvent.TOP_SCORES, _arg1);
highScoreSystem.removeEventListener(HighScoresSystem.GET_SCORES_ERROR, _arg2);
highScoreSystem.removeEventListener(HighScoresSystem.CONN_ERROR, _arg2);
}
private function onScoreTest(_arg1:HighScoreRceivedEvent):void{
highScoreSystem.removeEventListener(HighScoreRceivedEvent.TOP_SCORES, onScoreTest);
highScoreSystem.removeEventListener(HighScoresSystem.GET_SCORES_ERROR, onGetScoresError);
highScoreSystem.removeEventListener(HighScoresSystem.CONN_ERROR, onGetScoresError);
if ((((_arg1.highScores.length < 10)) || ((_arg1.highScores[9].score < testedScore)))){
dispatchEvent(new Event(SCORE_IS_TOP_10));
} else {
dispatchEvent(new Event(SCORE_IS_NOT_TOP_10));
};
}
public function getTop10(_arg1:Function, _arg2:Function):void{
highScoreSystem.addEventListener(HighScoreRceivedEvent.TOP_SCORES, _arg1, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.GET_SCORES_ERROR, _arg2, false, 0, true);
highScoreSystem.addEventListener(HighScoresSystem.CONN_ERROR, _arg2, false, 0, true);
highScoreSystem.getTopScores(gameId, 10, HighScoresSystem.DESCENDING_ORDER);
}
public static function getInstance():HighscoresManager{
if (_highscoresManager == null){
_highscoresManager = new HighscoresManager(getInstance);
};
return (_highscoresManager);
}
}
}//package
Section 287
//Main (Main)
package {
import flash.events.*;
import libs.com.gamelion.utils.*;
import mp3Player.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class Main extends Sprite {
private const COUNTDOWN_ANIM_TIME:int = 5000;
private var countDownStartTime:Number;
private var starsSprite:Sprite;
private var timeFloat:Number;
private var card:Bitmap;
private var pointsGoal:Number;
private var starsImg:Bitmap;
public var hScoreMgr:HighscoresManager;
private var levelLoader:URLLoader;
private var timeStep:Number;
private var loading:TextField;
private var starHudImg:Bitmap;
private var nextFadeOut:Number;// = 0
private var pointsFloat:Number;
private var bg:Bitmap;
private var hScoreGui:HighScoresGUI;
private var lastCountDownFrame:Number;
private var pointsStep:Number;
private var menu:Menu;
private var board:Board;
private var levelListXml:XML;
private var format:TextFormat;
private static const STARS_PNG:Class = Main_STARS_PNG;
public static const BG_PNG:Class = Main_BG_PNG;
private static const CARD:Class = Main_CARD;
private static const PRELOADER_BG_PNG:Class = Main_PRELOADER_BG_PNG;
public static const LEVEL_PATH:String = "http://www.playlion.com/games/arkanoid2/levels/";
public static const HEIGHT:int = 600;
public static const ADV_BG_4_PNG:Class = Main_ADV_BG_4_PNG;
public static const ADV_BG_2_PNG:Class = Main_ADV_BG_2_PNG;
private static const font:Class = Main_font;
public static const MENU_X:int = 151;
public static const MENU_Y:int = 76;
public static const WIDTH:int = 750;
public static const ADV_BG_1_PNG:Class = Main_ADV_BG_1_PNG;
public static const ADV_BG_3_PNG:Class = Main_ADV_BG_3_PNG;
public static const ADV_BG_5_PNG:Class = Main_ADV_BG_5_PNG;
private static const STAR_HUD_PNG:Class = Main_STAR_HUD_PNG;
private static const preloaderFont:Class = Main_preloaderFont;
public static const COUNTDOWN_FINISHED:String = "countdownFinished";
public static var platformBonusIcon:Sprite;
private static var lives:TextField = new TextField();
private static var ballBonusIconImg:Bitmap;
public static var loopLevels:Boolean = false;
public static var livesNumber:int = 3;
private static var bgImg:Bitmap;
private static var plane:Plane = new Plane();
public static var starImages:Array;
private static var platformBonusIconImg:Bitmap;
private static var level:TextField = new TextField();
public static var ballBonusTimeBar:TimeBar;
private static var adventureObjectives:Array = new Array();
public static var currentLevel:int = 1;
private static var score:TextField = new TextField();
public static var instance:Main;
private static var adventureLevels:Array = new Array();
private static var classicLevels:Array = new Array();
public static var mp3PlayerInstance:SoundPlayer;
private static var time:TextField = new TextField();
public static var currentTable:int = -1;
private static var sTime:int;
public static var points:int = 0;
public static var format:TextFormat;
public static var ballBonusIcon:Sprite;
public static var platformBonusTimeBar:TimeBar;
public function Main():void{
format = new TextFormat();
levelLoader = new URLLoader();
super();
}
private function gameFinished(_arg1:Event):void{
plane.alpha = 0;
mp3PlayerInstance.stopLoopSound();
board.removeEventListener(Board.GAME_FINISHED, gameFinished);
board.showLoadingMsg();
nextFadeOut = (new Date().getTime() + Menu.FADE_OUT_DELAY);
hScoreMgr.addEventListener(HighscoresManager.SCORE_IS_NOT_TOP_10, processHighScore);
hScoreMgr.addEventListener(HighscoresManager.SCORE_IS_TOP_10, processHighScore);
hScoreMgr.isScoreTop10(points);
}
private function showLevelsPreloader():void{
var _local1:TextFormat;
_local1 = new TextFormat();
bg = new PRELOADER_BG_PNG();
card = new CARD();
card.x = ((720 - card.width) / 2);
card.y = ((600 - card.height) / 2);
_local1 = new TextFormat();
_local1.font = "Journal";
_local1.size = 40;
_local1.align = TextFormatAlign.CENTER;
_local1.color = 0;
loading = new TextField();
loading.selectable = false;
loading.embedFonts = true;
loading.defaultTextFormat = _local1;
loading.text = "Loading menu...";
loading.autoSize = TextFieldAutoSize.CENTER;
loading.x = (card.x + ((card.width - loading.width) / 2));
loading.y = (card.y + ((card.height - loading.height) / 2));
addChild(bg);
addChild(card);
addChild(loading);
}
public function getTableObjectives(_arg1:int):String{
var _local2:String;
switch (_arg1){
case 0:
_local2 = (((("You must pass all " + (adventureLevels[_arg1] as Array).length) + " levels \nin ") + adventureObjectives[_arg1].levelTime) + " seconds");
break;
case 1:
_local2 = (((("You must pass all " + (adventureLevels[_arg1] as Array).length) + " levels \nin ") + adventureObjectives[_arg1].levelTime) + " seconds\nLook out for the plane!");
break;
case 2:
_local2 = "Now you must gather at least 3 stars to pass each level";
break;
case 3:
_local2 = "Can you do it when stars are hidden?";
break;
case 4:
_local2 = "Now each bonus is a surprise.\nRemember about the stars.";
break;
};
return (_local2);
}
public function clearStars():void{
var _local1:int;
while (_local1 < starImages.length) {
if (starsSprite.contains(starImages[_local1])){
starsSprite.removeChild(starImages[_local1]);
};
_local1++;
};
}
public function init(_arg1):void{
MochiBot.track(this, "b1cbbc7a");
instance = this;
levelLoader.addEventListener(Event.COMPLETE, levelListLoaded);
levelLoader.load(new URLRequest((LEVEL_PATH + "level_list.xml")));
hScoreMgr = HighscoresManager.getInstance();
trace("Started loading levels list...");
showLevelsPreloader();
}
private function getTable(_arg1:Event):int{
if (_arg1.type == Menu.START_ADVENTURE_1){
return (0);
};
if (_arg1.type == Menu.START_ADVENTURE_2){
return (1);
};
if (_arg1.type == Menu.START_ADVENTURE_3){
return (2);
};
if (_arg1.type == Menu.START_ADVENTURE_4){
return (3);
};
if (_arg1.type == Menu.START_ADVENTURE_5){
return (4);
};
return (-1);
}
public function switchBg(_arg1:Class):void{
var _local2:Bitmap = bgImg;
bgImg = new (_arg1);
addChild(bgImg);
swapChildren(bgImg, _local2);
removeChild(_local2);
if (_arg1 == BG_PNG){
clearBonusIcons();
} else {
showBonusIcon(true, Block.NO_BONUS_PNG);
showBonusIcon(false, Block.NO_BONUS_PNG);
};
}
private function saveFailed(_arg1:Event):void{
board.hideLoadingMsg();
addChild(hScoreGui);
hScoreGui.showSendFailed();
hScoreMgr.removeEventListener(HighScoreSavedEvent.COMPLETE, savedOk);
hScoreMgr.removeEventListener(HighscoresManager.HIGHSCORE_CONN_ERROR, saveFailed);
hScoreGui.addContListeners(proceedToMenu);
}
private function addStartGameListeners():void{
menu.addEventListener(Menu.START_CLASSIC, startClassic, false, 0, true);
menu.addEventListener(Menu.START_ADVENTURE_1, startAdventure, false, 0, true);
menu.addEventListener(Menu.START_ADVENTURE_2, startAdventure, false, 0, true);
menu.addEventListener(Menu.START_ADVENTURE_3, startAdventure, false, 0, true);
menu.addEventListener(Menu.START_ADVENTURE_4, startAdventure, false, 0, true);
menu.addEventListener(Menu.START_ADVENTURE_5, startAdventure, false, 0, true);
}
private function showYouLostScreen(_arg1:Event):void{
removeEventListener(Menu.FADE_OUT_FINISHED, showYouLostScreen);
menu = new Menu(true);
menu.x = MENU_X;
menu.y = MENU_Y;
addChild(menu);
menu.showYouLostScreen();
addStartGameListeners();
}
public function startCountDownAnimation(_arg1:int):void{
if (_arg1 == 0){
dispatchEvent(new Event(COUNTDOWN_FINISHED));
return;
};
timeStep = (getTime() / COUNTDOWN_ANIM_TIME);
pointsStep = (_arg1 / COUNTDOWN_ANIM_TIME);
pointsGoal = (points + _arg1);
addEventListener(Event.ENTER_FRAME, countDown, false, 0, true);
countDownStartTime = new Date().getTime();
lastCountDownFrame = countDownStartTime;
pointsFloat = points;
timeFloat = getTime();
}
private function gameLost(_arg1:Event):void{
mp3PlayerInstance.stopLoopSound();
board.removeEventListener(Board.GAME_LOST, gameLost);
nextFadeOut = (new Date().getTime() + Menu.FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOutBoard);
addEventListener(Menu.FADE_OUT_FINISHED, showYouLostScreen);
}
private function savedOk(_arg1:HighScoreSavedEvent):void{
board.hideLoadingMsg();
addChild(hScoreGui);
hScoreGui.showSendOk(0);
hScoreMgr.removeEventListener(HighScoreSavedEvent.COMPLETE, savedOk);
hScoreMgr.removeEventListener(HighscoresManager.HIGHSCORE_CONN_ERROR, saveFailed);
hScoreGui.addContListeners(proceedToMenu);
}
private function proceedToMenu(_arg1:Event):void{
removeChild(hScoreGui);
hScoreGui.removeContListeners(proceedToMenu);
hScoreGui = null;
nextFadeOut = (new Date().getTime() + Menu.FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOutBoard);
addEventListener(Menu.FADE_OUT_FINISHED, showHighscoresAfterClassic);
}
private function gameWon(_arg1:Event):void{
mp3PlayerInstance.stopLoopSound();
board.removeEventListener(Board.GAME_WON, gameWon);
nextFadeOut = (new Date().getTime() + Menu.FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOutBoard);
addEventListener(Menu.FADE_OUT_FINISHED, showYouWonScreen);
}
private function startAdventure(_arg1:Event):void{
removeStartGameListeners();
currentLevel = 1;
currentTable = getTable(_arg1);
level.text = "1";
board = new Board(("" + adventureLevels[currentTable][0]), adventureObjectives[currentTable].starsHidden, adventureObjectives[currentTable].bonusesHidden);
board.removeEventListener(Board.GAME_FINISHED, gameFinished);
board.addEventListener(Board.GAME_WON, gameWon);
board.addEventListener(Board.GAME_LOST, gameLost);
board.y = MENU_Y;
board.x = MENU_X;
board.alpha = 0;
removeChild(menu);
menu = null;
addChild(board);
plane.x = -1000;
plane.y = -1000;
plane.alpha = 1;
addChild(plane);
}
private function removeStartGameListeners():void{
menu.removeEventListener(Menu.START_CLASSIC, startClassic);
menu.removeEventListener(Menu.START_ADVENTURE_1, startAdventure);
menu.removeEventListener(Menu.START_ADVENTURE_2, startAdventure);
menu.removeEventListener(Menu.START_ADVENTURE_3, startAdventure);
menu.removeEventListener(Menu.START_ADVENTURE_4, startAdventure);
menu.removeEventListener(Menu.START_ADVENTURE_5, startAdventure);
}
private function startClassic(_arg1:Event):void{
removeStartGameListeners();
currentLevel = 1;
currentTable = -1;
level.text = "1";
board = new Board(("" + classicLevels[0]));
board.addEventListener(Board.GAME_FINISHED, gameFinished);
board.removeEventListener(Board.GAME_WON, gameWon);
board.removeEventListener(Board.GAME_LOST, gameLost);
board.y = MENU_Y;
board.x = MENU_X;
board.alpha = 0;
removeChild(menu);
menu = null;
addChild(board);
plane.reset();
addChild(plane);
if (contains(starsSprite)){
removeChild(starsSprite);
};
}
private function fadeOutBoard(_arg1:Event):void{
var _local2:int = ((new Date().getTime() - nextFadeOut) / Menu.FADE_OUT_DELAY);
if (_local2 < 0){
return;
};
nextFadeOut = (nextFadeOut + (Menu.FADE_OUT_DELAY * (_local2 + 1)));
board.alpha = (board.alpha - (0.1 * (_local2 + 1)));
plane.alpha = (plane.alpha - 0.1);
if (board.alpha <= 0){
removeChild(board);
removeChild(plane);
board = null;
removeEventListener(Event.ENTER_FRAME, fadeOutBoard);
dispatchEvent(new Event(Menu.FADE_OUT_FINISHED));
};
}
public function hideHUD():void{
if (contains(lives)){
removeChild(lives);
};
if (contains(score)){
removeChild(score);
};
if (contains(level)){
removeChild(level);
};
if (contains(time)){
removeChild(time);
};
if (contains(starsSprite)){
removeChild(starsSprite);
};
}
private function showHighscoresAfterClassic(_arg1:Event):void{
removeEventListener(Menu.FADE_OUT_FINISHED, showHighscoresAfterClassic);
menu = new Menu(true);
menu.x = MENU_X;
menu.y = MENU_Y;
addChild(menu);
menu.showHighscoresAfterClassic();
addStartGameListeners();
}
public function parseLevelListXml(_arg1:XML):Boolean{
var _local5:String;
var _local6:TableInfo;
var _local7:int;
if (_arg1.child("classic") == null){
return (false);
};
if (_arg1.child("adventure") == null){
return (false);
};
var _local2:XMLList = _arg1.child("classic").child("level");
if (_local2.length() == 0){
return (false);
};
var _local3:int;
while (_local3 < _local2.length()) {
_local5 = _local2[_local3];
classicLevels.push(_local5);
_local3++;
};
if (_arg1.classsic.child("loop") != null){
_local5 = _arg1.classic.loop;
if (_local5.match("true")){
loopLevels = true;
};
};
var _local4:XMLList = _arg1.child("adventure").child("table");
if (_local4.length() == 0){
return (false);
};
_local3 = 0;
while (_local3 < _local4.length()) {
_local6 = new TableInfo(_local4[_local3].time);
if (_local4[_local3].child("stars_needed").length() > 0){
_local6.starsNeeded = _local4[_local3].stars_needed;
};
if (_local4[_local3].child("stars_hidden").length() > 0){
if (String(_local4[_local3].stars_hidden).match("true")){
_local6.starsHidden = true;
};
};
if (_local4[_local3].child("bonuses_hidden").length() > 0){
if (String(_local4[_local3].bonuses_hidden).match("true")){
_local6.bonusesHidden = true;
};
};
adventureObjectives[_local3] = _local6;
adventureLevels[_local3] = new Array();
_local2 = _local4[_local3].child("level");
if (_local2.length() == 0){
return (false);
};
_local7 = 0;
while (_local7 < _local2.length()) {
_local5 = _local2[_local7];
(adventureLevels[_local3] as Array).push(_local5);
_local7++;
};
_local3++;
};
return (true);
}
private function countDown(_arg1:Event):void{
var _local2:Number = (new Date().getTime() - countDownStartTime);
if (_local2 >= COUNTDOWN_ANIM_TIME){
removeEventListener(Event.ENTER_FRAME, countDown);
score.text = ("" + pointsGoal);
points = pointsGoal;
startTime();
updateTime(0);
dispatchEvent(new Event(COUNTDOWN_FINISHED));
} else {
_local2 = (new Date().getTime() - lastCountDownFrame);
pointsFloat = (pointsFloat + (pointsStep * _local2));
timeFloat = (timeFloat - (timeStep * _local2));
updateScore((pointsFloat - points));
updateTime((timeFloat - getTime()));
};
lastCountDownFrame = new Date().getTime();
}
private function showYouWonScreen(_arg1:Event):void{
removeEventListener(Menu.FADE_OUT_FINISHED, showYouWonScreen);
menu = new Menu(true);
menu.x = MENU_X;
menu.y = MENU_Y;
addChild(menu);
menu.showYouWonScreen((currentTable + 1));
addStartGameListeners();
}
private function processHighScore(_arg1:Event):void{
board.hideLoadingMsg();
hScoreMgr.removeEventListener(HighscoresManager.SCORE_IS_NOT_TOP_10, processHighScore);
hScoreMgr.removeEventListener(HighscoresManager.SCORE_IS_TOP_10, processHighScore);
if (_arg1.type == HighscoresManager.SCORE_IS_TOP_10){
hScoreGui = new HighScoresGUI(sendScore);
hScoreGui.x = (MENU_X + ((Board.WIDTH - hScoreGui.width) / 2));
hScoreGui.y = (MENU_Y + ((Board.HEIGHT - hScoreGui.height) / 2));
addChild(hScoreGui);
hScoreGui.focusOnName();
} else {
nextFadeOut = (new Date().getTime() + Menu.FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOutBoard);
addEventListener(Menu.FADE_OUT_FINISHED, showHighscoresAfterClassic);
};
}
private function startMusic(_arg1:Event):void{
mp3PlayerInstance.removeEventListener(SoundPlayer.INIT_COMPLETED, startMusic);
mp3PlayerInstance.play();
}
private function levelListLoaded(_arg1:Event):void{
trace("Levels list loaded...");
hideLevelsPrealoder();
levelListXml = new XML(_arg1.target.data);
if (!parseLevelListXml(levelListXml)){
throw (new Error("problem parsing level list"));
};
format.font = "BorisBlackBloxx";
format.size = 15;
format.align = TextFormatAlign.RIGHT;
format.color = 0xFFFFFF;
level.selectable = false;
level.embedFonts = true;
level.defaultTextFormat = format;
score.selectable = false;
score.embedFonts = true;
score.defaultTextFormat = format;
lives.selectable = false;
lives.embedFonts = true;
lives.defaultTextFormat = format;
format.align = TextFormatAlign.LEFT;
time.selectable = false;
time.embedFonts = true;
time.defaultTextFormat = format;
bgImg = new BG_PNG();
addChild(bgImg);
starsImg = new STARS_PNG();
starsSprite = new Sprite();
starsSprite.y = 232;
starsSprite.x = 32;
starsSprite.addChild(starsImg);
starImages = new Array();
starHudImg = new STAR_HUD_PNG();
starHudImg.x = -2;
starHudImg.y = 2;
starImages.push(starHudImg);
starHudImg = new STAR_HUD_PNG();
starHudImg.x = 20;
starHudImg.y = 0;
starImages.push(starHudImg);
starHudImg = new STAR_HUD_PNG();
starHudImg.x = 43;
starHudImg.y = -2;
starImages.push(starHudImg);
mp3PlayerInstance = SoundPlayer.getInstance();
mp3PlayerInstance.addEventListener(SoundPlayer.INIT_COMPLETED, startMusic);
mp3PlayerInstance.x = (WIDTH - 125);
mp3PlayerInstance.y = 2;
addChild(mp3PlayerInstance);
createMenu(null);
level.rotation = -4;
level.text = "1";
level.x = 10;
level.y = 268;
score.rotation = -4;
score.text = "0";
score.x = 15;
score.y = 303;
lives.rotation = 14;
lives.text = ("" + livesNumber);
lives.x = 15;
lives.y = 335;
time.rotation = 12;
time.text = "00:00";
time.x = 55;
time.y = 383;
platformBonusTimeBar = new TimeBar(32, 6);
platformBonusTimeBar.x = 21;
platformBonusTimeBar.y = 221;
platformBonusTimeBar.rotation = -6;
addChild(platformBonusTimeBar);
ballBonusTimeBar = new TimeBar(32, 6);
ballBonusTimeBar.x = 69;
ballBonusTimeBar.y = 215;
ballBonusTimeBar.rotation = -6;
addChild(ballBonusTimeBar);
addChild(menu);
platformBonusIcon = new Sprite();
ballBonusIcon = new Sprite();
platformBonusIcon.x = 18;
platformBonusIcon.y = 186;
platformBonusIcon.rotation = -6;
ballBonusIcon.x = 66;
ballBonusIcon.y = 180;
ballBonusIcon.rotation = -6;
addChild(platformBonusIcon);
addChild(ballBonusIcon);
platformBonusIcon.visible = false;
ballBonusIcon.visible = false;
platformBonusTimeBar.visible = false;
ballBonusTimeBar.visible = false;
}
public function showStar(_arg1:int):void{
if (_arg1 <= starImages.length){
starsSprite.addChild(starImages[(_arg1 - 1)]);
};
}
public function prepareHUD(_arg1:int):void{
if (_arg1 >= 0){
lives.text = "3";
score.text = "0";
level.text = "1";
sTime = (adventureObjectives[_arg1].levelTime * 1000);
updateTime(0);
if (adventureObjectives[_arg1].starsNeeded > 0){
clearStars();
if (!contains(starsSprite)){
addChild(starsSprite);
};
} else {
if (contains(starsSprite)){
removeChild(starsSprite);
};
};
} else {
lives.text = "6";
score.text = "0";
level.text = "1";
time.text = "00:00";
};
addChild(lives);
addChild(score);
addChild(level);
addChild(time);
}
private function sendScore(_arg1:Event):void{
if (hScoreGui.getName().length == 0){
hScoreGui.focusOnName();
return;
};
removeChild(hScoreGui);
hScoreGui.removeContListeners(sendScore);
hScoreMgr.addEventListener(HighScoreSavedEvent.COMPLETE, savedOk);
hScoreMgr.addEventListener(HighscoresManager.HIGHSCORE_CONN_ERROR, saveFailed);
board.showLoadingMsg();
hScoreMgr.sendScore(points, hScoreGui.getName());
}
private function createMenu(_arg1:Event):void{
removeEventListener(Menu.FADE_OUT_FINISHED, createMenu);
menu = new Menu();
menu.x = MENU_X;
menu.y = MENU_Y;
addChild(menu);
addStartGameListeners();
}
private function hideLevelsPrealoder():void{
removeChild(bg);
removeChild(card);
removeChild(loading);
}
public static function isAdventure():Boolean{
if (currentTable > -1){
return (true);
};
return (false);
}
public static function resumePlaneSound():void{
plane.resumeSound();
}
public static function setPlaneRandomFactor(_arg1:Number):void{
plane.SpawnTimeRandomRange = _arg1;
}
public static function updateTime(_arg1:Number):Boolean{
if (isAdventure()){
sTime = (sTime - _arg1);
} else {
sTime = (sTime + _arg1);
};
var _local2:int = (sTime / 1000);
var _local3:int = (_local2 / 60);
var _local4:int = (_local2 % 60);
var _local5:String = ((_local3 < 10)) ? ("0" + _local3) : ("" + _local3);
var _local6:String = ((_local4 < 10)) ? ("0" + _local4) : ("" + _local4);
time.text = ((("" + _local5) + ":") + _local6);
if (((isAdventure()) && ((sTime <= 0)))){
return (true);
};
return (false);
}
public static function getTime():int{
return (sTime);
}
public static function setPlaneSpeedModifier(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 1;
};
plane.speedModifier = _arg1;
}
public static function getStarsNeeded():int{
if (isAdventure() == false){
return (0);
};
return (adventureObjectives[currentTable].starsNeeded);
}
public static function updateScore(_arg1:int):void{
if (isAdventure()){
if (int((points / 1500)) != int(((points + _arg1) / 1500))){
mp3PlayerInstance.playSound(FallingBonus.EXTRA_LIFE_SOUND);
livesNumber++;
updateLives();
};
};
points = (points + _arg1);
score.text = ("" + Main.points);
}
public static function resetPlane():void{
plane.reset();
}
public static function nextLevel():String{
var _local1:Array = ((currentTable == -1)) ? classicLevels : adventureLevels[currentTable];
var _local2:Boolean = ((currentTable == -1)) ? Main.loopLevels : false;
if (currentLevel == _local1.length){
if (_local2){
currentLevel = 1;
level.text = "1";
return (_local1[0]);
};
return (null);
} else {
if (isAdventure()){
Main.instance.clearStars();
};
level.text = ("" + ++currentLevel);
};
return (!NULL!);
}
public static function startTime():void{
if (!isAdventure()){
sTime = 0;
} else {
if (currentLevel == 1){
sTime = (adventureObjectives[currentTable].levelTime * 1000);
};
};
}
public static function setPlaneAlpha(_arg1:Number):void{
plane.alpha = _arg1;
}
public static function clearBonusIcons(_arg1:Boolean=false):void{
if (!_arg1){
platformBonusIcon.visible = false;
ballBonusIcon.visible = false;
};
platformBonusTimeBar.visible = false;
ballBonusTimeBar.visible = false;
}
public static function movePlain(_arg1:int):void{
plane.move(_arg1);
}
public static function getTableBg(_arg1:int):Class{
switch (_arg1){
case 0:
return (ADV_BG_1_PNG);
case 1:
return (ADV_BG_2_PNG);
case 2:
return (ADV_BG_3_PNG);
case 3:
return (ADV_BG_4_PNG);
case 4:
return (ADV_BG_5_PNG);
default:
return (BG_PNG);
};
}
public static function pausePlaneSound():void{
plane.pauseSound();
}
public static function showBonusIcon(_arg1:Boolean, _arg2:Class):void{
if (_arg1){
if (platformBonusIconImg != null){
platformBonusIcon.removeChild(platformBonusIconImg);
};
platformBonusIconImg = new (_arg2);
platformBonusIcon.addChild(platformBonusIconImg);
platformBonusIconImg.smoothing = true;
platformBonusIcon.visible = true;
if (_arg2 == Block.NO_BONUS_PNG){
platformBonusIcon.x = 18;
} else {
platformBonusIcon.x = 20;
};
} else {
if (ballBonusIconImg != null){
ballBonusIcon.removeChild(ballBonusIconImg);
};
ballBonusIconImg = new (_arg2);
ballBonusIcon.addChild(ballBonusIconImg);
ballBonusIconImg.smoothing = true;
ballBonusIcon.visible = true;
if (_arg2 == Block.NO_BONUS_PNG){
ballBonusIcon.x = 66;
} else {
ballBonusIcon.x = 68;
};
};
}
public static function updateLives():void{
lives.text = ("" + livesNumber);
}
}
}//package
Section 288
//Main_ADV_BG_1_PNG (Main_ADV_BG_1_PNG)
package {
import mx.core.*;
public class Main_ADV_BG_1_PNG extends BitmapAsset {
}
}//package
Section 289
//Main_ADV_BG_2_PNG (Main_ADV_BG_2_PNG)
package {
import mx.core.*;
public class Main_ADV_BG_2_PNG extends BitmapAsset {
}
}//package
Section 290
//Main_ADV_BG_3_PNG (Main_ADV_BG_3_PNG)
package {
import mx.core.*;
public class Main_ADV_BG_3_PNG extends BitmapAsset {
}
}//package
Section 291
//Main_ADV_BG_4_PNG (Main_ADV_BG_4_PNG)
package {
import mx.core.*;
public class Main_ADV_BG_4_PNG extends BitmapAsset {
}
}//package
Section 292
//Main_ADV_BG_5_PNG (Main_ADV_BG_5_PNG)
package {
import mx.core.*;
public class Main_ADV_BG_5_PNG extends BitmapAsset {
}
}//package
Section 293
//Main_BG_PNG (Main_BG_PNG)
package {
import mx.core.*;
public class Main_BG_PNG extends BitmapAsset {
}
}//package
Section 294
//Main_CARD (Main_CARD)
package {
import mx.core.*;
public class Main_CARD extends BitmapAsset {
}
}//package
Section 295
//Main_font (Main_font)
package {
import mx.core.*;
public class Main_font extends FontAsset {
}
}//package
Section 296
//Main_PRELOADER_BG_PNG (Main_PRELOADER_BG_PNG)
package {
import mx.core.*;
public class Main_PRELOADER_BG_PNG extends BitmapAsset {
}
}//package
Section 297
//Main_preloaderFont (Main_preloaderFont)
package {
import mx.core.*;
public class Main_preloaderFont extends FontAsset {
}
}//package
Section 298
//Main_STAR_HUD_PNG (Main_STAR_HUD_PNG)
package {
import mx.core.*;
public class Main_STAR_HUD_PNG extends BitmapAsset {
}
}//package
Section 299
//Main_STARS_PNG (Main_STARS_PNG)
package {
import mx.core.*;
public class Main_STARS_PNG extends BitmapAsset {
}
}//package
Section 300
//Menu (Menu)
package {
import flash.events.*;
import libs.com.gamelion.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.display.*;
import gs.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class Menu extends Sprite {
private const noAdds:Boolean = false;
private const s:String = "Programming: Sokol Slawomir";
private const sequence:Array;
private var logoImg:Bitmap;
private var table5Img:Bitmap;
private var instr2Img:Bitmap;
private var fadeInArray:Array;
private var table1:Sprite;
private var offsetX:Number;
private var offsetY:Number;
private var playLionImg:Bitmap;
private var play:TextField;
private var instrImg:Bitmap;
private var domekImg:Bitmap;
private var loading:TextField;
private var bgImg:Bitmap;
private var backPositions:Array;
public var PAPER_Y:int;
private var fadeOutArray:Array;
private var reset:TextField;
private var objectives:TextField;
private var playLionSprite:Sprite;
private var table3Img:Bitmap;
private var animLastFrame:Number;// = 0
private var loadingTimer:Timer;
private var fadeInProcess:Boolean;// = false
private var glLogoImg:Bitmap;
private var top10Names:TextField;
private var top10Scores:TextField;
private var rubberAnimDirectionV:Point;
private var msg:TextField;
private var playLionSprite2:Sprite;
private var tableSelected:int;// = -1
private var nextFadeIn:Number;
private var table1Img:Bitmap;
private var menuItems:Array;
private var forMoreGames:TextField;
private var yellowHighlight:Sprite;
private var inClassic:Boolean;// = false
private var rubber:Sprite;
private var startingClasssic:Boolean;// = false
public var lockedBitmaps:Array;
private var highlight:Sprite;
private var table4Img:Bitmap;
private var nextFadeOut:Number;
private var playLionText:TextField;
private var nextPrev:TextField;
private var seqIndex:int;// = 0
private var top10Header:TextField;
private var back:TextField;
private var top10Img:Bitmap;
private var next:TextField;
private var tablesArray:Array;
private var zoomInValue:Number;
private var rubberImg:Bitmap;
private var table2Img:Bitmap;
private static const INTRO_FINISHED:String = "introFinished";
public static const FADE_IN_FINISHED:String = "fadeInFinished";
public static const FADE_OUT_DELAY:int = 30;
private static const PLAY_LION_PNG:Class = Menu_PLAY_LION_PNG;
private static const BG_PNG:Class = Menu_BG_PNG;
private static const INSTRUCTION_BACK:int = 2;
public static const FONT_SIZE_SMALL:int = 20;
private static const INSTR_PNG:Class = Menu_INSTR_PNG;
public static const START_ADVENTURE_1:String = "startAdventure1";
public static const START_ADVENTURE_2:String = "startAdventure2";
public static const HEIGHT:int = 480;
public static const START_ADVENTURE_4:String = "startAdventure4";
public static const START_ADVENTURE_5:String = "startAdventure5";
private static const menuItemsHandlers:Array = ["adventure", "classic", "highscores", "instructions", "moreGames"];
public static const START_ADVENTURE_3:String = "startAdventure3";
private static const TABLE_3_PNG:Class = Menu_TABLE_3_PNG;
private static const MOER_GAMES_BACK:int = 4;
private static const TOP_10_PNG:Class = Menu_TOP_10_PNG;
private static const MENU_SOUND:Class = Menu_MENU_SOUND;
private static const TABLE_5_PNG:Class = Menu_TABLE_5_PNG;
private static const TABLE_1_PNG:Class = Menu_TABLE_1_PNG;
public static const FADE_OUT_FINISHED:String = "fadeOutFinished";
private static const INSTR_2_PNG:Class = Menu_INSTR_2_PNG;
private static const ADV_LEVEL_LOST:String = "You failed.
Maybe next time you will have better luck.";
private static const OBJECTIVE_BACK:int = 3;
private static const font:Class = Menu_font;
private static const HOUSE_PNG:Class = Menu_HOUSE_PNG;
private static const HIGHSCORES_BACK:int = 1;
private static const ADV_LEVEL_WON:String = "Congratulations!
You made it!
Try the next room now.";
private static const LOCKED_SMALL:Class = Menu_LOCKED_SMALL;
public static const START_CLASSIC:String = "statrClassic";
private static const LOGO_PNG:Class = Menu_LOGO_PNG;
public static const FONT_SIZE_MEDIUM:int = 30;
public static const menuItemsStrings:Array = ["Adventure Mode", "Classic Mode", "Best Scores", "Instructions", "More Games"];
public static const WIDTH:int = 450;
private static const TABLE_2_PNG:Class = Menu_TABLE_2_PNG;
private static const TABLE_4_PNG:Class = Menu_TABLE_4_PNG;
public static const GAP:int = 10;
public static const ZOOM_TIME:Number = 1.5;
private static const GL_LOGO:Class = Menu_GL_LOGO;
private static const ADVENTURE_BACK:int = 0;
private static const ADV_LAST_LEVEL_WON:String = "Congratulations!!
You made it through all the tables!";
private static const LOCKED_WIDE:Class = Menu_LOCKED_WIDE;
private static const menuSound:Sound = new MENU_SOUND();
public static const FONT_SIZE:int = 40;
private static const RUBBER_PNG:Class = Menu_RUBBER_PNG;
public static var CENTER:int = -1;
private static var LOCKED_WIDE_WIDTH:int;
private static var LOCKED_SMALL_WIDTH:int;
private static var firstRun:Boolean = true;
private static var tablesLocked:Array = [false, true, true, true, true];
public static var format:TextFormat = new TextFormat();
public function Menu(_arg1:Boolean=false){
var _local5:TextField;
rubber = new Sprite();
back = new TextField();
reset = new TextField();
objectives = new TextField();
play = new TextField();
next = new TextField();
top10Names = new TextField();
top10Scores = new TextField();
top10Header = new TextField();
loading = new TextField();
msg = new TextField();
forMoreGames = new TextField();
playLionText = new TextField();
nextPrev = new TextField();
backPositions = new Array();
tablesArray = new Array();
menuItems = new Array();
fadeOutArray = new Array();
fadeInArray = new Array();
lockedBitmaps = new Array();
sequence = [65, 85, 84, 72, 79, 82];
super();
initGraphic();
addChild(playLionSprite);
addChild(bgImg);
var _local2:Number = ((((HEIGHT + logoImg.y) + logoImg.height) - (menuItemsStrings.length * FONT_SIZE)) - ((menuItemsStrings.length - 1) * GAP));
_local2 = ((_local2 / 2) - 20);
var _local3:int = (noAdds) ? (menuItemsStrings.length - 1) : menuItemsStrings.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = new TextField();
_local5.selectable = false;
_local5.embedFonts = true;
_local5.defaultTextFormat = format;
_local5.text = menuItemsStrings[_local4];
_local5.autoSize = TextFieldAutoSize.CENTER;
_local5.addEventListener(MouseEvent.CLICK, this[menuItemsHandlers[_local4]], false, 0, true);
_local5.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
_local5.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
_local5.y = ((_local2 + (_local4 * FONT_SIZE)) + (_local4 * GAP));
_local5.x = ((WIDTH - _local5.width) / 2);
_local5.alpha = 0;
if (!_arg1){
addChild(_local5);
};
menuItems.push(_local5);
_local4++;
};
if (!_arg1){
addEventListener(Event.ADDED_TO_STAGE, onAdded);
};
}
private function startTimer(_arg1:Event):void{
loadingTimer = new Timer(1200, 0);
loadingTimer.start();
loadingTimer.addEventListener(TimerEvent.TIMER, startFadeOut, false, 0, true);
}
private function zoomOutFinished():void{
fadeInProcess = false;
if (tableSelected >= 0){
showObjectives();
} else {
if (startingClasssic){
startAnim(null);
} else {
if (inClassic){
showMenu();
inClassic = false;
} else {
showAdventure(null);
};
};
};
}
private function adventure(_arg1):void{
if (((fadeInProcess) || (firstRun))){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeOutArray.push(menuItems[_local2]);
_local2++;
};
startFadeOut();
addEventListener(FADE_OUT_FINISHED, showAdventure);
}
private function showHighscores(_arg1:HighScoreRceivedEvent):void{
var _local3:int;
Main.instance.hScoreMgr.cleanTop10Listeners(showHighscores, connFailed);
if (contains(loading)){
removeChild(loading);
};
top10Img.alpha = 0;
addChild(top10Img);
var _local2:Point = backPositions[HIGHSCORES_BACK];
back.x = _local2.x;
back.y = _local2.y;
back.alpha = 0;
addChild(back);
addChild(top10Header);
if (((!((_arg1 == null))) && (!((_arg1.highScores == null))))){
top10Names.text = "";
top10Scores.text = "";
_local3 = 0;
while (_local3 < _arg1.highScores.length) {
top10Names.appendText((("" + _arg1.highScores[_local3].name) + "\n"));
top10Scores.appendText((("" + _arg1.highScores[_local3].score) + "\n"));
_local3++;
};
addChild(top10Names);
addChild(top10Scores);
};
fadeInArray = new Array();
fadeInArray.push(top10Img);
fadeInArray.push(back);
fadeInArray.push(top10Names);
fadeInArray.push(top10Scores);
fadeInArray.push(top10Header);
startFadeIn();
addEventListener(FADE_IN_FINISHED, setHighscores);
}
private function setInstructions(_arg1:Event):void{
removeEventListener(FADE_IN_FINISHED, setInstructions);
back.addEventListener(MouseEvent.CLICK, hideInstruction);
}
private function hideHighscores(_arg1:Event):void{
if (fadeInProcess){
return;
};
back.removeEventListener(MouseEvent.CLICK, hideHighscores);
fadeOutArray = new Array();
fadeOutArray.push(top10Img);
fadeOutArray.push(back);
fadeOutArray.push(top10Names);
fadeOutArray.push(top10Scores);
fadeOutArray.push(top10Header);
nextFadeOut = (new Date().getTime + FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOut);
if (inClassic){
addEventListener(FADE_OUT_FINISHED, startZoomIn);
} else {
addEventListener(FADE_OUT_FINISHED, showMenu);
};
}
public function showYouLostScreen():void{
animLastFrame = new Date().getTime();
fadeInArray = new Array();
fadeInArray.push(logoImg);
fadeInArray.push(objectives);
fadeInArray.push(next);
fadeOutArray.push(objectives);
fadeOutArray.push(next);
if (!contains(logoImg)){
addChild(logoImg);
};
logoImg.alpha = 0;
if (!contains(objectives)){
addChild(objectives);
};
objectives.alpha = 0;
objectives.text = ADV_LEVEL_LOST;
next.alpha = 0;
next.addEventListener(MouseEvent.CLICK, startFadeOut);
addChild(next);
tableSelected = -1;
zoomInValue = 3;
offsetX = -800;
offsetY = -600;
addEventListener(Event.ENTER_FRAME, menuIntro);
addEventListener(INTRO_FINISHED, startFadeIn);
addEventListener(FADE_OUT_FINISHED, startZoomIn);
}
private function resetLocked(_arg1:MouseEvent):void{
var _local3:Bitmap;
var _local4:Point;
var _local5:Sprite;
fadeInArray = new Array();
var _local2:int = (tablesLocked.length - 1);
while (_local2 > 0) {
if (tablesLocked[_local2] == false){
_local3 = ((_local2)!=(tablesLocked.length - 1)) ? new LOCKED_SMALL() : new LOCKED_WIDE();
_local4 = getLockedPosition(_local2);
_local3.x = _local4.x;
_local3.y = _local4.y;
_local3.alpha = 0;
tablesLocked[_local2] = true;
addChild(_local3);
_local3.alpha = 0;
lockedBitmaps.push(_local3);
fadeInArray.push(_local3);
_local5 = tablesArray[_local2];
_local5.removeEventListener(MouseEvent.MOUSE_OVER, advOnMouseOver);
_local5.removeEventListener(MouseEvent.MOUSE_OUT, advOnMouseOut);
_local5.removeEventListener(MouseEvent.CLICK, advOnClick);
_local5.buttonMode = false;
};
_local2--;
};
if (fadeInArray.length > 0){
startFadeIn();
addEventListener(FADE_IN_FINISHED, clearFadeIn);
};
}
private function fadeOut(_arg1:Event):void{
var _local4:DisplayObject;
var _local2:Boolean;
var _local3:int = ((new Date().getTime() - nextFadeOut) / FADE_OUT_DELAY);
if (_local3 < 0){
return;
};
if (_local3 == 0){
_local3 = 1;
};
nextFadeOut = (nextFadeOut + (FADE_OUT_DELAY * _local3));
for each (_local4 in fadeOutArray) {
_local4.alpha = (_local4.alpha - (0.1 * _local3));
if (_local4.alpha <= 0){
if (contains(_local4)){
removeChild(_local4);
};
} else {
_local2 = false;
};
};
if (_local2){
removeEventListener(Event.ENTER_FRAME, fadeOut);
dispatchEvent(new Event(FADE_OUT_FINISHED));
};
}
private function setHighscores(_arg1:Event):void{
removeEventListener(FADE_IN_FINISHED, setHighscores);
back.addEventListener(MouseEvent.CLICK, hideHighscores);
}
private function hideObjectives(_arg1:MouseEvent):void{
if (fadeInProcess){
return;
};
back.removeEventListener(MouseEvent.CLICK, hideObjectives);
fadeOutArray = new Array();
fadeOutArray.push(objectives);
fadeOutArray.push(play);
fadeOutArray.push(back);
tableSelected = -1;
startFadeOut();
zoomInValue = 3;
offsetX = -800;
offsetY = -600;
addEventListener(FADE_OUT_FINISHED, startZoomIn);
}
private function getLockedPosition(_arg1:int):Point{
var _local2:Sprite = tablesArray[_arg1];
if (_arg1 == 4){
return (new Point((_local2.x + ((_local2.width - LOCKED_WIDE_WIDTH) / 2)), (_local2.y - 8)));
};
return (new Point((_local2.x + ((_local2.width - LOCKED_SMALL_WIDTH) / 2)), (_local2.y - 8)));
}
private function hideMoreGames(_arg1:Event):void{
if (fadeInProcess){
return;
};
removeEventListener(FADE_OUT_FINISHED, startFadeIn);
back.removeEventListener(MouseEvent.CLICK, hideMoreGames);
fadeOutArray = new Array();
fadeOutArray.push(forMoreGames);
fadeOutArray.push(playLionSprite2);
fadeOutArray.push(playLionText);
fadeOutArray.push(back);
startFadeOut();
addEventListener(FADE_OUT_FINISHED, showMenu);
}
private function highscores(_arg1):void{
if (((fadeInProcess) || (firstRun))){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeOutArray.push(menuItems[_local2]);
_local2++;
};
fadeOutArray.push(logoImg);
startFadeOut();
addEventListener(FADE_OUT_FINISHED, getTop10);
}
public function menuIntro(_arg1:Event):void{
var _local2:Number = (new Date().getTime() - animLastFrame);
bgImg.y = (bgImg.y - (_local2 / 3));
if (bgImg.y <= PAPER_Y){
bgImg.y = PAPER_Y;
removeEventListener(Event.ENTER_FRAME, menuIntro);
fadeInProcess = true;
dispatchEvent(new Event(INTRO_FINISHED));
};
animLastFrame = new Date().getTime();
}
public function showHighscoresAfterClassic():void{
animLastFrame = new Date().getTime();
inClassic = true;
tableSelected = -1;
zoomInValue = 3;
offsetX = -800;
offsetY = -600;
addEventListener(Event.ENTER_FRAME, menuIntro);
addEventListener(INTRO_FINISHED, getTop10);
}
private function showObjectives():void{
objectives.alpha = 0;
play.alpha = 0;
addChild(objectives);
addChild(play);
var _local1:Point = backPositions[OBJECTIVE_BACK];
back.x = _local1.x;
back.y = _local1.y;
back.alpha = 0;
back.addEventListener(MouseEvent.CLICK, hideObjectives);
addChild(back);
fadeInArray = new Array();
fadeInArray.push(objectives);
fadeInArray.push(back);
fadeInArray.push(play);
startFadeIn();
}
private function advOnMouseOver(_arg1:MouseEvent):void{
var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target);
highlight.scaleX = (_local2.width / 213);
highlight.scaleY = (_local2.height / 41);
highlight.x = _local2.x;
highlight.y = _local2.y;
addChild(highlight);
swapChildren(highlight, _local2);
}
private function showInstructions(_arg1:Event):void{
removeEventListener(FADE_OUT_FINISHED, showInstructions);
instrImg.alpha = 0;
addChild(instrImg);
var _local2:Point = backPositions[INSTRUCTION_BACK];
back.x = _local2.x;
back.y = _local2.y;
back.alpha = 0;
addChild(back);
nextPrev.alpha = 0;
addChild(nextPrev);
fadeInArray = new Array();
fadeInArray.push(instrImg);
fadeInArray.push(back);
fadeInArray.push(nextPrev);
startFadeIn();
addEventListener(FADE_IN_FINISHED, setInstructions);
}
private function moreGames(_arg1):void{
if (((fadeInProcess) || (firstRun))){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeOutArray.push(menuItems[_local2]);
_local2++;
};
back.x = backPositions[MOER_GAMES_BACK].x;
back.y = backPositions[MOER_GAMES_BACK].y;
back.addEventListener(MouseEvent.CLICK, hideMoreGames);
back.alpha = 0;
addChild(forMoreGames);
addChild(playLionSprite2);
addChild(playLionText);
addChild(back);
fadeInArray = new Array();
fadeInArray.push(forMoreGames);
fadeInArray.push(playLionSprite2);
fadeInArray.push(playLionText);
fadeInArray.push(back);
startFadeOut();
addEventListener(FADE_OUT_FINISHED, startFadeIn);
}
private function onAdded(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
animLastFrame = new Date().getTime();
addEventListener(Event.ENTER_FRAME, menuIntro);
fadeInProcess = true;
if (firstRun){
addChild(glLogoImg);
fadeInArray = new Array();
fadeInArray.push(glLogoImg);
fadeOutArray = new Array();
fadeOutArray.push(glLogoImg);
addEventListener(INTRO_FINISHED, startFadeIn);
addEventListener(FADE_IN_FINISHED, startTimer);
addEventListener(FADE_OUT_FINISHED, showMenu);
} else {
addEventListener(INTRO_FINISHED, showMenu);
};
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
}
private function startZoomIn(_arg1:Event):void{
fadeInProcess = true;
removeEventListener(FADE_OUT_FINISHED, startZoomIn);
TweenLite.to(parent, ZOOM_TIME, {scaleX:zoomInValue, scaleY:zoomInValue, x:offsetX, y:offsetY, onComplete:zoomInFinished});
}
private function startFadeOut(_arg1:Event=null):void{
fadeInProcess = true;
nextFadeOut = (new Date().getTime() + FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOut);
}
private function advOnMouseOut(_arg1:MouseEvent):void{
removeChild(highlight);
}
private function getTop10(_arg1:Event):void{
removeEventListener(FADE_OUT_FINISHED, getTop10);
addChild(loading);
Main.instance.hScoreMgr.getTop10(showHighscores, connFailed);
}
private function drawAnim(_arg1:Event):void{
var _local2:Number = (new Date().getTime() - animLastFrame);
if ((bgImg.y + this.y) < Main.HEIGHT){
bgImg.y = (bgImg.y + (_local2 / 3));
} else {
if (rubberAnimDirectionV == null){
rubberAnimDirectionV = new Point((Board.PLATFORM_START_POS_X - rubber.x), (Board.PLATFORM_POS_Y - rubber.y));
};
if ((rubber.y - Board.PLATFORM_POS_Y) > 2){
rubber.x = (rubber.x + (((rubberAnimDirectionV.x * 0.08) * _local2) / 31));
rubber.y = (rubber.y + (((rubberAnimDirectionV.y * 0.08) * _local2) / 31));
if ((rubber.y - Board.PLATFORM_POS_Y) <= 2){
rubber.y = Board.PLATFORM_POS_Y;
rubber.x = Board.PLATFORM_START_POS_X;
};
if (rubber.rotation < 0){
rubber.rotation = (rubber.rotation + (_local2 / 7));
if (rubber.rotation > 0){
rubber.rotation = 0;
};
};
} else {
if (rubber.scaleX > 0.5){
rubber.scaleX = (rubber.scaleX - ((0.02 * _local2) / 31));
rubber.scaleY = (rubber.scaleY - ((0.02 * _local2) / 31));
} else {
removeEventListener(Event.ENTER_FRAME, drawAnim);
switch (tableSelected){
case 0:
dispatchEvent(new Event(START_ADVENTURE_1));
return;
case 1:
dispatchEvent(new Event(START_ADVENTURE_2));
return;
case 2:
dispatchEvent(new Event(START_ADVENTURE_3));
return;
case 3:
dispatchEvent(new Event(START_ADVENTURE_4));
return;
case 4:
dispatchEvent(new Event(START_ADVENTURE_5));
return;
default:
dispatchEvent(new Event(START_CLASSIC));
return;
};
};
};
};
animLastFrame = new Date().getTime();
}
private function clearFadeIn(_arg1:Event):void{
removeEventListener(FADE_IN_FINISHED, clearFadeIn);
}
private function connFailed(_arg1:Event):void{
removeChild(loading);
showHighscores(null);
}
private function classic(_arg1):void{
if (((fadeInProcess) || (firstRun))){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeOutArray.push(menuItems[_local2]);
_local2++;
};
fadeOutArray.push(logoImg);
startFadeOut();
zoomInValue = 3;
offsetX = -800;
offsetY = -600;
startingClasssic = true;
addEventListener(FADE_OUT_FINISHED, startZoomIn);
}
private function startAnim(_arg1:Event):void{
removeEventListener(FADE_OUT_FINISHED, startAnim);
animLastFrame = new Date().getTime();
addEventListener(Event.ENTER_FRAME, drawAnim);
}
private function showAdventure(_arg1:Event):void{
var _local2:Bitmap;
var _local5:Sprite;
var _local6:Point;
lockedBitmaps = new Array();
fadeInArray = new Array();
removeEventListener(FADE_OUT_FINISHED, showAdventure);
domekImg.alpha = 0;
addChild(domekImg);
fadeInArray.push(domekImg);
var _local3:int = (tablesArray.length - 1);
while (_local3 >= 0) {
_local5 = tablesArray[_local3];
_local5.alpha = 0;
if (!tablesLocked[_local3]){
_local5.buttonMode = true;
_local5.addEventListener(MouseEvent.MOUSE_OVER, advOnMouseOver, false, 0, true);
_local5.addEventListener(MouseEvent.MOUSE_OUT, advOnMouseOut, false, 0, true);
_local5.addEventListener(MouseEvent.CLICK, advOnClick, false, 0, true);
addChild(_local5);
} else {
_local2 = ((_local3 < (tablesArray.length - 1))) ? new LOCKED_SMALL() : new LOCKED_WIDE();
_local6 = getLockedPosition(_local3);
_local2.smoothing = true;
_local2.x = _local6.x;
_local2.y = _local6.y;
_local2.alpha = 0;
_local5.buttonMode = false;
lockedBitmaps.push(_local2);
addChild(_local5);
addChild(_local2);
fadeInArray.push(_local2);
};
fadeInArray.push(_local5);
_local3--;
};
reset.alpha = 0;
addChild(reset);
var _local4:Point = backPositions[ADVENTURE_BACK];
back.x = _local4.x;
back.y = _local4.y;
back.alpha = 0;
addChild(back);
fadeInArray.push(reset);
fadeInArray.push(back);
startFadeIn();
addEventListener(FADE_IN_FINISHED, setAdventure);
}
private function instructions(_arg1):void{
if (((fadeInProcess) || (firstRun))){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeOutArray.push(menuItems[_local2]);
_local2++;
};
startFadeOut();
addEventListener(FADE_OUT_FINISHED, showInstructions);
}
private function onPlay(_arg1:Event):void{
if (fadeInProcess){
return;
};
fadeInProcess = true;
fadeOutArray = new Array();
fadeOutArray.push(logoImg);
fadeOutArray.push(objectives);
fadeOutArray.push(play);
fadeOutArray.push(back);
startFadeOut();
addEventListener(FADE_OUT_FINISHED, startAnim);
}
private function advOnClick(_arg1:Event):void{
var _local3:Sprite;
var _local2:Sprite = Sprite(_arg1.target);
if (_local2 == tablesArray[0]){
tableSelected = 0;
zoomInValue = 2;
offsetX = -390;
offsetY = -420;
};
if (_local2 == tablesArray[1]){
tableSelected = 1;
zoomInValue = 2;
offsetX = -390;
offsetY = -420;
};
if (_local2 == tablesArray[2]){
tableSelected = 2;
zoomInValue = 2;
offsetX = -390;
offsetY = -420;
};
if (_local2 == tablesArray[3]){
tableSelected = 3;
zoomInValue = 2;
offsetX = -390;
offsetY = -420;
};
if (_local2 == tablesArray[4]){
tableSelected = 4;
zoomInValue = 2;
offsetX = -390;
offsetY = -420;
};
for each (_local3 in tablesArray) {
_local3.removeEventListener(MouseEvent.CLICK, advOnClick);
_local3.removeEventListener(MouseEvent.MOUSE_OUT, advOnMouseOut);
_local3.removeEventListener(MouseEvent.MOUSE_OVER, advOnMouseOver);
};
if (contains(highlight)){
removeChild(highlight);
};
yellowHighlight.scaleX = (_local2.width / 213);
yellowHighlight.scaleY = (_local2.height / 41);
yellowHighlight.x = _local2.x;
yellowHighlight.y = _local2.y;
yellowHighlight.alpha = 0.5;
addChild(yellowHighlight);
swapChildren(yellowHighlight, _local2);
startZoomIn(null);
}
public function initGraphic():void{
PAPER_Y = 10;
format.font = "Journal";
format.size = FONT_SIZE;
format.align = TextFormatAlign.CENTER;
format.color = 0;
bgImg = new BG_PNG();
bgImg.x = ((WIDTH - bgImg.width) / 2);
bgImg.y = (Main.HEIGHT - this.y);
bgImg.smoothing = true;
playLionSprite = new Sprite();
playLionImg = new PLAY_LION_PNG();
playLionSprite.addChild(playLionImg);
playLionSprite.x = ((bgImg.x + bgImg.width) - 70);
playLionSprite.y = ((PAPER_Y + bgImg.height) - 135);
playLionSprite.alpha = 0;
playLionSprite.buttonMode = true;
playLionSprite.addEventListener(MouseEvent.CLICK, openPlayLion, false, 0, true);
if (noAdds){
playLionSprite.visible = false;
};
logoImg = new LOGO_PNG();
logoImg.y = (PAPER_Y + 15);
logoImg.x = (bgImg.x + ((bgImg.width - logoImg.width) / 2));
logoImg.alpha = 0;
glLogoImg = new GL_LOGO();
glLogoImg.y = (PAPER_Y + 15);
glLogoImg.x = (bgImg.x + ((bgImg.width - glLogoImg.width) / 2));
glLogoImg.alpha = 0;
rubberImg = new RUBBER_PNG();
rubber.addChild(rubberImg);
rubber.rotation = -30;
rubber.x = (WIDTH - 160);
rubber.y = (HEIGHT - 10);
domekImg = new HOUSE_PNG();
domekImg.x = (bgImg.x + ((bgImg.width - domekImg.width) / 2));
domekImg.y = (PAPER_Y + ((bgImg.height - domekImg.height) / 2));
domekImg.smoothing = true;
table1 = new Sprite();
table1Img = new TABLE_1_PNG();
table1Img.scaleX = 0.25;
table1Img.scaleY = 0.25;
table1.addChild(table1Img);
table1.x = (domekImg.x + 18);
table1.y = (domekImg.y + 67);
tablesArray.push(table1);
table1 = new Sprite();
table2Img = new TABLE_2_PNG();
table2Img.scaleX = 0.25;
table2Img.scaleY = 0.25;
table1.buttonMode = true;
table1.addChild(table2Img);
table1.x = (domekImg.x + 128);
table1.y = (domekImg.y + 67);
tablesArray.push(table1);
table1 = new Sprite();
table3Img = new TABLE_3_PNG();
table3Img.scaleX = 0.25;
table3Img.scaleY = 0.25;
table1.buttonMode = true;
table1.addChild(table3Img);
table1.x = (domekImg.x + 18);
table1.y = (domekImg.y + 115);
tablesArray.push(table1);
table1 = new Sprite();
table4Img = new TABLE_4_PNG();
table4Img.scaleX = 0.25;
table4Img.scaleY = 0.25;
table1.buttonMode = true;
table1.addChild(table4Img);
table1.x = (domekImg.x + 128);
table1.y = (domekImg.y + 115);
tablesArray.push(table1);
table1 = new Sprite();
table5Img = new TABLE_5_PNG();
table5Img.scaleX = 0.25;
table5Img.scaleY = 0.25;
table1.buttonMode = true;
table1.addChild(table5Img);
table1.x = (domekImg.x + 19);
table1.y = (domekImg.y + 166);
tablesArray.push(table1);
top10Img = new TOP_10_PNG();
top10Img.x = (bgImg.x + ((bgImg.width - top10Img.width) / 2));
top10Img.y = (PAPER_Y + 20);
instrImg = new INSTR_PNG();
instrImg.x = (bgImg.x + ((bgImg.width - instrImg.width) / 2));
instrImg.y = ((logoImg.y + logoImg.height) + 20);
instr2Img = new INSTR_2_PNG();
instr2Img.x = (bgImg.x + ((bgImg.width - instr2Img.width) / 2));
instr2Img.y = (PAPER_Y + 30);
var _local1:Bitmap = new LOCKED_SMALL();
LOCKED_SMALL_WIDTH = _local1.width;
_local1 = new LOCKED_WIDE();
LOCKED_WIDE_WIDTH = _local1.width;
_local1 = null;
highlight = new Sprite();
highlight.graphics.beginFill(41141, 0.5);
highlight.graphics.drawRect(0, 0, 213, 41);
highlight.graphics.endFill();
highlight.alpha = 0.25;
yellowHighlight = new Sprite();
yellowHighlight.graphics.beginFill(0xFFFF00, 0.5);
yellowHighlight.graphics.drawRect(0, 0, 213, 41);
yellowHighlight.graphics.endFill();
yellowHighlight.alpha = 0.25;
reset.selectable = false;
reset.embedFonts = true;
reset.defaultTextFormat = format;
reset.text = "Reset";
reset.autoSize = TextFieldAutoSize.CENTER;
reset.x = ((domekImg.x + domekImg.width) - reset.width);
reset.y = ((domekImg.y + domekImg.height) + 20);
reset.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
reset.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
reset.addEventListener(MouseEvent.CLICK, resetLocked);
play.selectable = false;
play.embedFonts = true;
play.defaultTextFormat = format;
play.text = "Play";
play.autoSize = TextFieldAutoSize.CENTER;
play.x = rubber.x;
play.y = ((rubber.y - play.height) - 30);
play.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
play.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
play.addEventListener(MouseEvent.CLICK, onPlay);
next.selectable = false;
next.embedFonts = true;
next.defaultTextFormat = format;
next.text = "Continue";
next.autoSize = TextFieldAutoSize.CENTER;
next.x = (bgImg.x + ((bgImg.width - next.width) / 2));
next.y = (((PAPER_Y + bgImg.height) - next.height) - 20);
next.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
next.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
objectives.selectable = false;
objectives.embedFonts = true;
objectives.defaultTextFormat = format;
objectives.multiline = true;
objectives.wordWrap = true;
objectives.x = (bgImg.x + 20);
objectives.y = ((logoImg.y + logoImg.height) + 10);
objectives.width = (bgImg.width - 40);
objectives.height = ((play.y - objectives.y) - 20);
format.size = FONT_SIZE_SMALL;
format.align = TextFormatAlign.LEFT;
top10Names.selectable = false;
top10Names.embedFonts = true;
top10Names.defaultTextFormat = format;
top10Names.multiline = true;
top10Names.wordWrap = true;
top10Names.x = (top10Img.x + 10);
top10Names.y = (top10Img.y + 70);
top10Names.width = (top10Img.width - 30);
top10Names.height = (top10Img.height - 70);
top10Names.alpha = 0;
format.align = TextFormatAlign.RIGHT;
top10Scores.selectable = false;
top10Scores.embedFonts = true;
top10Scores.defaultTextFormat = format;
top10Scores.multiline = true;
top10Scores.wordWrap = true;
top10Scores.x = (top10Img.x + 10);
top10Scores.y = (top10Img.y + 70);
top10Scores.width = (top10Img.width - 30);
top10Scores.height = (top10Img.height - 70);
top10Scores.alpha = 0;
format.align = TextFormatAlign.CENTER;
format.size = FONT_SIZE_MEDIUM;
top10Header.selectable = false;
top10Header.embedFonts = true;
top10Header.defaultTextFormat = format;
top10Header.text = "TOP 10";
top10Header.autoSize = TextFieldAutoSize.CENTER;
top10Header.x = (top10Img.x + 10);
top10Header.y = (top10Img.y + 15);
top10Header.width = (top10Img.width - 20);
top10Header.height = (top10Img.height - 70);
top10Header.alpha = 0;
format.size = FONT_SIZE;
loading.selectable = false;
loading.embedFonts = true;
loading.defaultTextFormat = format;
loading.text = "Loading...";
top10Header.autoSize = TextFieldAutoSize.CENTER;
loading.x = (top10Img.x + ((top10Img.width - loading.width) / 2));
loading.y = (top10Img.y + ((top10Img.height - loading.height) / 2));
format.color = 0xFFD700;
msg.selectable = false;
msg.embedFonts = true;
msg.defaultTextFormat = format;
msg.autoSize = TextFieldAutoSize.CENTER;
msg.y = (HEIGHT - 10);
msg.x = 230;
format.color = 0;
forMoreGames.selectable = false;
forMoreGames.embedFonts = true;
forMoreGames.defaultTextFormat = format;
forMoreGames.autoSize = TextFieldAutoSize.CENTER;
forMoreGames.y = (HEIGHT - 320);
forMoreGames.x = (bgImg.x + ((bgImg.width - forMoreGames.width) / 2));
forMoreGames.text = "For more games visit";
forMoreGames.alpha = 0;
playLionSprite2 = new Sprite();
playLionSprite2.addChild(new PLAY_LION_PNG());
playLionSprite2.x = (bgImg.x + ((bgImg.width - playLionSprite2.width) / 2));
playLionSprite2.y = (forMoreGames.y + forMoreGames.height);
playLionSprite2.buttonMode = true;
playLionSprite2.alpha = 0;
playLionSprite2.addEventListener(MouseEvent.CLICK, openPlayLion, false, 0, true);
playLionText.selectable = false;
playLionText.embedFonts = true;
playLionText.defaultTextFormat = format;
playLionText.autoSize = TextFieldAutoSize.CENTER;
playLionText.y = (playLionSprite2.y + playLionSprite2.height);
playLionText.x = (bgImg.x + ((bgImg.width - playLionText.width) / 2));
playLionText.text = "www.playlion.com";
playLionText.alpha = 0;
playLionText.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
playLionText.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
playLionText.addEventListener(MouseEvent.CLICK, openPlayLion, false, 0, true);
back.selectable = false;
back.embedFonts = true;
back.defaultTextFormat = format;
back.text = "Back";
back.autoSize = TextFieldAutoSize.CENTER;
backPositions.push(new Point(domekImg.x, ((domekImg.y + domekImg.height) + 20)));
backPositions.push(new Point((bgImg.x + ((bgImg.width - back.width) / 2)), ((top10Img.y + top10Img.height) + 5)));
backPositions.push(new Point(instrImg.x, (instr2Img.y + instr2Img.height)));
backPositions.push(new Point((bgImg.x + 60), ((rubber.y - back.height) - 30)));
backPositions.push(new Point((bgImg.x + ((bgImg.width - back.width) / 2)), ((playLionText.y + playLionText.height) + 5)));
back.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
back.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
nextPrev.selectable = false;
nextPrev.embedFonts = true;
nextPrev.defaultTextFormat = format;
nextPrev.autoSize = TextFieldAutoSize.CENTER;
nextPrev.y = (instr2Img.y + instr2Img.height);
nextPrev.text = "Next";
nextPrev.x = (instrImg.x + (instrImg.width - nextPrev.width));
nextPrev.alpha = 0;
nextPrev.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
nextPrev.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
nextPrev.addEventListener(MouseEvent.CLICK, changePage, false, 0, true);
}
private function startZoomOut():void{
fadeInProcess = true;
TweenLite.to(parent, ZOOM_TIME, {scaleX:1, scaleY:1, x:0, y:0, onComplete:zoomOutFinished});
}
private function startFadeIn(_arg1:Event=null):void{
fadeInProcess = true;
nextFadeIn = (new Date().getTime() + FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeIn);
}
private function fadeIn(_arg1:Event):void{
var _local5:DisplayObject;
var _local2:Date = new Date();
var _local3:Boolean;
var _local4:int = ((_local2.getTime() - nextFadeIn) / FADE_OUT_DELAY);
if (_local4 < 0){
return;
};
if (_local4 == 0){
_local4 = 1;
};
nextFadeIn = (nextFadeIn + (FADE_OUT_DELAY * _local4));
for each (_local5 in fadeInArray) {
_local5.alpha = (_local5.alpha + (0.1 * _local4));
if (_local5.alpha < 1){
_local3 = false;
};
};
if (_local3){
removeEventListener(Event.ENTER_FRAME, fadeIn);
dispatchEvent(new Event(FADE_IN_FINISHED));
fadeInProcess = false;
};
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == sequence[seqIndex]){
seqIndex++;
} else {
seqIndex = 0;
};
if (seqIndex == sequence.length){
msg.text = s;
addChild(msg);
};
}
private function setAdventure(_arg1:Event):void{
removeEventListener(FADE_IN_FINISHED, setAdventure);
back.addEventListener(MouseEvent.CLICK, hideAdventure);
}
private function openPlayLion(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.playlion.com"), "_blank");
}
public function showYouWonScreen(_arg1:int):void{
animLastFrame = new Date().getTime();
fadeInArray = new Array();
fadeInArray.push(logoImg);
fadeInArray.push(objectives);
fadeInArray.push(next);
fadeOutArray.push(objectives);
fadeOutArray.push(next);
if (!contains(logoImg)){
addChild(logoImg);
};
logoImg.alpha = 0;
if (!contains(objectives)){
addChild(objectives);
};
objectives.alpha = 0;
if (_arg1 < tablesLocked.length){
objectives.text = ADV_LEVEL_WON;
tablesLocked[_arg1] = false;
} else {
objectives.text = ADV_LAST_LEVEL_WON;
};
next.alpha = 0;
next.addEventListener(MouseEvent.CLICK, startFadeOut);
addChild(next);
tableSelected = -1;
zoomInValue = 3;
offsetX = -800;
offsetY = -600;
addEventListener(Event.ENTER_FRAME, menuIntro);
addEventListener(INTRO_FINISHED, startFadeIn);
addEventListener(FADE_OUT_FINISHED, startZoomIn);
}
private function changePage(_arg1:Event):void{
if (fadeInProcess){
return;
};
if (contains(instrImg)){
fadeOutArray = new Array();
fadeOutArray.push(instrImg);
fadeOutArray.push(logoImg);
fadeInArray = new Array();
fadeInArray.push(instr2Img);
addChild(instr2Img);
instr2Img.alpha = 0;
addEventListener(FADE_OUT_FINISHED, startFadeIn);
startFadeOut();
nextPrev.text = "Prev";
} else {
fadeOutArray = new Array();
fadeOutArray.push(instr2Img);
fadeInArray = new Array();
fadeInArray.push(instrImg);
fadeInArray.push(logoImg);
addChild(instrImg);
addChild(logoImg);
instrImg.alpha = 0;
logoImg.alpha = 0;
addEventListener(FADE_OUT_FINISHED, startFadeIn);
startFadeOut();
nextPrev.text = "Next";
};
}
private function hideInstruction(_arg1:Event):void{
if (fadeInProcess){
return;
};
back.removeEventListener(MouseEvent.CLICK, hideInstruction);
removeEventListener(FADE_OUT_FINISHED, startFadeIn);
nextPrev.text = "Next";
fadeOutArray = new Array();
if (contains(instrImg)){
fadeOutArray.push(instrImg);
} else {
fadeOutArray.push(instr2Img);
addChild(logoImg);
logoImg.alpha = 0;
};
fadeOutArray.push(back);
fadeOutArray.push(nextPrev);
startFadeOut();
addEventListener(FADE_OUT_FINISHED, showMenu);
}
private function hideAdventure(_arg1:Event):void{
if (fadeInProcess){
return;
};
back.removeEventListener(MouseEvent.CLICK, hideAdventure);
fadeOutArray = new Array();
fadeOutArray.push(domekImg);
var _local2:int;
while (_local2 < tablesArray.length) {
fadeOutArray.push(tablesArray[_local2]);
_local2++;
};
fadeOutArray.push(reset);
fadeOutArray.push(back);
var _local3:int;
while (_local3 < lockedBitmaps.length) {
fadeOutArray.push(lockedBitmaps[_local3]);
_local3++;
};
if (contains(yellowHighlight)){
fadeOutArray.push(yellowHighlight);
};
nextFadeOut = (new Date().getTime + FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeOut);
if (_arg1 != null){
addEventListener(FADE_OUT_FINISHED, showMenu);
tableSelected = -1;
} else {
Main.instance.switchBg(Main.getTableBg(tableSelected));
objectives.text = Main.instance.getTableObjectives(tableSelected);
Main.instance.prepareHUD(tableSelected);
startZoomOut();
};
}
private function zoomInFinished():void{
fadeInProcess = false;
if (tableSelected >= 0){
hideAdventure(null);
addChild(rubber);
playLionSprite.visible = false;
} else {
if (startingClasssic){
Main.instance.switchBg(Main.getTableBg(0));
Main.instance.prepareHUD(-1);
addChild(rubber);
playLionSprite.visible = false;
} else {
Main.instance.switchBg(Main.getTableBg(-1));
Main.instance.hideHUD();
if (!noAdds){
playLionSprite.visible = true;
};
playLionSprite.alpha = 1;
if (contains(rubber)){
removeChild(rubber);
};
};
startZoomOut();
};
}
public function showMenu(_arg1:Event=null):void{
var _local3:DisplayObject;
if (firstRun){
loadingTimer.removeEventListener(TimerEvent.TIMER, startFadeOut);
removeEventListener(INTRO_FINISHED, startFadeIn);
removeEventListener(FADE_IN_FINISHED, startTimer);
removeEventListener(FADE_OUT_FINISHED, showMenu);
firstRun = false;
};
if (_arg1 != null){
removeEventListener(FADE_OUT_FINISHED, showMenu);
removeEventListener(INTRO_FINISHED, showMenu);
};
fadeInProcess = true;
fadeInArray = new Array();
var _local2:int;
while (_local2 < menuItems.length) {
fadeInArray.push(menuItems[_local2]);
_local2++;
};
if (logoImg.alpha <= 0){
fadeInArray.push(logoImg);
};
if (playLionSprite.alpha <= 0){
fadeInArray.push(playLionSprite);
};
for each (_local3 in fadeInArray) {
if (!contains(_local3)){
addChild(_local3);
};
};
nextFadeIn = (new Date().getTime + FADE_OUT_DELAY);
addEventListener(Event.ENTER_FRAME, fadeIn);
}
public static function onMouseOver(_arg1:MouseEvent):void{
if (_arg1.target.alpha < 1){
return;
};
Main.mp3PlayerInstance.playSound(menuSound);
format.color = 0xFF0000;
TextField(_arg1.target).setTextFormat(format);
}
public static function onMouseOut(_arg1:MouseEvent):void{
format.color = 0;
TextField(_arg1.target).setTextFormat(format);
}
}
}//package
Section 301
//Menu_BG_PNG (Menu_BG_PNG)
package {
import mx.core.*;
public class Menu_BG_PNG extends BitmapAsset {
}
}//package
Section 302
//Menu_font (Menu_font)
package {
import mx.core.*;
public class Menu_font extends FontAsset {
}
}//package
Section 303
//Menu_GL_LOGO (Menu_GL_LOGO)
package {
import mx.core.*;
public class Menu_GL_LOGO extends BitmapAsset {
}
}//package
Section 304
//Menu_HOUSE_PNG (Menu_HOUSE_PNG)
package {
import mx.core.*;
public class Menu_HOUSE_PNG extends BitmapAsset {
}
}//package
Section 305
//Menu_INSTR_2_PNG (Menu_INSTR_2_PNG)
package {
import mx.core.*;
public class Menu_INSTR_2_PNG extends BitmapAsset {
}
}//package
Section 306
//Menu_INSTR_PNG (Menu_INSTR_PNG)
package {
import mx.core.*;
public class Menu_INSTR_PNG extends BitmapAsset {
}
}//package
Section 307
//Menu_LOCKED_SMALL (Menu_LOCKED_SMALL)
package {
import mx.core.*;
public class Menu_LOCKED_SMALL extends BitmapAsset {
}
}//package
Section 308
//Menu_LOCKED_WIDE (Menu_LOCKED_WIDE)
package {
import mx.core.*;
public class Menu_LOCKED_WIDE extends BitmapAsset {
}
}//package
Section 309
//Menu_LOGO_PNG (Menu_LOGO_PNG)
package {
import mx.core.*;
public class Menu_LOGO_PNG extends BitmapAsset {
}
}//package
Section 310
//Menu_MENU_SOUND (Menu_MENU_SOUND)
package {
import mx.core.*;
public class Menu_MENU_SOUND extends SoundAsset {
}
}//package
Section 311
//Menu_PLAY_LION_PNG (Menu_PLAY_LION_PNG)
package {
import mx.core.*;
public class Menu_PLAY_LION_PNG extends BitmapAsset {
}
}//package
Section 312
//Menu_RUBBER_PNG (Menu_RUBBER_PNG)
package {
import mx.core.*;
public class Menu_RUBBER_PNG extends BitmapAsset {
}
}//package
Section 313
//Menu_TABLE_1_PNG (Menu_TABLE_1_PNG)
package {
import mx.core.*;
public class Menu_TABLE_1_PNG extends BitmapAsset {
}
}//package
Section 314
//Menu_TABLE_2_PNG (Menu_TABLE_2_PNG)
package {
import mx.core.*;
public class Menu_TABLE_2_PNG extends BitmapAsset {
}
}//package
Section 315
//Menu_TABLE_3_PNG (Menu_TABLE_3_PNG)
package {
import mx.core.*;
public class Menu_TABLE_3_PNG extends BitmapAsset {
}
}//package
Section 316
//Menu_TABLE_4_PNG (Menu_TABLE_4_PNG)
package {
import mx.core.*;
public class Menu_TABLE_4_PNG extends BitmapAsset {
}
}//package
Section 317
//Menu_TABLE_5_PNG (Menu_TABLE_5_PNG)
package {
import mx.core.*;
public class Menu_TABLE_5_PNG extends BitmapAsset {
}
}//package
Section 318
//Menu_TOP_10_PNG (Menu_TOP_10_PNG)
package {
import mx.core.*;
public class Menu_TOP_10_PNG extends BitmapAsset {
}
}//package
Section 319
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.system.*;
import flash.net.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 320
//Plane (Plane)
package {
import flash.geom.*;
import flash.media.*;
import flash.display.*;
public class Plane extends Sprite {
private var planeImg:Bitmap;
private var spawnDelay:int;
private var spawnRandomFactor:Number;// = 0
private var planeShadowImg:Bitmap;
private var destination:int;
private var speed:Number;// = 3
private var directionVector:Point;
private var start:int;// = -1
private var spawnTimeRandomRange:Number;// = 3000
public var speedModifier:Number;// = 1
private static const PLANE_PNG:Class = Plane_PLANE_PNG;
public static const LEFT:int = 6;
private static const PLANE_SHADOW_PNG:Class = Plane_PLANE_SHADOW_PNG;
public static const UPPER_LEFT_CORNER:int = 7;
public static const UPPER_RIGHT_CORNER:int = 1;
public static const LOWER_RIGHT_CORNER:int = 3;
public static const BOTTOM:int = 4;
private static const PLANE_MP3:Class = Plane_PLANE_MP3;
public static const LOWER_LEFT_CORNER:int = 5;
public static const SPAWN_TIME:int = 5000;
private static const PLANE_SOUND:Sound = new PLANE_MP3();
public static const TOP:int = 0;
public static const RIGHT:int = 2;
public function Plane(){
directionVector = new Point();
super();
planeImg = new PLANE_PNG();
planeImg.smoothing = true;
planeShadowImg = new PLANE_SHADOW_PNG();
planeShadowImg.alpha = 0.3;
planeShadowImg.x = 43;
planeShadowImg.y = 77;
planeShadowImg.smoothing = true;
addChild(planeShadowImg);
addChild(planeImg);
spawnDelay = SPAWN_TIME;
}
public function reset():void{
x = -1000;
y = -1000;
alpha = 1;
spawnDelay = SPAWN_TIME;
moveEnded();
}
public function move(_arg1:Number):void{
if (speedModifier == -1){
return;
};
if (start == -1){
spawnDelay = (spawnDelay + _arg1);
if (spawnDelay >= (SPAWN_TIME + spawnRandomFactor)){
spawn();
_arg1 = ((spawnDelay - SPAWN_TIME) - spawnRandomFactor);
spawnDelay = 0;
spawnRandomFactor = (Math.random() * spawnTimeRandomRange);
} else {
return;
};
};
x = (x + int(((((speed * directionVector.x) * _arg1) * speedModifier) / 31)));
y = (y + int(((((speed * directionVector.y) * _arg1) * speedModifier) / 31)));
switch (destination){
case BOTTOM:
if (y > (Main.WIDTH + (planeImg.height / 2))){
moveEnded();
};
break;
case TOP:
if (y < ((-(planeImg.height) / 2) - 80)){
moveEnded();
};
break;
case LOWER_LEFT_CORNER:
if (x < 0){
moveEnded();
};
break;
case UPPER_RIGHT_CORNER:
if (x > Main.WIDTH){
moveEnded();
};
break;
case LEFT:
if (x < ((-0.5 * planeImg.width) - 40)){
moveEnded();
};
break;
case RIGHT:
if (x > (Main.WIDTH + (0.5 * planeImg.width))){
moveEnded();
};
break;
case UPPER_LEFT_CORNER:
if (y < (-0.5 * planeImg.height)){
moveEnded();
};
break;
case LOWER_RIGHT_CORNER:
if (y > Main.HEIGHT){
moveEnded();
};
break;
};
}
public function set SpawnTimeRandomRange(_arg1:Number):void{
spawnTimeRandomRange = _arg1;
spawnRandomFactor = (Math.random() * spawnTimeRandomRange);
}
public function moveEnded():void{
start = -1;
Main.mp3PlayerInstance.stopLoopSound();
}
public function resumeSound():void{
if (start != -1){
Main.mp3PlayerInstance.playLoopSound(PLANE_SOUND);
};
}
public function pauseSound():void{
if (start != -1){
Main.mp3PlayerInstance.stopLoopSound();
};
}
private function spawn(_arg1:int=-1):void{
var _local2:int = ((_arg1 == -1)) ? (Math.random() * (UPPER_LEFT_CORNER + 1)) : _arg1;
if (_local2 > UPPER_LEFT_CORNER){
_local2 = UPPER_LEFT_CORNER;
};
start = _local2;
destination = ((start + 4) % 8);
switch (start){
case TOP:
planeImg.rotation = 135;
planeShadowImg.rotation = 135;
y = (-(planeImg.height) / 2);
x = (((Main.WIDTH / 2) + (planeImg.width / 2)) - 50);
directionVector.x = 0;
directionVector.y = 1;
break;
case UPPER_RIGHT_CORNER:
planeImg.rotation = 180;
planeShadowImg.rotation = 180;
y = (-(planeImg.height) / 4);
x = (Main.WIDTH + planeImg.width);
directionVector.x = -1;
directionVector.y = 1;
break;
case RIGHT:
planeImg.rotation = 225;
planeShadowImg.rotation = 225;
y = planeImg.height;
x = (Main.WIDTH + (0.5 * planeImg.width));
directionVector.x = -1;
directionVector.y = 0;
break;
case LOWER_RIGHT_CORNER:
planeImg.rotation = 270;
planeShadowImg.rotation = 270;
y = (Main.HEIGHT + planeImg.height);
x = Main.WIDTH;
directionVector.x = -1;
directionVector.y = -1;
break;
case BOTTOM:
planeImg.rotation = 315;
planeShadowImg.rotation = 315;
y = (Main.HEIGHT + (planeImg.height / 2));
x = (((Main.WIDTH / 2) - (planeImg.width / 2)) + 50);
directionVector.x = 0;
directionVector.y = -1;
break;
case LOWER_LEFT_CORNER:
planeImg.rotation = 0;
planeShadowImg.rotation = 0;
y = Main.HEIGHT;
x = (-0.8 * planeImg.width);
directionVector.x = 1;
directionVector.y = -1;
break;
case LEFT:
planeImg.rotation = 45;
planeShadowImg.rotation = 45;
x = (-0.5 * planeImg.width);
y = ((Main.HEIGHT / 2) - (planeImg.height / 3));
directionVector.x = 1;
directionVector.y = 0;
break;
case UPPER_LEFT_CORNER:
planeImg.rotation = 90;
planeShadowImg.rotation = 90;
y = -(planeImg.height);
x = 0;
directionVector.x = 1;
directionVector.y = 1;
break;
};
Main.mp3PlayerInstance.playLoopSound(PLANE_SOUND);
}
}
}//package
Section 321
//Plane_PLANE_MP3 (Plane_PLANE_MP3)
package {
import mx.core.*;
public class Plane_PLANE_MP3 extends SoundAsset {
}
}//package
Section 322
//Plane_PLANE_PNG (Plane_PLANE_PNG)
package {
import mx.core.*;
public class Plane_PLANE_PNG extends BitmapAsset {
}
}//package
Section 323
//Plane_PLANE_SHADOW_PNG (Plane_PLANE_SHADOW_PNG)
package {
import mx.core.*;
public class Plane_PLANE_SHADOW_PNG extends BitmapAsset {
}
}//package
Section 324
//Platform (Platform)
package {
import flash.media.*;
import flash.display.*;
public class Platform extends Sprite {
public var shrinking:Boolean;// = false
private var animDelay:int;// = 20
public var mouseSteering:Boolean;// = false
public var destinationX:int;// = 0
private var shakePhase:int;// = 0
private var shakeTimeCounter:int;// = 0
public var hit:Boolean;// = false
private var normalImg:Bitmap;
public var animCounter:int;// = 0
private var movingRight:Boolean;// = false
public var growing:Boolean;// = false
public var returning:Boolean;// = false
public var pWidth:Number;// = 72
public var pHeight:int;// = 23
private var movingLeft:Boolean;// = false
private var moveDirection:int;// = 0
public static const GROW_WIDTH:int = 108;
private static const RUBBER_GROW:Class = Platform_RUBBER_GROW;
public static const NORMAL_HEIGHT:int = 23;
public static const LEFT:int = -14;
private static const BOUNCE:Class = Platform_BOUNCE;
public static const NORMAL_WIDTH:int = 72;
private static const RUBBER_SHRINK:Class = Platform_RUBBER_SHRINK;
public static const RUBBER_SHRINK_SOUND:Sound = new RUBBER_SHRINK();
public static const GROW_DELTA:Number = 3.6;
public static const SHRINK_WIDTH:int = 36;
public static const RUBBER_GROW_SOUND:Sound = new RUBBER_GROW();
public static const BOUNCE_SOUND:Sound = new BOUNCE();
public static const RIGHT:int = 14;
private static const PLATFORM_PNG:Class = Platform_PLATFORM_PNG;
public function Platform(_arg1:int, _arg2:int){
this.x = _arg1;
this.y = _arg2;
normalImg = new PLATFORM_PNG();
addChild(normalImg);
}
public function stopMove(_arg1:int):void{
if (_arg1 == LEFT){
movingLeft = false;
if (movingRight){
moveDirection = RIGHT;
} else {
moveDirection = 0;
};
} else {
movingRight = false;
if (movingLeft){
moveDirection = LEFT;
} else {
moveDirection = 0;
};
};
}
public function getDirection():int{
return (moveDirection);
}
public function shake(_arg1:Number):void{
shakeTimeCounter = (shakeTimeCounter + _arg1);
if (shakeTimeCounter < 31){
return;
};
shakeTimeCounter = (shakeTimeCounter - 31);
switch (shakePhase){
case 0:
case 1:
case 2:
case 3:
case 12:
case 13:
case 14:
case 15:
normalImg.scaleX = (normalImg.scaleX + 0.05);
normalImg.x = (normalImg.x - (GROW_DELTA / 2));
normalImg.scaleY = (normalImg.scaleY - 0.05);
normalImg.y = (normalImg.y + (NORMAL_HEIGHT * 0.05));
shakePhase++;
break;
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
normalImg.scaleX = (normalImg.scaleX - 0.05);
normalImg.x = (normalImg.x + (GROW_DELTA / 2));
normalImg.scaleY = (normalImg.scaleY + 0.05);
normalImg.y = (normalImg.y - (NORMAL_HEIGHT * 0.05));
shakePhase++;
break;
case 16:
shakePhase = 0;
hit = false;
shakeTimeCounter = 0;
break;
};
}
public function shrink():void{
if ((animCounter = (++animCounter % animDelay)) != 0){
return;
};
if (normalImg.scaleX > 0.51){
normalImg.scaleX = (normalImg.scaleX - 0.05);
} else {
shrinking = false;
return;
};
x = (x + (GROW_DELTA / 2));
pWidth = (pWidth - GROW_DELTA);
}
public function move(_arg1:Number):Number{
var _local2:Number = x;
if (mouseSteering){
return (0);
};
if (moveDirection == 0){
return (0);
};
if ((((((x == 0)) && ((moveDirection == LEFT)))) || (((((x + pWidth) == Board.WIDTH)) && ((moveDirection == RIGHT)))))){
return (0);
};
x = (x + ((moveDirection * _arg1) / 31));
if (x < 0){
x = 0;
} else {
if ((x + pWidth) > Board.WIDTH){
x = (Board.WIDTH - pWidth);
};
};
return ((x - _local2));
}
public function startMove(_arg1:int):void{
moveDirection = _arg1;
if (_arg1 == LEFT){
movingLeft = true;
} else {
movingRight = true;
};
}
public function grow():void{
if ((animCounter = (++animCounter % animDelay)) != 0){
return;
};
if (normalImg.scaleX < 1.49){
normalImg.scaleX = (normalImg.scaleX + 0.05);
} else {
growing = false;
return;
};
x = (x - (GROW_DELTA / 2));
pWidth = (pWidth + GROW_DELTA);
if (x < 0){
x = 0;
};
if ((x + pWidth) > Board.WIDTH){
x = (Board.WIDTH - pWidth);
};
}
public function toNormal():void{
if ((animCounter = (++animCounter % animDelay)) != 0){
return;
};
if ((((normalImg.scaleX > 0.98)) && ((normalImg.scaleX < 1.02)))){
returning = false;
return;
};
if (normalImg.scaleX > 1){
normalImg.scaleX = (normalImg.scaleX - 0.05);
x = (x + (GROW_DELTA / 2));
pWidth = (pWidth - GROW_DELTA);
} else {
normalImg.scaleX = (normalImg.scaleX + 0.05);
x = (x - (GROW_DELTA / 2));
pWidth = (pWidth + GROW_DELTA);
if (x < 0){
x = 0;
};
if ((x + pWidth) > Board.WIDTH){
x = (Board.WIDTH - pWidth);
};
};
}
}
}//package
Section 325
//Platform_BOUNCE (Platform_BOUNCE)
package {
import mx.core.*;
public class Platform_BOUNCE extends SoundAsset {
}
}//package
Section 326
//Platform_PLATFORM_PNG (Platform_PLATFORM_PNG)
package {
import mx.core.*;
public class Platform_PLATFORM_PNG extends BitmapAsset {
}
}//package
Section 327
//Platform_RUBBER_GROW (Platform_RUBBER_GROW)
package {
import mx.core.*;
public class Platform_RUBBER_GROW extends SoundAsset {
}
}//package
Section 328
//Platform_RUBBER_SHRINK (Platform_RUBBER_SHRINK)
package {
import mx.core.*;
public class Platform_RUBBER_SHRINK extends SoundAsset {
}
}//package
Section 329
//TableInfo (TableInfo)
package {
public class TableInfo {
public var levelTime:int;
public var bonusesHidden:Boolean;// = false
public var starsHidden:Boolean;// = false
public var starsNeeded:int;// = 0
public function TableInfo(_arg1:int, _arg2:int=0, _arg3:Boolean=false, _arg4:Boolean=false){
this.levelTime = _arg1;
this.starsNeeded = _arg2;
this.starsHidden = _arg3;
this.bonusesHidden = bonusesHidden;
}
}
}//package
Section 330
//TimeBar (TimeBar)
package {
import flash.display.*;
public class TimeBar extends Sprite {
private const MAIN_BAR_START_THRESHOLD:int = 20;
private var _ANIM_TIME:int;// = 30000
private var colors:Array;
private var bar:Sprite;
private var FRAME_NR:int;
private var multiplayer:Number;
public function TimeBar(_arg1:int, _arg2:int){
colors = [0xFF00, 0x545454];
super();
FRAME_NR = (_arg1 - 2);
graphics.beginFill(colors[1]);
graphics.drawRect(0, 0, _arg1, _arg2);
graphics.endFill();
graphics.lineStyle(0, 0);
bar = new Sprite();
bar.graphics.beginFill(colors[0]);
bar.graphics.drawRect(0, 0, _arg1, _arg2);
bar.graphics.endFill();
addChild(bar);
bar.scaleX = 0;
bar.x = 0;
bar.y = 0;
}
public function updateTime(_arg1:Number):Boolean{
if (_arg1 > _ANIM_TIME){
return (true);
};
bar.scaleX = (_arg1 / _ANIM_TIME);
return (false);
}
public function restart():void{
bar.scaleX = 0;
visible = true;
}
public function set ANIM_TIME(_arg1:int):void{
_ANIM_TIME = _arg1;
multiplayer = (FRAME_NR / _arg1);
}
}
}//package