Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function initComplete(_arg1:Event):void{
trace((("INIT COMPLETE(" + _arg1.toString()) + ")"));
}
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:String;
Security.allowDomain("server.cpmstar.com");
_local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, initComplete);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
cpmstarLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, AdLoader.loadIOError);
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
public static function loadIOError(_arg1:IOErrorEvent):void{
trace((("ERROR(" + _arg1.text) + ")"));
}
public static function loadComplete(_arg1:Event):void{
trace((("LOAD COMPLETE(" + _arg1.toString()) + ")"));
}
}
}//package CPMStar
Section 2
//Bounce (fl.transitions.easing.Bounce)
package fl.transitions.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 4
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 5
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 6
//IAutomationObject (mx.automation.IAutomationObject)
package mx.automation {
import flash.events.*;
public interface IAutomationObject {
function createAutomationIDPart(_arg1:IAutomationObject):Object;
function get automationName():String;
function get automationDelegate():Object;
function set automationName(_arg1:String):void;
function getAutomationChildAt(_arg1:int):IAutomationObject;
function get showInAutomationHierarchy():Boolean;
function get automationTabularData():Object;
function resolveAutomationIDPart(_arg1:Object):Array;
function replayAutomatableEvent(_arg1:Event):Boolean;
function set automationDelegate(_arg1:Object):void;
function get automationValue():Array;
function get numAutomationChildren():int;
function set showInAutomationHierarchy(_arg1:Boolean):void;
}
}//package mx.automation
Section 7
//Binding (mx.binding.Binding)
package mx.binding {
import mx.collections.errors.*;
public class Binding {
mx_internal var destFunc:Function;
mx_internal var srcFunc:Function;
mx_internal var destString:String;
mx_internal var document:Object;
private var hasHadValue:Boolean;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
private var wrappedFunctionSuccessful:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){
this.document = _arg1;
this.srcFunc = _arg2;
this.destFunc = _arg3;
this.destString = _arg4;
isExecuting = false;
isHandlingEvent = false;
hasHadValue = false;
uiComponentWatcher = -1;
BindingManager.addBinding(_arg1, _arg4, this);
}
public function watcherFired(_arg1:Boolean, _arg2:int):void{
var commitEvent = _arg1;
var cloneIndex = _arg2;
if (isHandlingEvent){
return;
};
try {
isHandlingEvent = true;
execute(cloneIndex);
} finally {
isHandlingEvent = false;
};
}
protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{
var result:Object;
var thisArg = _arg1;
var wrappedFunction = _arg2;
var object = _arg3;
var args = _args;
wrappedFunctionSuccessful = false;
try {
result = wrappedFunction.apply(thisArg, args);
wrappedFunctionSuccessful = true;
return (result);
} catch(itemPendingError:ItemPendingError) {
itemPendingError.addResponder(new EvalBindingResponder(this, object));
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError));
};
} catch(rangeError:RangeError) {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + rangeError));
};
} catch(error:Error) {
if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){
throw (error);
} else {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + error));
};
};
};
return (null);
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg1.length();
if (_local3 == _arg2.length()){
_local4 = 0;
while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) {
_local4++;
};
return ((_local4 == _local3));
//unresolved jump
};
return (false);
}
private function innerExecute():void{
var _local1:Object;
_local1 = wrapFunctionCall(document, srcFunc);
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1));
};
if (((hasHadValue) || (wrappedFunctionSuccessful))){
if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){
destFunc.call(document, _local1);
lastValue = _local1;
hasHadValue = true;
};
};
}
}
}//package mx.binding
Section 8
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "2.0.1.0";
static var debugDestinationStrings:Object = {};
public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:String;
if (((!(_arg2)) || ((_arg2 == "")))){
return;
};
if (((((((_arg1) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){
for (_local4 in _arg1._bindingsByDestination) {
if (_local4.charAt(0) == _arg2.charAt(0)){
if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){
_arg1._bindingsByDestination[_local4].execute(_arg3);
};
};
};
};
}
public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{
if (!_arg1._bindingsByDestination){
_arg1._bindingsByDestination = {};
_arg1._bindingsBeginWithWord = {};
};
_arg1._bindingsByDestination[_arg2] = _arg3;
_arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true;
}
public static function debugBinding(_arg1:String):void{
debugDestinationStrings[_arg1] = true;
}
private static function getFirstWord(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = _arg1.indexOf(".");
_local3 = _arg1.indexOf("[");
if (_local2 == _local3){
return (_arg1);
};
_local4 = Math.min(_local2, _local3);
if (_local4 == -1){
_local4 = Math.max(_local2, _local3);
};
return (_arg1.substr(0, _local4));
}
public static function getUIComponentWatcherForDestination(_arg1:Object, _arg2:String):int{
var _local3:String;
if (_arg1._bindingsByDestination){
for (_local3 in _arg1._bindingsByDestination) {
if ((((_local3 == _arg2)) && (!((_arg1._bindingsByDestination[_local3].uiComponentWatcher == -1))))){
return (_arg1._bindingsByDestination[_local3].uiComponentWatcher);
};
};
};
return (-1);
}
}
}//package mx.binding
Section 9
//EvalBindingResponder (mx.binding.EvalBindingResponder)
package mx.binding {
import mx.rpc.*;
public class EvalBindingResponder implements IResponder {
private var binding:Binding;
private var object:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function EvalBindingResponder(_arg1:Binding, _arg2:Object){
this.binding = _arg1;
this.object = _arg2;
}
public function fault(_arg1:Object):void{
}
public function result(_arg1:Object):void{
binding.execute(object);
}
}
}//package mx.binding
Section 10
//ItemPendingError (mx.collections.errors.ItemPendingError)
package mx.collections.errors {
import mx.rpc.*;
public class ItemPendingError extends Error {
private var _responders:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function ItemPendingError(_arg1:String){
super(_arg1);
}
public function addResponder(_arg1:IResponder):void{
if (!_responders){
_responders = [];
};
_responders.push(_arg1);
}
public function get responders():Array{
return (_responders);
}
}
}//package mx.collections.errors
Section 11
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout)
package mx.containers.utilityClasses {
import mx.core.*;
public class ApplicationLayout extends BoxLayout {
mx_internal static const VERSION:String = "2.0.1.0";
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:IFlexDisplayObject;
super.updateDisplayList(_arg1, _arg2);
_local3 = super.target;
if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){
_local4 = _local3.getStyle("paddingLeft");
_local5 = _local3.getStyle("paddingTop");
_local6 = 0;
_local7 = 0;
_local8 = _local3.numChildren;
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
if (_local10.x < _local4){
_local6 = Math.max(_local6, (_local4 - _local10.x));
};
if (_local10.y < _local5){
_local7 = Math.max(_local7, (_local5 - _local10.y));
};
_local9++;
};
if (((!((_local6 == 0))) || (!((_local7 == 0))))){
_local9 = 0;
while (_local9 < _local8) {
_local10 = IFlexDisplayObject(_local3.getChildAt(_local9));
IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7));
_local9++;
};
};
};
}
}
}//package mx.containers.utilityClasses
Section 12
//BoxLayout (mx.containers.utilityClasses.BoxLayout)
package mx.containers.utilityClasses {
import mx.core.*;
import mx.controls.scrollClasses.*;
import mx.containers.*;
public class BoxLayout extends Layout {
public var direction:String;// = "vertical"
mx_internal static const VERSION:String = "2.0.1.0";
public function BoxLayout(){
direction = BoxDirection.VERTICAL;
super();
}
private function isVertical():Boolean{
return (!((direction == BoxDirection.HORIZONTAL)));
}
override public function measure():void{
var _local1:Container;
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:IUIComponent;
var _local13:Number;
var _local14:Number;
_local1 = super.target;
_local2 = isVertical();
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = _local1.numChildren;
_local8 = _local7;
_local9 = 0;
while (_local9 < _local7) {
_local12 = IUIComponent(_local1.getChildAt(_local9));
if (!_local12.includeInLayout){
_local8--;
} else {
_local13 = _local12.getExplicitOrMeasuredWidth();
_local14 = _local12.getExplicitOrMeasuredHeight();
if (_local2){
_local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3);
_local5 = Math.max(_local13, _local5);
_local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight);
_local6 = (_local6 + _local14);
} else {
_local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth);
_local5 = (_local5 + _local13);
_local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4);
_local6 = Math.max(_local14, _local6);
};
};
_local9++;
};
_local10 = widthPadding(_local8);
_local11 = heightPadding(_local8);
_local1.measuredMinWidth = (_local3 + _local10);
_local1.measuredMinHeight = (_local4 + _local11);
_local1.measuredWidth = (_local5 + _local10);
_local1.measuredHeight = (_local6 + _local11);
}
mx_internal function getHorizontalAlignValue():Number{
var _local1:String;
_local1 = target.getStyle("horizontalAlign");
if (_local1 == "center"){
return (0.5);
};
if (_local1 == "right"){
return (1);
};
return (0);
}
mx_internal function heightPadding(_arg1:Number):Number{
var _local2:EdgeMetrics;
var _local3:Number;
_local2 = target.viewMetricsAndPadding;
_local3 = (_local2.top + _local2.bottom);
if ((((_arg1 > 1)) && (isVertical()))){
_local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1)));
};
return (_local3);
}
mx_internal function widthPadding(_arg1:Number):Number{
var _local2:EdgeMetrics;
var _local3:Number;
_local2 = target.viewMetricsAndPadding;
_local3 = (_local2.left + _local2.right);
if ((((_arg1 > 1)) && ((isVertical() == false)))){
_local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1)));
};
return (_local3);
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:int;
var _local5:EdgeMetrics;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:ScrollBar;
var _local15:ScrollBar;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:IUIComponent;
var _local23:IUIComponent;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
_local3 = super.target;
_local4 = _local3.numChildren;
if (_local4 == 0){
return;
};
_local5 = _local3.viewMetricsAndPadding;
_local6 = _local3.getStyle("paddingLeft");
_local7 = _local3.getStyle("paddingTop");
_local8 = getHorizontalAlignValue();
_local9 = getVerticalAlignValue();
_local10 = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth;
_local11 = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight;
_local12 = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left);
_local13 = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top);
_local14 = _local3.horizontalScrollBar;
_local15 = _local3.verticalScrollBar;
if (_local4 == 1){
_local23 = IUIComponent(_local3.getChildAt(0));
_local24 = _local23.percentWidth;
_local25 = _local23.percentHeight;
if (_local24){
_local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100)));
} else {
_local26 = _local23.getExplicitOrMeasuredWidth();
};
if (_local25){
_local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100)));
} else {
_local27 = _local23.getExplicitOrMeasuredHeight();
};
if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){
_local23.setActualSize(Math.floor(_local26), Math.floor(_local27));
} else {
_local23.setActualSize(_local26, _local27);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
_local20 = (((_local12 - _local23.width) * _local8) + _local6);
_local19 = (((_local13 - _local23.height) * _local9) + _local7);
_local23.move(Math.floor(_local20), Math.floor(_local19));
} else {
if (isVertical()){
_local16 = _local3.getStyle("verticalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local12 = (_local12 + _local15.minWidth);
};
_local19 = (_local7 + (_local18 * _local9));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local20 = (((_local12 - _local22.width) * _local8) + _local6);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local19 = (_local19 + (_local22.height + _local16));
};
_local21++;
};
} else {
_local16 = _local3.getStyle("horizontalGap");
_local17 = _local4;
_local21 = 0;
while (_local21 < _local4) {
if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){
_local17--;
};
_local21++;
};
_local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13);
if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local13 = (_local13 + _local14.minHeight);
};
if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){
_local18 = (_local18 + _local15.minWidth);
};
_local20 = (_local6 + (_local18 * _local8));
_local21 = 0;
while (_local21 < _local4) {
_local22 = IUIComponent(_local3.getChildAt(_local21));
_local19 = (((_local13 - _local22.height) * _local9) + _local7);
_local22.move(Math.floor(_local20), Math.floor(_local19));
if (_local22.includeInLayout){
_local20 = (_local20 + (_local22.width + _local16));
};
_local21++;
};
};
};
}
mx_internal function getVerticalAlignValue():Number{
var _local1:String;
_local1 = target.getStyle("verticalAlign");
if (_local1 == "middle"){
return (0.5);
};
if (_local1 == "bottom"){
return (1);
};
return (0);
}
}
}//package mx.containers.utilityClasses
Section 13
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout)
package mx.containers.utilityClasses {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.events.*;
public class CanvasLayout extends Layout {
private var _contentArea:Rectangle;
mx_internal static const VERSION:String = "2.0.1.0";
private static var r:Rectangle = new Rectangle();
private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent):void{
var _local4:IStyleClient;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Boolean;
var _local16:Boolean;
_local4 = (_arg3 as IStyleClient);
if (!_local4){
return;
};
_local5 = _local4.getStyle("left");
_local6 = _local4.getStyle("right");
_local7 = _local4.getStyle("horizontalCenter");
_local8 = _local4.getStyle("top");
_local9 = _local4.getStyle("bottom");
_local10 = _local4.getStyle("verticalCenter");
_local15 = false;
_local16 = false;
if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){
_local11 = ((_arg1 - _local5) - _local6);
if (_local11 < _arg3.minWidth){
_local11 = _arg3.minWidth;
};
} else {
if (!isNaN(_arg3.percentWidth)){
_local11 = ((_arg3.percentWidth / 100) * _arg1);
_local11 = bound(_local11, _arg3.minWidth, _arg3.maxWidth);
_local15 = true;
} else {
_local11 = _arg3.getExplicitOrMeasuredWidth();
};
};
if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){
_local12 = ((_arg2 - _local8) - _local9);
if (_local12 < _arg3.minHeight){
_local12 = _arg3.minHeight;
};
} else {
if (!isNaN(_arg3.percentHeight)){
_local12 = ((_arg3.percentHeight / 100) * _arg2);
_local12 = bound(_local12, _arg3.minHeight, _arg3.maxHeight);
_local16 = true;
} else {
_local12 = _arg3.getExplicitOrMeasuredHeight();
};
};
if (!isNaN(_local7)){
_local13 = Math.round((((_arg1 - _local11) / 2) + _local7));
} else {
if (!isNaN(_local5)){
_local13 = _local5;
} else {
if (!isNaN(_local6)){
_local13 = ((_arg1 - _local6) - _local11);
};
};
};
if (!isNaN(_local10)){
_local14 = Math.round((((_arg2 - _local12) / 2) + _local10));
} else {
if (!isNaN(_local8)){
_local14 = _local8;
} else {
if (!isNaN(_local9)){
_local14 = ((_arg2 - _local9) - _local12);
};
};
};
_local13 = (isNaN(_local13)) ? _arg3.x : _local13;
_local14 = (isNaN(_local14)) ? _arg3.y : _local14;
_arg3.move(_local13, _local14);
if (_local15){
if ((_local13 + _local11) > _arg1){
_local11 = Math.max((_arg1 - _local13), _arg3.minWidth);
};
};
if (_local16){
if ((_local14 + _local12) > _arg2){
_local12 = Math.max((_arg2 - _local14), _arg3.minHeight);
};
};
if (((!(isNaN(_local11))) && (!(isNaN(_local12))))){
_arg3.setActualSize(_local11, _local12);
};
}
override public function set target(_arg1:Container):void{
var _local2:Container;
var _local3:int;
var _local4:int;
_local2 = super.target;
if (_arg1 != _local2){
if (_local2){
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _local2.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
if (_arg1){
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler);
_arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler);
_local4 = _arg1.numChildren;
_local3 = 0;
while (_local3 < _local4) {
DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler);
_local3++;
};
};
super.target = _arg1;
};
}
override public function measure():void{
var _local1:Container;
var _local2:Number;
var _local3:Number;
var _local4:EdgeMetrics;
var _local5:Rectangle;
_local1 = super.target;
_local2 = 0;
_local3 = 0;
_local4 = _local1.viewMetrics;
_contentArea = null;
_local5 = measureContentArea();
_local1.measuredWidth = ((_local5.width + _local4.left) + _local4.right);
_local1.measuredHeight = ((_local5.height + _local4.top) + _local4.bottom);
}
private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler);
}
private function measureContentArea():Rectangle{
var _local1:int;
var _local2:int;
var _local3:IUIComponent;
var _local4:IStyleClient;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (_contentArea){
return (_contentArea);
};
_contentArea = new Rectangle();
_local1 = target.numChildren;
_local2 = 0;
while (_local2 < _local1) {
_local3 = (target.getChildAt(_local2) as IUIComponent);
_local4 = (_local3 as IStyleClient);
if (!_local3.includeInLayout){
} else {
_local5 = _local3.x;
_local6 = _local3.y;
_local7 = _local3.getExplicitOrMeasuredWidth();
_local8 = _local3.getExplicitOrMeasuredHeight();
if (((!(isNaN(_local3.percentWidth))) || (((((_local4) && (!(isNaN(_local4.getStyle("left")))))) && (!(isNaN(_local4.getStyle("right")))))))){
_local7 = _local3.minWidth;
};
if (((!(isNaN(_local3.percentHeight))) || (((((_local4) && (!(isNaN(_local4.getStyle("top")))))) && (!(isNaN(_local4.getStyle("bottom")))))))){
_local8 = _local3.minHeight;
};
r.x = _local5;
r.y = _local6;
r.width = _local7;
r.height = _local8;
applyAnchorStylesDuringMeasure(_local3, r);
_local5 = r.x;
_local6 = r.y;
_local7 = r.width;
_local8 = r.height;
if (isNaN(_local5)){
_local5 = _local3.x;
};
if (isNaN(_local6)){
_local6 = _local3.y;
};
_local9 = _local5;
_local10 = _local6;
if (isNaN(_local7)){
_local7 = _local3.width;
};
if (isNaN(_local8)){
_local8 = _local3.height;
};
_local9 = (_local9 + _local7);
_local10 = (_local10 + _local8);
_contentArea.right = Math.max(_contentArea.right, _local9);
_contentArea.bottom = Math.max(_contentArea.bottom, _local10);
};
_local2++;
};
return (_contentArea);
}
private function child_moveHandler(_arg1:MoveEvent):void{
var _local2:Container;
if ((_arg1.target is IUIComponent)){
if (!IUIComponent(_arg1.target).includeInLayout){
return;
};
};
_local2 = super.target;
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
_contentArea = null;
};
}
override public function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Container;
var _local4:EdgeMetrics;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:int;
var _local9:IUIComponent;
_local3 = super.target;
_local3.mx_internal::doingLayout = false;
_local4 = _local3.viewMetrics;
_local3.mx_internal::doingLayout = true;
_local5 = ((_arg1 - _local4.left) - _local4.right);
_local6 = ((_arg2 - _local4.top) - _local4.bottom);
_local7 = _local3.numChildren;
_local8 = 0;
while (_local8 < _local7) {
_local9 = (_local3.getChildAt(_local8) as IUIComponent);
applyAnchorStylesDuringUpdateDisplayList(_local5, _local6, _local9);
_local8++;
};
}
private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{
var _local3:IStyleClient;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local3 = (_arg1 as IStyleClient);
if (!_local3){
return;
};
_local4 = _local3.getStyle("left");
_local5 = _local3.getStyle("right");
_local6 = _local3.getStyle("horizontalCenter");
if (!isNaN(_local6)){
_arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local6));
} else {
if (((!(isNaN(_local4))) && (!(isNaN(_local5))))){
_arg2.x = _local4;
_arg2.width = (_arg2.width + _local5);
} else {
if (!isNaN(_local4)){
_arg2.x = _local4;
} else {
if (!isNaN(_local5)){
_arg2.x = 0;
_arg2.width = (_arg2.width + _local5);
};
};
};
};
_local7 = _local3.getStyle("top");
_local8 = _local3.getStyle("bottom");
_local9 = _local3.getStyle("verticalCenter");
if (!isNaN(_local9)){
_arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local9));
} else {
if (((!(isNaN(_local7))) && (!(isNaN(_local8))))){
_arg2.y = _local7;
_arg2.height = (_arg2.height + _local8);
} else {
if (!isNaN(_local7)){
_arg2.y = _local7;
} else {
if (!isNaN(_local8)){
_arg2.y = 0;
_arg2.height = (_arg2.height + _local8);
};
};
};
};
}
private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
_arg1 = _arg2;
} else {
if (_arg1 > _arg3){
_arg1 = _arg3;
} else {
_arg1 = Math.floor(_arg1);
};
};
return (_arg1);
}
private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{
DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler);
}
}
}//package mx.containers.utilityClasses
Section 14
//Flex (mx.containers.utilityClasses.Flex)
package mx.containers.utilityClasses {
import mx.core.*;
public class Flex {
mx_internal static const VERSION:String = "2.0.1.0";
public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
var _local6:Array;
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local4 = _arg2;
_local5 = 0;
_local6 = [];
_local10 = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredHeight();
};
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local11);
_local7 = new FlexChildInfo();
_local7.percent = _local11;
_local7.min = _local8.minWidth;
_local7.max = _local8.maxWidth;
_local7.height = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredWidth();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local14), Math.floor(_local13));
} else {
_local8.setActualSize(_local14, _local13);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.width);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height));
} else {
_local8.setActualSize(_local7.size, _local7.height);
};
_local9++;
};
};
return (_local4);
}
public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
var _local6:Array;
var _local7:FlexChildInfo;
var _local8:IUIComponent;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local4 = _arg2;
_local5 = 0;
_local6 = [];
_local10 = _arg1.numChildren;
_local9 = 0;
while (_local9 < _local10) {
_local8 = IUIComponent(_arg1.getChildAt(_local9));
_local11 = _local8.percentWidth;
_local12 = _local8.percentHeight;
if (((!(isNaN(_local11))) && (_local8.includeInLayout))){
_local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100)));
} else {
_local13 = _local8.getExplicitOrMeasuredWidth();
};
if (((!(isNaN(_local12))) && (_local8.includeInLayout))){
_local5 = (_local5 + _local12);
_local7 = new FlexChildInfo();
_local7.percent = _local12;
_local7.min = _local8.minHeight;
_local7.max = _local8.maxHeight;
_local7.width = _local13;
_local7.child = _local8;
_local6.push(_local7);
} else {
_local14 = _local8.getExplicitOrMeasuredHeight();
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local13), Math.floor(_local14));
} else {
_local8.setActualSize(_local13, _local14);
};
if (_local8.includeInLayout){
_local4 = (_local4 - _local8.height);
};
};
_local9++;
};
if (_local5){
_local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6);
_local10 = _local6.length;
_local9 = 0;
while (_local9 < _local10) {
_local7 = _local6[_local9];
_local8 = _local7.child;
if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){
_local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size));
} else {
_local8.setActualSize(_local7.width, _local7.size);
};
_local9++;
};
};
return (_local4);
}
public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local5:int;
var _local6:Number;
var _local7:Boolean;
var _local8:Number;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
_local5 = _arg4.length;
_local8 = (_arg2 - ((_arg1 * _arg3) / 100));
if (_local8 > 0){
_arg2 = (_arg2 - _local8);
};
do {
_local6 = 0;
_local7 = true;
_local9 = (_arg2 / _arg3);
_local10 = 0;
while (_local10 < _local5) {
_local11 = _arg4[_local10];
_local12 = (_local11.percent * _local9);
if (_local12 < _local11.min){
_local13 = _local11.min;
_local11.size = _local13;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local13);
_local7 = false;
break;
} else {
if (_local12 > _local11.max){
_local14 = _local11.max;
_local11.size = _local14;
--_local5;
_arg4[_local10] = _arg4[_local5];
_arg4[_local5] = _local11;
_arg3 = (_arg3 - _local11.percent);
_arg2 = (_arg2 - _local14);
_local7 = false;
break;
} else {
_local11.size = _local12;
_local6 = (_local6 + _local12);
};
};
_local10++;
};
} while (!(_local7));
return (Math.max(0, Math.floor((_arg2 - _local6))));
}
}
}//package mx.containers.utilityClasses
Section 15
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo)
package mx.containers.utilityClasses {
import mx.core.*;
public class FlexChildInfo {
public var size:Number;// = 0
public var percent:Number;
public var width:Number;
public var max:Number;
public var height:Number;
public var preferred:Number;// = 0
public var min:Number;
public var flex:Number;// = 0
public var child:IUIComponent;
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexChildInfo(){
size = 0;
preferred = 0;
flex = 0;
super();
}
}
}//package mx.containers.utilityClasses
Section 16
//Layout (mx.containers.utilityClasses.Layout)
package mx.containers.utilityClasses {
import mx.core.*;
public class Layout {
private var _target:Container;
mx_internal static const VERSION:String = "2.0.1.0";
public function set target(_arg1:Container):void{
_target = _arg1;
}
public function measure():void{
}
public function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get target():Container{
return (_target);
}
}
}//package mx.containers.utilityClasses
Section 17
//BoxDirection (mx.containers.BoxDirection)
package mx.containers {
public final class BoxDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.containers
Section 18
//DataGridListData (mx.controls.dataGridClasses.DataGridListData)
package mx.controls.dataGridClasses {
import mx.core.*;
import mx.controls.listClasses.*;
public class DataGridListData extends BaseListData {
public var dataField:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){
super(_arg1, _arg4, _arg5, _arg6, _arg3);
this.dataField = _arg2;
}
}
}//package mx.controls.dataGridClasses
Section 19
//BaseListData (mx.controls.listClasses.BaseListData)
package mx.controls.listClasses {
import mx.core.*;
public class BaseListData {
private var _uid:String;
public var label:String;
public var rowIndex:int;
public var owner:IUIComponent;
public var columnIndex:int;
mx_internal static const VERSION:String = "2.0.1.0";
public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){
this.label = _arg1;
this.uid = _arg2;
this.owner = _arg3;
this.rowIndex = _arg4;
this.columnIndex = _arg5;
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
public function get uid():String{
return (_uid);
}
}
}//package mx.controls.listClasses
Section 20
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer)
package mx.controls.listClasses {
public interface IDropInListItemRenderer {
function set listData(_arg1:BaseListData):void;
function get listData():BaseListData;
}
}//package mx.controls.listClasses
Section 21
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer)
package mx.controls.listClasses {
import flash.events.*;
import mx.core.*;
import mx.styles.*;
import mx.managers.*;
public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent {
}
}//package mx.controls.listClasses
Section 22
//ScrollBar (mx.controls.scrollClasses.ScrollBar)
package mx.controls.scrollClasses {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.events.*;
import flash.utils.*;
import mx.controls.*;
import flash.ui.*;
public class ScrollBar extends UIComponent {
mx_internal var isScrolling:Boolean;
mx_internal var oldPosition:Number;
mx_internal var downArrow:Button;
private var _pageSize:Number;// = 0
mx_internal var _minHeight:Number;// = 32
private var trackScrolling:Boolean;// = false
private var trackScrollRepeatDirection:int;
private var _scrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
private var _direction:String;// = "vertical"
mx_internal var upArrow:Button;
private var trackScrollTimer:Timer;
mx_internal var scrollTrack:DisplayObject;
private var _pageScrollSize:Number;// = 0
private var _maxScrollPosition:Number;// = 0
mx_internal var scrollThumb:ScrollThumb;
private var _minScrollPosition:Number;// = 0
private var trackPosition:Number;
mx_internal var _minWidth:Number;// = 16
mx_internal static const VERSION:String = "2.0.1.0";
public static const THICKNESS:Number = 16;
public function ScrollBar(){
_minWidth = 16;
_minHeight = 32;
trackScrolling = false;
_direction = ScrollBarDirection.VERTICAL;
_lineScrollSize = 1;
_maxScrollPosition = 0;
_minScrollPosition = 0;
_pageSize = 0;
_pageScrollSize = 0;
_scrollPosition = 0;
super();
}
private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(1);
}
public function set minScrollPosition(_arg1:Number):void{
_minScrollPosition = _arg1;
}
mx_internal function get virtualHeight():Number{
return (unscaledHeight);
}
mx_internal function get lineMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT);
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
this.pageSize = _arg1;
_pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1;
this.minScrollPosition = Math.max(_arg2, 0);
this.maxScrollPosition = Math.max(_arg3, 0);
_scrollPosition = Math.max(this.minScrollPosition, _scrollPosition);
_scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition);
if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){
upArrow.enabled = true;
downArrow.enabled = true;
addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler);
addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler);
if (!scrollThumb){
scrollThumb = new ScrollThumb();
scrollThumb.focusEnabled = false;
addChildAt(scrollThumb, getChildIndex(downArrow));
scrollThumb.styleName = this;
scrollThumb.upSkinName = "thumbUpSkin";
scrollThumb.overSkinName = "thumbOverSkin";
scrollThumb.downSkinName = "thumbDownSkin";
scrollThumb.iconName = "thumbIcon";
};
_local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight));
if (_local5 < scrollThumb.minHeight){
if (trackHeight < scrollThumb.minHeight){
scrollThumb.visible = false;
} else {
_local5 = scrollThumb.minHeight;
scrollThumb.visible = true;
scrollThumb.setActualSize(_minWidth, scrollThumb.minHeight);
};
} else {
scrollThumb.visible = true;
scrollThumb.setActualSize(_minWidth, _local5);
};
scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition);
scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition);
} else {
upArrow.enabled = false;
downArrow.enabled = false;
if (scrollThumb){
scrollThumb.visible = false;
};
};
}
public function get pageScrollSize():Number{
return (_pageScrollSize);
}
private function get trackY():Number{
return (upArrow.getExplicitOrMeasuredHeight());
}
public function set pageScrollSize(_arg1:Number):void{
_pageScrollSize = _arg1;
}
mx_internal function isScrollBarKey(_arg1:uint):Boolean{
var _local2:Number;
if (_arg1 == Keyboard.HOME){
if (scrollPosition != 0){
_local2 = scrollPosition;
scrollPosition = 0;
dispatchScrollEvent(_local2, minDetail);
};
return (true);
} else {
if (_arg1 == Keyboard.END){
if (scrollPosition < maxScrollPosition){
_local2 = scrollPosition;
scrollPosition = maxScrollPosition;
dispatchScrollEvent(_local2, maxDetail);
};
return (true);
};
};
return (false);
}
private function trackScrollTimerHandler(_arg1:Event):void{
if (trackScrollRepeatDirection == 1){
if ((scrollThumb.y + scrollThumb.height) > trackPosition){
return;
};
};
if (trackScrollRepeatDirection == -1){
if (scrollThumb.y < trackPosition){
return;
};
};
pageScroll(trackScrollRepeatDirection);
if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){
trackScrollTimer.delay = getStyle("repeatInterval");
trackScrollTimer.repeatCount = 0;
};
}
private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{
scrollTrack_mouseLeaveHandler(_arg1);
}
private function get minDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT);
}
override protected function measure():void{
super.measure();
upArrow.validateSize();
downArrow.validateSize();
_minWidth = upArrow.getExplicitOrMeasuredWidth();
_minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight());
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
mx_internal function get linePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT);
}
private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
if (_arg1.target != stage){
return;
};
scrollTrack_mouseMoveHandler(_arg1);
}
private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(-1);
}
private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{
if (_arg1.target != this){
return;
};
if (trackScrolling){
trackScrollTimer.start();
};
}
private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{
if (_arg1.target != this){
return;
};
trackScrolling = true;
systemManager.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
systemManager.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler);
trackPosition = _arg1.localY;
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _arg1.localY)) ? 1 : ((scrollThumb.y > _arg1.localY)) ? -1 : 0;
pageScroll(trackScrollRepeatDirection);
if (!trackScrollTimer){
trackScrollTimer = new Timer(getStyle("repeatDelay"), 1);
trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler);
};
trackScrollTimer.start();
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
}
public function set scrollPosition(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_scrollPosition = _arg1;
if (scrollThumb){
if (!cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = true);
};
if (!isScrolling){
_arg1 = Math.min(_arg1, maxScrollPosition);
_arg1 = Math.max(_arg1, minScrollPosition);
_local2 = (maxScrollPosition - minScrollPosition);
_local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY);
scrollThumb.move(0, Math.round(_local3));
};
};
}
mx_internal function pageScroll(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:String;
_local2 = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize;
_local3 = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{
var _local2:String;
trackScrolling = false;
systemManager.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler);
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler);
if (trackScrollTimer){
trackScrollTimer.reset();
};
if (_arg1.target != this){
return;
};
_local2 = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(oldPosition, _local2);
oldPosition = NaN;
}
private function get trackHeight():Number{
return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight())));
}
public function set pageSize(_arg1:Number):void{
_pageSize = _arg1;
}
mx_internal function get pagePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
invalidateDisplayList();
}
mx_internal function get pageMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT);
}
private function get maxDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT);
}
private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{
if (trackScrolling){
trackScrollTimer.stop();
};
}
mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{
var _local3:ScrollEvent;
_local3 = new ScrollEvent(ScrollEvent.SCROLL);
_local3.detail = _arg2;
_local3.position = scrollPosition;
_local3.delta = (scrollPosition - _arg1);
_local3.direction = direction;
dispatchEvent(_local3);
}
public function set lineScrollSize(_arg1:Number):void{
_lineScrollSize = _arg1;
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("directionChanged"));
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!scrollTrack){
_local1 = getStyle("trackSkin");
scrollTrack = new (_local1);
if ((scrollTrack is ISimpleStyleClient)){
ISimpleStyleClient(scrollTrack).styleName = this;
};
addChild(scrollTrack);
};
if (!upArrow){
upArrow = new Button();
upArrow.enabled = false;
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
upArrow.upSkinName = "upArrowUpSkin";
upArrow.overSkinName = "upArrowOverSkin";
upArrow.downSkinName = "upArrowDownSkin";
upArrow.disabledSkinName = "upArrowDisabledSkin";
upArrow.upIconName = "";
upArrow.overIconName = "";
upArrow.downIconName = "";
upArrow.disabledIconName = "";
addChild(upArrow);
upArrow.styleName = this;
upArrow.validateProperties();
upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler);
};
if (!downArrow){
downArrow = new Button();
downArrow.enabled = false;
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
downArrow.upSkinName = "downArrowUpSkin";
downArrow.overSkinName = "downArrowOverSkin";
downArrow.downSkinName = "downArrowDownSkin";
downArrow.disabledSkinName = "downArrowDisabledSkin";
downArrow.upIconName = "";
downArrow.overIconName = "";
downArrow.downIconName = "";
downArrow.disabledIconName = "";
addChild(downArrow);
downArrow.styleName = this;
downArrow.validateProperties();
downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler);
};
}
public function set maxScrollPosition(_arg1:Number):void{
_maxScrollPosition = _arg1;
}
public function get pageSize():Number{
return (_pageSize);
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
mx_internal function lineScroll(_arg1:int):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:String;
_local2 = _lineScrollSize;
_local3 = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if ($height == 1){
return;
};
if (!upArrow){
return;
};
super.updateDisplayList(_arg1, _arg2);
if (cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = false);
};
upArrow.move(0, 0);
upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight());
scrollTrack.y = 0;
scrollTrack.height = virtualHeight;
downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight());
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize);
scrollPosition = _scrollPosition;
}
private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
if (trackScrolling){
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
trackPosition = _local2.y;
};
}
}
}//package mx.controls.scrollClasses
Section 23
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection)
package mx.controls.scrollClasses {
public final class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.controls.scrollClasses
Section 24
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb)
package mx.controls.scrollClasses {
import flash.events.*;
import flash.geom.*;
import mx.events.*;
import mx.controls.*;
public class ScrollThumb extends Button {
private var lastY:Number;
private var datamax:Number;
private var datamin:Number;
private var ymax:Number;
private var ymin:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function ScrollThumb(){
explicitMinHeight = 10;
stickyHighlighting = true;
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:Number;
var _local4:ScrollBar;
var _local5:Number;
var _local6:Number;
if (ymin == ymax){
return;
};
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
_local3 = (_local2.y - lastY);
_local3 = (_local3 + y);
if (_local3 < ymin){
_local3 = ymin;
} else {
if (_local3 > ymax){
_local3 = ymax;
};
};
_local4 = ScrollBar(parent);
_local4.isScrolling = true;
$y = _local3;
_local5 = _local4.scrollPosition;
_local6 = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin);
_local4.scrollPosition = _local6;
_local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK);
}
override protected function measure():void{
super.measure();
measuredWidth = 14;
measuredHeight = 10;
}
mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.ymin = _arg1;
this.ymax = _arg2;
this.datamin = _arg3;
this.datamax = _arg4;
}
override protected function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:ScrollBar;
super.mouseDownHandler(_arg1);
_local2 = ScrollBar(parent);
_local2.oldPosition = _local2.scrollPosition;
lastY = _arg1.localY;
systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler);
}
override mx_internal function buttonReleased():void{
super.buttonReleased();
stopDragThumb();
}
private function stopDragThumb():void{
var _local1:ScrollBar;
_local1 = ScrollBar(parent);
_local1.isScrolling = false;
_local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION);
_local1.oldPosition = NaN;
systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler);
}
private function stage_mouseMoveHandler(_arg1:MouseEvent):void{
if (_arg1.target != stage){
return;
};
mouseMoveHandler(_arg1);
}
}
}//package mx.controls.scrollClasses
Section 25
//Button (mx.controls.Button)
package mx.controls {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.events.*;
import mx.managers.*;
import flash.text.*;
import mx.controls.listClasses.*;
import flash.utils.*;
import mx.skins.*;
import mx.controls.dataGridClasses.*;
import flash.ui.*;
public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer {
private var enabledChanged:Boolean;// = false
private var skinMeasuredWidth:Number;
mx_internal var disabledSkinName:String;// = "disabledSkin"
mx_internal var downSkinName:String;// = "downSkin"
mx_internal var _labelPlacement:String;// = "right"
private var _data:Object;
private var _phase:String;// = "up"
mx_internal var _toggle:Boolean;// = false
mx_internal var selectedOverSkinName:String;// = "selectedOverSkin"
mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin"
private var labelSet:Boolean;
mx_internal var toggleChanged:Boolean;// = false
private var labelChanged:Boolean;// = false
private var autoRepeatTimer:Timer;
mx_internal var disabledIconName:String;// = "disabledIcon"
mx_internal var upSkinName:String;// = "upSkin"
private var toolTipSet:Boolean;// = false
mx_internal var downIconName:String;// = "downIcon"
mx_internal var currentIcon:IFlexDisplayObject;
private var styleChangedFlag:Boolean;// = true
private var _autoRepeat:Boolean;// = false
mx_internal var selectedOverIconName:String;// = "selectedOverIcon"
private var _label:String;// = ""
mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon"
mx_internal var extraSpacing:Number;
mx_internal var selectedUpSkinName:String;// = "selectedUpSkin"
mx_internal var upIconName:String;// = "upIcon"
mx_internal var buttonOffset:Number;// = 0
private var skinMeasuredHeight:Number;
mx_internal var centerContent:Boolean;// = true
private var oldUnscaledWidth:Number;
private var skins:Array;
mx_internal var overSkinName:String;// = "overSkin"
mx_internal var currentSkin:IFlexDisplayObject;
mx_internal var selectedDownSkinName:String;// = "selectedDownSkin"
private var _listData:BaseListData;
mx_internal var iconName:String;// = "icon"
mx_internal var _emphasized:Boolean;// = false
public var selectedField:String;// = null
private var icons:Array;
public var stickyHighlighting:Boolean;// = false
mx_internal var selectedUpIconName:String;// = "selectedUpIcon"
mx_internal var selectedDownIconName:String;// = "selectedDownIcon"
mx_internal var overIconName:String;// = "overIcon"
private var selectedSet:Boolean;
protected var textField:UITextField;
mx_internal var _selected:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var createAccessibilityImplementation:Function;
public function Button(){
skins = [];
icons = [];
buttonOffset = 0;
centerContent = true;
extraSpacing = (10 + 10);
styleChangedFlag = true;
upSkinName = "upSkin";
overSkinName = "overSkin";
downSkinName = "downSkin";
disabledSkinName = "disabledSkin";
selectedUpSkinName = "selectedUpSkin";
selectedOverSkinName = "selectedOverSkin";
selectedDownSkinName = "selectedDownSkin";
selectedDisabledSkinName = "selectedDisabledSkin";
iconName = "icon";
upIconName = "upIcon";
overIconName = "overIcon";
downIconName = "downIcon";
disabledIconName = "disabledIcon";
selectedUpIconName = "selectedUpIcon";
selectedOverIconName = "selectedOverIcon";
selectedDownIconName = "selectedDownIcon";
selectedDisabledIconName = "selectedDisabledIcon";
enabledChanged = false;
toolTipSet = false;
_autoRepeat = false;
_emphasized = false;
_label = "";
labelChanged = false;
_labelPlacement = ButtonLabelPlacement.RIGHT;
_phase = ButtonPhase.UP;
_selected = false;
selectedField = null;
stickyHighlighting = false;
_toggle = false;
toggleChanged = false;
super();
mouseChildren = false;
addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
addEventListener(MouseEvent.CLICK, clickHandler);
}
override protected function adjustFocusRect(_arg1:DisplayObject=null):void{
super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon));
}
mx_internal function getCurrentIcon():IFlexDisplayObject{
var _local1:String;
var _local2:IFlexDisplayObject;
var _local3:Class;
_local1 = getCurrentIconName();
if (!_local1){
return (null);
};
_local2 = IFlexDisplayObject(getChildByName(_local1));
if (_local2 == null){
_local3 = Class(getStyle(_local1));
if (_local3 == null){
_local3 = Class(getStyle(iconName));
};
if (_local3 != null){
_local2 = IFlexDisplayObject(new (_local3));
_local2.name = _local1;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addChild(DisplayObject(_local2));
icons.push(_local2);
};
};
return (_local2);
}
mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:TextLineMetrics;
var _local21:Number;
var _local22:String;
var _local23:EdgeMetrics;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = 0;
_local8 = 0;
_local9 = 0;
_local10 = 0;
_local11 = 0;
_local12 = 2;
_local13 = 2;
_local14 = getStyle("paddingLeft");
_local15 = getStyle("paddingRight");
_local16 = getStyle("paddingTop");
_local17 = getStyle("paddingBottom");
_local18 = 0;
_local19 = 0;
if (label){
_local20 = measureText(label);
if (_local20.width > 0){
_local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width);
};
_local19 = _local20.height;
} else {
_local20 = measureText("Wj");
_local19 = _local20.height;
};
_local21 = (_arg3) ? buttonOffset : 0;
_local22 = getStyle("textAlign");
_local23 = (((currentSkin) && ((currentSkin is RectangularBorder)))) ? RectangularBorder(currentSkin).borderMetrics : null;
_local24 = _arg1;
_local25 = ((_arg2 - _local16) - _local17);
if (_local23){
_local24 = (_local24 - (_local23.left + _local23.right));
_local25 = (_local25 - (_local23.top + _local23.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING));
textField.height = _local5;
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local8 + _local12);
if (centerContent){
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14));
} else {
_local28 = ((((_local24 - _local4) - _local8) - _local12) / 2);
_local6 = (_local6 + Math.max(_local28, _local14));
};
};
};
_local10 = (_local6 - (_local8 + _local12));
if (!centerContent){
_local6 = (_local6 + _local14);
};
} else {
_local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15);
if (centerContent){
if (_local22 == "left"){
_local6 = 2;
} else {
if (_local22 == "right"){
_local6--;
} else {
if (_local6 > 0){
_local6 = (_local6 / 2);
};
};
};
};
_local10 = ((_local6 + _local4) + _local12);
};
_local7 = 0;
_local11 = _local7;
if (centerContent){
_local11 = (Math.round(((_local25 - _local9) / 2)) + _local16);
_local7 = (Math.round(((_local25 - _local5) / 2)) + _local16);
} else {
_local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16));
_local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16));
};
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((_local19 == 0)))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING));
textField.width = _local4;
_local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5));
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = ((_local24 - _local4) / 2);
_local10 = ((_local24 - _local8) / 2);
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (((_local25 - _local5) - _local9) - _local13);
if (((centerContent) && ((_local7 > 0)))){
_local7 = (_local7 / 2);
};
_local7 = (_local7 + _local16);
_local11 = (((_local7 + _local5) + _local13) - 3);
} else {
_local7 = ((_local9 + _local13) + _local16);
if (centerContent){
_local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1));
};
_local11 = (((_local7 - _local9) - _local13) + 3);
};
};
_local26 = _local21;
_local27 = _local21;
if (_local23){
_local26 = (_local26 + _local23.left);
_local27 = (_local27 + _local23.top);
};
textField.x = (_local6 + _local26);
textField.y = (_local7 + _local27);
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(textField, (numChildren - 1));
};
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonPressed();
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
protected function rollOutHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.UP;
_arg1.updateAfterEvent();
} else {
if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.stop();
};
};
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonReleased();
if (phase == ButtonPhase.DOWN){
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
phase = ButtonPhase.UP;
};
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
if (_arg1){
autoRepeatTimer = new Timer(1);
} else {
autoRepeatTimer = null;
};
}
mx_internal function buttonPressed():void{
phase = ButtonPhase.DOWN;
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.delay = getStyle("repeatDelay");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.start();
};
}
mx_internal function viewIcon():void{
var _local1:String;
_local1 = getCurrentIconName();
viewIconForPhase(_local1);
}
mx_internal function changeSkins():void{
var _local1:int;
var _local2:int;
_local1 = skins.length;
_local2 = 0;
while (_local2 < _local1) {
removeChild(skins[_local2]);
_local2++;
};
skins = [];
}
private function autoRepeatTimer_timerHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
}
private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{
if (contains(DisplayObject(_arg1.target))){
return;
};
phase = ButtonPhase.UP;
buttonReleased();
_arg1.updateAfterEvent();
}
protected function mouseUpHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
phase = ButtonPhase.OVER;
buttonReleased();
_arg1.updateAfterEvent();
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelPlacementChanged"));
}
mx_internal function viewIconForPhase(_arg1:String):void{
var _local2:IFlexDisplayObject;
var _local3:Class;
_local2 = IFlexDisplayObject(getChildByName(_arg1));
if (_local2 == null){
_local3 = Class(getStyle(_arg1));
if (_local3 == null){
_local3 = Class(getStyle(iconName));
};
if (_local3 != null){
_local2 = IFlexDisplayObject(new (_local3));
_local2.name = _arg1;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addChild(DisplayObject(_local2));
icons.push(_local2);
};
};
if (currentIcon != null){
currentIcon.visible = false;
};
currentIcon = _local2;
if (currentIcon != null){
currentIcon.visible = true;
};
}
mx_internal function getTextField():UITextField{
return (textField);
}
mx_internal function setSelected(_arg1:Boolean):void{
if (_selected != _arg1){
_selected = _arg1;
invalidateDisplayList();
if (toggle){
dispatchEvent(new Event(Event.CHANGE));
};
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
};
}
protected function clickHandler(_arg1:MouseEvent):void{
if (!enabled){
_arg1.stopImmediatePropagation();
return;
};
if (toggle){
setSelected(!(selected));
};
}
mx_internal function getCurrentIconName():String{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledIconName : disabledIconName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpIconName : upIconName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverIconName : overIconName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownIconName : downIconName;
};
};
};
};
return (_local1);
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function measure():void{
var textWidth:Number;
var textHeight:Number;
var bm:EdgeMetrics;
var tempCurrentIcon:IFlexDisplayObject;
var iconWidth:Number;
var iconHeight:Number;
var w:Number;
var h:Number;
var lineMetrics:TextLineMetrics;
super.measure();
textWidth = 0;
textHeight = 0;
if (label){
lineMetrics = measureText(label);
textWidth = lineMetrics.width;
textHeight = lineMetrics.height;
textWidth = (textWidth + ((getStyle("paddingLeft") + getStyle("paddingRight")) + getStyle("textIndent")));
textHeight = (textHeight + (getStyle("paddingTop") + getStyle("paddingBottom")));
};
try {
bm = currentSkin["borderMetrics"];
} catch(e:Error) {
bm = new EdgeMetrics(3, 3, 3, 3);
};
tempCurrentIcon = getCurrentIcon();
iconWidth = (tempCurrentIcon) ? tempCurrentIcon.width : 0;
iconHeight = (tempCurrentIcon) ? tempCurrentIcon.height : 0;
w = 0;
h = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
w = (textWidth + iconWidth);
if (iconWidth != 0){
w = (w + (getStyle("horizontalGap") - 2));
};
h = Math.max(textHeight, (iconHeight + 6));
} else {
w = Math.max(textWidth, iconWidth);
h = (textHeight + iconHeight);
if (iconHeight != 0){
h = (h + getStyle("verticalGap"));
};
};
if (bm){
w = (w + (bm.left + bm.right));
h = (h + (bm.top + bm.bottom));
};
if (((label) && (!((label.length == 0))))){
w = (w + extraSpacing);
} else {
w = (w + 6);
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
w = Math.max(skinMeasuredWidth, w);
};
if (!isNaN(skinMeasuredHeight)){
h = Math.max(skinMeasuredHeight, h);
};
measuredMinWidth = (measuredWidth = w);
measuredMinHeight = (measuredHeight = h);
}
mx_internal function get phase():String{
return (_phase);
}
public function set selected(_arg1:Boolean):void{
selectedSet = true;
setSelected(_arg1);
}
mx_internal function changeIcons():void{
var _local1:int;
var _local2:int;
_local1 = icons.length;
_local2 = 0;
while (_local2 < _local1) {
removeChild(icons[_local2]);
_local2++;
};
icons = [];
}
override protected function commitProperties():void{
super.commitProperties();
if (!initialized){
viewSkin();
viewIcon();
};
if (enabledChanged){
textField.enabled = enabled;
enabledChanged = false;
};
if (toggleChanged){
if (!toggle){
selected = false;
};
toggleChanged = false;
};
}
public function get listData():BaseListData{
return (_listData);
}
mx_internal function viewSkin():void{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledSkinName : disabledSkinName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpSkinName : upSkinName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverSkinName : overSkinName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownSkinName : downSkinName;
};
};
};
};
viewSkinForPhase(_local1);
}
public function set label(_arg1:String):void{
labelSet = true;
if (_label != _arg1){
_label = _arg1;
labelChanged = true;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelChanged"));
};
}
mx_internal function viewSkinForPhase(_arg1:String):void{
var _local2:IFlexDisplayObject;
var _local3:Number;
var _local4:Class;
var _local5:ISimpleStyleClient;
_local2 = IFlexDisplayObject(getChildByName(_arg1));
if (!_local2){
_local4 = Class(getStyle(_arg1));
if (_local4){
_local2 = IFlexDisplayObject(new (_local4));
_local2.name = _arg1;
_local5 = (_local2 as ISimpleStyleClient);
if (_local5){
_local5.styleName = this;
};
addChild(DisplayObject(_local2));
_local2.setActualSize(unscaledWidth, unscaledHeight);
if ((((_local2 is IInvalidating)) && (initialized))){
IInvalidating(_local2).validateNow();
} else {
if ((((_local2 is ProgrammaticSkin)) && (initialized))){
ProgrammaticSkin(_local2).validateDisplayList();
};
};
skins.push(_local2);
};
};
if (currentSkin){
currentSkin.visible = false;
};
currentSkin = _local2;
if (currentSkin){
currentSkin.visible = true;
};
if (enabled){
if (phase == ButtonPhase.OVER){
_local3 = textField.getStyle("textRollOverColor");
} else {
if (phase == ButtonPhase.DOWN){
_local3 = textField.getStyle("textSelectedColor");
} else {
_local3 = textField.getStyle("color");
};
};
textField.setColor(_local3);
};
}
private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.reset();
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.delay = getStyle("repeatInterval");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.start();
};
}
protected function mouseDownHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
buttonPressed();
_arg1.updateAfterEvent();
}
override public function set enabled(_arg1:Boolean):void{
if (super.enabled == _arg1){
return;
};
super.enabled = _arg1;
enabledChanged = true;
invalidateProperties();
invalidateDisplayList();
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override public function get baselinePosition():Number{
var _local1:String;
var _local2:TextLineMetrics;
_local1 = label;
if (!_local1){
_local1 = "Wj";
};
validateNow();
if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){
_local2 = measureText(_local1);
return ((((measuredHeight - _local2.height) / 2) + _local2.ascent));
};
return ((textField.y + measureText(_local1).ascent));
}
public function set toggle(_arg1:Boolean):void{
_toggle = _arg1;
toggleChanged = true;
invalidateProperties();
invalidateDisplayList();
dispatchEvent(new Event("toggleChanged"));
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
changeSkins();
invalidateDisplayList();
}
public function get selected():Boolean{
return (_selected);
}
mx_internal function buttonReleased():void{
systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler);
if (autoRepeatTimer){
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.reset();
};
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
mx_internal function set phase(_arg1:String):void{
_phase = _arg1;
invalidateSize();
invalidateDisplayList();
}
private function stage_mouseLeaveHandler(_arg1:Event):void{
phase = ButtonPhase.UP;
buttonReleased();
}
public function get label():String{
return (_label);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (phase != ButtonPhase.UP){
phase = ButtonPhase.UP;
};
}
override protected function createChildren():void{
super.createChildren();
if (!textField){
textField = new UITextField();
textField.styleName = this;
addChild(textField);
};
}
protected function rollOverHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.UP){
if (_arg1.buttonDown){
return;
};
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
} else {
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.DOWN;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.start();
};
};
};
}
public function set data(_arg1:Object):void{
var _local2:*;
var _local3:*;
_data = _arg1;
if (((_listData) && ((_listData is DataGridListData)))){
_local2 = _data[DataGridListData(_listData).dataField];
_local3 = "";
} else {
if (_listData){
if (selectedField){
_local2 = _data[selectedField];
};
_local3 = _listData.label;
} else {
_local2 = _data;
};
};
if (((!((_local2 === undefined))) && (!(selectedSet)))){
selected = (_local2 as Boolean);
selectedSet = false;
};
if (((!((_local3 === undefined))) && (!(labelSet)))){
label = _local3;
labelSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
public function get data():Object{
if (!_data){
_data = {};
};
return (_data);
}
public function get toggle():Boolean{
return (_toggle);
}
override public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
super.styleChanged(_arg1);
if (((!(_arg1)) || ((_arg1 == "styleName")))){
changeSkins();
changeIcons();
} else {
if (_arg1.toLowerCase().indexOf("skin") != -1){
changeSkins();
} else {
if (_arg1.toLowerCase().indexOf("icon") != -1){
changeIcons();
invalidateSize();
};
};
};
}
override public function set toolTip(_arg1:String):void{
super.toolTip = _arg1;
if (_arg1){
toolTipSet = true;
} else {
toolTipSet = false;
invalidateDisplayList();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:int;
var _local4:int;
var _local5:IFlexDisplayObject;
var _local6:Boolean;
super.updateDisplayList(_arg1, _arg2);
_local3 = skins.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(skins[_local4]);
_local5.setActualSize(_arg1, _arg2);
_local4++;
};
viewSkin();
viewIcon();
if (((currentIcon) && ((currentIcon is IUIComponent)))){
IUIComponent(currentIcon).enabled = enabled;
};
layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN));
if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){
textField.text = label;
_local6 = textField.truncateToFit();
if (!toolTipSet){
if (_local6){
super.toolTip = label;
} else {
super.toolTip = null;
};
};
styleChangedFlag = false;
labelChanged = false;
};
oldUnscaledWidth = _arg1;
}
}
}//package mx.controls
Section 26
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement)
package mx.controls {
public final class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
mx_internal static const VERSION:String = "2.0.1.0";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package mx.controls
Section 27
//ButtonPhase (mx.controls.ButtonPhase)
package mx.controls {
public final class ButtonPhase {
public static const DOWN:String = "down";
public static const OVER:String = "over";
mx_internal static const VERSION:String = "2.0.1.0";
public static const UP:String = "up";
}
}//package mx.controls
Section 28
//HScrollBar (mx.controls.HScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class HScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "2.0.1.0";
public function HScrollBar(){
super.direction = ScrollBarDirection.HORIZONTAL;
scaleX = -1;
rotation = -90;
}
override mx_internal function get virtualHeight():Number{
return (unscaledWidth);
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.LEFT){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.RIGHT){
lineScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override protected function measure():void{
super.measure();
measuredWidth = _minHeight;
measuredHeight = _minWidth;
}
override public function get minHeight():Number{
return (_minWidth);
}
override public function get minWidth():Number{
return (_minHeight);
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 29
//ToolTip (mx.controls.ToolTip)
package mx.controls {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import mx.skins.*;
public class ToolTip extends UIComponent implements IToolTip {
mx_internal var border:IFlexDisplayObject;
private var textChanged:Boolean;
private var _text:String;
protected var textField:UITextField;
mx_internal static const VERSION:String = "2.0.1.0";
public static var maxWidth:Number = 300;
public function ToolTip(){
mouseEnabled = false;
}
mx_internal function getTextField():UITextField{
return (textField);
}
public function get text():String{
return (_text);
}
override protected function measure():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
super.measure();
_local1 = borderMetrics;
_local2 = (_local1.left + getStyle("paddingLeft"));
_local3 = (_local1.top + getStyle("paddingTop"));
_local4 = (_local1.right + getStyle("paddingRight"));
_local5 = (_local1.bottom + getStyle("paddingBottom"));
_local6 = (_local2 + _local4);
_local7 = (_local3 + _local5);
textField.wordWrap = false;
if ((textField.textWidth + _local6) > ToolTip.maxWidth){
textField.width = (ToolTip.maxWidth - _local6);
textField.wordWrap = true;
};
measuredWidth = (textField.width + _local6);
measuredHeight = (textField.height + _local7);
}
override protected function commitProperties():void{
var _local1:TextFormat;
super.commitProperties();
if (textChanged){
_local1 = textField.getTextFormat();
_local1.leftMargin = 0;
_local1.rightMargin = 0;
textField.defaultTextFormat = _local1;
textField.text = _text;
textChanged = false;
};
}
public function set text(_arg1:String):void{
_text = _arg1;
textChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!border){
_local1 = getStyle("borderSkin");
border = new (_local1);
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
addChild(DisplayObject(border));
};
if (!textField){
textField = new UITextField();
textField.autoSize = TextFieldAutoSize.LEFT;
textField.mouseEnabled = false;
textField.multiline = true;
textField.selectable = false;
textField.wordWrap = false;
textField.styleName = this;
addChild(textField);
};
}
private function get borderMetrics():EdgeMetrics{
if ((border is RectangularBorder)){
return (RectangularBorder(border).borderMetrics);
};
return (EdgeMetrics.EMPTY);
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
invalidateDisplayList();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
super.updateDisplayList(_arg1, _arg2);
_local3 = borderMetrics;
_local4 = (_local3.left + getStyle("paddingLeft"));
_local5 = (_local3.top + getStyle("paddingTop"));
_local6 = (_local3.right + getStyle("paddingRight"));
_local7 = (_local3.bottom + getStyle("paddingBottom"));
_local8 = (_local4 + _local6);
_local9 = (_local5 + _local7);
border.setActualSize(_arg1, _arg2);
textField.move(_local4, _local5);
textField.setActualSize((_arg1 - _local8), (_arg2 - _local9));
}
}
}//package mx.controls
Section 30
//VScrollBar (mx.controls.VScrollBar)
package mx.controls {
import mx.controls.scrollClasses.*;
import flash.ui.*;
public class VScrollBar extends ScrollBar {
mx_internal static const VERSION:String = "2.0.1.0";
public function VScrollBar(){
super.direction = ScrollBarDirection.VERTICAL;
}
override mx_internal function isScrollBarKey(_arg1:uint):Boolean{
if (_arg1 == Keyboard.UP){
lineScroll(-1);
return (true);
};
if (_arg1 == Keyboard.DOWN){
lineScroll(1);
return (true);
};
if (_arg1 == Keyboard.PAGE_UP){
pageScroll(-1);
return (true);
};
if (_arg1 == Keyboard.PAGE_DOWN){
pageScroll(1);
return (true);
};
return (super.isScrollBarKey(_arg1));
}
override protected function measure():void{
super.measure();
measuredWidth = _minWidth;
measuredHeight = _minHeight;
}
override public function get minHeight():Number{
return (_minHeight);
}
override public function get minWidth():Number{
return (_minWidth);
}
override public function set direction(_arg1:String):void{
}
}
}//package mx.controls
Section 31
//Application (mx.core.Application)
package mx.core {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import mx.styles.*;
import mx.effects.*;
import mx.events.*;
import mx.managers.*;
import flash.net.*;
import flash.utils.*;
import mx.containers.utilityClasses.*;
import flash.ui.*;
import flash.external.*;
public class Application extends LayoutContainer {
public var frameRate:Number;
private var _viewSourceURL:String;
public var scriptTimeLimit:Number;
public var resetHistory:Boolean;// = true
mx_internal var _url:String;
public var preloader:Object;
public var pageTitle:String;
private var processingCreationQueue:Boolean;// = false
private var creationQueue:Array;
private var resizeWidth:Boolean;// = true
public var controlBar:IUIComponent;
private var _applicationViewMetrics:EdgeMetrics;
private var preloadObj:Object;
public var usePreloader:Boolean;
private var resizeHandlerAdded:Boolean;// = false
private var resizeHeight:Boolean;// = true
public var scriptRecursionLimit:int;
mx_internal var _parameters:Object;
mx_internal static const VERSION:String = "2.0.1.0";
private static var viewSourceMenuItem:String;
mx_internal static var useProgressiveLayout:Boolean = false;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function Application(){
resizeHandlerAdded = false;
creationQueue = [];
processingCreationQueue = false;
resizeWidth = true;
resizeHeight = true;
resetHistory = true;
name = "application";
UIComponentGlobals.layoutManager = (Singleton.getInstance("mx.managers::ILayoutManager") as ILayoutManager);
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
if (!ApplicationGlobals.application){
ApplicationGlobals.application = this;
};
super();
layoutObject = new ApplicationLayout();
layoutObject.target = this;
boxLayoutClass = ApplicationLayout;
showInAutomationHierarchy = true;
}
mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{
var controlBar = _arg1;
var dock = _arg2;
if (dock){
try {
removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex);
setControlBar(controlBar);
} else {
try {
rawChildren.removeChild(DisplayObject(controlBar));
} catch(e:Error) {
return;
};
setControlBar(null);
addChildAt(DisplayObject(controlBar), 0);
};
}
override mx_internal function initThemeColor():Boolean{
var _local1:Boolean;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:CSSStyleDeclaration;
_local1 = super.initThemeColor();
if (!_local1){
_local5 = StyleManager.getStyleDeclaration("global");
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
};
_local1 = true;
};
return (_local1);
}
private function resizeHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (resizeWidth){
if (isNaN(percentWidth)){
_local2 = DisplayObject(systemManager).width;
} else {
super.percentWidth = Math.max(percentWidth, 0);
super.percentWidth = Math.min(percentWidth, 100);
_local2 = ((percentWidth * screen.width) / 100);
};
if (!isNaN(explicitMaxWidth)){
_local2 = Math.min(_local2, explicitMaxWidth);
};
if (!isNaN(explicitMinWidth)){
_local2 = Math.max(_local2, explicitMinWidth);
};
} else {
_local2 = width;
};
if (resizeHeight){
if (isNaN(percentHeight)){
_local3 = DisplayObject(systemManager).height;
} else {
super.percentHeight = Math.max(percentHeight, 0);
super.percentHeight = Math.min(percentHeight, 100);
_local3 = ((percentHeight * screen.height) / 100);
};
if (!isNaN(explicitMaxHeight)){
_local3 = Math.min(_local3, explicitMaxHeight);
};
if (!isNaN(explicitMinHeight)){
_local3 = Math.max(_local3, explicitMinHeight);
};
} else {
_local3 = height;
};
if (((!((_local2 == width))) || (!((_local3 == height))))){
invalidateProperties();
invalidateSize();
};
setActualSize(_local2, _local3);
invalidateDisplayList();
}
override public function set tabIndex(_arg1:int):void{
}
public function set viewSourceURL(_arg1:String):void{
_viewSourceURL = _arg1;
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
private function initContextMenu():void{
var _local1:ContextMenu;
var _local2:ContextMenuItem;
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
_local1.builtInItems.print = true;
if (_viewSourceURL){
_local2 = new ContextMenuItem(viewSourceMenuItem, true);
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
_local1.customItems.push(_local2);
};
contextMenu = _local1;
}
override public function set icon(_arg1:Class):void{
}
override public function set percentWidth(_arg1:Number):void{
super.percentWidth = _arg1;
invalidateDisplayList();
}
override public function getChildIndex(_arg1:DisplayObject):int{
if (((controlBar) && ((_arg1 == controlBar)))){
return (-1);
};
return (super.getChildIndex(_arg1));
}
override public function get id():String{
if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){
return (ExternalInterface.objectID);
};
return (super.id);
}
override protected function measure():void{
var _local1:EdgeMetrics;
var _local2:Number;
super.measure();
_local1 = borderMetrics;
if (((controlBar) && (controlBar.includeInLayout))){
_local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right);
measuredWidth = Math.max(measuredWidth, _local2);
measuredMinWidth = Math.max(measuredMinWidth, _local2);
};
}
public function get url():String{
return (_url);
}
private function debugTickler():void{
var _local1:int;
_local1 = 0;
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg2 == this){
setActualSize(_arg1.width, _arg1.height);
if (horizontalScrollBar){
horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible;
};
if (verticalScrollBar){
verticalScrollBar.visible = _arg1.verticalScrollBarVisible;
};
if (whiteBox){
whiteBox.visible = _arg1.whiteBoxVisible;
};
horizontalScrollPosition = _arg1.horizontalScrollPosition;
verticalScrollPosition = _arg1.verticalScrollPosition;
updateDisplayList(unscaledWidth, unscaledHeight);
};
super.finishPrint(_arg1.scrollRect, _arg2);
}
override public function set label(_arg1:String):void{
}
public function get parameters():Object{
return (_parameters);
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Object;
_local2 = {};
if (_arg1 == this){
_local2.width = width;
_local2.height = height;
_local2.verticalScrollPosition = verticalScrollPosition;
_local2.horizontalScrollPosition = horizontalScrollPosition;
_local2.horizontalScrollBarVisible = !((horizontalScrollBar == null));
_local2.verticalScrollBarVisible = !((verticalScrollBar == null));
_local2.whiteBoxVisible = !((whiteBox == null));
setActualSize(measuredWidth, measuredHeight);
horizontalScrollPosition = 0;
verticalScrollPosition = 0;
if (horizontalScrollBar){
horizontalScrollBar.visible = false;
};
if (verticalScrollBar){
verticalScrollBar.visible = false;
};
if (whiteBox){
whiteBox.visible = false;
};
updateDisplayList(unscaledWidth, unscaledHeight);
};
_local2.scrollRect = super.prepareToPrint(_arg1);
return (_local2);
}
public function get viewSourceURL():String{
return (_viewSourceURL);
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
var _local3:EdgeMetrics;
var _local4:Number;
var _local5:EdgeMetrics;
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
_local3 = borderMetrics;
_local4 = getStyle("borderThickness");
_local5 = new EdgeMetrics();
_local5.left = (_local3.left - _local4);
_local5.top = (_local3.top - _local4);
_local5.right = (_local3.right - _local4);
_local5.bottom = (_local3.bottom - _local4);
if (((controlBar) && (controlBar.includeInLayout))){
if ((controlBar is IInvalidating)){
IInvalidating(controlBar).invalidateDisplayList();
};
controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight());
controlBar.move(_local5.left, _local5.top);
};
}
override public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:EdgeMetrics;
var _local3:Number;
if (!_applicationViewMetrics){
_applicationViewMetrics = new EdgeMetrics();
};
_local1 = _applicationViewMetrics;
_local2 = super.viewMetrics;
_local3 = getStyle("borderThickness");
_local1.left = _local2.left;
_local1.top = _local2.top;
_local1.right = _local2.right;
_local1.bottom = _local2.bottom;
if (((controlBar) && (controlBar.includeInLayout))){
_local1.top = (_local1.top - _local3);
_local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3));
};
return (_local1);
}
private function addedHandler(_arg1:Event):void{
if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){
doNextQueueItem();
};
}
private function menuItemSelectHandler(_arg1:Event):void{
navigateToURL(new URLRequest(_viewSourceURL), "_blank");
}
private function doNextQueueItem(_arg1:FlexEvent=null):void{
processingCreationQueue = true;
Application.useProgressiveLayout = true;
callLater(processNextQueueItem);
}
private function setControlBar(_arg1:IUIComponent):void{
if (_arg1 == controlBar){
return;
};
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).clearStyle("cornerRadius");
IStyleClient(controlBar).clearStyle("docked");
};
controlBar = _arg1;
if (((controlBar) && ((controlBar is IStyleClient)))){
IStyleClient(controlBar).setStyle("cornerRadius", 0);
IStyleClient(controlBar).setStyle("docked", true);
};
invalidateSize();
invalidateDisplayList();
invalidateViewMetricsAndPadding();
}
override public function initialize():void{
var _local1:ISystemManager;
var _local2:Object;
_local1 = systemManager;
_url = _local1.loaderInfo.url;
_parameters = _local1.loaderInfo.parameters;
initManagers(_local1);
_descriptor = null;
if (documentDescriptor){
(creationPolicy == documentDescriptor.properties.creationPolicy);
if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){
creationPolicy = ContainerCreationPolicy.AUTO;
};
_local2 = documentDescriptor.properties;
if (_local2.width != null){
width = _local2.width;
delete _local2.width;
};
if (_local2.height != null){
height = _local2.height;
delete _local2.height;
};
documentDescriptor.events = null;
};
initContextMenu();
super.initialize();
addEventListener(Event.ADDED, addedHandler);
if (((_local1.isTopLevel()) && ((Capabilities.isDebugger == true)))){
setInterval(debugTickler, 1500);
};
}
private function initManagers(_arg1:ISystemManager):void{
if (_arg1.isTopLevel()){
focusManager = new FocusManager(this);
_arg1.activate(this);
};
}
override public function set percentHeight(_arg1:Number):void{
super.percentHeight = _arg1;
invalidateDisplayList();
}
private function printCreationQueue():void{
var _local1:String;
var _local2:Number;
var _local3:int;
var _local4:Object;
_local1 = "";
_local2 = creationQueue.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = creationQueue[_local3];
_local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index));
_local3++;
};
}
override public function set toolTip(_arg1:String):void{
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){
clearStyle("backgroundImage");
};
}
private function processNextQueueItem():void{
var queueItem:Object;
var nextChild:IUIComponent;
if (EffectManager.effectsPlaying.length > 0){
callLater(processNextQueueItem);
} else {
if (creationQueue.length > 0){
queueItem = creationQueue.shift();
try {
nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id;
if ((nextChild is Container)){
Container(nextChild).createComponentsFromDescriptors(true);
};
if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){
doNextQueueItem();
} else {
nextChild.addEventListener("childrenCreationComplete", doNextQueueItem);
};
} catch(e:Error) {
processNextQueueItem();
};
} else {
processingCreationQueue = false;
Application.useProgressiveLayout = false;
};
};
}
public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{
var _local5:int;
var _local6:Object;
var _local7:Boolean;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
_local5 = creationQueue.length;
_local6 = {};
_local7 = false;
_local6.id = _arg1;
_local6.parent = _arg4;
_local6.callbackFunc = _arg3;
_local6.index = _arg2;
_local11 = 0;
while (_local11 < _local5) {
_local9 = creationQueue[_local11].index;
_local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0;
if (_local6.index != -1){
if ((((_local9 == -1)) || ((_local6.index < _local9)))){
_local8 = _local11;
_local7 = true;
break;
};
} else {
_local12 = (_local6.parent) ? _local6.parent.nestLevel : 0;
if ((((_local9 == -1)) && ((_local10 < _local12)))){
_local8 = _local11;
_local7 = true;
break;
};
};
_local11++;
};
if (!_local7){
creationQueue.push(_local6);
_local7 = true;
} else {
creationQueue.splice(_local8, 0, _local6);
};
if (((initialized) && (!(processingCreationQueue)))){
doNextQueueItem();
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
resizeWidth = isNaN(explicitWidth);
resizeHeight = isNaN(explicitHeight);
if (((resizeWidth) || (resizeHeight))){
resizeHandler(new Event(Event.RESIZE));
if (!resizeHandlerAdded){
systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true);
resizeHandlerAdded = true;
};
} else {
if (resizeHandlerAdded){
systemManager.removeEventListener(Event.RESIZE, resizeHandler);
resizeHandlerAdded = false;
};
};
createBorder();
}
private static function loadResources():void{
viewSourceMenuItem = packageResources.getString("viewSource");
}
public static function get application():Object{
return (ApplicationGlobals.application);
}
loadResources();
}
}//package mx.core
Section 32
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 33
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "2.0.1.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 34
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 35
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var document:Object;
public var type:Class;
public var propertiesFactory:Function;
private var _properties:Object;
public var id:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 36
//Container (mx.core.Container)
package mx.core {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.events.*;
import mx.managers.*;
import flash.text.*;
import mx.graphics.*;
import mx.controls.scrollClasses.*;
import mx.binding.*;
import mx.controls.listClasses.*;
import mx.skins.*;
import mx.controls.*;
import flash.ui.*;
public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer {
private var _horizontalLineScrollSize:Number;// = 5
mx_internal var border:IFlexDisplayObject;
private var _viewMetricsAndPadding:EdgeMetrics;
private var scrollableWidth:Number;// = 0
private var _rawChildren:ContainerRawChildrenList;
private var _data:Object;
private var _viewMetrics:EdgeMetrics;
private var changedStyles:String;// = null
private var _verticalPageScrollSize:Number;// = 0
private var mouseEventReferenceCount:int;// = 0
protected var whiteBox:Shape;
private var _verticalScrollBar:ScrollBar;
private var _horizontalPageScrollSize:Number;// = 0
private var _clipContent:Boolean;// = true
private var _icon:Class;// = null
mx_internal var doingLayout:Boolean;// = false
private var _createdComponents:Array;
private var _firstChildIndex:int;// = 0
private var scrollableHeight:Number;// = 0
mx_internal var _numChildren:int;// = 0
private var recursionFlag:Boolean;// = true
private var forceLayout:Boolean;// = false
mx_internal var blocker:Sprite;
private var _label:String;// = ""
private var _numChildrenCreated:int;// = -1
protected var actualCreationPolicy:String;
private var _childRepeaters:Array;
private var _childDescriptors:Array;
private var scrollPropertiesChanged:Boolean;// = false
private var scrollPositionChanged:Boolean;// = true
private var _focusPane:Sprite;
private var _defaultButton:IFlexDisplayObject;
private var _forceClippingCount:int;
mx_internal var creatingContentPane:Boolean;// = false
private var _creationPolicy:String;
private var _creationIndex:int;// = -1
private var _verticalScrollPosition:Number;// = 0
private var _autoLayout:Boolean;// = true
private var _horizontalScrollBar:ScrollBar;
private var viewableHeight:Number;// = 0
private var viewableWidth:Number;// = 0
mx_internal var contentPane:Sprite;// = null
private var numChildrenBefore:int;
private var _verticalLineScrollSize:Number;// = 5
private var _horizontalScrollPosition:Number;// = 0
mx_internal var _horizontalScrollPolicy:String;// = "auto"
private var verticalScrollPositionPending:Number;
mx_internal var _verticalScrollPolicy:String;// = "auto"
private var horizontalScrollPositionPending:Number;
private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>";
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceMultipleChildSets_ClassAndInstance:String;
private static var resourceMultipleChildSets_ClassAndSubclass:String;
private static var resourceScrollDirection:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function Container(){
recursionFlag = true;
forceLayout = false;
doingLayout = false;
changedStyles = null;
creatingContentPane = false;
contentPane = null;
scrollPropertiesChanged = false;
scrollPositionChanged = true;
scrollableWidth = 0;
scrollableHeight = 0;
viewableWidth = 0;
viewableHeight = 0;
mouseEventReferenceCount = 0;
_numChildren = 0;
_autoLayout = true;
_clipContent = true;
_creationIndex = -1;
_firstChildIndex = 0;
_horizontalLineScrollSize = 5;
_horizontalPageScrollSize = 0;
_horizontalScrollPosition = 0;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_icon = null;
_label = "";
_numChildrenCreated = -1;
_verticalLineScrollSize = 5;
_verticalPageScrollSize = 0;
_verticalScrollPosition = 0;
_verticalScrollPolicy = ScrollPolicy.AUTO;
super();
tabChildren = true;
tabEnabled = false;
showInAutomationHierarchy = false;
}
mx_internal function get firstChildIndex():int{
return (_firstChildIndex);
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
protected function scrollChildren():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Rectangle;
if (!contentPane){
return;
};
_local1 = viewMetrics;
_local2 = 0;
_local3 = 0;
_local4 = ((unscaledWidth - _local1.left) - _local1.right);
_local5 = ((unscaledHeight - _local1.top) - _local1.bottom);
if (_clipContent){
_local2 = (_local2 + _horizontalScrollPosition);
if (horizontalScrollBar){
_local4 = viewableWidth;
};
_local3 = (_local3 + _verticalScrollPosition);
if (verticalScrollBar){
_local5 = viewableHeight;
};
} else {
_local4 = scrollableWidth;
_local5 = scrollableHeight;
};
_local6 = getScrollableRect();
if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){
contentPane.scrollRect = null;
contentPane.opaqueBackground = null;
contentPane.cacheAsBitmap = false;
} else {
contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5);
};
if (focusPane){
focusPane.scrollRect = contentPane.scrollRect;
};
if (((((border) && ((border is RectangularBorder)))) && (RectangularBorder(border).hasBackgroundImage))){
RectangularBorder(border).adjustBackgroundImage();
};
}
mx_internal function get createdComponents():Array{
return (_createdComponents);
}
public function get childDescriptors():Array{
return (_childDescriptors);
}
public function get verticalScrollPosition():Number{
if (!isNaN(verticalScrollPositionPending)){
return (verticalScrollPositionPending);
};
return (_verticalScrollPosition);
}
mx_internal function set createdComponents(_arg1:Array):void{
_createdComponents = _arg1;
}
mx_internal function get childRepeaters():Array{
return (_childRepeaters);
}
public function get horizontalScrollPosition():Number{
if (!isNaN(horizontalScrollPositionPending)){
return (horizontalScrollPositionPending);
};
return (_horizontalScrollPosition);
}
override public function get focusPane():Sprite{
return (_focusPane);
}
private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{
var _local4:Boolean;
var _local5:IFocusManager;
var _local6:String;
var _local7:String;
var _local8:Graphics;
_local4 = false;
if (((((_arg1) || (_arg2))) || (_arg3))){
createContentPane();
};
if (_arg1){
if (!horizontalScrollBar){
horizontalScrollBar = new HScrollBar();
horizontalScrollBar.name = "horizontalScrollBar";
_local6 = getStyle("horizontalScrollBarStyleName");
if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(horizontalScrollBar).styleName = _local6;
};
rawChildren.addChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
horizontalScrollBar.enabled = enabled;
if ((horizontalScrollBar is IInvalidating)){
IInvalidating(horizontalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!verticalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
} else {
if (horizontalScrollBar){
horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(horizontalScrollBar));
horizontalScrollBar = null;
viewableWidth = (scrollableWidth = 0);
if (_horizontalScrollPosition != 0){
_horizontalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
};
};
if (_arg2){
if (!verticalScrollBar){
verticalScrollBar = new VScrollBar();
verticalScrollBar.name = "verticalScrollBar";
_local7 = getStyle("verticalScrollBarStyleName");
if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){
ISimpleStyleClient(verticalScrollBar).styleName = _local7;
};
rawChildren.addChild(DisplayObject(verticalScrollBar));
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
verticalScrollBar.enabled = enabled;
if ((verticalScrollBar is IInvalidating)){
IInvalidating(verticalScrollBar).validateNow();
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
if (!horizontalScrollBar){
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
} else {
if (verticalScrollBar){
verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler);
rawChildren.removeChild(DisplayObject(verticalScrollBar));
verticalScrollBar = null;
viewableHeight = (scrollableHeight = 0);
if (_verticalScrollPosition != 0){
_verticalScrollPosition = 0;
scrollPositionChanged = true;
};
invalidateDisplayList();
invalidateViewMetricsAndPadding();
_local4 = true;
_local5 = focusManager;
if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){
removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
};
removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
};
};
if (((horizontalScrollBar) && (verticalScrollBar))){
if (!whiteBox){
whiteBox = new FlexShape();
whiteBox.name = "whiteBox";
_local8 = whiteBox.graphics;
_local8.beginFill(0xFFFFFF);
_local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight);
_local8.endFill();
rawChildren.addChild(whiteBox);
};
} else {
if (whiteBox){
rawChildren.removeChild(whiteBox);
whiteBox = null;
};
};
return (_local4);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:Object;
var _local3:String;
var _local4:Number;
_local2 = getFocus();
if ((_local2 is TextField)){
return;
};
if (verticalScrollBar){
_local3 = ScrollEventDirection.VERTICAL;
_local4 = verticalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.UP:
verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_UP:
verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP);
_arg1.stopPropagation();
break;
case Keyboard.PAGE_DOWN:
verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize);
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN);
_arg1.stopPropagation();
break;
case Keyboard.HOME:
verticalScrollPosition = verticalScrollBar.minScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP);
_arg1.stopPropagation();
break;
case Keyboard.END:
verticalScrollPosition = verticalScrollBar.maxScrollPosition;
dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM);
_arg1.stopPropagation();
break;
};
};
if (horizontalScrollBar){
_local3 = ScrollEventDirection.HORIZONTAL;
_local4 = horizontalScrollPosition;
switch (_arg1.keyCode){
case Keyboard.LEFT:
horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT);
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize);
dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT);
_arg1.stopPropagation();
break;
};
};
}
protected function createBorder():void{
var _local1:Class;
if (((!(border)) && (isBorderNeeded()))){
_local1 = getStyle("borderSkin");
border = new (_local1);
border.name = "border";
if ((border is IUIComponent)){
IUIComponent(border).enabled = enabled;
};
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
rawChildren.addChildAt(DisplayObject(border), 0);
invalidateDisplayList();
};
}
public function set verticalScrollPosition(_arg1:Number):void{
if (_verticalScrollPosition == _arg1){
return;
};
_verticalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
verticalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
private function horizontalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = horizontalScrollPosition;
horizontalScrollPosition = horizontalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail);
};
}
public function get icon():Class{
return (_icon);
}
public function set horizontalScrollBar(_arg1:ScrollBar):void{
_horizontalScrollBar = _arg1;
}
mx_internal function set childRepeaters(_arg1:Array):void{
_childRepeaters = _arg1;
}
public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{
var _local3:UIComponentDescriptor;
var _local4:Object;
var _local5:Class;
var _local6:IDeferredInstantiationUIComponent;
var _local7:String;
var _local8:Object;
var _local9:Array;
var _local10:IRepeaterClient;
var _local11:IStyleClient;
var _local12:String;
var _local13:String;
_local3 = UIComponentDescriptor(_arg1);
_local4 = _local3.properties;
if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){
return (null);
};
UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
_local5 = _local3.type;
_local6 = new (_local5);
_local6.id = _local3.id;
if (((_local6.id) && (!((_local6.id == ""))))){
_local6.name = _local6.id;
};
_local6.descriptor = _local3;
if (((_local4.childDescriptors) && ((_local6 is Container)))){
Container(_local6)._childDescriptors = _local4.childDescriptors;
delete _local4.childDescriptors;
};
for (_local7 in _local4) {
_local6[_local7] = _local4[_local7];
};
if ((_local6 is Container)){
Container(_local6).recursionFlag = _arg2;
};
if (_local3.instanceIndices){
if ((_local6 is IRepeaterClient)){
_local10 = IRepeaterClient(_local6);
_local10.instanceIndices = _local3.instanceIndices;
_local10.repeaters = _local3.repeaters;
_local10.repeaterIndices = _local3.repeaterIndices;
};
};
if ((_local6 is IStyleClient)){
_local11 = IStyleClient(_local6);
if (_local3.stylesFactory != null){
if (!_local11.styleDeclaration){
_local11.styleDeclaration = new CSSStyleDeclaration();
};
_local11.styleDeclaration.factory = _local3.stylesFactory;
};
};
_local8 = _local3.events;
if (_local8){
for (_local12 in _local8) {
_local13 = _local8[_local12];
_local6.addEventListener(_local12, _local3.document[_local13]);
};
};
_local9 = _local3.effects;
if (_local9){
_local6.registerEffects(_local9);
};
if ((_local6 is IRepeaterClient)){
IRepeaterClient(_local6).initializeRepeaterArrays(this);
};
_local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document));
if (!_local6.document){
_local6.document = _local3.document;
};
if ((_local6 is IRepeater)){
if (!childRepeaters){
childRepeaters = [];
};
childRepeaters.push(_local6);
_local6.executeBindings();
IRepeater(_local6).initializeRepeater(this, _arg2);
} else {
addChild(DisplayObject(_local6));
_local6.executeBindings();
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
_local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
return (_local6);
}
mx_internal function get usePadding():Boolean{
return (true);
}
public function set horizontalScrollPosition(_arg1:Number):void{
if (_horizontalScrollPosition == _arg1){
return;
};
_horizontalScrollPosition = _arg1;
scrollPositionChanged = true;
if (!initialized){
horizontalScrollPositionPending = _arg1;
};
invalidateDisplayList();
dispatchEvent(new Event("viewChanged"));
}
override public function set focusPane(_arg1:Sprite):void{
var _local2:Boolean;
var _local3:Boolean;
_local2 = invalidateSizeFlag;
_local3 = invalidateDisplayListFlag;
invalidateSizeFlag = true;
invalidateDisplayListFlag = true;
if (_arg1){
rawChildren.addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
rawChildren.removeChild(_focusPane);
_focusPane = null;
};
if (((_arg1) && (contentPane))){
_arg1.x = contentPane.x;
_arg1.y = contentPane.y;
_arg1.scrollRect = contentPane.scrollRect;
};
invalidateSizeFlag = _local2;
invalidateDisplayListFlag = _local3;
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalLineScrollSize);
}
private function updateBackgroundImageRect():void{
var _local1:RectangularBorder;
var _local2:EdgeMetrics;
var _local3:Number;
var _local4:Number;
_local1 = (border as RectangularBorder);
if (!_local1){
return;
};
if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){
_local1.backgroundImageRect = null;
return;
};
_local2 = viewMetrics;
_local3 = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right);
_local4 = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom);
if (getStyle("backgroundAttachment") == "fixed"){
_local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, _local3, _local4);
} else {
_local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4));
};
}
mx_internal function invalidateViewMetricsAndPadding():void{
_viewMetricsAndPadding = null;
}
public function get verticalLineScrollSize():Number{
return (_verticalLineScrollSize);
}
private function mouseWheelHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (verticalScrollBar){
_arg1.stopPropagation();
_local2 = ((_arg1.delta <= 0)) ? 1 : -1;
_local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1;
_local4 = Math.max(Math.abs(_arg1.delta), _local3);
_local5 = verticalScrollPosition;
verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2));
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN);
};
}
mx_internal function createContentPane():void{
var _local1:int;
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:IUIComponent;
if (contentPane){
return;
};
creatingContentPane = true;
_local1 = numChildren;
_local2 = new FlexSprite();
_local2.name = "contentPane";
_local2.tabChildren = true;
if (border){
_local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1);
if ((((border is RectangularBorder)) && (RectangularBorder(border).hasBackgroundImage))){
_local3++;
};
} else {
_local3 = 0;
};
rawChildren.addChildAt(_local2, _local3);
_local4 = 0;
while (_local4 < _local1) {
_local5 = IUIComponent(super.getChildAt(_firstChildIndex));
_local2.addChild(DisplayObject(_local5));
_local5.parentChanged(_local2);
_numChildren--;
_local4++;
};
contentPane = _local2;
creatingContentPane = false;
contentPane.visible = true;
}
public function get creationPolicy():String{
return (_creationPolicy);
}
public function get defaultButton():IFlexDisplayObject{
return (_defaultButton);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
private function verticalScrollBar_scrollHandler(_arg1:Event):void{
var _local2:Number;
if ((_arg1 is ScrollEvent)){
_local2 = verticalScrollPosition;
verticalScrollPosition = verticalScrollBar.scrollPosition;
dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail);
};
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = rawChildren_getChildIndex(_arg1);
return (rawChildren_removeChildAt(_local2));
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
return (addChildAt(_arg1, numChildren));
}
override public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int;
if (contentPane){
return (contentPane.getChildIndex(_arg1));
};
_local2 = (super.getChildIndex(_arg1) - _firstChildIndex);
return (_local2);
}
public function set icon(_arg1:Class):void{
_icon = _arg1;
dispatchEvent(new Event("iconChanged"));
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
override public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object;
_local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
if (_arg1){
executeChildBindings(_arg1);
};
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function set verticalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalLineScrollSizeChanged"));
}
mx_internal function getScrollableRect():Rectangle{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:EdgeMetrics;
var _local8:Rectangle;
var _local9:DisplayObject;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = numChildren;
_local6 = 0;
while (_local6 < _local5) {
_local9 = getChildAt(_local6);
if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){
} else {
_local1 = Math.min(_local1, _local9.x);
_local2 = Math.min(_local2, _local9.y);
if (!isNaN(_local9.width)){
_local3 = Math.max(_local3, (_local9.x + _local9.width));
};
if (!isNaN(_local9.height)){
_local4 = Math.max(_local4, (_local9.y + _local9.height));
};
};
_local6++;
};
_local7 = viewMetrics;
_local8 = new Rectangle();
_local8.left = _local1;
_local8.top = _local2;
_local8.right = _local3;
_local8.bottom = _local4;
if (usePadding){
_local8.right = (_local8.right + getStyle("paddingRight"));
_local8.bottom = (_local8.bottom + getStyle("paddingBottom"));
};
return (_local8);
}
mx_internal function get numRepeaters():int{
return ((childRepeaters) ? childRepeaters.length : 0);
}
public function get creationIndex():int{
return (_creationIndex);
}
override mx_internal function childAdded(_arg1:DisplayObject):void{
var _local2:ChildExistenceChangedEvent;
dispatchEvent(new Event("childrenChanged"));
_local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
super.childAdded(_arg1);
}
public function set horizontalScrollPolicy(_arg1:String):void{
if (_horizontalScrollPolicy != _arg1){
_horizontalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalScrollPolicyChanged"));
};
}
override public function removeChildAt(_arg1:int):DisplayObject{
return (removeChild(getChildAt(_arg1)));
}
override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
var _local4:EdgeMetrics;
var _local5:Number;
var _local6:Graphics;
_local4 = viewMetrics;
_local5 = 0;
if (!_arg3){
_arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5);
};
if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){
return;
};
_local6 = _arg1.graphics;
_local6.clear();
_local6.beginFill(_arg2);
_local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local6.endFill();
}
public function createComponentsFromDescriptors(_arg1:Boolean=true):void{
var _local2:int;
var _local3:int;
var _local4:IFlexDisplayObject;
numChildrenBefore = numChildren;
createdComponents = [];
_local2 = (childDescriptors) ? childDescriptors.length : 0;
_local3 = 0;
while (_local3 < _local2) {
_local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1);
createdComponents.push(_local4);
_local3++;
};
if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){
UIComponentGlobals.layoutManager.usePhasedInstantiation = false;
};
numChildrenCreated = (numChildren - numChildrenBefore);
processedDescriptors = true;
}
override public function globalToContent(_arg1:Point):Point{
if (contentPane){
return (contentPane.globalToLocal(_arg1));
};
return (globalToLocal(_arg1));
}
override mx_internal function removingChild(_arg1:DisplayObject):void{
var _local2:ChildExistenceChangedEvent;
super.removingChild(_arg1);
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
_local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE);
_local2.relatedObject = _arg1;
dispatchEvent(_local2);
}
private function isBorderNeeded():Boolean{
var _local1:Object;
_local1 = getStyle("borderStyle");
if (_local1){
if (((!((_local1 == "none"))) || ((((_local1 == "none")) && (getStyle("mouseShield")))))){
return (true);
};
};
_local1 = getStyle("backgroundColor");
if (((!((_local1 === null))) && (!((_local1 === ""))))){
return (true);
};
_local1 = getStyle("backgroundImage");
return (((!((_local1 == null))) && (!((_local1 == "")))));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = super.getChildAt(_arg1);
super.removingChild(_local2);
$removeChildAt(_arg1);
super.childRemoved(_local2);
if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){
_numChildren--;
} else {
if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){
_firstChildIndex--;
};
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("childrenChanged"));
return (_local2);
}
public function get verticalPageScrollSize():Number{
return (_verticalPageScrollSize);
}
override public function validateDisplayList():void{
var _local1:EdgeMetrics;
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
} else {
layoutChrome(unscaledWidth, unscaledHeight);
};
invalidateDisplayListFlag = true;
if (createContentPaneAndScrollbarsIfNeeded()){
if (((_autoLayout) || (forceLayout))){
doingLayout = true;
super.validateDisplayList();
doingLayout = false;
};
createContentPaneAndScrollbarsIfNeeded();
};
if (contentPane){
_local1 = viewMetrics;
if (overlay){
overlay.x = 0;
overlay.y = 0;
overlay.width = unscaledWidth;
overlay.height = unscaledHeight;
};
if (((horizontalScrollBar) || (verticalScrollBar))){
if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){
_local1.right = (_local1.right - verticalScrollBar.minWidth);
};
if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){
_local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight);
};
if (horizontalScrollBar){
_local2 = ((unscaledWidth - _local1.left) - _local1.right);
if (verticalScrollBar){
_local2 = (_local2 - verticalScrollBar.minWidth);
};
horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight);
horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight));
};
if (verticalScrollBar){
_local3 = ((unscaledHeight - _local1.top) - _local1.bottom);
if (horizontalScrollBar){
_local3 = (_local3 - horizontalScrollBar.minHeight);
};
verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3);
verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top);
};
if (whiteBox){
whiteBox.x = verticalScrollBar.x;
whiteBox.y = horizontalScrollBar.y;
};
};
contentPane.x = _local1.left;
contentPane.y = _local1.top;
if (focusPane){
focusPane.x = _local1.left;
focusPane.y = _local1.top;
};
scrollChildren();
};
invalidateDisplayListFlag = false;
if (blocker){
_local1 = viewMetrics;
_local4 = (enabled) ? null : getStyle("backgroundDisabledColor");
if (!_local4){
_local4 = getStyle("backgroundColor");
};
if ((((_local4 === null)) || (isNaN(Number(_local4))))){
_local4 = 0xFFFFFF;
};
_local5 = getStyle("disabledOverlayAlpha");
if (isNaN(_local5)){
_local5 = 0.6;
};
blocker.x = _local1.left;
blocker.y = _local1.top;
_local6 = (unscaledWidth - (_local1.left + _local1.right));
_local7 = (unscaledHeight - (_local1.top + _local1.bottom));
blocker.graphics.clear();
blocker.graphics.beginFill(uint(_local4), _local5);
blocker.graphics.drawRect(0, 0, _local6, _local7);
blocker.graphics.endFill();
rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1));
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalLineScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalLineScrollSizeChanged"));
}
override public function contentToGlobal(_arg1:Point):Point{
if (contentPane){
return (contentPane.localToGlobal(_arg1));
};
return (localToGlobal(_arg1));
}
mx_internal function set forceClipping(_arg1:Boolean):void{
if (_clipContent){
if (_arg1){
_forceClippingCount++;
} else {
_forceClippingCount--;
};
createContentPane();
scrollChildren();
};
}
public function get horizontalPageScrollSize():Number{
return (_horizontalPageScrollSize);
}
public function set defaultButton(_arg1:IFlexDisplayObject):void{
_defaultButton = _arg1;
ContainerGlobals.focusedContainer = null;
}
private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:IUIComponent;
_local2 = _arg1.id;
if (((!((_local2 == null))) && ((document[_local2] == null)))){
return (false);
};
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IUIComponent(getChildAt(_local4));
if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){
return (true);
};
_local4++;
};
if (childRepeaters){
_local3 = childRepeaters.length;
_local4 = 0;
while (_local4 < _local3) {
if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){
return (true);
};
_local4++;
};
};
return (false);
}
override protected function commitProperties():void{
var _local1:String;
super.commitProperties();
if (changedStyles){
_local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles;
super.notifyStyleChangeInChildren(_local1, true);
changedStyles = null;
};
createOrDestroyBlocker();
}
override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
if (_arg1){
contentPane.scrollRect = Rectangle(_arg1);
};
super.finishPrint(_arg1, _arg2);
}
public function get autoLayout():Boolean{
return (_autoLayout);
}
public function get maxHorizontalScrollPosition():Number{
return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0));
}
public function set creationPolicy(_arg1:String):void{
_creationPolicy = _arg1;
setActualCreationPolicies(_arg1);
}
public function set verticalScrollPolicy(_arg1:String):void{
if (_verticalScrollPolicy != _arg1){
_verticalScrollPolicy = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalScrollPolicyChanged"));
};
}
override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
var _local2:Rectangle;
_local2 = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null;
if (_local2){
contentPane.scrollRect = null;
};
super.prepareToPrint(_arg1);
return (_local2);
}
public function set label(_arg1:String):void{
_label = _arg1;
dispatchEvent(new Event("labelChanged"));
}
override protected function initializationComplete():void{
}
override mx_internal function addingChild(_arg1:DisplayObject):void{
var _local2:IUIComponent;
_local2 = IUIComponent(_arg1);
super.addingChild(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
_numChildren++;
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
};
}
mx_internal function setActualCreationPolicies(_arg1:String):void{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:IFlexDisplayObject;
var _local6:Container;
actualCreationPolicy = _arg1;
_local2 = _arg1;
if (_arg1 == ContainerCreationPolicy.QUEUED){
_local2 = ContainerCreationPolicy.AUTO;
};
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(getChildAt(_local4));
if ((_local5 is Container)){
_local6 = Container(_local5);
if (_local6.creationPolicy == null){
_local6.setActualCreationPolicies(_local2);
};
};
_local4++;
};
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (contentPane.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
};
}
override public function contains(_arg1:DisplayObject):Boolean{
if (contentPane){
return (contentPane.contains(_arg1));
};
return (super.contains(_arg1));
}
public function set clipContent(_arg1:Boolean):void{
if (_clipContent != _arg1){
_clipContent = _arg1;
invalidateDisplayList();
};
}
override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:int;
var _local4:int;
var _local5:ISimpleStyleClient;
_local3 = super.numChildren;
_local4 = 0;
while (_local4 < _local3) {
if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){
_local5 = (super.getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
};
_local4++;
};
if (_arg2){
changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1;
invalidateProperties();
};
}
override public function get contentMouseX():Number{
if (contentPane){
return (contentPane.mouseX);
};
return (super.contentMouseX);
}
override public function get contentMouseY():Number{
if (contentPane){
return (contentPane.mouseY);
};
return (super.contentMouseY);
}
override public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if ((((autoLayout == false)) && ((forceLayout == false)))){
if (_arg1){
_local2 = super.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = super.getChildAt(_local3);
if ((_local4 is ILayoutManagerClient)){
ILayoutManagerClient(_local4).validateSize(true);
};
_local3++;
};
};
adjustSizesForScaleChanges();
} else {
super.validateSize(_arg1);
};
}
override public function getChildAt(_arg1:int):DisplayObject{
if (contentPane){
return (contentPane.getChildAt(_arg1));
};
return (super.getChildAt((_firstChildIndex + _arg1)));
}
protected function layoutChrome(_arg1:Number, _arg2:Number):void{
if (border){
updateBackgroundImageRect();
border.move(0, 0);
border.setActualSize(_arg1, _arg2);
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){
setStyle("mouseShield", true);
setStyle("mouseShieldChildren", true);
};
};
}
override protected function attachOverlay():void{
rawChildren_addChild(overlay);
}
override public function localToContent(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = localToGlobal(_arg1);
return (globalToContent(_arg1));
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new ContainerRawChildrenList(this);
};
return (_rawChildren);
}
public function get viewMetrics():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:Boolean;
var _local3:Boolean;
_local1 = borderMetrics;
_local2 = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON)))));
_local3 = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON)))));
if (((!(_local2)) && (!(_local3)))){
return (_local1);
};
if (!_viewMetrics){
_viewMetrics = _local1.clone();
} else {
_viewMetrics.left = _local1.left;
_viewMetrics.right = _local1.right;
_viewMetrics.top = _local1.top;
_viewMetrics.bottom = _local1.bottom;
};
if (_local2){
_viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth);
};
if (_local3){
_viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight);
};
return (_viewMetrics);
}
public function set creationIndex(_arg1:int):void{
_creationIndex = _arg1;
}
public function executeChildBindings(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:IUIComponent;
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = IUIComponent(getChildAt(_local3));
if ((_local4 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1);
};
_local3++;
};
}
public function set verticalScrollBar(_arg1:ScrollBar):void{
_verticalScrollBar = _arg1;
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
private function createOrDestroyBlocker():void{
var _local1:DisplayObject;
var _local2:ISystemManager;
if (enabled){
if (blocker){
rawChildren.removeChild(blocker);
blocker = null;
};
} else {
if (!blocker){
blocker = new FlexSprite();
blocker.name = "blocker";
blocker.mouseEnabled = true;
rawChildren.addChild(blocker);
blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler);
_local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null;
while (_local1) {
if (_local1 == this){
_local2 = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.focus = null;
};
break;
};
_local1 = _local1.parent;
};
};
};
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
if (horizontalScrollBar){
horizontalScrollBar.enabled = _arg1;
};
if (verticalScrollBar){
verticalScrollBar.enabled = _arg1;
};
invalidateProperties();
}
override public function getChildByName(_arg1:String):DisplayObject{
var _local2:DisplayObject;
var _local3:int;
if (contentPane){
return (contentPane.getChildByName(_arg1));
};
_local2 = super.getChildByName(_arg1);
if (!_local2){
return (null);
};
_local3 = (super.getChildIndex(_local2) - _firstChildIndex);
if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){
return (null);
};
return (_local2);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
if (contentPane){
contentPane.addChildAt(_arg1, _arg2);
} else {
$addChildAt(_arg1, (_firstChildIndex + _arg2));
};
childAdded(_arg1);
return (_arg1);
}
override public function get baselinePosition():Number{
var _local1:IUIComponent;
if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){
_local1 = (getChildAt(0) as IUIComponent);
if (_local1){
return ((_local1.y + _local1.baselinePosition));
};
};
return (super.baselinePosition);
}
private function blocker_clickHandler(_arg1:Event):void{
_arg1.stopPropagation();
}
public function get maxVerticalScrollPosition():Number{
return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0));
}
public function set verticalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_verticalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("verticalPageScrollSizeChanged"));
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
numChildrenCreated--;
if (numChildrenCreated <= 0){
dispatchEvent(new FlexEvent("childrenCreationComplete"));
};
}
override public function contentToLocal(_arg1:Point):Point{
if (!contentPane){
return (_arg1);
};
_arg1 = contentToGlobal(_arg1);
return (globalToLocal(_arg1));
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
if (contentPane){
contentPane.removeChild(_arg1);
} else {
$removeChild(_arg1);
};
childRemoved(_arg1);
return (_arg1);
}
private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{
var _local5:ScrollEvent;
_local5 = new ScrollEvent(ScrollEvent.SCROLL);
_local5.direction = _arg1;
_local5.position = _arg3;
_local5.delta = (_arg3 - _arg2);
_local5.detail = _arg4;
dispatchEvent(_local5);
}
public function get label():String{
return (_label);
}
mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{
if (processedDescriptors){
return;
};
if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){
if (_arg1.properties.childDescriptors){
throw (new Error(resourceMultipleChildSets_ClassAndSubclass));
};
} else {
_documentDescriptor = _arg1;
_documentDescriptor.document = this;
};
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:IndexChangedEvent;
_local4 = _local3;
_local5 = _arg2;
if (contentPane){
contentPane.setChildIndex(_arg1, _arg2);
if (((_autoLayout) || (forceLayout))){
invalidateDisplayList();
};
} else {
_local3 = super.getChildIndex(_arg1);
_arg2 = (_arg2 + _firstChildIndex);
if (_arg2 == _local3){
return;
};
super.setChildIndex(_arg1, _arg2);
invalidateDisplayList();
_local4 = (_local3 - _firstChildIndex);
_local5 = (_arg2 - _firstChildIndex);
};
_local6 = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE);
_local6.relatedObject = _arg1;
_local6.oldIndex = _local4;
_local6.newIndex = _local5;
dispatchEvent(_local6);
dispatchEvent(new Event("childrenChanged"));
}
override public function regenerateStyleCache(_arg1:Boolean):void{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
super.regenerateStyleCache(_arg1);
if (contentPane){
_local2 = contentPane.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = getChildAt(_local3);
if (((_arg1) && ((_local4 is UIComponent)))){
if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
UIComponent(_local4).regenerateStyleCache(_arg1);
};
} else {
if ((((_local4 is UITextField)) && (UITextField(_local4).inheritingStyles))){
StyleProtoChain.initTextField(UITextField(_local4));
};
};
_local3++;
};
};
}
override protected function createChildren():void{
var _local1:Application;
super.createChildren();
createBorder();
createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON))));
if (creationPolicy != null){
actualCreationPolicy = creationPolicy;
} else {
if ((parent is Container)){
if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
actualCreationPolicy = Container(parent).actualCreationPolicy;
};
};
};
if (actualCreationPolicy == ContainerCreationPolicy.NONE){
actualCreationPolicy = ContainerCreationPolicy.AUTO;
} else {
if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){
_local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application);
_local1.addToCreationQueue(this, creationIndex, null, this);
} else {
if (recursionFlag){
createComponentsFromDescriptors();
};
};
};
if (autoLayout == false){
forceLayout = true;
};
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
}
mx_internal function set numChildrenCreated(_arg1:int):void{
_numChildrenCreated = _arg1;
}
public function get borderMetrics():EdgeMetrics{
return ((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY);
}
public function get clipContent():Boolean{
return (_clipContent);
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3:int;
_local3 = super.getChildIndex(_arg1);
super.setChildIndex(_arg1, _arg2);
if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){
_firstChildIndex--;
} else {
if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){
_firstChildIndex++;
};
};
dispatchEvent(new Event("childrenChanged"));
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
public function get viewMetricsAndPadding():EdgeMetrics{
var _local1:EdgeMetrics;
var _local2:EdgeMetrics;
if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){
return (_viewMetricsAndPadding);
};
if (!_viewMetricsAndPadding){
_viewMetricsAndPadding = new EdgeMetrics();
};
_local1 = _viewMetricsAndPadding;
_local2 = viewMetrics;
_local1.left = (_local2.left + getStyle("paddingLeft"));
_local1.right = (_local2.right + getStyle("paddingRight"));
_local1.top = (_local2.top + getStyle("paddingTop"));
_local1.bottom = (_local2.bottom + getStyle("paddingBottom"));
return (_local1);
}
public function set horizontalPageScrollSize(_arg1:Number):void{
scrollPropertiesChanged = true;
_horizontalPageScrollSize = _arg1;
invalidateDisplayList();
dispatchEvent(new Event("horizontalPageScrollSizeChanged"));
}
private function layoutCompleteHandler(_arg1:Event):void{
var _local2:Boolean;
UIComponentGlobals.layoutManager.removeEventListener("updateComplete", layoutCompleteHandler);
forceLayout = false;
_local2 = false;
if (!isNaN(horizontalScrollPositionPending)){
if (horizontalScrollPositionPending < 0){
horizontalScrollPositionPending = 0;
} else {
if (horizontalScrollPositionPending > maxHorizontalScrollPosition){
horizontalScrollPositionPending = maxHorizontalScrollPosition;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){
_horizontalScrollPosition = horizontalScrollPositionPending;
horizontalScrollBar.scrollPosition = horizontalScrollPositionPending;
_local2 = true;
};
horizontalScrollPositionPending = NaN;
};
if (!isNaN(verticalScrollPositionPending)){
if (verticalScrollPositionPending < 0){
verticalScrollPositionPending = 0;
} else {
if (verticalScrollPositionPending > maxVerticalScrollPosition){
verticalScrollPositionPending = maxVerticalScrollPosition;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){
_verticalScrollPosition = verticalScrollPositionPending;
verticalScrollBar.scrollPosition = verticalScrollPositionPending;
_local2 = true;
};
verticalScrollPositionPending = NaN;
};
if (_local2){
scrollChildren();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){
if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){
setStyle("mouseShield", false);
setStyle("mouseShieldChildren", false);
};
};
}
public function set autoLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
_autoLayout = _arg1;
if (_arg1){
invalidateSize();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
mx_internal function get numChildrenCreated():int{
return (_numChildrenCreated);
}
override public function initialize():void{
var _local1:*;
if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){
_local1 = documentDescriptor.properties;
if (((_local1) && (_local1.childDescriptors))){
if (_childDescriptors){
throw (new Error(resourceMultipleChildSets_ClassAndInstance));
};
_childDescriptors = _local1.childDescriptors;
};
};
super.initialize();
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + $numChildren) + 1))))){
_numChildren++;
} else {
if (_arg2 <= _firstChildIndex){
_firstChildIndex++;
};
};
super.addingChild(_arg1);
$addChildAt(_arg1, _arg2);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
invalidateDisplayList();
}
private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:EdgeMetrics;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
_local2 = _arg1.right;
_local3 = _arg1.bottom;
_local4 = unscaledWidth;
_local5 = unscaledHeight;
_local6 = (((_arg1.left < 0)) || ((_arg1.top < 0)));
_local7 = viewMetrics;
if (scaleX != 1){
_local4 = (_local4 + (1 / Math.abs(scaleX)));
};
if (scaleY != 1){
_local5 = (_local5 + (1 / Math.abs(scaleY)));
};
_local4 = Math.floor(_local4);
_local5 = Math.floor(_local5);
_local2 = Math.floor(_local2);
_local3 = Math.floor(_local3);
if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){
_local5 = (_local5 - horizontalScrollBar.minHeight);
};
if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){
_local4 = (_local4 - verticalScrollBar.minWidth);
};
_local4 = (_local4 - (_local7.left + _local7.right));
_local5 = (_local5 - (_local7.top + _local7.bottom));
_local8 = (horizontalScrollPolicy == ScrollPolicy.ON);
_local9 = (verticalScrollPolicy == ScrollPolicy.ON);
_local10 = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0)));
if (_local4 < _local2){
_local10 = true;
if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){
_local8 = true;
};
};
if (_local5 < _local3){
_local10 = true;
if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){
_local9 = true;
};
};
if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){
_local9 = false;
_local8 = _local9;
} else {
if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){
_local8 = false;
};
};
_local11 = createOrDestroyScrollbars(_local8, _local9, _local10);
if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){
if (horizontalScrollBar){
horizontalScrollBar.setScrollProperties((_local4 - borderMetrics.right), 0, (_local2 - _local4), horizontalPageScrollSize);
scrollPositionChanged = true;
};
viewableWidth = _local4;
scrollableWidth = _local2;
};
if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){
if (verticalScrollBar){
verticalScrollBar.setScrollProperties((_local5 - borderMetrics.bottom), 0, (_local3 - _local5), verticalPageScrollSize);
scrollPositionChanged = true;
};
viewableHeight = _local5;
scrollableHeight = _local3;
};
return (_local11);
}
public function getChildren():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
_local1 = [];
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local1.push(getChildAt(_local3));
_local3++;
};
return (_local1);
}
public function removeAllChildren():void{
while (numChildren > 0) {
removeChildAt(0);
};
}
override mx_internal function childRemoved(_arg1:DisplayObject):void{
super.childRemoved(_arg1);
invalidateSize();
invalidateDisplayList();
if (!contentPane){
_numChildren--;
if (_numChildren == 0){
_firstChildIndex = super.numChildren;
};
};
if (((contentPane) && (!(autoLayout)))){
forceLayout = true;
UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true);
};
dispatchEvent(new Event("childrenChanged"));
}
override public function get numChildren():int{
return ((contentPane) ? contentPane.numChildren : _numChildren);
}
public function get data():Object{
return (_data);
}
override public function styleChanged(_arg1:String):void{
var _local2:Boolean;
var _local3:String;
var _local4:String;
_local2 = (((_arg1 == null)) || ((_arg1 == "styleName")));
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateDisplayList();
};
if (((_local2) || ((_arg1 == "borderSkin")))){
if (border){
rawChildren.removeChild(DisplayObject(border));
border = null;
createBorder();
};
};
if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){
createBorder();
};
super.styleChanged(_arg1);
if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateViewMetricsAndPadding();
};
if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){
if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){
_local3 = getStyle("horizontalScrollBarStyleName");
ISimpleStyleClient(horizontalScrollBar).styleName = _local3;
};
};
if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){
if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){
_local4 = getStyle("verticalScrollBarStyleName");
ISimpleStyleClient(verticalScrollBar).styleName = _local4;
};
};
}
private function createContentPaneAndScrollbarsIfNeeded():Boolean{
var _local1:Rectangle;
var _local2:Boolean;
if (_clipContent){
_local1 = getScrollableRect();
_local2 = createScrollbarsIfNeeded(_local1);
if (border){
updateBackgroundImageRect();
};
return (_local2);
//unresolved jump
};
_local2 = createOrDestroyScrollbars(false, false, false);
_local1 = getScrollableRect();
scrollableWidth = _local1.right;
scrollableHeight = _local1.bottom;
if (((_local2) && (border))){
updateBackgroundImageRect();
};
return (_local2);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:Object;
var _local4:Number;
super.updateDisplayList(_arg1, _arg2);
layoutChrome(_arg1, _arg2);
if (scrollPositionChanged){
if (_horizontalScrollPosition < 0){
_horizontalScrollPosition = 0;
} else {
if (_horizontalScrollPosition > maxHorizontalScrollPosition){
_horizontalScrollPosition = maxHorizontalScrollPosition;
};
};
if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){
horizontalScrollBar.scrollPosition = _horizontalScrollPosition;
};
if (_verticalScrollPosition < 0){
_verticalScrollPosition = 0;
} else {
if (_verticalScrollPosition > maxVerticalScrollPosition){
_verticalScrollPosition = maxVerticalScrollPosition;
};
};
if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){
verticalScrollBar.scrollPosition = _verticalScrollPosition;
};
scrollChildren();
scrollPositionChanged = false;
};
if (scrollPropertiesChanged){
if (horizontalScrollBar){
horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
};
if (verticalScrollBar){
verticalScrollBar.lineScrollSize = verticalLineScrollSize;
verticalScrollBar.pageScrollSize = verticalPageScrollSize;
};
scrollPropertiesChanged = false;
};
if (((contentPane) && (contentPane.scrollRect))){
_local3 = (enabled) ? null : getStyle("backgroundDisabledColor");
if (!_local3){
_local3 = getStyle("backgroundColor");
};
_local4 = getStyle("backgroundAlpha");
if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){
_local3 = null;
} else {
if (((getStyle("backgroundImage")) || (getStyle("background")))){
_local3 = null;
} else {
if (_local4 != 1){
_local3 = null;
};
};
};
contentPane.opaqueBackground = _local3;
contentPane.cacheAsBitmap = !((_local3 == null));
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
if (_numChildren == 0){
_firstChildIndex++;
};
super.addingChild(_arg1);
$addChild(_arg1);
super.childAdded(_arg1);
dispatchEvent(new Event("childrenChanged"));
return (_arg1);
}
private static function loadResources():void{
resourceScrollDirection = packageResources.getString("scrollDirection");
resourceMultipleChildSets_ClassAndInstance = packageResources.getString("multipleChildSets_ClassAndInstance");
resourceMultipleChildSets_ClassAndSubclass = packageResources.getString("multipleChildSets_ClassAndSubclass");
}
mx_internal static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{
var _local3:InteractiveObject;
var _local4:InteractiveObject;
var _local5:IUIComponent;
var _local6:IFocusManager;
var _local7:Button;
_local3 = _arg2;
_local4 = _arg2;
_local5 = null;
if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){
return;
};
while (_local4) {
if (_local4.parent){
_local3 = _local4.parent;
} else {
_local3 = null;
};
if ((_local4 is IUIComponent)){
_local5 = IUIComponent(_local4);
};
_local4 = _local3;
if (((((_local4) && ((_local4 is Container)))) && (Container(_local4).defaultButton))){
break;
};
};
if (ContainerGlobals.focusedContainer != _local4){
if (!_local4){
_local4 = InteractiveObject(_local5);
};
if (((_local4) && ((_local4 is Container)))){
_local6 = UIComponent(_local4).focusManager;
_local7 = (Container(_local4).defaultButton as Button);
if (_local7){
ContainerGlobals.focusedContainer = Container(_local4);
_local6.defaultButton = _local7;
} else {
ContainerGlobals.focusedContainer = Container(_local4);
_local6.defaultButton = null;
};
};
};
}
loadResources();
}
}//package mx.core
Section 37
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy)
package mx.core {
public final class ContainerCreationPolicy {
public static const ALL:String = "all";
public static const QUEUED:String = "queued";
public static const NONE:String = "none";
mx_internal static const VERSION:String = "2.0.1.0";
public static const AUTO:String = "auto";
}
}//package mx.core
Section 38
//ContainerGlobals (mx.core.ContainerGlobals)
package mx.core {
import flash.display.*;
public class ContainerGlobals {
public static var focusedContainer:InteractiveObject;
}
}//package mx.core
Section 39
//ContainerLayout (mx.core.ContainerLayout)
package mx.core {
public final class ContainerLayout {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
public static const ABSOLUTE:String = "absolute";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 40
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public class ContainerRawChildrenList implements IChildList {
private var owner:Container;
mx_internal static const VERSION:String = "2.0.1.0";
public function ContainerRawChildrenList(_arg1:Container){
this.owner = _arg1;
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
}
}//package mx.core
Section 41
//DragSource (mx.core.DragSource)
package mx.core {
public class DragSource {
private var formatHandlers:Object;
private var dataHolder:Object;
private var _formats:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function DragSource(){
dataHolder = {};
formatHandlers = {};
_formats = [];
super();
}
public function dataForFormat(_arg1:String):Object{
var _local2:Object;
_local2 = dataHolder[_arg1];
if (_local2){
return (_local2);
};
if (formatHandlers[_arg1]){
return (formatHandlers[_arg1]());
};
return (null);
}
public function addHandler(_arg1:Function, _arg2:String):void{
_formats.push(_arg2);
formatHandlers[_arg2] = _arg1;
}
public function addData(_arg1:Object, _arg2:String):void{
_formats.push(_arg2);
dataHolder[_arg2] = _arg1;
}
public function hasFormat(_arg1:String):Boolean{
var _local2:int;
var _local3:int;
_local2 = _formats.length;
_local3 = 0;
while (_local3 < _local2) {
if (_formats[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function get formats():Array{
return (_formats);
}
}
}//package mx.core
Section 42
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var bottom:Number;
public var top:Number;
public var right:Number;
public var left:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static var EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 43
//EventPriority (mx.core.EventPriority)
package mx.core {
public final class EventPriority {
public static const DEFAULT:int = 0;
public static const BINDING:int = 100;
public static const DEFAULT_HANDLER:int = -50;
public static const EFFECT:int = -100;
public static const CURSOR_MANAGEMENT:int = 200;
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 44
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 45
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 46
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "2.0.1.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 47
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 48
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 49
//FlexTextField (mx.core.FlexTextField)
package mx.core {
import flash.text.*;
import mx.utils.*;
public class FlexTextField extends TextField {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexTextField(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 50
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 51
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
}
}//package mx.core
Section 52
//IContainer (mx.core.IContainer)
package mx.core {
public interface IContainer {
}
}//package mx.core
Section 53
//IDataRenderer (mx.core.IDataRenderer)
package mx.core {
public interface IDataRenderer {
function set data(_arg1:Object):void;
function get data():Object;
}
}//package mx.core
Section 54
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function get descriptor():UIComponentDescriptor;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function set cacheHeuristic(_arg1:Boolean):void;
function get cachePolicy():String;
function registerEffects(_arg1:Array):void;
function set id(_arg1:String):void;
}
}//package mx.core
Section 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.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 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
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function get imeMode():String;
function set imeMode(_arg1:String):void;
}
}//package mx.core
Section 60
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateDisplayList():void;
function invalidateSize():void;
function invalidateProperties():void;
}
}//package mx.core
Section 61
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 62
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 63
//IRepeater (mx.core.IRepeater)
package mx.core {
public interface IRepeater {
function get container():Container;
function set recycleChildren(_arg1:Boolean):void;
function get startingIndex():int;
function set startingIndex(_arg1:int):void;
function get currentItem():Object;
function get count():int;
function get recycleChildren():Boolean;
function executeChildBindings():void;
function set dataProvider(_arg1:Object):void;
function initializeRepeater(_arg1:Container, _arg2:Boolean):void;
function get currentIndex():int;
function get dataProvider():Object;
function set count(_arg1:int):void;
}
}//package mx.core
Section 64
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 65
//IToolTip (mx.core.IToolTip)
package mx.core {
import flash.geom.*;
public interface IToolTip extends IUIComponent {
function get screen():Rectangle;
function get text():String;
function set text(_arg1:String):void;
}
}//package mx.core
Section 66
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set enabled(_arg1:Boolean):void;
function set measuredMinWidth(_arg1:Number):void;
function set isPopUp(_arg1:Boolean):void;
function get percentWidth():Number;
function set percentWidth(_arg1:Number):void;
function get baselinePosition():Number;
function initialize():void;
function getExplicitOrMeasuredWidth():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function getExplicitOrMeasuredHeight():Number;
function get document():Object;
function get explicitMaxWidth():Number;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function get maxHeight():Number;
function get minWidth():Number;
function owns(_arg1:DisplayObject):Boolean;
function get opaqueBackground():Object;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function get owner():DisplayObjectContainer;
function set document(_arg1:Object):void;
function get tweeningProperties():Array;
function get enabled():Boolean;
function get isPopUp():Boolean;
function get explicitMinHeight():Number;
function set focusPane(_arg1:Sprite):void;
function get maxWidth():Number;
function get percentHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function get explicitMaxHeight():Number;
function get focusPane():Sprite;
function parentChanged(_arg1:DisplayObjectContainer):void;
function set opaqueBackground(_arg1:Object):void;
function set measuredMinHeight(_arg1:Number):void;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scrollRect():Rectangle;
function set explicitWidth(_arg1:Number):void;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function get explicitMinWidth():Number;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 67
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 68
//LayoutContainer (mx.core.LayoutContainer)
package mx.core {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import mx.containers.utilityClasses.*;
import mx.containers.*;
public class LayoutContainer extends Container {
private var _layout:String;// = "vertical"
private var processingCreationQueue:Boolean;// = false
private var creationQueue:Array;
protected var boxLayoutClass:Class;
private var preloadObj:Object;
private var resizeHandlerAdded:Boolean;// = false
protected var layoutObject:Layout;
protected var canvasLayoutClass:Class;
mx_internal static const VERSION:String = "2.0.1.0";
private static var viewSourceMenuItem:String;
mx_internal static var useProgressiveLayout:Boolean = false;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
public function LayoutContainer(){
layoutObject = new BoxLayout();
canvasLayoutClass = CanvasLayout;
boxLayoutClass = BoxLayout;
resizeHandlerAdded = false;
creationQueue = [];
processingCreationQueue = false;
_layout = ContainerLayout.VERTICAL;
super();
layoutObject.target = this;
}
override mx_internal function get usePadding():Boolean{
return (!((layout == ContainerLayout.ABSOLUTE)));
}
override protected function measure():void{
super.measure();
layoutObject.measure();
}
override protected function layoutChrome(_arg1:Number, _arg2:Number):void{
super.layoutChrome(_arg1, _arg2);
if (!doingLayout){
createBorder();
};
}
public function set layout(_arg1:String):void{
if (_layout != _arg1){
_layout = _arg1;
if (layoutObject){
layoutObject.target = null;
};
if (_layout == ContainerLayout.ABSOLUTE){
layoutObject = new canvasLayoutClass();
} else {
layoutObject = new boxLayoutClass();
if (_layout == ContainerLayout.VERTICAL){
BoxLayout(layoutObject).direction = BoxDirection.VERTICAL;
} else {
BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL;
};
};
if (layoutObject){
layoutObject.target = this;
};
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("layoutChanged"));
};
}
public function get layout():String{
return (_layout);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
layoutObject.updateDisplayList(_arg1, _arg2);
createBorder();
}
private static function loadResources():void{
viewSourceMenuItem = packageResources.getString("viewSource");
}
loadResources();
}
}//package mx.core
Section 69
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.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;
}
}
}//package mx.core
Section 70
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
private var requestedWidth:Number;
private var loader:Loader;// = null
private var requestedHeight:Number;
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
protected var initialHeight:Number;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext;
loader = null;
initialized = false;
initialWidth = 0;
initialHeight = 0;
super();
_local1 = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
public function get movieClipData():ByteArray{
return (null);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get measuredHeight():Number{
return (initialHeight);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
}
}//package mx.core
Section 71
//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 72
//ScrollPolicy (mx.core.ScrollPolicy)
package mx.core {
public final class ScrollPolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OFF:String = "off";
}
}//package mx.core
Section 73
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
private static var classMap:Object = {};
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class;
_local2 = classMap[_arg1];
return (Object(_local2).getInstance());
}
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class;
_local3 = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
}
}//package mx.core
Section 74
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 75
//UIComponent (mx.core.UIComponent)
package mx.core {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.effects.*;
import mx.modules.*;
import mx.events.*;
import mx.managers.*;
import mx.automation.*;
import flash.text.*;
import mx.states.*;
import mx.graphics.*;
import mx.binding.*;
import flash.utils.*;
import mx.skins.*;
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 {
private var errorStringChanged:Boolean;// = false
mx_internal var overlay:UIComponent;
mx_internal var automaticRadioButtonGroups:Object;
private var _currentState:String;
private var _isPopUp:Boolean;
private var _repeaters:Array;
private var packageResources:ResourceBundle;
private var _systemManager:ISystemManager;
private var _measuredWidth:Number;// = 0
private var methodQueue:Array;
mx_internal var _width:Number;
private var _tweeningProperties:Array;
private var _validationSubField:String;
private var _endingEffectInstances:Array;
mx_internal var saveBorderColor:Boolean;// = true
mx_internal var overlayColor:uint;
private var _repeaterIndices:Array;
private var oldExplicitWidth:Number;
mx_internal var _descriptor:UIComponentDescriptor;
private var _initialized:Boolean;// = false
private var requestedCurrentState:String;
private var _focusEnabled:Boolean;// = true
private var cacheAsBitmapCount:int;// = 0
mx_internal var overlayReferenceCount:int;// = 0
private var listeningForRender:Boolean;// = false
mx_internal var invalidateDisplayListFlag:Boolean;// = false
private var oldScaleX:Number;// = 1
private var oldScaleY:Number;// = 1
mx_internal var _explicitMaxHeight:Number;
mx_internal var invalidatePropertiesFlag:Boolean;// = false
private var hasFocusRect:Boolean;// = false
private var _scaleX:Number;// = 1
private var _scaleY:Number;// = 1
mx_internal var invalidateSizeFlag:Boolean;// = false
private var _styleDeclaration:CSSStyleDeclaration;
mx_internal var _documentDescriptor:UIComponentDescriptor;
mx_internal var _affectedProperties:Object;
private var _processedDescriptors:Boolean;// = false
mx_internal var origBorderColor:Number;
private var _focusManager:IFocusManager;
private var _cachePolicy:String;// = "auto"
private var _measuredHeight:Number;// = 0
private var _id:String;
private var _owner:DisplayObjectContainer;
public var transitions:Array;
mx_internal var _parent:DisplayObjectContainer;
private var _measuredMinWidth:Number;// = 0
private var oldMinWidth:Number;
private var _enabled:Boolean;// = false
public var states:Array;
private var _explicitWidth:Number;
private var _mouseFocusEnabled:Boolean;// = true
private var oldHeight:Number;// = 0
private var _currentStateChanged:Boolean;
private var cachedTextFormat:UITextFormat;
private var _automationDelegate:IAutomationObject;
mx_internal var _height:Number;
private var _percentWidth:Number;
private var _automationName:String;// = null
private var _isEffectStarted:Boolean;// = false
private var _styleName:Object;
mx_internal var _document:Object;
private var _errorString:String;// = ""
private var oldExplicitHeight:Number;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _filters:Array;
private var _toolTip:String;
private var _focusPane:Sprite;
private var playStateTransition:Boolean;// = true
private var _nonInheritingStyles:Object;
private var _showInAutomationHierarchy:Boolean;// = true
private var _moduleFactory:IFlexModuleFactory;
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var _instanceIndices:Array;
private var _visible:Boolean;// = true
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
mx_internal var _effectsStarted:Array;
private var _explicitMinWidth:Number;
private var resourceStateUndefined:String;// = null
mx_internal var _explicitMaxWidth:Number;
private var _measuredMinHeight:Number;// = 0
private var _uid:String;
private var _currentTransitionEffect:Effect;
private var _updateCompletePendingFlag:Boolean;// = false
private var oldMinHeight:Number;
mx_internal var _explicitMinHeight:Number;
private var _percentHeight:Number;
private var oldWidth:Number;// = 0
public static const DEFAULT_MEASURED_WIDTH:Number = 160;
public static const DEFAULT_MAX_WIDTH:Number = 10000;
public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
public static const DEFAULT_MAX_HEIGHT:Number = 10000;
public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
mx_internal static const VERSION:String = "2.0.1.0";
public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
mx_internal static var dispatchEventHook:Function;
private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY");
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var STYLE_UNINITIALIZED:Object = {};
private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX");
public function UIComponent(){
packageResources = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
resourceStateUndefined = null;
listeningForRender = false;
methodQueue = [];
hasFocusRect = false;
_initialized = false;
_processedDescriptors = false;
_updateCompletePendingFlag = false;
invalidatePropertiesFlag = false;
invalidateSizeFlag = false;
invalidateDisplayListFlag = false;
oldX = 0;
oldY = 0;
oldWidth = 0;
oldHeight = 0;
oldScaleX = 1;
oldScaleY = 1;
overlayReferenceCount = 0;
saveBorderColor = true;
_scaleX = 1;
_scaleY = 1;
_visible = true;
_enabled = false;
_nestLevel = 0;
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_cachePolicy = UIComponentCachePolicy.AUTO;
cacheAsBitmapCount = 0;
_focusEnabled = true;
_mouseFocusEnabled = true;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
_measuredWidth = 0;
_measuredHeight = 0;
_includeInLayout = true;
playStateTransition = true;
states = [];
transitions = [];
_automationName = null;
_showInAutomationHierarchy = true;
_errorString = "";
errorStringChanged = false;
_effectsStarted = [];
_affectedProperties = {};
_isEffectStarted = false;
_endingEffectInstances = [];
super();
focusRect = false;
tabEnabled = (this is IFocusManagerComponent);
enabled = true;
$visible = false;
addEventListener(Event.ADDED, addedHandler);
addEventListener(Event.REMOVED, removedHandler);
if ((this is IFocusManagerComponent)){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
_width = super.width;
_height = super.height;
}
public function getStyle(_arg1:String){
return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]);
}
public function get toolTip():String{
return (_toolTip);
}
private function transition_effectEndHandler(_arg1:EffectEvent):void{
_currentTransitionEffect = null;
}
public function get nestLevel():int{
return (_nestLevel);
}
protected function adjustFocusRect(_arg1:DisplayObject=null):void{
var _local2:IFocusManager;
var _local3:IFlexDisplayObject;
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
if (!_arg1){
_arg1 = this;
};
if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){
return;
};
_local2 = focusManager;
if (!_local2){
return;
};
_local3 = IFlexDisplayObject(getFocusObject());
if (_local3){
if (((errorString) && (!((errorString == ""))))){
_local4 = getStyle("errorColor");
} else {
_local4 = getStyle("themeColor");
};
_local5 = getStyle("focusThickness");
if ((_local3 is IStyleClient)){
IStyleClient(_local3).setStyle("focusColor", _local4);
};
_local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5)));
if (rotation){
_local7 = ((rotation * Math.PI) / 180);
_local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7)))));
DisplayObject(_local3).rotation = rotation;
} else {
_local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5));
};
if (_arg1.parent == this){
_local6.x = (_local6.x + x);
_local6.y = (_local6.y + y);
};
_local6 = parent.localToGlobal(_local6);
_local6 = parent.globalToLocal(_local6);
_local3.move(_local6.x, _local6.y);
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
} else {
if ((_local3 is ProgrammaticSkin)){
ProgrammaticSkin(_local3).validateNow();
};
};
};
}
public function set nestLevel(_arg1:int):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:ILayoutManagerClient;
var _local6:UITextField;
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
updateCallbacks();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient);
if (_local5){
_local5.nestLevel = (_arg1 + 1);
} else {
_local6 = (_local2.getChildAt(_local4) as UITextField);
if (_local6){
_local6.nestLevel = (_arg1 + 1);
};
};
_local4++;
};
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function callLaterDispatcher(_arg1:Event):void{
var layoutErrorEvent:DynamicEvent;
var event = _arg1;
UIComponentGlobals.callLaterDispatcherCount++;
if (!UIComponentGlobals.designTime){
callLaterDispatcher2(event);
} else {
try {
callLaterDispatcher2(event);
} catch(e:Error) {
layoutErrorEvent = new DynamicEvent("layoutError");
layoutErrorEvent.error = e;
systemManager.dispatchEvent(layoutErrorEvent);
};
};
UIComponentGlobals.callLaterDispatcherCount--;
}
final mx_internal function get $width():Number{
return (super.width);
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{
if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){
requestedCurrentState = _arg1;
playStateTransition = _arg2;
if (initialized){
commitCurrentState();
} else {
_currentStateChanged = true;
addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
}
private function getBaseStates(_arg1:State):Array{
var _local2:Array;
_local2 = [];
while (((_arg1) && (!((_arg1.basedOn == ""))))) {
_local2.push(_arg1.basedOn);
_arg1 = getState(_arg1.basedOn);
};
return (_local2);
}
public function set minHeight(_arg1:Number):void{
if (explicitMinHeight == _arg1){
return;
};
explicitMinHeight = _arg1;
}
public function get errorString():String{
return (_errorString);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
final mx_internal function set $width(_arg1:Number):void{
super.width = _arg1;
}
public function invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
};
}
override public function get scaleX():Number{
return (_scaleX);
}
override public function get scaleY():Number{
return (_scaleY);
}
mx_internal function initThemeColor():Boolean{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Array;
var _local7:int;
var _local8:CSSStyleDeclaration;
_local1 = _styleName;
if (_styleDeclaration){
_local2 = _styleDeclaration.getStyle("themeColor");
_local3 = _styleDeclaration.getStyle("rollOverColor");
_local4 = _styleDeclaration.getStyle("selectionColor");
};
if (((((!(_local2)) && (_local1))) && (!((_local1 is ISimpleStyleClient))))){
_local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1;
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
};
if (!_local2){
_local6 = getClassStyleDeclarations();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_local8){
_local2 = _local8.getStyle("themeColor");
_local3 = _local8.getStyle("rollOverColor");
_local4 = _local8.getStyle("selectionColor");
};
if (_local2){
break;
};
_local7++;
};
};
if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
return (true);
};
return (((((_local2) && (!(isNaN(_local3))))) && (!(isNaN(_local4)))));
}
override public function get mouseX():Number{
if (((!(root)) || ((root[fakeMouseX] === undefined)))){
return (super.mouseX);
};
return (globalToLocal(new Point(root[fakeMouseX], 0)).x);
}
override public function get mouseY():Number{
if (((!(root)) || ((root[fakeMouseY] === undefined)))){
return (super.mouseY);
};
return (globalToLocal(new Point(0, root[fakeMouseY])).y);
}
override public function stopDrag():void{
super.stopDrag();
invalidateProperties();
dispatchEvent(new Event("xChanged"));
dispatchEvent(new Event("yChanged"));
}
public function get uid():String{
if (!_uid){
_uid = toString();
};
return (_uid);
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
public function get focusPane():Sprite{
return (_focusPane);
}
public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function set validationSubField(_arg1:String):void{
_validationSubField = _arg1;
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
public function get isDocument():Boolean{
return ((document == this));
}
mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{
if (!overlay){
overlayColor = _arg1;
overlay = new UIComponent();
overlay.name = "overlay";
fillOverlay(overlay, _arg1, _arg2);
attachOverlay();
if (!_arg2){
addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler);
};
overlay.x = 0;
overlay.y = 0;
invalidateDisplayList();
overlayReferenceCount = 1;
} else {
overlayReferenceCount++;
};
dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay));
}
override public function get visible():Boolean{
return (_visible);
}
public function get screen():Rectangle{
var _local1:ISystemManager;
_local1 = systemManager;
return ((_local1) ? _local1.screen : null);
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus(DisplayObject(_arg1.target))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
};
Container.checkFocus(_arg1.relatedObject, this);
};
}
private function focusObj_scrollHandler(_arg1:Event):void{
adjustFocusRect();
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
public function set explicitMinHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMinHeight == _arg1){
return;
};
_explicitMinHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinHeightChanged"));
}
public function stylesInitialized():void{
}
public function set errorString(_arg1:String):void{
ToolTipManager.registerErrorString(this, _arg1);
_errorString = _arg1;
errorStringChanged = true;
invalidateProperties();
dispatchEvent(new Event("errorStringChanged"));
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
final mx_internal function set $height(_arg1:Number):void{
super.height = _arg1;
}
final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{
return (super.removeChild(_arg1));
}
override public function set scaleX(_arg1:Number):void{
if (_scaleX == _arg1){
return;
};
_scaleX = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleXChanged"));
}
override public function set scaleY(_arg1:Number):void{
if (_scaleY == _arg1){
return;
};
_scaleY = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleYChanged"));
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
mx_internal function get isEffectStarted():Boolean{
return (_isEffectStarted);
}
public function set uid(_arg1:String):void{
this._uid = _arg1;
}
mx_internal function adjustSizesForScaleChanges():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = scaleX;
_local2 = scaleY;
if (_local1 != oldScaleX){
_local3 = Math.abs((_local1 / oldScaleX));
if (explicitMinWidth){
explicitMinWidth = (explicitMinWidth * _local3);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local3);
};
if (explicitMaxWidth){
explicitMaxWidth = (explicitMaxWidth * _local3);
};
oldScaleX = _local1;
};
if (_local2 != oldScaleY){
_local3 = Math.abs((_local2 / oldScaleY));
if (explicitMinHeight){
explicitMinHeight = (explicitMinHeight * _local3);
};
if (explicitHeight){
explicitHeight = (explicitHeight * _local3);
};
if (explicitMaxHeight){
explicitMaxHeight = (explicitMaxHeight * _local3);
};
oldScaleY = _local2;
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
public function determineTextFormatFromStyles():UITextFormat{
var _local1:UITextFormat;
_local1 = cachedTextFormat;
if (!_local1){
_local1 = new UITextFormat(systemManager);
_local1.align = _inheritingStyles.textAlign;
_local1.bold = (_inheritingStyles.fontWeight == "bold");
_local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor;
_local1.font = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ",");
_local1.indent = _inheritingStyles.textIndent;
_local1.italic = (_inheritingStyles.fontStyle == "italic");
_local1.kerning = _inheritingStyles.kerning;
_local1.leading = _nonInheritingStyles.leading;
_local1.leftMargin = _nonInheritingStyles.paddingLeft;
_local1.letterSpacing = _inheritingStyles.letterSpacing;
_local1.rightMargin = _nonInheritingStyles.paddingRight;
_local1.size = _inheritingStyles.fontSize;
_local1.underline = (_nonInheritingStyles.textDecoration == "underline");
_local1.antiAliasType = _inheritingStyles.fontAntiAliasType;
_local1.gridFitType = _inheritingStyles.fontGridFitType;
_local1.sharpness = _inheritingStyles.fontSharpness;
_local1.thickness = _inheritingStyles.fontThickness;
cachedTextFormat = _local1;
};
return (_local1);
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
if (automationDelegate){
return (automationDelegate.getAutomationChildAt(_arg1));
};
return (null);
}
private function focusObj_resizeHandler(_arg1:ResizeEvent):void{
adjustFocusRect();
}
public function validationResultHandler(_arg1:ValidationResultEvent):void{
var _local2:String;
var _local3:ValidationResult;
var _local4:int;
if (_arg1.type == ValidationResultEvent.VALID){
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
} else {
if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){
_local4 = 0;
while (_local4 < _arg1.results.length) {
_local3 = _arg1.results[_local4];
if (_local3.subField == validationSubField){
if (_local3.isError){
_local2 = _local3.errorMessage;
} else {
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
};
break;
};
_local4++;
};
} else {
if (((_arg1.results) && ((_arg1.results.length > 0)))){
_local2 = _arg1.results[0].errorMessage;
};
};
if (((_local2) && (!((errorString == _local2))))){
errorString = _local2;
dispatchEvent(new FlexEvent(FlexEvent.INVALID));
};
};
}
public function invalidateProperties():void{
if (!invalidatePropertiesFlag){
invalidatePropertiesFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
};
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_width != _arg1){
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
dispatchEvent(new Event("heightChanged"));
_local3 = true;
};
if (_local3){
invalidateDisplayList();
dispatchResizeEvent();
};
}
final mx_internal function get $x():Number{
return (super.x);
}
final mx_internal function get $y():Number{
return (super.y);
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function registerEffects(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:String;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]);
if (((!((_local4 == null))) && (!((_local4 == ""))))){
addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
_local3++;
};
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
if (automationDelegate){
return (automationDelegate.createAutomationIDPart(_arg1));
};
return (null);
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
private function filterChangeHandler(_arg1:Event):void{
super.filters = _filters;
}
override public function set x(_arg1:Number):void{
if (super.x == _arg1){
return;
};
super.x = _arg1;
invalidateProperties();
dispatchEvent(new Event("xChanged"));
}
override public function set y(_arg1:Number):void{
if (super.y == _arg1){
return;
};
super.y = _arg1;
invalidateProperties();
dispatchEvent(new Event("yChanged"));
}
public function set explicitHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
_showInAutomationHierarchy = _arg1;
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
}
mx_internal function getFocusObject():DisplayObject{
var _local1:IFocusManager;
_local1 = focusManager;
if (((!(_local1)) || (!(_local1.focusPane)))){
return (null);
};
return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0));
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren;
addingChild(_arg1);
$addChildAt(_arg1, _local2);
childAdded(_arg1);
return (_arg1);
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set percentWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
public function get document():Object{
return (_document);
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{
return (super.addChild(_arg1));
}
mx_internal function setThemeColor(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
if ((_local2 is String)){
_local2 = parseInt(String(_arg1));
} else {
_local2 = Number(_arg1);
};
if (isNaN(_local2)){
_local2 = StyleManager.getColorName(_arg1);
};
_local3 = ColorUtil.adjustBrightness2(_local2, 50);
_local4 = ColorUtil.adjustBrightness2(_local2, 70);
setStyle("selectionColor", _local3);
setStyle("rollOverColor", _local4);
}
override public function get height():Number{
return (_height);
}
public function get id():String{
return (_id);
}
public function set minWidth(_arg1:Number):void{
if (explicitMinWidth == _arg1){
return;
};
explicitMinWidth = _arg1;
}
public function set currentState(_arg1:String):void{
setCurrentState(_arg1, true);
}
public function getRepeaterItem(_arg1:int=-1):Object{
var _local2:Array;
_local2 = repeaters;
if (_arg1 == -1){
_arg1 = (_local2.length - 1);
};
return (_local2[_arg1].getItemAt(repeaterIndices[_arg1]));
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object;
_local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function get instanceIndex():int{
return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function effectFinished(_arg1:EffectInstance):void{
_endingEffectInstances.push(_arg1);
invalidateProperties();
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
}
public function set measuredWidth(_arg1:Number):void{
_measuredWidth = _arg1;
}
override public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = getChildAt(_arg1);
removingChild(_local2);
$removeChild(_local2);
childRemoved(_local2);
return (_local2);
}
mx_internal function set isEffectStarted(_arg1:Boolean):void{
_isEffectStarted = _arg1;
}
mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
var _local4:Graphics;
if (!_arg3){
_arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0);
};
_local4 = _arg1.graphics;
_local4.clear();
_local4.beginFill(_arg2);
_local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local4.endFill();
}
mx_internal function childAdded(_arg1:DisplayObject):void{
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).initialized){
UIComponent(_arg1).initialize();
};
} else {
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
};
}
public function globalToContent(_arg1:Point):Point{
return (globalToLocal(_arg1));
}
public function get instanceIndices():Array{
return ((_instanceIndices) ? _instanceIndices.slice(0) : null);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
}
private function getTransition(_arg1:String, _arg2:String):Effect{
var _local3:Effect;
var _local4:int;
var _local5:int;
var _local6:Transition;
_local3 = null;
_local4 = 0;
if (!transitions){
return (null);
};
if (!_arg1){
_arg1 = "";
};
if (!_arg2){
_arg2 = "";
};
_local5 = 0;
while (_local5 < transitions.length) {
_local6 = transitions[_local5];
if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){
_local3 = _local6.effect;
_local4 = 1;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){
_local3 = _local6.effect;
_local4 = 2;
} else {
if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){
_local3 = _local6.effect;
_local4 = 3;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){
_local3 = _local6.effect;
_local4 = 4;
break;
};
};
};
};
_local5++;
};
return (_local3);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
mx_internal function getEffectsForProperty(_arg1:String):Array{
return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []);
}
protected function get unscaledWidth():Number{
return ((width / Math.abs(scaleX)));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
if (_arg1){
dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
};
}
private function processEffectFinished(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:EffectInstance;
var _local5:EffectInstance;
var _local6:Array;
var _local7:int;
var _local8:String;
var _local9:int;
_local2 = (_effectsStarted.length - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
if (_local4 == _effectsStarted[_local2]){
_local5 = _effectsStarted[_local2];
_effectsStarted.splice(_local2, 1);
_local6 = _local5.effect.getAffectedProperties();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_affectedProperties[_local8] != undefined){
_local9 = 0;
while (_local9 < _affectedProperties[_local8].length) {
if (_affectedProperties[_local8][_local9] == _local4){
_affectedProperties[_local8].splice(_local9, 1);
break;
};
_local9++;
};
if (_affectedProperties[_local8].length == 0){
delete _affectedProperties[_local8];
};
};
_local7++;
};
break;
};
_local3++;
};
_local2--;
};
isEffectStarted = ((_effectsStarted.length > 0)) ? true : false;
}
protected function measure():void{
measuredWidth = (isNaN(_width)) ? 0 : _width;
measuredHeight = (isNaN(_height)) ? 0 : _height;
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent;
_local1 = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function set maxWidth(_arg1:Number):void{
if (explicitMaxWidth == _arg1){
return;
};
explicitMaxWidth = _arg1;
}
public function validateDisplayList():void{
var _local1:ISystemManager;
if (invalidateDisplayListFlag){
_local1 = (parent as ISystemManager);
if (_local1){
if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
};
updateDisplayList(((scaleX == 0)) ? 0 : (width / scaleX), ((scaleY == 0)) ? 0 : (height / scaleY));
invalidateDisplayListFlag = false;
};
}
public function contentToGlobal(_arg1:Point):Point{
return (localToGlobal(_arg1));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
if (automationDelegate){
return (automationDelegate.resolveAutomationIDPart(_arg1));
};
return ([]);
}
public function setFocus():void{
var _local1:ISystemManager;
_local1 = systemManager;
if (((_local1) && (_local1.stage))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
if (_arg1){
setVisible(_visible, true);
dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
};
}
public function owns(_arg1:DisplayObject):Boolean{
var _local2:IChildList;
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (_local2.contains(_arg1)){
return (true);
};
while (((_arg1) && (!((_arg1 == this))))) {
if ((_arg1 is IUIComponent)){
_arg1 = IUIComponent(_arg1).owner;
} else {
_arg1 = _arg1.parent;
};
};
return ((_arg1 == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
_visible = _arg1;
if (!initialized){
return;
};
if ($visible == _arg1){
return;
};
$visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
final mx_internal function set $y(_arg1:Number):void{
super.y = _arg1;
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:PropertyChangeEvent;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = null;
} else {
_local3 = _arg1[id];
if (!_local3){
return;
};
_local4 = [];
_local4.push(_local3);
_local5 = _local2.length;
_local6 = 0;
while (_local6 < (_local5 - 1)) {
_local8 = _local3[_local2[_local6]];
if (!_local8){
return;
};
_local3 = _local8;
_local4.push(_local3);
_local6++;
};
_local3.splice(_local2[(_local5 - 1)], 1);
_local7 = (_local4.length - 1);
while (_local7 > 0) {
if (_local4[_local7].length == 0){
_local4[(_local7 - 1)].splice(_local2[_local7], 1);
};
_local7--;
};
if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){
_arg1[id] = null;
} else {
_local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local9);
};
};
};
}
private function commitCurrentState():void{
var _local1:Effect;
var _local2:String;
var _local3:StateChangeEvent;
var _local4:String;
var _local5:State;
_local1 = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null;
_local2 = findCommonBaseState(_currentState, requestedCurrentState);
_local4 = (_currentState) ? _currentState : "";
_local5 = getState(requestedCurrentState);
if (_currentTransitionEffect){
_currentTransitionEffect.end();
};
initializeState(requestedCurrentState);
if (_local1){
_local1.captureStartValues();
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
_local3.oldState = _local4;
_local3.newState = (requestedCurrentState) ? requestedCurrentState : "";
dispatchEvent(_local3);
if (isBaseState(_currentState)){
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
};
removeState(_currentState, _local2);
_currentState = requestedCurrentState;
if (isBaseState(currentState)){
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
} else {
applyState(_currentState, _local2);
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
_local3.oldState = _local4;
_local3.newState = (_currentState) ? _currentState : "";
dispatchEvent(_local3);
if (_local1){
UIComponentGlobals.layoutManager.validateNow();
_currentTransitionEffect = _local1;
_local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler);
_local1.play();
};
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
final mx_internal function set $x(_arg1:Number):void{
super.x = _arg1;
}
private function applyState(_arg1:String, _arg2:String):void{
var _local3:State;
var _local4:Array;
var _local5:int;
_local3 = getState(_arg1);
if (_local3){
if (_local3.basedOn != _arg2){
applyState(_local3.basedOn, _arg2);
};
_local4 = _local3.overrides;
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5].apply(this);
_local5++;
};
_local3.dispatchEnterState();
};
}
override public function get width():Number{
return (_width);
}
public function effectStarted(_arg1:EffectInstance):void{
var _local2:Array;
var _local3:int;
var _local4:String;
_effectsStarted.push(_arg1);
_local2 = _arg1.effect.getAffectedProperties();
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_affectedProperties[_local4] == undefined){
_affectedProperties[_local4] = [];
};
_affectedProperties[_local4].push(_arg1);
_local3++;
};
isEffectStarted = true;
}
protected function commitProperties():void{
var _local1:Number;
var _local2:Number;
if (_scaleX != oldScaleX){
_local1 = Math.abs((_scaleX / oldScaleX));
if (!isNaN(explicitMinWidth)){
explicitMinWidth = (explicitMinWidth * _local1);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local1);
};
if (!isNaN(explicitMaxWidth)){
explicitMaxWidth = (explicitMaxWidth * _local1);
};
_width = (_width * _local1);
super.scaleX = (oldScaleX = _scaleX);
};
if (_scaleY != oldScaleY){
_local2 = Math.abs((_scaleY / oldScaleY));
if (!isNaN(explicitMinHeight)){
explicitMinHeight = (explicitMinHeight * _local2);
};
if (!isNaN(explicitHeight)){
explicitHeight = (explicitHeight * _local2);
};
if (!isNaN(explicitMaxHeight)){
explicitMaxHeight = (explicitMaxHeight * _local2);
};
_height = (_height * _local2);
super.scaleY = (oldScaleY = _scaleY);
};
if (((!((x == oldX))) || (!((y == oldY))))){
dispatchMoveEvent();
};
if (((!((width == oldWidth))) || (!((height == oldHeight))))){
dispatchResizeEvent();
};
if (errorStringChanged){
errorStringChanged = false;
setBorderColorForErrorString();
};
}
public function get percentHeight():Number{
return (_percentHeight);
}
final mx_internal function get $parent():DisplayObjectContainer{
return (super.parent);
}
public function set explicitMinWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMinWidth == _arg1){
return;
};
_explicitMinWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinWidthChanged"));
}
public function get isPopUp():Boolean{
return (_isPopUp);
}
private function measureSizes():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = false;
if (!invalidateSizeFlag){
return (_local1);
};
if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){
_local4 = Math.abs(scaleX);
_local5 = Math.abs(scaleY);
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth / _local4);
_measuredWidth = (_measuredWidth / _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight / _local5);
_measuredHeight = (_measuredHeight / _local5);
};
measure();
invalidateSizeFlag = false;
if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){
measuredWidth = explicitMinWidth;
};
if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){
measuredWidth = explicitMaxWidth;
};
if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){
measuredHeight = explicitMinHeight;
};
if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){
measuredHeight = explicitMaxHeight;
};
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth * _local4);
_measuredWidth = (_measuredWidth * _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight * _local5);
_measuredHeight = (_measuredHeight * _local5);
};
} else {
invalidateSizeFlag = false;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
};
adjustSizesForScaleChanges();
if (isNaN(oldMinWidth)){
oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
_local1 = true;
} else {
_local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
if (_local3 != oldMinWidth){
oldMinWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
if (_local3 != oldMinHeight){
oldMinHeight = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
if (_local3 != oldExplicitWidth){
oldExplicitWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
if (_local3 != oldExplicitHeight){
oldExplicitHeight = _local3;
_local1 = true;
};
};
return (_local1);
}
public function get automationTabularData():Object{
if (automationDelegate){
return (automationDelegate.automationTabularData);
};
return (null);
}
public function validateNow():void{
UIComponentGlobals.layoutManager.validateClient(this);
}
public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
}
public function get repeaters():Array{
return ((_repeaters) ? _repeaters.slice(0) : []);
}
private function dispatchMoveEvent():void{
var _local1:MoveEvent;
_local1 = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:DisplayObject;
var _local3:Sprite;
var _local4:DisplayObjectContainer;
var _local5:Class;
if (!parent){
return;
};
_local2 = getFocusObject();
_local3 = (focusManager) ? focusManager.focusPane : null;
if (((_arg1) && (!(isEffectStarted)))){
_local4 = _local3.parent;
if (_local4 != parent){
if (_local4){
if ((_local4 is ISystemManager)){
ISystemManager(_local4).focusPane = null;
} else {
IUIComponent(_local4).focusPane = null;
};
};
if ((parent is ISystemManager)){
ISystemManager(parent).focusPane = _local3;
} else {
IUIComponent(parent).focusPane = _local3;
};
};
_local5 = getStyle("focusSkin");
if (((_local2) && (!((_local2 is _local5))))){
_local3.removeChild(_local2);
_local2 = null;
};
if (!_local2){
_local2 = new (_local5);
_local2.name = "focus";
_local3.addChild(_local2);
};
if ((_local2 is ILayoutManagerClient)){
ILayoutManagerClient(_local2).nestLevel = nestLevel;
};
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
addEventListener(MoveEvent.MOVE, focusObj_moveHandler);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
addEventListener(Event.REMOVED, focusObj_removedHandler, true);
_local2.visible = true;
hasFocusRect = true;
adjustFocusRect();
} else {
if (hasFocusRect){
if (_local2){
_local2.visible = false;
};
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler);
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
removeEventListener(Event.REMOVED, focusObj_removedHandler, true);
};
};
}
private function get indexedID():String{
var _local1:String;
var _local2:Array;
_local1 = id;
_local2 = instanceIndices;
if (_local2){
_local1 = (_local1 + (("[" + _local2.join("][")) + "]"));
};
return (_local1);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = (document) ? document : Application.application;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
} else {
if ((_arg1 is UITextField)){
UITextField(_arg1).nestLevel = (nestLevel + 1);
};
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
} else {
if ((((_arg1 is UITextField)) && (UITextField(_arg1).inheritingStyles))){
StyleProtoChain.initTextField(UITextField(_arg1));
};
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).initThemeColor();
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).stylesInitialized();
};
}
protected function initializationComplete():void{
processedDescriptors = true;
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
public function set repeaterIndices(_arg1:Array):void{
_repeaterIndices = _arg1;
}
private function focusObj_removedHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (_arg1.target != this){
return;
};
_local2 = getFocusObject();
if (_local2){
_local2.visible = false;
};
}
mx_internal function updateCallbacks():void{
if (invalidateDisplayListFlag){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
if (invalidateSizeFlag){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
if (invalidatePropertiesFlag){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
if (systemManager){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_systemManager.stage.invalidate();
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _local3:int;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if ((this is IRawChildrenContainer)){
_local2 = IRawChildrenContainer(this).rawChildren;
} else {
_local2 = IChildList(this);
};
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = (_local2.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
}
public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
return (null);
}
public function get minHeight():Number{
if (!isNaN(explicitMinHeight)){
return (explicitMinHeight);
};
return (measuredMinHeight);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:int;
var _local4:int;
var _local5:ISimpleStyleClient;
cachedTextFormat = null;
_local3 = numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
_local4++;
};
}
public function get contentMouseX():Number{
return (mouseX);
}
public function get contentMouseY():Number{
return (mouseY);
}
public function get tweeningProperties():Array{
return (_tweeningProperties);
}
public function set explicitMaxWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMaxWidth == _arg1){
return;
};
_explicitMaxWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxWidthChanged"));
}
public function set document(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:IUIComponent;
_local2 = numChildren;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as IUIComponent);
if (!_local4){
} else {
if ((((_local4.document == _document)) || ((_local4.document == Application.application)))){
_local4.document = _arg1;
};
};
_local3++;
};
_document = _arg1;
}
public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:IInvalidating;
if (_arg1){
_local2 = 0;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if ((_local3 is ILayoutManagerClient)){
(_local3 as ILayoutManagerClient).validateSize(true);
};
_local2++;
};
};
if (invalidateSizeFlag){
_local4 = measureSizes();
if (((_local4) && (includeInLayout))){
invalidateDisplayList();
_local5 = (parent as IInvalidating);
if (_local5){
_local5.invalidateSize();
_local5.invalidateDisplayList();
};
};
};
}
override public function dispatchEvent(_arg1:Event):Boolean{
if (dispatchEventHook != null){
dispatchEventHook(_arg1, this);
};
return (super.dispatchEvent(_arg1));
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
final mx_internal function get $height():Number{
return (super.height);
}
override public function set height(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitHeight != _arg1){
explicitHeight = _arg1;
invalidateSize();
};
if (_height != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_height = _arg1;
dispatchEvent(new Event("heightChanged"));
};
}
protected function attachOverlay():void{
addChild(overlay);
}
private function overlay_resizeHandler(_arg1:Event):void{
fillOverlay(overlay, overlayColor, null);
}
public function get numAutomationChildren():int{
if (automationDelegate){
return (automationDelegate.numAutomationChildren);
};
return (0);
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
public function localToContent(_arg1:Point):Point{
return (_arg1);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function get parentApplication():Object{
var _local1:Object;
var _local2:UIComponent;
_local1 = systemManager.document;
if (_local1 == this){
_local2 = (_local1.systemManager.parent as UIComponent);
_local1 = (_local2) ? _local2.systemManager.document : null;
};
return (_local1);
}
private function removeState(_arg1:String, _arg2:String):void{
var _local3:State;
var _local4:Array;
var _local5:int;
_local3 = getState(_arg1);
if (_local3){
_local3.dispatchExitState();
_local4 = _local3.overrides;
_local5 = _local4.length;
while (_local5) {
_local4[(_local5 - 1)].remove(this);
_local5--;
};
if (_local3.basedOn != _arg2){
removeState(_local3.basedOn, _arg2);
};
};
}
public function setStyle(_arg1:String, _arg2):void{
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
if (_arg1 == "styleName"){
styleName = _arg2;
return;
};
if (EffectManager.getEventForEffectTrigger(_arg1) != ""){
EffectManager.setStyle(_arg1, this);
};
_local3 = StyleManager.isInheritingStyle(_arg1);
_local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED));
_local5 = !((getStyle(_arg1) == _arg2));
if (!_styleDeclaration){
_styleDeclaration = new CSSStyleDeclaration();
_styleDeclaration.setStyle(_arg1, _arg2);
if (_local4){
regenerateStyleCache(_local3);
};
} else {
_styleDeclaration.setStyle(_arg1, _arg2);
};
if (((_local4) && (_local5))){
styleChanged(_arg1);
notifyStyleChangeInChildren(_arg1, _local3);
};
}
public function get validationSubField():String{
return (_validationSubField);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (!_systemManager){
_local1 = root;
if (_local1){
_systemManager = (_local1 as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
};
_local2 = _local2.parent;
};
};
};
return (_systemManager);
}
public function get showInAutomationHierarchy():Boolean{
return (_showInAutomationHierarchy);
}
private function isBaseState(_arg1:String):Boolean{
return (((!(_arg1)) || ((_arg1 == ""))));
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1)));
};
addingChild(_arg1);
$addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
cachedTextFormat = null;
invalidateDisplayList();
dispatchEvent(new Event("enabledChanged"));
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
private function setFocusLater(_arg1:Event=null):void{
var _local2:ISystemManager;
_local2 = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater);
if (UIComponentGlobals.nextFocusObject){
_local2.stage.focus = UIComponentGlobals.nextFocusObject;
};
UIComponentGlobals.nextFocusObject = null;
};
}
public function get currentState():String{
return ((_currentStateChanged) ? requestedCurrentState : _currentState);
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get baselinePosition():Number{
return (NaN);
}
public function set cachePolicy(_arg1:String):void{
if (_cachePolicy != _arg1){
_cachePolicy = _arg1;
if (_arg1 == UIComponentCachePolicy.OFF){
cacheAsBitmap = false;
} else {
if (_arg1 == UIComponentCachePolicy.ON){
cacheAsBitmap = true;
} else {
cacheAsBitmap = (cacheAsBitmapCount > 0);
};
};
};
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([]);
}
public function set instanceIndices(_arg1:Array):void{
_instanceIndices = _arg1;
}
public function get repeaterIndex():int{
return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1);
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
override public function set alpha(_arg1:Number):void{
super.alpha = _arg1;
dispatchEvent(new Event("alphaChanged"));
}
public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{
if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){
_instanceIndices = _arg1.instanceIndices;
_repeaters = _arg1.repeaters;
_repeaterIndices = _arg1.repeaterIndices;
};
}
public function get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth);
}
private function removedHandler(_arg1:Event):void{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is Container)) && (Container(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
}
public function callLater(_arg1:Function, _arg2:Array=null):void{
var _local3:ISystemManager;
methodQueue.push(new MethodQueueElement(_arg1, _arg2));
_local3 = systemManager;
if (((_local3) && (_local3.stage))){
if (!listeningForRender){
_local3.stage.addEventListener(Event.RENDER, callLaterDispatcher);
_local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
_local3.stage.invalidate();
};
}
private function addedHandler(_arg1:Event):void{
if (_arg1.eventPhase != EventPhase.AT_TARGET){
return;
};
if ((((parent is Container)) && (Container(parent).creatingContentPane))){
_arg1.stopImmediatePropagation();
return;
};
}
public function get initialized():Boolean{
return (_initialized);
}
private function callLaterDispatcher2(_arg1:Event):void{
var _local2:ISystemManager;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:MethodQueueElement;
if (UIComponentGlobals.callLaterSuspendCount > 0){
return;
};
_local2 = systemManager;
if (((((_local2) && (_local2.stage))) && (listeningForRender))){
_local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
_local3 = methodQueue;
methodQueue = [];
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = MethodQueueElement(_local3[_local5]);
_local6.method.apply(null, _local6.args);
_local5++;
};
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureHTMLText(_arg1));
}
public function set descriptor(_arg1:UIComponentDescriptor):void{
_descriptor = _arg1;
}
private function getState(_arg1:String):State{
var _local2:int;
if (((!(states)) || (isBaseState(_arg1)))){
return (null);
};
_local2 = 0;
while (_local2 < states.length) {
if (states[_local2].name == _arg1){
return (states[_local2]);
};
_local2++;
};
if (resourceStateUndefined == null){
loadResources();
};
throw (new ArgumentError(StringUtil.substitute(resourceStateUndefined, _arg1)));
}
mx_internal function get documentDescriptor():UIComponentDescriptor{
return (_documentDescriptor);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("includeInLayoutChanged"));
};
}
public function getClassStyleDeclarations():Array{
var myApplicationDomain:ApplicationDomain;
var factory:IFlexModuleFactory;
var className:String;
var cache:Array;
var decls:Array;
var classNames:Array;
var caches:Array;
var declcache:Array;
var myRoot:DisplayObject;
var s:CSSStyleDeclaration;
factory = ModuleManager.getAssociatedFactory(this);
if (factory != null){
myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
} else {
myRoot = SystemManager.getSWFRoot(this);
if (!myRoot){
return ([]);
};
myApplicationDomain = myRoot.loaderInfo.applicationDomain;
};
className = getQualifiedClassName(this);
className = className.replace("::", ".");
cache = StyleManager.typeSelectorCache[className];
if (cache){
return (cache);
};
decls = [];
classNames = [];
caches = [];
declcache = [];
while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) {
cache = StyleManager.typeSelectorCache[className];
if (cache){
decls = decls.concat(cache);
break;
};
s = StyleManager.getStyleDeclaration(className);
if (s){
decls.unshift(s);
classNames.push(className);
caches.push(classNames);
declcache.push(decls);
decls = [];
classNames = [];
} else {
classNames.push(className);
};
try {
className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
className = className.replace("::", ".");
} catch(e:ReferenceError) {
className = null;
};
};
caches.push(classNames);
declcache.push(decls);
decls = [];
while (caches.length) {
classNames = caches.pop();
decls = decls.concat(declcache.pop());
while (classNames.length) {
StyleManager.typeSelectorCache[classNames.pop()] = decls;
};
};
return (decls);
}
public function validateProperties():void{
if (invalidatePropertiesFlag){
commitProperties();
invalidatePropertiesFlag = false;
};
}
public function set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
$removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
private function initializeState(_arg1:String):void{
var _local2:State;
_local2 = getState(_arg1);
while (_local2) {
_local2.initialize();
_local2 = getState(_local2.basedOn);
};
}
private function focusObj_moveHandler(_arg1:MoveEvent):void{
adjustFocusRect();
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_styleDeclaration);
}
override public function get doubleClickEnabled():Boolean{
return (super.doubleClickEnabled);
}
mx_internal function initProtoChain():void{
var _local1:CSSStyleDeclaration;
var _local2:Object;
var _local3:IStyleClient;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:CSSStyleDeclaration;
if (styleName){
if ((styleName is CSSStyleDeclaration)){
_local1 = CSSStyleDeclaration(styleName);
} else {
if ((styleName is IFlexDisplayObject)){
StyleProtoChain.initProtoChainForUIComponentStyleName(this);
return;
};
if ((styleName is String)){
_local1 = StyleManager.getStyleDeclaration(("." + styleName));
};
};
};
_local2 = StyleManager.stylesRoot;
if (((_local2) && (_local2.effects))){
registerEffects(_local2.effects);
};
_local3 = (parent as IStyleClient);
if (_local3){
_local7 = _local3.inheritingStyles;
if (_local7 == UIComponent.STYLE_UNINITIALIZED){
_local7 = _local2;
};
} else {
if (isPopUp){
_local7 = Application.application.inheritingStyles;
} else {
_local7 = StyleManager.stylesRoot;
};
};
_local4 = getClassStyleDeclarations();
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_local7 = _local8.addStyleToProtoChain(_local7, this);
_local2 = _local8.addStyleToProtoChain(_local2, this);
if (_local8.effects){
registerEffects(_local8.effects);
};
_local6++;
};
if (_local1){
_local7 = _local1.addStyleToProtoChain(_local7, this);
_local2 = _local1.addStyleToProtoChain(_local2, this);
if (_local1.effects){
registerEffects(_local1.effects);
};
};
inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7;
nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2;
}
public function get repeaterIndices():Array{
return ((_repeaterIndices) ? _repeaterIndices.slice() : []);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (_currentStateChanged){
_currentStateChanged = false;
commitCurrentState();
validateNow();
};
removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2)));
};
super.setChildIndex(_arg1, _arg2);
}
public function set measuredHeight(_arg1:Number):void{
_measuredHeight = _arg1;
}
protected function createChildren():void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
initProtoChain();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IStyleClient)){
if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
IStyleClient(_local5).regenerateStyleCache(_arg1);
};
} else {
if ((_local5 is UITextField)){
if (UITextField(_local5).inheritingStyles){
StyleProtoChain.initTextField(UITextField(_local5));
};
};
};
_local4++;
};
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus(DisplayObject(_arg1.target))){
drawFocus(false);
};
}
public function contentToLocal(_arg1:Point):Point{
return (_arg1);
}
public function getFocus():InteractiveObject{
var _local1:ISystemManager;
_local1 = systemManager;
if (!_local1){
return (null);
};
if (UIComponentGlobals.nextFocusObject){
return (UIComponentGlobals.nextFocusObject);
};
return (_local1.stage.focus);
}
public function endEffectsStarted():void{
var _local1:int;
var _local2:int;
_local1 = _effectsStarted.length;
_local2 = 0;
while (_local2 < _local1) {
_effectsStarted[_local2].end();
_local2++;
};
}
protected function get unscaledHeight():Number{
return ((height / Math.abs(scaleY)));
}
public function get enabled():Boolean{
return (_enabled);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
cacheAsBitmapCount = (_arg1) ? 1 : 0;
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
mx_internal function removeOverlay():void{
if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){
removeEventListener("resize", overlay_resizeHandler);
if (super.getChildByName("overlay")){
$removeChild(overlay);
};
overlay = null;
};
}
public function set cacheHeuristic(_arg1:Boolean):void{
if (_cachePolicy == UIComponentCachePolicy.AUTO){
if (_arg1){
cacheAsBitmapCount++;
} else {
if (cacheAsBitmapCount != 0){
cacheAsBitmapCount--;
};
};
super.cacheAsBitmap = !((cacheAsBitmapCount == 0));
};
}
public function get cachePolicy():String{
return (_cachePolicy);
}
public function set maxHeight(_arg1:Number):void{
if (explicitMaxHeight == _arg1){
return;
};
explicitMaxHeight = _arg1;
}
public function set focusManager(_arg1:IFocusManager):void{
_focusManager = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function get descriptor():UIComponentDescriptor{
return (_descriptor);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (_measuredMinWidth);
}
public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:PropertyChangeEvent;
var _local7:Object;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = this;
} else {
_local3 = _arg1[id];
if (!(_local3 is Array)){
_local3 = (_arg1[id] = []);
};
_local4 = _local2.length;
_local5 = 0;
while (_local5 < (_local4 - 1)) {
_local7 = _local3[_local2[_local5]];
if (!(_local7 is Array)){
_local7 = (_local3[_local2[_local5]] = []);
};
_local3 = _local7;
_local5++;
};
_local3[_local2[(_local4 - 1)]] = this;
_local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local6);
};
};
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
override public function set width(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitWidth != _arg1){
explicitWidth = _arg1;
invalidateSize();
};
if (_width != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
};
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function get repeater():IRepeater{
return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null);
}
public function initialize():void{
if (initialized){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
createChildren();
childrenCreated();
initializeAccessibility();
initializationComplete();
}
public function set percentHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
final mx_internal function set $visible(_arg1:Boolean):void{
super.visible = _arg1;
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
private function findCommonBaseState(_arg1:String, _arg2:String):String{
var _local3:State;
var _local4:State;
var _local5:Array;
var _local6:Array;
var _local7:String;
_local3 = getState(_arg1);
_local4 = getState(_arg2);
if (((!(_local3)) || (!(_local4)))){
return ("");
};
if (((isBaseState(_local3.basedOn)) || (isBaseState(_local4.basedOn)))){
return ("");
};
_local5 = getBaseStates(_local3);
_local6 = getBaseStates(_local4);
_local7 = "";
while (_local5[_local5.length] == _local6[_local6.length]) {
_local7 = _local5.pop();
_local6.pop();
if (((!(_local5.length)) || (!(_local6.length)))){
break;
};
};
return (_local7);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
if (IUIComponent(_arg1).document != _arg1){
IUIComponent(_arg1).document = null;
};
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
public function get maxHeight():Number{
return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight);
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
if (_focusManager){
return (_focusManager);
};
_local1 = parent;
while (_local1) {
if ((_local1 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local1).focusManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){
return;
};
regenerateStyleCache(true);
initThemeColor();
styleChanged("styleName");
notifyStyleChangeInChildren("styleName", true);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function set explicitMaxHeight(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitMaxHeight == _arg1){
return;
};
_explicitMaxHeight = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxHeightChanged"));
}
mx_internal function cancelAllCallLaters():void{
var _local1:ISystemManager;
_local1 = systemManager;
if (((_local1) && (_local1.stage))){
if (listeningForRender){
_local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher);
_local1.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
};
methodQueue.splice(0);
}
private function updateCompleteHandler(_arg1:Event):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
processEffectFinished(_endingEffectInstances);
_endingEffectInstances = [];
}
public function styleChanged(_arg1:String):void{
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateSize();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){
initThemeColor();
};
invalidateDisplayList();
if ((parent is IInvalidating)){
if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateSize();
};
if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateDisplayList();
};
};
}
final mx_internal function get $visible():Boolean{
return (super.visible);
}
public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{
var _local12:Graphics;
var _local13:Number;
var _local14:Array;
var _local15:Matrix;
var _local16:Object;
_local12 = graphics;
if (((!(_arg3)) || (!(_arg4)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is Array)){
if ((_arg7 is Array)){
_local14 = (_arg7 as Array);
} else {
_local14 = [_arg7, _arg7];
};
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local15 = null;
if (_arg8){
if ((_arg8 is Matrix)){
_local15 = Matrix(_arg8);
} else {
_local15 = new Matrix();
if ((_arg8 is Number)){
_local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2);
} else {
_local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y);
};
};
};
if (_arg9 == GradientType.RADIAL){
_local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15);
} else {
_local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15);
};
} else {
_local12.beginFill(Number(_arg6), Number(_arg7));
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local16 = _arg11.r;
if ((_local16 is Number)){
_local13 = (Number(_local16) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function move(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_arg1 != super.x){
super.x = _arg1;
dispatchEvent(new Event("xChanged"));
_local3 = true;
};
if (_arg2 != super.y){
super.y = _arg2;
dispatchEvent(new Event("yChanged"));
_local3 = true;
};
if (_local3){
dispatchMoveEvent();
};
}
public function set toolTip(_arg1:String):void{
ToolTipManager.registerToolTip(this, _arg1);
_toolTip = _arg1;
dispatchEvent(new Event("toolTipChanged"));
}
public function set repeaters(_arg1:Array):void{
_repeaters = _arg1;
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function get styleName():Object{
return (_styleName);
}
private function loadResources():void{
resourceStateUndefined = packageResources.getString("stateUndefined");
}
public function set explicitWidth(_arg1:Number):void{
var _local2:IInvalidating;
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
invalidateSize();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
public function get parentDocument():Object{
var _local1:IUIComponent;
var _local2:ISystemManager;
if (document == this){
_local1 = (parent as IUIComponent);
if (_local1){
return (_local1.document);
};
_local2 = (parent as ISystemManager);
if (_local2){
return (_local2.document);
};
return (null);
//unresolved jump
};
return (document);
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
protected function childrenCreated():void{
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
private function setBorderColorForErrorString():void{
var _local1:IFocusManager;
var _local2:DisplayObject;
if (((!(_errorString)) || ((_errorString.length == 0)))){
setStyle("borderColor", origBorderColor);
saveBorderColor = true;
} else {
if (saveBorderColor){
saveBorderColor = false;
origBorderColor = getStyle("borderColor");
};
setStyle("borderColor", getStyle("errorColor"));
};
styleChanged("themeColor");
_local1 = focusManager;
_local2 = (_local1) ? DisplayObject(_local1.getFocus()) : null;
if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){
drawFocus(true);
};
}
public function measureText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureText(_arg1));
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
if (!invalidateSizeFlag){
invalidateSizeFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
};
}
override public function set filters(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:IEventDispatcher;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.removeEventListener("change", filterChangeHandler);
};
_local3++;
};
};
_filters = _arg1;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.addEventListener("change", filterChangeHandler);
};
_local3++;
};
};
super.filters = _filters;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
override public function get filters():Array{
return ((_filters) ? _filters : super.filters);
}
public static function resumeBackgroundProcessing():void{
var _local1:SystemManager;
if (UIComponentGlobals.callLaterSuspendCount > 0){
UIComponentGlobals.callLaterSuspendCount--;
if (UIComponentGlobals.callLaterSuspendCount == 0){
_local1 = SystemManagerGlobals.topLevelSystemManagers[0];
if (((_local1) && (_local1.stage))){
_local1.stage.invalidate();
};
};
};
}
public static function suspendBackgroundProcessing():void{
UIComponentGlobals.callLaterSuspendCount++;
}
}
}//package mx.core
class MethodQueueElement {
public var method:Function;
public var args:Array;
private function MethodQueueElement(_arg1:Function, _arg2:Array=null){
this.method = _arg1;
this.args = _arg2;
}
}
Section 76
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy)
package mx.core {
public final class UIComponentCachePolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OFF:String = "off";
}
}//package mx.core
Section 77
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
public var effects:Array;
public var stylesFactory:Function;
mx_internal var instanceIndices:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 78
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
}
}//package mx.core
Section 79
//UITextField (mx.core.UITextField)
package mx.core {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import mx.styles.*;
import mx.managers.*;
import mx.automation.*;
import flash.text.*;
import flash.utils.*;
import mx.utils.*;
public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent {
private var _initialized:Boolean;// = false
private var invalidateDisplayListFlag:Boolean;// = true
mx_internal var explicitColor:uint;// = 4294967295
private var _processedDescriptors:Boolean;// = true
private var explicitHTMLText:String;// = null
private var _owner:DisplayObjectContainer;
mx_internal var _parent:DisplayObjectContainer;
mx_internal var styleChangedFlag:Boolean;// = true
private var _explicitWidth:Number;
private var _enabled:Boolean;// = true
private var cachedTextFormat:TextFormat;
private var _automationDelegate:IAutomationObject;
private var _automationName:String;
private var _document:Object;
private var _styleName:Object;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _toolTip:String;
private var _nonInheritingStyles:Object;
private var _moduleFactory:IFlexModuleFactory;
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
private var _updateCompletePendingFlag:Boolean;// = false
private var _imeMode:String;// = null
private var _ignorePadding:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
mx_internal static const TEXT_WIDTH_PADDING:int = 5;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain);
private static var resourceTruncationIndicator:String;
public function UITextField(){
invalidateDisplayListFlag = true;
styleChangedFlag = true;
explicitHTMLText = null;
explicitColor = StyleManager.NOT_A_COLOR;
_enabled = true;
_ignorePadding = true;
_imeMode = null;
_includeInLayout = true;
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_initialized = false;
_nestLevel = 0;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_processedDescriptors = true;
_updateCompletePendingFlag = false;
super();
focusRect = false;
selectable = false;
tabEnabled = false;
addEventListener(Event.CHANGE, changeHandler);
addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
StyleProtoChain.initTextField(this);
styleChangedFlag = true;
validateNow();
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function setColor(_arg1:uint):void{
explicitColor = _arg1;
styleChangedFlag = true;
invalidateDisplayListFlag = true;
validateNow();
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
private function creatingSystemManager():ISystemManager{
return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager);
}
public function set tweeningProperties(_arg1:Array):void{
}
public function invalidateDisplayList():void{
invalidateDisplayListFlag = true;
}
public function get focusPane():Sprite{
return (null);
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function getTextStyles():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.align = getStyle("textAlign");
_local1.bold = (getStyle("fontWeight") == "bold");
if (enabled){
if (explicitColor == StyleManager.NOT_A_COLOR){
_local1.color = getStyle("color");
} else {
_local1.color = explicitColor;
};
} else {
_local1.color = getStyle("disabledColor");
};
_local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
_local1.indent = getStyle("textIndent");
_local1.italic = (getStyle("fontStyle") == "italic");
_local1.kerning = getStyle("kerning");
_local1.leading = getStyle("leading");
_local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft");
_local1.letterSpacing = getStyle("letterSpacing");
_local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight");
_local1.size = getStyle("fontSize");
_local1.underline = (getStyle("textDecoration") == "underline");
cachedTextFormat = _local1;
return (_local1);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get percentWidth():Number{
return (NaN);
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
return (null);
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (width != _arg1){
width = _arg1;
};
if (height != _arg2){
height = _arg2;
};
}
public function set focusPane(_arg1:Sprite):void{
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
return (null);
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function invalidateProperties():void{
}
public function get explicitMinWidth():Number{
return (NaN);
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
}
public function set systemManager(_arg1:ISystemManager):void{
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set percentWidth(_arg1:Number):void{
}
public function get imeMode():String{
return (_imeMode);
}
public function get document():Object{
return (_document);
}
public function get explicitMaxWidth():Number{
return (NaN);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
private function changeHandler(_arg1:Event):void{
explicitHTMLText = null;
}
override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{
if (styleSheet){
return;
};
super.setTextFormat(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textFormatChange"));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function setFocus():void{
systemManager.stage.focus = this;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
public function owns(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
this.visible = _arg1;
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function get isPopUp():Boolean{
return (false);
}
public function get percentHeight():Number{
return (NaN);
}
public function truncateToFit(_arg1:String=null):Boolean{
var _local2:String;
var _local3:Number;
var _local4:String;
if (!_arg1){
_arg1 = resourceTruncationIndicator;
};
validateNow();
_local2 = super.text;
_local3 = width;
if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))){
var _local5 = _local2;
super.text = _local5;
_local4 = _local5;
_local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length)));
while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) {
_local4 = _local4.slice(0, -1);
super.text = (_local4 + _arg1);
};
return (true);
};
return (false);
}
public function validateNow():void{
var _local1:TextFormat;
var _local2:ISystemManager;
if (!parent){
return;
};
if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){
super.width = ((explicitWidth)>4) ? explicitWidth : 4;
};
if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){
super.height = explicitHeight;
};
if (styleChangedFlag){
_local1 = getTextStyles();
_local2 = creatingSystemManager();
embedFonts = (_local1.font) ? ((!((_local2 == null))) && (_local2.isFontFaceEmbedded(_local1))) : getStyle("embedFonts");
antiAliasType = getStyle("fontAntiAliasType");
gridFitType = getStyle("fontGridFitType");
sharpness = getStyle("fontSharpness");
thickness = getStyle("fontThickness");
if (!styleSheet){
super.setTextFormat(_local1);
defaultTextFormat = _local1;
};
dispatchEvent(new Event("textFieldStyleChange"));
};
styleChangedFlag = false;
invalidateDisplayListFlag = false;
}
public function get ignorePadding():Boolean{
return (_ignorePadding);
}
public function get automationTabularData():Object{
return (null);
}
private function textFieldStyleChangeHandler(_arg1:Event):void{
if (explicitHTMLText != null){
super.htmlText = explicitHTMLText;
};
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function get measuredMinHeight():Number{
return (0);
}
public function get minHeight():Number{
return (0);
}
public function get tweeningProperties():Array{
return (null);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
public function get explicitMinHeight():Number{
return (NaN);
}
override public function set text(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((!(isHTML)) && ((super.text == _arg1)))){
return;
};
super.text = _arg1;
explicitHTMLText = null;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function get numAutomationChildren():int{
return (0);
}
public function setStyle(_arg1:String, _arg2):void{
}
public function get showInAutomationHierarchy():Boolean{
return (true);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:IUIComponent;
_local1 = parent;
while (_local1) {
_local2 = (_local1 as IUIComponent);
if (_local2){
return (_local2.systemManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function get baselinePosition():Number{
var _local1:TextLineMetrics;
_local1 = getLineMetrics(0);
return (((height - 4) - _local1.descent));
}
public function set enabled(_arg1:Boolean):void{
mouseEnabled = _arg1;
_enabled = _arg1;
styleChanged("color");
}
public function get minWidth():Number{
return (0);
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([""]);
}
public function get measuredWidth():Number{
validateNow();
return ((textWidth + TEXT_WIDTH_PADDING));
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get maxWidth():Number{
return (UIComponent.DEFAULT_MAX_WIDTH);
}
public function get initialized():Boolean{
return (_initialized);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
override public function set htmlText(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((isHTML) && ((super.htmlText == _arg1)))){
return;
};
if (((cachedTextFormat) && ((styleSheet == null)))){
defaultTextFormat = cachedTextFormat;
};
super.htmlText = _arg1;
explicitHTMLText = _arg1;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function set measuredMinWidth(_arg1:Number):void{
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
public function get enabled():Boolean{
return (_enabled);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (0);
}
public function set isPopUp(_arg1:Boolean):void{
}
public function get measuredHeight():Number{
validateNow();
return ((textHeight + TEXT_HEIGHT_PADDING));
}
public function getUITextFormat():UITextFormat{
var _local1:UITextFormat;
validateNow();
_local1 = new UITextFormat(creatingSystemManager());
_local1.copyFrom(getTextFormat());
_local1.antiAliasType = antiAliasType;
_local1.gridFitType = gridFitType;
_local1.sharpness = sharpness;
_local1.thickness = thickness;
return (_local1);
}
public function initialize():void{
}
public function set percentHeight(_arg1:Number):void{
}
public function get maxHeight():Number{
return (UIComponent.DEFAULT_MAX_HEIGHT);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (parent){
StyleProtoChain.initTextField(this);
styleChanged("styleName");
};
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function set ignorePadding(_arg1:Boolean):void{
_ignorePadding = _arg1;
styleChanged(null);
}
public function set toolTip(_arg1:String):void{
ToolTipManager.registerToolTip(this, _arg1);
_toolTip = _arg1;
}
public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
UIComponent(parent).callLater(validateNow);
};
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
public function get explicitMaxHeight():Number{
return (NaN);
}
public function invalidateSize():void{
invalidateDisplayListFlag = true;
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function move(_arg1:Number, _arg2:Number):void{
if (this.x != _arg1){
this.x = _arg1;
};
if (this.y != _arg2){
this.y = _arg2;
};
}
public function get toolTip():String{
return (_toolTip);
}
public function set measuredMinHeight(_arg1:Number):void{
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function getStyle(_arg1:String){
if (StyleManager.inheritingStyles[_arg1]){
return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
//unresolved jump
};
return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
}
public function get styleName():Object{
return (_styleName);
}
private static function loadResources():void{
resourceTruncationIndicator = packageResources.getString("truncationIndicator");
}
loadResources();
}
}//package mx.core
Section 80
//UITextFormat (mx.core.UITextFormat)
package mx.core {
import mx.managers.*;
import flash.text.*;
public class UITextFormat extends TextFormat {
public var sharpness:Number;
public var gridFitType:String;
public var antiAliasType:String;
public var thickness:Number;
private var systemManager:ISystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
private static var measurementTextField:TextField;
public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){
this.systemManager = _arg1;
super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14);
}
public function measureText(_arg1:String):TextLineMetrics{
return (measure(_arg1, false));
}
mx_internal function copyFrom(_arg1:TextFormat):void{
font = _arg1.font;
size = _arg1.size;
color = _arg1.color;
bold = _arg1.bold;
italic = _arg1.italic;
underline = _arg1.underline;
url = _arg1.url;
target = _arg1.target;
align = _arg1.align;
leftMargin = _arg1.leftMargin;
rightMargin = _arg1.rightMargin;
indent = _arg1.indent;
leading = _arg1.leading;
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (measure(_arg1, true));
}
private function measure(_arg1:String, _arg2:Boolean):TextLineMetrics{
var _local3:ISystemManager;
var _local4:TextLineMetrics;
if (!_arg1){
_arg1 = "";
};
if (!measurementTextField){
measurementTextField = new TextField();
};
if (_arg2){
measurementTextField.htmlText = "";
} else {
measurementTextField.text = "";
};
measurementTextField.defaultTextFormat = this;
_local3 = systemManager;
if (font){
measurementTextField.embedFonts = ((!((_local3 == null))) && (_local3.isFontFaceEmbedded(this)));
} else {
measurementTextField.embedFonts = false;
};
measurementTextField.antiAliasType = antiAliasType;
measurementTextField.gridFitType = gridFitType;
measurementTextField.sharpness = sharpness;
measurementTextField.thickness = thickness;
if (_arg2){
measurementTextField.htmlText = _arg1;
} else {
measurementTextField.text = _arg1;
};
_local4 = measurementTextField.getLineMetrics(0);
_local4.width = Math.ceil(_local4.width);
_local4.height = Math.ceil(_local4.height);
return (_local4);
}
}
}//package mx.core
Section 81
//Bounce (mx.effects.easing.Bounce)
package mx.effects.easing {
public class Bounce {
mx_internal static const VERSION:String = "2.0.1.0";
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
}
}//package mx.effects.easing
Section 82
//Elastic (mx.effects.easing.Elastic)
package mx.effects.easing {
public class Elastic {
mx_internal static const VERSION:String = "2.0.1.0";
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
}
}//package mx.effects.easing
Section 83
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class AddRemoveEffectTargetFilter extends EffectTargetFilter {
public var add:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function AddRemoveEffectTargetFilter(){
add = true;
super();
filterProperties = ["parent"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
if (add){
return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null)))));
};
return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null))));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 84
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class HideShowEffectTargetFilter extends EffectTargetFilter {
public var show:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function HideShowEffectTargetFilter(){
show = true;
super();
filterProperties = ["visible"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
return ((_local5.end["visible"] == show));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 85
//PropertyChanges (mx.effects.effectClasses.PropertyChanges)
package mx.effects.effectClasses {
import mx.core.*;
public class PropertyChanges {
public var start:Object;
public var target:IUIComponent;
public var end:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public function PropertyChanges(_arg1:IUIComponent){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 86
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance)
package mx.effects.effectClasses {
import mx.core.*;
import mx.effects.*;
import mx.events.*;
public class TweenEffectInstance extends EffectInstance {
mx_internal var needToLayout:Boolean;// = false
private var _seekTime:Number;// = 0
public var tween:Tween;
public var easingFunction:Function;
mx_internal static const VERSION:String = "2.0.1.0";
public function TweenEffectInstance(_arg1:Object){
needToLayout = false;
_seekTime = 0;
super(_arg1);
}
override public function get playheadTime():Number{
if (tween){
return ((tween.playheadTime + super.playheadTime));
};
return (0);
}
override mx_internal function set playReversed(_arg1:Boolean):void{
super.playReversed = _arg1;
if (tween){
tween.playReversed = _arg1;
};
}
override public function resume():void{
super.resume();
if (tween){
tween.resume();
};
}
public function onTweenUpdate(_arg1:Object):void{
}
mx_internal function applyTweenStartValues():void{
if (duration > 0){
onTweenUpdate(tween.getCurrentValue(0));
};
}
protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{
var _local6:Tween;
_local6 = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5);
_local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
if (easingFunction != null){
_local6.easingFunction = easingFunction;
};
if (_seekTime > 0){
_local6.seek(_seekTime);
};
_local6.playReversed = playReversed;
return (_local6);
}
override public function end():void{
stopRepeat = true;
if (delayTimer){
delayTimer.reset();
};
if (tween){
tween.endTween();
tween = null;
};
}
override public function reverse():void{
super.reverse();
if (tween){
tween.reverse();
};
super.playReversed = !(playReversed);
}
private function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
public function seek(_arg1:Number):void{
if (tween){
tween.seek(_arg1);
} else {
_seekTime = _arg1;
};
}
override public function pause():void{
super.pause();
if (tween){
tween.pause();
};
}
public function onTweenEnd(_arg1:Object):void{
onTweenUpdate(_arg1);
tween = null;
if (needToLayout){
UIComponentGlobals.layoutManager.validateNow();
};
finishRepeat();
}
}
}//package mx.effects.effectClasses
Section 87
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.core.*;
import mx.effects.*;
import mx.events.*;
public class ZoomInstance extends TweenEffectInstance {
private var show:Boolean;// = true
private var origPercentHeight:Number;
public var zoomWidthFrom:Number;
private var origX:Number;
private var origY:Number;
private var scaledOriginY:Number;
private var scaledOriginX:Number;
private var origPercentWidth:Number;
public var zoomWidthTo:Number;
public var zoomHeightFrom:Number;
private var newX:Number;
private var newY:Number;
public var captureRollEvents:Boolean;
private var origScaleX:Number;
private var origScaleY:Number;
public var originX:Number;
public var originY:Number;
public var zoomHeightTo:Number;
private var _mouseHasMoved:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
public function ZoomInstance(_arg1:Object){
_mouseHasMoved = false;
show = true;
super(_arg1);
}
override public function finishEffect():void{
if (captureRollEvents){
target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
super.finishEffect();
}
private function getScaleFromWidth(_arg1:Number):Number{
return ((_arg1 / (target.width / Math.abs(target.scaleX))));
}
private function getScaleFromHeight(_arg1:Number):Number{
return ((_arg1 / (target.height / Math.abs(target.scaleY))));
}
override public function play():void{
super.play();
applyPropertyChanges();
if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){
if (show){
zoomWidthFrom = (zoomHeightFrom = 0);
zoomWidthTo = target.scaleX;
zoomHeightTo = target.scaleY;
} else {
zoomWidthFrom = target.scaleX;
zoomHeightFrom = target.scaleY;
zoomWidthTo = (zoomHeightTo = 0);
};
} else {
if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){
zoomWidthFrom = (zoomWidthTo = target.scaleX);
} else {
if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){
zoomHeightFrom = (zoomHeightTo = target.scaleY);
};
};
if (isNaN(zoomWidthFrom)){
zoomWidthFrom = target.scaleX;
} else {
if (isNaN(zoomWidthTo)){
zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1;
};
};
if (isNaN(zoomHeightFrom)){
zoomHeightFrom = target.scaleY;
} else {
if (isNaN(zoomHeightTo)){
zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1;
};
};
};
if (zoomWidthFrom < 0.01){
zoomWidthFrom = 0.01;
};
if (zoomWidthTo < 0.01){
zoomWidthTo = 0.01;
};
if (zoomHeightFrom < 0.01){
zoomHeightFrom = 0.01;
};
if (zoomHeightTo < 0.01){
zoomHeightTo = 0.01;
};
origScaleX = target.scaleX;
origScaleY = target.scaleY;
newX = (origX = target.x);
newY = (origY = target.y);
if (isNaN(originX)){
scaledOriginX = (target.width / 2);
} else {
scaledOriginX = (originX * origScaleX);
};
if (isNaN(originY)){
scaledOriginY = (target.height / 2);
} else {
scaledOriginY = (originY * origScaleY);
};
scaledOriginX = Number(scaledOriginX.toFixed(1));
scaledOriginY = Number(scaledOriginY.toFixed(1));
origPercentWidth = target.percentWidth;
if (!isNaN(origPercentWidth)){
target.width = target.width;
};
origPercentHeight = target.percentHeight;
if (!isNaN(origPercentHeight)){
target.height = target.height;
};
tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration);
if (captureRollEvents){
target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
}
override public function onTweenEnd(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if (!isNaN(origPercentWidth)){
_local2 = target.width;
target.percentWidth = origPercentWidth;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._width = _local2;
};
};
if (!isNaN(origPercentHeight)){
_local3 = target.height;
target.percentHeight = origPercentHeight;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._height = _local3;
};
};
super.onTweenEnd(_arg1);
if (mx_internal::hideOnEffectEnd){
EffectManager.suspendEventHandling();
target.scaleX = origScaleX;
target.scaleY = origScaleY;
target.move(origX, origY);
EffectManager.resumeEventHandling();
};
}
private function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_MOVE){
_mouseHasMoved = true;
} else {
if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){
if (!_mouseHasMoved){
_arg1.stopImmediatePropagation();
};
_mouseHasMoved = false;
};
};
}
override public function onTweenUpdate(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
EffectManager.suspendEventHandling();
if (Math.abs((newX - Number(target.x.toFixed(1)))) > 0.1){
origX = (origX + (Number(target.x.toFixed(1)) - newX));
};
if (Math.abs((newY - Number(target.y.toFixed(1)))) > 0.1){
origY = (origY + (Number(target.y.toFixed(1)) - newY));
};
target.scaleX = _arg1[0];
target.scaleY = _arg1[1];
_local2 = (_arg1[0] / origScaleX);
_local3 = (_arg1[1] / origScaleY);
_local4 = (scaledOriginX * _local2);
_local5 = (scaledOriginY * _local3);
newX = ((scaledOriginX - _local4) + origX);
newY = ((scaledOriginY - _local5) + origY);
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
tween.mx_internal::needToLayout = true;
EffectManager.resumeEventHandling();
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){
show = false;
};
}
private function applyPropertyChanges():void{
var _local1:PropertyChanges;
var _local2:Boolean;
var _local3:Boolean;
_local1 = propertyChanges;
if (_local1){
_local2 = false;
_local3 = false;
if (_local1.end["scaleX"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo;
_local3 = true;
};
if (_local1.end["scaleY"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo;
_local3 = true;
};
if (_local3){
return;
};
if (_local1.end["width"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo;
_local2 = true;
};
if (_local1.end["height"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo;
_local2 = true;
};
if (_local2){
return;
};
if (_local1.end["visible"] !== undefined){
show = _local1.end["visible"];
};
};
}
}
}//package mx.effects.effectClasses
Section 88
//Effect (mx.effects.Effect)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.managers.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class Effect extends EventDispatcher {
mx_internal var applyActualDimensions:Boolean;// = true
private var _instances:Array;
private var _filter:String;
private var _customFilter:EffectTargetFilter;
mx_internal var durationExplicitlySet:Boolean;// = false
public var repeatCount:int;// = 1
public var repeatDelay:int;// = 0
public var suspendBackgroundProcessing:Boolean;// = false
public var startDelay:int;// = 0
private var _targets:Array;
mx_internal var propertyChangesArray:Array;
private var _relevantProperties:Array;
mx_internal var filterObject:EffectTargetFilter;
private var _callValidateNow:Boolean;// = false
mx_internal var initEvent:Event;
public var instanceClass:Class;
private var _duration:Number;// = 500
private var _relevantStyles:Array;
private var isPaused:Boolean;// = false
mx_internal static const VERSION:String = "2.0.1.0";
public function Effect(_arg1:Object=null){
_instances = [];
_callValidateNow = false;
isPaused = false;
applyActualDimensions = true;
_duration = 500;
durationExplicitlySet = false;
_relevantStyles = [];
instanceClass = IEffectInstance;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
suspendBackgroundProcessing = false;
_targets = [];
super();
this.target = _arg1;
}
public function set targets(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = _arg1.length;
_local3 = (_local2 - 1);
while (_local3 > 0) {
if (_arg1[_local3] == null){
_arg1.splice(_local3, 1);
};
_local3--;
};
_targets = _arg1;
}
public function end(_arg1:IEffectInstance=null):void{
var _local2:int;
var _local3:int;
var _local4:IEffectInstance;
if (_arg1){
_arg1.end();
} else {
_local2 = _instances.length;
_local3 = _local2;
while (_local3 >= 0) {
_local4 = IEffectInstance(_instances[_local3]);
if (_local4){
_local4.end();
};
_local3--;
};
};
}
protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
if (filterObject){
return (filterObject.filterFunction(_arg1, _arg2));
};
return (true);
}
public function get target():Object{
if (_targets.length > 0){
return (_targets[0]);
};
return (null);
}
public function get duration():Number{
return (_duration);
}
protected function getValueFromTarget(_arg1:Object, _arg2:String){
if ((_arg2 in _arg1)){
return (_arg1[_arg2]);
};
return (undefined);
}
public function set customFilter(_arg1:EffectTargetFilter):void{
_customFilter = _arg1;
filterObject = _arg1;
}
public function get targets():Array{
return (_targets);
}
public function captureStartValues():void{
var _local1:int;
var _local2:int;
if (targets.length > 0){
propertyChangesArray = [];
_callValidateNow = true;
_local1 = targets.length;
_local2 = 0;
while (_local2 < _local1) {
propertyChangesArray.push(new PropertyChanges(targets[_local2]));
_local2++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
};
}
public function set target(_arg1:Object):void{
_targets.splice(0);
if (_arg1){
_targets[0] = _arg1;
};
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function get isPlaying():Boolean{
return (((_instances) && ((_instances.length > 0))));
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local3:Array;
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
_local3 = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local3) && ((_local3.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local3.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]);
_local9++;
};
_local7++;
};
};
_local10 = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]);
_local9++;
};
_local7++;
};
};
return (_arg1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
public function get relevantProperties():Array{
if (_relevantProperties){
return (_relevantProperties);
};
return (getAffectedProperties());
}
public function createInstance(_arg1:Object=null):IEffectInstance{
var _local2:IEffectInstance;
var _local3:PropertyChanges;
var _local4:Boolean;
var _local5:Boolean;
var _local6:int;
var _local7:int;
if (!_arg1){
_arg1 = this.target;
};
_local2 = null;
_local3 = null;
_local4 = true;
_local5 = false;
if (propertyChangesArray){
_local5 = true;
_local4 = filterInstance(propertyChangesArray, _arg1);
};
if (_local4){
_local2 = IEffectInstance(new instanceClass(_arg1));
initInstance(_local2);
if (_local5){
_local6 = propertyChangesArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (propertyChangesArray[_local7].target == _arg1){
_local2.propertyChanges = propertyChangesArray[_local7];
};
_local7++;
};
};
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_instances.push(_local2);
if (initEvent){
_local2.initEffect(initEvent);
};
};
return (_local2);
}
protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{
var target = _arg1;
var property = _arg2;
var value = _arg3;
var props = _arg4;
if ((property in target)){
try {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){
target.setActualSize(target.width, value);
} else {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){
target.setActualSize(value, target.height);
} else {
target[property] = value;
};
};
} catch(e:Error) {
};
};
}
protected function effectStartHandler(_arg1:EffectEvent):void{
dispatchEvent(_arg1);
}
public function play(_arg1:Array=null, _arg2:Boolean=false):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:IEffectInstance;
if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){
if (_callValidateNow){
LayoutManager.getInstance().validateNow();
};
propertyChangesArray = captureValues(propertyChangesArray, false);
propertyChangesArray = stripUnchangedValues(propertyChangesArray);
applyStartValues(propertyChangesArray, this.targets);
};
_local3 = createInstances(_arg1);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = IEffectInstance(_local3[_local5]);
Object(_local6).playReversed = _arg2;
_local6.startEffect();
_local5++;
};
return (_local3);
}
public function resume():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (isPaused))){
isPaused = false;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).resume();
_local2++;
};
};
}
public function set relevantStyles(_arg1:Array):void{
_relevantStyles = _arg1;
}
public function getAffectedProperties():Array{
return ([]);
}
protected function initInstance(_arg1:IEffectInstance):void{
_arg1.duration = duration;
Object(_arg1).durationExplicitlySet = durationExplicitlySet;
_arg1.effect = this;
_arg1.repeatCount = repeatCount;
_arg1.repeatDelay = repeatDelay;
_arg1.startDelay = startDelay;
_arg1.suspendBackgroundProcessing = suspendBackgroundProcessing;
}
public function get customFilter():EffectTargetFilter{
return (_customFilter);
}
mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:Boolean;
_local3 = relevantProperties;
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local8 = _arg1[_local5].target;
_local9 = false;
_local6 = _arg2.length;
_local7 = 0;
while (_local7 < _local6) {
if (_arg2[_local7] == _local8){
_local9 = filterInstance(_arg1, _local8);
break;
};
_local7++;
};
if (_local9){
_local6 = _local3.length;
_local7 = 0;
while (_local7 < _local6) {
if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){
applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start);
};
_local7++;
};
_local6 = relevantStyles.length;
_local7 = 0;
while (_local7 < _local6) {
if ((relevantStyles[_local7] in _arg1[_local5].start)){
_local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]);
};
_local7++;
};
};
_local5++;
};
}
public function get relevantStyles():Array{
return (_relevantStyles);
}
public function set relevantProperties(_arg1:Array):void{
_relevantProperties = _arg1;
}
public function createInstances(_arg1:Array=null):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
_local2 = [];
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = createInstance(_arg1[_local4]);
if (_local5){
_local2.push(_local5);
};
_local4++;
};
initEvent = null;
return (_local2);
}
protected function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance;
var _local3:int;
var _local4:int;
_local2 = IEffectInstance(_arg1.effectInstance);
EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_local3 = _instances.length;
_local4 = 0;
while (_local4 < _local3) {
if (_instances[_local4] === _local2){
_instances.splice(_local4, 1);
};
_local4++;
};
dispatchEvent(_arg1);
}
public function reverse():void{
var _local1:int;
var _local2:int;
if (isPlaying){
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).reverse();
_local2++;
};
};
}
public function set filter(_arg1:String):void{
if (!customFilter){
_filter = _arg1;
switch (_arg1){
case "add":
case "remove":
filterObject = new AddRemoveEffectTargetFilter();
AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add");
break;
case "hide":
case "show":
filterObject = new HideShowEffectTargetFilter();
HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show");
break;
case "move":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["x", "y"];
break;
case "resize":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["width", "height"];
break;
default:
filterObject = null;
break;
};
};
}
public function pause():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (!(isPaused)))){
isPaused = true;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).pause();
_local2++;
};
};
}
public function get filter():String{
return (_filter);
}
private static function mergeArrays(_arg1:Array, _arg2:Array):Array{
var _local3:int;
var _local4:Boolean;
var _local5:int;
if (_arg2){
_local3 = 0;
while (_local3 < _arg2.length) {
_local4 = true;
_local5 = 0;
while (_local5 < _arg1.length) {
if (_arg1[_local5] == _arg2[_local3]){
_local4 = false;
break;
};
_local5++;
};
if (_local4){
_arg1.push(_arg2[_local3]);
};
_local3++;
};
};
return (_arg1);
}
private static function stripUnchangedValues(_arg1:Array):Array{
var _local2:int;
var _local3:Object;
_local2 = 0;
while (_local2 < _arg1.length) {
for (_local3 in _arg1[_local2].start) {
if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){
delete _arg1[_local2].start[_local3];
delete _arg1[_local2].end[_local3];
};
};
_local2++;
};
return (_arg1);
}
}
}//package mx.effects
Section 89
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import mx.effects.effectClasses.*;
import flash.utils.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var delayStartTime:Number;// = 0
private var playCount:int;// = 0
mx_internal var stopRepeat:Boolean;// = false
private var _repeatCount:int;
private var _suspendBackgroundProcessing:Boolean;// = false
mx_internal var delayTimer:Timer;
private var _triggerEvent:Event;
mx_internal var parentCompositeEffectInstance:EffectInstance;
mx_internal var durationExplicitlySet:Boolean;// = false
private var _effect:Effect;
private var _target:Object;
mx_internal var hideOnEffectEnd:Boolean;// = false
private var _startDelay:int;// = 0
private var delayElapsedTime:Number;// = 0
private var _repeatDelay:int;// = 0
private var _propertyChanges:PropertyChanges;
private var _duration:Number;// = 500
private var _playReversed:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function EffectInstance(_arg1:Object){
delayStartTime = 0;
delayElapsedTime = 0;
durationExplicitlySet = false;
hideOnEffectEnd = false;
playCount = 0;
stopRepeat = false;
_duration = 500;
_repeatDelay = 0;
_startDelay = 0;
_suspendBackgroundProcessing = false;
super();
this.target = _arg1;
}
public function get playheadTime():Number{
return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay));
}
public function finishEffect():void{
playCount = 0;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
};
if ((target is IUIComponent)){
Object(target).effectFinished(this);
};
}
public function finishRepeat():void{
if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){
if (repeatDelay > 0){
delayTimer = new Timer(repeatDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
} else {
finishEffect();
};
}
mx_internal function get playReversed():Boolean{
return (_playReversed);
}
public function set effect(_arg1:Effect):void{
_effect = _arg1;
}
public function get className():String{
var _local1:String;
var _local2:int;
_local1 = getQualifiedClassName(this);
_local2 = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_playReversed = _arg1;
}
public function resume():void{
if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){
delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime);
delayTimer.start();
};
}
public function get propertyChanges():PropertyChanges{
return (_propertyChanges);
}
public function set target(_arg1:Object):void{
_target = _arg1;
}
public function get repeatCount():int{
return (_repeatCount);
}
mx_internal function playWithNoDuration():void{
duration = 0;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
startEffect();
}
public function get startDelay():int{
return (_startDelay);
}
mx_internal function get actualDuration():Number{
var _local1:Number;
_local1 = NaN;
if (repeatCount > 0){
_local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
public function get suspendBackgroundProcessing():Boolean{
return (_suspendBackgroundProcessing);
}
public function play():void{
playCount++;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
};
}
public function set repeatDelay(_arg1:int):void{
_repeatDelay = _arg1;
}
public function set propertyChanges(_arg1:PropertyChanges):void{
_propertyChanges = _arg1;
}
mx_internal function eventHandler(_arg1:Event):void{
if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){
hideOnEffectEnd = false;
_arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler);
};
}
public function set repeatCount(_arg1:int):void{
_repeatCount = _arg1;
}
private function delayTimerHandler(_arg1:TimerEvent):void{
delayTimer.reset();
delayStartTime = NaN;
delayElapsedTime = NaN;
play();
}
public function set suspendBackgroundProcessing(_arg1:Boolean):void{
_suspendBackgroundProcessing = _arg1;
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function set startDelay(_arg1:int):void{
_startDelay = _arg1;
}
public function get effect():Effect{
return (_effect);
}
public function get duration():Number{
if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){
return (parentCompositeEffectInstance.duration);
};
return (_duration);
}
public function get target():Object{
return (_target);
}
public function startEffect():void{
if ((target is IUIComponent)){
Object(target).effectStarted(this);
Object(target).drawFocus(false);
};
if ((((startDelay > 0)) && (!(playReversed)))){
delayTimer = new Timer(startDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
}
public function get repeatDelay():int{
return (_repeatDelay);
}
public function initEffect(_arg1:Event):void{
triggerEvent = _arg1;
switch (_arg1.type){
case "resizeStart":
case "resizeEnd":
if (!durationExplicitlySet){
duration = 250;
};
break;
case FlexEvent.HIDE:
target.setVisible(true, true);
hideOnEffectEnd = true;
target.addEventListener(FlexEvent.SHOW, eventHandler);
break;
};
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
public function end():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function reverse():void{
if (repeatCount > 0){
playCount = ((repeatCount - playCount) + 1);
};
}
public function pause():void{
if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){
delayTimer.stop();
delayElapsedTime = (getTimer() - delayStartTime);
};
}
}
}//package mx.effects
Section 90
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import mx.events.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceIncorrectTrigger:String;
mx_internal static var effectsPlaying:Array = [];
private static var targetsInfo:Array = [];
private static var effectTriggersForEvent:Object = {};
mx_internal static var lastEffectCreated:Effect;
private static var eventHandlingSuspendCount:Number = 0;
private static var eventsForEffectTriggers:Object = {};
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("effects", ApplicationDomain.currentDomain);
private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{
var _local3:Effect;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:String;
var _local10:Array;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:EffectInstance;
_local3 = createEffectForType(_arg2, _arg1.type);
if (!_local3){
return;
};
if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){
throw (new Error(resourceIncorrectTrigger));
};
if (_arg2.initialized == false){
_local9 = _arg1.type;
if ((((((((((_local9 == MoveEvent.MOVE)) || ((_local9 == ResizeEvent.RESIZE)))) || ((_local9 == FlexEvent.SHOW)))) || ((_local9 == FlexEvent.HIDE)))) || ((_local9 == Event.CHANGE)))){
_local3 = null;
return;
};
};
if ((_local3.target is IUIComponent)){
_local10 = IUIComponent(_local3.target).tweeningProperties;
if (((_local10) && ((_local10.length > 0)))){
_local11 = _local3.getAffectedProperties();
_local4 = _local10.length;
_local6 = _local11.length;
_local5 = 0;
while (_local5 < _local4) {
_local7 = 0;
while (_local7 < _local6) {
if (_local10[_local5] == _local11[_local7]){
_local3 = null;
return;
};
_local7++;
};
_local5++;
};
};
};
if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){
_local12 = _local3.getAffectedProperties();
_local5 = 0;
while (_local5 < _local12.length) {
_local13 = _local3.target.getEffectsForProperty(_local12[_local5]);
if (_local13.length > 0){
if (_arg1.type == ResizeEvent.RESIZE){
return;
};
_local7 = 0;
while (_local7 < _local13.length) {
_local14 = _local13[_local7];
if ((((_arg1.type == FlexEvent.SHOW)) && (_local14.hideOnEffectEnd))){
_local14.target.removeEventListener(FlexEvent.SHOW, _local14.eventHandler);
_local14.hideOnEffectEnd = false;
};
_local14.end();
_local7++;
};
};
_local5++;
};
};
_local3.initEvent = _arg1;
_local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler);
lastEffectCreated = _local3;
_local8 = _local3.play();
_local4 = _local8.length;
_local5 = 0;
while (_local5 < _local4) {
effectsPlaying.push(new EffectNode(_local3, _local8[_local5]));
_local5++;
};
if (_local3.suspendBackgroundProcessing){
UIComponent.suspendBackgroundProcessing();
};
}
public static function suspendEventHandling():void{
eventHandlingSuspendCount++;
}
mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{
var _local3:Number;
if (_arg1 != ""){
if (_arg2 == ""){
_local3 = _arg1.length;
if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){
_arg2 = _arg1.substring(0, (_local3 - 6));
};
};
if (_arg2 != ""){
effectTriggersForEvent[_arg2] = _arg1;
eventsForEffectTriggers[_arg1] = _arg2;
};
};
}
private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{
suspendEventHandling();
_arg2.addChildAt(_arg1, _arg3);
resumeEventHandling();
createAndPlayEffect(_arg4, _arg1);
}
mx_internal static function endVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, false);
}
public static function endEffectsForTarget(_arg1:IUIComponent):void{
var _local2:int;
var _local3:int;
var _local4:EffectInstance;
_local2 = effectsPlaying.length;
_local3 = (_local2 - 1);
while (_local3 >= 0) {
_local4 = effectsPlaying[_local3].instance;
if (_local4.target == _arg1){
_local4.end();
};
_local3--;
};
}
private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:int;
var _local5:int;
var _local6:Object;
_local6 = null;
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
_local6 = targetsInfo[_local5];
break;
};
_local5++;
};
if (!_local6){
_local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0};
targetsInfo.push(_local6);
};
if (_arg2){
if (_arg3){
_local6.bitmapEffectsCount++;
if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
} else {
if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){
_arg1.cacheAsBitmap = false;
};
};
} else {
if (_arg3){
if (_local6.bitmapEffectsCount != 0){
_local6.bitmapEffectsCount--;
};
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false;
};
} else {
if (_local6.vectorEffectsCount != 0){
if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){
_local4 = _local6.bitmapEffectsCount;
_local5 = 0;
while (_local5 < _local4) {
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
_local5++;
};
};
};
};
if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
targetsInfo.splice(_local5, 1);
break;
};
_local5++;
};
};
};
}
mx_internal static function eventHandler(_arg1:Event):void{
var _local2:FocusEvent;
var _local3:DisplayObject;
var _local4:int;
var _local5:DisplayObjectContainer;
var _local6:int;
if (!(_arg1.currentTarget is IFlexDisplayObject)){
return;
};
if (eventHandlingSuspendCount > 0){
return;
};
if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){
_local2 = FocusEvent(_arg1);
if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){
return;
};
};
if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){
return;
};
if (_arg1.type == Event.REMOVED){
if ((_arg1.target is UIComponent)){
if (UIComponent(_arg1.target).initialized == false){
return;
};
if (UIComponent(_arg1.target).isEffectStarted){
_local4 = 0;
while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) {
if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){
return;
};
_local4++;
};
};
};
_local3 = (_arg1.target as DisplayObject);
if (_local3 != null){
_local5 = (_local3.parent as DisplayObjectContainer);
if (_local5 != null){
_local6 = _local5.getChildIndex(_local3);
if (_local6 >= 0){
if ((_local3 is UIComponent)){
UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]);
};
};
};
};
} else {
createAndPlayEffect(_arg1, _arg1.currentTarget);
};
}
mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, true);
}
private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (_arg1.target == _arg3.target){
_local4 = _arg1.getAffectedProperties();
_local5 = _arg2.getAffectedProperties();
_local6 = _local4.length;
_local7 = _local5.length;
_local8 = 0;
while (_local8 < _local6) {
_local9 = 0;
while (_local9 < _local7) {
if (_local4[_local8] == _local5[_local9]){
return (true);
};
_local9++;
};
_local8++;
};
};
return (false);
}
private static function loadResources():void{
resourceIncorrectTrigger = packageResources.getString("incorrectTrigger");
}
mx_internal static function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
var _local6:DisplayObjectContainer;
_local2 = _arg1.effectInstance;
_local3 = effectsPlaying.length;
_local4 = (_local3 - 1);
while (_local4 >= 0) {
if (effectsPlaying[_local4].instance == _local2){
effectsPlaying.splice(_local4, 1);
break;
};
_local4--;
};
if (Object(_local2).hideOnEffectEnd == true){
_local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler);
_local2.target.setVisible(false, true);
};
if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){
_local5 = (_local2.target as DisplayObject);
if (_local5 != null){
_local6 = (_local5.parent as DisplayObjectContainer);
if (_local6 != null){
suspendEventHandling();
_local6.removeChild(_local5);
resumeEventHandling();
};
};
};
if (_local2.suspendBackgroundProcessing){
UIComponent.resumeBackgroundProcessing();
};
}
mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, true);
}
mx_internal static function setStyle(_arg1:String, _arg2):void{
var _local3:String;
_local3 = eventsForEffectTriggers[_arg1];
if (((!((_local3 == null))) && (!((_local3 == ""))))){
_arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
}
mx_internal static function getEventForEffectTrigger(_arg1:String):String{
var effectTrigger = _arg1;
if (eventsForEffectTriggers){
try {
return (eventsForEffectTriggers[effectTrigger]);
} catch(e:Error) {
return ("");
};
};
return ("");
}
mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{
var trigger:String;
var value:Object;
var effectClass:Class;
var cls:Class;
var effectObj:Effect;
var doc:Object;
var target = _arg1;
var type = _arg2;
trigger = effectTriggersForEvent[type];
if (trigger == ""){
trigger = (type + "Effect");
};
value = target.getStyle(trigger);
if (!value){
return (null);
};
if ((value is Class)){
cls = Class(value);
return (new cls(target));
};
try {
if ((value is String)){
doc = target.parentDocument;
if (!doc){
doc = Application.application;
};
effectObj = doc[value];
} else {
if ((value is Effect)){
effectObj = Effect(value);
};
};
if (effectObj){
effectObj.target = target;
return (effectObj);
};
} catch(e:Error) {
};
effectClass = Class(target.systemManager.getDefinitionByName(("mx.effects." + value)));
if (effectClass){
return (new effectClass(target));
};
return (null);
}
public static function resumeEventHandling():void{
eventHandlingSuspendCount--;
}
mx_internal static function startVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, false);
}
loadResources();
}
}//package mx.effects
class EffectNode {
public var instance:EffectInstance;
public var factory:Effect;
private function EffectNode(_arg1:Effect, _arg2:EffectInstance){
this.factory = _arg1;
this.instance = _arg2;
}
}
Section 91
//EffectTargetFilter (mx.effects.EffectTargetFilter)
package mx.effects {
import mx.effects.effectClasses.*;
public class EffectTargetFilter {
public var filterFunction:Function;
public var filterStyles:Array;
public var filterProperties:Array;
mx_internal static const VERSION:String = "2.0.1.0";
public function EffectTargetFilter(){
filterFunction = defaultFilterFunction;
filterProperties = [];
filterStyles = [];
super();
}
protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local3:int;
var _local4:int;
var _local5:PropertyChanges;
var _local6:Array;
var _local7:int;
var _local8:int;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
_local6 = filterProperties.concat(filterStyles);
_local7 = _local6.length;
_local8 = 0;
while (_local8 < _local7) {
if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){
return (true);
};
_local8++;
};
};
_local4++;
};
return (false);
}
}
}//package mx.effects
Section 92
//IEffectInstance (mx.effects.IEffectInstance)
package mx.effects {
import flash.events.*;
import mx.effects.effectClasses.*;
public interface IEffectInstance {
function set startDelay(_arg1:int):void;
function set triggerEvent(_arg1:Event):void;
function get playheadTime():Number;
function get triggerEvent():Event;
function finishEffect():void;
function finishRepeat():void;
function initEffect(_arg1:Event):void;
function get effect():Effect;
function startEffect():void;
function get duration():Number;
function set repeatDelay(_arg1:int):void;
function get target():Object;
function get startDelay():int;
function end():void;
function set propertyChanges(_arg1:PropertyChanges):void;
function set effect(_arg1:Effect):void;
function get className():String;
function get repeatDelay():int;
function set target(_arg1:Object):void;
function resume():void;
function get propertyChanges():PropertyChanges;
function set duration(_arg1:Number):void;
function reverse():void;
function get repeatCount():int;
function pause():void;
function set repeatCount(_arg1:int):void;
function set suspendBackgroundProcessing(_arg1:Boolean):void;
function play():void;
function get suspendBackgroundProcessing():Boolean;
}
}//package mx.effects
Section 93
//Tween (mx.effects.Tween)
package mx.effects {
import flash.events.*;
import mx.core.*;
import mx.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var started:Boolean;// = false
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
private var previousUpdateTime:Number;
mx_internal var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
mx_internal var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
mx_internal static const VERSION:String = "2.0.1.0";
private static var timer:Timer = null;
private static var interval:Number = 10;
private static var activeTweens:Array = [];
mx_internal static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){
needToLayout = false;
maxDelay = 87.5;
_doSeek = false;
_isPlaying = true;
_doReverse = false;
userEquation = defaultEasingFunction;
started = false;
duration = 3000;
_playheadTime = 0;
_invertValues = false;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
if (_arg4 == 0){
endTween();
} else {
Tween.addTween(this);
};
}
public function pause():void{
_isPlaying = false;
}
mx_internal function get playheadTime():Number{
return (_playheadTime);
}
mx_internal function get playReversed():Boolean{
return (_invertValues);
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function endTween():void{
var _local1:TweenEvent;
var _local2:Object;
_local1 = new TweenEvent(TweenEvent.TWEEN_END);
_local2 = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
Tween.removeTweenAt(id);
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
mx_internal function doInterval():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
var _local5:TweenEvent;
_local1 = false;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
if (!started){
_local5 = new TweenEvent(TweenEvent.TWEEN_START);
dispatchEvent(_local5);
started = true;
};
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function seek(_arg1:Number):void{
var _local2:Number;
_local2 = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
mx_internal function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (duration == 0){
return (endValue);
};
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
mx_internal static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local2:Boolean;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Tween;
_local2 = false;
_local3 = intervalTime;
intervalTime = getTimer();
_local4 = activeTweens.length;
_local5 = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
UIComponentGlobals.layoutManager.validateNow();
};
_arg1.updateAfterEvent();
}
private static function removeTweenAt(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
_local2 = activeTweens.length;
_local3 = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 94
//TweenEffect (mx.effects.TweenEffect)
package mx.effects {
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
public class TweenEffect extends Effect {
public var easingFunction:Function;// = null
mx_internal static const VERSION:String = "2.0.1.0";
public function TweenEffect(_arg1:Object=null){
easingFunction = null;
super(_arg1);
instanceClass = TweenEffectInstance;
}
override protected function initInstance(_arg1:IEffectInstance):void{
super.initInstance(_arg1);
TweenEffectInstance(_arg1).easingFunction = easingFunction;
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
}
protected function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
}
}//package mx.effects
Section 95
//Zoom (mx.effects.Zoom)
package mx.effects {
import mx.effects.effectClasses.*;
public class Zoom extends TweenEffect {
public var originY:Number;
public var zoomWidthFrom:Number;
public var zoomWidthTo:Number;
public var zoomHeightFrom:Number;
public var captureRollEvents:Boolean;
public var zoomHeightTo:Number;
public var originX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"];
public function Zoom(_arg1:Object=null){
super(_arg1);
instanceClass = ZoomInstance;
applyActualDimensions = false;
relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"];
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:ZoomInstance;
super.initInstance(_arg1);
_local2 = ZoomInstance(_arg1);
_local2.zoomWidthFrom = zoomWidthFrom;
_local2.zoomWidthTo = zoomWidthTo;
_local2.zoomHeightFrom = zoomHeightFrom;
_local2.zoomHeightTo = zoomHeightTo;
_local2.originX = originX;
_local2.originY = originY;
_local2.captureRollEvents = captureRollEvents;
}
}
}//package mx.effects
Section 96
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class ChildExistenceChangedEvent extends Event {
public var relatedObject:DisplayObject;
public static const CHILD_REMOVE:String = "childRemove";
mx_internal static const VERSION:String = "2.0.1.0";
public static const OVERLAY_CREATED:String = "overlayCreated";
public static const CHILD_ADD:String = "childAdd";
public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
}
override public function clone():Event{
return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject));
}
}
}//package mx.events
Section 97
//DragEvent (mx.events.DragEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class DragEvent extends MouseEvent {
public var action:String;
public var draggedItem:Object;
public var dragSource:DragSource;
public var dragInitiator:IUIComponent;
public static const DRAG_DROP:String = "dragDrop";
public static const DRAG_COMPLETE:String = "dragComplete";
public static const DRAG_EXIT:String = "dragExit";
public static const DRAG_ENTER:String = "dragEnter";
public static const DRAG_START:String = "dragStart";
mx_internal static const VERSION:String = "2.0.1.0";
public static const DRAG_OVER:String = "dragOver";
public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3);
this.dragInitiator = _arg4;
this.dragSource = _arg5;
this.action = _arg6;
this.ctrlKey = _arg7;
this.altKey = _arg8;
this.shiftKey = _arg9;
}
override public function clone():Event{
var _local1:DragEvent;
_local1 = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey);
_local1.relatedObject = this.relatedObject;
_local1.localX = this.localX;
_local1.localY = this.localY;
return (_local1);
}
}
}//package mx.events
Section 98
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "2.0.1.0";
public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new DynamicEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 99
//EffectEvent (mx.events.EffectEvent)
package mx.events {
import flash.events.*;
import mx.effects.*;
public class EffectEvent extends Event {
public var effectInstance:IEffectInstance;
public static const EFFECT_START:String = "effectStart";
mx_internal static const VERSION:String = "2.0.1.0";
public static const EFFECT_END:String = "effectEnd";
public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){
super(_arg1, _arg2, _arg3);
this.effectInstance = _arg4;
}
override public function clone():Event{
return (new EffectEvent(type, bubbles, cancelable, effectInstance));
}
}
}//package mx.events
Section 100
//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 = "2.0.1.0";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 101
//FlexMouseEvent (mx.events.FlexMouseEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class FlexMouseEvent extends MouseEvent {
public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside";
public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside";
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
}
override public function clone():Event{
return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta));
}
}
}//package mx.events
Section 102
//IndexChangedEvent (mx.events.IndexChangedEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class IndexChangedEvent extends Event {
public var triggerEvent:Event;
public var relatedObject:DisplayObject;
public var newIndex:Number;
public var oldIndex:Number;
public static const HEADER_SHIFT:String = "headerShift";
public static const CHANGE:String = "change";
mx_internal static const VERSION:String = "2.0.1.0";
public static const CHILD_INDEX_CHANGE:String = "childIndexChange";
public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
this.oldIndex = _arg5;
this.newIndex = _arg6;
this.triggerEvent = _arg7;
}
override public function clone():Event{
return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent));
}
}
}//package mx.events
Section 103
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "2.0.1.0";
public static var READY:String = "ready";
public static var ERROR:String = "error";
public static var PROGRESS:String = "progress";
public static var SETUP:String = "setup";
public static var UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
public function get module():IModuleInfo{
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 104
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
public class MoveEvent extends Event {
public var oldY:Number;
public var oldX:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 105
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
public class PropertyChangeEvent extends Event {
public var oldValue:Object;
public var property:Object;
public var source:Object;
public var kind:String;
public var newValue:Object;
mx_internal static const VERSION:String = "2.0.1.0";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent;
_local5 = new PropertyChangeEvent(PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
_local5.source = _arg1;
_local5.property = _arg2;
return (_local5);
}
}
}//package mx.events
Section 106
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "2.0.1.0";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 107
//ResizeEvent (mx.events.ResizeEvent)
package mx.events {
import flash.events.*;
public class ResizeEvent extends Event {
public var oldHeight:Number;
public var oldWidth:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 108
//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 = "2.0.1.0";
public static const RSL_COMPLETE:String = "rslComplete";
public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.rslIndex = _arg6;
this.rslTotal = _arg7;
this.url = _arg8;
this.errorText = _arg9;
}
override public function clone():Event{
return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText));
}
}
}//package mx.events
Section 109
//ScrollEvent (mx.events.ScrollEvent)
package mx.events {
import flash.events.*;
public class ScrollEvent extends Event {
public var detail:String;
public var position:Number;
public var delta:Number;
public var direction:String;
mx_internal static const VERSION:String = "2.0.1.0";
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){
super(_arg1, _arg2, _arg3);
this.detail = _arg4;
this.position = _arg5;
this.direction = _arg6;
this.delta = _arg7;
}
override public function clone():Event{
return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta));
}
}
}//package mx.events
Section 110
//ScrollEventDetail (mx.events.ScrollEventDetail)
package mx.events {
public final class ScrollEventDetail {
public static const LINE_UP:String = "lineUp";
public static const AT_RIGHT:String = "atRight";
public static const PAGE_UP:String = "pageUp";
public static const LINE_DOWN:String = "lineDown";
public static const PAGE_DOWN:String = "pageDown";
public static const AT_LEFT:String = "atLeft";
public static const PAGE_RIGHT:String = "pageRight";
public static const THUMB_POSITION:String = "thumbPosition";
public static const AT_TOP:String = "atTop";
public static const LINE_LEFT:String = "lineLeft";
public static const AT_BOTTOM:String = "atBottom";
public static const LINE_RIGHT:String = "lineRight";
public static const THUMB_TRACK:String = "thumbTrack";
public static const PAGE_LEFT:String = "pageLeft";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.events
Section 111
//ScrollEventDirection (mx.events.ScrollEventDirection)
package mx.events {
public final class ScrollEventDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.events
Section 112
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
public class StateChangeEvent extends Event {
public var oldState:String;
public var newState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "2.0.1.0";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 113
//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 = "2.0.1.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 114
//ToolTipEvent (mx.events.ToolTipEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ToolTipEvent extends Event {
public var toolTip:IToolTip;
public static const TOOL_TIP_SHOWN:String = "toolTipShown";
public static const TOOL_TIP_CREATE:String = "toolTipCreate";
public static const TOOL_TIP_SHOW:String = "toolTipShow";
public static const TOOL_TIP_HIDE:String = "toolTipHide";
public static const TOOL_TIP_END:String = "toolTipEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const TOOL_TIP_START:String = "toolTipStart";
public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){
super(_arg1, _arg2, _arg3);
this.toolTip = _arg4;
}
override public function clone():Event{
return (new ToolTipEvent(type, bubbles, cancelable, toolTip));
}
}
}//package mx.events
Section 115
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_END:String = "tweenEnd";
mx_internal static const VERSION:String = "2.0.1.0";
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_START:String = "tweenStart";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 116
//ValidationResultEvent (mx.events.ValidationResultEvent)
package mx.events {
import flash.events.*;
public class ValidationResultEvent extends Event {
public var results:Array;
public var field:String;
public static const INVALID:String = "invalid";
mx_internal static const VERSION:String = "2.0.1.0";
public static const VALID:String = "valid";
public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.field = _arg4;
this.results = _arg5;
}
public function get message():String{
var _local1:String;
var _local2:int;
var _local3:int;
_local1 = "";
_local2 = results.length;
_local3 = 0;
while (_local3 < _local2) {
if (results[_local3].isError){
_local1 = (_local1 + ((_local1 == "")) ? "" : "\n");
_local1 = (_local1 + results[_local3].errorMessage);
};
_local3++;
};
return (_local1);
}
override public function clone():Event{
return (new ValidationResultEvent(type, bubbles, cancelable, field, results));
}
}
}//package mx.events
Section 117
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var _trRadius:Number;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "2.0.1.0";
public function RectangularDropShadow(){
changed = true;
_alpha = 0.4;
_angle = 45;
_color = 0;
_distance = 4;
_tlRadius = 0;
_trRadius = 0;
_blRadius = 0;
_brRadius = 0;
super();
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:Number;
var _local13:Number;
var _local14:Matrix;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
_local6 = (leftShadow) ? leftShadow.width : 0;
_local7 = (rightShadow) ? rightShadow.width : 0;
_local8 = (topShadow) ? topShadow.height : 0;
_local9 = (bottomShadow) ? bottomShadow.height : 0;
_local10 = (_local6 + _local7);
_local11 = (_local8 + _local9);
_local12 = ((_arg5 + _local11) / 2);
_local13 = ((_arg4 + _local10) / 2);
_local14 = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number;
var _local2:Number;
var _local3:Shape;
var _local4:Graphics;
var _local5:BitmapData;
var _local6:DropShadowFilter;
var _local7:Rectangle;
var _local8:Rectangle;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Point;
var _local14:Rectangle;
_local1 = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
_local2 = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
_local3 = new FlexShape();
_local4 = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
_local5 = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
_local6 = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
_local7 = new Rectangle(0, 0, _local1, _local2);
_local8 = _local5.generateFilterRect(_local7, _local6);
_local9 = (_local7.left - _local8.left);
_local10 = (_local8.right - _local7.right);
_local11 = (_local7.top - _local8.top);
_local12 = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
_local13 = new Point(0, 0);
_local14 = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 118
//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 = "2.0.1.0";
public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
cornerRadius = 0;
super(_arg1, _arg2, _arg3, _arg4);
this.cornerRadius = _arg5;
}
}
}//package mx.graphics
Section 119
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue)
package mx.managers.layoutClasses {
import mx.core.*;
import flash.display.*;
import mx.managers.*;
public class PriorityQueue {
private var maxPriority:int;// = -1
private var arrayOfArrays:Array;
private var minPriority:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
public function PriorityQueue(){
arrayOfArrays = [];
minPriority = 0;
maxPriority = -1;
super();
}
public function addObject(_arg1:Object, _arg2:int):void{
if (!arrayOfArrays[_arg2]){
arrayOfArrays[_arg2] = [];
};
arrayOfArrays[_arg2].push(_arg1);
if (maxPriority < minPriority){
minPriority = (maxPriority = _arg2);
} else {
if (_arg2 < minPriority){
minPriority = _arg2;
};
if (_arg2 > maxPriority){
maxPriority = _arg2;
};
};
}
public function removeSmallest():Object{
var _local1:Object;
_local1 = null;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
return (null);
};
};
_local1 = arrayOfArrays[minPriority].shift();
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
break;
};
};
};
return (_local1);
}
public function removeLargestChild(_arg1:ILayoutManagerClient):Object{
var _local2:Object;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = null;
_local3 = maxPriority;
_local4 = _arg1.nestLevel;
while (_local4 <= _local3) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local5 = 0;
while (_local5 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){
_local2 = arrayOfArrays[_local3][_local5];
arrayOfArrays[_local3].splice(_local5, 1);
return (_local2);
};
_local5++;
};
_local3--;
} else {
if (_local3 == maxPriority){
maxPriority--;
};
_local3--;
if (_local3 < _local4){
break;
};
};
};
return (_local2);
}
public function isEmpty():Boolean{
return ((minPriority > maxPriority));
}
public function removeLargest():Object{
var _local1:Object;
_local1 = null;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
return (null);
};
};
_local1 = arrayOfArrays[maxPriority].shift();
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
break;
};
};
};
return (_local1);
}
public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{
var _local2:Object;
var _local3:int;
var _local4:int;
_local2 = null;
_local3 = _arg1.nestLevel;
while (_local3 <= maxPriority) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local4 = 0;
while (_local4 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){
_local2 = arrayOfArrays[_local3][_local4];
arrayOfArrays[_local3].splice(_local4, 1);
return (_local2);
};
_local4++;
};
_local3++;
} else {
if (_local3 == minPriority){
minPriority++;
};
_local3++;
if (_local3 > maxPriority){
break;
};
};
};
return (_local2);
}
public function removeAll():void{
arrayOfArrays.splice(0);
minPriority = 0;
maxPriority = -1;
}
private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
var _local3:IChildList;
if ((_arg1 is IRawChildrenContainer)){
_local3 = IRawChildrenContainer(_arg1).rawChildren;
return (_local3.contains(_arg2));
};
if ((_arg1 is DisplayObjectContainer)){
return (DisplayObjectContainer(_arg1).contains(_arg2));
};
return ((_arg1 == _arg2));
}
}
}//package mx.managers.layoutClasses
Section 120
//FocusManager (mx.managers.FocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.display.*;
import mx.events.*;
import flash.text.*;
import mx.controls.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var _showFocusIndicator:Boolean;// = false
private var focusableCandidates:Array;
private var LARGE_TAB_INDEX:int;// = 99999
private var browserFocusComponent:InteractiveObject;
private var calculateCandidates:Boolean;// = true
private var lastAction:String;
private var focusableObjects:Array;
private var defButton:Button;
private var _form:IFocusManagerContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var _focusPane:Sprite;
private var lastFocus:IFocusManagerComponent;
private var browserMode:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){
LARGE_TAB_INDEX = 99999;
calculateCandidates = true;
activated = false;
_showFocusIndicator = false;
_defaultButtonEnabled = true;
super();
browserMode = (((Capabilities.playerType == "ActiveX")) && (!(_arg2)));
_arg1.focusManager = this;
_form = _arg1;
focusableObjects = [];
focusPane = new FlexSprite();
focusPane.name = "focusPane";
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
_arg1.addEventListener(FlexEvent.SHOW, showHandler);
_arg1.addEventListener(FlexEvent.HIDE, hideHandler);
if (_arg1 != SystemManager(_arg1.systemManager).application){
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
_arg1.systemManager.addFocusManager(_arg1);
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var doc:DisplayObjectContainer;
var i:int;
var rawChildren:IChildList;
var o = _arg1;
var skipTopLevel = _arg2;
if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects.push(o);
calculateCandidates = true;
};
o.addEventListener("tabEnabledChange", tabEnabledChangeHandler);
o.addEventListener("tabIndexChange", tabIndexChangeHandler);
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener("tabChildrenChange", tabChildrenChangeHandler);
if (doc.tabChildren){
if ((o is IRawChildrenContainer)){
rawChildren = IRawChildrenContainer(o).rawChildren;
i = 0;
while (i < rawChildren.numChildren) {
try {
addFocusables(rawChildren.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
} else {
i = 0;
while (i < doc.numChildren) {
try {
addFocusables(doc.getChildAt(i));
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
var parent = _arg1;
var child = _arg2;
try {
return (parent.getChildIndex(child));
} catch(e:Error) {
if ((parent is IRawChildrenContainer)){
return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child));
};
throw (e);
};
throw (new Error("FocusManager.getChildIndex failed"));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
var _local2:TextField;
if ((_arg1.relatedObject is TextField)){
_local2 = (_arg1.relatedObject as TextField);
if ((((_local2.type == "input")) || (_local2.selectable))){
return;
};
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
private function removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
if (!_arg2){
_arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler);
};
_local3 = 0;
while (_local3 < focusableObjects.length) {
if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){
if (focusableObjects[_local3] == lastFocus){
lastFocus.drawFocus(false);
lastFocus = null;
};
focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local3, 1);
_local3--;
calculateCandidates = true;
};
_local3++;
};
};
}
public function getFocus():IFocusManagerComponent{
var _local1:InteractiveObject;
_local1 = form.systemManager.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2, true);
};
}
private function sortByDepth(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
mx_internal function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent("click"));
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:int;
var _local2:int;
var _local3:InteractiveObject;
focusableCandidates = [];
_local1 = focusableObjects.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = focusableObjects[_local2];
if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local3);
_local2++;
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){
if (browserFocusComponent){
if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){
browserFocusComponent.tabIndex = -1;
};
browserFocusComponent = null;
return;
};
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function get nextTabIndex():int{
return ((getMaxTabIndex() + 1));
}
public function get focusPane():Sprite{
return (_focusPane);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:DisplayObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(IFocusManagerComponent(_local2));
};
lastAction = "MOUSEDOWN";
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:SystemManager;
var _local3:DisplayObject;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:IFocusManagerGroup;
_local2 = SystemManager(form.systemManager);
_local2.idleCounter = 0;
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (browserMode){
if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){
_local3 = form.systemManager.stage.focus;
_local3 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local3)));
_local4 = "";
if ((_local3 is IFocusManagerGroup)){
_local7 = IFocusManagerGroup(_local3);
_local4 = _local7.groupName;
};
_local5 = getIndexOfFocusedObject(_local3);
_local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4);
if (_arg1.shiftKey){
if (_local6 >= _local5){
browserFocusComponent = form.systemManager.stage.focus;
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
};
};
} else {
if (_local6 <= _local5){
browserFocusComponent = form.systemManager.stage.focus;
if (browserFocusComponent.tabIndex == -1){
browserFocusComponent.tabIndex = LARGE_TAB_INDEX;
};
};
};
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
defButton.callLater(sendDefaultButtonEvent);
};
}
public function toString():String{
return ((Object(form).toString() + ".focusManager"));
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (isParent(DisplayObjectContainer(form), _local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
public function deactivate():void{
form.systemManager.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.systemManager.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.systemManager.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.systemManager.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{
if ((_arg1 is IRawChildrenContainer)){
return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2));
};
return (_arg1.contains(_arg2));
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
private function getMaxTabIndex():int{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:Number;
_local1 = 0;
_local2 = focusableObjects.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = focusableObjects[_local3].tabIndex;
if (!isNaN(_local4)){
_local1 = Math.max(_local1, _local4);
};
_local3++;
};
return (_local1);
}
private function showHandler(_arg1:Event):void{
form.systemManager.activate(form);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (IFocusManagerComponent(_arg1));
};
_arg1 = _arg1.parent;
};
return (null);
}
public function setFocus(_arg1:IFocusManagerComponent):void{
_arg1.setFocus();
}
mx_internal function set form(_arg1:IFocusManagerContainer):void{
_form = _arg1;
}
private function sortFocusableObjectsTabIndex():void{
var _local1:int;
var _local2:int;
var _local3:IFocusManagerComponent;
focusableCandidates = [];
_local1 = focusableObjects.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = focusableObjects[_local2];
if (((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))){
focusableCandidates.push(_local3);
};
_local2++;
};
focusableCandidates.sort(sortByTabIndex);
}
public function set defaultButton(_arg1:IUIComponent):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:IFocusManagerComponent;
if (focusableObjects.length == 0){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (IUIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function hideHandler(_arg1:Event):void{
form.systemManager.deactivate(form);
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is IUIComponent)){
if (!IUIComponent(_arg1).enabled){
return (false);
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function hideFocus():void{
if (showFocusIndicator){
showFocusIndicator = false;
if (lastFocus){
lastFocus.drawFocus(false);
};
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
mx_internal function get form():IFocusManagerContainer{
return (_form);
}
public function set focusPane(_arg1:Sprite):void{
_focusPane = _arg1;
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
_local3 = DisplayObject(_arg1.target);
if ((_local3 is IFocusManagerComponent)){
_local2 = 0;
while (_local2 < focusableObjects.length) {
if (_local3 == focusableObjects[_local2]){
if (_local3 == lastFocus){
lastFocus.drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler);
_local3.removeEventListener("tabIndexChange", tabIndexChangeHandler);
focusableObjects.splice(_local2, 1);
calculateCandidates = true;
break;
};
_local2++;
};
};
removeFocusables(_local3, false);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (((lastFocus) && (!(browserMode)))){
lastFocus.setFocus();
};
lastAction = "ACTIVATE";
}
public function get defaultButton():IUIComponent{
return (_defaultButton);
}
public function showFocus():void{
if (!showFocusIndicator){
showFocusIndicator = true;
if (lastFocus){
lastFocus.drawFocus(true);
};
};
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (focusableObjects.length == 0){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.systemManager.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObject;
var _local3:DisplayObjectContainer;
_local2 = DisplayObject(form.systemManager);
if (!_local2){
return (false);
};
_local3 = _arg1.parent;
while (((_local3) && (!((_local3 == _local2))))) {
if (!_local3.tabChildren){
return (false);
};
_local3 = _local3.parent;
};
return (true);
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
private function sortByTabIndex(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):int{
var _local3:int;
var _local4:int;
_local3 = _arg1.tabIndex;
_local4 = _arg2.tabIndex;
if (_local3 == -1){
_local3 = int.MAX_VALUE;
};
if (_local4 == -1){
_local4 = int.MAX_VALUE;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.systemManager.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.systemManager.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.systemManager.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.systemManager.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (((DisplayObject(form).visible) && (!(activated)))){
form.systemManager.activate(form);
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:int;
var _local4:int;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = focusableObjects.length;
_local4 = 0;
while (_local4 < _local3) {
if (focusableObjects[_local4] == _local2){
break;
};
_local4++;
};
if (_local2.tabEnabled){
if ((((_local4 == _local3)) && (isTabVisible(_local2)))){
focusableObjects.push(_local2);
};
} else {
if (_local4 < _local3){
focusableObjects.splice(_local4, 1);
};
};
}
}
}//package mx.managers
Section 121
//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 hideFocus():void;
function set defaultButton(_arg1:IUIComponent):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function set focusPane(_arg1:Sprite):void;
function get nextTabIndex():int;
function get defaultButton():IUIComponent;
function get showFocusIndicator():Boolean;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function setFocus(_arg1:IFocusManagerComponent):void;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 122
//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 123
//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 124
//IFocusManagerGroup (mx.managers.IFocusManagerGroup)
package mx.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package mx.managers
Section 125
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
function isInvalid():Boolean;
function validateNow():void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
}
}//package mx.managers
Section 126
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function get nestLevel():int;
function get updateCompletePendingFlag():Boolean;
function validateDisplayList():void;
function set processedDescriptors(_arg1:Boolean):void;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function get initialized():Boolean;
}
}//package mx.managers
Section 127
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get toolTipChildren():IChildList;
function get numModalWindows():int;
function isTopLevel():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get topLevelSystemManager():ISystemManager;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function set focusPane(_arg1:Sprite):void;
function get rawChildren():IChildList;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function deactivate(_arg1:IFocusManagerContainer):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function set numModalWindows(_arg1:int):void;
}
}//package mx.managers
Section 128
//IToolTipManager (mx.managers.IToolTipManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public interface IToolTipManager {
function registerToolTip(_arg1:DisplayObject, _arg2:String):void;
function set enabled(_arg1:Boolean):void;
function get showDelay():Number;
function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip;
function get enabled():Boolean;
function destroyToolTip(_arg1:IToolTip):void;
function set showDelay(_arg1:Number):void;
function set hideDelay(_arg1:Number):void;
function get scrubDelay():Number;
function get toolTipClass():Class;
function registerErrorString(_arg1:DisplayObject, _arg2:String):void;
function sizeTip(_arg1:IToolTip):void;
function set currentTarget(_arg1:DisplayObject):void;
function set showEffect(_arg1:Effect):void;
function get hideDelay():Number;
function set currentToolTip(_arg1:IToolTip):void;
function set hideEffect(_arg1:Effect):void;
function set scrubDelay(_arg1:Number):void;
function get currentToolTip():IToolTip;
function get showEffect():Effect;
function get currentTarget():DisplayObject;
function get hideEffect():Effect;
function set toolTipClass(_arg1:Class):void;
}
}//package mx.managers
Section 129
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function set toolTip(_arg1:String):void;
function get toolTip():String;
}
}//package mx.managers
Section 130
//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 invalidateClientSizeFlag:Boolean;// = false
private var invalidateSizeQueue:PriorityQueue;
private var updateCompleteQueue:PriorityQueue;
private var originalFrameRate:Number;
private var _usePhasedInstantiation:Boolean;// = false
private var callLaterObject:UIComponent;
private var invalidateClientPropertiesFlag:Boolean;// = false
private var invalidateDisplayListQueue:PriorityQueue;
private var invalidateDisplayListFlag:Boolean;// = false
private var invalidatePropertiesFlag:Boolean;// = false
private var invalidatePropertiesQueue:PriorityQueue;
private var invalidateSizeFlag:Boolean;// = false
private var callLaterPending:Boolean;// = false
private var targetLevel:int;// = 2147483647
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:LayoutManager;
public function LayoutManager(){
updateCompleteQueue = new PriorityQueue();
invalidatePropertiesQueue = new PriorityQueue();
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
invalidateSizeQueue = new PriorityQueue();
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
invalidateDisplayListQueue = new PriorityQueue();
invalidateDisplayListFlag = false;
callLaterPending = false;
targetLevel = int.MAX_VALUE;
_usePhasedInstantiation = false;
super();
}
private function waitAFrame():void{
callLaterObject.callLater(doPhasedInstantiation);
}
public function get usePhasedInstantiation():Boolean{
return (_usePhasedInstantiation);
}
public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{
var _local3:ILayoutManagerClient;
var _local4:int;
var _local5:Boolean;
var _local6:int;
_local4 = 0;
_local5 = false;
_local6 = targetLevel;
if (targetLevel == int.MAX_VALUE){
targetLevel = _arg1.nestLevel;
};
while (!(_local5)) {
_local5 = true;
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateProperties();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
while (_local3) {
_local3.validateSize();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
};
if (!_arg2){
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateDisplayList();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
if (invalidateClientSizeFlag){
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
if (_local3){
invalidateSizeQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
};
};
if (_local6 == int.MAX_VALUE){
targetLevel = int.MAX_VALUE;
if (!_arg2){
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
while (_local3) {
if (!_local3.initialized){
_local3.initialized = true;
};
_local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local3.updateCompletePendingFlag = false;
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
};
};
};
}
private function validateDisplayList():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
while (_local1) {
_local1.validateDisplayList();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
}
private function validateSize():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
while (_local1) {
_local1.validateSize();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
};
}
public function invalidateProperties(_arg1:ILayoutManagerClient):void{
if (((!(invalidatePropertiesFlag)) && (Application.application.systemManager))){
invalidatePropertiesFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientPropertiesFlag = true;
};
invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel);
}
public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{
if (((!(invalidateDisplayListFlag)) && (Application.application.systemManager))){
invalidateDisplayListFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel);
}
public function validateNow():void{
var _local1:int;
if (!usePhasedInstantiation){
_local1 = 0;
while (((callLaterPending) && ((_local1 < 100)))) {
doPhasedInstantiation();
};
};
}
public function invalidateSize(_arg1:ILayoutManagerClient):void{
if (((!(invalidateSizeFlag)) && (Application.application.systemManager))){
invalidateSizeFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = Application.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientSizeFlag = true;
};
invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel);
}
public function isInvalid():Boolean{
return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag)));
}
private function validateProperties():void{
var _local1:ILayoutManagerClient;
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
while (_local1) {
_local1.validateProperties();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
};
}
private function doPhasedInstantiation():void{
var _local1:ILayoutManagerClient;
if (usePhasedInstantiation){
if (invalidatePropertiesFlag){
validateProperties();
Application.application.dispatchEvent(new Event("validatePropertiesComplete"));
} else {
if (invalidateSizeFlag){
validateSize();
Application.application.dispatchEvent(new Event("validateSizeComplete"));
} else {
if (invalidateDisplayListFlag){
validateDisplayList();
Application.application.dispatchEvent(new Event("validateDisplayListComplete"));
};
};
};
} else {
if (invalidatePropertiesFlag){
validateProperties();
};
if (invalidateSizeFlag){
validateSize();
};
if (invalidateDisplayListFlag){
validateDisplayList();
};
};
if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){
callLaterObject.callLater(doPhasedInstantiation);
} else {
usePhasedInstantiation = false;
callLaterPending = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
while (_local1) {
if (((!(_local1.initialized)) && (_local1.processedDescriptors))){
_local1.initialized = true;
};
_local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local1.updateCompletePendingFlag = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
};
dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
};
}
public function set usePhasedInstantiation(_arg1:Boolean):void{
var _local2:Stage;
if (_usePhasedInstantiation != _arg1){
_usePhasedInstantiation = _arg1;
_local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (_arg1){
originalFrameRate = _local2.frameRate;
_local2.frameRate = 1000;
} else {
_local2.frameRate = originalFrameRate;
};
};
}
public static function getInstance():LayoutManager{
if (!instance){
instance = new (LayoutManager);
};
return (instance);
}
}
}//package mx.managers
Section 131
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){
this.owner = _arg1;
this.lowerBoundReference = _arg2;
this.upperBoundReference = _arg3;
}
public function getChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1));
return (_local2);
}
public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2 = owner;
_local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]);
_local2 = owner;
var _local3 = upperBoundReference;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
return (_arg1);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference]));
var _local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
return (_local2);
}
public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int;
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
_local2 = (_local2 - owner[lowerBoundReference]);
return (_local2);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3 = owner;
_local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2));
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
return (_arg1);
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2));
}
public function get numChildren():int{
return ((owner[upperBoundReference] - owner[lowerBoundReference]));
}
public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
if (owner.mx_internal::rawChildren_contains(_arg1)){
while (_arg1.parent != owner) {
_arg1 = _arg1.parent;
};
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){
return (true);
};
};
return (false);
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int;
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){
var _local3 = owner;
_local3.mx_internal::rawChildren_removeChild(_arg1);
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
return (_arg1);
}
}
}//package mx.managers
Section 132
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.events.*;
import flash.text.*;
import mx.preloaders.*;
import flash.utils.*;
import mx.messaging.config.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager {
mx_internal var nestLevel:int;// = 0
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var preloader:Preloader;
private var _topLevelSystemManager:ISystemManager;
private var _rawChildren:SystemRawChildrenList;
private var _toolTipIndex:int;// = 0
private var _explicitHeight:Number;
private var _document:Object;
private var form:IFocusManagerContainer;
private var _width:Number;
private var _toolTipChildren:SystemChildrenList;
private var initialized:Boolean;// = false
private var _focusPane:Sprite;
private var isStageRoot:Boolean;// = true
private var rslSizes:Array;// = null
private var _fontList:Object;// = null
private var nextFrameTimer:Timer;// = null
private var topLevel:Boolean;// = true
private var _popUpChildren:SystemChildrenList;
private var _cursorIndex:int;// = 0
private var _topMostIndex:int;// = 0
mx_internal var _mouseX;
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var initCallbackFunctions:Array;
private var _cursorChildren:SystemChildrenList;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
mx_internal var topLevelWindow:IUIComponent;
private static const IDLE_THRESHOLD:Number = 1000;
private static const IDLE_INTERVAL:Number = 100;
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
doneExecutingInitCallbacks = false;
initCallbackFunctions = [];
initialized = false;
topLevel = true;
isStageRoot = true;
nestLevel = 0;
rslSizes = null;
forms = [];
idleCounter = 0;
nextFrameTimer = null;
_applicationIndex = 1;
_cursorIndex = 0;
_fontList = null;
_noTopMostIndex = 0;
_numModalWindows = 0;
_toolTipIndex = 0;
_topMostIndex = 0;
super();
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
};
if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){
topLevel = false;
};
if (!stage){
isStageRoot = false;
};
if (topLevel){
SystemManagerGlobals.topLevelSystemManagers.push(this);
};
lastSystemManager = this;
executeCallbacks();
stop();
if (((topLevel) && (!((currentFrame == 1))))){
throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782.")));
};
root.loaderInfo.addEventListener(Event.INIT, initHandler);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local2:int;
var _local3:Class;
var _local4:DisplayObjectContainer;
_local2 = 1;
if (!topLevel){
_local4 = parent.parent;
while (_local4) {
if ((_local4 is ILayoutManagerClient)){
_local2 = (ILayoutManagerClient(_local4).nestLevel + 1);
break;
};
_local4 = _local4.parent;
};
};
nestLevel = _local2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).systemManager = this;
};
_local3 = Class(getDefinitionByName("mx.core.UIComponent"));
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = document;
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).initThemeColor();
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).stylesInitialized();
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
addingChild(_arg1);
super.addChild(_arg1);
childAdded(_arg1);
return (_arg1);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
var _local6:IStyleClient;
_local3 = false;
_local4 = rawChildren.numChildren;
_local5 = 0;
while (_local5 < _local4) {
_local6 = (rawChildren.getChildAt(_local5) as IStyleClient);
if (_local6){
_local6.styleChanged(_arg1);
_local6.notifyStyleChangeInChildren(_arg1, _arg2);
};
if (isTopLevelWindow(DisplayObject(_local6))){
_local3 = true;
};
_local4 = rawChildren.numChildren;
_local5++;
};
if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).styleChanged(_arg1);
IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2);
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
override public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if (super.contains(_arg1)){
if (_arg1.parent == this){
_local2 = super.getChildIndex(_arg1);
if (_local2 < noTopMostIndex){
return (true);
};
} else {
_local3 = 0;
while (_local3 < noTopMostIndex) {
_local4 = super.getChildAt(_local3);
if ((_local4 is IRawChildrenContainer)){
if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){
return (true);
};
};
if ((_local4 is DisplayObjectContainer)){
if (DisplayObjectContainer(_local4).contains(_arg1)){
return (true);
};
};
_local3++;
};
};
};
return (false);
}
private function idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
private function initHandler(_arg1:Event):void{
var _local2:int;
var _local3:int;
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
_local2 = ((totalFrames)==1) ? 0 : 1;
addFrameScript(_local2, docFrameHandler);
_local3 = (_local2 + 1);
while (_local3 < totalFrames) {
addFrameScript(_local3, extraFrameHandler);
_local3++;
};
initialize();
}
public function getDefinitionByName(_arg1:String):Object{
var _local2:ApplicationDomain;
var _local3:Object;
_local2 = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain);
if (_local2.hasDefinition(_arg1)){
_local3 = _local2.getDefinition(_arg1);
};
return (_local3);
}
public function get embeddedFontList():Object{
var _local1:Object;
var _local2:String;
var _local3:Object;
if (_fontList == null){
_fontList = {};
_local1 = info()["fonts"];
for (_local2 in _local1) {
_fontList[_local2] = _local1[_local2];
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_local3 = _topLevelSystemManager.embeddedFontList;
for (_local2 in _local3) {
_fontList[_local2] = _local3[_local2];
};
};
};
return (_fontList);
}
mx_internal function set cursorIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _cursorIndex);
_cursorIndex = _arg1;
}
override public function getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt((applicationIndex + _arg1)));
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){
idleTimer = new Timer(IDLE_INTERVAL);
idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler);
idleTimer.start();
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
};
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
override public function get mouseX():Number{
if (_mouseX === undefined){
return (super.mouseX);
};
return (_mouseX);
}
override public function get mouseY():Number{
if (_mouseY === undefined){
return (super.mouseY);
};
return (_mouseY);
}
public function removeFocusManager(_arg1:IFocusManagerContainer):void{
var _local2:int;
var _local3:int;
_local2 = forms.length;
_local3 = 0;
while (_local3 < _local2) {
if (forms[_local3] == _arg1){
if (form == _arg1){
deactivate(_arg1);
};
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
public function get rawChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.rawChildren);
};
if (!_rawChildren){
_rawChildren = new SystemRawChildrenList(this);
};
return (_rawChildren);
}
public function get focusPane():Sprite{
return (_focusPane);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:IChildList;
idleCounter = 0;
if (numModalWindows == 0){
if (forms.length > 1){
_local2 = forms.length;
_local3 = DisplayObject(_arg1.target);
_local4 = document.rawChildren.contains(_local3);
while (_local3) {
_local5 = 0;
while (_local5 < _local2) {
if (forms[_local5] == _local3){
_local6 = 0;
if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){
activate(IFocusManagerContainer(_local3));
};
if (popUpChildren.contains(_local3)){
_local9 = popUpChildren;
} else {
_local9 = this;
};
_local7 = _local9.getChildIndex(_local3);
_local8 = _local7;
_local2 = forms.length;
_local6 = 0;
while (_local6 < _local2) {
if (_local9.contains(forms[_local6])){
if (_local9.getChildIndex(forms[_local6]) > _local7){
_local8 = _local9.getChildIndex(forms[_local6]);
};
};
_local6++;
};
if ((((_local8 > _local7)) && (!(_local4)))){
_local9.setChildIndex(_local3, _local8);
};
return;
};
_local5++;
};
_local3 = _local3.parent;
};
};
};
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
return (_screen);
}
public function get preloaderBackgroundSize():String{
return (info()["backgroundSize"]);
}
private function docFrameHandler(_arg1:Event=null):void{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:Class;
Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl")));
Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager")));
Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl")));
Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
Singleton.registerClass("mx.managers::IToolTipManager", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));
executeCallbacks();
doneExecutingInitCallbacks = true;
_local2 = info()["mixins"];
if (((_local2) && ((_local2.length > 0)))){
_local3 = _local2.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = Class(getDefinitionByName(_local2[_local4]));
var _local6 = _local5;
_local6["init"](this);
_local4++;
};
};
initializeTopLevelWindow(null);
deferredNextFrame();
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
_local2 = stage.stageWidth;
_local3 = stage.stageHeight;
_local4 = loaderInfo.width;
_local5 = loaderInfo.height;
_local6 = ((_local4 - _local2) / 2);
_local7 = ((_local5 - _local3) / 2);
_local8 = stage.align;
if (_local8 == StageAlign.TOP){
_local7 = 0;
} else {
if (_local8 == StageAlign.BOTTOM){
_local7 = (_local5 - _local3);
} else {
if (_local8 == StageAlign.LEFT){
_local6 = 0;
} else {
if (_local8 == StageAlign.RIGHT){
_local6 = (_local4 - _local2);
} else {
if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){
_local7 = 0;
_local6 = 0;
} else {
if (_local8 == StageAlign.TOP_RIGHT){
_local7 = 0;
_local6 = (_local4 - _local2);
} else {
if (_local8 == StageAlign.BOTTOM_LEFT){
_local7 = (_local5 - _local3);
_local6 = 0;
} else {
if (_local8 == StageAlign.BOTTOM_RIGHT){
_local7 = (_local5 - _local3);
_local6 = (_local4 - _local2);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = _local6;
_screen.y = _local7;
_screen.width = _local2;
_screen.height = _local3;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (_arg1){
resizeMouseCatcher();
dispatchEvent(_arg1);
};
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
mx_internal function set topMostIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _topMostIndex);
_topMostIndex = _arg1;
toolTipIndex = (toolTipIndex + _local2);
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
public function isTopLevel():Boolean{
return (topLevel);
}
public function deactivate(_arg1:IFocusManagerContainer):void{
var _local2:IFocusManagerContainer;
var _local3:int;
var _local4:int;
var _local5:IFocusManagerContainer;
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
form.focusManager.deactivate();
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = forms[_local4];
if (_local5 == _arg1){
_local4 = (_local4 + 1);
while (_local4 < _local3) {
_local5 = forms[_local4];
if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
_local4++;
};
form = _local2;
break;
} else {
if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){
_local2 = _local5;
};
};
_local4++;
};
if (form){
form.focusManager.activate();
};
};
};
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function info():Object{
return ({});
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
mx_internal function get toolTipIndex():int{
return (_toolTipIndex);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (isStageRoot){
return;
};
_width = _arg1;
_height = _arg2;
if (mouseCatcher){
mouseCatcher.width = _arg1;
mouseCatcher.height = _arg2;
};
dispatchEvent(new Event(Event.RESIZE));
}
mx_internal function set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
private function executeCallbacks():void{
var _local1:Function;
if (!parent){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChild(_arg1));
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
super.removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
override public function get stage():Stage{
var _local1:Stage;
_local1 = super.stage;
if (_local1){
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
return (_topLevelSystemManager.stage);
};
return (null);
}
public function create(... _args):Object{
var _local2:String;
var _local3:Class;
var _local4:String;
var _local5:int;
var _local6:int;
_local2 = info()["mainClassName"];
if (_local2 == null){
_local4 = loaderInfo.loaderURL;
_local5 = _local4.lastIndexOf(".");
_local6 = _local4.lastIndexOf("/");
_local2 = _local4.substring((_local6 + 1), _local5);
};
_local3 = Class(getDefinitionByName(_local2));
return ((_local3) ? new (_local3) : null);
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
public function get popUpChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.popUpChildren);
};
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
return (_popUpChildren);
}
public function activate(_arg1:IFocusManagerContainer):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
_local2 = form;
_local2.focusManager.deactivate();
};
};
form = _arg1;
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, (applicationIndex + _arg2));
}
public function get toolTipChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.toolTipChildren);
};
if (!_toolTipChildren){
_toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex"));
};
return (_toolTipChildren);
}
private function deferredNextFrame():void{
if ((currentFrame + 1) > totalFrames){
return;
};
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
} else {
nextFrameTimer = new Timer(100);
nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.start();
};
}
mx_internal function get cursorIndex():int{
return (_cursorIndex);
}
override public function getObjectsUnderPoint(_arg1:Point):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
var _local6:Array;
_local2 = [];
_local3 = topMostIndex;
_local4 = 0;
while (_local4 < _local3) {
_local5 = super.getChildAt(_local4);
if ((_local5 is DisplayObjectContainer)){
_local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1);
if (_local6){
_local2 = _local2.concat(_local6);
};
};
_local4++;
};
return (_local2);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
public function get document():Object{
return (_document);
}
private function resizeMouseCatcher():void{
var _local1:Graphics;
if (mouseCatcher){
_local1 = mouseCatcher.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
_local1.endFill();
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
mx_internal function get topMostIndex():int{
return (_topMostIndex);
}
public function addFocusManager(_arg1:IFocusManagerContainer):void{
forms.push(_arg1);
}
mx_internal function set noTopMostIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _noTopMostIndex);
_noTopMostIndex = _arg1;
topMostIndex = (topMostIndex + _local2);
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, _arg2);
}
private function mouseUpHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
mx_internal function childAdded(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
}
public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Object;
var _local6:Font;
var _local7:String;
_local2 = _arg1.font;
_local3 = Font.enumerateFonts();
_local4 = 0;
while (_local4 < _local3.length) {
_local6 = Font(_local3[_local4]);
if (_local6.fontName == _local2){
_local7 = "regular";
if (((_arg1.bold) && (_arg1.italic))){
_local7 = "boldItalic";
} else {
if (_arg1.bold){
_local7 = "bold";
} else {
if (_arg1.italic){
_local7 = "italic";
};
};
};
if (_local6.fontStyle == _local7){
return (true);
};
};
_local4++;
};
if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){
return (false);
};
_local5 = embeddedFontList[_local2];
return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular)))))));
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_arg1 == FlexEvent.IDLE){
super.removeEventListener(_arg1, _arg2, _arg3);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(_arg1, _arg2, _arg3);
};
}
override public function removeChildAt(_arg1:int):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChildAt((applicationIndex + _arg1)));
}
private function extraFrameHandler(_arg1:Event=null):void{
var _local2:Object;
var _local3:Class;
_local2 = info()["frames"];
if (((_local2) && (_local2[currentLabel]))){
_local3 = Class(getDefinitionByName(_local2[currentLabel]));
var _local4 = _local3;
_local4["frame"](this);
};
deferredNextFrame();
}
public function get application():IUIComponent{
return (IUIComponent(_document));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject;
_local2 = super.getChildAt(_arg1);
removingChild(_local2);
super.removeChildAt(_arg1);
childRemoved(_local2);
return (_local2);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
}
mx_internal function get applicationIndex():int{
return (_applicationIndex);
}
mx_internal function set toolTipIndex(_arg1:int):void{
var _local2:int;
_local2 = (_arg1 - _toolTipIndex);
_toolTipIndex = _arg1;
cursorIndex = (cursorIndex + _local2);
}
public function get cursorChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.cursorChildren);
};
if (!_cursorChildren){
_cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex"));
};
return (_cursorChildren);
}
public function get preloaderBackgroundImage():Object{
return (info()["backgroundImage"]);
}
public function set numModalWindows(_arg1:int):void{
_numModalWindows = _arg1;
}
public function get preloaderBackgroundAlpha():Number{
return (info()["backgroundAlpha"]);
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent;
_local2 = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
_popUpChildren.removeChild(preloader);
mouseCatcher = new FlexSprite();
mouseCatcher.name = "mouseCatcher";
noTopMostIndex++;
super.addChildAt(mouseCatcher, 0);
resizeMouseCatcher();
if (!topLevel){
mouseCatcher.visible = false;
mask = mouseCatcher;
};
noTopMostIndex++;
super.addChildAt(DisplayObject(_local2), 1);
_local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
mx_internal function initialize():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:Boolean;
var _local6:Class;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
} else {
_width = loaderInfo.width;
_height = loaderInfo.height;
};
preloader = new Preloader();
preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
_popUpChildren.addChild(preloader);
_local1 = [];
_local2 = [];
_local3 = info()["rsls"];
_local4 = 0;
while (((_local3) && ((_local4 < _local3.length)))) {
_local1[_local4] = _local3[_local4].url;
_local2[_local4] = _local3[_local4].size;
_local4++;
};
_local5 = true;
if (info()["usePreloader"] != undefined){
_local5 = info()["usePreloader"];
};
_local6 = (info()["preloader"] as Class);
if (((_local5) && (!(_local6)))){
_local6 = DownloadProgressBar;
};
preloader.initialize(_local5, _local6, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, _local1, _local2);
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
var _local2:DisplayObjectContainer;
if (((!(topLevel)) && (parent))){
_local2 = parent.parent;
while (_local2) {
if ((_local2 is IInvalidating)){
IInvalidating(_local2).invalidateSize();
IInvalidating(_local2).invalidateDisplayList();
return;
};
_local2 = _local2.parent;
};
};
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
mx_internal function regenerateStyleCache(_arg1:Boolean):void{
var _local2:Boolean;
var _local3:int;
var _local4:int;
var _local5:IStyleClient;
_local2 = false;
_local3 = rawChildren.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (rawChildren.getChildAt(_local4) as IStyleClient);
if (_local5){
_local5.regenerateStyleCache(_arg1);
};
if (isTopLevelWindow(DisplayObject(_local5))){
_local2 = true;
};
_local3 = rawChildren.numChildren;
_local4++;
};
if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).regenerateStyleCache(_arg1);
};
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
public function get preloaderBackgroundColor():uint{
var _local1:*;
_local1 = info()["backgroundColor"];
if (_local1 == undefined){
return (4294967295);
};
return (uint(_local1));
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function get numModalWindows():int{
return (_numModalWindows);
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
initialized = true;
if (!parent){
return;
};
if (!topLevel){
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_topLevelSystemManager = IUIComponent(_local3).systemManager;
break;
};
_local3 = _local3.parent;
};
};
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
if (((topLevel) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (((topLevel) && (stage))){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
preloader.registerApplication(_local2);
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
override public function get width():Number{
return (_width);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public static function getSWFRoot(_arg1:Object):DisplayObject{
var className:String;
var p:*;
var sm:SystemManager;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
className = getQualifiedClassName(object);
for (p in allSystemManagers) {
sm = (p as SystemManager);
domain = sm.loaderInfo.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (sm);
};
} catch(e:Error) {
};
};
return (null);
}
mx_internal static function registerInitCallback(_arg1:Function):void{
var _local2:SystemManager;
if (((!(allSystemManagers)) || (!(lastSystemManager)))){
return;
};
_local2 = lastSystemManager;
if (_local2.doneExecutingInitCallbacks){
_arg1(_local2);
} else {
_local2.initCallbackFunctions.push(_arg1);
};
}
}
}//package mx.managers
Section 133
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var bootstrapLoaderInfoURL:String;
}
}//package mx.managers
Section 134
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "2.0.1.0";
public function SystemRawChildrenList(_arg1:SystemManager){
this.owner = _arg1;
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
}
}//package mx.managers
Section 135
//ToolTipManager (mx.managers.ToolTipManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public class ToolTipManager extends EventDispatcher {
mx_internal static const VERSION:String = "2.0.1.0";
private static var impl:IToolTipManager = (Singleton.getInstance("mx.managers::IToolTipManager") as IToolTipManager);
private static var implClassDependency:ToolTipManagerImpl;
public static function get enabled():Boolean{
return (impl.enabled);
}
public static function set enabled(_arg1:Boolean):void{
impl.enabled = _arg1;
}
mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String):void{
impl.registerToolTip(_arg1, _arg2);
}
public static function set hideDelay(_arg1:Number):void{
impl.hideDelay = _arg1;
}
public static function set showDelay(_arg1:Number):void{
impl.showDelay = _arg1;
}
public static function get showDelay():Number{
return (impl.showDelay);
}
public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function destroyToolTip(_arg1:IToolTip):void{
return (impl.destroyToolTip(_arg1));
}
public static function get scrubDelay():Number{
return (impl.scrubDelay);
}
public static function get toolTipClass():Class{
return (impl.toolTipClass);
}
mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String):void{
impl.registerErrorString(_arg1, _arg2);
}
mx_internal static function sizeTip(_arg1:IToolTip):void{
impl.sizeTip(_arg1);
}
public static function set currentTarget(_arg1:DisplayObject):void{
impl.currentTarget = _arg1;
}
public static function set showEffect(_arg1:Effect):void{
impl.showEffect = _arg1;
}
public static function get hideDelay():Number{
return (impl.hideDelay);
}
public static function set hideEffect(_arg1:Effect):void{
impl.hideEffect = _arg1;
}
public static function set scrubDelay(_arg1:Number):void{
impl.scrubDelay = _arg1;
}
public static function get currentToolTip():IToolTip{
return (impl.currentToolTip);
}
public static function set currentToolTip(_arg1:IToolTip):void{
impl.currentToolTip = _arg1;
}
public static function get showEffect():Effect{
return (impl.showEffect);
}
public static function get currentTarget():DisplayObject{
return (impl.currentTarget);
}
public static function get hideEffect():Effect{
return (impl.hideEffect);
}
public static function set toolTipClass(_arg1:Class):void{
impl.toolTipClass = _arg1;
}
}
}//package mx.managers
Section 136
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.effects.*;
import mx.events.*;
import flash.utils.*;
import mx.validators.*;
import mx.controls.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager {
private var _enabled:Boolean;// = true
private var _showDelay:Number;// = 500
private var _hideEffect:Effect;
private var hideTimer:Timer;
private var _toolTipClass:Class;
private var _scrubDelay:Number;// = 100
private var showTimer:Timer;
private var _currentToolTip:IToolTip;
private var currentText:String;
private var scrubTimer:Timer;
private var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var _showEffect:Effect;
private var initialized:Boolean;// = false
private var _hideDelay:Number;// = 10000
private var isError:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
private static var instance:IToolTipManager;
public function ToolTipManagerImpl(){
initialized = false;
_enabled = true;
_hideDelay = 10000;
_scrubDelay = 100;
_showDelay = 500;
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
}
private function toolTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
private function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
private function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
private function hideEffectEnded():void{
var _local1:ToolTipEvent;
reset();
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
}
public function set scrubDelay(_arg1:Number):void{
_scrubDelay = _arg1;
}
public function get currentToolTip():IToolTip{
return (_currentToolTip);
}
private function toolTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
public function get enabled():Boolean{
return (_enabled);
}
public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
var _local6:ToolTip;
var _local7:ISystemManager;
_local6 = new ToolTip();
_local7 = (_arg5) ? _arg5.systemManager : Application.application.systemManager;
_local7.toolTipChildren.addChild(_local6);
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
private function reset():void{
var _local1:ISystemManager;
showTimer.reset();
hideTimer.reset();
if (currentToolTip){
if (((showEffect) || (hideEffect))){
currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
EffectManager.endEffectsForTarget(currentToolTip);
_local1 = getSystemManager(previousTarget);
_local1.toolTipChildren.removeChild(DisplayObject(currentToolTip));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = _arg1;
}
private function showTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
if (isError){
currentTarget.addEventListener("change", changeHandler);
} else {
_local2 = getSystemManager(currentTarget);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
currentToolTip.visible = true;
if (!showEffect){
showEffectEnded();
};
}
private function effectEndHandler(_arg1:EffectEvent):void{
if (_arg1.effectInstance.effect == showEffect){
showEffectEnded();
} else {
if (_arg1.effectInstance.effect == hideEffect){
hideEffectEnded();
};
};
}
public function get hideDelay():Number{
return (_hideDelay);
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
public function get currentTarget():DisplayObject{
return (_currentTarget);
}
public function get hideEffect():Effect{
return (_hideEffect);
}
private function showEffectEnded():void{
var _local1:ToolTipEvent;
if (hideDelay == 0){
hideTip();
} else {
if (hideDelay < Infinity){
hideTimer.delay = hideDelay;
hideTimer.start();
};
};
if (currentTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
};
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
private function errorTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
public function get showDelay():Number{
return (_showDelay);
}
public function registerErrorString(_arg1:DisplayObject, _arg2:String):void{
var _local3:String;
_local3 = IValidatorListener(_arg1).errorString;
if (((!(_local3)) && (_arg2))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
} else {
if (((_local3) && (!(_arg2)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
};
};
}
private function initialize():void{
if (!showTimer){
showTimer = new Timer(0, 1);
showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler);
};
if (!hideTimer){
hideTimer = new Timer(0, 1);
hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler);
};
if (!scrubTimer){
scrubTimer = new Timer(0, 1);
};
initialized = true;
}
public function destroyToolTip(_arg1:IToolTip):void{
var _local2:ISystemManager;
_local2 = _arg1.systemManager;
_local2.toolTipChildren.removeChild(DisplayObject(_arg1));
}
private function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
private function changeHandler(_arg1:Event):void{
reset();
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject):Rectangle{
var _local2:Point;
_local2 = new Point(0, 0);
_local2 = _arg1.localToGlobal(_local2);
return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height));
}
private function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Rectangle;
var _local6:Point;
var _local7:IToolTip;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local3 = currentToolTip.screen.width;
_local4 = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local8 = NaN;
_local9 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local8 = ((_local3 - _local1) - 4);
_local9 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local8;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
Object(toolTipClass).maxWidth = _local9;
} else {
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
};
if ((currentToolTip.height + 2) < _local5.top){
_local2 = (_local5.top - (currentToolTip.height + 2));
} else {
_local2 = (_local5.bottom + 2);
if (!isNaN(_local8)){
Object(toolTipClass).maxWidth = _local8;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
if (!isNaN(_local9)){
Object(toolTipClass).maxWidth = _local9;
};
};
};
sizeTip(currentToolTip);
_local6 = new Point(_local1, _local2);
_local7 = currentToolTip;
_local6 = DisplayObject(_local7).root.globalToLocal(_local6);
_local1 = _local6.x;
_local2 = _local6.y;
} else {
_local1 = (Application.application.mouseX + 11);
_local2 = (Application.application.mouseY + 22);
_local10 = currentToolTip.width;
if ((_local1 + _local10) > _local3){
_local1 = (_local3 - _local10);
};
_local11 = currentToolTip.height;
if ((_local2 + _local11) > _local4){
_local2 = (_local4 - _local11);
};
};
currentToolTip.move(_local1, _local2);
}
private function errorTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
private function findTarget(_arg1:DisplayObject):void{
while (_arg1) {
if ((_arg1 is IValidatorListener)){
currentText = IValidatorListener(_arg1).errorString;
if (((!((currentText == null))) && (!((currentText == ""))))){
currentTarget = _arg1;
isError = true;
return;
};
};
if ((_arg1 is IToolTipManagerClient)){
currentText = IToolTipManagerClient(_arg1).toolTip;
if (currentText != null){
currentTarget = _arg1;
isError = false;
return;
};
};
_arg1 = _arg1.parent;
};
currentText = null;
currentTarget = null;
}
public function registerToolTip(_arg1:DisplayObject, _arg2:String):void{
var _local3:String;
if ((_arg1 is IToolTipManagerClient)){
_local3 = IToolTipManagerClient(_arg1).toolTip;
};
if (((!(_local3)) && (_arg2))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
} else {
if (((_local3) && (!(_arg2)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
};
};
}
public function set hideDelay(_arg1:Number):void{
_hideDelay = _arg1;
}
private function getSystemManager(_arg1:DisplayObject):ISystemManager{
return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null);
}
public function set currentTarget(_arg1:DisplayObject):void{
_currentTarget = _arg1;
}
public function set showEffect(_arg1:Effect):void{
_showEffect = _arg1;
}
public function sizeTip(_arg1:IToolTip):void{
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight());
}
public function set hideEffect(_arg1:Effect):void{
_hideEffect = _arg1;
}
private function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
private function targetChanged():void{
var _local1:ToolTipEvent;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
reset();
if (currentTarget){
if (currentText == ""){
return;
};
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
currentTarget.dispatchEvent(_local1);
if ((((showDelay == 0)) || (scrubTimer.running))){
createTip();
initializeTip();
positionTip();
showTip();
} else {
showTimer.delay = showDelay;
showTimer.start();
};
};
}
private function initializeTip():void{
if ((currentToolTip is ToolTip)){
ToolTip(currentToolTip).text = currentText;
};
if (((isError) && ((currentToolTip is IStyleClient)))){
IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
};
sizeTip(currentToolTip);
if ((currentToolTip is IStyleClient)){
if (showEffect){
IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
};
if (hideEffect){
IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
};
};
if (((showEffect) || (hideEffect))){
currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
}
public function get showEffect():Effect{
return (_showEffect);
}
private function hideTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
if (currentToolTip){
currentToolTip.visible = false;
};
if (isError){
if (currentTarget){
currentTarget.removeEventListener("change", changeHandler);
};
} else {
if (previousTarget){
_local2 = getSystemManager(previousTarget);
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
};
if (!hideEffect){
hideEffectEnded();
};
}
private function createTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
currentTarget.dispatchEvent(_local1);
if (_local1.toolTip){
currentToolTip = _local1.toolTip;
} else {
currentToolTip = new toolTipClass();
};
currentToolTip.visible = false;
_local2 = getSystemManager(currentTarget);
_local2.toolTipChildren.addChild(DisplayObject(currentToolTip));
}
public static function getInstance():IToolTipManager{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 137
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
public class LoaderConfig {
mx_internal static const VERSION:String = "2.0.1.0";
mx_internal static var _url:String = null;
mx_internal static var _parameters:Object;
public static function get url():String{
return (_url);
}
public static function get parameters():Object{
return (_parameters);
}
}
}//package mx.messaging.config
Section 138
//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 get error():Boolean;
function get factory():IFlexModuleFactory;
function release():void;
function get data():Object;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void;
function get url():String;
function set data(_arg1:Object):void;
function get setup():Boolean;
function publish(_arg1:IFlexModuleFactory):void;
function unload():void;
}
}//package mx.modules
Section 139
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "2.0.1.0";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.display.*;
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){
referenced = false;
super();
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function get error():Boolean{
return (info.error);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local3 = new ModuleEvent(ModuleEvent.PROGRESS);
_local3.bytesLoaded = info.size;
_local3.bytesTotal = info.size;
dispatchEvent(_local3);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2);
};
};
}
public function get data():Object{
return (_data);
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo;
_local2 = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var className:String;
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
className = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as 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 _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
numReferences = 0;
_error = false;
_loaded = false;
_ready = false;
_setup = false;
super();
_url = _arg1;
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as 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{
var _local2:ModuleEvent;
_error = true;
_local2 = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent;
_local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:URLRequest;
var _local4:LoaderContext;
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_url.indexOf("published://") == 0){
return;
};
_local3 = new URLRequest(_url);
_local4 = new LoaderContext();
_local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local4.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local4.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local3, _local4);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function get url():String{
return (_url);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
bytesTotal = 0;
super();
}
}
Section 140
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 141
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.events.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import flash.text.*;
import mx.graphics.*;
import flash.net.*;
import flash.utils.*;
public class DownloadProgressBar extends Sprite implements IPreloaderDisplay {
private var _stageHeight:Number;// = 375
private var _percentRect:Rectangle;
private var _percentObj:TextField;
private var _backgroundSize:String;// = ""
private var _showLabel:Boolean;// = true
private var _value:Number;// = 0
private var _backgroundAlpha:Number;// = 1
private var _backgroundImage:Object;
private var _backgroundColor:uint;
protected var DOWNLOAD_PERCENTAGE:uint;// = 60
private var _labelObj:TextField;
private var _barFrameSprite:Sprite;
private var _maximum:Number;// = 0
private var _startTime:int;
private var _preloader:Sprite;
private var _displayTime:int;
protected var MINIMUM_DISPLAY_TIME:uint;// = 0
private var _stageWidth:Number;// = 500
private var _downloadingLabel:String;// = "Loading"
private var _showProgressBar:Boolean;// = true
private var _yOffset:Number;// = 20
private var _initProgressCount:uint;// = 0
private var _barSprite:Sprite;
private var _visible:Boolean;// = false
private var _barRect:RoundedRectangle;
private var _showingDisplay:Boolean;// = false
private var _initProgressTotal:uint;// = 12
private var _startedInit:Boolean;// = false
private var _labelRect:Rectangle;
private var _showPercentage:Boolean;// = false
private var _startedLoading:Boolean;// = false
private var _displayStartCount:uint;// = 0
private var _borderRect:RoundedRectangle;
private var _xOffset:Number;// = 20
private var _label:String;// = ""
private var _barFrameRect:RoundedRectangle;
mx_internal static const VERSION:String = "2.0.1.0";
private static var _initializingLabel:String = "Initializing";
public function DownloadProgressBar(){
MINIMUM_DISPLAY_TIME = 0;
DOWNLOAD_PERCENTAGE = 60;
_showProgressBar = true;
_labelRect = labelRect;
_percentRect = percentRect;
_borderRect = borderRect;
_barFrameRect = barFrameRect;
_barRect = barRect;
_xOffset = 20;
_yOffset = 20;
_maximum = 0;
_value = 0;
_startedLoading = false;
_startedInit = false;
_showingDisplay = false;
_displayStartCount = 0;
_initProgressCount = 0;
_initProgressTotal = 12;
_visible = false;
_backgroundAlpha = 1;
_backgroundSize = "";
_stageHeight = 375;
_stageWidth = 500;
_downloadingLabel = "Loading";
_label = "";
_showLabel = true;
_showPercentage = false;
super();
}
private function calcScale():void{
var _local1:Number;
if ((((stageWidth < 160)) || ((stageHeight < 120)))){
scaleX = 1;
scaleY = 1;
} else {
if ((((stageWidth < 240)) || ((stageHeight < 150)))){
createChildren();
_local1 = Math.min((stageWidth / 240), (stageHeight / 150));
scaleX = _local1;
scaleY = _local1;
} else {
createChildren();
};
};
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.color = 0x333333;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
protected function rslCompleteHandler(_arg1:RSLEvent):void{
label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal);
}
protected function set showLabel(_arg1:Boolean):void{
_showLabel = _arg1;
draw();
}
private function calcBackgroundSize():Number{
var _local1:Number;
var _local2:int;
_local1 = NaN;
if (backgroundSize){
_local2 = backgroundSize.indexOf("%");
if (_local2 != -1){
_local1 = Number(backgroundSize.substr(0, _local2));
};
};
return (_local1);
}
protected function rslErrorHandler(_arg1:RSLEvent):void{
_preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_preloader.removeEventListener(Event.COMPLETE, completeHandler);
_preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
if (!_showingDisplay){
show();
_showingDisplay = true;
};
label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal);
}
protected function get barFrameRect():RoundedRectangle{
return (new RoundedRectangle(14, 40, 154, 4));
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
}
protected function get borderRect():RoundedRectangle{
return (new RoundedRectangle(0, 0, 182, 60, 4));
}
protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{
return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2)))));
}
private function timerHandler(_arg1:Event=null):void{
dispatchEvent(new Event(Event.COMPLETE));
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:int;
_local2 = _arg1.bytesLoaded;
_local3 = _arg1.bytesTotal;
_local4 = (getTimer() - _startTime);
if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){
if (!_startedLoading){
show();
label = downloadingLabel;
_startedLoading = true;
};
setProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
public function get backgroundSize():String{
return (_backgroundSize);
}
override public function get visible():Boolean{
return (_visible);
}
protected function center(_arg1:Number, _arg2:Number):void{
_xOffset = Math.floor(((_arg1 - _borderRect.width) / 2));
_yOffset = Math.floor(((_arg2 - _borderRect.height) / 2));
}
protected function get barRect():RoundedRectangle{
return (new RoundedRectangle(14, 39, 154, 6, 0));
}
protected function rslProgressHandler(_arg1:RSLEvent):void{
}
public function set backgroundSize(_arg1:String):void{
_backgroundSize = _arg1;
}
private function initCompleteHandler(_arg1:Event):void{
var _local2:int;
var _local3:Timer;
_local2 = (getTimer() - _displayTime);
if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){
_local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1);
_local3.addEventListener(TimerEvent.TIMER, timerHandler);
_local3.start();
} else {
timerHandler();
};
}
protected function get percentFormat():TextFormat{
var _local1:TextFormat;
_local1 = new TextFormat();
_local1.align = "right";
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
private function calcY(_arg1:Number):Number{
return ((_arg1 + _yOffset));
}
protected function setProgress(_arg1:Number, _arg2:Number):void{
if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){
_value = Number(_arg1);
_maximum = Number(_arg2);
draw();
};
}
protected function get downloadingLabel():String{
return (_downloadingLabel);
}
private function calcX(_arg1:Number):Number{
return ((_arg1 + _xOffset));
}
protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{
return ((((_arg1 > 300)) && ((_arg2 == 2))));
}
private function drawProgressBar(_arg1:Number):void{
var _local2:Graphics;
var _local3:Array;
var _local4:Array;
var _local5:Matrix;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local2 = _barSprite.graphics;
_local2.clear();
_local3 = [0xFFFFFF, 0xFFFFFF];
_local4 = [0, 0xFF];
_local5 = new Matrix();
_local6 = ((_barRect.width * _arg1) / 100);
_local7 = (_local6 / 2);
_local8 = (_barRect.height - 4);
_local9 = calcX(_barRect.x);
_local10 = (calcY(_barRect.y) + 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, _local8);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, _local8);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = calcY(_barRect.y);
_local11 = ((_local10 + _local8) - 1);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = (calcY(_barRect.y) + 1);
_local11 = ((calcY(_barRect.y) + _local8) - 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
}
public function get backgroundImage():Object{
return (_backgroundImage);
}
public function set stageWidth(_arg1:Number):void{
_stageWidth = _arg1;
}
public function get backgroundAlpha():Number{
if (!isNaN(_backgroundAlpha)){
return (_backgroundAlpha);
};
return (1);
}
public function set preloader(_arg1:Sprite):void{
_preloader = _arg1;
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
}
public function get backgroundColor():uint{
return (_backgroundColor);
}
protected function set showPercentage(_arg1:Boolean):void{
_showPercentage = _arg1;
draw();
}
override public function set visible(_arg1:Boolean):void{
if (((!(_visible)) && (_arg1))){
show();
} else {
if (((_visible) && (!(_arg1)))){
hide();
};
};
_visible = _arg1;
}
protected function get labelRect():Rectangle{
return (new Rectangle(14, 17, 100, 16));
}
private function show():void{
_showingDisplay = true;
calcScale();
draw();
_displayTime = getTimer();
}
protected function createChildren():void{
var _local1:Graphics;
var _local2:TextField;
var _local3:TextField;
var _local4:Graphics;
var _local5:Matrix;
var _local6:RectangularDropShadow;
_local1 = graphics;
if (backgroundImage != null){
loadBackgroundImage(backgroundImage);
};
_barFrameSprite = new Sprite();
_barSprite = new Sprite();
addChild(_barFrameSprite);
addChild(_barSprite);
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2));
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local4 = _barFrameSprite.graphics;
_local5 = new Matrix();
_local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y));
_local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5);
_local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.endFill();
_labelObj = new TextField();
_labelObj.x = calcX(_labelRect.x);
_labelObj.y = calcY(_labelRect.y);
_labelObj.width = _labelRect.width;
_labelObj.height = _labelRect.height;
_labelObj.selectable = false;
_labelObj.defaultTextFormat = labelFormat;
addChild(_labelObj);
_percentObj = new TextField();
_percentObj.x = calcX(_percentRect.x);
_percentObj.y = calcY(_percentRect.y);
_percentObj.width = _percentRect.width;
_percentObj.height = _percentRect.height;
_percentObj.selectable = false;
_percentObj.defaultTextFormat = percentFormat;
addChild(_percentObj);
_local6 = new RectangularDropShadow();
_local6.color = 0;
_local6.angle = 90;
_local6.alpha = 0.6;
_local6.distance = 2;
_local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius)));
_local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height);
_local1.lineStyle(1, 0xFFFFFF, 0.3);
_local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y));
_local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y));
}
private function loadBackgroundImage(_arg1:Object):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var classOrString = _arg1;
if (((classOrString) && ((classOrString as Class)))){
cls = Class(classOrString);
initBackgroundImage(new (cls));
} else {
if (((classOrString) && ((classOrString is String)))){
try {
cls = Class(getDefinitionByName(String(classOrString)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(classOrString)), loaderContext);
};
};
};
}
private function hide():void{
}
private function draw():void{
var _local1:Number;
if (_startedLoading){
if (!_startedInit){
_local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100));
} else {
_local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE));
};
} else {
_local1 = getPercentLoaded(_value, _maximum);
};
if (_labelObj){
_labelObj.text = _label;
};
if (_percentObj){
if (!_showPercentage){
_percentObj.visible = false;
_percentObj.text = "";
} else {
_percentObj.text = (String(_local1) + "%");
};
};
if (((_barSprite) && (_barFrameSprite))){
if (!_showProgressBar){
_barSprite.visible = false;
_barFrameSprite.visible = false;
} else {
drawProgressBar(_local1);
};
};
}
protected function initProgressHandler(_arg1:Event):void{
var _local2:int;
var _local3:Number;
_local2 = (getTimer() - _startTime);
_initProgressCount++;
if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){
_displayStartCount = _initProgressCount;
show();
} else {
if (_showingDisplay){
if (!_startedInit){
_startedInit = true;
label = initializingLabel;
};
_local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount));
setProgress(_local3, 100);
};
};
}
protected function get label():String{
return (_label);
}
protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){
return (0);
};
_local3 = ((100 * _arg1) / _arg2);
if (((isNaN(_local3)) || ((_local3 <= 0)))){
return (0);
};
if (_local3 > 99){
return (99);
};
return (Math.round(_local3));
}
protected function set downloadingLabel(_arg1:String):void{
_downloadingLabel = _arg1;
}
public function get stageWidth():Number{
return (_stageWidth);
}
public function set stageHeight(_arg1:Number):void{
_stageHeight = _arg1;
}
protected function get showPercentage():Boolean{
return (_showPercentage);
}
public function initialize():void{
_startTime = getTimer();
center(stageWidth, stageHeight);
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
addChildAt(_arg1, 0);
_local2 = _arg1.width;
_local3 = _arg1.height;
_local4 = calcBackgroundSize();
if (isNaN(_local4)){
_local7 = 1;
_local8 = 1;
} else {
_local9 = (_local4 * 0.01);
_local7 = ((_local9 * stageWidth) / _local2);
_local8 = ((_local9 * stageHeight) / _local3);
};
_arg1.scaleX = _local7;
_arg1.scaleY = _local8;
_local5 = Math.round((0.5 * (stageWidth - (_local2 * _local7))));
_local6 = Math.round((0.5 * (stageHeight - (_local3 * _local8))));
_arg1.x = _local5;
_arg1.y = _local6;
if (!isNaN(backgroundAlpha)){
_arg1.alpha = backgroundAlpha;
};
}
public function set backgroundImage(_arg1:Object):void{
_backgroundImage = _arg1;
}
public function set backgroundAlpha(_arg1:Number):void{
_backgroundAlpha = _arg1;
}
public function set backgroundColor(_arg1:uint):void{
_backgroundColor = _arg1;
}
private function loader_completeHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
}
public function get stageHeight():Number{
return (_stageHeight);
}
protected function get percentRect():Rectangle{
return (new Rectangle(108, 4, 34, 16));
}
protected function completeHandler(_arg1:Event):void{
}
protected function set label(_arg1:String):void{
if (!(_arg1 is Function)){
_label = _arg1;
};
draw();
}
protected function get showLabel():Boolean{
return (_showLabel);
}
public static function get initializingLabel():String{
return (_initializingLabel);
}
public static function set initializingLabel(_arg1:String):void{
_initializingLabel = _arg1;
}
}
}//package mx.preloaders
Section 142
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay)
package mx.preloaders {
import flash.events.*;
import flash.display.*;
public interface IPreloaderDisplay extends IEventDispatcher {
function get stageHeight():Number;
function set backgroundAlpha(_arg1:Number):void;
function get stageWidth():Number;
function set backgroundColor(_arg1:uint):void;
function set preloader(_arg1:Sprite):void;
function get backgroundAlpha():Number;
function get backgroundColor():uint;
function get backgroundSize():String;
function set stageWidth(_arg1:Number):void;
function set stageHeight(_arg1:Number):void;
function set backgroundImage(_arg1:Object):void;
function get backgroundImage():Object;
function set backgroundSize(_arg1:String):void;
function initialize():void;
}
}//package mx.preloaders
Section 143
//Preloader (mx.preloaders.Preloader)
package mx.preloaders {
import flash.events.*;
import flash.system.*;
import flash.display.*;
import mx.events.*;
import flash.net.*;
import flash.utils.*;
public class Preloader extends Sprite {
private var showDisplay:Boolean;
private var timer:Timer;
private var rslIndex:int;// = 0
private var rslDone:Boolean;// = false
private var rslLibs:Array;
private var displayClass:IPreloaderDisplay;// = null
mx_internal static const VERSION:String = "2.0.1.0";
public function Preloader(){
displayClass = null;
rslIndex = 0;
rslDone = false;
super();
}
mx_internal function rslCompleteHandler(_arg1:Event, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_COMPLETE);
_local3.bytesLoaded = _arg2.total;
_local3.bytesTotal = _arg2.total;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
dispatchEvent(_local3);
loadRSL(++rslIndex);
}
private function appProgressHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
}
mx_internal function rslErrorHandler(_arg1:ErrorEvent, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_ERROR);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
_local3.errorText = _arg1.text;
dispatchEvent(_local3);
}
private function displayClassCompleteHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
}
private function timerHandler(_arg1:TimerEvent):void{
var _local2:Object;
var _local3:int;
var _local4:int;
if (!root){
return;
};
_local2 = getByteValues();
_local3 = _local2.loaded;
_local4 = _local2.total;
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4));
if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.reset();
dispatchEvent(new Event(Event.COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
};
}
private function getByteValues():Object{
var _local1:LoaderInfo;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = root.loaderInfo;
_local2 = _local1.bytesLoaded;
_local3 = _local1.bytesTotal;
_local4 = (rslLibs) ? rslLibs.length : 0;
_local5 = 0;
while (_local5 < _local4) {
_local2 = (_local2 + rslLibs[_local5].loaded);
_local3 = (_local3 + rslLibs[_local5].total);
_local5++;
};
return ({loaded:_local2, total:_local3});
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
}
public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null):void{
var _local11:int;
var _local12:int;
var _local13:URLRequest;
var _local14:int;
var _local15:RSLNode;
root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (((_arg9) && ((_arg9.length > 0)))){
rslLibs = [];
_local11 = _arg9.length;
_local12 = 0;
while (_local12 < _local11) {
_local13 = new URLRequest(_arg9[_local12]);
_local14 = 0;
if (((_arg10) && ((_arg10.length == _arg9.length)))){
_local14 = _arg10[_local12];
};
_local15 = new RSLNode(_local13, _local12, _local14, this);
rslLibs.push(_local15);
_local12++;
};
loadRSL(0);
} else {
rslDone = true;
};
this.showDisplay = _arg1;
timer = new Timer(10);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
if (_arg1){
displayClass = new (_arg2);
displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler);
addChild(DisplayObject(displayClass));
displayClass.backgroundColor = _arg3;
displayClass.backgroundAlpha = _arg4;
displayClass.backgroundImage = _arg5;
displayClass.backgroundSize = _arg6;
displayClass.stageWidth = _arg7;
displayClass.stageHeight = _arg8;
displayClass.initialize();
displayClass.preloader = this;
};
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
dispatchAppEndEvent();
}
mx_internal function rslProgressHandler(_arg1:ProgressEvent, _arg2:RSLNode):void{
var _local3:RSLEvent;
_local3 = new RSLEvent(RSLEvent.RSL_PROGRESS);
_local3.bytesLoaded = _arg1.bytesLoaded;
_local3.bytesTotal = _arg1.bytesTotal;
_local3.rslIndex = _arg2.index;
_local3.rslTotal = rslLibs.length;
_local3.url = _arg2.url;
dispatchEvent(_local3);
}
private function loadRSL(_arg1:int):void{
var _local2:RSLNode;
var _local3:Loader;
var _local4:LoaderContext;
if (_arg1 < rslLibs.length){
_local2 = rslLibs[_arg1];
_local3 = new Loader();
_local3.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _local2.progressHandler);
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, _local2.completeHandler);
_local3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _local2.errorHandler);
_local3.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _local2.errorHandler);
_local4 = new LoaderContext();
_local4.applicationDomain = ApplicationDomain.currentDomain;
_local3.load(_local2.url, _local4);
} else {
rslDone = true;
};
}
public function registerApplication(_arg1:IEventDispatcher):void{
_arg1.addEventListener("validatePropertiesComplete", appProgressHandler);
_arg1.addEventListener("validateSizeComplete", appProgressHandler);
_arg1.addEventListener("validateDisplayListComplete", appProgressHandler);
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
}
private function dispatchAppEndEvent(_arg1:Object=null):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
if (!showDisplay){
displayClassCompleteHandler(null);
};
}
}
}//package mx.preloaders
import flash.events.*;
import mx.core.*;
import flash.net.*;
class RSLNode {
public var completed:Boolean;// = false
public var loaded:uint;// = 0
public var total:uint;// = 0
public var index:int;
public var errorText:String;
public var url:URLRequest;
public var owner:Preloader;
private function RSLNode(_arg1:URLRequest, _arg2:int, _arg3:int, _arg4:Preloader){
total = 0;
loaded = 0;
completed = false;
super();
this.url = _arg1;
this.index = _arg2;
this.total = _arg3;
this.owner = _arg4;
}
public function errorHandler(_arg1:ErrorEvent):void{
errorText = _arg1.text;
completed = true;
loaded = 0;
total = 0;
var _local2 = owner;
_local2.mx_internal::rslErrorHandler(_arg1, this);
}
public function progressHandler(_arg1:ProgressEvent):void{
loaded = _arg1.bytesLoaded;
total = _arg1.bytesTotal;
var _local2 = owner;
_local2.mx_internal::rslProgressHandler(_arg1, this);
}
public function completeHandler(_arg1:Event):void{
completed = true;
var _local2 = owner;
_local2.mx_internal::rslCompleteHandler(_arg1, this);
}
}
Section 144
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import flash.system.*;
import mx.utils.*;
public class ResourceBundle {
private var content:Object;
private var bundleName:String;
mx_internal static const VERSION:String = "2.0.1.0";
protected function getContent():Object{
return (null);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
_local2 = getObject(_arg1).split(",");
_local3 = _local2.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getString(_arg1:String):String{
return (String(getObject(_arg1)));
}
private function initialize(_arg1:String):void{
bundleName = _arg1;
content = getContent();
if (!content){
throw (new Error(("No content found in resource bundle " + bundleName)));
};
}
public function getObject(_arg1:String):Object{
var _local2:Object;
_local2 = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String;
_local3 = getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getNumber(_arg1:String):Number{
return (Number(getObject(_arg1)));
}
private static function getDefinitionByName(_arg1:String, _arg2:ApplicationDomain):Object{
var _local3:Object;
if (_arg2.hasDefinition(_arg1)){
_local3 = _arg2.getDefinition(_arg1);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:Class;
var _local4:Object;
var _local5:ResourceBundle;
if (_arg2 == null){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = Class(getDefinitionByName((_arg1 + "_properties"), _arg2));
if (!_local3){
_local3 = Class(getDefinitionByName(String(_arg1), _arg2));
};
if (_local3){
_local4 = new (_local3);
if ((_local4 is ResourceBundle)){
_local5 = ResourceBundle(_local4);
_local5.initialize(String(_arg1));
return (_local5);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 145
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 146
//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 {
private var _borderMetrics:EdgeMetrics;
private var dropShadow:RectangularDropShadow;
mx_internal static const VERSION:String = "2.0.1.0";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local2:String;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
_local2 = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
private function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local9:Number;
var _local10:String;
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
_local9 = getStyle("shadowDistance");
_local10 = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
private function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number;
var _local8:Number;
var _local9:Graphics;
_local7 = width;
_local8 = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
_local9 = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
private function getBackgroundColor():Object{
var _local1:IUIComponent;
var _local2:Object;
_local1 = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (_local2){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
private function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:String;
var _local4:Object;
var _local5:Array;
var _local6:Number;
var _local7:String;
var _local8:Object;
var _local9:uint;
var _local10:uint;
var _local11:String;
var _local12:Number;
var _local13:uint;
var _local14:Boolean;
var _local15:uint;
var _local16:Array;
var _local17:Array;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:uint;
var _local22:Boolean;
var _local23:Number;
var _local24:Object;
var _local25:Boolean;
var _local26:Object;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Object;
var _local31:Graphics;
var _local32:Number;
var _local33:Number;
var _local34:Container;
var _local35:EdgeMetrics;
var _local36:Boolean;
var _local37:Number;
var _local38:Array;
var _local39:uint;
var _local40:Boolean;
var _local41:Number;
var _local42:Number;
var _local43:Number;
var _local44:EdgeMetrics;
var _local45:Number;
var _local46:Number;
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("borderStyle");
_local4 = getBackgroundColor();
_local5 = getStyle("highlightAlphas");
_local7 = "backgroundAlpha";
_local23 = 0;
_local24 = null;
_local25 = false;
_local31 = graphics;
_local31.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local10 = getStyle("borderColor");
_local27 = ColorUtil.adjustBrightness2(_local10, -40);
_local28 = ColorUtil.adjustBrightness2(_local10, 25);
_local29 = ColorUtil.adjustBrightness2(_local10, 40);
_local30 = _local4;
if ((((_local30 === null)) || ((_local30 === "")))){
_local30 = _local10;
};
draw3dBorder(_local28, _local27, _local29, Number(_local30), Number(_local30), Number(_local30));
break;
case "outset":
_local10 = getStyle("borderColor");
_local27 = ColorUtil.adjustBrightness2(_local10, -40);
_local28 = ColorUtil.adjustBrightness2(_local10, -25);
_local29 = ColorUtil.adjustBrightness2(_local10, 40);
_local30 = _local4;
if ((((_local30 === null)) || ((_local30 === "")))){
_local30 = _local10;
};
draw3dBorder(_local28, _local29, _local27, Number(_local30), Number(_local30), Number(_local30));
break;
case "alert":
case "default":
_local32 = getStyle("backgroundAlpha");
_local6 = getStyle("borderAlpha");
_local7 = "borderAlpha";
_local23 = getStyle("cornerRadius");
_local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local33 = (_local25) ? _local23 : 0;
drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local33, _local33);
if (!_local25){
_local24 = {};
};
_local34 = (parent as Container);
if (_local34){
_local35 = _local34.viewMetrics;
_local8 = {x:_local35.left, y:_local35.top, w:Math.max(0, ((_arg1 - _local35.left) - _local35.right)), h:Math.max(0, ((_arg2 - _local35.top) - _local35.bottom)), r:0};
if ((((_local8.w > 0)) && ((_local8.h > 0)))){
if (_local32 != _local6){
drawDropShadow(_local8.x, _local8.y, _local8.w, _local8.h, 0, 0, 0, 0);
};
_local31.beginFill(Number(_local4), _local32);
_local31.drawRect(_local8.x, _local8.y, _local8.w, _local8.h);
_local31.endFill();
};
};
_local4 = getStyle("borderColor");
break;
case "dropdown":
_local15 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local15)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local15, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
_local4 = null;
break;
case "menuBorder":
_local10 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local10, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
_local4 = null;
break;
};
_local17 = getStyle("footerColors");
_local36 = !((_local17 == null));
_local37 = getStyle("borderAlpha");
if (_local36){
_local31.lineStyle(0, ((_local17.length > 0)) ? _local17[1] : _local17[0], _local37);
_local31.moveTo(0, 0);
_local31.lineTo(_arg1, 0);
_local31.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
_local23 = IStyleClient(parent.parent).getStyle("cornerRadius");
_local37 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(_local23)){
_local23 = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
_local23 = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local17.length > 1)) && (!((_local17[0] == _local17[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(_local23 - 1), br:(_local23 - 1)}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
_local4 = null;
break;
case "applicationControlBar":
_local16 = getStyle("fillColors");
_local6 = getStyle("backgroundAlpha");
_local5 = getStyle("highlightAlphas");
_local38 = getStyle("fillAlphas");
_local14 = getStyle("docked");
_local39 = uint(_local4);
_local23 = getStyle("cornerRadius");
if (!_local23){
_local23 = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), _local23, _local23, _local23, _local23);
if (_local4){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local39, _local6, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local16, _local38, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:_local23, tr:_local23, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:_local23, tr:_local23, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:_local23, tr:_local23, bl:0, br:0}});
_local4 = null;
break;
default:
_local10 = getStyle("borderColor");
_local12 = getStyle("borderThickness");
_local11 = getStyle("borderSides");
_local40 = true;
_local23 = getStyle("cornerRadius");
_local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local41 = Math.max((_local23 - _local12), 0);
_local26 = {x:_local12, y:_local12, w:(_arg1 - (_local12 * 2)), h:(_arg2 - (_local12 * 2)), r:_local41};
if (!_local25){
_local24 = {tl:_local23, tr:_local23, bl:0, br:0};
_local26.r = {tl:_local41, tr:_local41, bl:0, br:0};
};
if (_local11 != "left top right bottom"){
_local26.r = {tl:_local41, tr:_local41, bl:(_local25) ? _local41 : 0, br:(_local25) ? _local41 : 0};
_local24 = {tl:_local23, tr:_local23, bl:(_local25) ? _local23 : 0, br:(_local25) ? _local23 : 0};
_local11 = _local11.toLowerCase();
if (_local11.indexOf("left") == -1){
_local26.x = 0;
_local26.w = (_local26.w + _local12);
_local26.r.tl = 0;
_local26.r.bl = 0;
_local24.tl = 0;
_local24.bl = 0;
_local40 = false;
};
if (_local11.indexOf("top") == -1){
_local26.y = 0;
_local26.h = (_local26.h + _local12);
_local26.r.tl = 0;
_local26.r.tr = 0;
_local24.tl = 0;
_local24.tr = 0;
_local40 = false;
};
if (_local11.indexOf("right") == -1){
_local26.w = (_local26.w + _local12);
_local26.r.tr = 0;
_local26.r.br = 0;
_local24.tr = 0;
_local24.br = 0;
_local40 = false;
};
if (_local11.indexOf("bottom") == -1){
_local26.h = (_local26.h + _local12);
_local26.r.bl = 0;
_local26.r.br = 0;
_local24.bl = 0;
_local24.br = 0;
_local40 = false;
};
};
if ((((_local23 == 0)) && (_local40))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local31.beginFill(_local10);
_local31.drawRect(0, 0, _arg1, _arg2);
_local31.drawRect(_local12, _local12, (_arg1 - (2 * _local12)), (_arg2 - (2 * _local12)));
_local31.endFill();
} else {
if (_local24){
drawDropShadow(0, 0, _arg1, _arg2, _local24.tl, _local24.tr, _local24.br, _local24.bl);
drawRoundRect(0, 0, _arg1, _arg2, _local24, _local10, 1, null, null, null, _local26);
_local24.tl = Math.max((_local23 - _local12), 0);
_local24.tr = Math.max((_local23 - _local12), 0);
_local24.bl = (_local25) ? Math.max((_local23 - _local12), 0) : 0;
_local24.br = (_local25) ? Math.max((_local23 - _local12), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local23, _local23);
drawRoundRect(0, 0, _arg1, _arg2, _local23, _local10, 1, null, null, null, _local26);
_local23 = Math.max((getStyle("cornerRadius") - _local12), 0);
};
};
};
};
if (((((((!((_local4 === null))) && (!((_local4 === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local42 = Number(_local4);
_local43 = 1;
_local44 = borderMetrics;
if (((((isNaN(_local42)) || ((_local4 === "")))) || ((_local4 === null)))){
_local43 = 0;
_local42 = 0xFFFFFF;
} else {
_local43 = getStyle(_local7);
};
if (((!((_local23 == 0))) || (_local8))){
_local45 = _local44.bottom;
if (_local24){
_local46 = (_local25) ? _local23 : 0;
_local24 = {tl:_local23, tr:_local23, bl:_local46, br:_local46};
drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local24, _local42, _local43, null, GradientType.LINEAR, null, _local8);
} else {
drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local23, _local42, _local43, null, GradientType.LINEAR, null, _local8);
};
} else {
_local31.beginFill(_local42, _local43);
_local31.drawRect(_local44.left, _local44.top, ((_arg1 - _local44.right) - _local44.left), ((_arg2 - _local44.bottom) - _local44.top));
_local31.endFill();
};
};
}
}
}//package mx.skins.halo
Section 147
//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 = "2.0.1.0";
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function set inheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function registerEffects(_arg1:Array):void{
}
public function getClassStyleDeclarations():Array{
return ([]);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:Number;
var _local10:Number;
var _local11:Graphics;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
_local3 = getStyle("focusBlendMode");
_local4 = getStyle("focusAlpha");
_local5 = getStyle("focusColor");
_local6 = getStyle("cornerRadius");
_local7 = getStyle("focusThickness");
_local8 = getStyle("focusRoundedCorners");
_local9 = getStyle("themeColor");
_local10 = _local5;
if (!_local10){
_local10 = _local9;
};
_local11 = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
}
}//package mx.skins.halo
Section 148
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin {
mx_internal static const VERSION:String = "2.0.1.0";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 149
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient {
private var _initialized:Boolean;// = false
private var invalidateDisplayListFlag:Boolean;// = false
private var _height:Number;
private var _styleName:IStyleClient;
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
private var _nestLevel:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
invalidateDisplayListFlag = false;
_initialized = false;
_nestLevel = 0;
_processedDescriptors = false;
_updateCompletePendingFlag = true;
super();
_width = measuredWidth;
_height = measuredHeight;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function invalidateSize():void{
}
public function getStyle(_arg1:String){
return (_styleName.getStyle(_arg1));
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local12:Graphics;
var _local13:Number;
var _local14:Array;
var _local15:Object;
_local12 = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get measuredHeight():Number{
return (0);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
_local3 = false;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
override public function get width():Number{
return (_width);
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
public function invalidateProperties():void{
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function get styleName():Object{
return (_styleName);
}
public function validateProperties():void{
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
}
}//package mx.skins
Section 150
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import mx.resources.*;
import flash.system.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.net.*;
import flash.utils.*;
import mx.utils.*;
public class RectangularBorder extends Border {
private var backgroundImageWidth:Number;
private var backgroundImageStyle:Object;
mx_internal var loader:Loader;
private var backgroundMask:Shape;
private var backgroundImageHeight:Number;
private var _backgroundImageRect:Rectangle;
private var backgroundImage:DisplayObject;
mx_internal static const VERSION:String = "2.0.1.0";
private static var resourceNotLoaded:String;
private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("skins", ApplicationDomain.currentDomain);
public function RectangularBorder(){
addEventListener(Event.REMOVED, removedHandler);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var newStyle:Object;
var cls:Class;
var imgParent:DisplayObjectContainer;
var childrenList:IChildList;
var newStyleObj:DisplayObject;
var loaderContext:LoaderContext;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
newStyle = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
backgroundImageStyle = newStyle;
if (backgroundImage){
imgParent = backgroundImage.parent;
childrenList = ((imgParent is Container)) ? Container(imgParent).rawChildren : IChildList(imgParent);
childrenList.removeChild(backgroundImage);
};
backgroundImage = null;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
throw (new Error(StringUtil.substitute(resourceNotLoaded, newStyle)));
};
};
};
};
if (backgroundImage){
adjustBackgroundImage();
};
}
private function completeEventHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (!parent){
return;
};
_local2 = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
adjustBackgroundImage();
dispatchEvent(_arg1.clone());
}
mx_internal function get backgroundImageRect():Rectangle{
return (_backgroundImageRect);
}
private function getBackgroundSize():Number{
var _local1:Number;
var _local2:Object;
var _local3:int;
_local1 = NaN;
_local2 = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
mx_internal function adjustBackgroundImage():void{
var _local1:DisplayObject;
var _local2:EdgeMetrics;
var _local3:Boolean;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Graphics;
_local1 = parent;
_local2 = ((_local1 is Container)) ? Container(_local1).viewMetrics : borderMetrics;
_local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageRect){
_local9 = _backgroundImageRect.width;
_local10 = _backgroundImageRect.height;
} else {
_local9 = ((width - _local2.left) - _local2.right);
_local10 = ((height - _local2.top) - _local2.bottom);
};
_local4 = getBackgroundSize();
if (isNaN(_local4)){
_local11 = 1;
_local12 = 1;
} else {
_local13 = (_local4 * 0.01);
_local11 = ((_local13 * _local9) / backgroundImageWidth);
_local12 = ((_local13 * _local10) / backgroundImageHeight);
};
backgroundImage.scaleX = _local11;
backgroundImage.scaleY = _local12;
_local5 = Math.round((0.5 * (_local9 - (backgroundImageWidth * _local11))));
_local6 = Math.round((0.5 * (_local10 - (backgroundImageHeight * _local12))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
backgroundMask.x = _local2.left;
backgroundMask.y = _local2.top;
if (((_local3) && ((_local1 is Container)))){
_local5 = (_local5 - Container(_local1).horizontalScrollPosition);
_local6 = (_local6 - Container(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local5);
backgroundImage.y = (backgroundImage.y + _local6);
_local7 = ((width - _local2.left) - _local2.right);
_local8 = ((height - _local2.top) - _local2.bottom);
if (((!((backgroundMask.width == _local7))) || (!((backgroundMask.height == _local8))))){
_local14 = backgroundMask.graphics;
_local14.clear();
_local14.beginFill(0xFFFFFF);
_local14.drawRect(0, 0, _local7, _local8);
_local14.endFill();
};
}
private function errorEventHandler(_arg1:Event):void{
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local2:IChildList;
var _local3:int;
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
_local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent);
backgroundMask = new FlexShape();
backgroundMask.name = "backgroundMask";
backgroundMask.x = 0;
backgroundMask.y = 0;
_local2.addChild(backgroundMask);
_local3 = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local3 + 1));
backgroundImage.mask = backgroundMask;
}
mx_internal function set backgroundImageRect(_arg1:Rectangle):void{
_backgroundImageRect = _arg1;
invalidateDisplayList();
}
mx_internal function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
_local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent);
if (backgroundImage){
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
if (backgroundMask){
_local2.removeChild(backgroundMask);
backgroundMask = null;
};
}
private static function loadResources():void{
resourceNotLoaded = packageResources.getString("notLoaded");
}
loadResources();
}
}//package mx.skins
Section 151
//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 152
//State (mx.states.State)
package mx.states {
import flash.events.*;
import mx.events.*;
public class State extends EventDispatcher {
public var name:String;
private var initialized:Boolean;// = false
public var overrides:Array;
public var basedOn:String;
mx_internal static const VERSION:String = "2.0.1.0";
public function State(){
initialized = false;
overrides = [];
super();
}
mx_internal function initialize():void{
var _local1:int;
if (!initialized){
initialized = true;
_local1 = 0;
while (_local1 < overrides.length) {
IOverride(overrides[_local1]).initialize();
_local1++;
};
};
}
mx_internal function dispatchExitState():void{
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
}
mx_internal function dispatchEnterState():void{
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
}
}
}//package mx.states
Section 153
//Transition (mx.states.Transition)
package mx.states {
import mx.effects.*;
public class Transition {
public var effect:Effect;
public var toState:String;// = "*"
public var fromState:String;// = "*"
mx_internal static const VERSION:String = "2.0.1.0";
public function Transition(){
fromState = "*";
toState = "*";
super();
}
}
}//package mx.states
Section 154
//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;
public var defaultFactory:Function;
public var factory:Function;
protected var overrides:Object;
private var clones:Dictionary;
mx_internal var selectorRefCount:int;// = 0
mx_internal static const VERSION:String = "2.0.1.0";
private static const NOT_A_COLOR:uint = 4294967295;
private static var styleManager:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager);
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
selectorRefCount = 0;
super();
if (_arg1){
StyleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject):Object{
var nodeAddedToChain:Boolean;
var p:String;
var emptyObjectFactory:Function;
var chain = _arg1;
var target = _arg2;
nodeAddedToChain = false;
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object;
_local1 = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:Object;
_local3 = getStyle(_arg1);
_local4 = false;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
_local5 = SystemManagerGlobals.topLevelSystemManagers;
_local6 = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
_local5 = StyleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local4[_arg1] = _arg2;
};
}
}
}//package mx.styles
Section 155
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function styleChanged(_arg1:String):void;
function set styleName(_arg1:Object):void;
function get styleName():Object;
}
}//package mx.styles
Section 156
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get styleDeclaration():CSSStyleDeclaration;
function get className():String;
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function set nonInheritingStyles(_arg1:Object):void;
function get inheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function get nonInheritingStyles():Object;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function getStyle(_arg1:String);
function setStyle(_arg1:String, _arg2):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 157
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get inheritingStyles():Object;
function styleDeclarationsChanged():void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function registerInheritingStyle(_arg1:String):void;
function get typeSelectorCache():Object;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function isValidStyleValue(_arg1):Boolean;
function getColorNames(_arg1:Array):void;
function isColorName(_arg1:String):Boolean;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function set typeSelectorCache(_arg1:Object):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 158
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 159
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
public class StyleManager {
mx_internal static const VERSION:String = "2.0.1.0";
public static const NOT_A_COLOR:uint = 4294967295;
private static var impl:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager);
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (impl.loadStyleDeclarations(_arg1, _arg2, _arg3));
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 160
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.resources.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.managers.*;
import flash.utils.*;
import mx.utils.*;
public class StyleManagerImpl implements IStyleManager {
private var resourceUnableToLoad:String;// = null
private var _stylesRoot:Object;
private var styleModules:Object;
private var packageResources:ResourceBundle;
private var _inheritingStyles:Object;
private var _typeSelectorCache:Object;
private var selectors:Object;
mx_internal static const VERSION:String = "2.0.1.0";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
packageResources = ResourceBundle.getResourceBundle("styles", ApplicationDomain.currentDomain);
resourceUnableToLoad = null;
selectors = {};
styleModules = {};
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
selectors[_arg1] = _arg2;
typeSelectorCache = new Object();
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:uint;
if (!_arg1){
return;
};
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function styleDeclarationsChanged():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:SystemManager;
_local1 = SystemManagerGlobals.topLevelSystemManagers;
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = SystemManager(_local1[_local3]);
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
var module:IModuleInfo;
var readyHandler:Function;
var styleEventDispatcher:StyleEventDispatcher;
var errorHandler:Function;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var trustContent = _arg3;
module = ModuleManager.getModule(url);
readyHandler = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule;
_local2 = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
errorHandler = function (_arg1:ModuleEvent):void{
var _local2:String;
var _local3:StyleEvent;
if (resourceUnableToLoad == null){
loadResources();
};
_local2 = StringUtil.substitute(resourceUnableToLoad, _arg1.errorText, url);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
if (trustContent){
module.load(ApplicationDomain.currentDomain, SecurityDomain.currentDomain);
} else {
module.load();
};
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local3:StyleModuleInfo;
var _local4:IModuleInfo;
_local3 = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
private function loadResources():void{
resourceUnableToLoad = packageResources.getString("unableToLoad");
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function initProtoChainRoots():void{
if (!stylesRoot){
stylesRoot = selectors["global"].addStyleToProtoChain({}, null);
};
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration;
_local3 = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (selectors[_arg1]);
}
public static function getInstance():IStyleManager{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.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_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent;
_local2 = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
public var readyHandler:Function;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 161
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import mx.core.*;
import flash.display.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "2.0.1.0";
public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{
var _local2:IStyleClient;
var _local3:Object;
var _local4:Object;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:CSSStyleDeclaration;
_local2 = IStyleClient(_arg1.styleName);
_local3 = _local2.nonInheritingStyles;
if (((!(_local3)) || ((_local3 == UIComponent.STYLE_UNINITIALIZED)))){
_local3 = StyleManager.stylesRoot;
if (_local3.effects){
_arg1.registerEffects(_local3.effects);
};
};
_local4 = _local2.inheritingStyles;
if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){
_local4 = StyleManager.stylesRoot;
};
_local5 = _arg1.getClassStyleDeclarations();
_local6 = _local5.length;
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local4 = _local8.addStyleToProtoChain(_local4, DisplayObject(_arg1));
_local4 = addProperties(_local4, _local2, true);
_local3 = _local8.addStyleToProtoChain(_local3, DisplayObject(_arg1));
_local3 = addProperties(_local3, _local2, false);
if (_local8.effects){
_arg1.registerEffects(_local8.effects);
};
_local7++;
};
_arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, DisplayObject(_arg1)) : _local4;
_arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local3, DisplayObject(_arg1)) : _local3;
}
private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Object;
var _local8:CSSStyleDeclaration;
var _local9:CSSStyleDeclaration;
_local4 = _arg2.getClassStyleDeclarations();
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_arg1 = _local8.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
if (_local8.effects){
_arg2.registerEffects(_local8.effects);
};
_local6++;
};
_local7 = _arg2.styleName;
if (_local7){
if (typeof(_local7) == "object"){
if ((_local7 is CSSStyleDeclaration)){
_local9 = CSSStyleDeclaration(_local7);
} else {
_arg1 = addProperties(_arg1, IStyleClient(_local7), _arg3);
};
} else {
_local9 = StyleManager.getStyleDeclaration(("." + _local7));
};
if (_local9){
_arg1 = _local9.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
if (_local9.effects){
_arg2.registerEffects(_local9.effects);
};
};
};
if (_arg2.styleDeclaration){
_arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, DisplayObject(_arg2));
};
return (_arg1);
}
public static function initTextField(_arg1:UITextField):void{
var _local2:Object;
var _local3:CSSStyleDeclaration;
var _local4:Object;
var _local5:Object;
_local2 = _arg1.styleName;
if (_local2){
if (typeof(_local2) == "object"){
if ((_local2 is CSSStyleDeclaration)){
_local3 = CSSStyleDeclaration(_local2);
} else {
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles;
return;
};
} else {
_local3 = StyleManager.getStyleDeclaration(("." + _local2));
};
};
_local4 = IStyleClient(_arg1.parent).inheritingStyles;
_local5 = StyleManager.stylesRoot;
if (!_local4){
_local4 = StyleManager.stylesRoot;
};
if (_local3){
_local4 = _local3.addStyleToProtoChain(_local4, _arg1);
_local5 = _local3.addStyleToProtoChain(_local5, _arg1);
};
_arg1.inheritingStyles = _local4;
_arg1.nonInheritingStyles = _local5;
}
}
}//package mx.styles
Section 162
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local6 = ((_arg2 >> 16) & 0xFF);
_local7 = ((_arg2 >> 8) & 0xFF);
_local8 = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
_local4 = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
_local5 = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 163
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local10 = (_arg2 + _arg4);
_local11 = (_arg3 + _arg5);
_local12 = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
_local13 = (_arg9 * 0.292893218813453);
_local14 = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 164
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import flash.utils.*;
import mx.core.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 165
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "2.0.1.0";
public static function trim(_arg1:String):String{
var _local2:int;
var _local3:int;
_local2 = 0;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
_local3 = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local3:uint;
var _local4:Array;
var _local5:int;
_local3 = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
_local5 = 0;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 166
//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 167
//ValidationResult (mx.validators.ValidationResult)
package mx.validators {
public class ValidationResult {
public var errorCode:String;
public var errorMessage:String;
public var subField:String;
public var isError:Boolean;
mx_internal static const VERSION:String = "2.0.1.0";
public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){
this.isError = _arg1;
this.subField = _arg2;
this.errorMessage = _arg4;
this.errorCode = _arg3;
}
}
}//package mx.validators
Section 168
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 169
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 170
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 171
//_comboDropDownStyle (_comboDropDownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropDownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".comboDropDown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropDown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.cornerRadius = 0;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 172
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 173
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 174
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 4;
this.borderColor = 13510953;
this.paddingLeft = 4;
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.paddingBottom = 4;
this.borderStyle = "errorTipRight";
};
};
}
}
}//package
Section 175
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.stroked = false;
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.fontStyle = "normal";
this.borderSides = "left top right bottom";
this.borderThickness = 1;
this.modalTransparencyDuration = 100;
this.useRollOver = true;
this.strokeWidth = 1;
this.filled = true;
this.borderColor = 12040892;
this.horizontalGridLines = false;
this.horizontalGridLineColor = 0xF7F7F7;
this.shadowCapColor = 14015965;
this.fontGridFitType = "pixel";
this.horizontalAlign = "left";
this.disabledColor = 11187123;
this.modalTransparencyColor = 0xDDDDDD;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.selectionDuration = 250;
this.bevel = true;
this.fillColor = 0xFFFFFF;
this.focusBlendMode = "normal";
this.dropShadowEnabled = false;
this.textRollOverColor = 2831164;
this.textIndent = 0;
this.fontSize = 10;
this.openDuration = 250;
this.closeDuration = 250;
this.kerning = false;
this.paddingTop = 0;
this.highlightAlphas = [0.3, 0];
this.cornerRadius = 0;
this.horizontalGap = 8;
this.textSelectedColor = 2831164;
this.paddingLeft = 0;
this.modalTransparency = 0.5;
this.roundedBottomCorners = true;
this.repeatDelay = 500;
this.selectionDisabledColor = 0xDDDDDD;
this.fontAntiAliasType = "advanced";
this.focusSkin = HaloFocusRect;
this.verticalGap = 6;
this.leading = 2;
this.shadowColor = 0xEEEEEE;
this.backgroundAlpha = 1;
this.focusAlpha = 0.4;
this.borderAlpha = 1;
this.focusThickness = 2;
this.themeColor = 40447;
this.backgroundSize = "auto";
this.indicatorGap = 14;
this.letterSpacing = 0;
this.fontFamily = "Verdana";
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.color = 734012;
this.paddingRight = 0;
this.errorColor = 0xFF0000;
this.verticalAlign = "top";
this.focusRoundedCorners = "tl tr bl br";
this.shadowDistance = 2;
this.repeatInterval = 35;
};
};
}
}
}//package
Section 176
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 177
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 178
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 179
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 180
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 181
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 182
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 183
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 184
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 185
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 186
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var style:CSSStyleDeclaration;
var fbs = _arg1;
style = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 187
//Ball (Ball)
package {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
public class Ball extends Sprite {
public var _texture:Bitmap;
public var _ricochetCount:int;// = 0
public var _isExplosive:Boolean;// = false
public var _integrityTotal:Number;// = 0
public var _velocity:Number;
public var _ballSprite:Sprite;
public var _collided:Boolean;
public var _isGravity:Boolean;// = false
public var _alpha:Number;
public var _vector:Vector;
public var _color:uint;
public var _vx:Number;
public var _vy:Number;
public var _collidedObj:Object;// = null
public var _bounce:Number;
public var _isImmobile:Boolean;// = false
public var _radius:Number;
public var _mask:Sprite;
public var _mass:Number;
public var _moveDelta:Number;
public var _integrityCurrent:Number;// = 1
public var _x:Number;
public var _y:Number;
public static const MAXVELOCITY:Number = 75;
public function Ball(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Bitmap){
var _local7:Array;
var _local8:Sprite;
var _local9:Graphics;
var _local10:Number;
_collidedObj = null;
_integrityTotal = 0;
_integrityCurrent = 1;
_ricochetCount = 0;
_isImmobile = false;
_isExplosive = false;
_isGravity = false;
super();
_radius = _arg1;
this.Velocity = new Vector(_arg2, _arg3);
_mass = _arg4;
_alpha = alpha;
_bounce = _arg5;
this._collided = false;
this.graphics.beginFill(0, (_alpha * 0.25));
this.graphics.drawEllipse((-(_radius) * 1.3), (-(_radius) * 0.4), (_radius * 2), (_radius * 1.4));
this.graphics.endFill();
_ballSprite = new Sprite();
addChild(_ballSprite);
this._integrityTotal = 9999999;
this._integrityCurrent = this._integrityTotal;
_mask = new Sprite();
_mask.graphics.beginFill(0xFFFFFF, 1);
_mask.graphics.drawCircle(0, 0, _radius);
_mask.graphics.endFill();
_ballSprite.addChild(_mask);
_ballSprite.mask = _mask;
this.Texture = _arg6;
_local7 = _ballSprite.filters;
_local7.push(new DropShadowFilter((_radius * 0.5), -45, 0, 1, _radius, _radius, 1, 1, true));
_ballSprite.filters = _local7;
_local8 = new Sprite();
_local9 = _local8.graphics;
_local10 = 0.05;
while (_local10 < 0.35) {
_local9.beginFill(0xFFFFFF, 0.03);
_local9.drawCircle((_radius * 0.5), (-(_radius) * 0.5), (_radius * _local10));
_local9.endFill();
_local10 = (_local10 + 0.01);
};
_local8.cacheAsBitmap = true;
_ballSprite.addChild(_local8);
this.cacheAsBitmap = true;
}
public function get Velocity():Vector{
return (new Vector(_vx, _vy));
}
public function set Velocity(_arg1:Vector):void{
_velocity = _arg1.length;
if (_velocity > Ball.MAXVELOCITY){
_velocity = Ball.MAXVELOCITY;
};
_vector = _arg1.Normalize();
_vx = (_vector.x * _velocity);
_vy = (_vector.y * _velocity);
}
public function get Texture():Bitmap{
return (new Bitmap(_texture.bitmapData));
}
public function MoveEvent():Number{
var _local1:Number;
_local1 = (this._velocity - _moveDelta);
if (_local1 > (this._radius * 0.5)){
_local1 = (this._radius * 0.5);
};
this.x = (this.x + (this._vector.x * _local1));
this.y = (this.y + (this._vector.y * _local1));
return (_local1);
}
public function DistToLineCollision(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Point;
var _local5:Vector;
var _local6:Number;
var _local7:Vector;
var _local8:Point;
var _local9:Vector;
var _local10:Point;
var _local11:Point;
var _local12:Number;
var _local13:Boolean;
var _local14:Vector;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local3 = Number.MAX_VALUE;
_local4 = new Point(this.x, this.y);
_local5 = this.Velocity;
_local6 = this._radius;
_local7 = Vector.fromPoints(_arg1, _local4).ProjectOnto(Vector.fromPoints(_arg1, _arg2));
_local8 = new Point((_arg1.x + _local7.x), (_arg1.y + _local7.y));
_local9 = Vector.fromPoints(_local4, _local8);
_local10 = _local4.add(_local9.Normalize().Multiply(_local6).ToPoint());
_local11 = _local10.add(_local5.ToPoint());
_local12 = Geometry.RadiansToDegrees(_local9.AngleBetween(_local5));
if ((((_local9.length < _local6)) && (Geometry.intersection(_local4, _local10, _arg1, _arg2)))){
if (Geometry.roundToPrecision(_local9.length, 8) < _local6){
};
};
_local13 = Geometry.intersection(_local10, _local11, _arg1, _arg2);
if (_local13){
if (_local9.length < _local6){
if (Geometry.roundToPrecision(_local9.length, 1) < _local6){
};
};
_local14 = Vector.fromPoints(_local10, _local8);
_local15 = _local5.AngleBetween(_local14);
_local16 = Math.cos(_local15);
_local17 = Geometry.RadiansToDegrees(_local16);
if (_local16 == 0){
_local3 = _local14.length;
} else {
_local3 = (_local14.length / _local16);
};
};
return (_local3);
}
public function drawFigure():Sprite{
var _local1:Sprite;
var _local2:Graphics;
_local1 = new Sprite();
_local2 = _local1.graphics;
_local2.beginFill(0x800021, 1);
_local2.drawEllipse(3, -9, 10, 6);
_local2.drawEllipse(3, 3, 10, 6);
_local2.endFill();
_local2.beginFill(640);
_local2.drawEllipse(2, -12, 12, 6);
_local2.endFill();
_local2.beginFill(640);
_local2.drawEllipse(5, 6, 12, 6);
_local2.endFill();
_local2.beginFill(640);
_local2.drawEllipse(9, 5, 12, 6);
_local2.endFill();
_local2.beginFill(0x666666);
_local2.drawRect(16, 5, 8, 6);
_local2.endFill();
_local2.beginFill(0xFF0000);
_local2.drawEllipse(22, 6, 3, 4);
_local2.endFill();
_local2.beginFill(589900);
_local2.drawEllipse(0, -11, 12, 22);
_local2.endFill();
_local2.beginFill(640);
_local2.drawEllipse(0, -13, 12, 12);
_local2.endFill();
_local2.beginFill(640);
_local2.drawEllipse(0, 2, 12, 12);
_local2.endFill();
_local2.beginFill(15581007);
_local2.drawEllipse(0, -5, 10, 10);
_local2.endFill();
_local2.beginFill(0x222222);
_local2.drawEllipse(0, -5.5, 8, 11);
_local2.endFill();
return (_local1);
}
public function RedirectFromPoint(_arg1:Point):void{
var _local2:Point;
var _local3:Number;
var _local4:Vector;
var _local5:Vector;
var _local6:Vector;
var _local7:Point;
var _local8:Point;
var _local9:Point;
var _local10:Point;
_local2 = new Point(this.x, this.y);
_local3 = this._radius;
_local4 = this.Velocity;
_local5 = Vector.fromPoints(_local2, _arg1);
_local6 = _local5.Normalize();
_local7 = _local2.add(_local6.Multiply(_local3).ToPoint());
_local8 = _local7.add(_local4.ToPoint());
_local9 = _arg1.add(_local6.NormalLH().Multiply(_local3).ToPoint());
_local10 = _arg1.add(_local6.NormalRH().Multiply(_local3).ToPoint());
RedirectFromLine(_local9, _local10);
}
override public function get x():Number{
return (_x);
}
override public function get y():Number{
return (_y);
}
public function DistToPointCollision(_arg1:Point, _arg2:Number=0):Number{
var _local3:Number;
var _local4:Point;
var _local5:Number;
var _local6:Vector;
var _local7:Vector;
var _local8:Vector;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Point;
var _local13:Boolean;
var _local14:Vector;
var _local15:Number;
_local3 = Number.MAX_VALUE;
_local4 = new Point(this.x, this.y);
_local5 = this._radius;
_local6 = this.Velocity;
_local7 = Vector.fromPoints(_local4, _arg1);
_local8 = _local7.Normalize();
_local9 = _local4.add(_local8.Multiply(_local5).ToPoint());
_local10 = _local9.add(_local6.ToPoint());
_local11 = _arg1.add(_local8.NormalLH().Multiply(_local5).ToPoint());
_local12 = _arg1.add(_local8.NormalRH().Multiply(_local5).ToPoint());
_local13 = Geometry.intersection(_local9, _local10, _local11, _local12);
if (_local13){
_local14 = Vector.fromPoints(_local9, _arg1);
_local15 = _local6.AngleBetween(_local14);
_local3 = (_local14.length / Math.cos(_local15));
};
return (_local3);
}
public function RedirectFromLine(_arg1:Point, _arg2:Point, _arg3:Number=1):void{
var _local4:Vector;
var _local5:Vector;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Vector;
var _local10:Vector;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local4 = Vector.fromPoints(_arg1, _arg2);
_local5 = _local4.Normalize();
_local6 = -(_local5.y);
_local7 = _local5.x;
_local8 = DistToLineCollision(_arg1, _arg2);
_local9 = Velocity.Normalize().Multiply((_local8 + _radius));
_local10 = _local9.ProjectOnto(_local4);
_local11 = ((-(_vx) * _local6) + (-(_vy) * _local7));
_local12 = (_local11 * _local6);
_local13 = (_local11 * _local7);
_arg3 = ((_arg3 + this._bounce) * 0.5);
_local14 = (((2 * _local12) + _vx) * _arg3);
_local15 = (((2 * _local13) + _vy) * _arg3);
this.Velocity = new Vector(_local14, _local15);
}
override public function set x(_arg1:Number):void{
_x = _arg1;
super.x = _x;
}
public function Move(_arg1:Number=1):void{
var _local2:Number;
var _local3:Number;
_local2 = (this._vx * _arg1);
_local3 = (this._vy * _arg1);
this.x = (this.x + _local2);
this.y = (this.y + _local3);
this._texture.x = (this._texture.x + _local2);
this._texture.y = (this._texture.y + _local3);
if (_texture.x > -(_radius)){
while (_texture.x > -(_radius)) {
_texture.x = (_texture.x - (_texture.width * 0.5));
};
} else {
if (_texture.x < -((_texture.width - _radius))){
while (_texture.x < -((_texture.width - _radius))) {
_texture.x = (_texture.x + (_texture.width * 0.5));
};
};
};
if (_texture.y > -(_radius)){
while (_texture.y > -(_radius)) {
_texture.y = (_texture.y - (_texture.height * 0.5));
};
} else {
if (_texture.y < -((_texture.height - _radius))){
while (_texture.y < -((_texture.height - _radius))) {
_texture.y = (_texture.y + (_texture.height * 0.5));
};
};
};
}
override public function set y(_arg1:Number):void{
_y = _arg1;
super.y = _y;
}
public function set Texture(_arg1:Bitmap):void{
if (((!((_texture == null))) && (this.contains(_texture)))){
this.removeChild(_texture);
};
if (_arg1 != null){
_texture = _arg1;
_texture.width = ((2 * this._radius) * Math.PI);
_texture.height = ((2 * this._radius) * Math.PI);
_texture.x = (-(_arg1.width) * 0.25);
_texture.y = (-(_arg1.width) * 0.25);
_ballSprite.addChildAt(_texture, 0);
};
}
public static function MakeCueBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{
var _local6:Ball;
_local6 = new Ball(_arg1, _arg2, _arg3, (_arg1 * 1.1), 1, new ResourceManager.SmileyFaceTexture());
_local6.x = _arg4;
_local6.y = _arg5;
return (_local6);
}
public static function MakePerfectBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{
var _local6:Ball;
_local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 1, new ResourceManager.PoolballPurpleTexture());
_local6.x = _arg4;
_local6.y = _arg5;
return (_local6);
}
public static function MakeSuperBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{
var _local6:Ball;
_local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 1.25, new ResourceManager.PoolballRedTexture());
_local6.x = _arg4;
_local6.y = _arg5;
return (_local6);
}
public static function MakeNormalBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{
var _local6:Ball;
_local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 0.75, new ResourceManager.PoolballBlueTexture());
_local6.x = _arg4;
_local6.y = _arg5;
return (_local6);
}
}
}//package
Section 188
//Block (Block)
package {
import flash.display.*;
import flash.geom.*;
import mx.effects.*;
import flash.filters.*;
public class Block extends Sprite {
public var _lines:Array;
private var _fillAlpha:Number;
private var _texture:BitmapData;
private var _collideGlow:Sprite;
private var _fillColor:uint;
private var _lineColor:uint;
private var _lineAlpha:Number;
public var onTweenEnd:Function;
private var _height:Number;
public var showCollide:Function;
private var _collideTween:Tween;
public var onTweenUpdate:Function;
private var _bounce:Number;
private var _width:Number;
private var _mass:Number;
public var _sprite:Sprite;
public function Block(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:uint, _arg6:Number, _arg7:BitmapData, _arg8:Array){
var _local9:Point;
var _local10:Point;
var _local11:Line;
var _local12:int;
var _local13:int;
showCollide = function ():void{
_collideGlow.visible = true;
_collideGlow.alpha = 1;
_collideTween = new Tween(this, 1, 0, 250);
};
onTweenUpdate = function (_arg1:Number):void{
_collideGlow.alpha = _arg1;
};
onTweenEnd = function (_arg1:Number):void{
_collideGlow.visible = false;
_collideGlow.alpha = 1;
};
_mass = _arg1;
_bounce = _arg2;
_fillColor = _arg5;
_fillAlpha = _arg6;
_lineColor = _arg3;
_lineAlpha = _arg4;
_lines = new Array();
_texture = _arg7;
_arg8.reverse();
_local9 = _arg8.pop();
_local10 = _arg8.pop();
_arg8.reverse();
_local11 = new Line(_local9, _local10, _bounce);
_lines.push(_local11);
_local12 = _arg8.length;
if (((!((_arg8 == null))) && ((_local12 > 0)))){
_local13 = 0;
_local11 = new Line(_local10, _arg8[_local13], _bounce);
_lines.push(_local11);
_local13 = 1;
while (_local13 < _local12) {
_local11 = new Line(_arg8[(_local13 - 1)], _arg8[_local13], _bounce);
_lines.push(_local11);
_local13++;
};
_local11 = new Line(_arg8[(_local13 - 1)], _local9, _bounce);
_lines.push(_local11);
};
_collideGlow = this._drawGlowSprite();
_collideGlow.visible = false;
addChild(_collideGlow);
_sprite = this._drawSprite();
addChild(_sprite);
super();
}
public function _drawGlowSprite():Sprite{
var _local1:Sprite;
var _local2:Graphics;
var _local3:Line;
var _local4:Number;
var _local5:Number;
var _local6:Line;
var _local7:Array;
_local1 = new Sprite();
_local2 = _local1.graphics;
_local4 = Number.MAX_VALUE;
_local5 = Number.MAX_VALUE;
for each (_local3 in _lines) {
_local4 = Math.min(_local4, _local3.p1.x, _local3.p2.x);
_local5 = Math.min(_local5, _local3.p1.y, _local3.p2.y);
};
_local2.clear();
_local2.lineStyle(1, this._lineColor, _lineAlpha);
_local6 = _lines[0].Offset(-(_local4), -(_local5));
_local2.moveTo(_local6.p1.x, _local6.p1.y);
for each (_local3 in _lines) {
_local6 = _local3.Offset(-(_local4), -(_local5));
_local2.lineTo(_local6.p2.x, _local6.p2.y);
};
_local2.endFill();
_local1.x = _local4;
_local1.y = _local5;
_local7 = _local1.filters;
_local7.push(new GlowFilter(_lineColor, 1, 10, 10, 3, 1, false, true));
_local1.filters = _local7;
return (_local1);
}
override public function get x():Number{
return (_sprite.x);
}
override public function get y():Number{
return (_sprite.y);
}
public function _drawSprite():Sprite{
var _local1:Sprite;
var _local2:Graphics;
var _local3:Line;
var _local4:Number;
var _local5:Number;
var _local6:Line;
var _local7:Array;
_local1 = new Sprite();
_local2 = _local1.graphics;
_local4 = Number.MAX_VALUE;
_local5 = Number.MAX_VALUE;
for each (_local3 in _lines) {
_local4 = Math.min(_local4, _local3.p1.x, _local3.p2.x);
_local5 = Math.min(_local5, _local3.p1.y, _local3.p2.y);
};
_local2.clear();
if (_texture != null){
_local2.beginBitmapFill(_texture);
} else {
_local2.beginFill(_fillColor, _fillAlpha);
};
_local2.lineStyle(1, this._lineColor, _lineAlpha);
_local6 = _lines[0].Offset(-(_local4), -(_local5));
_local2.moveTo(_local6.p1.x, _local6.p1.y);
for each (_local3 in _lines) {
_local6 = _local3.Offset(-(_local4), -(_local5));
_local2.lineTo(_local6.p2.x, _local6.p2.y);
};
_local2.endFill();
_local1.x = _local4;
_local1.y = _local5;
_local7 = _local1.filters;
if (_texture == null){
_local7.push(new GradientGlowFilter(0, 0, new Array(0, _lineColor, _fillColor, _lineColor), new Array(0, _lineAlpha, _fillAlpha, _lineAlpha), new Array(0, 180, 200, 254), 20, 20, 1, 2, "inner"));
} else {
_local7.push(new BevelFilter(4, 135, 0xFFFFFF, 1, 0, 1, 6, 6));
};
_local7.push(new DropShadowFilter(4, 135, 0, 0.75));
_local7.push(new DropShadowFilter(6, 45, 0, 1, 10, 10, 1, 1, true));
_local1.filters = _local7;
return (_local1);
}
override public function set x(_arg1:Number):void{
var _local2:Line;
for each (_local2 in _lines) {
_local2.Offset(_arg1, y);
};
_sprite.x = _arg1;
}
override public function set y(_arg1:Number):void{
var _local2:Line;
for each (_local2 in _lines) {
_local2.Offset(x, _arg1);
};
_sprite.y = _arg1;
}
public static function MakeNormalBounceBlock(... _args):Block{
var _local2:Block;
_local2 = new Block(10000, 0.75, 153, 1, 51, 0.85, (new ResourceManager.WoodBlue() as Bitmap).bitmapData, _args);
return (_local2);
}
public static function MakeNormalBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{
var _local5:Point;
var _local6:Point;
var _local7:Block;
_local5 = Vector.fromPoints(_arg2, _arg1).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2);
_local6 = Vector.fromPoints(_arg1, _arg2).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1);
_local7 = Block.MakeNormalBounceBlock(_arg1, _arg2, _local5, _local6);
return (_local7);
}
public static function MakePerfectBounceBlock(... _args):Block{
var _local2:Block;
_local2 = new Block(10000, 1, 0x770077, 1, 0x220022, 0.85, (new ResourceManager.WoodPurple() as Bitmap).bitmapData, _args);
return (_local2);
}
public static function MakeSuperBounceBlock(... _args):Block{
var _local2:Block;
_local2 = new Block(10000, 1.25, 0x990000, 1, 0x330000, 0.85, (new ResourceManager.WoodRed() as Bitmap).bitmapData, _args);
return (_local2);
}
public static function MakePerfectBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{
var _local5:Point;
var _local6:Point;
var _local7:Block;
_local5 = Vector.fromPoints(_arg2, _arg1).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2);
_local6 = Vector.fromPoints(_arg1, _arg2).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1);
_local7 = Block.MakePerfectBounceBlock(_arg1, _arg2, _local5, _local6);
return (_local7);
}
public static function MakeSuperBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{
var _local5:Point;
var _local6:Point;
var _local7:Block;
_local5 = Vector.fromPoints(_arg2, _arg1).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2);
_local6 = Vector.fromPoints(_arg1, _arg2).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1);
_local7 = Block.MakeSuperBounceBlock(_arg1, _arg2, _local5, _local6);
return (_local7);
}
}
}//package
Section 189
//Bumper (Bumper)
package {
import flash.display.*;
import mx.effects.*;
import flash.filters.*;
public class Bumper extends Sprite {
private var _fillAlpha:Number;
private var _collideGlow:Sprite;
private var _fillColor:uint;
private var _lineColor:uint;
private var _lineAlpha:Number;
public var onTweenEnd:Function;
public var showCollide:Function;
private var _collideTween:Tween;
public var _radius:Number;
public var onTweenUpdate:Function;
private var _bounce:Number;
private var _mass:Number;
private var _sprite:Sprite;
public function Bumper(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:Number, _arg8:uint, _arg9:Number){
showCollide = function ():void{
_collideGlow.alpha = 1;
_collideTween = new Tween(this, 1, 0, 250);
};
onTweenUpdate = function (_arg1:Number):void{
_collideGlow.alpha = _arg1;
};
onTweenEnd = function (_arg1:Number):void{
_collideGlow.alpha = 0;
};
_radius = _arg3;
_fillColor = _arg8;
_fillAlpha = _arg9;
_lineColor = _arg6;
_lineAlpha = _arg7;
_mass = _arg4;
_bounce = _arg5;
_collideGlow = this._drawGlowSprite();
_collideGlow.alpha = 0;
addChild(_collideGlow);
_sprite = this._drawSprite();
addChild(_sprite);
this.x = _arg1;
this.y = _arg2;
super();
}
public function _drawGlowSprite():Sprite{
var _local1:Sprite;
var _local2:Graphics;
var _local3:Array;
_local1 = new Sprite();
_local2 = _local1.graphics;
_local2.clear();
_local2.beginFill(_fillColor, _fillAlpha);
_local2.lineStyle(1, this._lineColor, _lineAlpha);
_local2.drawCircle(0, 0, _radius);
_local2.drawCircle(0, 0, (_radius * 0.5));
_local2.endFill();
_local3 = _local1.filters;
_local3.push(new GlowFilter(_lineColor, 1, 10, 10, 3, 1, false, true));
_local1.filters = _local3;
return (_local1);
}
override public function get x():Number{
return (_sprite.x);
}
override public function get y():Number{
return (_sprite.y);
}
public function _drawSprite():Sprite{
var _local1:Sprite;
var _local2:Graphics;
var _local3:Array;
_local1 = new Sprite();
_local2 = _local1.graphics;
_local2.clear();
_local2.beginFill(_fillColor, _fillAlpha);
_local2.lineStyle(1, this._lineColor, _lineAlpha);
_local2.drawCircle(0, 0, _radius);
_local2.drawCircle(0, 0, (_radius * 0.5));
_local2.endFill();
_local3 = _local1.filters;
_local3.push(new GradientGlowFilter(0, 0, new Array(0, _lineColor, _fillColor, _lineColor), new Array(0, _lineAlpha, _fillAlpha, _lineAlpha), new Array(0, 180, 200, 254), 20, 20, 1, 2, "inner"));
_local3.push(new DropShadowFilter(4, 135));
_local3.push(new DropShadowFilter(6, 45, 0, 1, 10, 10, 1, 1, true));
_local1.filters = _local3;
return (_local1);
}
override public function set x(_arg1:Number):void{
_sprite.x = _arg1;
_collideGlow.x = _arg1;
}
override public function set y(_arg1:Number):void{
_sprite.y = _arg1;
_collideGlow.y = _arg1;
}
public static function MakeSuperBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{
var _local4:Bumper;
_local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 1.25, 0x990000, 1, 0x330000, 0.85);
return (_local4);
}
public static function MakePerfectBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{
var _local4:Bumper;
_local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 1, 0x770077, 1, 0x220022, 0.85);
return (_local4);
}
public static function MakeNormalBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{
var _local4:Bumper;
_local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 0.5, 153, 1, 51, 0.85);
return (_local4);
}
}
}//package
Section 190
//ContinueCourseDialog (ContinueCourseDialog)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import mx.effects.easing.*;
import flash.filters.*;
public class ContinueCourseDialog extends Sprite {
public var _startOverCallback:Function;
public var _titleField:TextField;
public var _continueCallback:Function;
private var _tweenDoneCallback:Function;
public var _parent:DisplayObjectContainer;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
public var _startOverButton:GameButton;
private var _showTween:Tween;
public var _continueButton:GameButton;
public function ContinueCourseDialog(){
var _local1:Array;
super();
this._backScreen = new Sprite();
this._backScreen.graphics.beginFill(0, 0.5);
this._backScreen.graphics.drawRect(0, 0, 640, 480);
this._backScreen.graphics.endFill();
this.addChild(_backScreen);
this._backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(500, 300, 30, 0, 0xAA00AA, 0.75));
this._titleField = new TextField();
this._titleField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._titleField.embedFonts = true;
this._titleField.antiAliasType = AntiAliasType.ADVANCED;
this._titleField.selectable = false;
this._titleField.mouseEnabled = false;
this._titleField.text = "";
this._titleField.alpha = 1;
this._titleField.width = 500;
this._titleField.height = 120;
this._titleField.y = 25;
_local1 = this._titleField.filters;
_local1.push(new GlowFilter(0xFFFFFF, 0.75, 20, 20, 3, 1, true));
_local1.push(new DropShadowFilter(2, 167, 0, 0.75, 4, 4, 1, 1, true));
this._titleField.filters = _local1;
this._continueButton = new GameButton("Continue", null, 400, 60, onContinueClick);
this._continueButton.x = 50;
this._continueButton.y = 140;
this._continueButton.enabled = false;
this._backDrop.addChild(this._continueButton);
this._startOverButton = new GameButton("Start Over", null, 300, 40, onStartOverClick);
this._startOverButton.x = 100;
this._startOverButton.y = 230;
this._startOverButton.enabled = false;
this._backDrop.addChild(this._startOverButton);
this._backDrop.addChild(this._titleField);
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(this._backDrop);
}
public function HideDialog():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenEnd(_arg1:Number):void{
_backDrop.y = _arg1;
this._continueButton.enabled = true;
this._startOverButton.enabled = true;
}
public function onContinueClick(_arg1:MouseEvent):void{
if (this._continueCallback != null){
this._continueCallback(_arg1);
};
this._parent.removeChild(this);
}
public function onStartOverClick(_arg1:MouseEvent):void{
if (this._startOverCallback != null){
this._startOverCallback(_arg1);
};
this._parent.removeChild(this);
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:Function, _arg3:Function):ContinueCourseDialog{
var _local4:ContinueCourseDialog;
_local4 = new (ContinueCourseDialog);
_local4._titleField.text = "Saved game found\nfor this course!";
_local4._continueCallback = _arg2;
_local4._startOverCallback = _arg3;
_local4._parent = _arg1;
_local4._parent.addChild(_local4);
_local4._backDrop.y = -(_local4._backDrop.height);
_local4._backDrop.visible = true;
_local4._showTween = new Tween(_local4, -(_local4._backDrop.height), ((480 - _local4._backDrop.height) * 0.5), 500);
_local4._showTween.easingFunction = Bounce.easeOut;
return (_local4);
}
}
}//package
Section 191
//core_properties (core_properties)
package {
import mx.resources.*;
public class core_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["multipleChildSets_ClassAndInstance"] = "Multiple sets of visual children have been specified for this component (component definition and component instance).";
_local1["multipleChildSets_ClassAndSubclass"] = "Multiple sets of visual children have been specified for this component (base component definition and derived component definition).";
_local1["notExecuting"] = "Repeater is not executing.";
_local1["truncationIndicator"] = "...";
_local1["stateUndefined"] = "Undefined state '{0}'.";
_local1["scrollDirection"] = "Unknown scroll direction '{0}'.";
_local1["viewSource"] = "View Source";
return (_local1);
}
}
}//package
Section 192
//CourseOverDialog (CourseOverDialog)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import flash.net.*;
import flash.media.*;
import mx.effects.easing.*;
import flash.filters.*;
public class CourseOverDialog extends Sprite {
public var _levelShotsUnderParLabel:TextField;
public var _levelUnderParBonusLabel:TextField;
public var _levelRicochetBonusLabel:TextField;
public var _playMoreGamesButton:GameButton;
public var _titleField:TextField;
public var _levelMultiBallBonusLabel:TextField;
public var _submitButton:GameButton;
public var _cheerSoundChannel:SoundChannel;
public var _levelNumberLabel:TextField;
private var _lastUsername:SharedObject;
public var _levelParLabel:TextField;
private var _tweenDoneCallback:Function;
public var _playAgainCallback:Function;
public var _playAgainButton:GameButton;
public var _levelTotalScoreLabel:TextField;
public var _totalScoreLabel:TextField;
public var _totalScoreField:TextField;
public var _submitCallback:Function;
public var _submitPlayerName:TextField;
public var _parent:DisplayObjectContainer;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
public var _levelGoalScoreLabel:TextField;
private var _showTween:Tween;
public function CourseOverDialog(){
var _local1:Array;
super();
this._lastUsername = SharedObject.getLocal("lastUsername");
if (this._lastUsername.data.lastUser == null){
_lastUsername.data.lastUser = "Anonymous";
_lastUsername.flush();
};
this._backScreen = new Sprite();
this._backScreen.graphics.beginFill(0, 0.5);
this._backScreen.graphics.drawRect(0, 0, 640, 480);
this._backScreen.graphics.endFill();
this.addChild(_backScreen);
this._backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 0, 0x8800AA, 0.85));
this._titleField = new TextField();
this._titleField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._titleField.embedFonts = true;
this._titleField.antiAliasType = AntiAliasType.ADVANCED;
this._titleField.selectable = false;
this._titleField.mouseEnabled = false;
this._titleField.text = "You Win!";
this._titleField.alpha = 0.85;
this._titleField.width = 620;
this._titleField.height = 120;
this._titleField.y = 25;
this._levelNumberLabel = new TextField();
this._levelNumberLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelNumberLabel.embedFonts = true;
this._levelNumberLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelNumberLabel.selectable = false;
this._levelNumberLabel.mouseEnabled = false;
this._levelNumberLabel.text = "Level Number";
this._levelNumberLabel.alpha = 0.85;
this._levelNumberLabel.width = 80;
this._levelNumberLabel.height = 45;
this._levelNumberLabel.x = 10;
this._levelNumberLabel.y = 85;
this._levelParLabel = new TextField();
this._levelParLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelParLabel.embedFonts = true;
this._levelParLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelParLabel.selectable = false;
this._levelParLabel.mouseEnabled = false;
this._levelParLabel.text = "Level Par:";
this._levelParLabel.alpha = 0.85;
this._levelParLabel.width = 80;
this._levelParLabel.height = 45;
this._levelParLabel.x = 10;
this._levelParLabel.y = 110;
this._levelShotsUnderParLabel = new TextField();
this._levelShotsUnderParLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelShotsUnderParLabel.embedFonts = true;
this._levelShotsUnderParLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelShotsUnderParLabel.selectable = false;
this._levelShotsUnderParLabel.mouseEnabled = false;
this._levelShotsUnderParLabel.text = "Shots Under:";
this._levelShotsUnderParLabel.alpha = 0.85;
this._levelShotsUnderParLabel.width = 80;
this._levelShotsUnderParLabel.height = 45;
this._levelShotsUnderParLabel.x = 10;
this._levelShotsUnderParLabel.y = 135;
this._levelUnderParBonusLabel = new TextField();
this._levelUnderParBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelUnderParBonusLabel.embedFonts = true;
this._levelUnderParBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelUnderParBonusLabel.selectable = false;
this._levelUnderParBonusLabel.mouseEnabled = false;
this._levelUnderParBonusLabel.text = "Under Bonus:";
this._levelUnderParBonusLabel.alpha = 0.85;
this._levelUnderParBonusLabel.width = 80;
this._levelUnderParBonusLabel.height = 45;
this._levelUnderParBonusLabel.x = 10;
this._levelUnderParBonusLabel.y = 160;
this._levelGoalScoreLabel = new TextField();
this._levelGoalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelGoalScoreLabel.embedFonts = true;
this._levelGoalScoreLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelGoalScoreLabel.selectable = false;
this._levelGoalScoreLabel.mouseEnabled = false;
this._levelGoalScoreLabel.text = "Goal:";
this._levelGoalScoreLabel.alpha = 0.85;
this._levelGoalScoreLabel.width = 80;
this._levelGoalScoreLabel.height = 45;
this._levelGoalScoreLabel.x = 10;
this._levelGoalScoreLabel.y = 185;
this._levelRicochetBonusLabel = new TextField();
this._levelRicochetBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelRicochetBonusLabel.embedFonts = true;
this._levelRicochetBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelRicochetBonusLabel.selectable = false;
this._levelRicochetBonusLabel.mouseEnabled = false;
this._levelRicochetBonusLabel.text = "Ricochet:";
this._levelRicochetBonusLabel.alpha = 0.85;
this._levelRicochetBonusLabel.width = 80;
this._levelRicochetBonusLabel.height = 45;
this._levelRicochetBonusLabel.x = 10;
this._levelRicochetBonusLabel.y = 210;
this._levelMultiBallBonusLabel = new TextField();
this._levelMultiBallBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelMultiBallBonusLabel.embedFonts = true;
this._levelMultiBallBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelMultiBallBonusLabel.selectable = false;
this._levelMultiBallBonusLabel.mouseEnabled = false;
this._levelMultiBallBonusLabel.text = "MultiBall:";
this._levelMultiBallBonusLabel.alpha = 0.85;
this._levelMultiBallBonusLabel.width = 80;
this._levelMultiBallBonusLabel.height = 45;
this._levelMultiBallBonusLabel.x = 10;
this._levelMultiBallBonusLabel.y = 235;
this._levelTotalScoreLabel = new TextField();
this._levelTotalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._levelTotalScoreLabel.embedFonts = true;
this._levelTotalScoreLabel.antiAliasType = AntiAliasType.ADVANCED;
this._levelTotalScoreLabel.selectable = false;
this._levelTotalScoreLabel.mouseEnabled = false;
this._levelTotalScoreLabel.text = "Level Score:";
this._levelTotalScoreLabel.alpha = 0.85;
this._levelTotalScoreLabel.width = 80;
this._levelTotalScoreLabel.height = 45;
this._levelTotalScoreLabel.x = 10;
this._levelTotalScoreLabel.y = 260;
this._totalScoreLabel = new TextField();
this._totalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 30, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._totalScoreLabel.embedFonts = true;
this._totalScoreLabel.antiAliasType = AntiAliasType.ADVANCED;
this._totalScoreLabel.selectable = false;
this._totalScoreLabel.mouseEnabled = false;
this._totalScoreLabel.text = "Total Course Score:";
this._totalScoreLabel.alpha = 0.85;
this._totalScoreLabel.width = 300;
this._totalScoreLabel.height = 45;
this._totalScoreLabel.x = 25;
this._totalScoreLabel.y = 305;
this._totalScoreField = new TextField();
this._totalScoreField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._totalScoreField.embedFonts = true;
this._totalScoreField.antiAliasType = AntiAliasType.ADVANCED;
this._totalScoreField.selectable = false;
this._totalScoreField.mouseEnabled = false;
this._totalScoreField.text = "0";
this._totalScoreField.alpha = 0.85;
this._totalScoreField.width = 285;
this._totalScoreField.height = 45;
this._totalScoreField.x = 335;
this._totalScoreField.y = 305;
this._submitPlayerName = new TextField();
this._submitPlayerName.defaultTextFormat = new TextFormat("Abbess", 25, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._submitPlayerName.embedFonts = true;
this._submitPlayerName.antiAliasType = AntiAliasType.ADVANCED;
this._submitPlayerName.selectable = true;
this._submitPlayerName.type = TextFieldType.INPUT;
this._submitPlayerName.background = true;
this._submitPlayerName.backgroundColor = 0x550055;
this._submitPlayerName.border = true;
this._submitPlayerName.borderColor = 0xFFFFFF;
this._submitPlayerName.maxChars = 64;
this._submitPlayerName.restrict = "a-zA-Z0-9_ ";
this._submitPlayerName.text = _lastUsername.data.lastUser;
this._submitPlayerName.alpha = 0.85;
this._submitPlayerName.width = 200;
this._submitPlayerName.height = 30;
this._submitPlayerName.x = 335;
this._submitPlayerName.y = 365;
this._backDrop.addChild(this._submitPlayerName);
_local1 = this._titleField.filters;
_local1.push(new DropShadowFilter(1, 167, 0, 0.75, 4, 4, 1, 1, true));
this._titleField.filters = _local1;
_local1 = this._totalScoreLabel.filters;
_local1.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._totalScoreLabel.filters = _local1;
_local1 = this._totalScoreField.filters;
_local1.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._totalScoreField.filters = _local1;
this._playMoreGamesButton = new GameButton("Play More Games", null, 200, 30, onPlayMoreGamesClick);
this._playMoreGamesButton.x = 85;
this._playMoreGamesButton.y = 365;
this._playMoreGamesButton.enabled = false;
this._backDrop.addChild(this._playMoreGamesButton);
this._playAgainButton = new GameButton("Play Again", null, 200, 30, onPlayAgainClick);
this._playAgainButton.x = 85;
this._playAgainButton.y = 400;
this._playAgainButton.enabled = false;
this._backDrop.addChild(this._playAgainButton);
this._submitButton = new GameButton("Submit Score", null, 200, 30, onSubmitClick);
this._submitButton.x = 335;
this._submitButton.y = 400;
this._submitButton.enabled = false;
this._backDrop.addChild(this._submitButton);
this._backDrop.addChild(this._titleField);
this._backDrop.addChild(this._totalScoreLabel);
this._backDrop.addChild(this._totalScoreField);
this._backDrop.addChild(this._levelNumberLabel);
this._backDrop.addChild(this._levelParLabel);
this._backDrop.addChild(this._levelShotsUnderParLabel);
this._backDrop.addChild(this._levelUnderParBonusLabel);
this._backDrop.addChild(this._levelGoalScoreLabel);
this._backDrop.addChild(this._levelRicochetBonusLabel);
this._backDrop.addChild(this._levelMultiBallBonusLabel);
this._backDrop.addChild(this._levelTotalScoreLabel);
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(this._backDrop);
}
public function onPlayAgainClick(_arg1:MouseEvent):void{
if (_cheerSoundChannel != null){
_cheerSoundChannel.stop();
};
if (this._playAgainCallback != null){
this._playAgainCallback(_arg1);
};
}
public function onPlayMoreGamesClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "85e49501");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=courseover");
navigateToURL(_local2, "_blank");
}
public function onTweenEnd(_arg1:Number):void{
_backDrop.y = _arg1;
this._playAgainButton.enabled = true;
this._submitButton.enabled = true;
this._playMoreGamesButton.enabled = true;
}
public function HideDialog():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public function onSubmitClick(_arg1:MouseEvent):void{
_lastUsername.data.lastUser = this._submitPlayerName.text;
_lastUsername.flush();
if (this._submitCallback != null){
this._submitCallback(_arg1);
};
}
public static function createScoreCell(_arg1:LevelData, _arg2:int):Sprite{
var _local3:Sprite;
var _local4:TextField;
var _local5:TextField;
var _local6:TextField;
var _local7:TextField;
var _local8:TextField;
var _local9:TextField;
var _local10:TextField;
var _local11:TextField;
var _local12:TextFormat;
_local3 = new Sprite();
_local3.graphics.beginFill(102, 0.25);
_local3.graphics.drawRect(0, 0, 50, 200);
_local3.graphics.endFill();
_local3.graphics.lineStyle(1, 0xFFFFFF, 0.5);
_local3.graphics.drawRect(0, 0, 50, 25);
_local3.graphics.drawRect(0, 25, 50, 25);
_local3.graphics.drawRect(0, 50, 50, 25);
_local3.graphics.drawRect(0, 75, 50, 25);
_local3.graphics.drawRect(0, 100, 50, 25);
_local3.graphics.drawRect(0, 125, 50, 25);
_local3.graphics.drawRect(0, 150, 50, 25);
_local3.graphics.drawRect(0, 175, 50, 25);
_local4 = new TextField();
_local5 = new TextField();
_local6 = new TextField();
_local7 = new TextField();
_local8 = new TextField();
_local9 = new TextField();
_local10 = new TextField();
_local11 = new TextField();
setupCellFields(_local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11);
_local12 = _local4.defaultTextFormat;
_local12.color = 0x6600CC;
_local12.size = 14;
_local4.defaultTextFormat = _local12;
_local12 = _local5.defaultTextFormat;
_local12.color = 0xCCCCCC;
_local12.size = 10;
_local5.defaultTextFormat = _local12;
if ((_arg1._levelShotPar - _arg1._levelShotCounter) < 0){
_local12 = _local7.defaultTextFormat;
_local12.color = 0xEE0000;
_local7.defaultTextFormat = _local12;
_local12 = _local8.defaultTextFormat;
_local12.color = 0xEE0000;
_local8.defaultTextFormat = _local12;
};
_local12 = _local11.defaultTextFormat;
_local12.color = 0xFFFFFF;
_local12.size = 12;
_local11.defaultTextFormat = _local12;
_local4.text = _arg2.toString();
_local5.text = _arg1._levelShotPar.toString();
_local6.text = _arg1._levelGoalScore.toString();
_local7.text = (_arg1._levelShotPar - _arg1._levelShotCounter).toString();
_local8.text = _arg1._levelUnderParBonus.toString();
_local9.text = _arg1._levelRicochetBonus.toString();
_local10.text = _arg1._levelMultiBallBonus.toString();
_local11.text = _arg1.TotalScore().toString();
_local4.y = 6;
_local5.y = 31;
_local7.y = 56;
_local8.y = 81;
_local6.y = 106;
_local9.y = 131;
_local10.y = 156;
_local11.y = 181;
_local3.addChild(_local4);
_local3.addChild(_local5);
_local3.addChild(_local6);
_local3.addChild(_local7);
_local3.addChild(_local8);
_local3.addChild(_local9);
_local3.addChild(_local10);
_local3.addChild(_local11);
return (_local3);
}
public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:String, _arg3:Array, _arg4:Function, _arg5:Function):CourseOverDialog{
var _local6:CourseOverDialog;
var _local7:int;
var _local8:Sprite;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:int;
_local6 = new (CourseOverDialog);
_local6._parent = _arg1;
_local6._parent.addChild(_local6);
_local6._titleField.text = _arg2;
_local7 = 0;
_local9 = 110;
_local10 = 79;
_local11 = 50;
_local12 = 0;
_local13 = 0;
while (_local13 < _arg3.length) {
_local7 = (_local7 + _arg3[_local13].TotalScore());
_local8 = CourseOverDialog.createScoreCell(_arg3[_local13], (_local13 + 1));
_local8.x = _local9;
_local8.y = _local10;
_local6._backDrop.addChild(_local8);
_local9 = (_local9 + _local11);
_local13++;
};
_local6._totalScoreField.text = _local7.toString();
_local6._playAgainCallback = _arg4;
_local6._submitCallback = _arg5;
_local6._backDrop.y = -(_local6._backDrop.height);
_local6._backDrop.visible = true;
_local6._showTween = new Tween(_local6, -(_local6._backDrop.height), ((480 - _local6._backDrop.height) * 0.5), 1000);
_local6._showTween.easingFunction = Bounce.easeOut;
_local6._cheerSoundChannel = SoundManager.playCheer();
_local6._submitPlayerName.setSelection(0, 64);
_local6.stage.focus = _local6._submitPlayerName;
return (_local6);
}
public static function setupCellFields(... _args):void{
var _local2:TextField;
for each (_local2 in _args) {
_local2.defaultTextFormat = new TextFormat("Abbess", 11, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.CENTER);
_local2.embedFonts = true;
_local2.antiAliasType = AntiAliasType.ADVANCED;
_local2.selectable = false;
_local2.mouseEnabled = false;
_local2.tabEnabled = false;
_local2.alpha = 0.85;
_local2.width = 50;
_local2.height = 12;
_local2.text = "0";
};
}
}
}//package
Section 193
//CreditsScreen (CreditsScreen)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import mx.effects.easing.*;
public class CreditsScreen extends Sprite {
public var _CreditsText:TextField;
public var _AuthorEmailURL:TextField;
public var _emailFormat:TextFormat;
private var _tweenDoneCallback:Function;
public var _AuthorSiteURL:TextField;
public var _backButton:GameButton;
public var _creditSoundLinkName:TextFormat;
public var _creditName:TextFormat;
public var _creditHeader:TextFormat;
public var _parent:GameMenuScreen;
public var _gameSiteFormat:TextFormat;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
private var _showTween:Tween;
public function CreditsScreen(_arg1:GameMenuScreen){
_gameSiteFormat = new TextFormat("Verdana", 20, 0xFF, null, null, null, "http://www.headmeatgames.com", "_blank", TextFormatAlign.CENTER);
_emailFormat = new TextFormat("Verdana", 20, 0xFF, null, null, null, "mailto:theman@headmeatgames.com", "_blank", TextFormatAlign.CENTER);
_creditHeader = new TextFormat("Abbess", 25, 16755455, null, null, null, null, null, TextFormatAlign.CENTER);
_creditName = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
_creditSoundLinkName = new TextFormat("Abbess", 20, 0xFF, null, null, null, "http://www.8baal.net", "_blank", TextFormatAlign.CENTER);
super();
_parent = _arg1;
_backScreen = new Sprite();
_backScreen.graphics.beginFill(0, 0.75);
_backScreen.graphics.drawRect(0, 0, 640, 480);
_backScreen.graphics.endFill();
addChild(_backScreen);
_backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 0, 0x8800AA, 0.85));
_CreditsText = new TextField();
_CreditsText.defaultTextFormat = this._creditHeader;
_CreditsText.embedFonts = true;
_CreditsText.antiAliasType = AntiAliasType.ADVANCED;
_CreditsText.tabEnabled = false;
_CreditsText.width = 620;
_CreditsText.height = 320;
_CreditsText.x = 0;
_CreditsText.y = 30;
_CreditsText.text = (((((((("Game Design & Programming:\n" + "Joe Striedl\n\n") + "Game Art & Sound Effects:\n") + "Joe Striedl\n\n") + "Snazzy Music:\n") + "Eli Peters\n\n") + "Hey Flash Portals!\n") + "Interested in licensing a custom copy of this game?\n") + "Contact me at:\n");
_CreditsText.setTextFormat(this._creditName, 27, 38);
_CreditsText.setTextFormat(this._creditName, 66, 77);
_CreditsText.setTextFormat(this._creditSoundLinkName, 93, 103);
_CreditsText.setTextFormat(this._creditName, 124, 190);
_backDrop.addChild(_CreditsText);
_AuthorEmailURL = new TextField();
_AuthorEmailURL.defaultTextFormat = this._emailFormat;
_AuthorEmailURL.embedFonts = true;
_AuthorEmailURL.antiAliasType = AntiAliasType.ADVANCED;
_AuthorEmailURL.tabEnabled = false;
_AuthorEmailURL.width = 620;
_AuthorEmailURL.height = 30;
_AuthorEmailURL.x = 0;
_AuthorEmailURL.y = 335;
_AuthorEmailURL.text = "theman@headmeatgames.com";
_backDrop.addChild(_AuthorEmailURL);
_AuthorSiteURL = new TextField();
_AuthorSiteURL.defaultTextFormat = this._gameSiteFormat;
_AuthorSiteURL.embedFonts = true;
_AuthorSiteURL.antiAliasType = AntiAliasType.ADVANCED;
_AuthorSiteURL.tabEnabled = false;
_AuthorSiteURL.width = 620;
_AuthorSiteURL.height = 30;
_AuthorSiteURL.x = 0;
_AuthorSiteURL.y = 365;
_AuthorSiteURL.text = "http://www.headmeatgames.com";
_backDrop.addChild(_AuthorSiteURL);
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(_backDrop);
_backButton = new GameButton("Back", null, 400, 30, onBackClick);
_backButton.x = 120;
_backButton.y = 410;
_backDrop.addChild(_backButton);
}
public function HideScreen():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenEnd(_arg1:Number):void{
_showTween = null;
_backDrop.y = _arg1;
this._backButton.enabled = true;
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public function onBackClick(_arg1:MouseEvent):void{
HideScreen();
}
public static function ShowScreen(_arg1:GameMenuScreen):CreditsScreen{
var _local2:CreditsScreen;
_local2 = new CreditsScreen(_arg1);
_local2._parent = _arg1;
_local2._parent.addChild(_local2);
_local2._backButton.enabled = false;
_local2._backDrop.y = -(_local2.height);
_local2._backDrop.visible = true;
_local2._showTween = new Tween(_local2, -(_local2._backDrop.height), ((480 - _local2._backDrop.height) * 0.5), 500);
_local2._showTween.easingFunction = Bounce.easeOut;
return (_local2);
}
}
}//package
Section 194
//DisplayConverter (DisplayConverter)
package {
import flash.display.*;
public class DisplayConverter {
public function DisplayConverter(){
trace("DisplayConverter is a static class and should not be instantiated");
}
public static function spriteToBitmap(_arg1:Sprite, _arg2:Boolean=false, _arg3:Number=1, _arg4:Number=0, _arg5:Number=0):Bitmap{
var _local6:BitmapData;
var _local7:Bitmap;
if (_arg4 == 0){
_arg4 = _arg1.width;
};
if (_arg5 == 0){
_arg5 = _arg1.height;
};
_local6 = new BitmapData(_arg4, _arg5, true, 0xFFFFFF);
_local6.draw(_arg1);
_local7 = new Bitmap(_local6, "auto", _arg2);
_local7.scaleX = _arg3;
_local7.scaleY = _arg3;
return (_local7);
}
public static function bitmapToSprite(_arg1:Bitmap, _arg2:Boolean=false):Sprite{
var _local3:Sprite;
_local3 = new Sprite();
_local3.addChild(new Bitmap(_arg1.bitmapData.clone(), "auto", _arg2));
return (_local3);
}
}
}//package
Section 195
//effects_properties (effects_properties)
package {
import mx.resources.*;
public class effects_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["incorrectTrigger"] = "The Zoom effect can not be triggered by a moveEffect trigger.";
_local1["incorrectSource"] = "Source property must be a Class or String.";
return (_local1);
}
}
}//package
Section 196
//FreePlaySelectionScreen (FreePlaySelectionScreen)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import mx.effects.easing.*;
import flash.filters.*;
public class FreePlaySelectionScreen extends Sprite {
public var _titleField:TextField;
public var _hardButtons:Array;
public var _easyButtons:Array;
private var _tweenDoneCallback:Function;
public var _backButton:GameButton;
public var _normalButtons:Array;
public var _descriptionField:TextField;
public var _parent:GameMenuScreen;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
private var _showTween:Tween;
public function FreePlaySelectionScreen(_arg1:GameMenuScreen){
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:GameButton;
var _local11:Sprite;
super();
_parent = _arg1;
_backScreen = new Sprite();
_backScreen.graphics.beginFill(0, 0.75);
_backScreen.graphics.drawRect(0, 0, 640, 480);
_backScreen.graphics.endFill();
addChild(_backScreen);
_backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 0, 0x8800AA, 0.85));
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(_backDrop);
this._titleField = new TextField();
this._titleField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._titleField.embedFonts = true;
this._titleField.selectable = false;
this._titleField.mouseEnabled = false;
this._titleField.text = "Pick A Level";
this._titleField.alpha = 0.85;
this._titleField.width = 620;
this._titleField.height = 55;
this._titleField.y = 20;
_local2 = this._titleField.filters;
_local2.push(new DropShadowFilter(4, 167, 0, 0.75, 4, 4, 1, 1, true));
this._titleField.filters = _local2;
_backDrop.addChild(_titleField);
this._descriptionField = new TextField();
this._descriptionField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._descriptionField.embedFonts = true;
this._descriptionField.selectable = false;
this._descriptionField.mouseEnabled = false;
this._descriptionField.text = "Play without shot limits!\n(Unlock next level by finishing below the shot limit.)";
this._descriptionField.alpha = 0.85;
this._descriptionField.width = 620;
this._descriptionField.height = 65;
this._descriptionField.y = 80;
_local2 = this._descriptionField.filters;
this._descriptionField.filters = _local2;
_backDrop.addChild(_descriptionField);
_backButton = new GameButton("Back", null, 400, 40, onBackClick);
_backButton.x = 120;
_backButton.y = 385;
_backDrop.addChild(_backButton);
_easyButtons = new Array();
_normalButtons = new Array();
_hardButtons = new Array();
_local3 = 50;
_local4 = 50;
_local5 = 45;
_local6 = 140;
_local7 = 10;
_local8 = 30;
_local9 = 0;
_local9 = 0;
while (_local9 < _parent._levels["easy"].length) {
_local10 = new GameButton("", null, _local3, _local4, onPickLevelClick, null, null, _parent._levels["easy"][_local9]._levelPreview);
_local10.difficulty = "easy";
_local10.index = _local9;
_local10.x = ((_local5 + (_local9 * _local3)) + (_local9 * _local7));
_local10.y = _local6;
_easyButtons.push(_local10);
_backDrop.addChild(_local10);
_local9++;
};
_local11 = new Sprite();
_local11.graphics.beginFill(204, 0.5);
_local11.graphics.drawRoundRect(0, 0, (_local9 * (_local3 + _local7)), (_local4 + (_local8 * 0.5)), 10, 10);
_local11.graphics.endFill();
_local11.x = (_local5 - (_local7 * 0.5));
_local11.y = (_local6 - (_local8 * 0.25));
_backDrop.addChildAt(_local11, 1);
_local6 = (_local6 + (_local8 + _local4));
_local9 = 0;
while (_local9 < _parent._levels["normal"].length) {
_local10 = new GameButton("", null, _local3, _local4, onPickLevelClick, null, null, _parent._levels["normal"][_local9]._levelPreview);
_local10.difficulty = "normal";
_local10.index = _local9;
_local10.x = ((_local5 + (_local9 * _local3)) + (_local9 * _local7));
_local10.y = _local6;
_normalButtons.push(_local10);
_backDrop.addChild(_local10);
_local9++;
};
_local11 = new Sprite();
_local11.graphics.beginFill(0xCCCC00, 0.5);
_local11.graphics.drawRoundRect(0, 0, (_local9 * (_local3 + _local7)), (_local4 + (_local8 * 0.5)), 10, 10);
_local11.graphics.endFill();
_local11.x = (_local5 - (_local7 * 0.5));
_local11.y = (_local6 - (_local8 * 0.25));
_backDrop.addChildAt(_local11, 1);
_local6 = (_local6 + (_local8 + _local4));
_local9 = 0;
while (_local9 < _parent._levels["hard"].length) {
_local10 = new GameButton("", null, _local3, _local4, onPickLevelClick, null, null, _parent._levels["hard"][_local9]._levelPreview);
_local10.difficulty = "hard";
_local10.index = _local9;
_local10.x = ((_local5 + (_local9 * _local3)) + (_local9 * _local7));
_local10.y = _local6;
_hardButtons.push(_local10);
_backDrop.addChild(_local10);
_local9++;
};
_local11 = new Sprite();
_local11.graphics.beginFill(0xCC00CC, 0.5);
_local11.graphics.drawRoundRect(0, 0, (_local9 * (_local3 + _local7)), (_local4 + (_local8 * 0.5)), 10, 10);
_local11.graphics.endFill();
_local11.x = (_local5 - (_local7 * 0.5));
_local11.y = (_local6 - (_local8 * 0.25));
_backDrop.addChildAt(_local11, 1);
}
public function onPickLevelClick(_arg1:MouseEvent):void{
var _local2:int;
var _local3:String;
_local2 = _arg1.currentTarget.index;
_local3 = _arg1.currentTarget.difficulty;
this._parent.loadFreePlayLevel(_local2, _local3);
}
public function HideScreen():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenEnd(_arg1:Number):void{
var _local2:GameButton;
var _local3:int;
_showTween = null;
_backDrop.y = _arg1;
this._backButton.enabled = true;
_local3 = 0;
_local3 = 0;
while (_local3 < this._easyButtons.length) {
_local2 = this._easyButtons[_local3];
_local2.enabled = _parent._unlockedLevels.data.easyLevels[_local3];
_local3++;
};
_local3 = 0;
while (_local3 < this._normalButtons.length) {
_local2 = this._normalButtons[_local3];
_local2.enabled = _parent._unlockedLevels.data.normalLevels[_local3];
_local3++;
};
_local3 = 0;
while (_local3 < this._hardButtons.length) {
_local2 = this._hardButtons[_local3];
_local2.enabled = _parent._unlockedLevels.data.hardLevels[_local3];
_local3++;
};
}
public function onBackClick(_arg1:MouseEvent):void{
HideScreen();
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public static function ShowScreen(_arg1:GameMenuScreen):FreePlaySelectionScreen{
var _local2:FreePlaySelectionScreen;
var _local3:GameButton;
_local2 = new FreePlaySelectionScreen(_arg1);
_local2._parent = _arg1;
_local2._parent.addChild(_local2);
_local2._backButton.enabled = false;
for each (_local3 in _local2._easyButtons) {
_local3.enabled = false;
};
for each (_local3 in _local2._normalButtons) {
_local3.enabled = false;
};
for each (_local3 in _local2._hardButtons) {
_local3.enabled = false;
};
_local2._backDrop.y = -(_local2.height);
_local2._backDrop.visible = true;
_local2._showTween = new Tween(_local2, -(_local2._backDrop.height), ((480 - _local2._backDrop.height) * 0.5), 500);
_local2._showTween.easingFunction = Bounce.easeOut;
return (_local2);
}
}
}//package
Section 197
//GameButton (GameButton)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import flash.filters.*;
public dynamic class GameButton extends Sprite {
public var _label:TextField;
private var _enabled:Boolean;// = true
private var _upSound:Sound;
public var _onClickCallback:Function;
private var _downSound:Sound;
public var _hitState:Sprite;
private var _leaveSound:Sound;
private var _mouseDownInButton:Boolean;// = false
public var _icon:Bitmap;
public var _disabledState:Sprite;
public var _upState:Sprite;
public var _downState:Sprite;
public var _overState:Sprite;
private var _enterSound:Sound;
public var _onRolloutCallback:Function;
public var _onRolloverCallback:Function;
public function GameButton(_arg1:String="button", _arg2:TextFormat=null, _arg3:Number=100, _arg4:Number=40, _arg5:Function=null, _arg6:Function=null, _arg7:Function=null, _arg8:Bitmap=null){
var _local9:Graphics;
var _local10:Array;
_enabled = true;
_mouseDownInButton = false;
super();
_onClickCallback = _arg5;
_onRolloverCallback = _arg6;
_onRolloutCallback = _arg7;
_enterSound = new ResourceManager.BaseClickSound();
_leaveSound = new ResourceManager.BaseClickSound();
_downSound = new ResourceManager.BaseClickSound();
_upSound = new ResourceManager.SharpClickSound();
_upState = new Sprite();
_overState = new Sprite();
_downState = new Sprite();
_disabledState = new Sprite();
_local9 = _upState.graphics;
_local9.beginFill(0x440077);
_local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10);
_local9.endFill();
_local9.beginFill(0x660099);
_local9.drawRoundRect(7.5, 7.5, (_arg3 - 15), (_arg4 - 15), 10, 10);
_local9.drawEllipse(10, 10, (_arg3 - 20), (_arg4 - 20));
_local9.endFill();
_local9 = _overState.graphics;
_local9.beginFill(0xAA00DD);
_local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10);
_local9.endFill();
_local9.beginFill(0x8800BB);
_local9.drawRoundRect(5, 5, (_arg3 - 10), (_arg4 - 10), 10, 10);
_local9.drawEllipse(10, 10, (_arg3 - 20), (_arg4 - 20));
_local9.endFill();
_local9 = _downState.graphics;
_local9.beginFill(0x220055);
_local9.drawRoundRect(-3, 3, _arg3, _arg4, 10, 10);
_local9.endFill();
_local9.beginFill(0x440077);
_local9.drawRoundRect(2, 8, (_arg3 - 10), (_arg4 - 10), 10, 10);
_local9.drawEllipse(7, 13, (_arg3 - 20), (_arg4 - 20));
_local9.endFill();
_local9 = _disabledState.graphics;
_local9.beginFill(0, 0.5);
_local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10);
_local9.endFill();
_local10 = _upState.filters;
_local10.push(new DropShadowFilter(4, 135));
_local10.push(new BevelFilter(4, 135));
_upState.filters = _local10;
_local10 = _overState.filters;
_local10.push(new DropShadowFilter(4, 135));
_local10.push(new BevelFilter(4, 135));
_overState.filters = _local10;
_local10 = _downState.filters;
_local10.push(new DropShadowFilter(0.25, 135));
_local10.push(new BevelFilter(4, 135));
_downState.filters = _local10;
this.addChild(_upState);
this.addChild(_overState);
this.addChild(_downState);
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
this.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_label = new TextField();
_label.selectable = false;
_label.tabEnabled = false;
_label.mouseEnabled = false;
if (_arg2 == null){
_label.defaultTextFormat = new TextFormat("Abbess", (_arg4 - 10), 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
} else {
_label.defaultTextFormat = _arg2;
};
_label.embedFonts = true;
_label.antiAliasType = AntiAliasType.ADVANCED;
_label.y = 5;
_label.width = _arg3;
_label.height = _arg4;
_label.text = _arg1;
_local10 = _label.filters;
_local10.push(new BevelFilter(1, 135));
_label.filters = _local10;
this.addChild(_label);
_icon = _arg8;
if (_icon != null){
_icon.x = ((_arg3 - _icon.width) * 0.5);
_icon.y = ((_arg4 - _icon.height) * 0.5);
this.addChild(_icon);
};
_hitState = new Sprite();
_hitState.graphics.beginFill(0);
_hitState.graphics.drawRoundRect(0, 0, _arg3, _arg4, 10, 10);
_hitState.graphics.endFill();
_hitState.alpha = 0;
this.hitArea = _hitState;
this.addChild(_hitState);
this.addChild(_disabledState);
_upState.visible = true;
_downState.visible = false;
_overState.visible = false;
_disabledState.visible = false;
}
public function get enabled():Boolean{
return (this._enabled);
}
private function onMouseUp(_arg1:MouseEvent):void{
if (this.enabled){
_upState.visible = true;
_downState.visible = false;
_overState.visible = false;
if (_mouseDownInButton){
this._mouseDownInButton = false;
_label.x = (_label.x + 3);
_label.y = (_label.y - 3);
if (_icon != null){
_icon.x = (_icon.x + 3);
_icon.y = (_icon.y - 3);
};
if (_onClickCallback != null){
_onClickCallback(_arg1);
};
};
if (_upSound != null){
_upSound.play(0, 0, SoundManager._globalSoundEffectTransform);
};
};
}
private function onMouseOut(_arg1:MouseEvent):void{
if (this.enabled){
if (_mouseDownInButton){
_mouseDownInButton = false;
_label.x = (_label.x + 3);
_label.y = (_label.y - 3);
if (_icon != null){
_icon.x = (_icon.x + 3);
_icon.y = (_icon.y - 3);
};
};
_upState.visible = true;
_downState.visible = false;
_overState.visible = false;
if (_onRolloutCallback != null){
_onRolloutCallback(_arg1);
};
if (_leaveSound != null){
_leaveSound.play(0, 0, SoundManager._globalSoundEffectTransform);
};
};
}
public function set enabled(_arg1:Boolean):void{
this._enabled = _arg1;
this._disabledState.visible = !(_arg1);
}
private function onMouseDown(_arg1:MouseEvent):void{
if (this.enabled){
_mouseDownInButton = true;
_downState.visible = true;
_upState.visible = false;
_overState.visible = false;
_label.x = (_label.x - 3);
_label.y = (_label.y + 3);
if (_icon != null){
_icon.x = (_icon.x - 3);
_icon.y = (_icon.y + 3);
};
if (_downSound != null){
_downSound.play(0, 0, SoundManager._globalSoundEffectTransform);
};
};
}
private function onMouseOver(_arg1:MouseEvent):void{
if (this.enabled){
if (_mouseDownInButton == true){
_downState.visible = true;
_upState.visible = false;
_overState.visible = false;
} else {
_overState.visible = true;
_downState.visible = false;
_upState.visible = false;
};
if (_onRolloverCallback != null){
_onRolloverCallback(_arg1);
};
if (_enterSound != null){
_enterSound.play(0, 0, SoundManager._globalSoundEffectTransform);
};
};
}
}
}//package
Section 198
//GameMenuScreen (GameMenuScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.net.*;
import flash.media.*;
import flash.filters.*;
public dynamic class GameMenuScreen extends MovieClip {
public var _gameTitle:TextField;
public var _selectToggleMusic:GameButton;
public var _currentPreview:Bitmap;
public var _copyright:TextField;
public var _freeplayScreen:FreePlaySelectionScreen;
public var _unlockedLevels:SharedObject;
public var _backTexture:Bitmap;
public var _levels:Array;
public var _cod:CourseOverDialog;
public var _selectHowToPlay:GameButton;
public var _currentMode:String;// = "easy"
public var _selectToggleSound:GameButton;
public var _selectFreePlay:GameButton;
public var _selectEasyCourse:GameButton;
public var _selectPlayMoreGames:MovieClip;
public var _levelGenFunctions:Array;
public var _selectHardCourse:GameButton;
public var _levelScoreSaves:SharedObject;
public var _currentLevelIndex:int;// = 0
public var _MassleGameObject:Massle;
public var _selectNormalCourse:GameButton;
public var _creditsScreen:CreditsScreen;
public var _howToPlayScreen:HowToPlayScreen;
public var _backDrop:Sprite;
public var _selectCredits:GameButton;
public function GameMenuScreen(){
_currentMode = "easy";
_currentLevelIndex = 0;
super();
}
public function onFreePlayClick(_arg1:MouseEvent):void{
this._freeplayScreen = FreePlaySelectionScreen.ShowScreen(this);
}
public function loadNextLevel():void{
var _local1:Boolean;
_MassleGameObject._inFreePlayMode = false;
_currentLevelIndex++;
_local1 = (_currentLevelIndex < this._levels[_currentMode].length);
if (_local1){
_MassleGameObject.UnloadLevel();
if (!stage.contains(_MassleGameObject)){
stage.addChild(_MassleGameObject);
};
this._levels[_currentMode][_currentLevelIndex] = this._levelGenFunctions[_currentMode][_currentLevelIndex]();
_MassleGameObject.LoadLevel(this._levels[_currentMode][_currentLevelIndex]);
} else {
_cod = CourseOverDialog.ShowDialog(_MassleGameObject, (("Finished " + _currentMode.toUpperCase()) + " Course!"), this._levels[_currentMode], onCourseOverPlayAgain, onCourseOverSubmitScore);
this.clearCourseSavedData(this._currentMode);
};
}
public function onStartOverCourse(_arg1:MouseEvent):void{
clearCourseSavedData(this._currentMode);
loadNextLevel();
}
public function checkIfCourseHasSavedData(_arg1:String):Boolean{
var _local2:Boolean;
_local2 = false;
if (_arg1 == "easy"){
_local2 = (this._levelScoreSaves.data.easyScores.lastLevelCompleted >= 0);
} else {
if (_arg1 == "normal"){
_local2 = (this._levelScoreSaves.data.normalScores.lastLevelCompleted >= 0);
} else {
if (_arg1 == "hard"){
_local2 = (this._levelScoreSaves.data.hardScores.lastLevelCompleted >= 0);
};
};
};
return (_local2);
}
public function isNextLevelUnlocked():Boolean{
var _local1:Boolean;
_local1 = false;
if ((((((this._currentMode == "easy")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.easyLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_local1 = _unlockedLevels.data.easyLevels[(this._currentLevelIndex + 1)];
} else {
if ((((((this._currentMode == "normal")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.normalLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_local1 = _unlockedLevels.data.normalLevels[(this._currentLevelIndex + 1)];
} else {
if ((((((this._currentMode == "hard")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.hardLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_local1 = _unlockedLevels.data.hardLevels[(this._currentLevelIndex + 1)];
} else {
_local1 = true;
};
};
};
return (_local1);
}
public function retryCurrentLevel():void{
if (_MassleGameObject._inFreePlayMode){
this.loadFreePlayLevel(_currentLevelIndex, _currentMode);
} else {
_currentLevelIndex--;
this.loadNextLevel();
};
}
public function onHardCourseClick(_arg1:MouseEvent):void{
this._currentMode = "hard";
this._currentLevelIndex = -1;
if (this.checkIfCourseHasSavedData(this._currentMode)){
ContinueCourseDialog.ShowDialog(this, onContinueCourse, onStartOverCourse);
} else {
onStartOverCourse(_arg1);
};
}
public function loadFreePlayLevel(_arg1:int, _arg2:String):void{
_MassleGameObject.UnloadLevel();
if (_arg1 < this._levels[_arg2].length){
_currentLevelIndex = _arg1;
_currentMode = _arg2;
if (!stage.contains(_MassleGameObject)){
stage.addChild(_MassleGameObject);
};
this._levels[_arg2][_arg1] = this._levelGenFunctions[_arg2][_arg1]();
_MassleGameObject.LoadLevel(this._levels[_arg2][_arg1]);
_MassleGameObject._inFreePlayMode = true;
} else {
if (stage.contains(_MassleGameObject)){
stage.removeChild(_MassleGameObject);
};
this._freeplayScreen.HideScreen();
_freeplayScreen = FreePlaySelectionScreen.ShowScreen(this);
};
}
public function onToggleSoundEffectsClick(_arg1:MouseEvent):void{
SoundManager._globalSoundEffectTransform.volume = ((SoundManager._globalSoundEffectTransform.volume)==0) ? 0.5 : 0;
this._selectToggleSound._label.text = ((SoundManager._globalSoundEffectTransform.volume)==0) ? "Sound Effects ON" : "Sound Effects OFF";
}
public function saveCurrentLevelScoreData():void{
if (this._currentMode == "easy"){
this._levelScoreSaves.data.easyScores.lastLevelCompleted = this._currentLevelIndex;
this._levelScoreSaves.data.easyScores[this._currentLevelIndex] = this._levels[this._currentMode][this._currentLevelIndex].GetScoreToken();
this._levelScoreSaves.flush();
} else {
if (this._currentMode == "normal"){
this._levelScoreSaves.data.normalScores.lastLevelCompleted = this._currentLevelIndex;
this._levelScoreSaves.data.normalScores[this._currentLevelIndex] = this._levels[this._currentMode][this._currentLevelIndex].GetScoreToken();
this._levelScoreSaves.flush();
} else {
if (this._currentMode == "hard"){
this._levelScoreSaves.data.hardScores.lastLevelCompleted = this._currentLevelIndex;
this._levelScoreSaves.data.hardScores[this._currentLevelIndex] = this._levels[this._currentMode][this._currentLevelIndex].GetScoreToken();
this._levelScoreSaves.flush();
};
};
};
}
public function onCourseOverViewScores(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "991801c2");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=viewscores&action=viewscores");
navigateToURL(_local2, "_blank");
}
public function onCreditsClick(_arg1:MouseEvent):void{
this._creditsScreen = CreditsScreen.ShowScreen(this);
}
public function onNormalCourseClick(_arg1:MouseEvent):void{
this._currentMode = "normal";
this._currentLevelIndex = -1;
if (this.checkIfCourseHasSavedData(this._currentMode)){
ContinueCourseDialog.ShowDialog(this, onContinueCourse, onStartOverCourse);
} else {
onStartOverCourse(_arg1);
};
}
public function onToggleMusicClick(_arg1:MouseEvent):void{
SoundManager._globalSoundMusicTransform.volume = ((SoundManager._globalSoundMusicTransform.volume)==0) ? 0.5 : 0;
SoundManager._musicChannel.soundTransform = new SoundTransform((SoundManager._globalSoundMusicTransform.volume * 0.5));
this._selectToggleMusic._label.text = ((SoundManager._globalSoundMusicTransform.volume)==0) ? "Music ON" : "Music OFF";
}
public function clearCourseSavedData(_arg1:String):void{
if (_arg1 == "easy"){
this._levelScoreSaves.data.easyScores.lastLevelCompleted = -1;
this._levelScoreSaves.flush();
} else {
if (_arg1 == "normal"){
this._levelScoreSaves.data.normalScores.lastLevelCompleted = -1;
this._levelScoreSaves.flush();
} else {
if (_arg1 == "hard"){
this._levelScoreSaves.data.hardScores.lastLevelCompleted = -1;
this._levelScoreSaves.flush();
};
};
};
}
public function onEasyCourseClick(_arg1:MouseEvent):void{
this._currentMode = "easy";
this._currentLevelIndex = -1;
if (this.checkIfCourseHasSavedData(this._currentMode)){
ContinueCourseDialog.ShowDialog(this, onContinueCourse, onStartOverCourse);
} else {
onStartOverCourse(_arg1);
};
}
public function unlockCurrentLevel(_arg1:Boolean=true):void{
if ((((((this._currentMode == "easy")) && ((this._currentLevelIndex < _unlockedLevels.data.easyLevels.length)))) && ((this._currentLevelIndex >= 0)))){
_unlockedLevels.data.easyLevels[this._currentLevelIndex] = _arg1;
} else {
if ((((((this._currentMode == "normal")) && ((this._currentLevelIndex < _unlockedLevels.data.normalLevels.length)))) && ((this._currentLevelIndex >= 0)))){
_unlockedLevels.data.normalLevels[this._currentLevelIndex] = _arg1;
} else {
if ((((((this._currentMode == "hard")) && ((this._currentLevelIndex < _unlockedLevels.data.hardLevels.length)))) && ((this._currentLevelIndex >= 0)))){
_unlockedLevels.data.hardLevels[this._currentLevelIndex] = _arg1;
};
};
};
_unlockedLevels.flush();
}
public function init():void{
var _local1:Array;
var _local2:int;
this.stage.showDefaultContextMenu = false;
OPHighScores.Connect("c44f82ee-2287-102b-a037-0019b9db6105");
_MassleGameObject = new Massle(this);
generateLevelData();
_unlockedLevels = SharedObject.getLocal("unlockedLevels");
if ((((_unlockedLevels.data.easyLevels == null)) || ((_unlockedLevels.data.easyLevels.length < this._levels["easy"].length)))){
_unlockedLevels.data.easyLevels = new Array(this._levels["easy"].length);
_local2 = 0;
_local2 = 0;
while (_local2 < _unlockedLevels.data.easyLevels.length) {
_unlockedLevels.data.easyLevels[_local2] = false;
_local2++;
};
_unlockedLevels.data.easyLevels[0] = true;
};
if ((((_unlockedLevels.data.normalLevels == null)) || ((_unlockedLevels.data.normalLevels.length < this._levels["normal"].length)))){
_unlockedLevels.data.normalLevels = new Array(this._levels["normal"].length);
_local2 = 0;
while (_local2 < _unlockedLevels.data.normalLevels.length) {
_unlockedLevels.data.normalLevels[_local2] = false;
_local2++;
};
_unlockedLevels.data.normalLevels[0] = true;
};
if ((((_unlockedLevels.data.hardLevels == null)) || ((_unlockedLevels.data.hardLevels.length < this._levels["hard"].length)))){
_unlockedLevels.data.hardLevels = new Array(this._levels["hard"].length);
_local2 = 0;
while (_local2 < _unlockedLevels.data.hardLevels.length) {
_unlockedLevels.data.hardLevels[_local2] = false;
_local2++;
};
_unlockedLevels.data.hardLevels[0] = true;
};
_unlockedLevels.flush();
_levelScoreSaves = SharedObject.getLocal("levelScoreSaves");
if ((((_levelScoreSaves.data.easyScores == null)) || ((_levelScoreSaves.data.easyScores.length < this._levels["easy"].length)))){
_levelScoreSaves.data.easyScores = new Array(this._levels["easy"].length);
_levelScoreSaves.data.easyScores.lastLevelCompleted = -1;
};
if ((((_levelScoreSaves.data.normalScores == null)) || ((_levelScoreSaves.data.normalScores.length < this._levels["normal"].length)))){
_levelScoreSaves.data.normalScores = new Array(this._levels["normal"].length);
_levelScoreSaves.data.normalScores.lastLevelCompleted = -1;
};
if ((((_levelScoreSaves.data.hardScores == null)) || ((_levelScoreSaves.data.hardScores.length < this._levels["hard"].length)))){
_levelScoreSaves.data.hardScores = new Array(this._levels["hard"].length);
_levelScoreSaves.data.hardScores.lastLevelCompleted = -1;
};
_levelScoreSaves.flush();
_backDrop = new Sprite();
addChild(_backDrop);
_backDrop.graphics.beginFill(0);
_backDrop.graphics.drawRect(0, 0, 640, 480);
_backDrop.graphics.endFill();
_backTexture = new ResourceManager.LevelBackdrop();
this._backDrop.addChild(_backTexture);
_selectHowToPlay = new GameButton("How To Play", null, 250, 30, onHowToPlayClick);
_selectHowToPlay.x = 195;
_selectHowToPlay.y = 140;
_backDrop.addChild(_selectHowToPlay);
_selectEasyCourse = new GameButton("Play Easy Course", null, 400, 40, onEasyCourseClick);
_selectEasyCourse.x = 120;
_selectEasyCourse.y = 190;
_backDrop.addChild(_selectEasyCourse);
_selectNormalCourse = new GameButton("Play Normal Course", null, 400, 40, onNormalCourseClick);
_selectNormalCourse.x = 120;
_selectNormalCourse.y = 240;
_backDrop.addChild(_selectNormalCourse);
_selectHardCourse = new GameButton("Play Hard Course", null, 400, 40, onHardCourseClick);
_selectHardCourse.x = 120;
_selectHardCourse.y = 290;
_backDrop.addChild(_selectHardCourse);
_selectFreePlay = new GameButton("Free Play Mode", null, 300, 35, onFreePlayClick);
_selectFreePlay.x = 170;
_selectFreePlay.y = 350;
_backDrop.addChild(_selectFreePlay);
_selectPlayMoreGames = new ResourceManager.BubbleBoxLogoButton();
_selectPlayMoreGames.width = 325;
_selectPlayMoreGames.height = 60;
_selectPlayMoreGames.x = 157.5;
_selectPlayMoreGames.y = 400;
_backDrop.addChild(_selectPlayMoreGames);
_selectCredits = new GameButton("Credits", null, 100, 25, onCreditsClick);
_selectCredits.x = 25;
_selectCredits.y = 435;
_backDrop.addChild(_selectCredits);
_selectToggleMusic = new GameButton("Music OFF", null, 100, 20, onToggleMusicClick);
_selectToggleMusic.x = 520;
_selectToggleMusic.y = 420;
_backDrop.addChild(_selectToggleMusic);
_selectToggleSound = new GameButton("Sound Effects OFF", null, 100, 20, onToggleSoundEffectsClick);
_selectToggleSound.x = 520;
_selectToggleSound.y = 440;
_backDrop.addChild(_selectToggleSound);
_gameTitle = new TextField();
_gameTitle.defaultTextFormat = new TextFormat("Abbess", 100, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
_gameTitle.embedFonts = true;
_gameTitle.antiAliasType = AntiAliasType.ADVANCED;
_gameTitle.mouseEnabled = false;
_gameTitle.tabEnabled = false;
_gameTitle.text = "Plunk P l";
_gameTitle.x = 50;
_gameTitle.y = 35;
_gameTitle.width = 540;
_gameTitle.height = 175;
_backDrop.addChild(_gameTitle);
_backDrop.addChild(Ball.MakeCueBall(25, 0, 0, 525, 90));
_backDrop.addChild(Ball.MakeCueBall(25, 0, 0, 470, 90));
_local1 = _gameTitle.filters;
_local1.push(new DropShadowFilter(4, 135));
_local1.push(new BevelFilter(4, 135));
_gameTitle.filters = _local1;
_local1 = this._backTexture.filters;
_local1.push(new BevelFilter(8, 135, 0xEEEEEE, 1, 0, 1, 10, 10));
_backTexture.filters = _local1;
_freeplayScreen = new FreePlaySelectionScreen(this);
_freeplayScreen.visible = false;
this._backDrop.addChild(_freeplayScreen);
SoundManager.startBackgroundMusic(0.25);
}
public function onPlayMoreGamesClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "e9386c9e");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=mainmenu");
navigateToURL(_local2, "_blank");
}
public function loadCourseSavedData(_arg1:String):void{
var _local2:int;
_local2 = 0;
if (_arg1 == "easy"){
_local2 = 0;
while (_local2 <= this._levelScoreSaves.data.easyScores.lastLevelCompleted) {
this._levels[_arg1][_local2].LoadScoreToken(this._levelScoreSaves.data.easyScores[_local2]);
_local2++;
};
this._currentMode = _arg1;
this._currentLevelIndex = this._levelScoreSaves.data.easyScores.lastLevelCompleted;
loadNextLevel();
} else {
if (_arg1 == "normal"){
_local2 = 0;
while (_local2 <= this._levelScoreSaves.data.normalScores.lastLevelCompleted) {
this._levels[_arg1][_local2].LoadScoreToken(this._levelScoreSaves.data.normalScores[_local2]);
_local2++;
};
this._currentMode = _arg1;
this._currentLevelIndex = this._levelScoreSaves.data.normalScores.lastLevelCompleted;
loadNextLevel();
} else {
if (_arg1 == "hard"){
_local2 = 0;
while (_local2 <= this._levelScoreSaves.data.hardScores.lastLevelCompleted) {
this._levels[_arg1][_local2].LoadScoreToken(this._levelScoreSaves.data.hardScores[_local2]);
_local2++;
};
this._currentMode = _arg1;
this._currentLevelIndex = this._levelScoreSaves.data.hardScores.lastLevelCompleted;
loadNextLevel();
};
};
};
}
private function onSubmitComplete(_arg1:Event):void{
_cod._playAgainButton.enabled = true;
_cod._submitButton._label.text = "Submitted!";
_cod._submitButton._label.text = "View Scores";
_cod._submitCallback = onCourseOverViewScores;
_cod._submitButton.enabled = true;
}
public function onCourseOverPlayAgain(_arg1:MouseEvent):void{
_cod.HideDialog();
_MassleGameObject.UnloadLevel();
if (stage.contains(_MassleGameObject)){
stage.removeChild(_MassleGameObject);
};
}
public function unlockNextLevel(_arg1:Boolean=true):void{
if ((((((this._currentMode == "easy")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.easyLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_unlockedLevels.data.easyLevels[(this._currentLevelIndex + 1)] = _arg1;
} else {
if ((((((this._currentMode == "normal")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.normalLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_unlockedLevels.data.normalLevels[(this._currentLevelIndex + 1)] = _arg1;
} else {
if ((((((this._currentMode == "hard")) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.hardLevels.length)))) && (((this._currentLevelIndex + 1) >= 0)))){
_unlockedLevels.data.hardLevels[(this._currentLevelIndex + 1)] = _arg1;
};
};
};
_unlockedLevels.flush();
}
private function onSubmitError(_arg1:Event):void{
_cod._playAgainButton.enabled = true;
_cod._submitButton._label.text = "ERROR!";
}
public function onContinueCourse(_arg1:MouseEvent):void{
loadCourseSavedData(this._currentMode);
}
public function generateLevelData():void{
var gFunc:Function;
this._levels = new Array();
this._levelGenFunctions = new Array();
this._levelGenFunctions["easy"] = new Array();
this._levelGenFunctions["normal"] = new Array();
this._levelGenFunctions["hard"] = new Array();
this._levels["easy"] = new Array();
this._levels["normal"] = new Array();
this._levels["hard"] = new Array();
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 15, 20, 200);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakePerfectBounceBall(15, 0, 0, 205, 175));
_local3.addBall(Ball.MakeSuperBounceBall(15, 0, 0, 230, 200));
_local3.addBall(Ball.MakeNormalBounceBall(15, 0, 0, 205, 225));
_local3.addGoal(Goal.MakeRegularGoal(300, 35, 30, 50));
_local3.addGoal(Goal.MakeRegularGoal(365, 200, 30, 50));
_local3.addGoal(Goal.MakeRegularGoal(300, 365, 30, 50));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 15, 30, 250);
_local3._levelShotPar = 2;
_local3.addBall(Ball.MakePerfectBounceBall(15, 0, 0, 300, 250));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(50, 0), new Point(250, 0), new Point(150, 150)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(300, 400), new Point(500, 400), new Point(400, 250)));
_local3.addGoal(Goal.MakeRegularGoal(500, 100, 50, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 25, 200);
_local3._levelShotPar = 5;
_local3.addBall(Ball.MakeNormalBounceBall(15, 0, 0, 125, 180));
_local3.addBall(Ball.MakeSuperBounceBall(15, 0, 0, 125, 220));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 200, 50));
_local3.addGoal(Goal.MakeRegularGoal(300, 200, 40, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 500;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 15, 20, 25);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakeNormalBounceBall(15, 0, 0, 460, 200));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(450, 0), new Point(500, 0), new Point(500, 50)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(450, 400), new Point(500, 350), new Point(500, 400)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(0, 50), new Point(400, 200), new Point(0, 200)));
_local3.addGoal(Goal.MakeRegularGoal(50, 370, 25, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 25, 350);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 175, 175));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 350, 200));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(50, 400), new Point(300, 400), new Point(300, 200)));
_local3.addGoal(Goal.MakeRegularGoal(350, 25, 25, 100));
_local3.addGoal(Goal.MakeRegularGoal(350, 350, 25, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 500;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 25, 25);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 250, 25));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 250, 200));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 125, 225));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 50), new Point(225, 50), new Point(225, 200), new Point(0, 200)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 250), new Point(225, 250), new Point(225, 400), new Point(0, 400)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(275, 50), new Point(500, 50), new Point(500, 400), new Point(275, 400)));
_local3.addGoal(Goal.MakeRegularGoal(450, 25, 20, 100));
_local3.addGoal(Goal.MakeRegularGoal(250, 350, 20, 100));
_local3.addGoal(Goal.MakeRegularGoal(25, 225, 20, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 200;
_local3 = new LevelData(_local1, _local2, 10, 15, 100);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 300, 100));
_local3.addBumper(Bumper.MakeSuperBounceBumper(300, 0, 40));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 100, 40));
_local3.addBumper(Bumper.MakeSuperBounceBumper(400, 100, 40));
_local3.addBumper(Bumper.MakeSuperBounceBumper(300, 200, 40));
_local3.addGoal(Goal.MakeRegularGoal(580, 100, 20, 200));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 200, 100, 0.95, false);
_local3._levelShotPar = 10;
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 200, 230));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 210.1, 247));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 189.9, 247));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 264));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(215, 58), new Point(378, 341), 10, 30));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(361, 368), new Point(39, 368), 10, 30));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(22, 341), new Point(185, 58), 10, 30));
_local3.addGoal(Goal.MakeRegularGoal(200, 64, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(33, 353, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(367, 353, 16, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 200, 40, 0.95, false);
_local3._levelShotPar = 20;
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 180));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 210.1, 197));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 189.9, 197));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 214));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 221.1, 214));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 178.9, 214));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(24, 0), new Point(376, 0), 10));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(400, 24), new Point(400, 376), 10));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(376, 400), new Point(24, 400), 10));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(0, 376), new Point(0, 24), 10));
_local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(16, 384, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(384, 384, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(384, 16, 16, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["easy"].push(gFunc);
this._levels["easy"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 50, 75, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakePerfectBounceBall(15, 0, 0, 50, 300));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 100), new Point(35, 100), new Point(35, 110), new Point(0, 110)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(65, 100), new Point(300, 100), new Point(300, 110), new Point(65, 110)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 300), new Point(0, 400), new Point(100, 400)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 400), new Point(600, 400), new Point(600, 300)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 0), new Point(600, 0), new Point(600, 100)));
_local3.addGoal(Goal.MakeRegularGoal(150, 50, 30, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 25, 25, 0.95, true, 0.25, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 3;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 25, 100));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(50, 150), new Point(50, 200), new Point(100, 200)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 250), new Point(0, 300), new Point(50, 300)));
_local3.addGoal(Goal.MakeRegularGoal(375, 375, 15, 200));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 300;
_local2 = 300;
_local3 = new LevelData(_local1, _local2, 10, 20, 150, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 6;
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 50));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 250));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(100, 125), new Point(110, 125), new Point(110, 175), new Point(100, 175)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(200, 0), new Point(300, 0), new Point(300, 300), new Point(200, 300), new Point(300, 150)));
_local3.addGoal(Goal.MakeRegularGoal(150, 150, 30, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 500;
_local2 = 350;
_local3 = new LevelData(_local1, _local2, 10, 20, 20, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 8;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 170, 60));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 170, 40));
_local3.addBall(Ball.MakeSuperBounceBall(15, 0, 0, 140, 50));
_local3.addBall(Ball.MakeSuperBounceBall(15, 0, 0, 200, 50));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(60, 0), new Point(70, 0), new Point(70, 50), new Point(60, 50)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 300), new Point(0, 350), new Point(50, 350)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(100, 350), new Point(150, 350), new Point(150, 300)));
_local3.addGoal(Goal.MakeRegularGoal(450, 300, 18, 100));
_local3.addGoal(Goal.MakeRegularGoal(400, 100, 50, 50));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 50, 200, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 8;
_local3.addBall(Ball.MakePerfectBounceBall(5, 0, 0, 320, 200));
_local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 331, 195));
_local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 331, 205));
_local3.addBall(Ball.MakeNormalBounceBall(5, 0, 0, 342, 190));
_local3.addBall(Ball.MakeNormalBounceBall(5, 0, 0, 342, 200));
_local3.addBall(Ball.MakeNormalBounceBall(5, 0, 0, 342, 210));
_local3.addGoal(Goal.MakeRegularGoal(550, 200, 10, 200));
_local3.addGoal(Goal.MakeRegularGoal(450, 100, 30, 75));
_local3.addGoal(Goal.MakeRegularGoal(450, 200, 30, 75));
_local3.addGoal(Goal.MakeRegularGoal(450, 300, 30, 75));
_local3.addGoal(Goal.MakeRegularGoal(50, 75, 20, 100));
_local3.addGoal(Goal.MakeRegularGoal(50, 325, 20, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 5, 390, 10, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 12;
_local3.addBall(Ball.MakePerfectBounceBall(5, 0, 0, 380, 20));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 0), new Point(0, 10), new Point(20, 0), new Point(160, 140), new Point(240, 140), new Point(380, 0)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 400), new Point(0, 390), new Point(20, 400), new Point(160, 260), new Point(240, 260), new Point(380, 400)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(20, 40), new Point(180, 200), new Point(20, 360)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(400, 20), new Point(220, 200), new Point(400, 380)));
_local3.addBumper(Bumper.MakeSuperBounceBumper(185, 200, 5));
_local3.addBumper(Bumper.MakeSuperBounceBumper(195, 200, 5));
_local3.addBumper(Bumper.MakeSuperBounceBumper(205, 200, 5));
_local3.addBumper(Bumper.MakeSuperBounceBumper(215, 200, 5));
_local3.addGoal(Goal.MakeRegularGoal(380, 380, 13, 200));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 125, 200, 0.95, true, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 12;
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 250, 200));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 264, 192));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 264, 208));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 184));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 200));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 216));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(250, 100), new Point(350, 100), 8, 45));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(500, 150), new Point(500, 250), 8, 45));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(350, 300), new Point(250, 300), 8, 45));
_local3.addBlock(Block.MakeSuperBumperBlock(new Point(100, 250), new Point(100, 150), 8, 45));
_local3.addBumper(Bumper.MakeSuperBounceBumper(100, 100, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(500, 100, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(100, 300, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(500, 300, 10));
_local3.addGoal(Goal.MakeRegularGoal(15, 15, 15, 100));
_local3.addGoal(Goal.MakeRegularGoal(15, 200, 15, 100));
_local3.addGoal(Goal.MakeRegularGoal(15, 385, 15, 100));
_local3.addGoal(Goal.MakeRegularGoal(585, 385, 15, 100));
_local3.addGoal(Goal.MakeRegularGoal(585, 200, 15, 100));
_local3.addGoal(Goal.MakeRegularGoal(585, 15, 15, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 200, 100, 0.95, false, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 16;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 220));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 210.1, 237));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 189.9, 237));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 254));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 220.1, 254));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 179.9, 254));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(216, 30), new Point(379, 149), 5, 54));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(390, 180), new Point(327, 374), 5, 54));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(300, 392), new Point(100, 392), 5, 54));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(73, 374), new Point(10, 180), 5, 54));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(21, 149), new Point(184, 30), 5, 54));
_local3.addGoal(Goal.MakeRegularGoal(200, 30, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(15, 165, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(385, 165, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(85, 385, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(315, 385, 16, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 632;
_local2 = 332;
_local3 = new LevelData(_local1, _local2, 10, 50, 166, 0.965, false, 1, (new ResourceManager.WoodBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 24;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 300, 166));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 318, 156));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 318, 176));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 336, 146));
_local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 336, 166));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 336, 186));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 354, 156));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 354, 176));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 372, 166));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(22, 0), new Point(306, 0)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(328, 0), new Point(610, 0)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(632, 22), new Point(632, 310)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(610, 332), new Point(328, 332)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(306, 332), new Point(22, 332)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(0, 310), new Point(0, 22)));
_local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(316, 8, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(616, 16, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(16, 316, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(316, 324, 16, 100));
_local3.addGoal(Goal.MakeRegularGoal(616, 316, 16, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["normal"].push(gFunc);
this._levels["normal"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 30, 100, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 5;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 100, 100));
_local3.addBumper(Bumper.MakePerfectBounceBumper(300, 200, 100));
_local3.addBumper(Bumper.MakeNormalBounceBumper(50, 200, 50));
_local3.addBumper(Bumper.MakeNormalBounceBumper(150, 200, 50));
_local3.addBumper(Bumper.MakeNormalBounceBumper(550, 50, 50));
_local3.addBumper(Bumper.MakeNormalBounceBumper(550, 350, 50));
_local3.addGoal(Goal.MakeRegularGoal(50, 325, 40, 200));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 50, 25, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 6;
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 300, 25));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 300, 325));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(600, 0), new Point(550, 0), new Point(600, 50), new Point(550, 100), new Point(600, 150), new Point(550, 200), new Point(600, 250), new Point(550, 300), new Point(600, 350), new Point(550, 400), new Point(600, 400)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 0), new Point(50, 50), new Point(0, 100), new Point(50, 150), new Point(0, 200), new Point(50, 250), new Point(0, 300), new Point(50, 350), new Point(0, 400)));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 48), new Point(500, 48), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(100, 98), new Point(550, 98), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 148), new Point(500, 148), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(100, 198), new Point(550, 198), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 248), new Point(500, 248), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(100, 298), new Point(550, 298), 4, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 348), new Point(500, 348), 4, 90));
_local3.addGoal(Goal.MakeRegularGoal(65, 375, 20, 300));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 30, 200, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 9;
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 300, 30));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 300, 370));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 150, 200));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(240, 100), new Point(240, 300), new Point(350, 300), new Point(350, 280), new Point(260, 280), new Point(260, 120), new Point(350, 120), new Point(350, 100)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 0), new Point(600, 0), new Point(600, 100)));
_local3.addBlock(Block.MakeSuperBounceBlock(new Point(600, 300), new Point(600, 400), new Point(500, 400)));
_local3.addGoal(Goal.MakeRegularGoal(300, 200, 30, 200));
_local3.addGoal(Goal.MakeRegularGoal(500, 200, 30, 50));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 25, 200, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 16;
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 400, 200));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 0), new Point(50, 150), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 250), new Point(50, 400), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(150, 0), new Point(150, 50), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(150, 130), new Point(150, 400), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(250, 0), new Point(250, 290), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(250, 350), new Point(250, 400), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(350, 0), new Point(350, 50), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(350, 90), new Point(350, 400), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(450, 0), new Point(450, 320), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(450, 350), new Point(450, 400), 10, 90));
_local3.addGoal(Goal.MakeRegularGoal(530, 100, 40, 500));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 20, 25, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 12;
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 500, 25));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 575, 300));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 100, 375));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(0, 50), new Point(50, 50), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(550, 0), new Point(550, 50), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(600, 350), new Point(550, 350), 10, 90));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(50, 400), new Point(50, 350), 10, 90));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 100, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(300, 100, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(400, 100, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(150, 200, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(250, 200, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(350, 200, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(450, 200, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 300, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(300, 300, 10));
_local3.addBumper(Bumper.MakeSuperBounceBumper(400, 300, 10));
_local3.addGoal(Goal.MakeRegularGoal(575, 375, 20, 300));
_local3.addGoal(Goal.MakeRegularGoal(575, 25, 20, 300));
_local3.addGoal(Goal.MakeRegularGoal(25, 375, 20, 300));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 10, 50, 200, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 14;
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 225, 150));
_local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 225, 250));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 475, 150));
_local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 475, 250));
_local3.addBlock(Block.MakePerfectBumperBlock(new Point(100, 300), new Point(100, 100), 50, 90));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(300, 200), new Point(350, 100), new Point(400, 200), new Point(350, 300)));
_local3.addBlock(Block.MakePerfectBumperBlock(new Point(550, 300), new Point(550, 100), 50, 90));
_local3.addBumper(Bumper.MakeSuperBounceBumper(225, 200, 20));
_local3.addBumper(Bumper.MakeSuperBounceBumper(475, 200, 20));
_local3.addGoal(Goal.MakeRegularGoal(550, 50, 30, 200));
_local3.addGoal(Goal.MakeRegularGoal(550, 350, 30, 200));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 300, 150, 0.95, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 20;
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 75, 50));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 525, 50));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 75, 350));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 525, 350));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(20, 100), new Point(120, 100), new Point(20, 200)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(480, 100), new Point(580, 100), new Point(580, 200)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(120, 300), new Point(20, 300), new Point(20, 200)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(580, 300), new Point(480, 300), new Point(580, 200)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(150, 20), new Point(150, 70), new Point(300, 20)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(450, 20), new Point(450, 70), new Point(300, 20)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(150, 330), new Point(150, 380), new Point(300, 380)));
_local3.addBlock(Block.MakePerfectBounceBlock(new Point(450, 330), new Point(450, 380), new Point(300, 380)));
_local3.addBumper(Bumper.MakeSuperBounceBumper(20, 20, 20));
_local3.addBumper(Bumper.MakeSuperBounceBumper(20, 380, 20));
_local3.addBumper(Bumper.MakeSuperBounceBumper(580, 20, 20));
_local3.addBumper(Bumper.MakeSuperBounceBumper(580, 380, 20));
_local3.addGoal(Goal.MakeRegularGoal(300, 200, 30, 300));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
_local1 = 600;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 6, 300, 200, 0.965, true, 1, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 36;
_local3.addBall(Ball.MakeSuperBounceBall(6, 0, 0, 300, 170));
_local3.addBall(Ball.MakeNormalBounceBall(6, 0, 0, 294, 159.5));
_local3.addBall(Ball.MakePerfectBounceBall(6, 0, 0, 306, 159.5));
_local3.addBall(Ball.MakeSuperBounceBall(6, 0, 0, 300, 230));
_local3.addBall(Ball.MakePerfectBounceBall(6, 0, 0, 294, 240.5));
_local3.addBall(Ball.MakeNormalBounceBall(6, 0, 0, 306, 240.5));
_local3.addBall(Ball.MakeSuperBounceBall(6, 0, 0, 330, 200));
_local3.addBall(Ball.MakePerfectBounceBall(6, 0, 0, 340.5, 194));
_local3.addBall(Ball.MakeNormalBounceBall(6, 0, 0, 340.5, 206));
_local3.addBall(Ball.MakeSuperBounceBall(6, 0, 0, 270, 200));
_local3.addBall(Ball.MakePerfectBounceBall(6, 0, 0, 259.5, 194));
_local3.addBall(Ball.MakeNormalBounceBall(6, 0, 0, 259.5, 206));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(11, 187), new Point(110, 80), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(128, 65), new Point(288, 10), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(312, 10), new Point(472, 65), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(490, 80), new Point(589, 187), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(110, 320), new Point(11, 213), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(288, 390), new Point(128, 335), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(472, 335), new Point(312, 390), 5, 60));
_local3.addBlock(Block.MakeNormalBumperBlock(new Point(589, 213), new Point(490, 320), 5, 60));
_local3.addBumper(Bumper.MakePerfectBounceBumper(60, 200, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(540, 200, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(300, 60, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(300, 340, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(155, 115, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(445, 115, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(445, 285, 10));
_local3.addBumper(Bumper.MakePerfectBounceBumper(155, 285, 10));
_local3.addGoal(Goal.MakeRegularGoal(10, 200, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(120, 75, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(300, 10, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(480, 75, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(590, 200, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(480, 325, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(300, 390, 10, 100));
_local3.addGoal(Goal.MakeRegularGoal(120, 325, 10, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
gFunc = function ():LevelData{
var _local1:Number;
var _local2:Number;
var _local3:LevelData;
var _local4:Number;
_local1 = 400;
_local2 = 400;
_local3 = new LevelData(_local1, _local2, 8, 50, 200, 0.965, true, 0.5, (new ResourceManager.StoneBackground() as Bitmap).bitmapData);
_local3._levelShotPar = 36;
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 150));
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 175));
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 225));
_local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 250));
_local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 150));
_local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 175));
_local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 200));
_local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 225));
_local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 250));
_local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 200, 200));
_local4 = 115;
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, _local4), new Point(0, 0), new Point(_local4, 0)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, (_local2 - _local4)), new Point(_local4, _local2), new Point(0, _local2)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point((_local1 - _local4), 0), new Point(_local1, 0), new Point(_local1, _local4)));
_local3.addBlock(Block.MakeNormalBounceBlock(new Point(_local1, (_local2 - _local4)), new Point(_local1, _local2), new Point((_local1 - _local4), _local2)));
_local3.addBumper(Bumper.MakeNormalBounceBumper(16, 168, 12));
_local3.addBumper(Bumper.MakeNormalBounceBumper(16, 232, 12));
_local3.addBumper(Bumper.MakeNormalBounceBumper(384, 168, 12));
_local3.addBumper(Bumper.MakeNormalBounceBumper(384, 232, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(160, 200, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(130, 200, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(240, 200, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(270, 200, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 160, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 130, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 240, 12));
_local3.addBumper(Bumper.MakeSuperBounceBumper(200, 270, 12));
_local3.addGoal(Goal.MakeRegularGoal(16, 200, 12, 100));
_local3.addGoal(Goal.MakeRegularGoal(384, 200, 12, 100));
_local3._levelStartBalls = (_local3._balls.length - 1);
_local3.GeneratePreview();
return (_local3);
};
this._levelGenFunctions["hard"].push(gFunc);
this._levels["hard"].push(gFunc());
}
public function onCourseOverSubmitScore(_arg1:MouseEvent):void{
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:URLRequest;
var _local6:URLVariables;
var _local7:URLLoader;
_local2 = int(_cod._totalScoreField.text);
_local3 = _cod._submitPlayerName.text;
_local4 = 1001;
OPHighScores.SubmitScore(_local3, _local2, this._currentMode, 0, onSubmitStart);
_local5 = new URLRequest("http://www.bubblebox.com/scripts/insertscore.php");
_local5.method = URLRequestMethod.POST;
_local6 = new URLVariables((((((("game=" + _local4) + "&score=") + _local2.toString()) + "&name=") + _local3) + ""));
_local5.data = _local6;
_local7 = new URLLoader();
_local7.addEventListener(Event.COMPLETE, onSubmitComplete);
_local7.addEventListener(IOErrorEvent.IO_ERROR, onSubmitError);
_local7.load(_local5);
}
public function onHowToPlayClick(_arg1:MouseEvent):void{
this._howToPlayScreen = HowToPlayScreen.ShowScreen(this);
}
private function onSubmitStart(_arg1:Event):void{
_cod._submitPlayerName.visible = false;
_cod._submitButton.enabled = false;
_cod._playAgainButton.enabled = false;
_cod._submitButton._label.text = "Submitting...";
}
}
}//package
Section 199
//Geometry (Geometry)
package {
import flash.geom.*;
public class Geometry {
public static const NEGATIVEINFINITY:Number = -INF;
public static const INFINITY:Number = INF;
public static const NAN:Number = NAN;
public static function RadiansToDegrees(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function PointLineSide(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg4 - _arg1.y) - (_arg2 * (_arg3 - _arg1.x))));
}
public static function DotProduct(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1 * _arg3) + (_arg2 * _arg4)));
}
public static function PointIsOnSegment(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Number):Boolean{
var _local5:Boolean;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = false;
if (_arg1.x < _arg2.x){
_local6 = _arg1.x;
_local7 = _arg2.x;
} else {
_local6 = _arg2.x;
_local7 = _arg1.x;
};
if (_arg1.y < _arg2.y){
_local8 = _arg1.y;
_local9 = _arg2.y;
} else {
_local8 = _arg2.y;
_local9 = _arg1.y;
};
_local5 = (((((((((Geometry.PointLineSide(_arg1, ((_arg1.y - _arg2.y) / (_arg1.x - _arg2.x)), _arg3, _arg4) == 0)) && ((_arg3 >= _local6)))) && ((_arg3 <= _local7)))) && ((_arg4 >= _local8)))) && ((_arg4 <= _local9)));
return (_local5);
}
public static function GetDistanceToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (DistanceOfVector((_arg3 - _arg1), (_arg4 - _arg2)));
}
public static function AngleOfVector(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = Geometry.RadiansToDegrees(Math.atan2(_arg2, _arg1));
return (_local3);
}
public static function AddVectors(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = (_arg1.x + _arg2.x);
_local3.y = (_arg1.y + _arg2.y);
return (_local3);
}
public static function roundToPrecision(_arg1:Number, _arg2:int=0):Number{
var _local3:Number;
_local3 = Math.pow(10, _arg2);
return ((Math.round((_local3 * _arg1)) / _local3));
}
public static function NormalizeVector(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
var _local4:Number;
_local3 = new Point(_arg1, _arg2);
_local4 = _local3.length;
if (_local4 != 0){
_local3.x = (_local3.x / _local4);
_local3.y = (_local3.y / _local4);
};
return (_local3);
}
public static function GetAngleToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (AngleOfVector((_arg3 - _arg1), (_arg4 - _arg2)));
}
public static function InvertVector(_arg1:Point):Point{
var _local2:Point;
_local2 = new Point();
_local2.x = (_arg1.x * -1);
_local2.y = (_arg1.y * -1);
return (_local2);
}
public static function NormalForVectorRH(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = -(_arg2);
_local3.y = _arg1;
return (_local3);
}
public static function ccw(_arg1:Point, _arg2:Point, _arg3:Point):int{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = (_arg2.x - _arg1.x);
_local5 = (_arg2.y - _arg1.y);
_local6 = (_arg3.x - _arg1.x);
_local7 = (_arg3.y - _arg1.y);
if ((_local5 * _local6) < (_local7 * _local4)){
return (1);
};
if ((_local5 * _local6) > (_local7 * _local4)){
return (-1);
};
if (((((_local4 * _local6) < 0)) || (((_local5 * _local7) < 0)))){
return (-1);
};
if ((Math.abs(_local4) + Math.abs(_local5)) >= (Math.abs(_local6) + Math.abs(_local7))){
return (0);
};
return (1);
}
public static function GetSlopeOfLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg2 - _arg4) / (_arg1 - _arg3)));
}
public static function NormalForVectorLH(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = _arg2;
_local3.y = -(_arg1);
return (_local3);
}
public static function GetAngleAndDistanceToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Point{
var _local5:Point;
_local5 = VelocityToAngleAndSpeed((_arg3 - _arg1), (_arg4 - _arg2));
return (_local5);
}
public static function AngleAndSpeedToVelocity(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
var _local4:Number;
_local3 = new Point();
_local4 = DegreesToRadians(_arg1);
_local3.x = (Math.cos(_local4) * _arg2);
_local3.y = (Math.sin(_local4) * _arg2);
return (_local3);
}
public static function VelocityToAngleAndSpeed(_arg1:Number, _arg2:Number):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = AngleOfVector(_arg1, _arg2);
_local3.y = DistanceOfVector(_arg1, _arg2);
return (_local3);
}
public static function intersection(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point):Boolean{
return (((((ccw(_arg1, _arg2, _arg3) * ccw(_arg1, _arg2, _arg4)) <= 0)) && (((ccw(_arg3, _arg4, _arg1) * ccw(_arg3, _arg4, _arg2)) <= 0))));
}
public static function DistanceOfVector(_arg1:Number, _arg2:Number):Number{
return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))));
}
public static function DegreesToRadians(_arg1:Number):Number{
return (((_arg1 * Math.PI) / 180));
}
public static function DifferenceOfAngles(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (_arg1 - _arg2);
if (_local3 > 180){
_local3 = (_local3 - 360);
};
if (_local3 < -180){
_local3 = (_local3 + 360);
};
return (Math.abs(_local3));
}
public static function SubtractVectors(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = (_arg1.x - _arg2.x);
_local3.y = (_arg1.y - _arg2.y);
return (_local3);
}
}
}//package
Section 200
//Goal (Goal)
package {
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import flash.filters.*;
public class Goal extends Sprite {
public var _pointValue:int;// = 50
public var onTweenEnd:Function;
private var _scratchTween:Tween;
public var _radius:Number;
public var onTweenUpdate:Function;
private var _pottedTween:Tween;
private var _scratchGlow:Sprite;
public var _pointField:TextField;
public var _pottedPointField:TextField;
private var _pottedGlow:Sprite;
public function Goal(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){
var _local5:Graphics;
var _local6:Array;
_pointValue = 50;
super();
_radius = _arg3;
_pointValue = _arg4;
_local5 = this.graphics;
_local5.beginFill(0);
_local5.drawCircle(0, 0, _radius);
_local5.endFill();
_local6 = this.filters;
_local6.push(new DropShadowFilter(4, -45, 0xFFFFFF, 1, (_radius * 0.25), (_radius * 0.25), 1, 1, true));
_local6.push(new GlowFilter(0, 0.5, (_radius * 0.5), (_radius * 0.5)));
this.filters = _local6;
this.x = _arg1;
this.y = _arg2;
this.cacheAsBitmap = true;
_pointField = new TextField();
_pointField.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
_pointField.mouseEnabled = false;
_pointField.tabEnabled = false;
_pointField.selectable = false;
_pointField.embedFonts = true;
_pointField.antiAliasType = AntiAliasType.ADVANCED;
_pointField.text = this._pointValue.toString();
_pointField.alpha = 0.5;
_pointField.x = -(_radius);
_pointField.y = -5;
_pointField.width = (_radius * 2);
_pointField.height = (_radius * 2);
addChild(_pointField);
_scratchGlow = new Sprite();
_scratchGlow.alpha = 0;
_scratchGlow.graphics.beginFill(0x990000, 1);
_scratchGlow.graphics.drawCircle(0, 0, _radius);
_scratchGlow.graphics.endFill();
_local6 = _scratchGlow.filters;
_local6.push(new GlowFilter(0x990000, 1, 10, 10, 5, 1, false, true));
_scratchGlow.filters = _local6;
addChild(_scratchGlow);
_pottedGlow = new Sprite();
_pottedPointField = new TextField();
_pottedPointField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
_pottedPointField.selectable = false;
_pottedPointField.mouseEnabled = false;
_pottedPointField.tabEnabled = false;
_pottedPointField.embedFonts = true;
_pottedPointField.antiAliasType = AntiAliasType.ADVANCED;
_pottedPointField.text = this._pointValue.toString();
_pottedPointField.x = -200;
_pottedPointField.y = -30;
_pottedPointField.width = 400;
_pottedPointField.height = 60;
_pottedGlow.addChild(_pottedPointField);
_pottedGlow.visible = false;
addChild(_pottedGlow);
}
public function showPotted(_arg1:int=1, _arg2:int=0):void{
var multiplier = _arg1;
var bonus = _arg2;
if (bonus > 0){
_pottedPointField.text = (((this._pointValue * multiplier).toString() + " plus ") + bonus.toString());
} else {
_pottedPointField.text = (this._pointValue * multiplier).toString();
};
this.onTweenUpdate = function (_arg1:Number):void{
_pottedGlow.alpha = _arg1;
_pottedGlow.y = (_pottedGlow.y - _arg1);
};
this.onTweenEnd = function (_arg1:Number):void{
_scratchGlow.visible = false;
_pottedGlow.visible = false;
_pottedGlow.y = 0;
_pottedTween = null;
};
if (_pottedTween != null){
_pottedTween.endTween();
};
if (_scratchTween != null){
_scratchTween.endTween();
};
_pottedGlow.alpha = 1;
_pottedGlow.visible = true;
_pottedGlow.x = 0;
_pottedGlow.y = 0;
_pottedTween = new Tween(this, 1, 0, 1500);
}
public function showScratched():void{
this.onTweenUpdate = function (_arg1:Number):void{
_scratchGlow.alpha = _arg1;
};
this.onTweenEnd = function (_arg1:Number):void{
_scratchGlow.visible = false;
_pottedGlow.visible = false;
_pottedGlow.y = 0;
_scratchTween = null;
};
if (_pottedTween != null){
_pottedTween.endTween();
};
if (_scratchTween != null){
_scratchTween.endTween();
};
_scratchGlow.alpha = 1;
_scratchGlow.visible = true;
_scratchGlow.x = 0;
_scratchGlow.y = 0;
_scratchTween = new Tween(this, 1, 0, 1000);
}
public static function MakeRegularGoal(_arg1:Number=0, _arg2:Number=0, _arg3:Number=10, _arg4:int=50):Goal{
var _local5:Goal;
_local5 = new Goal(_arg1, _arg2, _arg3, _arg4);
return (_local5);
}
}
}//package
Section 201
//GravityWell (GravityWell)
package {
import flash.display.*;
public class GravityWell extends Sprite {
public var _decayRate:Number;// = 0
public var _gStrength:Number;
public var EPSILON:Number;// = 0.02
public var _mass:Number;
public function GravityWell(_arg1:Number, _arg2:Number){
_decayRate = 0;
EPSILON = 0.02;
super();
_gStrength = _arg1;
_mass = _arg2;
}
public function Decay():Number{
_mass = (_mass * _decayRate);
return (_mass);
}
public static function MakeGravityWell(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):GravityWell{
var _local5:GravityWell;
_local5 = new GravityWell(_arg3, _arg4);
_local5.x = _arg1;
_local5.y = _arg2;
_local5.graphics.beginFill(0, (_arg3 * 0.1));
_local5.graphics.drawCircle(0, 0, 5);
_local5.graphics.endFill();
return (_local5);
}
}
}//package
Section 202
//Heartbeat (Heartbeat)
package {
import flash.media.*;
public dynamic class Heartbeat extends Sound {
}
}//package
Section 203
//HMGSplashScreen (HMGSplashScreen)
package {
import flash.events.*;
import fl.transitions.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.media.*;
import fl.transitions.easing.*;
import flash.net.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.system.*;
import flash.ui.*;
public dynamic class HMGSplashScreen extends MovieClip {
public var head_in:Tween;
public var heartbeat:Heartbeat;
public var doneFlag:Boolean;
public var Games_mc:MovieClip;
public var meat_in:Tween;
public var Head_mc:MovieClip;
public var slam:Slam;
public var HMGSite_mc:MovieClip;
public var timer:Timer;
public var games_in:Tween;
public var Meat_mc:MovieClip;
public var heart_scaleY_in:Tween;
public var tagline_in:Tween;
public var GoToHMG_btn:SimpleButton;
public var hmg_in:Tween;
public var noclickFlag:Boolean;
public var heart_alpha_in:Tween;
public var ProducedBy_mc:MovieClip;
public var Brain_mc:MovieClip;
public var heartbeatTimer:Timer;
public var Skip_btn:SimpleButton;
public var _doneCallback:Function;
public var producedBy_in:Tween;
public var TagLine_mc:MovieClip;
public var heart_scaleX_in:Tween;
public function HMGSplashScreen(){
addFrameScript(0, frame1);
}
public function gamesDone(_arg1:TweenEvent):void{
if (!doneFlag){
slam.play();
tagline_in = new Tween(TagLine_mc, "y", Bounce.easeOut, 660, 505, 6, false);
tagline_in.addEventListener(TweenEvent.MOTION_FINISH, taglineDone);
};
}
public function heartBeat(_arg1:TimerEvent){
if (!doneFlag){
heartbeat.play();
heart_alpha_in = new Tween(Brain_mc, "alpha", Bounce.easeIn, 0.1, 1, 10, false);
heart_scaleX_in = new Tween(Brain_mc, "scaleX", Bounce.easeIn, 0.8, 1, 10, false);
heart_scaleY_in = new Tween(Brain_mc, "scaleY", Bounce.easeIn, 0.8, 1, 10, false);
};
}
public function taglineDone(_arg1:TweenEvent):void{
if (!doneFlag){
if (noclickFlag){
slam.play();
HMGSite_mc.visible = true;
hmg_in = new Tween(HMGSite_mc, "y", Bounce.easeOut, 660, 605, 6, false);
} else {
slam.play();
GoToHMG_btn.visible = true;
hmg_in = new Tween(GoToHMG_btn, "y", Bounce.easeOut, 660, 605, 6, false);
};
};
}
public function producedbyDone(_arg1:TweenEvent):void{
if (!doneFlag){
head_in = new Tween(Head_mc, "x", Bounce.easeOut, -200, 20, 6, false);
meat_in = new Tween(Meat_mc, "y", Bounce.easeOut, -175, 20, 6, false);
games_in = new Tween(Games_mc, "x", Bounce.easeOut, 820, 480, 6, false);
games_in.addEventListener(TweenEvent.MOTION_FINISH, gamesDone);
slam.play();
};
}
public function loadHMG(_arg1:MouseEvent):void{
var _local2:URLRequest;
if (!noclickFlag){
_local2 = new URLRequest("http://www.headmeatgames.com");
navigateToURL(_local2, "_blank");
};
}
public function done(_arg1:Event){
if (timer != null){
timer.stop();
};
doneFlag = true;
if (_doneCallback != null){
_doneCallback(_arg1);
} else {
this.parent.removeChild(this);
};
}
public function startAnimation():void{
timer = new Timer(5000);
timer.addEventListener(TimerEvent.TIMER, done);
timer.start();
heartbeatTimer = new Timer(3000, 1);
heartbeatTimer.addEventListener(TimerEvent.TIMER, heartBeat);
heartbeatTimer.start();
slam = new Slam();
heartbeat = new Heartbeat();
producedBy_in = new Tween(ProducedBy_mc, "alpha", Strong.easeIn, 0, 100, 10, false);
producedBy_in.addEventListener(TweenEvent.MOTION_FINISH, producedbyDone);
}
function frame1(){
stop();
HMGSite_mc.y = 700;
HMGSite_mc.visible = false;
GoToHMG_btn.y = 700;
GoToHMG_btn.visible = false;
Head_mc.x = -250;
Meat_mc.y = -175;
Games_mc.x = 820;
TagLine_mc.y = 660;
ProducedBy_mc.alpha = 0;
Brain_mc.alpha = 0.01;
Brain_mc.scaleX = 0.8;
Brain_mc.scaleY = 0.8;
doneFlag = false;
Skip_btn.addEventListener(MouseEvent.CLICK, done);
GoToHMG_btn.addEventListener(MouseEvent.CLICK, loadHMG);
}
}
}//package
Section 204
//HowToPlayScreen (HowToPlayScreen)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import mx.effects.easing.*;
public class HowToPlayScreen extends Sprite {
private var _tweenDoneCallback:Function;
public var _backButton:GameButton;
public var _parent:GameMenuScreen;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
private var _showTween:Tween;
public function HowToPlayScreen(_arg1:GameMenuScreen){
var _local2:Bitmap;
super();
_parent = _arg1;
_backScreen = new Sprite();
_backScreen.graphics.beginFill(0, 0.75);
_backScreen.graphics.drawRect(0, 0, 640, 480);
_backScreen.graphics.endFill();
addChild(_backScreen);
_backDrop = new Sprite();
_local2 = new ResourceManager.HowToPlayImage();
_local2.x = 0;
_local2.y = 0;
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 0, 0x8800AA, 0.85));
this._backDrop.addChild(_local2);
this._backDrop.addChild(Ball.MakeCueBall(15, 0, 0, 515, 29));
this._backDrop.addChild(Ball.MakeSuperBounceBall(15, 0, 0, 474, 84));
this._backDrop.addChild(Ball.MakePerfectBounceBall(15, 0, 0, 515, 84));
this._backDrop.addChild(Ball.MakeNormalBounceBall(15, 0, 0, 554, 84));
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(_backDrop);
_backButton = new GameButton("Back", null, 400, 30, onBackClick);
_backButton.x = 120;
_backButton.y = 410;
_backDrop.addChild(_backButton);
}
public function HideScreen():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenEnd(_arg1:Number):void{
_showTween = null;
_backDrop.y = _arg1;
this._backButton.enabled = true;
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public function onBackClick(_arg1:MouseEvent):void{
HideScreen();
}
public static function ShowScreen(_arg1:GameMenuScreen):HowToPlayScreen{
var _local2:HowToPlayScreen;
_local2 = new HowToPlayScreen(_arg1);
_local2._parent = _arg1;
_local2._parent.addChild(_local2);
_local2._backButton.enabled = false;
_local2._backDrop.y = -(_local2.height);
_local2._backDrop.visible = true;
_local2._showTween = new Tween(_local2, -(_local2._backDrop.height), ((480 - _local2._backDrop.height) * 0.5), 500);
_local2._showTween.easingFunction = Bounce.easeOut;
return (_local2);
}
}
}//package
Section 205
//LevelData (LevelData)
package {
import flash.display.*;
import flash.geom.*;
import mx.effects.*;
import flash.text.*;
import mx.effects.easing.*;
import flash.filters.*;
public class LevelData {
public var _levelPreview:Bitmap;
public var _shotChargeIncrement:Number;// = 1
public var _levelHeight:Number;
public var _cursor:Sprite;
public var _levelShotPar:int;// = 99
public var _levelMultiBallBonus:int;// = 0
public var _bonusTweenStart:Number;// = 400
public var _gWellLayer:Sprite;
public var _levelFriction:Number;// = 0.975
public var _ballLayer:Sprite;
public var _levelRicochetBonus:int;// = 0
public var _blocks:Array;
public var _startBallCount:uint;
public var _bonusTweenEnd:Number;// = 300
public var _bumpers:Array;
public var _shotChargeMax:Number;// = 100
public var _levelGoalScore:int;// = 0
public var _levelWidth:Number;
public var _goals:Array;
public var _backDrop:Sprite;
public var _balls:Array;
public var _levelShotCounter:int;// = 0
public var _blockLayer:Sprite;
public var _shotLineLayer:Sprite;
public var _bonusField:TextField;
public var _gWells:Array;
public var _shotCharge:Number;// = 0
private var _showTween:Tween;
public var _levelUnderParBonus:int;// = 0
private var _tweenDoneCallback:Function;
public var _levelStartBalls:int;// = 0
public var _cue:Ball;
public var _levelUnderParBonusIncrement:int;// = 100
public var _goalLayer:Sprite;
public function LevelData(_arg1:Number, _arg2:Number, _arg3:Number=10, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0.95, _arg7:Boolean=true, _arg8:Number=1, _arg9:BitmapData=null){
var f:Array;
var borderThickness:Number;
var border:Block;
var width = _arg1;
var height = _arg2;
var cueSize = _arg3;
var cueX = _arg4;
var cueY = _arg5;
var levelFriction = _arg6;
var includeBorder = _arg7;
var borderBounce = _arg8;
var bitmapData = _arg9;
_levelFriction = 0.975;
_shotChargeMax = 100;
_shotChargeIncrement = 1;
_shotCharge = 0;
_levelStartBalls = 0;
_levelShotCounter = 0;
_levelShotPar = 99;
_levelUnderParBonusIncrement = 100;
_levelGoalScore = 0;
_levelMultiBallBonus = 0;
_levelRicochetBonus = 0;
_levelUnderParBonus = 0;
_bonusTweenStart = 400;
_bonusTweenEnd = 300;
super();
this._levelFriction = levelFriction;
if (bitmapData == null){
bitmapData = (new ResourceManager.IceBackground() as Bitmap).bitmapData;
};
_levelWidth = width;
_levelHeight = height;
_backDrop = new Sprite();
_backDrop.graphics.beginBitmapFill(bitmapData);
_backDrop.graphics.drawRect(0, 0, _levelWidth, _levelHeight);
_backDrop.graphics.endFill();
_shotLineLayer = new Sprite();
_blockLayer = new Sprite();
_ballLayer = new Sprite();
_gWellLayer = new Sprite();
_goalLayer = new Sprite();
_shotLineLayer.mouseEnabled = false;
_shotLineLayer.mouseChildren = false;
_blockLayer.mouseEnabled = false;
_blockLayer.mouseChildren = false;
_ballLayer.mouseEnabled = false;
_ballLayer.mouseChildren = false;
_gWellLayer.mouseEnabled = false;
_gWellLayer.mouseChildren = false;
_goalLayer.mouseEnabled = false;
_goalLayer.mouseChildren = false;
_backDrop.addChild(_gWellLayer);
_backDrop.addChild(_blockLayer);
_backDrop.addChild(_goalLayer);
_backDrop.addChild(_shotLineLayer);
_backDrop.addChild(_ballLayer);
_gWells = new Array();
_goals = new Array();
_balls = new Array();
_blocks = new Array();
_bumpers = new Array();
if (includeBorder){
borderThickness = 0.1;
border = new Block((_levelWidth * _levelHeight), borderBounce, 102, 1, 51, 0.1, null, new Array(new Point(0, 0), new Point(_levelWidth, 0), new Point(_levelWidth, _levelHeight), new Point(0, _levelHeight)));
border.showCollide = function ():void{
};
border._sprite.filters = new Array();
this.addBlock(border);
};
_cue = Ball.MakeCueBall(cueSize, 0, 0, cueX, cueY);
this.addBall(_cue);
this._cursor = new Sprite();
_cursor.graphics.beginFill(0x660066, 0.9);
_cursor.graphics.drawCircle(0, 0, cueSize);
_cursor.graphics.drawCircle(0, 0, (cueSize - 1));
_cursor.graphics.drawCircle(0, 0, (cueSize - 2));
_cursor.graphics.drawCircle(0, 0, (cueSize - 3));
_cursor.graphics.drawCircle(0, 0, 1);
_cursor.graphics.endFill();
this._cursor.x = (width * 0.5);
this._cursor.y = (height * 0.5);
_backDrop.addChild(this._cursor);
f = this._shotLineLayer.filters;
f.push(new GlowFilter(0, 1, (cueSize * 1), (cueSize * 1), 2, 1, true));
this._shotLineLayer.filters = f;
_bonusTweenStart = height;
_bonusTweenEnd = (height - 100);
this._bonusField = new TextField();
this._bonusField.defaultTextFormat = new TextFormat("Abbess", 30, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._bonusField.selectable = false;
this._bonusField.mouseEnabled = false;
this._bonusField.tabEnabled = false;
this._bonusField.embedFonts = true;
this._bonusField.antiAliasType = AntiAliasType.ADVANCED;
this._bonusField.width = 640;
this._bonusField.height = 480;
this._bonusField.x = ((width - _bonusField.width) * 0.5);
this._bonusField.y = _bonusTweenStart;
this._bonusField.visible = false;
_backDrop.addChild(this._bonusField);
f = this._bonusField.filters;
f.push(new DropShadowFilter(4, -45, 0xFFFFFF, 1, 7, 7, 1, 1, true));
f.push(new GlowFilter(0, 0.5, 15, 15));
this._bonusField.filters = f;
this._bonusField.cacheAsBitmap = true;
}
public function addGravityWell(_arg1:GravityWell):void{
var _local2:int;
_local2 = this._gWells.indexOf(_arg1);
if (_local2 == -1){
this._gWells.push(_arg1);
this._gWellLayer.addChild(_arg1);
};
}
public function GetScoreToken():Object{
var _local1:Object;
_local1 = {levelGoalScore:_levelGoalScore, levelMultiBallBonus:_levelMultiBallBonus, levelRicochetBonus:_levelRicochetBonus, levelUnderParBonus:_levelUnderParBonus, levelUnderParBonusIncrement:_levelUnderParBonusIncrement, levelShotCounter:_levelShotCounter};
return (_local1);
}
public function GetShotPowerRatio():Number{
return ((this._shotCharge / this._shotChargeMax));
}
public function GetShotPower():Number{
return ((this.GetShotPowerRatio() * Ball.MAXVELOCITY));
}
public function HideBonusField():void{
this._bonusField.visible = false;
this._bonusField.alpha = 1;
}
public function removeBumper(_arg1:Bumper):void{
var _local2:int;
_local2 = this._bumpers.indexOf(_arg1);
if (_local2 != -1){
this._bumpers.splice(_local2, 1);
this._blockLayer.removeChild(_arg1);
};
}
public function addBlock(_arg1:Block):void{
var _local2:int;
_local2 = this._blocks.indexOf(_arg1);
if (_local2 == -1){
this._blocks.push(_arg1);
this._blockLayer.addChild(_arg1);
};
}
public function LoadScoreToken(_arg1:Object):void{
this._levelGoalScore = _arg1.levelGoalScore;
this._levelMultiBallBonus = _arg1.levelMultiBallBonus;
this._levelRicochetBonus = _arg1.levelRicochetBonus;
this._levelUnderParBonus = _arg1.levelUnderParBonus;
this._levelUnderParBonusIncrement = _arg1.levelUnderParBonusIncrement;
this._levelShotCounter = _arg1.levelShotCounter;
}
public function onTweenUpdate(_arg1:Number):void{
this._bonusField.y = _arg1;
}
public function removeBall(_arg1:Ball):void{
var _local2:int;
_local2 = this._balls.indexOf(_arg1);
if (_local2 != -1){
this._balls.splice(_local2, 1);
this._ballLayer.removeChild(_arg1);
};
}
public function addBall(_arg1:Ball):void{
var _local2:int;
_local2 = this._balls.indexOf(_arg1);
if (_local2 == -1){
this._balls.push(_arg1);
this._ballLayer.addChild(_arg1);
};
}
public function GenerateShotLine():Sprite{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Graphics;
var _local5:Vector;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Point;
var _local13:Point;
var _local14:Number;
_local1 = this._cursor.x;
_local2 = this._cursor.y;
_local3 = Math.min((this.GetShotPowerRatio() + 0.3), 0.85);
_local4 = this._shotLineLayer.graphics;
_local5 = Vector.fromPoints(new Point(_cue.x, _cue.y), new Point(_local1, _local2));
_local6 = _local5.length;
_local5 = _local5.Normalize();
_local4.clear();
_local4.moveTo(_cue.x, _cue.y);
_local4.lineStyle((this._cue._radius * 2), 0xFFFFFF, 0.4);
_local4.lineTo((_cue.x + (_local5.x * 700)), (_cue.y + (_local5.y * 700)));
_local7 = Math.min(_local6, (this._shotChargeMax * 2));
_local8 = -(_local5.y);
_local9 = _local5.x;
_local10 = _local5.y;
_local11 = -(_local5.x);
_local12 = new Point((_cue.x + (_local5.x * _local7)), (_cue.y + (_local5.y * _local7)));
_local13 = new Point((_cue.x + (_local5.x * (_local7 * 0.75))), (_cue.y + (_local5.y * (_local7 * 0.75))));
_local14 = this._cue._radius;
_local4.moveTo(_cue.x, _cue.y);
_local4.lineStyle((this._cue._radius * 1), 0x660000, _local3, false, "normal", null, JointStyle.ROUND);
_local4.lineTo(_local12.x, _local12.y);
_local4.lineTo((_local13.x + ((_local8 * _local14) * 0.5)), (_local13.y + ((_local9 * _local14) * 0.5)));
_local4.lineTo((_local13.x + ((_local10 * _local14) * 0.5)), (_local13.y + ((_local11 * _local14) * 0.5)));
_local4.lineTo(_local12.x, _local12.y);
return (this._shotLineLayer);
}
public function ShowBonusField(_arg1:String):void{
this._bonusField.text = _arg1;
this._bonusField.y = _bonusTweenStart;
this._bonusField.alpha = 1;
this._bonusField.visible = true;
_showTween = new Tween(this, _bonusTweenStart, _bonusTweenEnd, 1000);
_showTween.easingFunction = Bounce.easeOut;
}
public function TotalScore():int{
return ((((this._levelGoalScore + this._levelMultiBallBonus) + this._levelRicochetBonus) + this._levelUnderParBonus));
}
public function removeGravityWell(_arg1:GravityWell):void{
var _local2:int;
_local2 = this._gWells.indexOf(_arg1);
if (_local2 != -1){
this._gWells.splice(_local2, 1);
this._gWellLayer.removeChild(_arg1);
};
}
public function addGoal(_arg1:Goal):void{
var _local2:int;
_local2 = this._goals.indexOf(_arg1);
if (_local2 == -1){
this._goals.push(_arg1);
this._goalLayer.addChild(_arg1);
};
}
public function removeGoal(_arg1:Goal):void{
var _local2:int;
_local2 = this._goals.indexOf(_arg1);
if (_local2 != -1){
this._goals.splice(_local2, 1);
this._goalLayer.removeChild(_arg1);
};
}
public function ClearShotLine():void{
var _local1:Graphics;
_local1 = this._shotLineLayer.graphics;
_local1.clear();
}
public function addBumper(_arg1:Bumper):void{
var _local2:int;
_local2 = this._bumpers.indexOf(_arg1);
if (_local2 == -1){
this._bumpers.push(_arg1);
this._blockLayer.addChild(_arg1);
};
}
public function removeBlock(_arg1:Block):void{
var _local2:int;
_local2 = this._blocks.indexOf(_arg1);
if (_local2 != -1){
this._blocks.splice(_local2, 1);
this._blockLayer.removeChild(_arg1);
};
}
public function onTweenEnd(_arg1:Number):void{
this.onTweenUpdate(_arg1);
this.HideBonusField();
}
public function GeneratePreview(_arg1:Number=0.075):void{
this._levelPreview = DisplayConverter.spriteToBitmap(this._backDrop, false, _arg1, this._levelWidth, this._levelHeight);
}
}
}//package
Section 206
//LevelMenuScreen (LevelMenuScreen)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import flash.net.*;
import flash.media.*;
import mx.effects.easing.*;
import flash.filters.*;
public class LevelMenuScreen extends Sprite {
public var _playMoreGamesButton:MovieClip;
public var _titleField:TextField;
public var _toggleMusicButton:GameButton;
public var _exitMenuButton:GameButton;
public var _toggleQualityButton:GameButton;
private var _tweenDoneCallback:Function;
public var _quitToMenuButton:GameButton;
public var _closeCallback:Function;
public var _parent:DisplayObjectContainer;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
private var _showTween:Tween;
public var _toggleSoundEffectsButton:GameButton;
public function LevelMenuScreen(){
var _local1:Array;
super();
this._backScreen = new Sprite();
this._backScreen.graphics.beginFill(0, 0.5);
this._backScreen.graphics.drawRect(0, 0, 640, 480);
this._backScreen.graphics.endFill();
this.addChild(_backScreen);
this._backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(370, 400, 20, 0, 0x8800AA, 0.85));
this._titleField = new TextField();
this._titleField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._titleField.embedFonts = true;
this._titleField.selectable = false;
this._titleField.mouseEnabled = false;
this._titleField.text = "Menu";
this._titleField.alpha = 0.85;
this._titleField.width = 370;
this._titleField.height = 120;
this._titleField.y = 25;
_local1 = this._titleField.filters;
_local1.push(new DropShadowFilter(4, 167, 0, 0.75, 4, 4, 1, 1, true));
this._titleField.filters = _local1;
this._playMoreGamesButton = new ResourceManager.BubbleBoxLogoButton();
this._playMoreGamesButton.width = 225;
this._playMoreGamesButton.height = 40;
this._playMoreGamesButton.x = 72.5;
this._playMoreGamesButton.y = 70;
this._playMoreGamesButton.enabled = false;
this._backDrop.addChild(this._playMoreGamesButton);
this._quitToMenuButton = new GameButton("Quit to Main Menu", null, 300, 30, onQuitToMainClick);
this._quitToMenuButton.x = 35;
this._quitToMenuButton.y = 120;
this._quitToMenuButton.enabled = false;
this._backDrop.addChild(this._quitToMenuButton);
this._toggleMusicButton = new GameButton("Turn Music OFF", null, 300, 30, onToggleMusicClick);
this._toggleMusicButton.x = 35;
this._toggleMusicButton.y = 180;
this._toggleMusicButton.enabled = false;
this._backDrop.addChild(this._toggleMusicButton);
this._toggleSoundEffectsButton = new GameButton("Turn Sound Effects OFF", null, 300, 30, onToggleSoundEffectsClick);
this._toggleSoundEffectsButton.x = 35;
this._toggleSoundEffectsButton.y = 220;
this._toggleSoundEffectsButton.enabled = false;
this._backDrop.addChild(this._toggleSoundEffectsButton);
this._toggleQualityButton = new GameButton("Turn Graphics Quality LOW", null, 300, 30, onToggleQualityClick);
this._toggleQualityButton.x = 35;
this._toggleQualityButton.y = 280;
this._toggleQualityButton.enabled = false;
this._backDrop.addChild(this._toggleQualityButton);
this._exitMenuButton = new GameButton("Back", null, 200, 30, onExitMenuClick);
this._exitMenuButton.x = 85;
this._exitMenuButton.y = 340;
this._exitMenuButton.enabled = false;
this._backDrop.addChild(this._exitMenuButton);
this._backDrop.addChild(this._titleField);
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(this._backDrop);
}
public function getNextQualityString():String{
var _local1:String;
_local1 = stage.quality;
if (_local1 == "BEST"){
_local1 = "LOW";
} else {
if (_local1 == "HIGH"){
_local1 = "BEST";
} else {
if (_local1 == "MEDIUM"){
_local1 = "HIGH";
} else {
if (_local1 == "LOW"){
_local1 = "MEDIUM";
};
};
};
};
return (_local1);
}
public function onPlayMoreGamesClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "e9386c9e");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=levelmenu");
navigateToURL(_local2, "_blank");
}
public function onExitMenuClick(_arg1:MouseEvent):void{
this.HideMenu();
}
public function onTweenEnd(_arg1:Number):void{
_backDrop.y = _arg1;
this._quitToMenuButton.enabled = true;
this._playMoreGamesButton.enabled = true;
this._exitMenuButton.enabled = true;
this._toggleMusicButton.enabled = true;
this._toggleSoundEffectsButton.enabled = true;
this._toggleQualityButton.enabled = true;
}
public function onQuitToMainClick(_arg1:MouseEvent):void{
this.HideMenu();
if ((_parent is Massle)){
(_parent as Massle).UnloadLevel();
if (((!((_parent.stage == null))) && (_parent.stage.contains(_parent)))){
_parent.stage.removeChild(_parent);
};
};
}
public function onToggleQualityClick(_arg1:MouseEvent):void{
stage.quality = this.getNextQualityString();
_toggleQualityButton._label.text = ("Set Graphics Quality " + this.getNextQualityString().toUpperCase());
}
public function onToggleSoundEffectsClick(_arg1:MouseEvent):void{
SoundManager._globalSoundEffectTransform.volume = ((SoundManager._globalSoundEffectTransform.volume)==0) ? 0.5 : 0;
_toggleSoundEffectsButton._label.text = ((SoundManager._globalSoundEffectTransform.volume)==0) ? "Turn Sound Effects ON" : "Turn Sound Effects OFF";
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public function onToggleMusicClick(_arg1:MouseEvent):void{
SoundManager._globalSoundMusicTransform.volume = ((SoundManager._globalSoundMusicTransform.volume)==0) ? 0.5 : 0;
SoundManager._musicChannel.soundTransform = new SoundTransform((SoundManager._globalSoundMusicTransform.volume * 0.5));
_toggleMusicButton._label.text = ((SoundManager._globalSoundMusicTransform.volume)==0) ? "Turn Music ON" : "Turn Music OFF";
}
public function HideMenu():void{
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
if (this._closeCallback != null){
this._closeCallback();
};
}
public static function ShowMenu(_arg1:DisplayObjectContainer, _arg2:Function=null):LevelMenuScreen{
var _local3:LevelMenuScreen;
_local3 = new (LevelMenuScreen);
_local3._closeCallback = _arg2;
_local3._parent = _arg1;
_local3._parent.addChild(_local3);
_local3._toggleMusicButton._label.text = ((SoundManager._globalSoundMusicTransform.volume)==0) ? "Turn Music ON" : "Turn Music OFF";
_local3._toggleSoundEffectsButton._label.text = ((SoundManager._globalSoundEffectTransform.volume)==0) ? "Turn Sound Effects ON" : "Turn Sound Effects OFF";
_local3._toggleQualityButton._label.text = ("Set Graphics Quality " + _local3.getNextQualityString().toUpperCase());
_local3._backDrop.y = -(_local3.height);
_local3._backDrop.visible = true;
_local3._showTween = new Tween(_local3, -(_local3._backDrop.height), ((480 - _local3._backDrop.height) * 0.5), 500);
_local3._showTween.easingFunction = Elastic.easeOut;
return (_local3);
}
}
}//package
Section 207
//LevelOverDialog (LevelOverDialog)
package {
import flash.events.*;
import flash.display.*;
import mx.effects.*;
import flash.text.*;
import flash.net.*;
import flash.media.*;
import mx.effects.easing.*;
import flash.filters.*;
public class LevelOverDialog extends Sprite {
public var _levelResult:String;// = "Level Passed!"
public var _goalScoreField:TextField;
public var _goalScoreLabel:TextField;
public var _resultField:TextField;
public var _playMoreGamesButton:GameButton;
public var _levelTimeSeconds:int;// = 0
public var _ricochetBonusLabel:TextField;
public var _multiBallBonusField:TextField;
public var _multiBallBonusLabel:TextField;
public var _ricochetBonusField:TextField;
public var _continueCallback:Function;
public var _unlockedMessage:TextField;
private var _tweenDoneCallback:Function;
public var _parBonusLabel:TextField;
private var _feedbackSound:SoundChannel;
public var _parBonusField:TextField;
public var _totalScoreLabel:TextField;
public var _totalScoreField:TextField;
public var _parent:DisplayObjectContainer;
public var _backScreen:Sprite;
public var _backDrop:Sprite;
public var _succeeded:Boolean;
public var _showUnlocked:Boolean;
private var _showTween:Tween;
public var _doneButton:GameButton;
public function LevelOverDialog(_arg1:Boolean){
var _local2:Array;
_levelResult = "Level Passed!";
_levelTimeSeconds = 0;
super();
this._backScreen = new Sprite();
this._backScreen.graphics.beginFill(0, 0.5);
this._backScreen.graphics.drawRect(0, 0, 640, 480);
this._backScreen.graphics.endFill();
this.addChild(_backScreen);
this._unlockedMessage = new TextField();
this._unlockedMessage.defaultTextFormat = new TextFormat("Abbess", 30, 0xFF0000, null, null, null, null, null, TextFormatAlign.CENTER);
this._unlockedMessage.embedFonts = true;
this._unlockedMessage.antiAliasType = AntiAliasType.ADVANCED;
this._unlockedMessage.selectable = false;
this._unlockedMessage.mouseEnabled = false;
this._unlockedMessage.text = "Free Play Level UNLOCKED!";
this._unlockedMessage.alpha = 1;
this._unlockedMessage.visible = false;
this._unlockedMessage.width = 550;
this._unlockedMessage.height = 120;
this._unlockedMessage.y = 110;
this._backDrop = new Sprite();
this._backDrop.addChild(SpriteFactory.makeBorderedFrame(550, (_arg1) ? 400 : 465, 20, 0, 0xAA00AA, 0.75));
this._resultField = new TextField();
this._resultField.defaultTextFormat = new TextFormat("Abbess", 100, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
this._resultField.embedFonts = true;
this._resultField.antiAliasType = AntiAliasType.ADVANCED;
this._resultField.selectable = false;
this._resultField.mouseEnabled = false;
this._resultField.text = "You Win!";
this._resultField.alpha = 0.85;
this._resultField.width = 550;
this._resultField.height = 120;
this._resultField.y = 25;
this._goalScoreLabel = new TextField();
this._goalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._goalScoreLabel.embedFonts = true;
this._goalScoreLabel.antiAliasType = AntiAliasType.ADVANCED;
this._goalScoreLabel.selectable = false;
this._goalScoreLabel.mouseEnabled = false;
this._goalScoreLabel.text = "Goal Points:";
this._goalScoreLabel.alpha = 0.85;
this._goalScoreLabel.width = 250;
this._goalScoreLabel.height = 35;
this._goalScoreLabel.x = 25;
this._goalScoreLabel.y = 145;
this._goalScoreField = new TextField();
this._goalScoreField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._goalScoreField.embedFonts = true;
this._goalScoreField.antiAliasType = AntiAliasType.ADVANCED;
this._goalScoreField.selectable = false;
this._goalScoreField.mouseEnabled = false;
this._goalScoreField.text = "0";
this._goalScoreField.alpha = 0.85;
this._goalScoreField.width = 200;
this._goalScoreField.height = 35;
this._goalScoreField.x = 300;
this._goalScoreField.y = 145;
this._parBonusLabel = new TextField();
this._parBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._parBonusLabel.embedFonts = true;
this._parBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._parBonusLabel.selectable = false;
this._parBonusLabel.mouseEnabled = false;
this._parBonusLabel.text = "Under Par Bonus:";
this._parBonusLabel.alpha = 0.85;
this._parBonusLabel.width = 250;
this._parBonusLabel.height = 35;
this._parBonusLabel.x = 25;
this._parBonusLabel.y = 180;
this._parBonusField = new TextField();
this._parBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._parBonusField.embedFonts = true;
this._parBonusField.antiAliasType = AntiAliasType.ADVANCED;
this._parBonusField.selectable = false;
this._parBonusField.mouseEnabled = false;
this._parBonusField.text = "0";
this._parBonusField.alpha = 0.85;
this._parBonusField.width = 200;
this._parBonusField.height = 35;
this._parBonusField.x = 300;
this._parBonusField.y = 180;
this._ricochetBonusLabel = new TextField();
this._ricochetBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._ricochetBonusLabel.embedFonts = true;
this._ricochetBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._ricochetBonusLabel.selectable = false;
this._ricochetBonusLabel.mouseEnabled = false;
this._ricochetBonusLabel.text = "Ricochet Bonus:";
this._ricochetBonusLabel.alpha = 0.85;
this._ricochetBonusLabel.width = 250;
this._ricochetBonusLabel.height = 35;
this._ricochetBonusLabel.x = 25;
this._ricochetBonusLabel.y = 215;
this._ricochetBonusField = new TextField();
this._ricochetBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._ricochetBonusField.embedFonts = true;
this._ricochetBonusField.antiAliasType = AntiAliasType.ADVANCED;
this._ricochetBonusField.selectable = false;
this._ricochetBonusField.mouseEnabled = false;
this._ricochetBonusField.text = "0";
this._ricochetBonusField.alpha = 0.85;
this._ricochetBonusField.width = 200;
this._ricochetBonusField.height = 35;
this._ricochetBonusField.x = 300;
this._ricochetBonusField.y = 215;
this._multiBallBonusLabel = new TextField();
this._multiBallBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._multiBallBonusLabel.embedFonts = true;
this._multiBallBonusLabel.antiAliasType = AntiAliasType.ADVANCED;
this._multiBallBonusLabel.selectable = false;
this._multiBallBonusLabel.mouseEnabled = false;
this._multiBallBonusLabel.text = "Multi Ball Bonus:";
this._multiBallBonusLabel.alpha = 0.85;
this._multiBallBonusLabel.width = 250;
this._multiBallBonusLabel.height = 35;
this._multiBallBonusLabel.x = 25;
this._multiBallBonusLabel.y = 250;
this._multiBallBonusField = new TextField();
this._multiBallBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._multiBallBonusField.embedFonts = true;
this._multiBallBonusField.antiAliasType = AntiAliasType.ADVANCED;
this._multiBallBonusField.selectable = false;
this._multiBallBonusField.mouseEnabled = false;
this._multiBallBonusField.text = "0";
this._multiBallBonusField.alpha = 0.85;
this._multiBallBonusField.width = 200;
this._multiBallBonusField.height = 35;
this._multiBallBonusField.x = 300;
this._multiBallBonusField.y = 250;
this._totalScoreLabel = new TextField();
this._totalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 25, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT);
this._totalScoreLabel.embedFonts = true;
this._totalScoreLabel.antiAliasType = AntiAliasType.ADVANCED;
this._totalScoreLabel.selectable = false;
this._totalScoreLabel.mouseEnabled = false;
this._totalScoreLabel.text = "Total Level Score:";
this._totalScoreLabel.alpha = 0.85;
this._totalScoreLabel.width = 250;
this._totalScoreLabel.height = 45;
this._totalScoreLabel.x = 25;
this._totalScoreLabel.y = 295;
this._totalScoreField = new TextField();
this._totalScoreField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
this._totalScoreField.embedFonts = true;
this._totalScoreField.antiAliasType = AntiAliasType.ADVANCED;
this._totalScoreField.selectable = false;
this._totalScoreField.mouseEnabled = false;
this._totalScoreField.text = "0";
this._totalScoreField.alpha = 0.85;
this._totalScoreField.width = 200;
this._totalScoreField.height = 45;
this._totalScoreField.x = 300;
this._totalScoreField.y = 295;
_local2 = this._unlockedMessage.filters;
_local2.push(new GlowFilter(0xAA0000, 0.5, 20, 20, 1, 1, true));
_local2.push(new DropShadowFilter(2, 167, 0, 0.75, 4, 4, 1, 1, true));
this._unlockedMessage.filters = _local2;
_local2 = this._resultField.filters;
_local2.push(new GlowFilter(0xFFFFFF, 0.75, 20, 20, 3, 1, true));
_local2.push(new DropShadowFilter(4, 167, 0, 0.75, 4, 4, 1, 1, true));
this._resultField.filters = _local2;
_local2 = this._goalScoreLabel.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._goalScoreLabel.filters = _local2;
_local2 = this._goalScoreField.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._goalScoreField.filters = _local2;
_local2 = this._parBonusLabel.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._parBonusLabel.filters = _local2;
_local2 = this._ricochetBonusField.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._ricochetBonusField.filters = _local2;
_local2 = this._ricochetBonusLabel.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._ricochetBonusLabel.filters = _local2;
_local2 = this._multiBallBonusField.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._multiBallBonusField.filters = _local2;
_local2 = this._multiBallBonusLabel.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._multiBallBonusLabel.filters = _local2;
_local2 = this._parBonusField.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._parBonusField.filters = _local2;
_local2 = this._totalScoreLabel.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._totalScoreLabel.filters = _local2;
_local2 = this._totalScoreField.filters;
_local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true));
this._totalScoreField.filters = _local2;
this._doneButton = new GameButton("Continue", null, 400, 40, onContinueClick);
this._doneButton.x = 75;
this._doneButton.y = 340;
this._doneButton.enabled = false;
this._backDrop.addChild(this._doneButton);
this._playMoreGamesButton = new GameButton("Play More Games", null, 300, 40, onPlayMoreGamesClick);
this._playMoreGamesButton.x = 125;
this._playMoreGamesButton.y = 400;
this._playMoreGamesButton.enabled = false;
this._playMoreGamesButton.visible = !(_arg1);
this._backDrop.addChild(this._playMoreGamesButton);
this._backDrop.addChild(this._resultField);
this._backDrop.addChild(this._unlockedMessage);
this._backDrop.addChild(this._goalScoreLabel);
this._backDrop.addChild(this._goalScoreField);
this._backDrop.addChild(this._parBonusLabel);
this._backDrop.addChild(this._parBonusField);
this._backDrop.addChild(this._ricochetBonusLabel);
this._backDrop.addChild(this._ricochetBonusField);
this._backDrop.addChild(this._multiBallBonusLabel);
this._backDrop.addChild(this._multiBallBonusField);
this._backDrop.addChild(this._totalScoreLabel);
this._backDrop.addChild(this._totalScoreField);
this._backDrop.x = ((640 - this._backDrop.width) * 0.5);
addChild(this._backDrop);
}
public function onPlayMoreGamesClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "0594ee73");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=levelover");
navigateToURL(_local2, "_blank");
}
public function HideDialog():void{
if (_feedbackSound != null){
_feedbackSound.stop();
};
this._unlockedMessage.visible = false;
_backDrop.visible = false;
_backDrop.y = -(_backDrop.height);
_parent.removeChild(this);
}
public function onTweenEnd(_arg1:Number):void{
var _local2:int;
if (!_succeeded){
this._feedbackSound = SoundManager.playShortMurmur();
} else {
_local2 = Math.floor((Math.random() * 3));
switch (_local2){
case 0:
this._feedbackSound = SoundManager.playShortCheer1();
break;
case 1:
this._feedbackSound = SoundManager.playShortCheer2();
break;
case 2:
this._feedbackSound = SoundManager.playShortCheer3();
break;
default:
this._feedbackSound = SoundManager.playShortCheer1();
break;
};
};
_backDrop.y = _arg1;
this._doneButton.enabled = true;
this._playMoreGamesButton.enabled = true;
}
public function onContinueClick(_arg1:MouseEvent):void{
if (this._continueCallback != null){
this._continueCallback(_arg1);
};
}
public function onTweenUpdate(_arg1:Number):void{
_backDrop.y = _arg1;
}
public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:String, _arg3:LevelData, _arg4:String, _arg5:Function, _arg6:Boolean, _arg7:Boolean):LevelOverDialog{
var _local8:LevelOverDialog;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:TextFormat;
_local8 = new LevelOverDialog(_arg6);
_local8._showUnlocked = _arg7;
_local8._resultField.text = _arg2;
_local8._succeeded = _arg6;
if (_arg6){
_local8._doneButton._label.text = "Continue";
} else {
_local8._doneButton._label.text = "Try Again";
};
_local8._continueCallback = _arg5;
_local8._parent = _arg1;
_local8._parent.addChild(_local8);
_local8._goalScoreField.text = _arg3._levelGoalScore.toString();
_local9 = (_arg3._levelShotPar - _arg3._levelShotCounter);
_local10 = (_local9 * _arg3._levelUnderParBonusIncrement);
_local11 = _arg3.TotalScore();
if (_local9 < 0){
_local12 = _local8._parBonusLabel.defaultTextFormat;
_local12.color = 0xAA0000;
_local8._parBonusLabel.defaultTextFormat = _local12;
_local12 = _local8._parBonusField.defaultTextFormat;
_local12.color = 0xAA0000;
_local8._parBonusField.defaultTextFormat = _local12;
};
_local8._parBonusField.text = (((((_local10.toString() + " (") + _local9.toString()) + " x ") + _arg3._levelUnderParBonusIncrement.toString()) + ")");
_local8._ricochetBonusField.text = _arg3._levelRicochetBonus.toString();
_local8._multiBallBonusField.text = _arg3._levelMultiBallBonus.toString();
if (_local11 < 0){
_local12 = _local8._totalScoreField.defaultTextFormat;
_local12.color = 0xAA0000;
_local8._totalScoreField.defaultTextFormat = _local12;
};
_local8._totalScoreField.text = _local11.toString();
_local8._backDrop.y = -(_local8._backDrop.height);
_local8._backDrop.visible = true;
_local8._unlockedMessage.visible = _local8._showUnlocked;
_local8._showTween = new Tween(_local8, -(_local8._backDrop.height), ((480 - _local8._backDrop.height) * 0.5), 1000);
_local8._showTween.easingFunction = Bounce.easeOut;
return (_local8);
}
}
}//package
Section 208
//Line (Line)
package {
import flash.geom.*;
public dynamic class Line {
private var _P1toP2Vector:Vector;
private var _RHNormal:Vector;
private var _p1:Point;
private var _p2:Point;
private var _LHNormal:Vector;
public var _bounce:Number;
public function Line(_arg1:Point, _arg2:Point, _arg3:Number=1){
_p1 = _arg1.clone();
_p2 = _arg2.clone();
_bounce = _arg3;
this._calcNormals();
}
public function get LHNormal():Vector{
return (_LHNormal);
}
public function get p1():Point{
return (_p1);
}
public function set p1(_arg1:Point):void{
_p1 = _arg1.clone();
_calcNormals();
}
public function set p2(_arg1:Point):void{
_p2 = _arg1.clone();
_calcNormals();
}
public function get p2():Point{
return (_p2);
}
private function _calcNormals():void{
_P1toP2Vector = Vector.fromPoints(p1, p2);
_LHNormal = _P1toP2Vector.NormalLH();
_RHNormal = _P1toP2Vector.NormalRH();
}
public function get length():Number{
return (_P1toP2Vector.length);
}
public function Offset(_arg1:Number, _arg2:Number):Line{
var _local3:Point;
var _local4:Point;
var _local5:Line;
_local3 = new Point((_p1.x + _arg1), (_p1.y + _arg2));
_local4 = new Point((_p2.x + _arg1), (_p2.y + _arg2));
_local5 = new Line(_local3, _local4);
return (_local5);
}
public function Rotate(_arg1:Number):Line{
var _local2:Line;
_local2 = new Line(Vector.fromPoint(_p1).Rotate(_arg1).ToPoint(), Vector.fromPoint(_p2).Rotate(_arg1).ToPoint());
return (_local2);
}
public function get RHNormal():Vector{
return (_RHNormal);
}
public static function makeLines(_arg1:Point, _arg2:Point, ... _args):Array{
var _local4:Array;
return (_local4);
}
public static function FromPointAndVector(_arg1:Point, _arg2:Vector):Line{
var _local3:Line;
_local3 = new Line(_arg1, new Point((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)));
return (_local3);
}
}
}//package
Section 209
//LoadScreen (LoadScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class LoadScreen extends MovieClip {
private var _BubbleBoxSplashScreenTimer:Timer;
private var _splashScreenDone:Boolean;// = false
private var _loadBackDrop:Sprite;
private var _splashScreen:HMGSplashScreen;
private var _loadFrame:Sprite;
private var _BubbleBoxSplashScreen:MovieClip;
public static const siteLocked:Boolean = false;
public static const fileLocked:Boolean = false;
public static var LocalCopy:Boolean = false;
public static var HMGHosted:Boolean = false;
public static var IllegalCopy:Boolean = false;
public function LoadScreen(){
_splashScreenDone = false;
super();
stop();
_loadBackDrop = new Sprite();
_loadBackDrop.graphics.beginFill(0);
_loadBackDrop.graphics.drawRect(0, 0, 640, 480);
_loadBackDrop.graphics.endFill();
addChild(_loadBackDrop);
_loadFrame = SpriteFactory.makeBorder(640, 480, 0x990099);
_BubbleBoxSplashScreen = new ResourceManager.BubbleBoxSplashScreen();
_BubbleBoxSplashScreen.mouseEnabled = false;
_loadBackDrop.addChild(_BubbleBoxSplashScreen);
_loadBackDrop.addChild(_loadFrame);
_loadBackDrop.addEventListener(MouseEvent.CLICK, onSponsorSplashScreenClick);
_BubbleBoxSplashScreen.addEventListener(MouseEvent.CLICK, onSponsorSplashScreenClick);
_BubbleBoxSplashScreenTimer = new Timer(5000);
_BubbleBoxSplashScreenTimer.addEventListener(TimerEvent.TIMER, onSponsorSplashScreenDone);
_BubbleBoxSplashScreenTimer.start();
}
private function onSponsorSplashScreenDone(_arg1:TimerEvent):void{
var event = _arg1;
_BubbleBoxSplashScreenTimer.stop();
_loadBackDrop.removeEventListener(MouseEvent.CLICK, onSponsorSplashScreenClick);
_BubbleBoxSplashScreen.removeEventListener(MouseEvent.CLICK, onSponsorSplashScreenClick);
_loadBackDrop.removeChild(_BubbleBoxSplashScreen);
_splashScreen = new HMGSplashScreen();
_splashScreen.width = 620;
_splashScreen.height = 460;
_splashScreen.x = 20;
_splashScreen.y = 10;
_loadBackDrop.addChildAt(_splashScreen, 0);
_splashScreen._doneCallback = function (_arg1:Event):void{
trace("done");
_splashScreenDone = true;
};
addEventListener(Event.ENTER_FRAME, onEnterFrame);
_splashScreen.startAnimation();
}
private function onSponsorSplashScreenClick(_arg1:MouseEvent):void{
var _local2:URLRequest;
MochiBot.track(this, "89560c66");
_local2 = new URLRequest("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1001&subid=splashscreen");
navigateToURL(_local2, "_blank");
}
private function onEnterFrame(_arg1:Event):void{
if (((_splashScreenDone) && ((this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal)))){
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
initApp();
};
}
private function initApp(_arg1:Boolean=false):void{
var _local2:Class;
var _local3:String;
var _local4:RegExp;
var _local5:Boolean;
var _local6:SiteLockScreen;
var _local7:Object;
trace((("loader URL(" + this.root.loaderInfo.loaderURL) + ")"));
if (this.root.loaderInfo.loaderURL.indexOf("http") != 0){
trace("From Local Copy!");
_slot1.LocalCopy = true;
} else {
_local3 = this.root.loaderInfo.loaderURL;
_local4 = new RegExp("^http://((www.){0,1}headmeatgames.com|(www.){0,1}flashgamelicense.com|(files.|www.){0,1}otherplay.com|(www.){0,1}bubblebox.com)", "i");
_local5 = (_local3.search(_local4) == 0);
if (!_local5){
trace("NOT FROM APPROVED SITE!");
_slot1.IllegalCopy = true;
} else {
trace("FROM APPROVED SITE...hooray!");
};
_local4 = new RegExp("(^http://(www.){0,1}headmeatgames.com)", "i");
_slot1.HMGHosted = (_local3.search(_local4) == 0);
};
if (((((_slot1.IllegalCopy) && (_slot1.siteLocked))) || (((_slot1.LocalCopy) && (_slot1.fileLocked))))){
trace("Illegal or Local Copy. Stopping...");
_local6 = new SiteLockScreen();
this.addChild(_local6);
this.stop();
return;
};
_local2 = Class(getDefinitionByName("GameMenuScreen"));
if (_local2){
_local7 = new (_local2);
parent.addChild((_local7 as DisplayObject));
_local7.init();
};
this.removeChild(this._loadBackDrop);
this._loadBackDrop = null;
this._loadFrame = null;
}
}
}//package
Section 210
//Massle (Massle)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class Massle extends Sprite {
public var _fps:Timer;
public var _mouseIsDown:Boolean;
public var _gWells:Array;
public var _frameRate:Number;// = 60
public var _lod:LevelOverDialog;
public var _shotsLeftLabel:TextField;
public var _shotsLeftField:TextField;
public var _blocks:Array;
public var _messages:int;// = 0
public var _renderPump:Timer;
public var _goals:Array;
public var _parentMenu:GameMenuScreen;
public var _frameSprite:Bitmap;
public var _moveLeft:Boolean;
public var _menuButton:GameButton;
public var _ballsPottedThisShot:int;// = 0
public var _frameRateField:TextField;
public var _bumpers:Array;
public var _lastFPS:int;
public var _moveRight:Boolean;
public var _messagePump:Timer;
public var _balls:Array;
public var _ballsLeftLabel:TextField;
public var _ballsLeftField:TextField;
public var _inFreePlayMode:Boolean;// = false
public var _currentLevel:LevelData;
public var _moveUp:Boolean;
public var _moveDown:Boolean;
public var _lastT:Number;// = 0
public var _levelMenu:LevelMenuScreen;
public var _resetButton:GameButton;
public var _frames:int;// = 0
public var _backDrop:Sprite;
public var _timeSlices:int;// = 0
public var _t:Number;// = 0
public static const EPSILON:Number = 0.02;
public static var BallsInMotion:Boolean = false;
public function Massle(_arg1:GameMenuScreen){
_inFreePlayMode = false;
_frameRate = 60;
_frames = 0;
_lastFPS = _frameRate;
_messages = 0;
_timeSlices = 0;
_ballsPottedThisShot = 0;
_lastT = 0;
_t = 0;
super();
_parentMenu = _arg1;
this._backDrop = new Sprite();
this._backDrop.graphics.beginFill(0x111111);
this._backDrop.graphics.drawRect(0, 0, 640, 480);
this._backDrop.graphics.endFill();
this.addChild(_backDrop);
_frameSprite = new ResourceManager.LevelFrame();
this._backDrop.addChild(new ResourceManager.LevelBackdrop());
this.addChild(_frameSprite);
_ballsLeftLabel = new TextField();
_ballsLeftLabel.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF);
_ballsLeftLabel.selectable = false;
_ballsLeftLabel.embedFonts = true;
_ballsLeftLabel.antiAliasType = AntiAliasType.ADVANCED;
_ballsLeftLabel.text = "Balls Remaining: ";
_ballsLeftLabel.x = 450;
_ballsLeftLabel.y = 435;
_ballsLeftLabel.width = 130;
_ballsLeftLabel.height = 40;
_ballsLeftField = new TextField();
_ballsLeftField.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF);
_ballsLeftField.selectable = false;
_ballsLeftField.embedFonts = true;
_ballsLeftField.antiAliasType = AntiAliasType.ADVANCED;
_ballsLeftField.text = "0 / 0";
_ballsLeftField.x = 580;
_ballsLeftField.y = 435;
_ballsLeftField.width = 100;
_ballsLeftField.height = 40;
_shotsLeftLabel = new TextField();
_shotsLeftLabel.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF);
_shotsLeftLabel.selectable = false;
_shotsLeftLabel.embedFonts = true;
_shotsLeftLabel.antiAliasType = AntiAliasType.ADVANCED;
_shotsLeftLabel.text = "Shots Taken: ";
_shotsLeftLabel.x = 30;
_shotsLeftLabel.y = 435;
_shotsLeftLabel.width = 105;
_shotsLeftLabel.height = 40;
_shotsLeftField = new TextField();
_shotsLeftField.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF);
_shotsLeftField.selectable = false;
_shotsLeftField.embedFonts = true;
_shotsLeftField.antiAliasType = AntiAliasType.ADVANCED;
_shotsLeftField.text = "0 / 0";
_shotsLeftField.x = 135;
_shotsLeftField.y = 435;
_shotsLeftField.width = 100;
_shotsLeftField.height = 40;
this.addChild(_shotsLeftField);
this.addChild(_shotsLeftLabel);
this.addChild(_ballsLeftField);
this.addChild(_ballsLeftLabel);
_menuButton = new GameButton("Menu", null, 200, 25, menuButtonClick);
_menuButton.x = 220;
_menuButton.y = 420;
this.addChild(_menuButton);
_resetButton = new GameButton("Reset Level", null, 200, 25, resetButtonClick);
_resetButton.x = 220;
_resetButton.y = 450;
this.addChild(_resetButton);
_frameRateField = new TextField();
_frameRateField.defaultTextFormat = new TextFormat("Verdana", 10, 0xCCCCCC);
_frameRateField.embedFonts = true;
_frameRateField.antiAliasType = AntiAliasType.ADVANCED;
_frameRateField.selectable = false;
_frameRateField.mouseEnabled = false;
_frameRateField.tabEnabled = false;
_frameRateField.x = 10;
_frameRateField.y = 450;
_frameRateField.width = 250;
_frameRateField.height = 30;
_frameRateField.visible = false;
this.addChild(_frameRateField);
}
public function movingToObject(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{
return (((((_arg5 - _arg1) * (_arg3 - _arg7)) + ((_arg6 - _arg2) * (_arg4 - _arg8))) > 0));
}
public function onEverySecond(_arg1:TimerEvent):void{
_frameRateField.text = (((((((("FPS(" + _frames) + ") TPS(") + _timeSlices) + ") MPS(") + _messages) + ") Balls(") + _balls.length) + ")");
_lastFPS = _frames;
if (((!((_currentLevel == null))) && ((this._lastFPS > 0)))){
_currentLevel._shotChargeIncrement = (((_currentLevel._shotChargeIncrement / Math.abs(_currentLevel._shotChargeIncrement)) * _currentLevel._shotChargeMax) / this._lastFPS);
};
_frames = 0;
_messages = 0;
_timeSlices = 0;
}
public function movingToGoal(_arg1:Ball, _arg2:Goal):Boolean{
return (((((_arg2.x - _arg1.x) * _arg1._vx) + ((_arg2.y - _arg1.y) * _arg1._vy)) > 0));
}
public function LoadLevel(_arg1:LevelData):void{
stage.frameRate = 1000;
if (_currentLevel != null){
this.UnloadLevel();
};
this._mouseIsDown = false;
_currentLevel = _arg1;
this._backDrop.addChild(_currentLevel._backDrop);
_currentLevel._backDrop.x = (20 + ((620 - _currentLevel._levelWidth) / 2));
_currentLevel._backDrop.y = (20 + ((400 - _currentLevel._levelHeight) / 2));
_currentLevel._backDrop.scaleX = 0.95;
_currentLevel._backDrop.scaleY = 0.95;
this._balls = this._currentLevel._balls;
this._goals = this._currentLevel._goals;
this._gWells = this._currentLevel._gWells;
this._blocks = this._currentLevel._blocks;
this._bumpers = this._currentLevel._bumpers;
registerEvents();
stage.focus = stage;
}
public function collide(_arg1:Ball, _arg2:Ball):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local3 = ((_arg1.x - _arg2.x) / (_arg1._radius + _arg2._radius));
_local4 = ((_arg1.y - _arg2.y) / (_arg1._radius + _arg2._radius));
_local5 = ((_arg1._vx * _local3) + (_arg1._vy * _local4));
_local6 = ((_arg2._vx * _local3) + (_arg2._vy * _local4));
_local7 = ((2 * (_local5 - _local6)) / (_arg1._mass + _arg2._mass));
_local8 = ((_arg1._bounce + _arg2._bounce) * 0.5);
_local9 = ((_arg1._vx - ((_local7 * _local3) * _arg2._mass)) * _local8);
_local10 = ((_arg1._vy - ((_local7 * _local4) * _arg2._mass)) * _local8);
_local11 = ((_arg2._vx + ((_local7 * _local3) * _arg1._mass)) * _local8);
_local12 = ((_arg2._vy + ((_local7 * _local4) * _arg1._mass)) * _local8);
_arg1.Velocity = new Vector(_local9, _local10);
_arg2.Velocity = new Vector(_local11, _local12);
}
public function AdvanceTime(_arg1:Number):void{
var _local2:int;
var _local3:Ball;
_local2 = (_balls.length - 1);
while (_local2 >= 0) {
_local3 = _balls[_local2];
_local3.Move(_arg1);
_local2--;
};
}
public function onMenuHide():void{
this.registerEvents();
}
private function unregisterEvents():void{
this.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
this.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
if (stage != null){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
};
if (_fps != null){
this._fps.stop();
this._fps.removeEventListener(TimerEvent.TIMER, onEverySecond);
};
if (_messagePump != null){
this._messagePump.stop();
this._messagePump.removeEventListener(TimerEvent.TIMER, onMessagePump);
};
if (_renderPump != null){
this._renderPump.stop();
this._renderPump.removeEventListener(TimerEvent.TIMER, onRenderPump);
};
}
public function onRenderPump(_arg1:TimerEvent):void{
var _local2:Point;
var _local3:Boolean;
_frames++;
this.onSingleFrame(_arg1);
if ((((this._balls.length == 1)) && ((this._balls[0] == this._currentLevel._cue)))){
Mouse.show();
trace("FINISHED LEVEL!");
this.unregisterEvents();
this._currentLevel._levelUnderParBonus = ((this._currentLevel._levelShotPar - this._currentLevel._levelShotCounter) * this._currentLevel._levelUnderParBonusIncrement);
_local3 = false;
if ((((this._currentLevel._levelShotCounter <= this._currentLevel._levelShotPar)) && (!(this._parentMenu.isNextLevelUnlocked())))){
this._parentMenu.unlockNextLevel(true);
_local3 = true;
};
if (!_inFreePlayMode){
this._parentMenu.saveCurrentLevelScoreData();
};
_lod = LevelOverDialog.ShowDialog(this, "You Win!", this._currentLevel, "Continue", onContinueClicked, true, _local3);
return;
} else {
if (((((!(_inFreePlayMode)) && (!(BallsInMotion)))) && ((this._currentLevel._levelShotCounter >= this._currentLevel._levelShotPar)))){
Mouse.show();
trace("FAILED LEVEL!");
this.unregisterEvents();
this._currentLevel._levelUnderParBonus = ((this._currentLevel._levelShotPar - this._currentLevel._levelShotCounter) * this._currentLevel._levelUnderParBonusIncrement);
_lod = LevelOverDialog.ShowDialog(this, "Fail.", this._currentLevel, "Retry", onRetryClicked, false, false);
return;
};
};
_local2 = _currentLevel._backDrop.globalToLocal(new Point(this.mouseX, this.mouseY));
_currentLevel._cursor.x = _local2.x;
_currentLevel._cursor.y = _local2.y;
if ((((((((_local2.x >= 0)) && ((_local2.x <= _currentLevel._levelWidth)))) && ((_local2.y >= 0)))) && ((_local2.y <= _currentLevel._levelHeight)))){
Mouse.hide();
} else {
Mouse.show();
};
_ballsLeftField.text = (((_currentLevel._balls.length - 1).toString() + " / ") + _currentLevel._levelStartBalls.toString());
_shotsLeftField.text = ((_currentLevel._levelShotCounter.toString() + " / ") + _currentLevel._levelShotPar.toString());
if (((!(_inFreePlayMode)) && ((this._currentLevel._levelShotCounter >= this._currentLevel._levelShotPar)))){
_currentLevel.ClearShotLine();
} else {
if (this._mouseIsDown){
_currentLevel._shotCharge = (Vector.fromPoints(new Point(_currentLevel._cue.x, _currentLevel._cue.y), new Point(_currentLevel._cursor.x, _currentLevel._cursor.y)).length * 0.5);
if (_currentLevel._shotCharge >= _currentLevel._shotChargeMax){
_currentLevel._shotCharge = _currentLevel._shotChargeMax;
} else {
if (_currentLevel._shotCharge <= 0){
_currentLevel._shotCharge = 0;
};
};
_currentLevel.GenerateShotLine();
} else {
if (_currentLevel._shotCharge > 0){
_ballsPottedThisShot = 0;
_currentLevel._cue._ricochetCount = 0;
_currentLevel._levelShotCounter++;
_currentLevel.addGravityWell(GravityWell.MakeGravityWell(this._currentLevel._cursor.x, this._currentLevel._cursor.y, _currentLevel.GetShotPower(), this._currentLevel._cue._mass));
};
_currentLevel._shotCharge = 0;
_currentLevel._cursor.alpha = 1;
_currentLevel._shotLineLayer.graphics.clear();
};
};
}
public function menuButtonClick(_arg1:MouseEvent):void{
this.unregisterEvents();
_levelMenu = LevelMenuScreen.ShowMenu(this, onMenuHide);
}
public function onSingleFrame(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = 0;
_local3 = 0;
_local4 = 1;
while (_local3 < _local4) {
_timeSlices++;
_local2 = this.timeToCollision((_local4 - _local3));
_local3 = (_local3 + _local2);
this.AdvanceTime(_local2);
this.ApplyCollisions();
};
this.ApplyForces();
}
public function resetButtonClick(_arg1:MouseEvent):void{
this._parentMenu.retryCurrentLevel();
}
public function onKeyUp(_arg1:KeyboardEvent):void{
trace(_arg1.keyCode);
switch (_arg1.keyCode){
case 38:
case 87:
this._moveUp = false;
break;
case 40:
case 83:
this._moveDown = false;
break;
case 37:
case 65:
this._moveLeft = false;
break;
case 39:
case 68:
this._moveRight = false;
break;
case 70:
this._frameRateField.visible = !(this._frameRateField.visible);
break;
};
}
public function onKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 38:
case 87:
this._moveUp = true;
break;
case 40:
case 83:
this._moveDown = true;
break;
case 37:
case 65:
this._moveLeft = true;
break;
case 39:
case 68:
this._moveRight = true;
break;
};
}
public function onGameOver():void{
Mouse.show();
stage.removeChild(this);
delete ??getglobalscope
[this];
}
public function movingToLine(_arg1:Ball, _arg2:Point, _arg3:Point):Boolean{
var _local4:Boolean;
var _local5:Point;
var _local6:Vector;
var _local7:Number;
var _local8:Vector;
var _local9:Point;
var _local10:Vector;
var _local11:Point;
var _local12:Number;
_local4 = true;
_local5 = new Point(_arg1.x, _arg1.y);
_local6 = _arg1.Velocity;
_local7 = _arg1._radius;
_local8 = Vector.fromPoints(_arg2, _local5).ProjectOnto(Vector.fromPoints(_arg2, _arg3));
_local9 = new Point((_arg2.x + _local8.x), (_arg2.y + _local8.y));
_local10 = Vector.fromPoints(_local5, _local9);
_local11 = _local5.add(_local10.Normalize().Multiply(_local7).ToPoint());
_local12 = Geometry.RadiansToDegrees(_local10.AngleBetween(_local6));
if ((((((_arg1._velocity == 0)) || ((_local12 > 90)))) || ((_local12 < -90)))){
_local4 = false;
};
return (_local4);
}
public function movingToBall(_arg1:Ball, _arg2:Ball):Boolean{
return (((((_arg2.x - _arg1.x) * (_arg1._vx - _arg2._vx)) + ((_arg2.y - _arg1.y) * (_arg1._vy - _arg2._vy))) > 0));
}
private function ballTimeToCollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number=0, _arg10:Number=0):Number{
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local11 = Number.MAX_VALUE;
_local12 = ((((((_arg4 * _arg4) + (_arg5 * _arg5)) - ((2 * _arg4) * _arg9)) + (_arg9 * _arg9)) - ((2 * _arg5) * _arg10)) + (_arg10 * _arg10));
_local13 = ((((((((-(_arg1) * _arg4) - (_arg2 * _arg5)) + (_arg4 * _arg6)) + (_arg5 * _arg7)) + (_arg1 * _arg9)) - (_arg6 * _arg9)) + (_arg2 * _arg10)) - (_arg7 * _arg10));
_local14 = ((((((_arg4 * _arg4) + (_arg5 * _arg5)) - ((2 * _arg4) * _arg9)) + (_arg9 * _arg9)) - ((2 * _arg5) * _arg10)) + (_arg10 * _arg10));
_local15 = (((((((((_arg1 * _arg1) + (_arg2 * _arg2)) - (_arg3 * _arg3)) - ((2 * _arg1) * _arg6)) + (_arg6 * _arg6)) - ((2 * _arg2) * _arg7)) + (_arg7 * _arg7)) - ((2 * _arg3) * _arg8)) - (_arg8 * _arg8));
_local16 = (((-2 * _local13) * (-2 * _local13)) - ((4 * _local14) * _local15));
if (_local16 >= 0){
if (_local12 == 0){
trace("ERROR!");
} else {
_local17 = ((0.5 * ((2 * _local13) - Math.sqrt(_local16))) / _local12);
_local18 = ((0.5 * ((2 * _local13) + Math.sqrt(_local16))) / _local12);
_local11 = Math.min(_local17, _local18);
};
};
return (_local11);
}
public function onMouseUp(_arg1:MouseEvent):void{
this._mouseIsDown = false;
}
public function ApplyCollisions():void{
var _local1:int;
var _local2:Ball;
var _local3:Ball;
var _local4:Goal;
var _local5:String;
var _local6:Bumper;
var _local7:Boolean;
_local1 = (_balls.length - 1);
while (_local1 >= 0) {
_local2 = _balls[_local1];
if (_local2._collidedObj != null){
if ((_local2._collidedObj is Point)){
SoundManager.playBallBump(Math.max(0.01, (_local2._velocity / Ball.MAXVELOCITY)));
_local2.RedirectFromPoint((_local2._collidedObj as Point));
_local2._ricochetCount++;
} else {
if ((_local2._collidedObj is Line)){
SoundManager.playBallBump(Math.max(0.01, (_local2._velocity / Ball.MAXVELOCITY)));
_local2.RedirectFromLine((_local2._collidedObj as Line).p1, (_local2._collidedObj as Line).p2, (_local2._collidedObj as Line)._bounce);
if (_local2._collidedObj.block != null){
_local2._collidedObj.block.showCollide();
};
} else {
if ((_local2._collidedObj is Ball)){
_local3 = (_local2._collidedObj as Ball);
SoundManager.playBallHit(Math.max(0.01, (_local2._velocity / Ball.MAXVELOCITY), (_local3._velocity / Ball.MAXVELOCITY)));
this.collide(_local2, _local3);
if ((((_local2 == _currentLevel._cue)) || (((_local2._collidedObj as Ball) == _currentLevel._cue)))){
};
_local2._velocity = (_local2._velocity * _local3._bounce);
_local2.Velocity = new Vector((_local2._vector.x * _local2._velocity), (_local2._vector.y * _local2._velocity));
_local3._velocity = (_local3._velocity * _local2._bounce);
_local3.Velocity = new Vector((_local3._vector.x * _local3._velocity), (_local3._vector.y * _local3._velocity));
} else {
if ((_local2._collidedObj is Goal)){
_local4 = (_local2._collidedObj as Goal);
if (_local2 == _currentLevel._cue){
_currentLevel._levelShotCounter++;
_local2.RedirectFromPoint(new Point((_local2._collidedObj as Goal).x, (_local2._collidedObj as Goal).y));
_local2.Velocity = _local2.Velocity.Multiply(0.25);
_local4.showScratched();
SoundManager.playBuzzer(0.75);
} else {
_ballsPottedThisShot++;
_local4.showPotted(_ballsPottedThisShot);
this._currentLevel._levelGoalScore = (this._currentLevel._levelGoalScore + _local4._pointValue);
_local5 = "";
if (_ballsPottedThisShot > 1){
_local5 = (_local5 + (("MULTI BALL BONUS " + (_local4._pointValue * ((_ballsPottedThisShot - 1) * 10)).toString()) + "\n"));
this._currentLevel._levelMultiBallBonus = (this._currentLevel._levelMultiBallBonus + (_local4._pointValue * ((_ballsPottedThisShot - 1) * 10)));
};
if (_local2._ricochetCount > 0){
_local5 = (_local5 + (("RICOCHET BONUS " + (_local4._pointValue * _local2._ricochetCount).toString()) + "\n"));
this._currentLevel._levelRicochetBonus = (this._currentLevel._levelRicochetBonus + (_local4._pointValue * _local2._ricochetCount));
};
if (_local5 != ""){
this._currentLevel.ShowBonusField(_local5);
};
_local2._integrityCurrent = 0;
SoundManager.playBallPocket(Math.max(0.01, (_local2._velocity / Ball.MAXVELOCITY)));
};
} else {
if ((_local2._collidedObj is Bumper)){
SoundManager.playBallBump(Math.max(0.01, (_local2._velocity / Ball.MAXVELOCITY)));
_local6 = (_local2._collidedObj as Bumper);
_local2.RedirectFromPoint(new Point(_local6.x, _local6.y));
_local6.showCollide();
};
};
};
};
};
_local2._ricochetCount++;
_local2._collidedObj = null;
};
_local1--;
};
_local1 = (_balls.length - 1);
while (_local1 >= 0) {
_local2 = _balls[_local1];
_local7 = (_local2._integrityCurrent <= 0);
if ((_local2 is Ball)){
if (_local7){
this._currentLevel.removeBall(_local2);
};
};
_local1--;
};
}
private function registerEvents():void{
this._currentLevel._backDrop.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
this._currentLevel._backDrop.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
this._fps = new Timer(1000);
this._fps.addEventListener(TimerEvent.TIMER, onEverySecond);
this._fps.start();
this._messagePump = new Timer(1);
this._messagePump.addEventListener(TimerEvent.TIMER, onMessagePump);
this._messagePump.start();
this._renderPump = new Timer((1000 / _frameRate));
this._renderPump.addEventListener(TimerEvent.TIMER, onRenderPump);
this._renderPump.start();
}
public function onContinueClicked(_arg1:MouseEvent):void{
_lod.HideDialog();
if (_inFreePlayMode){
_parentMenu.loadFreePlayLevel(99999, "easy");
} else {
_parentMenu.loadNextLevel();
};
}
public function movingToPoint(_arg1:Ball, _arg2:Point):Boolean{
return (((((_arg2.x - _arg1.x) * _arg1._vx) + ((_arg2.y - _arg1.y) * _arg1._vy)) > 0));
}
public function UnloadLevel():void{
if (_currentLevel != null){
this._mouseIsDown = false;
if (this._backDrop.contains(_currentLevel._backDrop)){
this._backDrop.removeChild(_currentLevel._backDrop);
};
if (((!((_lod == null))) && (this.contains(_lod)))){
_lod.HideDialog();
};
if (((!((_levelMenu == null))) && (this.contains(_levelMenu)))){
_levelMenu.HideMenu();
};
this._balls = null;
this._goals = null;
this._gWells = null;
this._blocks = null;
this._bumpers = null;
_currentLevel = null;
};
unregisterEvents();
Mouse.show();
}
public function onMessagePump(_arg1:TimerEvent):void{
_messages++;
}
public function onMouseDown(_arg1:MouseEvent):void{
this._mouseIsDown = true;
}
public function ApplyForces():void{
var _local1:int;
var _local2:int;
var _local3:Ball;
var _local4:GravityWell;
var _local5:Number;
var _local6:Number;
var _local7:Point;
var _local8:Vector;
_local2 = (_gWells.length - 1);
while (_local2 >= 0) {
_local4 = _gWells[_local2];
_local5 = _local4._mass;
_local6 = _local4._gStrength;
_local7 = new Point(_local4.x, _local4.y);
_local3 = _currentLevel._cue;
_local8 = Vector.fromPoints(new Point(_local3.x, _local3.y), _local7).Normalize();
_local8 = _local8.Multiply(((_local5 / _local3._mass) * _local6));
_local3.Velocity = _local3.Velocity.Add(_local8);
if (_local4.Decay() < _local4.EPSILON){
_currentLevel.removeGravityWell(_local4);
};
_local2--;
};
BallsInMotion = false;
_local1 = (_balls.length - 1);
while (_local1 >= 0) {
_local3 = _balls[_local1];
_local3.Velocity = _local3.Velocity.Multiply(_currentLevel._levelFriction);
if (_local3.Velocity.length < 0.1){
_local3.Velocity = _local3.Velocity.Multiply(0);
_local3._ricochetCount = 0;
} else {
BallsInMotion = true;
};
_local1--;
};
}
public function onRetryClicked(_arg1:MouseEvent):void{
_lod.HideDialog();
_parentMenu.retryCurrentLevel();
}
public function timeToCollision(_arg1:Number=1):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:Ball;
var _local11:Ball;
var _local12:Ball;
var _local13:Number;
var _local14:Number;
var _local15:int;
var _local16:Point;
var _local17:Point;
var _local18:Bumper;
var _local19:Goal;
var _local20:Block;
_local2 = _arg1;
_local12 = null;
_local8 = (_balls.length - 1);
while (_local8 >= 0) {
_local10 = _balls[_local8];
if (_local10._velocity == 0){
} else {
_local9 = (_balls.length - 1);
while (_local9 >= 0) {
_local11 = _balls[_local9];
if (((!((_local10 == _local11))) && (movingToBall(_local10, _local11)))){
_local13 = this.ballTimeToCollide(_local10.x, _local10.y, _local10._radius, _local10._vx, _local10._vy, _local11.x, _local11.y, _local11._radius, _local11._vx, _local11._vy);
if (_local13 < _local2){
_local2 = _local13;
if (_local12 != null){
_local12._collidedObj = null;
};
_local10._collidedObj = _local11;
_local12 = _local10;
};
};
_local9--;
};
_local9 = (this._blocks.length - 1);
while (_local9 >= 0) {
_local20 = _blocks[_local9];
_local15 = (_local20._lines.length - 1);
for (;_local15 >= 0;_local15--) {
_local16 = _local20._lines[_local15].p1;
_local17 = _local20._lines[_local15].p2;
if (movingToLine(_local10, _local16, _local17)){
_local14 = _local10.DistToLineCollision(_local16, _local17);
_local13 = (_local14 / _local10._velocity);
//unresolved if
_local2 = _local13;
if (_local12 != null){
_local12._collidedObj = null;
};
_local10._collidedObj = _local20._lines[_local15];
_local10._collidedObj.block = _local20;
_local12 = _local10;
} else {
if (this.movingToPoint(_local10, _local17)){
_local13 = this.ballTimeToCollide(_local10.x, _local10.y, _local10._radius, _local10._vx, _local10._vy, _local17.x, _local17.y, 0, 0, 0);
if (_local13 < _local2){
_local2 = _local13;
if (_local12 != null){
_local12._collidedObj = null;
};
_local10._collidedObj = _local17;
_local12 = _local10;
continue;
};
};
};
};
_local9--;
};
_local9 = (this._bumpers.length - 1);
for (;_local9 >= 0;_local9--) {
_local18 = (_bumpers[_local9] as Bumper);
_local17 = new Point(_local18.x, _local18.y);
if (this.movingToPoint(_local10, _local17)){
_local13 = this.ballTimeToCollide(_local10.x, _local10.y, _local10._radius, _local10._vx, _local10._vy, _local18.x, _local18.y, _local18._radius, 0, 0);
if (_local13 < _local2){
_local2 = _local13;
if (_local12 != null){
_local12._collidedObj = null;
};
_local10._collidedObj = _local18;
_local12 = _local10;
continue;
};
};
};
_local9 = (this._goals.length - 1);
for (;_local9 >= 0;_local9--) {
_local19 = (_goals[_local9] as Goal);
_local17 = new Point(_local19.x, _local19.y);
if (((this.movingToPoint(_local10, _local17)) && (((_local19._radius - _local10._radius) > 0)))){
_local13 = this.ballTimeToCollide(_local10.x, _local10.y, _local10._radius, _local10._vx, _local10._vy, _local19.x, _local19.y, (_local19._radius - _local10._radius), 0, 0);
if (_local13 < _local2){
_local2 = _local13;
if (_local12 != null){
_local12._collidedObj = null;
};
_local10._collidedObj = _local19;
_local12 = _local10;
continue;
};
};
};
};
_local8--;
};
return (_local2);
}
}
}//package
Section 211
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 212
//OPHighScores (OPHighScores)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class OPHighScores extends MovieClip {
private static var _connectCompleteCallback:Function = null;
private static var _gameID:String;
private static var isConnected:Boolean = false;
private static var _connectErrorCallback:Function = null;
private static var loader:Loader;
private static var scoreServer:MovieClip;
private static var _connectStartCallback:Function = null;
private static function loadIOError(_arg1:Event):void{
trace("ERROR Loading ScoreServer");
if (_connectErrorCallback != null){
_connectErrorCallback(null);
};
}
public static function ViewScores(_arg1:String="normal"):void{
var scoreMode = _arg1;
if (scoreServer != null){
try {
scoreServer.ViewScores(_gameID, scoreMode);
} catch(e:Error) {
trace((("ERROR CALLING ViewScore(...)! Message(" + e.message) + ")"));
};
};
}
private static function initComplete(_arg1:Event):void{
trace("INIT OPHighScores");
if (loader.content != null){
scoreServer = (loader.content as MovieClip);
isConnected = true;
trace("INIT & LOADED ScoreServer");
scoreServer.RecordGameView(_gameID);
};
if (_connectCompleteCallback != null){
_connectCompleteCallback(null);
};
}
private static function loadComplete(_arg1:Event):void{
trace("LOADED ScoreServer");
}
public static function Connect(_arg1:String, _arg2:Function=null, _arg3:Function=null, _arg4:Function=null):void{
var request:URLRequest;
var GameID = _arg1;
var startCallback = _arg2;
var errorCallback = _arg3;
var completeCallback = _arg4;
_gameID = GameID;
_connectStartCallback = startCallback;
_connectCompleteCallback = completeCallback;
_connectErrorCallback = errorCallback;
request = new URLRequest("http://www.otherplay.com/_include/OPHighScoreServer.swf");
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initComplete);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadIOError);
try {
if (_connectStartCallback != null){
_connectStartCallback(null);
};
loader.load(request);
trace("loading...");
} catch(error:Error) {
if (_connectErrorCallback != null){
_connectErrorCallback(null);
};
trace("ERROR LOADING SCORESERVER!");
};
}
public static function SubmitScore(_arg1:String, _arg2:int, _arg3:String="normal", _arg4:Number=0, _arg5:Function=null, _arg6:Function=null, _arg7:Function=null):void{
var scoreName = _arg1;
var scoreValue = _arg2;
var scoreMode = _arg3;
var playedTimeSeconds = _arg4;
var startCallback = _arg5;
var errorCallback = _arg6;
var completeCallback = _arg7;
if (scoreServer != null){
try {
scoreServer.SubmitScore(_gameID, scoreName, scoreValue, scoreMode, playedTimeSeconds, startCallback, errorCallback, completeCallback);
} catch(e:Error) {
trace((("ERROR CALLING SubmitScore(...)! Message(" + e.message) + ")"));
};
} else {
if (errorCallback != null){
errorCallback(null);
};
};
}
}
}//package
Section 213
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import CPMStar.*;
import flash.geom.*;
public dynamic class Preloader extends MovieClip {
private var spinner:Sprite;
private var loadText:TextField;
private var backdrop:Sprite;
public var w:Number;// = 640
private var waitText:TextField;
public var _verdanaEmbed:String;// = "Preloader__verdanaEmbed"
public var h:Number;// = 480
private var progressBar:ProgressBar;
private var adBox:MovieClip;
private var did_load:Boolean;
public var deferAdSites:RegExp;
private var adTimer:Timer;
public static const SPONSOR_FREEONLINEGAMES:int = 4;
public static const SPONSOR_HEADMEATGAMES:int = 1;
public static const SPONSOR_BUBBLEBOX:int = 0;
public static const SPONSOR_ADDICTINGGAMES:int = 3;
public static const SPONSOR_OTHERPLAY:int = 2;
private static var angleStep:Number = 6;
public static var MAIN_CLASS:String = "LoadScreen";
public static var CURRENT_SPONSOR:int = 0;
public static var SHOULD_SKIP_AD:Boolean = false;
public static var LOADER_SHOW_BYTES_INSTEAD_OF_PERCENTAGE:Boolean = false;
private static var dropStep:uint = 0;
private static var alphaScaleStep:Number = -0.025;
public static var _abbessEmbed:String = "Preloader__abbessEmbed";
public static var isAdFinished:Boolean = false;
public function Preloader(){
var f:Function;
var ctrl:Point;
var anchor:Point;
var degreeIncrement:Number;
var degrees:Number;
var CPMStarPoolID:int;
var CPMStarSubPoolID:int;
var ad:DisplayObject;
var radIncrement:Number;
var sMatrix:Matrix;
_verdanaEmbed = "Preloader__verdanaEmbed";
w = 640;
h = 480;
super();
MochiBot.track(this, "7b007a66");
f = function (_arg1:IOErrorEvent):void{
};
loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
progressBar = new ProgressBar((w - 100), 15, 0, 0, 0x111111, 0x660066, -1, -1, -1, 5, 5, 5);
progressBar.x = 50;
progressBar.y = 440;
loadText = new TextField();
loadText.selectable = false;
loadText.tabEnabled = false;
loadText.defaultTextFormat = new TextFormat("Verdana", 10, 0xEEEEEE, null, null, null, null, null, TextFormatAlign.CENTER);
loadText.text = "0%";
loadText.width = (w - 100);
loadText.height = 20;
loadText.x = 50;
loadText.y = (w - 200);
this.addChild(progressBar);
this.addChild(loadText);
switch (_slot1.CURRENT_SPONSOR){
case _slot1.SPONSOR_BUBBLEBOX:
break;
case _slot1.SPONSOR_HEADMEATGAMES:
case _slot1.SPONSOR_OTHERPLAY:
break;
case _slot1.SPONSOR_ADDICTINGGAMES:
break;
case _slot1.SPONSOR_FREEONLINEGAMES:
break;
};
if (!_slot1.SHOULD_SKIP_AD){
adBox = new MovieClip();
adBox.x = 170;
adBox.y = 100;
adBox.graphics.lineStyle(5, 0x660066, 0.75);
adBox.graphics.drawRect(0, 0, 300, 250);
this.addChild(adBox);
CPMStarPoolID = 1239;
CPMStarSubPoolID = 6;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
adTimer = new Timer(8000);
adTimer.addEventListener(TimerEvent.TIMER, onAdTimer);
adTimer.start();
} else {
_slot1.isAdFinished = true;
};
backdrop = new Sprite();
backdrop.graphics.beginFill(68);
backdrop.graphics.drawRect(0, 0, w, h);
backdrop.graphics.endFill();
this.addChildAt(backdrop, 0);
spinner = new Sprite();
degreeIncrement = 40;
degrees = 0;
while (degrees < 360) {
spinner.graphics.beginFill(0x660099, 0.25);
spinner.graphics.lineStyle(5, 0x330066, 0.25);
radIncrement = (degrees * 0.0174532925);
sMatrix = spinner.transform.matrix;
sMatrix.rotate(radIncrement);
degrees = (degrees + degreeIncrement);
anchor = sMatrix.transformPoint(new Point(-160, -10));
spinner.graphics.moveTo(anchor.x, anchor.y);
ctrl = sMatrix.transformPoint(new Point(45, -225));
anchor = sMatrix.transformPoint(new Point(250, -10));
spinner.graphics.curveTo(ctrl.x, ctrl.y, anchor.x, anchor.y);
ctrl = sMatrix.transformPoint(new Point(45, -250));
anchor = sMatrix.transformPoint(new Point(-160, -10));
spinner.graphics.curveTo(ctrl.x, ctrl.y, anchor.x, anchor.y);
spinner.graphics.endFill();
};
spinner.scaleX = 0.5;
spinner.scaleY = 0.5;
spinner.x = (w * 0.5);
spinner.y = ((h * 0.5) - 15);
backdrop.addChild(this.spinner);
this.addChild(SpriteFactory.makeBorder(w, h, 0x990099));
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onAdTimer(_arg1:TimerEvent):void{
_slot1.isAdFinished = true;
adTimer.stop();
}
private function onPlayClicked(_arg1:MouseEvent):void{
if (((!((adBox == null))) && (this.contains(adBox)))){
this.removeChild(adBox);
};
nextFrame();
initApp();
}
public function onEnterFrame(_arg1:Event):void{
var _local2:Class;
var _local3:DisplayObject;
var _local4:int;
if ((((((((this.root.loaderInfo.bytesLoaded == this.root.loaderInfo.bytesTotal)) && ((this.root.loaderInfo.bytesTotal > 0)))) && ((this.framesLoaded == this.totalFrames)))) && (_slot1.isAdFinished))){
this.loadText.text = (_local4.toString() + "%");
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_local2 = Class(getDefinitionByName("GameButton"));
_local3 = new _local2("PLAY!", null, (w - 100), 60, onPlayClicked);
_local3.x = 50;
_local3.y = 400;
this.addChild((_local3 as DisplayObject));
} else {
progressBar.Percentage = (this.root.loaderInfo.bytesLoaded / this.root.loaderInfo.bytesTotal);
_local4 = (progressBar.Percentage * 100);
if (LOADER_SHOW_BYTES_INSTEAD_OF_PERCENTAGE){
this.loadText.text = (((("(" + this.root.loaderInfo.bytesLoaded) + "/") + this.root.loaderInfo.bytesTotal) + ")");
} else {
this.loadText.text = (_local4.toString() + "%");
};
this.spinner.rotation = (this.spinner.rotation + angleStep);
this.spinner.alpha = (this.spinner.alpha + alphaScaleStep);
if ((((this.spinner.alpha <= 0.25)) || ((this.spinner.alpha >= 1)))){
alphaScaleStep = (alphaScaleStep * -1);
};
};
}
private function initApp(_arg1:Boolean=false):void{
var _local2:Class;
var _local3:Object;
_local2 = Class(getDefinitionByName(MAIN_CLASS));
_local3 = new (_local2);
parent.addChild((_local3 as DisplayObject));
}
}
}//package
Section 214
//Preloader__abbessEmbed (Preloader__abbessEmbed)
package {
import mx.core.*;
public class Preloader__abbessEmbed extends FontAsset {
}
}//package
Section 215
//Preloader__verdanaEmbed (Preloader__verdanaEmbed)
package {
import mx.core.*;
public class Preloader__verdanaEmbed extends FontAsset {
}
}//package
Section 216
//ProgressBar (ProgressBar)
package {
import flash.display.*;
public class ProgressBar extends Sprite {
private var _cr:Number;
private var _percentage:Number;
private var _bar:Sprite;
private var _bgGStep:int;
private var _barBStep:int;
private var _barRStep:int;
private var _barColor:uint;
private var _backdrop:Sprite;
private var _bgBStep:int;
private var _bgRStep:int;
private var _bgColor:uint;
private var _h:Number;
private var _barGStep:int;
private var _w:Number;
public function ProgressBar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint=0xFF0000, _arg6:uint=0xFF00, _arg7:int=-17, _arg8:int=-17, _arg9:int=-17, _arg10:int=17, _arg11:int=17, _arg12:int=17){
_bgColor = _arg5;
_bgRStep = _arg7;
_bgGStep = _arg8;
_bgBStep = _arg9;
_barColor = _arg6;
_barRStep = _arg10;
_barGStep = _arg11;
_barBStep = _arg12;
_w = _arg1;
_h = _arg2;
_cr = _arg3;
_backdrop = SpriteFactory.makeGradientBar(_w, _h, _cr, _arg5, _arg7, _arg8, _arg9);
_bar = SpriteFactory.makeGradientBar(_w, _h, _cr, _barColor, _barRStep, _barGStep, _barBStep);
this.addChild(_backdrop);
this.addChild(_bar);
Percentage = _arg4;
_bar.scaleX = _percentage;
_bar.cacheAsBitmap = true;
_backdrop.cacheAsBitmap = true;
}
public function set Percentage(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_percentage = _arg1;
_bar.scaleX = _percentage;
}
public function get Percentage():Number{
return (_percentage);
}
}
}//package
Section 217
//ResourceManager (ResourceManager)
package {
public class ResourceManager {
public static var WoodRed:Class = ResourceManager_WoodRed;
public static var ShortCheer2Sound:Class = ResourceManager_ShortCheer2Sound;
public static var BuzzerSound:Class = ResourceManager_BuzzerSound;
public static var BackgroundMusic1:Class = ResourceManager_BackgroundMusic1;
public static var BubbleBoxLogoButton:Class = ResourceManager_BubbleBoxLogoButton;
public static var SmileyFaceTexture:Class = ResourceManager_SmileyFaceTexture;
public static var ShortMurmurSound:Class = ResourceManager_ShortMurmurSound;
public static var PoolballBlueTexture:Class = ResourceManager_PoolballBlueTexture;
public static var PoolBallHitSound:Class = ResourceManager_PoolBallHitSound;
public static var BaseClickSound:Class = ResourceManager_BaseClickSound;
public static var PoolPocketSound:Class = ResourceManager_PoolPocketSound;
public static var PoolballPurpleTexture:Class = ResourceManager_PoolballPurpleTexture;
public static var ShortCheer3Sound:Class = ResourceManager_ShortCheer3Sound;
public static var WoodBlue:Class = ResourceManager_WoodBlue;
public static var StoneBackground:Class = ResourceManager_StoneBackground;
public static var SharpClickSound:Class = ResourceManager_SharpClickSound;
public static var BubbleBoxSplashScreen:Class = ResourceManager_BubbleBoxSplashScreen;
public static var LevelBackdrop:Class = ResourceManager_LevelBackdrop;
public static var WoodBackground:Class = ResourceManager_WoodBackground;
public static var PoolBallBumpSound:Class = ResourceManager_PoolBallBumpSound;
public static var CheerSound:Class = ResourceManager_CheerSound;
public static var LevelFrame:Class = ResourceManager_LevelFrame;
public static var PoolballRedTexture:Class = ResourceManager_PoolballRedTexture;
public static var ShortCheer1Sound:Class = ResourceManager_ShortCheer1Sound;
public static var WoodPurple:Class = ResourceManager_WoodPurple;
public static var _verdanaEmbed:String = "ResourceManager__verdanaEmbed";
public static var _abbessEmbed:String = "ResourceManager__abbessEmbed";
public static var IceBackground:Class = ResourceManager_IceBackground;
public static var HowToPlayImage:Class = ResourceManager_HowToPlayImage;
}
}//package
Section 218
//ResourceManager__abbessEmbed (ResourceManager__abbessEmbed)
package {
import mx.core.*;
public class ResourceManager__abbessEmbed extends FontAsset {
}
}//package
Section 219
//ResourceManager__verdanaEmbed (ResourceManager__verdanaEmbed)
package {
import mx.core.*;
public class ResourceManager__verdanaEmbed extends FontAsset {
}
}//package
Section 220
//ResourceManager_BackgroundMusic1 (ResourceManager_BackgroundMusic1)
package {
import mx.core.*;
public class ResourceManager_BackgroundMusic1 extends SoundAsset {
}
}//package
Section 221
//ResourceManager_BaseClickSound (ResourceManager_BaseClickSound)
package {
import mx.core.*;
public class ResourceManager_BaseClickSound extends SoundAsset {
}
}//package
Section 222
//ResourceManager_BubbleBoxLogoButton (ResourceManager_BubbleBoxLogoButton)
package {
import flash.utils.*;
import mx.core.*;
public class ResourceManager_BubbleBoxLogoButton extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function ResourceManager_BubbleBoxLogoButton(){
dataClass = ResourceManager_BubbleBoxLogoButton_dataClass;
super();
initialWidth = (0x1900 / 20);
initialHeight = (1140 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 223
//ResourceManager_BubbleBoxLogoButton_dataClass (ResourceManager_BubbleBoxLogoButton_dataClass)
package {
import mx.core.*;
public class ResourceManager_BubbleBoxLogoButton_dataClass extends ByteArrayAsset {
}
}//package
Section 224
//ResourceManager_BubbleBoxSplashScreen (ResourceManager_BubbleBoxSplashScreen)
package {
import flash.utils.*;
import mx.core.*;
public class ResourceManager_BubbleBoxSplashScreen extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function ResourceManager_BubbleBoxSplashScreen(){
dataClass = ResourceManager_BubbleBoxSplashScreen_dataClass;
super();
initialWidth = (0x3200 / 20);
initialHeight = (9600 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 225
//ResourceManager_BubbleBoxSplashScreen_dataClass (ResourceManager_BubbleBoxSplashScreen_dataClass)
package {
import mx.core.*;
public class ResourceManager_BubbleBoxSplashScreen_dataClass extends ByteArrayAsset {
}
}//package
Section 226
//ResourceManager_BuzzerSound (ResourceManager_BuzzerSound)
package {
import mx.core.*;
public class ResourceManager_BuzzerSound extends SoundAsset {
}
}//package
Section 227
//ResourceManager_CheerSound (ResourceManager_CheerSound)
package {
import mx.core.*;
public class ResourceManager_CheerSound extends SoundAsset {
}
}//package
Section 228
//ResourceManager_HowToPlayImage (ResourceManager_HowToPlayImage)
package {
import mx.core.*;
public class ResourceManager_HowToPlayImage extends BitmapAsset {
}
}//package
Section 229
//ResourceManager_IceBackground (ResourceManager_IceBackground)
package {
import mx.core.*;
public class ResourceManager_IceBackground extends BitmapAsset {
}
}//package
Section 230
//ResourceManager_LevelBackdrop (ResourceManager_LevelBackdrop)
package {
import mx.core.*;
public class ResourceManager_LevelBackdrop extends BitmapAsset {
}
}//package
Section 231
//ResourceManager_LevelFrame (ResourceManager_LevelFrame)
package {
import mx.core.*;
public class ResourceManager_LevelFrame extends BitmapAsset {
}
}//package
Section 232
//ResourceManager_PoolballBlueTexture (ResourceManager_PoolballBlueTexture)
package {
import mx.core.*;
public class ResourceManager_PoolballBlueTexture extends BitmapAsset {
}
}//package
Section 233
//ResourceManager_PoolBallBumpSound (ResourceManager_PoolBallBumpSound)
package {
import mx.core.*;
public class ResourceManager_PoolBallBumpSound extends SoundAsset {
}
}//package
Section 234
//ResourceManager_PoolBallHitSound (ResourceManager_PoolBallHitSound)
package {
import mx.core.*;
public class ResourceManager_PoolBallHitSound extends SoundAsset {
}
}//package
Section 235
//ResourceManager_PoolballPurpleTexture (ResourceManager_PoolballPurpleTexture)
package {
import mx.core.*;
public class ResourceManager_PoolballPurpleTexture extends BitmapAsset {
}
}//package
Section 236
//ResourceManager_PoolballRedTexture (ResourceManager_PoolballRedTexture)
package {
import mx.core.*;
public class ResourceManager_PoolballRedTexture extends BitmapAsset {
}
}//package
Section 237
//ResourceManager_PoolPocketSound (ResourceManager_PoolPocketSound)
package {
import mx.core.*;
public class ResourceManager_PoolPocketSound extends SoundAsset {
}
}//package
Section 238
//ResourceManager_SharpClickSound (ResourceManager_SharpClickSound)
package {
import mx.core.*;
public class ResourceManager_SharpClickSound extends SoundAsset {
}
}//package
Section 239
//ResourceManager_ShortCheer1Sound (ResourceManager_ShortCheer1Sound)
package {
import mx.core.*;
public class ResourceManager_ShortCheer1Sound extends SoundAsset {
}
}//package
Section 240
//ResourceManager_ShortCheer2Sound (ResourceManager_ShortCheer2Sound)
package {
import mx.core.*;
public class ResourceManager_ShortCheer2Sound extends SoundAsset {
}
}//package
Section 241
//ResourceManager_ShortCheer3Sound (ResourceManager_ShortCheer3Sound)
package {
import mx.core.*;
public class ResourceManager_ShortCheer3Sound extends SoundAsset {
}
}//package
Section 242
//ResourceManager_ShortMurmurSound (ResourceManager_ShortMurmurSound)
package {
import mx.core.*;
public class ResourceManager_ShortMurmurSound extends SoundAsset {
}
}//package
Section 243
//ResourceManager_SmileyFaceTexture (ResourceManager_SmileyFaceTexture)
package {
import mx.core.*;
public class ResourceManager_SmileyFaceTexture extends BitmapAsset {
}
}//package
Section 244
//ResourceManager_StoneBackground (ResourceManager_StoneBackground)
package {
import mx.core.*;
public class ResourceManager_StoneBackground extends BitmapAsset {
}
}//package
Section 245
//ResourceManager_WoodBackground (ResourceManager_WoodBackground)
package {
import mx.core.*;
public class ResourceManager_WoodBackground extends BitmapAsset {
}
}//package
Section 246
//ResourceManager_WoodBlue (ResourceManager_WoodBlue)
package {
import mx.core.*;
public class ResourceManager_WoodBlue extends BitmapAsset {
}
}//package
Section 247
//ResourceManager_WoodPurple (ResourceManager_WoodPurple)
package {
import mx.core.*;
public class ResourceManager_WoodPurple extends BitmapAsset {
}
}//package
Section 248
//ResourceManager_WoodRed (ResourceManager_WoodRed)
package {
import mx.core.*;
public class ResourceManager_WoodRed extends BitmapAsset {
}
}//package
Section 249
//SiteLockScreen (SiteLockScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class SiteLockScreen extends Sprite {
private var _goHome2:GameButton;
private var _headline:TextField;
public var h:Number;// = 480
public var w:Number;// = 640
private var _backdrop:Sprite;
private var _message:TextField;
private var _goHome1:GameButton;
public function SiteLockScreen(){
var _local1:TextFormat;
var _local2:TextFormat;
var _local3:TextFormat;
w = 640;
h = 480;
super();
_backdrop = new Sprite();
_headline = new TextField();
_message = new TextField();
_local1 = new TextFormat("Verdana", 30, 0xAA0000, null, null, null, null, null, TextFormatAlign.CENTER);
_local2 = new TextFormat("Verdana", 60, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.CENTER);
_local3 = new TextFormat("Verdana", 10, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.LEFT);
_goHome1 = new GameButton("Go to bubblebox.com", null, (w - 100), 40, clickGoHome);
_goHome2 = new GameButton("Go to bubblebox.com", null, (w - 100), 40, clickGoHome, null);
_headline.defaultTextFormat = _local2;
_message.defaultTextFormat = _local3;
_headline.embedFonts = true;
_message.embedFonts = true;
_headline.antiAliasType = AntiAliasType.ADVANCED;
_message.antiAliasType = AntiAliasType.ADVANCED;
_message.wordWrap = true;
_backdrop.graphics.beginFill(0);
_backdrop.graphics.drawRect(0, 0, w, h);
_backdrop.graphics.endFill();
_headline.x = 0;
_headline.y = 70;
_headline.width = w;
_headline.height = 70;
_message.x = 30;
_message.y = 140;
_message.width = (w - 50);
_message.height = (h - 210);
_goHome1.x = 50;
_goHome1.y = 20;
_goHome2.x = 50;
_goHome2.y = (h - 70);
addChild(_backdrop);
_backdrop.addChild(_headline);
_backdrop.addChild(_message);
_backdrop.addChild(_goHome1);
_backdrop.addChild(_goHome2);
_backdrop.addChild(SpriteFactory.makeBorder(w, h));
_headline.text = "I'M SORRY!";
_message.text = "\nI truly am.";
_message.appendText("\nIt appears that this beta copy of the game has been taken without permission");
_message.appendText("\n\nYou're just looking to have some fun, and instead you get met with this irritation, and for that I truly apologize.");
_message.appendText("\n\nIf you would kindly direct your browser bubblebox.com (either manually or by clicking one of the buttons above and below this message) you will find the actual legit version of this game, and you can play to your heart's content.");
_message.appendText("\n\nPlaying a legitimate version of my game supports me as the author, and makes it possible for me to continue to create games.");
_message.appendText("\n\nThank you for your support and understanding.");
_message.appendText("\nAgain, I apologize for the inconvenience.");
_message.appendText("\n\n-Joe");
}
public function clickGoHome(_arg1:MouseEvent):void{
var _local2:URLRequest;
trace("GO HOME!");
_local2 = new URLRequest("http://www.bubblebox.com/freecontent.htm");
navigateToURL(_local2, "_self");
}
}
}//package
Section 250
//skins_properties (skins_properties)
package {
import mx.resources.*;
public class skins_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["notLoaded"] = "Unable to load '{0}'.";
return (_local1);
}
}
}//package
Section 251
//Slam (Slam)
package {
import flash.media.*;
public dynamic class Slam extends Sound {
}
}//package
Section 252
//SoundManager (SoundManager)
package {
import flash.media.*;
public class SoundManager {
private static var _music1:Sound = new ResourceManager.BackgroundMusic1();
private static var _cheer:Sound = new ResourceManager.CheerSound();
private static var _ballPocket:Sound = new ResourceManager.PoolPocketSound();
private static var _ballHit:Sound = new ResourceManager.PoolBallHitSound();
public static var _globalSoundMusicTransform:SoundTransform = new SoundTransform(0.5);
private static var _shortMurmur:Sound = new ResourceManager.ShortMurmurSound();
private static var _buzzer:Sound = new ResourceManager.BuzzerSound();
private static var _shortCheer1:Sound = new ResourceManager.ShortCheer1Sound();
private static var _shortCheer3:Sound = new ResourceManager.ShortCheer3Sound();
private static var _shortCheer2:Sound = new ResourceManager.ShortCheer2Sound();
public static var _globalSoundEffectTransform:SoundTransform = new SoundTransform(0.75);
private static var _ballBump:Sound = new ResourceManager.PoolBallBumpSound();
public static var _musicChannel:SoundChannel;
public static var _globalSoundTransform:SoundTransform = new SoundTransform(0.5);
public static function playBallHit(_arg1:Number=1):SoundChannel{
return (_ballHit.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playShortMurmur(_arg1:Number=1):SoundChannel{
return (_shortMurmur.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playBallPocket(_arg1:Number=1):SoundChannel{
return (_ballPocket.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playShortCheer1(_arg1:Number=1):SoundChannel{
return (_shortCheer1.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playShortCheer2(_arg1:Number=1):SoundChannel{
return (_shortCheer2.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function startBackgroundMusic(_arg1:Number=1):SoundChannel{
_musicChannel = _music1.play(0, 99999, new SoundTransform(_arg1));
return (_musicChannel);
}
public static function playShortCheer3(_arg1:Number=1):SoundChannel{
return (_shortCheer3.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playBuzzer(_arg1:Number=1):SoundChannel{
return (_buzzer.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playBallBump(_arg1:Number=1):SoundChannel{
return (_ballBump.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
public static function playCheer(_arg1:Number=1):SoundChannel{
return (_cheer.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume))));
}
}
}//package
Section 253
//SpriteFactory (SpriteFactory)
package {
import flash.display.*;
import flash.geom.*;
public class SpriteFactory {
public static function makeBorderedFrameAlpha(_arg1:Number, _arg2:Number, _arg3:Number=20, _arg4:uint=0x111111, _arg5:uint=0xFFFFFF, _arg6:Number=0.55, _arg7:Number=0.95):Sprite{
var _local8:Sprite;
_local8 = new Sprite();
_local8.graphics.beginFill(_arg5, _arg6);
_local8.graphics.drawRoundRect(0, 0, _arg1, _arg2, _arg3, _arg3);
_local8.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.05));
_local8.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3);
_local8.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.1));
_local8.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3);
_local8.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.15));
_local8.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3);
_local8.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.2));
_local8.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3);
_local8.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.22));
_local8.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3);
_local8.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.2));
_local8.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3);
_local8.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.15));
_local8.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3);
_local8.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.1));
_local8.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3);
_local8.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg5, (_arg6 + 0.05));
_local8.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3);
_local8.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3);
_local8.graphics.endFill();
_local8.graphics.beginFill(_arg4, _arg7);
_local8.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3);
_local8.graphics.endFill();
return (_local8);
}
public static function makeBorderedFrame(_arg1:Number, _arg2:Number, _arg3:Number=20, _arg4:uint=0x111111, _arg5:uint=0xFFFFFF, _arg6:Number=1):Sprite{
var _local7:Sprite;
_local7 = new Sprite();
_local7.graphics.beginFill(colorSum(_arg5, -85, -85, -85));
_local7.graphics.drawRoundRect(0, 0, _arg1, _arg2, _arg3, _arg3);
_local7.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -68, -68, -68));
_local7.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3);
_local7.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -51, -51, -51));
_local7.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3);
_local7.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -34, -34, -34));
_local7.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3);
_local7.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -17, -17, -17));
_local7.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3);
_local7.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(_arg5);
_local7.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3);
_local7.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -17, -17, -17));
_local7.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3);
_local7.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -34, -34, -34));
_local7.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3);
_local7.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -51, -51, -51));
_local7.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3);
_local7.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(colorSum(_arg5, -68, -68, -68));
_local7.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3);
_local7.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3);
_local7.graphics.endFill();
_local7.graphics.beginFill(_arg4, _arg6);
_local7.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3);
_local7.graphics.endFill();
return (_local7);
}
public static function makeGradientBar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:int, _arg6:int, _arg7:int):Sprite{
var _local8:Sprite;
var _local9:int;
_local8 = new Sprite();
_local9 = 0;
while ((((_arg1 > 0)) && ((_arg2 > 0)))) {
_local8.graphics.beginFill(_slot1.colorSum(_arg4, (_arg5 * _local9), (_arg6 * _local9), (_arg7 * _local9)));
_local8.graphics.drawRoundRect(_local9, _local9, _arg1, _arg2, _arg3, _arg3);
_local8.graphics.endFill();
_arg1 = (_arg1 - 2);
_arg2 = (_arg2 - 2);
_local9++;
};
return (_local8);
}
private static function colorSum(_arg1:uint, _arg2:int, _arg3:int, _arg4:int):uint{
var _local5:ColorTransform;
_local5 = new ColorTransform();
_local5.color = _arg1;
_local5.redOffset = (_local5.redOffset + _arg2);
_local5.greenOffset = (_local5.greenOffset + _arg3);
_local5.blueOffset = (_local5.blueOffset + _arg4);
if (_local5.redOffset < 0){
_local5.redOffset = 0;
} else {
if (_local5.redOffset > 0xFF){
_local5.redOffset = 0xFF;
};
};
if (_local5.greenOffset < 0){
_local5.greenOffset = 0;
} else {
if (_local5.greenOffset > 0xFF){
_local5.greenOffset = 0xFF;
};
};
if (_local5.blueOffset < 0){
_local5.blueOffset = 0;
} else {
if (_local5.blueOffset > 0xFF){
_local5.blueOffset = 0xFF;
};
};
return (_local5.color);
}
public static function makeBorder(_arg1:Number, _arg2:Number, _arg3:uint=0xAA0000):Sprite{
var _local4:Sprite;
_local4 = new Sprite();
_local4.graphics.beginFill(_arg3, 1);
_local4.graphics.drawRect(0, 0, _arg1, _arg2);
_local4.graphics.drawRect(1, 1, (_arg1 - 2), (_arg2 - 2));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.9);
_local4.graphics.drawRect(1, 1, (_arg1 - 2), (_arg2 - 2));
_local4.graphics.drawRect(2, 2, (_arg1 - 4), (_arg2 - 4));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.8);
_local4.graphics.drawRect(2, 2, (_arg1 - 4), (_arg2 - 4));
_local4.graphics.drawRect(3, 3, (_arg1 - 6), (_arg2 - 6));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.7);
_local4.graphics.drawRect(3, 3, (_arg1 - 6), (_arg2 - 6));
_local4.graphics.drawRect(4, 4, (_arg1 - 8), (_arg2 - 8));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.6);
_local4.graphics.drawRect(4, 4, (_arg1 - 8), (_arg2 - 8));
_local4.graphics.drawRect(5, 5, (_arg1 - 10), (_arg2 - 10));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.5);
_local4.graphics.drawRect(5, 5, (_arg1 - 10), (_arg2 - 10));
_local4.graphics.drawRect(6, 6, (_arg1 - 12), (_arg2 - 12));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.4);
_local4.graphics.drawRect(6, 6, (_arg1 - 12), (_arg2 - 12));
_local4.graphics.drawRect(7, 7, (_arg1 - 14), (_arg2 - 14));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.3);
_local4.graphics.drawRect(7, 7, (_arg1 - 14), (_arg2 - 14));
_local4.graphics.drawRect(8, 8, (_arg1 - 16), (_arg2 - 16));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.2);
_local4.graphics.drawRect(8, 8, (_arg1 - 16), (_arg2 - 16));
_local4.graphics.drawRect(9, 9, (_arg1 - 18), (_arg2 - 18));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.1);
_local4.graphics.drawRect(9, 9, (_arg1 - 18), (_arg2 - 18));
_local4.graphics.drawRect(10, 10, (_arg1 - 20), (_arg2 - 20));
_local4.graphics.endFill();
_local4.graphics.beginFill(_arg3, 0.01);
_local4.graphics.drawRect(10, 10, (_arg1 - 20), (_arg2 - 20));
_local4.graphics.drawRect(11, 11, (_arg1 - 22), (_arg2 - 22));
_local4.graphics.endFill();
_local4.mouseEnabled = false;
return (_local4);
}
public static function makeBlob(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:uint):Sprite{
var _local6:Sprite;
var _local7:uint;
var _local8:Number;
var _local9:Number;
_local6 = new Sprite();
_local7 = 0;
while (_local7 < _arg5) {
_local8 = ((Math.random() * _arg2) - (_arg2 * 0.5));
_local9 = ((Math.random() * _arg2) - (_arg2 * 0.5));
_local6.graphics.beginFill(_arg3, _arg4);
_local6.graphics.drawCircle(_local8, _local9, _arg1);
_local6.graphics.endFill();
_local7++;
};
return (_local6);
}
public static function drawGradientBar(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint, _arg6:int, _arg7:int, _arg8:int):void{
var _local9:int;
_arg1.graphics.clear();
_local9 = 0;
while ((((_arg2 > 0)) && ((_arg3 > 0)))) {
_arg1.graphics.beginFill(_slot1.colorSum(_arg5, (_arg6 * _local9), (_arg7 * _local9), (_arg8 * _local9)));
_arg1.graphics.drawRoundRect(_local9, _local9, _arg2, _arg3, _arg4, _arg4);
_arg1.graphics.endFill();
_arg2 = (_arg2 - 2);
_arg3 = (_arg3 - 2);
_local9++;
};
}
}
}//package
Section 254
//styles_properties (styles_properties)
package {
import mx.resources.*;
public class styles_properties extends ResourceBundle {
override protected function getContent():Object{
var _local1:Object;
_local1 = {};
_local1["unableToLoad"] = "Unable to load style({0}): {1}.";
return (_local1);
}
}
}//package
Section 255
//Vector (Vector)
package {
import flash.geom.*;
public class Vector {
private var _length:Number;
private var _y:Number;
private var _x:Number;
public function Vector(_arg1:Number=0, _arg2:Number=0){
this.x = _arg1;
this.y = _arg2;
}
public function get y():Number{
return (_y);
}
public function NormalLH():Vector{
var _local1:Vector;
_local1 = new Vector(y, -(x));
return (_local1);
}
public function Multiply(_arg1:Number):Vector{
var _local2:Vector;
_local2 = new Vector((x * _arg1), (y * _arg1));
return (_local2);
}
public function DotProduct(_arg1:Vector):Number{
return (((this.x * _arg1.x) + (this.y * _arg1.y)));
}
public function Add(_arg1:Vector):Vector{
var _local2:Vector;
_local2 = new Vector((this.x + _arg1.x), (this.y + _arg1.y));
return (_local2);
}
public function Inverse():Vector{
var _local1:Vector;
_local1 = new Vector(-(x), -(y));
return (_local1);
}
public function Rotate(_arg1:Number):Vector{
var _local2:Vector;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = new Vector(x, y);
_local3 = this.length;
_local4 = Math.cos(Geometry.DegreesToRadians(_arg1));
_local5 = Math.sin(Geometry.DegreesToRadians(_arg1));
_local2.x = ((_local4 * x) - (_local5 * y));
_local2.y = ((_local5 * x) + (_local4 * y));
return (_local2);
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
public function AngleBetween(_arg1:Vector):Number{
return (Math.acos(this.Normalize().DotProduct(_arg1.Normalize())));
}
public function Divide(_arg1:Number):Vector{
var _local2:Vector;
_local2 = new Vector((x / _arg1), (y / _arg1));
return (_local2);
}
public function ToLength(_arg1:Number):Vector{
return (this.Normalize().Multiply(_arg1));
}
public function get length():Number{
return (Math.sqrt(((_x * _x) + (_y * _y))));
}
public function Normalize():Vector{
var _local1:Vector;
var _local2:Number;
_local1 = new Vector(this.x, this.y);
_local2 = _local1.length;
if (_local2 != 0){
_local1.x = (_local1.x / _local2);
_local1.y = (_local1.y / _local2);
};
return (_local1);
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function Angle():Number{
return (Math.acos(this.Normalize().DotProduct(new Vector(1, 0))));
}
public function ToPoint():Point{
return (new Point(this.x, this.y));
}
public function get x():Number{
return (_x);
}
public function ProjectOnto(_arg1:Vector):Vector{
var _local2:Number;
var _local3:Number;
_local2 = this.DotProduct(_arg1);
_local3 = _arg1.DotProduct(_arg1);
return (new Vector(((_local2 / _local3) * _arg1.x), ((_local2 / _local3) * _arg1.y)));
}
public function Subtract(_arg1:Vector):Vector{
var _local2:Vector;
_local2 = new Vector((this.x - _arg1.x), (this.y - _arg1.y));
return (_local2);
}
public function NormalRH():Vector{
var _local1:Vector;
_local1 = new Vector(-(y), x);
return (_local1);
}
public static function fromPoints(_arg1:Point, _arg2:Point):Vector{
return (new Vector((_arg2.x - _arg1.x), (_arg2.y - _arg1.y)));
}
public static function fromPoint(_arg1:Point):Vector{
return (new Vector(_arg1.x, _arg1.y));
}
}
}//package