Section 1
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 2
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 3
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 4
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 5
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 6
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.0.0.0";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 7
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 8
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 9
//IChildList (mx.core.IChildList)
package mx.core {
import flash.geom.*;
import flash.display.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 10
//IContainer (mx.core.IContainer)
package mx.core {
import flash.geom.*;
import flash.display.*;
import mx.managers.*;
import flash.media.*;
import flash.text.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 11
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 12
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 13
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 14
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 15
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 16
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 17
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 18
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 19
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 20
//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 21
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.0.0.0";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 22
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 23
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.geom.*;
import flash.display.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 24
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.0.0.0";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 25
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.0.0.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 26
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.0.0.0";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 27
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.0.0.0";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 28
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 29
//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 30
//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 31
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 32
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 33
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function get toolTipChildren():IChildList;
function set focusPane(_arg1:Sprite):void;
function isTopLevel():Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function get document():Object;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
}
}//package mx.managers
Section 34
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var bootstrapLoaderInfoURL:String;
}
}//package mx.managers
Section 35
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 36
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.0.0.0";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import flash.utils.*;
import flash.net.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
var _local3:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local3 = new ModuleEvent(ModuleEvent.PROGRESS);
_local3.bytesLoaded = info.size;
_local3.bytesTotal = info.size;
dispatchEvent(_local3);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_url.indexOf("published://") == 0){
return;
};
var _local3:URLRequest = new URLRequest(_url);
var _local4:LoaderContext = new LoaderContext();
_local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local4.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local4.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local3, _local4);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 37
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 38
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 39
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 40
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 41
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.0.0.0";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 42
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.0.0.0";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
};
return (instance);
}
}
}//package mx.resources
Section 43
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import flash.utils.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.0.0.0";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 44
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.0.0.0";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 45
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 46
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.0.0.0";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 47
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.0.0.0";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return (_styleName.getStyle(_arg1));
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 48
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.geom.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.utils.*;
import flash.net.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.0.0.0";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 49
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.managers.*;
import flash.utils.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.0.0.0";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 50
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 51
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 52
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 53
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 54
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 55
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.0.0.0";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 56
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
import flash.utils.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.0.0.0";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 57
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
import mx.core.*;
public class ColorUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 58
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 59
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 60
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.0.0.0";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 61
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 62
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 63
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 64
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingLeft = 5;
this.fontWeight = "normal";
this.cornerRadius = 0;
this.paddingRight = 5;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.leading = 0;
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 65
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 66
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 67
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.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 68
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.disabledIconColor = 0x999999;
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.modalTransparencyColor = 0xDDDDDD;
this.disabledColor = 11187123;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.version = "3.0.0";
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.textDecoration = "none";
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.iconColor = 0x111111;
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 69
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 70
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 71
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingRight = 2;
this.paddingBottom = 2;
};
};
}
}
}//package
Section 72
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 73
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 74
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "left";
this.fontWeight = "normal";
};
};
}
}
}//package
Section 75
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 76
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.highlightColor = 12897484;
this.borderColor = 14015965;
this.paddingLeft = 5;
this.shadowCapColor = 14015965;
this.paddingRight = 5;
this.shadowColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.backgroundColor = 0xFFFFFF;
this.borderCapColor = 9542041;
};
};
}
}
}//package
Section 77
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 78
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 79
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 80
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 81
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 82
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 83
//Board (Board)
package {
import flash.media.*;
public class Board {
private var chain:Array;
public var grid:Array;
private var parent:Spinmania;
public function Board(_arg1:Spinmania){
var _local2:Number;
var _local3:Number;
super();
parent = _arg1;
this.grid = new Array();
_local2 = 0;
while (_local2 < Spinmania.COLS) {
grid[_local2] = new Array();
_local2++;
};
}
private function colorRight(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
return (colorChain(1, _arg1, (_arg2 + 1), _arg3));
}
public function colorBoard(_arg1:Array, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Pipe;
var _local11:Pipe;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Sound;
if (_arg1.length > 0){
_local3 = 0;
while (_local3 < _arg1.length) {
_local10 = _arg1[_local3];
chain = new Array();
chain.push(_local10);
_local9 = _local10.col;
_local10.sector[0] = (_local10.sector[0] | _local9);
_local10.sector[1] = (_local10.sector[1] | _local9);
_local10.sector[2] = (_local10.sector[2] | _local9);
_local10.sector[3] = (_local10.sector[3] | _local9);
switch (_local10.rot){
case 0:
_local12 = colorUp(_local9, _local10.xpos, _local10.ypos);
break;
case 1:
_local12 = colorRight(_local9, _local10.xpos, _local10.ypos);
break;
case 2:
_local12 = colorDown(_local9, _local10.xpos, _local10.ypos);
break;
case 3:
_local12 = colorLeft(_local9, _local10.xpos, _local10.ypos);
break;
};
if (((_local12) && ((chain.length > 1)))){
_local13 = false;
_local4 = 0;
while (_local4 < chain.length) {
_local11 = chain[_local4];
if (_local11.remove == 0){
_local13 = true;
_local11.remove = _arg2;
parent.rowAddCounter--;
};
_local4++;
};
if (_local13){
_local10.len = chain.length;
} else {
_local10.len = 0;
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.length) {
_local10 = _arg1[_local3];
if (_local10.len > 0){
_local7 = ((_local10.len * _local10.len) * Spinmania.SCOREBASE);
_local8 = Pipe.pipemul[_local10.sector[0]];
_local5 = (((_local10.xpos * Spinmania.PIPEWIDTH) + Spinmania.XOFFSET) + (Spinmania.PIPEWIDTH / 2));
_local6 = (((_local10.ypos * Spinmania.PIPEHEIGHT) + Spinmania.YOFFSET) + (Spinmania.PIPEHEIGHT / 2));
parent.scoreCounter.push(new Score(_local7, ((_local8)>1) ? (_local8.toString() + " x ") : "", Spinmania.SCOREDELAY, _local5, _local6));
parent.scoreinc = (parent.scoreinc + (_local7 * _local8));
_local10.len = 0;
_local14 = parent.media.networkSounds[_local10.sector[0]];
if (_local14 != null){
_local14.play();
};
};
_local3++;
};
};
}
private function colorDown(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
return (colorChain(2, _arg1, _arg2, (_arg3 + 1)));
}
private function colorChain(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{
var _local5:Pipe;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
if ((((((((_arg3 < 0)) || ((_arg3 >= Spinmania.COLS)))) || ((_arg4 < 0)))) || ((_arg4 >= Spinmania.ROWS)))){
return (true);
};
_local5 = grid[_arg3][_arg4];
if (_local5 == null){
return (false);
};
switch (_local5.typ){
case 0:
if (_local5.rot == ((_arg1 + 2) % 4)){
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
};
return (true);
case 1:
switch (_local5.rot){
case 0:
case 2:
if ((((_arg1 == 1)) || ((_arg1 == 3)))){
return (true);
};
if ((((_local5.sector[2] & _arg2)) || ((_local5.sector[0] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
if (_arg1 == 0){
return (colorUp(_arg2, _arg3, _arg4));
};
return (colorDown(_arg2, _arg3, _arg4));
case 1:
case 3:
if ((((_arg1 == 0)) || ((_arg1 == 2)))){
return (true);
};
if ((((_local5.sector[1] & _arg2)) || ((_local5.sector[3] & _arg2)))){
return (true);
};
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
if (_arg1 == 1){
return (colorRight(_arg2, _arg3, _arg4));
};
return (colorLeft(_arg2, _arg3, _arg4));
};
break;
case 2:
switch (_local5.rot){
case 0:
if ((((_local5.sector[0] & _arg2)) || ((_local5.sector[1] & _arg2)))){
return (true);
};
switch (_arg1){
case 2:
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
chain.push(_local5);
return (colorRight(_arg2, _arg3, _arg4));
case 3:
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
return (colorUp(_arg2, _arg3, _arg4));
default:
return (true);
};
case 1:
if ((((_local5.sector[1] & _arg2)) || ((_local5.sector[2] & _arg2)))){
return (true);
};
switch (_arg1){
case 0:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
chain.push(_local5);
return (colorRight(_arg2, _arg3, _arg4));
case 3:
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorDown(_arg2, _arg3, _arg4));
default:
return (true);
};
case 2:
if ((((_local5.sector[2] & _arg2)) || ((_local5.sector[3] & _arg2)))){
return (true);
};
switch (_arg1){
case 0:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
return (colorLeft(_arg2, _arg3, _arg4));
case 1:
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorDown(_arg2, _arg3, _arg4));
default:
return (true);
};
case 3:
if ((((_local5.sector[3] & _arg2)) || ((_local5.sector[0] & _arg2)))){
return (true);
};
switch (_arg1){
case 1:
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
return (colorUp(_arg2, _arg3, _arg4));
case 2:
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
return (colorLeft(_arg2, _arg3, _arg4));
default:
return (true);
};
};
break;
case 3:
switch (_local5.rot){
case 0:
if ((((((_local5.sector[3] & _arg2)) || ((_local5.sector[1] & _arg2)))) || ((_local5.sector[0] & _arg2)))){
return (true);
};
switch (_arg1){
case 1:
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorRight(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 2:
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorRight(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 3:
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
default:
return (true);
};
case 1:
if ((((((_local5.sector[2] & _arg2)) || ((_local5.sector[1] & _arg2)))) || ((_local5.sector[0] & _arg2)))){
return (true);
};
switch (_arg1){
case 0:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorRight(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 2:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorRight(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 3:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
default:
return (true);
};
case 2:
if ((((((_local5.sector[1] & _arg2)) || ((_local5.sector[2] & _arg2)))) || ((_local5.sector[3] & _arg2)))){
return (true);
};
switch (_arg1){
case 0:
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
_local6 = colorRight(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 1:
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
_local6 = colorRight(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 3:
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
_local6 = colorDown(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
default:
return (true);
};
case 3:
if ((((((_local5.sector[2] & _arg2)) || ((_local5.sector[3] & _arg2)))) || ((_local5.sector[0] & _arg2)))){
return (true);
};
switch (_arg1){
case 0:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 1:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
case 2:
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
_local6 = colorDown(_arg2, _arg3, _arg4);
_local7 = colorLeft(_arg2, _arg3, _arg4);
return (((_local6) && (_local7)));
default:
return (true);
};
};
break;
case 4:
if ((((((((_local5.sector[0] & _arg2)) || ((_local5.sector[1] & _arg2)))) || ((_local5.sector[2] & _arg2)))) || ((_local5.sector[3] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
switch (_arg1){
case 0:
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorRight(_arg2, _arg3, _arg4);
_local8 = colorLeft(_arg2, _arg3, _arg4);
return (((((_local6) && (_local7))) && (_local8)));
case 1:
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorRight(_arg2, _arg3, _arg4);
_local8 = colorDown(_arg2, _arg3, _arg4);
return (((((_local6) && (_local7))) && (_local8)));
case 2:
_local6 = colorRight(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
_local8 = colorLeft(_arg2, _arg3, _arg4);
return (((((_local6) && (_local7))) && (_local8)));
case 3:
_local6 = colorUp(_arg2, _arg3, _arg4);
_local7 = colorDown(_arg2, _arg3, _arg4);
_local8 = colorLeft(_arg2, _arg3, _arg4);
return (((((_local6) && (_local7))) && (_local8)));
};
break;
case 5:
switch (_arg1){
case 0:
if ((((_local5.sector[0] & _arg2)) || ((_local5.sector[2] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorUp(_arg2, _arg3, _arg4));
case 1:
if ((((_local5.sector[3] & _arg2)) || ((_local5.sector[1] & _arg2)))){
return (true);
};
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
chain.push(_local5);
return (colorRight(_arg2, _arg3, _arg4));
case 2:
if ((((_local5.sector[0] & _arg2)) || ((_local5.sector[2] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorDown(_arg2, _arg3, _arg4));
case 3:
if ((((_local5.sector[1] & _arg2)) || ((_local5.sector[3] & _arg2)))){
return (true);
};
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
return (colorLeft(_arg2, _arg3, _arg4));
};
break;
case 6:
switch (_local5.rot){
case 0:
case 2:
switch (_arg1){
case 0:
if ((((_local5.sector[2] & _arg2)) || ((_local5.sector[3] & _arg2)))){
return (true);
};
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
return (colorLeft(_arg2, _arg3, _arg4));
case 1:
if ((((_local5.sector[3] & _arg2)) || ((_local5.sector[2] & _arg2)))){
return (true);
};
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorDown(_arg2, _arg3, _arg4));
case 2:
if ((((_local5.sector[0] & _arg2)) || ((_local5.sector[1] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
chain.push(_local5);
return (colorRight(_arg2, _arg3, _arg4));
case 3:
if ((((_local5.sector[1] & _arg2)) || ((_local5.sector[0] & _arg2)))){
return (true);
};
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
return (colorUp(_arg2, _arg3, _arg4));
};
break;
case 1:
case 3:
switch (_arg1){
case 0:
if ((((_local5.sector[2] & _arg2)) || ((_local5.sector[1] & _arg2)))){
return (true);
};
_local5.sector[2] = (_local5.sector[2] | _arg2);
_local5.sector[1] = (_local5.sector[1] | _arg2);
chain.push(_local5);
return (colorRight(_arg2, _arg3, _arg4));
case 1:
if ((((_local5.sector[3] & _arg2)) || ((_local5.sector[0] & _arg2)))){
return (true);
};
_local5.sector[3] = (_local5.sector[3] | _arg2);
_local5.sector[0] = (_local5.sector[0] | _arg2);
chain.push(_local5);
return (colorUp(_arg2, _arg3, _arg4));
case 2:
if ((((_local5.sector[0] & _arg2)) || ((_local5.sector[3] & _arg2)))){
return (true);
};
_local5.sector[0] = (_local5.sector[0] | _arg2);
_local5.sector[3] = (_local5.sector[3] | _arg2);
chain.push(_local5);
return (colorLeft(_arg2, _arg3, _arg4));
case 3:
if ((((_local5.sector[1] & _arg2)) || ((_local5.sector[2] & _arg2)))){
return (true);
};
_local5.sector[1] = (_local5.sector[1] | _arg2);
_local5.sector[2] = (_local5.sector[2] | _arg2);
chain.push(_local5);
return (colorDown(_arg2, _arg3, _arg4));
};
break;
};
break;
};
trace("Reached end of colouring routine (shouldn't happen!)");
return (true);
}
private function colorLeft(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
return (colorChain(3, _arg1, (_arg2 - 1), _arg3));
}
public function clearBoard():void{
var _local1:Number;
var _local2:Number;
_local1 = 0;
while (_local1 < Spinmania.COLS) {
_local2 = 0;
while (_local2 < Spinmania.ROWS) {
grid[_local1][_local2] = null;
_local2++;
};
_local1++;
};
}
public function newRow(_arg1:Array, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Pipe;
var _local7:Pipe;
_local4 = 0;
while (_local4 < Spinmania.COLS) {
if (((!((_arg2 == _local4))) || ((((_arg3 < (Spinmania.ROWS - 1))) && ((grid[_local4][(_arg3 + 1)] == null)))))){
_local7 = _arg1[_local4];
if (_arg1[_local4].typ == Pipe.CAP){
parent.addCap(_arg1[_local4]);
};
_local5 = (Spinmania.ROWS - 1);
while (_local5 >= 0) {
_local6 = grid[_local4][_local5];
if (_local7 != null){
grid[_local4][_local5] = _local7;
_local7.xpos = _local4;
_local7.ypos = _local5;
_local7.yoff = Spinmania.PIPEHEIGHT;
};
if (_local6 == null){
break;
};
_local7 = _local6;
_local5--;
};
};
_local4++;
};
}
public function updatePipes():void{
var _local1:Number;
var _local2:Number;
var _local3:Pipe;
var _local4:Number = parent.currentPipe.xpos;
var _local5:Number = parent.currentPipe.ypos;
_local1 = 0;
while (_local1 < Spinmania.COLS) {
_local2 = (Spinmania.ROWS - 1);
while (_local2 >= 0) {
_local3 = grid[_local1][_local2];
if (_local3 != null){
if ((((((((((((((_local2 < (Spinmania.ROWS - 1))) && ((grid[_local1][(_local2 + 1)] == null)))) && (!((((_local1 == _local4)) && (((_local2 + 1) == _local5))))))) && ((_local3.yoff == 0)))) && ((_local3.settle == 0)))) && ((_local3.appear == 0)))) && ((_local3.remove == 0)))){
_local3.yoff = -(Spinmania.PIPEHEIGHT);
_local3.ypos++;
grid[_local1][(_local2 + 1)] = _local3;
grid[_local1][_local2] = null;
} else {
if (_local3.yoff > 0){
_local3.yoff = (_local3.yoff - Spinmania.PIPEYSPEED);
if (_local3.yoff <= 0){
_local3.yoff = 0;
_local3.settle = Spinmania.PIPESETTLE;
};
} else {
if (_local3.yoff < 0){
_local3.yoff = (_local3.yoff + Spinmania.PIPEYSPEED);
if (_local3.yoff >= 0){
_local3.yoff = 0;
_local3.settle = Spinmania.PIPESETTLE;
};
};
};
if (_local3.settle > 0){
_local3.settle--;
} else {
if (_local3.settle < 0){
_local3.settle = 0;
};
};
if (_local3.xoff > 0){
_local3.xoff = (_local3.xoff - Spinmania.PIPEXSPEED);
if (_local3.xoff <= 0){
_local3.xoff = 0;
};
} else {
if (_local3.xoff < 0){
_local3.xoff = (_local3.xoff + Spinmania.PIPEXSPEED);
if (_local3.xoff >= 0){
_local3.xoff = 0;
};
};
};
};
};
_local2--;
};
_local1++;
};
}
private function colorUp(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
return (colorChain(0, _arg1, _arg2, (_arg3 - 1)));
}
}
}//package
Section 84
//Char (Char)
package {
import flash.geom.*;
import flash.display.*;
public class Char {
private var xadvance:Number;
private var xoffset:Number;
private var yoffset:Number;
private var code:Number;
private var xsize:Number;
private var ysize:Number;
private var ypos:Number;
private var xpos:Number;
public function Char(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number){
this.code = _arg1;
this.xpos = _arg2;
this.ypos = _arg3;
this.xsize = _arg4;
this.ysize = _arg5;
this.xoffset = _arg6;
this.yoffset = _arg7;
this.xadvance = _arg8;
}
public static function centreText(_arg1:BitmapData, _arg2:BitmapData, _arg3:Array, _arg4:String, _arg5:Number, _arg6:Number, _arg7:Number=1, _arg8:Number=1):void{
var _local9:Number;
var _local10:Number;
var _local11:Char;
var _local12:Rectangle;
var _local13:Point;
var _local14:Number;
var _local15:Number;
var _local16:BitmapData;
var _local17:Point = textSize(_arg3, _arg4);
if ((((_arg7 == 1)) && ((_arg8 == 1)))){
_local16 = _arg1;
_local14 = (_arg5 - (_local17.x / 2));
_local15 = (_arg6 - (_local17.y / 2));
} else {
_local16 = new BitmapData(_local17.x, _local17.y, true, 0);
_local14 = 1;
_local15 = 1;
};
_local9 = 0;
while (_local9 < _arg4.length) {
_local10 = (_arg4.charCodeAt(_local9) - 32);
if ((((_local10 >= 0)) && ((_local10 < _arg3.length)))){
_local11 = _arg3[_local10];
_local12 = new Rectangle(_local11.xpos, _local11.ypos, _local11.xsize, _local11.ysize);
_local13 = new Point((_local14 + _local11.xoffset), (_local15 + _local11.yoffset));
_local16.copyPixels(_arg2, _local12, _local13, null, null, true);
_local14 = (_local14 + _local11.xadvance);
};
_local9++;
};
if ((((_arg7 == 1)) && ((_arg8 == 1)))){
return;
};
var _local18:Matrix = new Matrix();
_local18.scale(_arg7, _arg7);
_local18.translate((_arg5 - ((_local17.x * _arg7) / 2)), (_arg6 - ((_local17.y * _arg7) / 2)));
var _local19:ColorTransform = new ColorTransform(1, 1, 1, _arg8);
_arg1.draw(_local16, _local18, _local19, null, null, true);
}
public static function textSize(_arg1:Array, _arg2:String):Point{
var _local3:Number;
var _local4:Number;
var _local5:Char;
var _local6:Number = 0;
if (((!((_arg1 == null))) && (!((_arg2 == null))))){
_local4 = 0;
while (_local4 < _arg2.length) {
_local3 = (_arg2.charCodeAt(_local4) - 32);
if ((((_local3 >= 0)) && ((_local3 < _arg1.length)))){
_local5 = _arg1[_local3];
_local6 = (_local6 + _local5.xadvance);
};
_local4++;
};
};
_local6 = (_local6 + 4);
return (new Point(_local6, 42));
}
}
}//package
Section 85
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 86
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 87
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 88
//Media (Media)
package {
import flash.display.*;
import flash.media.*;
public class Media {
private var greennetworkSoundClass:Class;
public var titlelogo:Bitmap;
private var flare02Class:Class;
private var flare10Class:Class;
private var thermoshadeClass:Class;
private var fluid1Class:Class;
public var networkSounds:Array;
public var mercury:Bitmap;
public var squeak2Sound:Sound;
private var wheelspokesClass:Class;
private var wheelstudsClass:Class;
private var barHighlightClass:Class;
private var flare07Class:Class;
private var mercuryClass:Class;
private var gameoverSoundClass:Class;
private var rednetworkSoundClass:Class;
private var pauseonClass:Class;
private var pipes2Class:Class;
public var titlepipes:Bitmap;
public var background:Bitmap;
private var bigbarHighlightClass:Class;
private var boardClass:Class;
private var fluid6Class:Class;
private var titlelogoClass:Class;
public var logosmall:Bitmap;
private var pauseoffClass:Class;
private var nextArrowClass:Class;
private var leftpipeClass:Class;
public var leftpipe:Bitmap;
private var flare04Class:Class;
public var wheelstuds:Bitmap;
public var pipes1:Bitmap;
private var fluid3Class:Class;
private var spinmaniaFontClass:Class;
private var flare09Class:Class;
private var squeak2SoundClass:Class;
public var watermark:Bitmap;
public var pipes2:Bitmap;
private var flare01Class:Class;
private var titlePipesClass:Class;
private var settleSoundClass:Class;
public var pauseon:Bitmap;
private var whitenetworkSoundClass:Class;
private var watermarkClass:Class;
public var squeak1Sound:Sound;
public var barHigh:Bitmap;
public var rotateSound:Sound;
private var rotateSoundClass:Class;
public var wheelspokes:Bitmap;
public var thermo:Bitmap;
private var flare06Class:Class;
public var thermoshade:Bitmap;
private var fluid5Class:Class;
public var bigbarHigh:Bitmap;
private var yellownetworkSoundClass:Class;
private var pipes1Class:Class;
public var fontData:Bitmap;
private var logosmallClass:Class;
private var squeak1SoundClass:Class;
private var flare03Class:Class;
private var wheelmiddleClass:Class;
private var flare11Class:Class;
public var wheelmiddle:Bitmap;
private var cyannetworkSoundClass:Class;
private var thermoClass:Class;
private var fluid2Class:Class;
public var nextarrowHigh:Bitmap;
private var littlecloudClass:Class;
public var settleSound:Sound;
public var pauseoff:Bitmap;
private var flare08Class:Class;
private var nextArrowHighClass:Class;
public var rightpipe:Bitmap;
private var fluid7Class:Class;
private var rightpipeClass:Class;
public var flare:Array;
public var fluid:Array;
public var fontPositions:Array;
public var pipeMap:Array;
private var flare05Class:Class;
public var board:Bitmap;
public var gameoverSound:Sound;
private var backgroundClass:Class;
private var fluid4Class:Class;
private var magentanetworkSoundClass:Class;
public var nextarrow:Bitmap;
public var littlecloud:Bitmap;
public function Media(){
backgroundClass = Media_backgroundClass;
titlelogoClass = Media_titlelogoClass;
logosmallClass = Media_logosmallClass;
titlePipesClass = Media_titlePipesClass;
watermarkClass = Media_watermarkClass;
leftpipeClass = Media_leftpipeClass;
rightpipeClass = Media_rightpipeClass;
littlecloudClass = Media_littlecloudClass;
wheelmiddleClass = Media_wheelmiddleClass;
wheelspokesClass = Media_wheelspokesClass;
wheelstudsClass = Media_wheelstudsClass;
flare01Class = Media_flare01Class;
flare02Class = Media_flare02Class;
flare03Class = Media_flare03Class;
flare04Class = Media_flare04Class;
flare05Class = Media_flare05Class;
flare06Class = Media_flare06Class;
flare07Class = Media_flare07Class;
flare08Class = Media_flare08Class;
flare09Class = Media_flare09Class;
flare10Class = Media_flare10Class;
flare11Class = Media_flare11Class;
boardClass = Media_boardClass;
thermoClass = Media_thermoClass;
thermoshadeClass = Media_thermoshadeClass;
mercuryClass = Media_mercuryClass;
pipes1Class = Media_pipes1Class;
pipes2Class = Media_pipes2Class;
fluid1Class = Media_fluid1Class;
fluid2Class = Media_fluid2Class;
fluid3Class = Media_fluid3Class;
fluid4Class = Media_fluid4Class;
fluid5Class = Media_fluid5Class;
fluid6Class = Media_fluid6Class;
fluid7Class = Media_fluid7Class;
pauseonClass = Media_pauseonClass;
pauseoffClass = Media_pauseoffClass;
nextArrowClass = Media_nextArrowClass;
nextArrowHighClass = Media_nextArrowHighClass;
barHighlightClass = Media_barHighlightClass;
bigbarHighlightClass = Media_bigbarHighlightClass;
spinmaniaFontClass = Media_spinmaniaFontClass;
squeak1SoundClass = Media_squeak1SoundClass;
squeak2SoundClass = Media_squeak2SoundClass;
rotateSoundClass = Media_rotateSoundClass;
settleSoundClass = Media_settleSoundClass;
gameoverSoundClass = Media_gameoverSoundClass;
rednetworkSoundClass = Media_rednetworkSoundClass;
greennetworkSoundClass = Media_greennetworkSoundClass;
cyannetworkSoundClass = Media_cyannetworkSoundClass;
magentanetworkSoundClass = Media_magentanetworkSoundClass;
yellownetworkSoundClass = Media_yellownetworkSoundClass;
whitenetworkSoundClass = Media_whitenetworkSoundClass;
super();
background = new backgroundClass();
titlelogo = new titlelogoClass();
logosmall = new logosmallClass();
titlepipes = new titlePipesClass();
watermark = new watermarkClass();
leftpipe = new leftpipeClass();
rightpipe = new rightpipeClass();
littlecloud = new littlecloudClass();
wheelmiddle = new wheelmiddleClass();
wheelspokes = new wheelspokesClass();
wheelstuds = new wheelstudsClass();
flare = new Array(new flare01Class(), new flare02Class(), new flare03Class(), new flare04Class(), new flare05Class(), new flare06Class(), new flare07Class(), new flare08Class(), new flare09Class(), new flare10Class(), new flare11Class(), new flare10Class(), new flare09Class(), new flare08Class(), new flare07Class(), new flare06Class(), new flare05Class(), new flare04Class(), new flare03Class(), new flare02Class(), new flare01Class());
board = new boardClass();
thermo = new thermoClass();
thermoshade = new thermoshadeClass();
mercury = new mercuryClass();
pipes1 = new pipes1Class();
pipes2 = new pipes2Class();
fluid = new Array(new fluid1Class(), new fluid2Class(), new fluid3Class(), new fluid4Class(), new fluid5Class(), new fluid6Class(), new fluid7Class());
pauseon = new pauseonClass();
pauseoff = new pauseoffClass();
nextarrow = new nextArrowClass();
nextarrowHigh = new nextArrowHighClass();
barHigh = new barHighlightClass();
bigbarHigh = new bigbarHighlightClass();
squeak1Sound = new squeak1SoundClass();
squeak2Sound = new squeak2SoundClass();
rotateSound = new rotateSoundClass();
settleSound = new settleSoundClass();
gameoverSound = new gameoverSoundClass();
networkSounds = new Array(null, new rednetworkSoundClass(), new greennetworkSoundClass(), new cyannetworkSoundClass(), new cyannetworkSoundClass(), new magentanetworkSoundClass(), new yellownetworkSoundClass(), new whitenetworkSoundClass());
pipeMap = new Array();
pipeMap[Pipe.CAP] = new Array(11, 12, 13, 10);
pipeMap[Pipe.LINE] = new Array(0, 8, 0, 8);
pipeMap[Pipe.ANGLE] = new Array(4, 6, 5, 7);
pipeMap[Pipe.TEE] = new Array(15, 16, 14, 17);
pipeMap[Pipe.CROSS] = new Array(9, 9, 9, 9);
pipeMap[Pipe.CROSSOVER] = new Array(18, 1, 18, 1);
pipeMap[Pipe.DOUBLEANGLE] = new Array(2, 3, 2, 3);
pipeMap[Pipe.CROSSOVER2] = new Array(19, 18, 19, 18);
fontData = new spinmaniaFontClass();
fontPositions = new Array(new Char(32, 0, 0, 1, 0, 0, 40, 10), new Char(33, 242, 126, 12, 30, -2, 6, 8), new Char(34, 205, 217, 15, 15, -2, 6, 12), new Char(35, 134, 100, 24, 30, -2, 6, 20), new Char(36, 147, 0, 21, 33, -1, 3, 20), new Char(37, 204, 0, 33, 31, -2, 5, 30), new Char(38, 223, 64, 29, 30, -3, 6, 23), new Char(39, 235, 212, 12, 13, -2, 6, 8), new Char(40, 18, 0, 16, 37, -1, 5, 14), new Char(41, 0, 0, 17, 37, -2, 5, 14), new Char(42, 159, 217, 20, 19, -1, 6, 18), new Char(43, 223, 188, 23, 23, -2, 13, 21), new Char(44, 221, 217, 13, 14, -1, 25, 10), new Char(45, 119, 243, 15, 10, -3, 19, 10), new Char(46, 106, 243, 12, 11, -1, 25, 10), new Char(47, 169, 66, 18, 31, -3, 5, 10), new Char(48, 176, 32, 24, 31, -2, 5, 20), new Char(49, 148, 162, 15, 30, 0, 6, 20), new Char(50, 201, 32, 24, 31, -3, 5, 20), new Char(51, 50, 133, 23, 30, -2, 6, 20), new Char(52, 98, 36, 25, 31, -3, 5, 20), new Char(53, 74, 133, 23, 30, -2, 6, 20), new Char(54, 56, 102, 25, 30, -3, 6, 20), new Char(55, 98, 132, 23, 30, -2, 6, 20), new Char(56, 124, 36, 25, 31, -3, 5, 20), new Char(57, 82, 101, 25, 30, -3, 6, 20), new Char(58, 146, 218, 12, 20, -1, 16, 10), new Char(59, 107, 219, 13, 23, -2, 16, 10), new Char(60, 123, 194, 24, 23, -2, 13, 21), new Char(61, 180, 217, 24, 15, -2, 17, 21), new Char(62, 230, 157, 24, 24, -1, 12, 21), new Char(63, 123, 68, 22, 31, -3, 5, 16), new Char(64, 66, 37, 31, 31, -2, 5, 28), new Char(65, 226, 32, 24, 31, -2, 5, 20), new Char(66, 0, 70, 24, 31, -2, 5, 20), new Char(67, 122, 131, 23, 30, -2, 6, 18), new Char(68, 108, 100, 25, 30, -1, 6, 21), new Char(69, 24, 164, 22, 30, -3, 6, 18), new Char(70, 91, 164, 19, 30, -3, 6, 14), new Char(71, 0, 38, 32, 31, -3, 5, 27), new Char(72, 159, 100, 24, 30, -1, 6, 21), new Char(73, 164, 162, 11, 30, -2, 6, 8), new Char(74, 238, 0, 17, 30, -3, 6, 12), new Char(75, 184, 98, 24, 30, -2, 6, 20), new Char(76, 111, 163, 19, 30, -1, 6, 14), new Char(77, 169, 0, 34, 31, -3, 5, 27), new Char(78, 150, 34, 25, 31, -2, 5, 21), new Char(79, 33, 38, 32, 31, -3, 5, 27), new Char(80, 75, 69, 23, 31, -2, 5, 18), new Char(81, 70, 0, 32, 35, -3, 5, 27), new Char(82, 99, 68, 23, 31, -2, 5, 20), new Char(83, 146, 131, 23, 30, -3, 6, 18), new Char(84, 170, 131, 23, 30, -3, 6, 16), new Char(85, 194, 129, 23, 30, -2, 6, 20), new Char(86, 0, 102, 28, 30, -4, 6, 20), new Char(87, 188, 64, 34, 30, -2, 6, 30), new Char(88, 29, 102, 26, 30, -3, 6, 20), new Char(89, 218, 126, 23, 30, -3, 6, 18), new Char(90, 0, 164, 23, 30, -3, 6, 18), new Char(91, 119, 0, 13, 35, 1, 6, 14), new Char(92, 146, 68, 22, 31, -5, 5, 10), new Char(93, 133, 0, 13, 35, 0, 6, 14), new Char(94, 121, 219, 24, 20, -1, 6, 21), new Char(95, 135, 240, 24, 9, -3, 31, 18), new Char(96, 90, 243, 15, 12, -3, 6, 10), new Char(97, 148, 193, 24, 23, -2, 13, 20), new Char(98, 209, 95, 24, 30, -2, 6, 20), new Char(99, 87, 219, 19, 23, -2, 13, 14), new Char(100, 0, 133, 24, 30, -3, 6, 20), new Char(101, 173, 193, 24, 23, -3, 13, 20), new Char(102, 131, 162, 16, 30, -2, 6, 10), new Char(103, 25, 133, 24, 30, -2, 13, 20), new Char(104, 234, 95, 21, 30, -2, 6, 18), new Char(105, 200, 160, 11, 28, 0, 8, 10), new Char(106, 103, 0, 15, 35, -5, 8, 8), new Char(107, 47, 164, 21, 30, -2, 6, 16), new Char(108, 176, 162, 11, 30, -1, 6, 8), new Char(109, 64, 195, 29, 23, -2, 13, 25), new Char(110, 25, 195, 21, 24, -2, 12, 18), new Char(111, 0, 195, 24, 24, -2, 12, 20), new Char(112, 25, 70, 24, 31, -2, 12, 20), new Char(113, 50, 70, 24, 31, -3, 12, 20), new Char(114, 47, 195, 16, 24, -2, 12, 10), new Char(115, 0, 220, 21, 23, -3, 13, 16), new Char(116, 212, 160, 17, 27, -1, 9, 12), new Char(117, 22, 220, 21, 23, -2, 13, 18), new Char(118, 198, 193, 24, 23, -3, 13, 16), new Char(119, 94, 195, 28, 23, -2, 13, 25), new Char(120, 44, 220, 21, 23, -3, 13, 14), new Char(121, 69, 164, 21, 30, -2, 13, 18), new Char(122, 66, 219, 20, 23, -3, 13, 14), new Char(123, 52, 0, 17, 36, -3, 6, 14), new Char(124, 188, 162, 11, 30, -1, 6, 8), new Char(125, 35, 0, 16, 37, 0, 5, 14), new Char(126, 66, 243, 23, 12, -1, 18, 21));
}
}
}//package
Section 89
//Media_backgroundClass (Media_backgroundClass)
package {
import mx.core.*;
public class Media_backgroundClass extends BitmapAsset {
}
}//package
Section 90
//Media_barHighlightClass (Media_barHighlightClass)
package {
import mx.core.*;
public class Media_barHighlightClass extends BitmapAsset {
}
}//package
Section 91
//Media_bigbarHighlightClass (Media_bigbarHighlightClass)
package {
import mx.core.*;
public class Media_bigbarHighlightClass extends BitmapAsset {
}
}//package
Section 92
//Media_boardClass (Media_boardClass)
package {
import mx.core.*;
public class Media_boardClass extends BitmapAsset {
}
}//package
Section 93
//Media_cyannetworkSoundClass (Media_cyannetworkSoundClass)
package {
import mx.core.*;
public class Media_cyannetworkSoundClass extends SoundAsset {
}
}//package
Section 94
//Media_flare01Class (Media_flare01Class)
package {
import mx.core.*;
public class Media_flare01Class extends BitmapAsset {
}
}//package
Section 95
//Media_flare02Class (Media_flare02Class)
package {
import mx.core.*;
public class Media_flare02Class extends BitmapAsset {
}
}//package
Section 96
//Media_flare03Class (Media_flare03Class)
package {
import mx.core.*;
public class Media_flare03Class extends BitmapAsset {
}
}//package
Section 97
//Media_flare04Class (Media_flare04Class)
package {
import mx.core.*;
public class Media_flare04Class extends BitmapAsset {
}
}//package
Section 98
//Media_flare05Class (Media_flare05Class)
package {
import mx.core.*;
public class Media_flare05Class extends BitmapAsset {
}
}//package
Section 99
//Media_flare06Class (Media_flare06Class)
package {
import mx.core.*;
public class Media_flare06Class extends BitmapAsset {
}
}//package
Section 100
//Media_flare07Class (Media_flare07Class)
package {
import mx.core.*;
public class Media_flare07Class extends BitmapAsset {
}
}//package
Section 101
//Media_flare08Class (Media_flare08Class)
package {
import mx.core.*;
public class Media_flare08Class extends BitmapAsset {
}
}//package
Section 102
//Media_flare09Class (Media_flare09Class)
package {
import mx.core.*;
public class Media_flare09Class extends BitmapAsset {
}
}//package
Section 103
//Media_flare10Class (Media_flare10Class)
package {
import mx.core.*;
public class Media_flare10Class extends BitmapAsset {
}
}//package
Section 104
//Media_flare11Class (Media_flare11Class)
package {
import mx.core.*;
public class Media_flare11Class extends BitmapAsset {
}
}//package
Section 105
//Media_fluid1Class (Media_fluid1Class)
package {
import mx.core.*;
public class Media_fluid1Class extends BitmapAsset {
}
}//package
Section 106
//Media_fluid2Class (Media_fluid2Class)
package {
import mx.core.*;
public class Media_fluid2Class extends BitmapAsset {
}
}//package
Section 107
//Media_fluid3Class (Media_fluid3Class)
package {
import mx.core.*;
public class Media_fluid3Class extends BitmapAsset {
}
}//package
Section 108
//Media_fluid4Class (Media_fluid4Class)
package {
import mx.core.*;
public class Media_fluid4Class extends BitmapAsset {
}
}//package
Section 109
//Media_fluid5Class (Media_fluid5Class)
package {
import mx.core.*;
public class Media_fluid5Class extends BitmapAsset {
}
}//package
Section 110
//Media_fluid6Class (Media_fluid6Class)
package {
import mx.core.*;
public class Media_fluid6Class extends BitmapAsset {
}
}//package
Section 111
//Media_fluid7Class (Media_fluid7Class)
package {
import mx.core.*;
public class Media_fluid7Class extends BitmapAsset {
}
}//package
Section 112
//Media_gameoverSoundClass (Media_gameoverSoundClass)
package {
import mx.core.*;
public class Media_gameoverSoundClass extends SoundAsset {
}
}//package
Section 113
//Media_greennetworkSoundClass (Media_greennetworkSoundClass)
package {
import mx.core.*;
public class Media_greennetworkSoundClass extends SoundAsset {
}
}//package
Section 114
//Media_leftpipeClass (Media_leftpipeClass)
package {
import mx.core.*;
public class Media_leftpipeClass extends BitmapAsset {
}
}//package
Section 115
//Media_littlecloudClass (Media_littlecloudClass)
package {
import mx.core.*;
public class Media_littlecloudClass extends BitmapAsset {
}
}//package
Section 116
//Media_logosmallClass (Media_logosmallClass)
package {
import mx.core.*;
public class Media_logosmallClass extends BitmapAsset {
}
}//package
Section 117
//Media_magentanetworkSoundClass (Media_magentanetworkSoundClass)
package {
import mx.core.*;
public class Media_magentanetworkSoundClass extends SoundAsset {
}
}//package
Section 118
//Media_mercuryClass (Media_mercuryClass)
package {
import mx.core.*;
public class Media_mercuryClass extends BitmapAsset {
}
}//package
Section 119
//Media_nextArrowClass (Media_nextArrowClass)
package {
import mx.core.*;
public class Media_nextArrowClass extends BitmapAsset {
}
}//package
Section 120
//Media_nextArrowHighClass (Media_nextArrowHighClass)
package {
import mx.core.*;
public class Media_nextArrowHighClass extends BitmapAsset {
}
}//package
Section 121
//Media_pauseoffClass (Media_pauseoffClass)
package {
import mx.core.*;
public class Media_pauseoffClass extends BitmapAsset {
}
}//package
Section 122
//Media_pauseonClass (Media_pauseonClass)
package {
import mx.core.*;
public class Media_pauseonClass extends BitmapAsset {
}
}//package
Section 123
//Media_pipes1Class (Media_pipes1Class)
package {
import mx.core.*;
public class Media_pipes1Class extends BitmapAsset {
}
}//package
Section 124
//Media_pipes2Class (Media_pipes2Class)
package {
import mx.core.*;
public class Media_pipes2Class extends BitmapAsset {
}
}//package
Section 125
//Media_rednetworkSoundClass (Media_rednetworkSoundClass)
package {
import mx.core.*;
public class Media_rednetworkSoundClass extends SoundAsset {
}
}//package
Section 126
//Media_rightpipeClass (Media_rightpipeClass)
package {
import mx.core.*;
public class Media_rightpipeClass extends BitmapAsset {
}
}//package
Section 127
//Media_rotateSoundClass (Media_rotateSoundClass)
package {
import mx.core.*;
public class Media_rotateSoundClass extends SoundAsset {
}
}//package
Section 128
//Media_settleSoundClass (Media_settleSoundClass)
package {
import mx.core.*;
public class Media_settleSoundClass extends SoundAsset {
}
}//package
Section 129
//Media_spinmaniaFontClass (Media_spinmaniaFontClass)
package {
import mx.core.*;
public class Media_spinmaniaFontClass extends BitmapAsset {
}
}//package
Section 130
//Media_squeak1SoundClass (Media_squeak1SoundClass)
package {
import mx.core.*;
public class Media_squeak1SoundClass extends SoundAsset {
}
}//package
Section 131
//Media_squeak2SoundClass (Media_squeak2SoundClass)
package {
import mx.core.*;
public class Media_squeak2SoundClass extends SoundAsset {
}
}//package
Section 132
//Media_thermoClass (Media_thermoClass)
package {
import mx.core.*;
public class Media_thermoClass extends BitmapAsset {
}
}//package
Section 133
//Media_thermoshadeClass (Media_thermoshadeClass)
package {
import mx.core.*;
public class Media_thermoshadeClass extends BitmapAsset {
}
}//package
Section 134
//Media_titlelogoClass (Media_titlelogoClass)
package {
import mx.core.*;
public class Media_titlelogoClass extends BitmapAsset {
}
}//package
Section 135
//Media_titlePipesClass (Media_titlePipesClass)
package {
import mx.core.*;
public class Media_titlePipesClass extends BitmapAsset {
}
}//package
Section 136
//Media_watermarkClass (Media_watermarkClass)
package {
import mx.core.*;
public class Media_watermarkClass extends BitmapAsset {
}
}//package
Section 137
//Media_wheelmiddleClass (Media_wheelmiddleClass)
package {
import mx.core.*;
public class Media_wheelmiddleClass extends BitmapAsset {
}
}//package
Section 138
//Media_wheelspokesClass (Media_wheelspokesClass)
package {
import mx.core.*;
public class Media_wheelspokesClass extends BitmapAsset {
}
}//package
Section 139
//Media_wheelstudsClass (Media_wheelstudsClass)
package {
import mx.core.*;
public class Media_wheelstudsClass extends BitmapAsset {
}
}//package
Section 140
//Media_whitenetworkSoundClass (Media_whitenetworkSoundClass)
package {
import mx.core.*;
public class Media_whitenetworkSoundClass extends SoundAsset {
}
}//package
Section 141
//Media_yellownetworkSoundClass (Media_yellownetworkSoundClass)
package {
import mx.core.*;
public class Media_yellownetworkSoundClass extends SoundAsset {
}
}//package
Section 142
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.2");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var mc:MovieClip;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var mc:MovieClip;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
var DEFAULTS:Object = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
var clip:Object = options.clip;
var clipname:String = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
var server:String = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
var lv:URLVariables = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
_arg1 = parseInt(_arg1.toString());
var _local3:Array = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
var _local4:Array = [];
var _local5:Number = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
var _local6:Object = _local3[1];
var _local7:Object = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local5:Array;
mc._endpoint = _arg1;
var _local2:Array = mc._queue;
delete mc._queue;
var _local3:Function = mc.doSend;
var _local4:Number = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
var _local5:Number = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
var _local6:LocalConnection = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local7:Number = ((100 * _local6) / _local5);
var _local8:Number = ((100 * _local3) / chk.ad_msec);
var _local9:Object = this._mochiad_bar._inside;
var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 143
//Pipe (Pipe)
package {
public class Pipe {
public var col:Number;
public var remove:Number;
public var typ:Number;
public var settle:Number;
public var appear:Number;
public var rot:Number;
public var len:Number;
public var yoff:Number;
public var xpos:Number;
public var sector:Array;
public var xoff:Number;
public var ypos:Number;
public static const DOUBLEANGLE:Number = 6;
public static const LINE:Number = 1;
public static const LEFT:Number = 3;
public static const MAGENTA:Number = 5;
public static const YELLOW:Number = 3;
public static const WHITE:Number = 7;
public static const BLUE:Number = 4;
public static const UP:Number = 0;
public static const pipemul:Array = new Array(0, 1, 1, 2, 1, 2, 2, 4);
public static const BLACK:Number = 0;
public static const CROSS:Number = 4;
public static const GREEN:Number = 2;
public static const DOWN:Number = 2;
public static const CYAN:Number = 6;
private static const dist:Array = new Array(8, 8, 8, 6, 4, 2, 1);
public static const RED:Number = 1;
public static const CAP:Number = 0;
public static const ANGLE:Number = 2;
public static const TEE:Number = 3;
public static const CROSSOVER:Number = 5;
public static const RIGHT:Number = 1;
public static const CROSSOVER2:Number = 7;
public function Pipe(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
this.typ = _arg1;
this.rot = _arg2;
this.sector = new Array(0, 0, 0, 0);
this.col = 0;
this.len = 0;
this.xpos = _arg3;
this.ypos = _arg4;
this.xoff = 0;
this.yoff = 0;
this.settle = 0;
this.appear = 0;
this.remove = 0;
}
public static function makeBag():Array{
var _local1:Number;
var _local2:Number;
var _local3:Array = new Array();
_local1 = 0;
while (_local1 < 3) {
_local3.push(createCap(Spinmania.randomRange(0, 3), RED, 0, 0));
_local3.push(createCap(Spinmania.randomRange(0, 3), GREEN, 0, 0));
_local3.push(createCap(Spinmania.randomRange(0, 3), BLUE, 0, 0));
_local1++;
};
_local1 = 1;
while (_local1 < 7) {
_local2 = 0;
while (_local2 < dist[_local1]) {
_local3.push(new Pipe(_local1, Spinmania.randomRange(0, 3), 0, 0));
_local2++;
};
_local1++;
};
return (_local3);
}
public static function createCap(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Pipe{
var _local5:Pipe = new Pipe(0, _arg1, _arg3, _arg4);
_local5.col = _arg2;
_local5.sector[0] = _arg2;
_local5.sector[1] = _arg2;
_local5.sector[2] = _arg2;
_local5.sector[3] = _arg2;
return (_local5);
}
}
}//package
Section 144
//Preloader (Preloader)
package {
import flash.display.*;
import flash.utils.*;
public dynamic class Preloader extends MovieClip {
private var did_load:Boolean;
public static var GAME_OPTIONS:Object = {id:"c069927ca602d915", res:"512x512"};
public static var MAIN_CLASS:String = "Spinmania";
public function Preloader(){
var k:String;
super();
var opts:Object = {};
for (k in GAME_OPTIONS) {
opts[k] = GAME_OPTIONS[k];
};
opts.ad_started = function ():void{
did_load = true;
};
opts.ad_finished = function ():void{
var _local1:Class = Class(getDefinitionByName(MAIN_CLASS));
var _local2:Object = new (_local1);
parent.addChild((_local2 as DisplayObject));
if (_local2.init){
_local2.init(did_load);
};
};
opts.clip = this;
MochiAd.showPreGameAd(opts);
}
}
}//package
Section 145
//Score (Score)
package {
public class Score {
public var delay:Number;
public var message:String;
public var count:Number;
public var scox:Number;
public var scoy:Number;
public var sco:Number;
public function Score(_arg1:Number, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number){
this.sco = _arg1;
this.message = _arg2;
this.delay = _arg3;
this.count = 0;
this.scox = _arg4;
this.scoy = _arg5;
}
}
}//package
Section 146
//Spinmania (Spinmania)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
public final class Spinmania extends Sprite {
private var logoflare:Number;
var scoreCounter:Array;
var scoreinc:Number;
private var capList:Array;
var rowAddCounter:Number;
var score:Number;
private var logofinished:Boolean;
private var textfade:Number;
private var originPoint:Point;
private var boardPosition:Number;
private var keysDown:Array;
private var screenBitmap:Bitmap;
private var gameState:Number;
private var wheel2rot:Number;
private var img:BitmapData;
private var timer:Number;
var currentPipe:Pipe;
private var currentFallCounter:Number;
private var debounce:Number;
private var currentFallDelay:Number;
private var wheel1speed:Number;
private var rowAddDelay:Number;
private var clouds:Array;
private var wheel1rot:Number;
private var highScores:Array;
var media:Media;
private var pipepos:Number;
private var gridPoint:Point;
private var rowAddCounterSub:Number;
private var cycle:Number;
private var wheel2speed:Number;
private var screen:BitmapData;
private var buttonDown:Boolean;
private var board:Board;
private var screenRect:Rectangle;
private var tileBag:Array;
static const COLS:Number = 10;
static const CLOUDMAX:Number = 100;
static const HEIGHT:Number = 0x0200;
static const WHEELMAX:Number = 20;
static const YOFFSET:Number = 50;
static const MIDX:Number = Math.floor((WIDTH / 2));
static const SCOREDELAY:Number = Math.floor(FPS);
static const TITLESTATE:Number = 1002;
static const SCORESTATE:Number = 1013;
static const MIDY:Number = Math.floor((HEIGHT / 2));
static const SCOREBASE:Number = 5;
static const BAGMIN:Number = 8;
static const ROWADDMIN:Number = 10;
static const PIPEHEIGHT:Number = 40;
static const PI2:Number = (Math.PI + Math.PI);
static const PAUSESTATE:Number = 1011;
static const TITLESLIDEOUT1STATE:Number = 1003;
static const ROWADDMAX:Number = 30;
static const REMOVEDELAY:Number = Math.ceil((FPS * 2));
static const INITSTATE:Number = 1000;
static const LOGOSPEED:Number = 8;
static const BOUNCEDELAYSHORT:Number = Math.ceil((FPS / 16));
static const TABLESLIDEINSTATE:Number = 1015;
static const GAMEOVERSTATE:Number = 1012;
static const SCORESHOW:Number = 5;
static const TABLEDELAY:Number = Math.ceil(FPS);
static const PIPESETTLE:Number = Math.ceil((Spinmania.FPS / 4));
static const HELPSLIDEINSTATE:Number = 1006;
static const BOARDSLIDEINSTATE:Number = 1008;
static const TABLESTATE:Number = 1014;
static const BOARDSLIDEOUTSTATE:Number = 1009;
static const PIPEYSPEED:Number = 2;
static const WIDTH:Number = 0x0200;
static const TABLESLIDEOUTSTATE:Number = 1016;
static const PIPEWIDTH:Number = 40;
static const PLAYSTATE:Number = 1010;
static const FPS:Number = 30;
static const HELPSTATE:Number = 1005;
static const ROWS:Number = 11;
static const PIPEFALLDELAY:Number = Math.ceil((Spinmania.FPS / 2));
static const FILLROWS:Number = 1;
static const BOUNCEDELAYLONG:Number = Math.ceil((FPS / 4));
static const ROWDEC:Number = 2;
static const XOFFSET:Number = 28;
static const APPEARDELAY:Number = Math.ceil((PIPEHEIGHT / PIPEYSPEED));
static const TITLESLIDEINSTATE:Number = 1001;
static const TITLESLIDEOUT2STATE:Number = 1004;
static const HELPSLIDEOUTSTATE:Number = 1007;
static const PIPEXSPEED:Number = 8;
public function Spinmania(){
screen = new BitmapData(WIDTH, HEIGHT, false, 4294967295);
screenBitmap = new Bitmap(screen, "auto", false);
originPoint = new Point(0, 0);
gridPoint = new Point(0, 0);
screenRect = new Rectangle(0, 0, WIDTH, HEIGHT);
media = new Media();
board = new Board(this);
cycle = 0;
timer = 0;
debounce = 0;
highScores = new Array();
keysDown = new Array();
}
private function keyReleaseHandler(_arg1:KeyboardEvent):void{
delete keysDown[_arg1.keyCode];
}
private function drawSteam():void{
var _local1:Number;
var _local2:Point;
var _local3:Matrix;
var _local4:ColorTransform;
if (clouds.length > 0){
_local3 = new Matrix();
_local4 = new ColorTransform();
img = media.littlecloud.bitmapData;
_local1 = (clouds.length - 1);
while (_local1 >= 0) {
_local2 = clouds[_local1];
_local3.identity();
_local3.translate(_local2.x, _local2.y);
_local4.alphaMultiplier = ((_local2.y - MIDY) / MIDY);
screen.draw(img, _local3, _local4);
_local2.y = (_local2.y - 3);
if (_local2.y < (MIDY - img.height)){
clouds.splice(_local1, 1);
};
_local1--;
};
};
}
function newCurrentPipe():void{
var _local1:Number;
if (currentPipe != null){
_local1 = currentPipe.xpos;
} else {
_local1 = Math.floor((COLS / 2));
};
currentPipe = getTile();
currentPipe.xpos = _local1;
currentPipe.ypos = 0;
currentFallCounter = currentFallDelay;
}
private function pauseGame():void{
drawScreen(false, false);
var _local1:Number = this.mouseX;
var _local2:Number = this.mouseY;
img = media.barHigh.bitmapData;
var _local3:Number = (XOFFSET + ((COLS / 2) * PIPEWIDTH));
var _local4:Number = (_local3 - (img.width / 2));
var _local5:Number = (MIDY - 128);
var _local6:Number = MIDY;
var _local7:Number = (MIDY + 64);
var _local8:Rectangle = new Rectangle(_local4, _local6, img.width, img.height);
var _local9:Rectangle = new Rectangle(_local4, _local7, img.width, img.height);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "GAME PAUSED", _local3, (_local5 + 16));
if ((((((((_local1 >= _local8.left)) && ((_local1 <= _local8.right)))) && ((_local2 >= _local8.top)))) && ((_local2 <= _local8.bottom)))){
gridPoint.x = _local8.x;
gridPoint.y = _local8.y;
screen.copyPixels(img, img.rect, gridPoint);
if ((((debounce == 0)) && (buttonDown))){
debounce = BOUNCEDELAYSHORT;
gameState = PLAYSTATE;
};
};
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Resume", _local3, (_local6 + 18));
if ((((((((_local1 >= _local9.left)) && ((_local1 <= _local9.right)))) && ((_local2 >= _local9.top)))) && ((_local2 <= _local9.bottom)))){
gridPoint.x = _local9.x;
gridPoint.y = _local9.y;
screen.copyPixels(img, img.rect, gridPoint);
if ((((debounce == 0)) && (buttonDown))){
debounce = BOUNCEDELAYLONG;
gameState = BOARDSLIDEOUTSTATE;
};
};
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Quit !", _local3, (_local7 + 18));
}
private function buttonClearHandler(_arg1:Event):void{
buttonDown = false;
}
private function buttonReleaseHandler(_arg1:Event):void{
buttonDown = false;
}
public function init(_arg1:Boolean):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleaseHandler);
stage.addEventListener(Event.DEACTIVATE, keyClearHandler);
buttonDown = false;
stage.addEventListener(MouseEvent.MOUSE_DOWN, buttonPressHandler);
stage.addEventListener(MouseEvent.MOUSE_UP, buttonReleaseHandler);
stage.addEventListener(Event.DEACTIVATE, buttonClearHandler);
if (checkURL(loaderInfo.url)){
gameState = INITSTATE;
};
addChild(screenBitmap);
addEventListener(Event.ENTER_FRAME, mainLoop);
}
private function keyDown(_arg1:uint):Boolean{
return (Boolean((_arg1 in keysDown)));
}
private function readControls():void{
if (currentPipe.xoff > 0){
currentPipe.xoff = (currentPipe.xoff - PIPEXSPEED);
} else {
if (currentPipe.xoff < 0){
currentPipe.xoff = (currentPipe.xoff + PIPEXSPEED);
};
};
if (currentPipe.yoff < 0){
currentPipe.yoff = (currentPipe.yoff + PIPEYSPEED);
if (currentPipe.yoff >= 0){
currentPipe.yoff = 0;
currentPipe.settle = PIPESETTLE;
};
} else {
if (currentPipe.yoff > 0){
currentPipe.yoff = 0;
};
};
if (currentPipe.settle > 0){
currentPipe.settle--;
if (currentPipe.settle == 0){
currentFallCounter = currentFallDelay;
};
};
if (currentFallCounter > 0){
currentFallCounter--;
} else {
if ((((currentPipe.yoff == 0)) && ((currentPipe.settle == 0)))){
if ((((currentPipe.ypos < (ROWS - 1))) && ((board.grid[currentPipe.xpos][(currentPipe.ypos + 1)] == null)))){
currentPipe.ypos++;
currentPipe.yoff = (-(PIPEHEIGHT) + PIPEYSPEED);
} else {
if (currentPipe.xoff == 0){
if (currentPipe.ypos > 0){
board.grid[currentPipe.xpos][currentPipe.ypos] = currentPipe;
if (currentPipe.typ == Pipe.CAP){
addCap(currentPipe);
};
newCurrentPipe();
media.settleSound.play();
} else {
endGame();
return;
};
};
};
};
};
if (((keyDown(90)) && ((debounce == 0)))){
if (currentPipe.rot == 0){
currentPipe.rot = 3;
} else {
currentPipe.rot--;
};
debounce = BOUNCEDELAYLONG;
media.rotateSound.play();
};
if (((keyDown(88)) && ((debounce == 0)))){
currentPipe.rot = ((currentPipe.rot + 1) % 4);
debounce = BOUNCEDELAYLONG;
media.rotateSound.play();
};
if (((((((keyDown(Keyboard.LEFT)) && ((currentPipe.xoff <= 0)))) && ((currentPipe.xpos > 0)))) && ((board.grid[(currentPipe.xpos - 1)][currentPipe.ypos] == null)))){
currentPipe.xpos--;
if (currentPipe.xoff < 0){
currentPipe.xoff = (currentPipe.xoff + PIPEWIDTH);
} else {
currentPipe.xoff = PIPEWIDTH;
};
};
if (((((((keyDown(Keyboard.RIGHT)) && ((currentPipe.xoff >= 0)))) && ((currentPipe.xpos < (COLS - 1))))) && ((board.grid[(currentPipe.xpos + 1)][currentPipe.ypos] == null)))){
currentPipe.xpos++;
if (currentPipe.xoff > 0){
currentPipe.xoff = (currentPipe.xoff - PIPEWIDTH);
} else {
currentPipe.xoff = -(PIPEWIDTH);
};
};
if (keyDown(Keyboard.DOWN)){
if (currentPipe.yoff <= -((PIPEYSPEED * 4))){
currentPipe.yoff = (currentPipe.yoff + (PIPEYSPEED * 4));
} else {
currentPipe.yoff = 0;
currentPipe.settle = 0;
currentFallCounter = 0;
};
};
if ((((debounce == 0)) && (((keyDown(Keyboard.ESCAPE)) || (keyDown(80)))))){
gameState = PAUSESTATE;
debounce = BOUNCEDELAYLONG;
};
}
private function updateScoreTables():void{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
if (scoreinc > 0){
score = (score + scoreinc);
scoreinc = 0;
};
_local3 = false;
_local1 = 0;
while (_local1 < highScores.length) {
_local2 = highScores[_local1];
if (score > _local2){
highScores.splice(_local1, 0, score);
_local3 = true;
break;
};
_local1++;
};
if (!_local3){
highScores.push(score);
};
textfade = TABLEDELAY;
gameState = TABLESLIDEINSTATE;
}
private function keyPressHandler(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
function getTile():Pipe{
if ((((tileBag == null)) || ((tileBag.length < BAGMIN)))){
tileBag = Pipe.makeBag();
};
var _local1:Number = randomRange(0, (tileBag.length - 1));
var _local2:Pipe = tileBag[_local1];
tileBag.splice(_local1, 1);
return (_local2);
}
function removeCap(_arg1:Pipe):void{
var _local2:Number = (capList.length - 1);
while (_local2 >= 0) {
if (capList[_local2] == _arg1){
capList.splice(_local2, 1);
};
_local2--;
};
}
private function showGameOver():void{
board.colorBoard(capList, REMOVEDELAY);
drawScreen(true, false);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "GAME OVER", MIDX, MIDY);
if ((((debounce == 0)) && (((buttonDown) || (keyDown(Keyboard.SPACE)))))){
debounce = BOUNCEDELAYLONG;
gameState = BOARDSLIDEOUTSTATE;
};
}
private function initGame():void{
var _local1:Number;
var _local2:Number;
cycle = 0;
timer = 0;
rowAddDelay = ROWADDMAX;
rowAddCounter = rowAddDelay;
rowAddCounterSub = 0;
score = 0;
scoreinc = 0;
scoreCounter = new Array();
boardPosition = HEIGHT;
board.clearBoard();
capList = new Array();
currentFallDelay = PIPEFALLDELAY;
newCurrentPipe();
clouds = new Array();
pipepos = HEIGHT;
wheel1rot = 0;
wheel1speed = 0;
wheel2rot = 0;
wheel2speed = 0;
logoflare = 0;
logofinished = false;
if (checkURL(loaderInfo.url)){
gameState = TITLESLIDEINSTATE;
} else {
gameState = -1;
};
}
private function drawPipe(_arg1:Pipe):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local9:ColorTransform;
var _local10:Matrix;
gridPoint.x = (((_arg1.xpos * PIPEWIDTH) + _arg1.xoff) + XOFFSET);
gridPoint.y = (((_arg1.ypos * PIPEHEIGHT) + _arg1.yoff) + YOFFSET);
var _local6:Rectangle = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
var _local7:BitmapData = new BitmapData(PIPEWIDTH, PIPEHEIGHT, true, 0);
var _local8:Number = 1;
if (_arg1.appear > 0){
_local8 = ((APPEARDELAY - _arg1.appear) / APPEARDELAY);
} else {
if (_arg1.remove > 0){
_local8 = (_arg1.remove / REMOVEDELAY);
};
};
if (_arg1.remove == 0){
img = media.pipes1.bitmapData;
} else {
img = media.pipes2.bitmapData;
};
_local7.copyPixels(img, _local6, originPoint);
switch (_arg1.typ){
case Pipe.CAP:
_local2 = _arg1.sector[_arg1.rot];
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
} else {
trace("Cap color mismatch!");
};
break;
case Pipe.LINE:
_local2 = _arg1.sector[_arg1.rot];
_local3 = _arg1.sector[((_arg1.rot + 2) % 4)];
if (_local2 == _local3){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Line Color Mismatch!");
};
break;
case Pipe.ANGLE:
_local2 = _arg1.sector[_arg1.rot];
_local3 = _arg1.sector[((_arg1.rot + 1) % 4)];
if (_local2 == _local3){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Angle Colour Mismatch!");
};
break;
case Pipe.TEE:
_local2 = _arg1.sector[(_arg1.rot % 4)];
_local3 = _arg1.sector[((_arg1.rot + 1) % 4)];
_local4 = _arg1.sector[((_arg1.rot + 3) % 4)];
if ((((_local2 == _local3)) && ((_local3 == _local4)))){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Tee Colour Mismatch");
};
break;
case Pipe.CROSS:
_local2 = _arg1.sector[(_arg1.rot % 4)];
_local3 = _arg1.sector[((_arg1.rot + 1) % 4)];
_local4 = _arg1.sector[((_arg1.rot + 2) % 4)];
_local5 = _arg1.sector[((_arg1.rot + 3) % 4)];
if ((((((_local2 == _local3)) && ((_local3 == _local4)))) && ((_local4 == _local5)))){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[_arg1.typ][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Cross Colour Mismatch");
};
break;
case Pipe.CROSSOVER:
_local2 = _arg1.sector[(_arg1.rot % 4)];
_local3 = _arg1.sector[((_arg1.rot + 1) % 4)];
_local4 = _arg1.sector[((_arg1.rot + 2) % 4)];
_local5 = _arg1.sector[((_arg1.rot + 3) % 4)];
if ((((_local2 == _local4)) && ((_local3 == _local5)))){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[Pipe.LINE][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
if (_local3 > 0){
img = media.fluid[(_local3 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[Pipe.CROSSOVER2][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Crossover Colour Mismatch");
};
break;
case Pipe.DOUBLEANGLE:
_local2 = _arg1.sector[(_arg1.rot % 4)];
_local3 = _arg1.sector[((_arg1.rot + 1) % 4)];
_local4 = _arg1.sector[((_arg1.rot + 2) % 4)];
_local5 = _arg1.sector[((_arg1.rot + 3) % 4)];
if ((((_local2 == _local3)) && ((_local4 == _local5)))){
if (_local2 > 0){
img = media.fluid[(_local2 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[Pipe.ANGLE][_arg1.rot] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
if (_local4 > 0){
img = media.fluid[(_local4 - 1)].bitmapData;
_local6 = new Rectangle((media.pipeMap[Pipe.ANGLE][((_arg1.rot + 2) % 4)] * PIPEWIDTH), 0, PIPEWIDTH, PIPEHEIGHT);
_local7.copyPixels(img, _local6, originPoint, null, null, true);
};
} else {
trace("Doubleangle Colour Mismatch");
};
break;
};
if (_local8 == 1){
screen.copyPixels(_local7, _local7.rect, gridPoint);
} else {
_local9 = new ColorTransform(1, 1, 1, _local8);
_local10 = new Matrix(1, 0, 0, 1, gridPoint.x, gridPoint.y);
screen.draw(_local7, _local10, _local9, null, null, true);
};
}
private function keyClearHandler(_arg1:Event):void{
keysDown = new Array();
}
private function playGame():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Array;
readControls();
rowAddCounterSub++;
if (rowAddCounterSub >= FPS){
rowAddCounterSub = 0;
timer = ((timer + 1) % 60);
rowAddCounter++;
if (rowAddCounter >= rowAddDelay){
_local4 = new Array();
_local1 = 0;
while (_local1 < COLS) {
_local4[_local1] = getTile();
if (_local4[_local1].typ == Pipe.CAP){
_local4[_local1].rot = 0;
};
_local4[_local1].xpos = _local1;
_local4[_local1].ypos = (ROWS - 1);
_local4[_local1].appear = APPEARDELAY;
_local1++;
};
board.newRow(_local4, currentPipe.xpos, currentPipe.ypos);
if (rowAddDelay > ROWADDMIN){
rowAddDelay = (rowAddDelay - ROWDEC);
};
rowAddCounter = 0;
};
};
board.updatePipes();
board.colorBoard(capList, REMOVEDELAY);
drawScreen(true, true);
}
private function drawScreen(_arg1:Boolean, _arg2:Boolean):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Score;
var _local10:Pipe;
var _local11:Boolean;
var _local12:Rectangle;
var _local13:Number = this.mouseX;
var _local14:Number = this.mouseY;
img = media.background.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.titlepipes.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.watermark.bitmapData;
gridPoint.x = (WIDTH - img.width);
gridPoint.y = (HEIGHT - img.height);
screen.copyPixels(img, img.rect, gridPoint);
drawSteam();
if (_arg2){
img = media.pauseoff.bitmapData;
gridPoint.x = XOFFSET;
gridPoint.y = 4;
_local12 = new Rectangle(gridPoint.x, gridPoint.y, img.width, img.height);
if ((((((((_local13 >= _local12.left)) && ((_local13 <= _local12.right)))) && ((_local14 >= _local12.top)))) && ((_local14 <= _local12.bottom)))){
img = media.pauseon.bitmapData;
if ((((debounce == 0)) && (buttonDown))){
gameState = PAUSESTATE;
debounce = BOUNCEDELAYLONG;
};
};
screen.copyPixels(img, img.rect, gridPoint);
};
gridPoint.x = 0;
gridPoint.y = boardPosition;
img = media.board.bitmapData;
screen.copyPixels(img, img.rect, gridPoint);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, score.toString(), (XOFFSET + (PIPEWIDTH * (COLS / 2))), 20);
img = media.thermo.bitmapData;
gridPoint.x = 454;
gridPoint.y = -(boardPosition);
screen.copyPixels(img, img.rect, gridPoint);
if ((((rowAddCounter >= 0)) && ((rowAddCounter < rowAddDelay)))){
_local8 = (428 * ((rowAddCounter + (rowAddCounterSub / FPS)) / rowAddDelay));
img = media.mercury.bitmapData;
gridPoint.x = (454 + 18);
gridPoint.y = (-(boardPosition) + 447);
_local3 = 0;
while (_local3 < _local8) {
screen.copyPixels(img, img.rect, gridPoint);
gridPoint.y--;
_local3++;
};
};
img = media.thermoshade.bitmapData;
gridPoint.x = 454;
gridPoint.y = -(boardPosition);
screen.copyPixels(img, img.rect, gridPoint);
if (_arg1){
_local3 = 0;
while (_local3 < COLS) {
_local5 = ((_local3 * PIPEWIDTH) + XOFFSET);
_local4 = (ROWS - 1);
while (_local4 >= 0) {
_local6 = ((_local4 * PIPEHEIGHT) + YOFFSET);
_local10 = board.grid[_local3][_local4];
if (_local10 != null){
drawPipe(_local10);
if (gameState != GAMEOVERSTATE){
if (_local10.appear > 0){
_local10.appear--;
};
if (_local10.remove > 0){
_local10.remove--;
if (_local10.remove == 0){
if (_local10.typ == Pipe.CAP){
removeCap(_local10);
};
board.grid[_local10.xpos][_local10.ypos] = null;
};
};
if ((((_local4 == 0)) && ((_local10.yoff == 0)))){
endGame();
};
};
_local10.sector[0] = 0;
_local10.sector[1] = 0;
_local10.sector[2] = 0;
_local10.sector[3] = 0;
};
if (((((!((currentPipe == null))) && ((_local3 == currentPipe.xpos)))) && ((_local4 == currentPipe.ypos)))){
drawPipe(currentPipe);
};
_local4--;
};
_local3++;
};
};
if (scoreCounter.length > 0){
_local3 = (scoreCounter.length - 1);
while (_local3 >= 0) {
_local9 = scoreCounter[_local3];
if (_local9.delay > 0){
_local7 = (_local9.delay / SCOREDELAY);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, (_local9.message + _local9.sco.toString()), _local9.scox, _local9.scoy, (2 * (1 - _local7)), _local7);
_local9.delay--;
} else {
scoreCounter.splice(_local3, 1);
};
_local3--;
};
};
}
private function buttonPressHandler(_arg1:Event):void{
buttonDown = true;
}
private function showInstructions(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Rectangle;
var _local8:Matrix = new Matrix();
var _local9:ColorTransform = new ColorTransform();
var _local10:Number = this.mouseX;
var _local11:Number = this.mouseY;
if (_arg1 < 0){
if (textfade > 0){
textfade--;
} else {
textfade = 0;
gameState = HELPSTATE;
};
};
if (_arg1 > 0){
if (textfade < TABLEDELAY){
textfade++;
} else {
textfade = TABLEDELAY;
gameState = INITSTATE;
};
};
img = media.background.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
if (_arg1 > 0){
img = media.titlepipes.bitmapData;
_local9.alphaMultiplier = (textfade / TABLEDELAY);
screen.draw(img, null, _local9);
};
var _local12:Number = ((TABLEDELAY - textfade) / TABLEDELAY);
img = media.logosmall.bitmapData;
_local8.identity();
_local8.translate((MIDX - (img.width / 2)), 20);
_local9.alphaMultiplier = _local12;
screen.draw(img, _local8, _local9);
drawSteam();
_local6 = 156;
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "The aim of SPINMANIA is to fix the faulty plumbing!", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Use the arrow keys to move the falling pipes and", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "rotate with Z and X. Fill the pipes by connecting", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "to the colored caps, then block all the ends to", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "remove from the screen. Mix together different", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "colors for bonus points. Remove the pipes quickly", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "to control the temperature. If the thermometer", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "reaches the top a new row is added. The game", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "ends when the pipes reach the top row.", MIDX, _local6, 0.6, _local12);
_local6 = (_local6 + 28);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "See how high you can score!", MIDX, _local6, 0.6, _local12);
img = media.nextarrow.bitmapData;
_local5 = (1 - ((0.1 * Math.sin(((cycle * 8) / FPS))) % PI2));
_local3 = (MIDX - ((img.width / 2) * _local5));
_local4 = ((HEIGHT - 48) - ((img.height / 2) * _local5));
_local8.identity();
_local8.scale(_local5, _local5);
_local8.translate(_local3, _local4);
_local7 = new Rectangle(_local3, _local4, (img.width * _local5), (img.height * _local5));
if ((((((((_local10 >= _local7.left)) && ((_local10 <= _local7.right)))) && ((_local11 >= _local7.top)))) && ((_local11 <= _local7.bottom)))){
img = media.nextarrowHigh.bitmapData;
};
screen.draw(img, _local8, _local9, null, null, true);
if ((((((_arg1 == 0)) && ((debounce == 0)))) && (((keyDown(Keyboard.SPACE)) || (buttonDown))))){
debounce = BOUNCEDELAYLONG;
gameState = HELPSLIDEOUTSTATE;
};
img = media.watermark.bitmapData;
gridPoint.x = (WIDTH - img.width);
gridPoint.y = (HEIGHT - img.height);
screen.copyPixels(img, img.rect, gridPoint);
}
private function showHighScores(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Rectangle;
var _local9:Matrix = new Matrix();
var _local10:ColorTransform = new ColorTransform();
var _local11:Number = this.mouseX;
var _local12:Number = this.mouseY;
if (_arg1 < 0){
if (textfade > 0){
textfade--;
} else {
textfade = 0;
gameState = TABLESTATE;
};
};
if (_arg1 > 0){
if (textfade < TABLEDELAY){
textfade++;
} else {
textfade = TABLEDELAY;
gameState = INITSTATE;
};
};
img = media.background.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.titlepipes.bitmapData;
_local10.alphaMultiplier = (textfade / TABLEDELAY);
screen.draw(img, null, _local10);
var _local13:Number = ((TABLEDELAY - textfade) / TABLEDELAY);
img = media.logosmall.bitmapData;
_local9.identity();
_local9.translate((MIDX - (img.width / 2)), 20);
_local10.alphaMultiplier = _local13;
screen.draw(img, _local9, _local10);
_local6 = 156;
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Todays Highest Scores:", MIDX, _local6, 1.1, _local13);
_local6 = (_local6 + 48);
_local2 = 0;
while (_local2 < SCORESHOW) {
if (_local2 < highScores.length){
_local7 = highScores[_local2];
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, ((("#" + (_local2 + 1).toString()) + " - ") + _local7.toString()), MIDX, _local6, 0.95, _local13);
};
_local6 = (_local6 + 32);
_local2++;
};
img = media.bigbarHigh.bitmapData;
_local8 = new Rectangle((MIDX - (img.width / 2)), _local6, img.width, img.height);
if ((((((((_local11 >= _local8.left)) && ((_local11 <= _local8.right)))) && ((_local12 >= _local8.top)))) && ((_local12 <= _local8.bottom)))){
_local9.identity();
_local9.translate(_local8.x, _local8.y);
screen.draw(img, _local9, _local10);
if ((((debounce == 0)) && (buttonDown))){
debounce = BOUNCEDELAYLONG;
siteLink();
};
};
_local6 = (_local6 + 16);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Visit Joyboost.com", MIDX, _local6, 0.6, _local13);
_local6 = (_local6 + 24);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "for more great games!", MIDX, _local6, 0.6, _local13);
img = media.watermark.bitmapData;
gridPoint.x = (WIDTH - img.width);
gridPoint.y = (HEIGHT - img.height);
screen.copyPixels(img, img.rect, gridPoint);
img = media.nextarrow.bitmapData;
_local3 = (1 - ((0.1 * Math.sin(((cycle * 8) / FPS))) % PI2));
_local4 = (MIDX - ((img.width / 2) * _local3));
_local5 = ((HEIGHT - 48) - ((img.height / 2) * _local3));
_local9.identity();
_local9.scale(_local3, _local3);
_local9.translate(_local4, _local5);
_local8 = new Rectangle(_local4, _local5, (img.width * _local3), (img.height * _local3));
if ((((((((_local11 >= _local8.left)) && ((_local11 <= _local8.right)))) && ((_local12 >= _local8.top)))) && ((_local12 <= _local8.bottom)))){
img = media.nextarrowHigh.bitmapData;
};
screen.draw(img, _local9, _local10, null, null, true);
if ((((((_arg1 == 0)) && ((debounce == 0)))) && (((keyDown(Keyboard.SPACE)) || (buttonDown))))){
debounce = BOUNCEDELAYLONG;
gameState = TABLESLIDEOUTSTATE;
};
}
function addCap(_arg1:Pipe):void{
capList.push(_arg1);
}
private function boardSlide(_arg1:Boolean, _arg2:Number):void{
var _local3:Number;
if (_arg1){
_local3 = 0;
} else {
_local3 = HEIGHT;
};
if (Math.abs((boardPosition - _local3)) < 0.5){
boardPosition = _local3;
gameState = _arg2;
} else {
boardPosition = (boardPosition + ((_local3 - boardPosition) * 0.15));
};
drawScreen(false, false);
}
private function showTitles(_arg1:Number):void{
var _local2:Number;
var _local3:Point;
var _local4:Rectangle;
var _local5:Matrix = new Matrix();
var _local6:ColorTransform = new ColorTransform();
var _local7:Point = new Point();
var _local8:Number = this.mouseX;
var _local9:Number = this.mouseY;
if (_arg1 < 0){
if (pipepos >= 1){
pipepos = (pipepos - (pipepos * 0.2));
} else {
pipepos = 0;
gameState = TITLESTATE;
};
};
if (_arg1 > 0){
if (pipepos <= (HEIGHT - 1)){
pipepos = (pipepos + ((HEIGHT - pipepos) * 0.2));
} else {
pipepos = HEIGHT;
if (_arg1 == 1){
gameState = BOARDSLIDEINSTATE;
} else {
gameState = HELPSLIDEINSTATE;
};
};
};
img = media.background.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.titlepipes.bitmapData;
if (_arg1 == 2){
_local6.alphaMultiplier = (0.5 - (0.5 * (pipepos / HEIGHT)));
} else {
_local6.alphaMultiplier = (0.5 + (0.5 * (pipepos / HEIGHT)));
};
screen.draw(img, null, _local6);
if ((((((_arg1 <= 0)) && (((cycle % 2) == 0)))) && ((clouds.length < CLOUDMAX)))){
clouds.push(new Point(Math.floor((Math.random() * WIDTH)), HEIGHT));
};
drawSteam();
img = media.leftpipe.bitmapData;
gridPoint.x = 0;
gridPoint.y = (-180 - pipepos);
screen.copyPixels(img, img.rect, gridPoint);
img = media.rightpipe.bitmapData;
gridPoint.x = 262;
gridPoint.y = (pipepos + 100);
screen.copyPixels(img, img.rect, gridPoint);
img = media.wheelspokes.bitmapData;
gridPoint.x = 55;
gridPoint.y = (244 - pipepos);
_local7.x = (img.width / 2);
_local7.y = (img.height / 2);
_local5.identity();
_local5.translate(-(_local7.x), -(_local7.y));
_local5.rotate(wheel1rot);
_local5.translate((gridPoint.x + _local7.x), (gridPoint.y + _local7.y));
screen.draw(img, _local5, null, null, null, true);
img = media.wheelmiddle.bitmapData;
screen.copyPixels(img, img.rect, gridPoint);
img = media.wheelstuds.bitmapData.clone();
Char.centreText(img, media.fontData.bitmapData, media.fontPositions, "PLAY", _local7.x, _local7.y);
screen.draw(img, _local5, null, null, null, true);
_local4 = new Rectangle(gridPoint.x, gridPoint.y, img.width, img.height);
if ((((((((_local8 >= _local4.left)) && ((_local8 <= _local4.right)))) && ((_local9 >= _local4.top)))) && ((_local9 <= _local4.bottom)))){
if (wheel1speed < WHEELMAX){
wheel1speed++;
};
if ((((((_arg1 <= 0)) && ((debounce == 0)))) && (buttonDown))){
debounce = BOUNCEDELAYLONG;
gameState = TITLESLIDEOUT1STATE;
};
} else {
if (wheel1speed > 0){
wheel1speed--;
};
};
wheel1rot = (wheel1rot + (wheel1speed * ((Math.PI / 16) / WHEELMAX)));
img = media.wheelspokes.bitmapData;
gridPoint.x = 316;
gridPoint.y = (pipepos + 244);
_local7.x = (img.width / 2);
_local7.y = (img.height / 2);
_local5.identity();
_local5.translate(-(_local7.x), -(_local7.y));
_local5.rotate(wheel2rot);
_local5.translate((gridPoint.x + _local7.x), (gridPoint.y + _local7.y));
screen.draw(img, _local5, null, null, null, true);
img = media.wheelmiddle.bitmapData;
screen.copyPixels(img, img.rect, gridPoint);
img = media.wheelstuds.bitmapData.clone();
Char.centreText(img, media.fontData.bitmapData, media.fontPositions, "HELP", _local7.x, _local7.y);
screen.draw(img, _local5, null, null, null, true);
_local4 = new Rectangle(gridPoint.x, gridPoint.y, img.width, img.height);
if ((((((((_local8 >= _local4.left)) && ((_local8 <= _local4.right)))) && ((_local9 >= _local4.top)))) && ((_local9 <= _local4.bottom)))){
if (wheel2speed < WHEELMAX){
wheel2speed++;
};
if ((((((_arg1 <= 0)) && ((debounce == 0)))) && (buttonDown))){
debounce = BOUNCEDELAYLONG;
gameState = TITLESLIDEOUT2STATE;
textfade = TABLEDELAY;
};
} else {
if (wheel2speed > 0){
wheel2speed--;
};
};
wheel2rot = (wheel2rot + (wheel2speed * ((Math.PI / 16) / WHEELMAX)));
if ((((_arg1 == 0)) && ((logoflare < media.flare.length)))){
img = media.flare[logoflare].bitmapData;
gridPoint.x = (MIDX - (img.width / 2));
gridPoint.y = 0;
screen.copyPixels(img, img.rect, gridPoint);
logoflare++;
};
img = media.titlelogo.bitmapData;
_local5.identity();
_local5.translate((MIDX - (img.width / 2)), 0);
_local6.alphaMultiplier = ((HEIGHT - pipepos) / HEIGHT);
screen.draw(img, _local5, _local6, null, null, true);
img = media.watermark.bitmapData;
gridPoint.x = (WIDTH - img.width);
gridPoint.y = (HEIGHT - img.height);
screen.copyPixels(img, img.rect, gridPoint);
if ((((((_arg1 == 0)) && ((wheel1speed > 8)))) && (((cycle % 8) == 0)))){
media.squeak1Sound.play();
};
if ((((((_arg1 == 0)) && ((wheel2speed > 7)))) && (((cycle % 7) == 0)))){
media.squeak2Sound.play();
};
}
private function endGame():void{
gameState = GAMEOVERSTATE;
debounce = BOUNCEDELAYLONG;
media.gameoverSound.play();
}
private function mainLoop(_arg1:Event):void{
cycle++;
if (debounce > 0){
debounce--;
};
if (scoreinc > 1000){
scoreinc = (scoreinc - 1000);
score = (score + 1000);
} else {
if (scoreinc > 100){
scoreinc = (scoreinc - 100);
score = (score + 100);
} else {
if (scoreinc > 10){
scoreinc = (scoreinc - 10);
score = (score + 10);
} else {
if (scoreinc > 0){
scoreinc--;
score++;
};
};
};
};
if (gameState == INITSTATE){
initGame();
} else {
if (gameState == TITLESLIDEINSTATE){
showTitles(-1);
} else {
if (gameState == TITLESTATE){
showTitles(0);
} else {
if (gameState == TITLESLIDEOUT1STATE){
showTitles(1);
} else {
if (gameState == TITLESLIDEOUT2STATE){
showTitles(2);
} else {
if (gameState == HELPSTATE){
showInstructions(0);
} else {
if (gameState == HELPSLIDEINSTATE){
showInstructions(-1);
} else {
if (gameState == HELPSLIDEOUTSTATE){
showInstructions(1);
} else {
if (gameState == BOARDSLIDEINSTATE){
boardSlide(true, PLAYSTATE);
} else {
if (gameState == BOARDSLIDEOUTSTATE){
boardSlide(false, SCORESTATE);
} else {
if (gameState == PLAYSTATE){
playGame();
} else {
if (gameState == PAUSESTATE){
pauseGame();
} else {
if (gameState == GAMEOVERSTATE){
showGameOver();
} else {
if (gameState == SCORESTATE){
updateScoreTables();
} else {
if (gameState == TABLESLIDEINSTATE){
showHighScores(-1);
} else {
if (gameState == TABLESTATE){
showHighScores(0);
} else {
if (gameState == TABLESLIDEOUTSTATE){
showHighScores(1);
} else {
img = media.background.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.titlepipes.bitmapData;
screen.copyPixels(img, screenRect, originPoint);
img = media.logosmall.bitmapData;
gridPoint.x = (MIDX - (img.width / 2));
gridPoint.y = 20;
screen.copyPixels(img, img.rect, gridPoint);
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Please don't copy this game!", MIDX, (MIDY - 32));
Char.centreText(screen, media.fontData.bitmapData, media.fontPositions, "Play FREE at www.joyboost.com", MIDX, (MIDY + 32));
img = media.watermark.bitmapData;
gridPoint.x = (WIDTH - img.width);
gridPoint.y = (HEIGHT - img.height);
screen.copyPixels(img, img.rect, gridPoint);
if ((((debounce == 0)) && (buttonDown))){
debounce = BOUNCEDELAYLONG;
siteLink();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
static function randomRange(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
static function checkURL(_arg1:String):Boolean{
return (true);
}
static function div(_arg1:Number, _arg2:Number):Number{
return (((_arg1 - (_arg1 % _arg2)) / _arg2));
}
static function siteLink():void{
navigateToURL(new URLRequest("http://www.joyboost.com"), "_blank");
}
}
}//package