STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229456
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2574 · P5148

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/16422302?noj=FRM16422302-5DC" width="1" height="1"></div>

Asteroid Wars.swf

This is the info page for
Flash #135247

(Click the ID number above for more basic data on this flash file.)


Text
H

scores

ASTEROID

WARS

Start game

More games

Follow us on twitter

Art & cpde by Louissi-simon Menard

ActionScript [AS3]

Section 1
//MochiBot (com.mochibot.MochiBot) package com.mochibot { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); _local8.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, io_errorHandler); return (_local3); } public static function io_errorHandler(_arg1:IOErrorEvent):void{ trace("Mochibot Fail"); } } }//package com.mochibot
Section 2
//Sine (gs.easing.Sine) package gs.easing { public class Sine { private static const _HALF_PI:Number = 1.5707963267949; public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * _HALF_PI))) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * _HALF_PI))) + _arg3) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } } }//package gs.easing
Section 3
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public var info:Object; public static const UPDATE:String = "update"; public static const START:String = "start"; public static const version:Number = 0.9; public static const COMPLETE:String = "complete"; public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.info = _arg2; } override public function clone():Event{ return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable)); } } }//package gs.events
Section 4
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin) package gs.plugins { import flash.display.*; import gs.*; public class AutoAlphaPlugin extends TweenPlugin { protected var _tweenVisible:Boolean; protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function AutoAlphaPlugin(){ this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; this.onComplete = onCompleteTween; } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); _tweenVisible = !(Boolean(("visible" in _arg1))); } public function onCompleteTween():void{ if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(!((_arg2 == 0))); _tweenVisible = true; addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); if (((!((_target.visible == true))) && (_tweenVisible))){ _target.visible = true; }; } } }//package gs.plugins
Section 5
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; public class BevelFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BevelFilterPlugin(){ this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BevelFilter; initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 6
//BezierPlugin (gs.plugins.BezierPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orient:Boolean; protected var _orientData:Array; protected var _target:Object; protected var _beziers:Object; protected static const _RAD2DEG:Number = 57.2957795130823; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function killProps(_arg1:Object):void{ var _local2:String; for (_local2 in _beziers) { if ((_local2 in _arg1)){ delete _beziers[_local2]; }; }; super.killProps(_arg1); } protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{ var _local5:int; var _local6:String; _target = _arg1.target; if (_arg1.exposedVars.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0]]; _orient = true; } else { if ((_arg1.exposedVars.orientToBezier is Array)){ _orientData = _arg1.exposedVars.orientToBezier; _orient = true; }; }; var _local4:Object = {}; _local5 = 0; while (_local5 < _arg2.length) { for (_local6 in _arg2[_local5]) { if (_local4[_local6] == undefined){ _local4[_local6] = [_arg1.target[_local6]]; }; if (typeof(_arg2[_local5][_local6]) == "number"){ _local4[_local6].push(_arg2[_local5][_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6]))); }; }; _local5++; }; for (_local6 in _local4) { this.overwriteProps[this.overwriteProps.length] = _local6; if (_arg1.exposedVars[_local6] != undefined){ if (typeof(_arg1.exposedVars[_local6]) == "number"){ _local4[_local6].push(_arg1.exposedVars[_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6]))); }; delete _arg1.exposedVars[_local6]; _local5 = (_arg1.tweens.length - 1); while (_local5 > -1) { if (_arg1.tweens[_local5].name == _local6){ _arg1.tweens.splice(_local5, 1); }; _local5--; }; }; }; _beziers = parseBeziers(_local4, _arg3); } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), false); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:String; var _local4:Object; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:int; var _local9:Object; var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:Number; if (_arg1 == 1){ for (_local3 in _beziers) { _local2 = (_beziers[_local3].length - 1); _target[_local3] = _beziers[_local3][_local2][2]; }; } else { for (_local3 in _beziers) { _local6 = _beziers[_local3].length; if (_arg1 < 0){ _local2 = 0; } else { if (_arg1 >= 1){ _local2 = (_local6 - 1); } else { _local2 = int((_local6 * _arg1)); }; }; _local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6); _local4 = _beziers[_local3][_local2]; if (this.round){ _local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); _local8 = ((_local7)<0) ? -1 : 1; _target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7); } else { _target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); }; }; }; if (_orient){ _local9 = _target; _local10 = this.round; _target = _future; this.round = false; _orient = false; this.changeFactor = (_arg1 + 0.01); _target = _local9; this.round = _local10; _orient = true; _local2 = 0; while (_local2 < _orientData.length) { _local13 = _orientData[_local2]; _local14 = ((_local13[3]) || (0)); _local11 = (_future[_local13[0]] - _target[_local13[0]]); _local12 = (_future[_local13[1]] - _target[_local13[1]]); _target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14); _local2++; }; }; } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } } }//package gs.plugins
Section 7
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin) package gs.plugins { import gs.*; public class BezierThroughPlugin extends BezierPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BezierThroughPlugin(){ this.propName = "bezierThrough"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), true); return (true); } } }//package gs.plugins
Section 8
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; public class BlurFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BlurFilterPlugin(){ this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BlurFilter; initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 9
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; public class ColorMatrixFilterPlugin extends FilterPlugin { protected var _matrix:Array; protected var _matrixTween:EndArrayPlugin; public static const API:Number = 1; public static const VERSION:Number = 1.01; protected static var _lumG:Number = 0.71516; protected static var _lumR:Number = 0.212671; protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; protected static var _lumB:Number = 0.072169; public function ColorMatrixFilterPlugin(){ this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = ColorMatrixFilter; var _local4:Object = _arg2; initFilter({}, new ColorMatrixFilter(_idMatrix.slice())); _matrix = ColorMatrixFilter(_filter).matrix; var _local5:Array = []; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _local5 = _local4.matrix; } else { if (_local4.relative == true){ _local5 = _matrix.slice(); } else { _local5 = _idMatrix.slice(); }; _local5 = setBrightness(_local5, _local4.brightness); _local5 = setContrast(_local5, _local4.contrast); _local5 = setHue(_local5, _local4.hue); _local5 = setSaturation(_local5, _local4.saturation); _local5 = setThreshold(_local5, _local4.threshold); if (!isNaN(_local4.colorize)){ _local5 = colorize(_local5, _local4.colorize, _local4.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, _local5); return (true); } override public function set changeFactor(_arg1:Number):void{ _matrixTween.changeFactor = _arg1; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = _arg1; } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Number = (1 - _arg2); var _local4:Number = (_local3 * _lumR); var _local5:Number = (_local3 * _lumG); var _local6:Number = (_local3 * _lumB); var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); var _local3:Number = Math.cos(_arg2); var _local4:Number = Math.sin(_arg2); var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; var _local3:Array = []; var _local4:int; var _local5:int; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF); var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF); var _local6:Number = ((_arg2 & 0xFF) / 0xFF); var _local7:Number = (1 - _arg3); var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } } }//package gs.plugins
Section 10
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; public class DropShadowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function DropShadowFilterPlugin(){ this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = DropShadowFilter; initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject)); return (true); } } }//package gs.plugins
Section 11
//EndArrayPlugin (gs.plugins.EndArrayPlugin) package gs.plugins { import flash.display.*; import gs.*; import gs.utils.tween.*; public class EndArrayPlugin extends TweenPlugin { protected var _a:Array; protected var _info:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(_arg1:Array, _arg2:Array):void{ _a = _arg1; var _local3:int = (_arg2.length - 1); while (_local3 > -1) { if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){ _info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3])); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (false); }; init((_arg1 as Array), _arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:ArrayTweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _a[_local3.index] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } } }//package gs.plugins
Section 12
//FilterPlugin (gs.plugins.FilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; import gs.utils.tween.*; public class FilterPlugin extends TweenPlugin { protected var _remove:Boolean; protected var _target:Object; protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; public static const VERSION:Number = 1.03; public static const API:Number = 1; public function onCompleteTween():void{ var _local1:int; var _local2:Array; if (_remove){ _local2 = _target.filters; if (!(_local2[_index] is _type)){ _local1 = (_local2.length - 1); while (_local1 > -1) { if ((_local2[_local1] is _type)){ _local2.splice(_local1, 1); break; }; _local1--; }; } else { _local2.splice(_index, 1); }; _target.filters = _local2; }; } protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{ var _local4:String; var _local5:int; var _local6:HexColorsPlugin; var _local3:Array = _target.filters; _index = -1; if (_arg1.index != null){ _index = _arg1.index; } else { _local5 = (_local3.length - 1); while (_local5 > -1) { if ((_local3[_local5] is _type)){ _index = _local5; break; }; _local5--; }; }; if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){ _index = ((_arg1.index)!=null) ? _arg1.index : _local3.length; _local3[_index] = _arg2; _target.filters = _local3; }; _filter = _local3[_index]; _remove = Boolean((_arg1.remove == true)); if (_remove){ this.onComplete = onCompleteTween; }; var _local7:Object = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1; for (_local4 in _local7) { if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){ } else { if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){ _local6 = new HexColorsPlugin(); _local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]); _tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false); } else { if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){ _filter[_local4] = _local7[_local4]; } else { addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4); }; }; }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Array = _target.filters; _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; if (!(_local4[_index] is _type)){ _index = (_local4.length - 1); _local2 = (_local4.length - 1); while (_local2 > -1) { if ((_local4[_local2] is _type)){ _index = _local2; break; }; _local2--; }; }; _local4[_index] = _filter; _target.filters = _local4; } } }//package gs.plugins
Section 13
//FramePlugin (gs.plugins.FramePlugin) package gs.plugins { import flash.display.*; import gs.*; public class FramePlugin extends TweenPlugin { protected var _target:MovieClip; public var frame:int; public static const VERSION:Number = 1; public static const API:Number = 1; public function FramePlugin(){ this.propName = "frame"; this.overwriteProps = ["frame"]; this.round = true; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){ return (false); }; _target = (_arg1 as MovieClip); addTween(this, "frame", _target.currentFrame, _arg2, "frame"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.gotoAndStop(this.frame); } } }//package gs.plugins
Section 14
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin) package gs.plugins { import flash.display.*; import flash.filters.*; import gs.*; public class GlowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function GlowFilterPlugin(){ this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = GlowFilter; initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout)); return (true); } } }//package gs.plugins
Section 15
//HexColorsPlugin (gs.plugins.HexColorsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const VERSION:Number = 1; public static const API:Number = 1; public function HexColorsPlugin(){ this.propName = "hexColors"; this.overwriteProps = []; } override public function killProps(_arg1:Object):void{ var _local2:int = (_colors.length - 1); while (_local2 > -1) { if (_arg1[_colors[_local2][1]] != undefined){ _colors.splice(_local2, 1); }; _local2--; }; super.killProps(_arg1); } public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{ var _local5:Number; var _local6:Number; var _local7:Number; if (_arg3 != _arg4){ if (_colors == null){ _colors = []; }; _local5 = (_arg3 >> 16); _local6 = ((_arg3 >> 8) & 0xFF); _local7 = (_arg3 & 0xFF); _colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)]; this.overwriteProps[this.overwriteProps.length] = _arg2; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:Array; _local2 = (_colors.length - 1); while (_local2 > -1) { _local3 = _colors[_local2]; _local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7]))); _local2--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; for (_local4 in _arg2) { initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4])); }; return (true); } } }//package gs.plugins
Section 16
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin) package gs.plugins { public class RemoveTintPlugin extends TintPlugin { public static const VERSION:Number = 1.01; public static const API:Number = 1; public function RemoveTintPlugin(){ this.propName = "removeTint"; } } }//package gs.plugins
Section 17
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class RoundPropsPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function RoundPropsPlugin(){ this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 18
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin) package gs.plugins { import flash.display.*; import gs.*; public class ShortRotationPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})"); return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number = ((_arg4 - _arg3) % 360); if (((_arg4 - _arg3) % 360) != (_local5 % 180)){ _local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360); }; addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 19
//TintPlugin (gs.plugins.TintPlugin) package gs.plugins { import flash.display.*; import flash.geom.*; import gs.*; import gs.utils.tween.*; public class TintPlugin extends TweenPlugin { protected var _target:DisplayObject; protected var _ct:ColorTransform; public static const VERSION:Number = 1.01; public static const API:Number = 1; protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"]; public function TintPlugin(){ this.propName = "tint"; this.overwriteProps = ["tint"]; } public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{ var _local3:int; var _local4:String; _target = _arg1; _ct = _target.transform.colorTransform; _local3 = (_props.length - 1); while (_local3 > -1) { _local4 = _props[_local3]; if (_ct[_local4] != _arg2[_local4]){ _tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg1 is DisplayObject)){ return (false); }; var _local4:ColorTransform = new ColorTransform(); if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){ _local4.color = uint(_arg2); }; if (((!((_arg3.exposedVars.alpha == undefined))) || (!((_arg3.exposedVars.autoAlpha == undefined))))){ _local4.alphaMultiplier = ((_arg3.exposedVars.alpha)!=undefined) ? _arg3.exposedVars.alpha : _arg3.exposedVars.autoAlpha; _arg3.killVars({alpha:1, autoAlpha:1}); } else { _local4.alphaMultiplier = _arg1.alpha; }; init((_arg1 as DisplayObject), _local4); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.transform.colorTransform = _ct; } } }//package gs.plugins
Section 20
//TweenPlugin (gs.plugins.TweenPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class TweenPlugin { public var overwriteProps:Array; protected var _tweens:Array; public var propName:String; public var onComplete:Function; public var round:Boolean; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.03; public static const API:Number = 1; public function TweenPlugin(){ _tweens = []; super(); } protected function updateTweens(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _changeFactor = _arg1; } protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{ var _local6:Number; if (_arg4 != null){ _local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4); if (_local6 != 0){ _tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false); }; }; } public function killProps(_arg1:Object):void{ var _local2:int; _local2 = (this.overwriteProps.length - 1); while (_local2 > -1) { if ((this.overwriteProps[_local2] in _arg1)){ this.overwriteProps.splice(_local2, 1); }; _local2--; }; _local2 = (_tweens.length - 1); while (_local2 > -1) { if ((_tweens[_local2].name in _arg1)){ _tweens.splice(_local2, 1); }; _local2--; }; } public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName); return (true); } public function get changeFactor():Number{ return (_changeFactor); } public static function activate(_arg1:Array):Boolean{ var _local2:int; var _local3:Object; _local2 = (_arg1.length - 1); while (_local2 > -1) { _local3 = new (_arg1[_local2]); TweenLite.plugins[_local3.propName] = _arg1[_local2]; _local2--; }; return (true); } } }//package gs.plugins
Section 21
//VisiblePlugin (gs.plugins.VisiblePlugin) package gs.plugins { import flash.display.*; import gs.*; public class VisiblePlugin extends TweenPlugin { protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; this.onComplete = onCompleteTween; } public function onCompleteTween():void{ if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(_arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ if (_target.visible != true){ _target.visible = true; }; } } }//package gs.plugins
Section 22
//VolumePlugin (gs.plugins.VolumePlugin) package gs.plugins { import flash.display.*; import flash.media.*; import gs.*; public class VolumePlugin extends TweenPlugin { protected var _target:Object; protected var _st:SoundTransform; public static const VERSION:Number = 1; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (Boolean(!((_tweens.length == 0)))); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package gs.plugins
Section 23
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo) package gs.utils.tween { public class ArrayTweenInfo { public var change:Number; public var start:Number; public var index:uint; public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){ this.index = _arg1; this.start = _arg2; this.change = _arg3; } } }//package gs.utils.tween
Section 24
//TweenInfo (gs.utils.tween.TweenInfo) package gs.utils.tween { public class TweenInfo { public var start:Number; public var name:String; public var change:Number; public var target:Object; public var property:String; public var isPlugin:Boolean; public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; } } }//package gs.utils.tween
Section 25
//OverwriteManager (gs.OverwriteManager) package gs { import flash.utils.*; import gs.utils.tween.*; import flash.errors.*; public class OverwriteManager { public static const ALL:int = 1; public static const NONE:int = 0; public static const AUTO:int = 2; public static const CONCURRENT:int = 3; public static const version:Number = 3.11; public static var mode:int; public static var enabled:Boolean; public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{ var _local4:int; var _local5:String; var _local6:TweenInfo; _local4 = (_arg3.length - 1); while (_local4 > -1) { _local6 = _arg3[_local4]; if ((_local6.name in _arg1)){ _arg3.splice(_local4, 1); } else { if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){ _local6.target.killProps(_arg1); if (_local6.target.overwriteProps.length == 0){ _arg3.splice(_local4, 1); }; }; }; _local4--; }; for (_local5 in _arg1) { delete _arg2[_local5]; }; } public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{ var _local7:int; var _local8:TweenLite; var _local9:Array; var _local10:Object; var _local11:int; var _local12:TweenInfo; var _local13:Array; var _local3:Object = _arg1.vars; var _local4:int = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite); if ((((_local4 < 2)) || ((_arg2 == null)))){ return; }; var _local5:Number = _arg1.startTime; var _local6:Array = []; _local7 = (_arg2.length - 1); while (_local7 > -1) { _local8 = _arg2[_local7]; if (((((!((_local8 == _arg1))) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){ _local6[_local6.length] = _local8; }; _local7--; }; if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){ return; }; if (_local4 == AUTO){ _local9 = _arg1.tweens; _local10 = {}; _local7 = (_local9.length - 1); while (_local7 > -1) { _local12 = _local9[_local7]; if (((_local12.isPlugin) && ((_local12.name == "_MULTIPLE_")))){ _local13 = _local12.target.overwriteProps; _local11 = (_local13.length - 1); while (_local11 > -1) { _local10[_local13[_local11]] = true; _local11--; }; _local10[_local12.target.propName] = true; } else { _local10[_local12.name] = true; }; _local7--; }; _local7 = (_local6.length - 1); while (_local7 > -1) { killVars(_local10, _local6[_local7].exposedVars, _local6[_local7].tweens); _local7--; }; } else { _local7 = (_local6.length - 1); while (_local7 > -1) { _local6[_local7].enabled = false; _local7--; }; }; } public static function init(_arg1:int=2):int{ if (TweenLite.version < 10.04){ trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."); }; TweenLite.overwriteManager = OverwriteManager; mode = _arg1; enabled = true; return (mode); } } }//package gs
Section 26
//TweenLite (gs.TweenLite) package gs { import flash.events.*; import flash.display.*; import flash.utils.*; import gs.plugins.*; import gs.utils.tween.*; public class TweenLite { public var started:Boolean; public var delay:Number; protected var _hasUpdate:Boolean; protected var _hasPlugins:Boolean; public var initted:Boolean; public var active:Boolean; public var startTime:Number; public var target:Object; public var duration:Number; public var gc:Boolean; public var tweens:Array; public var vars:Object; public var ease:Function; public var exposedVars:Object; public var initTime:Number; public var combinedTimeScale:Number; public static const version:Number = 10.06; private static var _timer:Timer = new Timer(2000); public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var currentTime:uint; public static var masterList:Dictionary = new Dictionary(false); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1}; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var timingSprite:Sprite = new Sprite(); public static var overwriteManager:Object; private static var _tlInitted:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ if (_arg1 == null){ return; }; if (!_tlInitted){ TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]); currentTime = getTimer(); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; _timer.addEventListener("timer", killGarbage, false, 0, true); _timer.start(); _tlInitted = true; }; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.combinedTimeScale = ((_arg3.timeScale) || (1)); this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0)))); this.target = _arg1; if (typeof(this.vars.ease) != "function"){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; this.ease = this.vars.ease; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars; this.tweens = []; this.initTime = currentTime; this.startTime = (this.initTime + (this.delay * 1000)); var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if (((!((_arg1 in masterList))) || ((_local4 == 1)))){ masterList[_arg1] = [this]; } else { masterList[_arg1].push(this); }; if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){ initTweenVals(); if (this.active){ render((this.startTime + 1)); } else { render(this.startTime); }; if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){ this.target.visible = this.exposedVars.visible; }; }; } public function get enabled():Boolean{ return ((this.gc) ? false : true); } public function set enabled(_arg1:Boolean):void{ var _local2:Array; var _local3:Boolean; var _local4:int; if (_arg1){ if (!(this.target in masterList)){ masterList[this.target] = [this]; } else { _local2 = masterList[this.target]; _local4 = (_local2.length - 1); while (_local4 > -1) { if (_local2[_local4] == this){ _local3 = true; break; }; _local4--; }; if (!_local3){ _local2[_local2.length] = this; }; }; }; this.gc = (_arg1) ? false : true; if (this.gc){ this.active = false; } else { this.active = this.started; }; } public function clear():void{ this.tweens = []; this.vars = (this.exposedVars = {ease:this.vars.ease}); _hasUpdate = false; } public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = ((_arg1 - this.startTime) * 0.001); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } public function activate():void{ this.started = (this.active = true); if (!this.initted){ initTweenVals(); }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; } public function initTweenVals():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:TweenInfo; for (_local1 in this.exposedVars) { if ((_local1 in _reservedProps)){ } else { if ((_local1 in plugins)){ _local3 = new (plugins[_local1]); if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){ this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); } else { this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true); _hasPlugins = true; }; } else { this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); }; }; }; if (this.vars.runBackwards == true){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local4 = this.tweens[_local2]; this.tweens[_local2].start = (_local4.start + _local4.change); _local4.change = -(_local4.change); _local2--; }; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){ overwriteManager.manageOverwrites(this, masterList[this.target]); }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function killVars(_arg1:Object):void{ if (overwriteManager.enabled){ overwriteManager.killVars(_arg1, this.exposedVars, this.tweens); }; } public function complete(_arg1:Boolean=false):void{ var _local2:int; if (!_arg1){ if (!this.initted){ initTweenVals(); }; this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale)); render(currentTime); return; }; if (_hasPlugins){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){ this.tweens[_local2].target.onComplete(); }; _local2--; }; }; if (this.vars.persist != true){ this.enabled = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function updateAll(_arg1:Event=null):void{ var _local4:Array; var _local5:int; var _local6:TweenLite; var _local2:uint = (currentTime = getTimer()); var _local3:Dictionary = masterList; for each (_local4 in _local3) { _local5 = (_local4.length - 1); while (_local5 > -1) { _local6 = _local4[_local5]; if (_local6.active){ _local6.render(_local2); } else { if (_local6.gc){ _local4.splice(_local5, 1); } else { if (_local2 >= _local6.startTime){ _local6.activate(); _local6.render(_local2); }; }; }; _local5--; }; }; } public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{ if (_arg1 != null){ if (_arg2){ _arg1.clear(); }; _arg1.enabled = false; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; var _local5:TweenLite; if (((!((_arg1 == null))) && ((_arg1 in masterList)))){ _local3 = masterList[_arg1]; _local4 = (_local3.length - 1); while (_local4 > -1) { _local5 = _local3[_local4]; if (((_arg2) && (!(_local5.gc)))){ _local5.complete(false); }; _local5.clear(); _local4--; }; delete masterList[_arg1]; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } protected static function killGarbage(_arg1:TimerEvent):void{ var _local3:Object; var _local2:Dictionary = masterList; for (_local3 in _local2) { if (_local2[_local3].length == 0){ delete _local2[_local3]; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0})); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 27
//TweenMax (gs.TweenMax) package gs { import flash.events.*; import flash.utils.*; import gs.plugins.*; import gs.utils.tween.*; import gs.events.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _dispatcher:EventDispatcher; protected var _callbacks:Object; public var pauseTime:Number; protected var _repeatCount:Number; protected var _timeScale:Number; public static const version:Number = 10.07; public static var removeTween:Function = TweenLite.removeTween; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; protected static var _pausedTweens:Dictionary = new Dictionary(false); protected static var _globalTimeScale:Number = 1; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]); private static var _versionCheck:Boolean = ((TweenLite.version)<10.06) ? trace("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.") : true; ; public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){ _timeScale = 1; this.combinedTimeScale = _globalTimeScale; } else { _timeScale = this.combinedTimeScale; this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale); }; if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){ this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ onUpdateDispatcher(); onCompleteDispatcher(); }; }; _repeatCount = 0; if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){ this.vars.persist = true; }; } public function dispatchEvent(_arg1:Event):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.dispatchEvent(_arg1)); } public function get reversed():Boolean{ return ((this.ease == reverseEase)); } public function set reversed(_arg1:Boolean):void{ if (this.reversed != _arg1){ reverse(); }; } public function get progress():Number{ var _local1:Number = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime; var _local2:Number = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale); if (_local2 > 1){ return (1); }; if (_local2 < 0){ return (0); }; return (_local2); } override public function set enabled(_arg1:Boolean):void{ if (!_arg1){ _pausedTweens[this] = null; delete _pausedTweens[this]; }; super.enabled = _arg1; if (_arg1){ this.combinedTimeScale = (_timeScale * _globalTimeScale); }; } protected function onStartDispatcher(... _args):void{ if (_callbacks.onStart != null){ _callbacks.onStart.apply(null, this.vars.onStartParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local5:int; var _local6:Object; var _local7:Array; var _local8:Boolean; var _local9:Array; var _local10:Object; var _local11:int; var _local12:Array; var _local4:Number = this.progress; if (this.initted){ if (((!(_arg3)) && (!((_local4 == 0))))){ _local5 = (this.tweens.length - 1); while (_local5 > -1) { if (this.tweens[_local5].name == _arg1){ this.tweens[_local5].target[this.tweens[_local5].property] = this.tweens[_local5].start; }; _local5--; }; }; _local6 = this.vars; _local7 = this.tweens; _local8 = _hasPlugins; this.tweens = []; this.vars = (this.exposedVars = {}); this.vars[_arg1] = _arg2; initTweenVals(); if (((!((this.ease == reverseEase))) && ((_local6.ease is Function)))){ this.ease = _local6.ease; }; if (((_arg3) && (!((_local4 == 0))))){ adjustStartValues(); }; _local9 = this.tweens; this.vars = _local6; this.tweens = _local7; _local10 = {}; _local5 = (_local9.length - 1); while (_local5 > -1) { if (_local9[_local5][4] == "_MULTIPLE_"){ _local12 = _local9[_local5][0].overwriteProps; _local11 = (_local12.length - 1); while (_local11 > -1) { _local10[_local12[_local11]] = true; _local11--; }; } else { _local10[_local9[_local5][4]] = true; }; _local5--; }; killVars(_local10); this.tweens = this.tweens.concat(_local9); _hasPlugins = Boolean(((_local8) || (_hasPlugins))); }; this.vars[_arg1] = _arg2; } override public function initTweenVals():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:TweenInfo; if (this.exposedVars.startAt != null){ this.exposedVars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.exposedVars.startAt); }; super.initTweenVals(); if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){ _local5 = this.exposedVars.roundProps; _local1 = (_local5.length - 1); while (_local1 > -1) { _local3 = _local5[_local1]; _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local7 = this.tweens[_local2]; if (_local7.name == _local3){ if (_local7.isPlugin){ _local7.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local7.target, _local3, _local7.start, _local7.change); _hasPlugins = true; this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true); } else { _local6.add(_local7.target, _local3, _local7.start, _local7.change); this.tweens.splice(_local2, 1); }; }; } else { if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){ _local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local7.target.round = true; }; }; }; _local2--; }; _local1--; }; }; } public function restart(_arg1:Boolean=false):void{ if (_arg1){ this.initTime = currentTime; this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale))); } else { this.startTime = currentTime; this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale))); }; _repeatCount = 0; if (this.target != this.vars.onComplete){ render(this.startTime); }; this.pauseTime = NaN; _pausedTweens[this] = null; delete _pausedTweens[this]; this.enabled = true; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){ this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function adjustStartValues():void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:TweenInfo; var _local6:int; var _local1:Number = this.progress; if (_local1 != 0){ _local2 = this.ease(_local1, 0, 1, 1); _local3 = (1 / (1 - _local2)); _local6 = (this.tweens.length - 1); while (_local6 > -1) { _local5 = this.tweens[_local6]; _local4 = (_local5.start + _local5.change); if (_local5.isPlugin){ _local5.change = ((_local4 - _local2) * _local3); } else { _local5.change = ((_local4 - _local5.target[_local5.property]) * _local3); }; _local5.start = (_local4 - _local5.change); _local6--; }; }; } override public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } protected function initDispatcher():void{ var _local1:Object; var _local2:String; if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); _callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete}; if (this.vars.isTV == true){ this.vars = this.vars.clone(); } else { _local1 = {}; for (_local2 in this.vars) { _local1[_local2] = this.vars[_local2]; }; this.vars = _local1; }; this.vars.onStart = onStartDispatcher; this.vars.onComplete = onCompleteDispatcher; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function willTrigger(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.willTrigger(_arg1)); } public function set progress(_arg1:Number):void{ this.startTime = (currentTime - ((this.duration * _arg1) * 1000)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); if (!this.started){ activate(); }; render(currentTime); if (!isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.active = false; }; } public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; var _local3:Number = this.progress; if (((_arg1) && ((_local3 > 0)))){ this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); }; if (_arg2 != false){ if (_local3 < 1){ resume(); } else { restart(); }; }; } protected function onUpdateDispatcher(... _args):void{ if (_callbacks.onUpdate != null){ _callbacks.onUpdate.apply(null, this.vars.onUpdateParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); } public function set paused(_arg1:Boolean):void{ if (_arg1){ pause(); } else { resume(); }; } public function resume():void{ this.enabled = true; if (!isNaN(this.pauseTime)){ this.initTime = (this.initTime + (currentTime - this.pauseTime)); this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); this.pauseTime = NaN; if (((!(this.started)) && ((currentTime >= this.startTime)))){ activate(); } else { this.active = this.started; }; _pausedTweens[this] = null; delete _pausedTweens[this]; }; } public function get paused():Boolean{ return (!(isNaN(this.pauseTime))); } public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4)); } public function killProperties(_arg1:Array):void{ var _local3:int; var _local2:Object = {}; _local3 = (_arg1.length - 1); while (_local3 > -1) { _local2[_arg1[_local3]] = true; _local3--; }; killVars(_local2); } public function hasEventListener(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.hasEventListener(_arg1)); } public function pause():void{ if (isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.enabled = false; _pausedTweens[this] = this; }; } override public function complete(_arg1:Boolean=false):void{ if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){ _repeatCount++; if (!isNaN(this.vars.yoyo)){ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; }; this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime; this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); } else { if (this.vars.persist == true){ pause(); }; }; super.complete(_arg1); } public function set timeScale(_arg1:Number):void{ if (_arg1 < 1E-5){ _arg1 = (_timeScale = 1E-5); } else { _timeScale = _arg1; _arg1 = (_arg1 * _globalTimeScale); }; this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1))); if (this.startTime != 999999999999999){ this.startTime = (this.initTime + (this.delay * (1000 / _arg1))); }; this.combinedTimeScale = _arg1; } public function invalidate(_arg1:Boolean=true):void{ var _local2:Number; if (this.initted){ _local2 = this.progress; if (((!(_arg1)) && (!((_local2 == 0))))){ this.progress = 0; }; this.tweens = []; _hasPlugins = false; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; initTweenVals(); _timeScale = ((this.vars.timeScale) || (1)); this.combinedTimeScale = (_timeScale * _globalTimeScale); this.delay = ((this.vars.delay) || (0)); if (isNaN(this.pauseTime)){ this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale)); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ if (_dispatcher != null){ this.vars.onStart = _callbacks.onStart; this.vars.onUpdate = _callbacks.onUpdate; this.vars.onComplete = _callbacks.onComplete; _dispatcher = null; }; initDispatcher(); }; if (_local2 != 0){ if (_arg1){ adjustStartValues(); } else { this.progress = _local2; }; }; }; } public function get timeScale():Number{ return (_timeScale); } protected function onCompleteDispatcher(... _args):void{ if (_callbacks.onComplete != null){ _callbacks.onComplete.apply(null, this.vars.onCompleteParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } public static function set globalTimeScale(_arg1:Number):void{ setGlobalTimeScale(_arg1); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function setGlobalTimeScale(_arg1:Number):void{ var _local3:int; var _local4:Array; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; var _local2:Dictionary = masterList; _globalTimeScale = _arg1; for each (_local4 in _local2) { _local3 = (_local4.length - 1); while (_local3 > -1) { if ((_local4[_local3] is TweenMax)){ _local4[_local3].timeScale = (_local4[_local3].timeScale * 1); }; _local3--; }; }; } public static function get globalTimeScale():Number{ return (_globalTimeScale); } public static function getTweensOf(_arg1:Object):Array{ var _local4:TweenLite; var _local5:int; var _local2:Array = masterList[_arg1]; var _local3:Array = []; if (_local2 != null){ _local5 = (_local2.length - 1); while (_local5 > -1) { if (!_local2[_local5].gc){ _local3[_local3.length] = _local2[_local5]; }; _local5--; }; }; for each (_local4 in _pausedTweens) { if (_local4.target == _arg1){ _local3[_local3.length] = _local4; }; }; return (_local3); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array = getTweensOf(_arg1); var _local3:int = (_local2.length - 1); while (_local3 > -1) { if (((_local2[_local3].active) && (!(_local2[_local3].gc)))){ return (true); }; _local3--; }; return (false); } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local5:Boolean; var _local4:Array = getAllTweens(); var _local6:int = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){ _local4[_local6].paused = _arg1; }; _local6--; }; } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local5:Boolean; var _local6:int; var _local4:Array = getAllTweens(); _local6 = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); _local4[_local6].clear(); } else { TweenLite.removeTween(_local4[_local6], true); }; }; _local6--; }; } public static function getAllTweens():Array{ var _local3:Array; var _local4:int; var _local5:TweenLite; var _local1:Dictionary = masterList; var _local2:Array = []; for each (_local3 in _local1) { _local4 = (_local3.length - 1); while (_local4 > -1) { if (!_local3[_local4].gc){ _local2[_local2.length] = _local3[_local4]; }; _local4--; }; }; for each (_local5 in _pausedTweens) { _local2[_local2.length] = _local5; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } } }//package gs
Section 28
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.9271"; } }//package mx.core
Section 29
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 30
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexLoader(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 31
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexMovieClip(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 32
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexShape(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 33
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.4.0.9271"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 34
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.4.0.9271"; private static var compatibilityVersionChanged:Boolean = false; private static var _compatibilityErrorFunction:Function; private static var _compatibilityVersion:uint = 50331648; private static var compatibilityVersionRead:Boolean = false; mx_internal static function changeCompatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); _compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function set compatibilityVersion(_arg1:uint):void{ var _local2:String; if (_arg1 == _compatibilityVersion){ return; }; if (compatibilityVersionChanged){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET); }; if (compatibilityVersionRead){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ); }; _compatibilityVersion = _arg1; compatibilityVersionChanged = true; } public static function get compatibilityVersion():uint{ compatibilityVersionRead = true; return (_compatibilityVersion); } public static function set compatibilityErrorFunction(_arg1:Function):void{ _compatibilityErrorFunction = _arg1; } public static function set compatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function get compatibilityErrorFunction():Function{ return (_compatibilityErrorFunction); } public static function get compatibilityVersionString():String{ var _local1:uint = ((compatibilityVersion >> 24) & 0xFF); var _local2:uint = ((compatibilityVersion >> 16) & 0xFF); var _local3:uint = (compatibilityVersion & 0xFFFF); return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString())); } } }//package mx.core
Section 35
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.9271"; } }//package mx.core
Section 36
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 37
//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 38
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function removeChild(_arg1:DisplayObject):DisplayObject; function getChildByName(_arg1:String):DisplayObject; function removeChildAt(_arg1:int):DisplayObject; function getChildIndex(_arg1:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(_arg1:Point):Array; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function getChildAt(_arg1:int):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function contains(_arg1:DisplayObject):Boolean; } }//package mx.core
Section 39
//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; import flash.media.*; import flash.text.*; public interface IContainer extends IUIComponent { function set hitArea(_arg1:Sprite):void; function swapChildrenAt(_arg1:int, _arg2:int):void; function getChildByName(_arg1:String):DisplayObject; function get doubleClickEnabled():Boolean; function get graphics():Graphics; function get useHandCursor():Boolean; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function set mouseChildren(_arg1:Boolean):void; function set creatingContentPane(_arg1:Boolean):void; function get textSnapshot():TextSnapshot; function getChildIndex(_arg1:DisplayObject):int; function set doubleClickEnabled(_arg1:Boolean):void; function getObjectsUnderPoint(_arg1:Point):Array; function get creatingContentPane():Boolean; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function get soundTransform():SoundTransform; function set useHandCursor(_arg1:Boolean):void; function get numChildren():int; function contains(_arg1:DisplayObject):Boolean; function get verticalScrollPosition():Number; function set defaultButton(_arg1:IFlexDisplayObject):void; function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void; function set horizontalScrollPosition(_arg1:Number):void; function get focusManager():IFocusManager; function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void; function set mouseEnabled(_arg1:Boolean):void; function getChildAt(_arg1:int):DisplayObject; function set soundTransform(_arg1:SoundTransform):void; function get tabChildren():Boolean; function get tabIndex():int; function set focusRect(_arg1:Object):void; function get hitArea():Sprite; function get mouseChildren():Boolean; function removeChildAt(_arg1:int):DisplayObject; function get defaultButton():IFlexDisplayObject; function stopDrag():void; function set tabEnabled(_arg1:Boolean):void; function get horizontalScrollPosition():Number; function get focusRect():Object; function get viewMetrics():EdgeMetrics; function set verticalScrollPosition(_arg1:Number):void; function get dropTarget():DisplayObject; function get mouseEnabled():Boolean; function set tabChildren(_arg1:Boolean):void; function set buttonMode(_arg1:Boolean):void; function get tabEnabled():Boolean; function get buttonMode():Boolean; function removeChild(_arg1:DisplayObject):DisplayObject; function set tabIndex(_arg1:int):void; function addChild(_arg1:DisplayObject):DisplayObject; function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean; } }//package mx.core
Section 40
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 41
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 42
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { import flash.utils.*; public interface IFlexModuleFactory { function get preloadedRSLs():Dictionary; function allowInsecureDomain(... _args):void; function create(... _args):Object; function allowDomain(... _args):void; function info():Object; } }//package mx.core
Section 43
//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 44
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 45
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 46
//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 47
//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 48
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup) package mx.core { import flash.events.*; public interface ISWFBridgeGroup { function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider; function removeChildBridge(_arg1:IEventDispatcher):void; function get parentBridge():IEventDispatcher; function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void; function set parentBridge(_arg1:IEventDispatcher):void; function containsBridge(_arg1:IEventDispatcher):Boolean; function getChildBridges():Array; } }//package mx.core
Section 49
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider) package mx.core { import flash.events.*; public interface ISWFBridgeProvider { function get childAllowsParent():Boolean; function get swfBridge():IEventDispatcher; function get parentAllowsChild():Boolean; } }//package mx.core
Section 50
//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 51
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function MovieClipAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 52
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function MovieClipLoaderAsset(){ var _local1:LoaderContext = new LoaderContext(); _local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in _local1)){ _local1["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, _local1); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(_arg1:Number):void{ if (!initialized){ requestedWidth = _arg1; } else { loader.width = _arg1; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(_arg1:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(_arg1); } override public function set height(_arg1:Number):void{ if (!initialized){ requestedHeight = _arg1; } else { loader.height = _arg1; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 53
//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 54
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.4.0.9271"; private static var classMap:Object = {}; public static function registerClass(_arg1:String, _arg2:Class):void{ var _local3:Class = classMap[_arg1]; if (!_local3){ classMap[_arg1] = _arg2; }; } public static function getClass(_arg1:String):Class{ return (classMap[_arg1]); } public static function getInstance(_arg1:String):Object{ var _local2:Class = classMap[_arg1]; if (!_local2){ throw (new Error((("No class registered for interface '" + _arg1) + "'."))); }; return (_local2["getInstance"]()); } } }//package mx.core
Section 55
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.9271"; } }//package mx.core
Section 56
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 57
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; private static var _catchCallLaterExceptions:Boolean = false; public static function set catchCallLaterExceptions(_arg1:Boolean):void{ _catchCallLaterExceptions = _arg1; } public static function get designMode():Boolean{ return (designTime); } public static function set designMode(_arg1:Boolean):void{ designTime = _arg1; } public static function get catchCallLaterExceptions():Boolean{ return (_catchCallLaterExceptions); } } }//package mx.core
Section 58
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; private var _module:IModuleInfo; public static const READY:String = "ready"; public static const ERROR:String = "error"; public static const PROGRESS:String = "progress"; mx_internal static const VERSION:String = "3.4.0.9271"; public static const SETUP:String = "setup"; public static const UNLOAD:String = "unload"; public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; this._module = _arg7; } public function get module():IModuleInfo{ if (_module){ return (_module); }; return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module)); } } }//package mx.events
Section 59
//ResourceEvent (mx.events.ResourceEvent) package mx.events { import flash.events.*; public class ResourceEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.4.0.9271"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 60
//StyleEvent (mx.events.StyleEvent) package mx.events { import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "3.4.0.9271"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 61
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import mx.core.*; import flash.display.*; import flash.geom.*; import flash.filters.*; import mx.utils.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _trRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "3.4.0.9271"; public function get blRadius():Number{ return (_blRadius); } public function set brRadius(_arg1:Number):void{ if (_brRadius != _arg1){ _brRadius = _arg1; changed = true; }; } public function set color(_arg1:int):void{ if (_color != _arg1){ _color = _arg1; changed = true; }; } public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; if (changed){ createShadowBitmaps(); changed = false; }; _arg4 = Math.ceil(_arg4); _arg5 = Math.ceil(_arg5); var _local6:int = (leftShadow) ? leftShadow.width : 0; var _local7:int = (rightShadow) ? rightShadow.width : 0; var _local8:int = (topShadow) ? topShadow.height : 0; var _local9:int = (bottomShadow) ? bottomShadow.height : 0; var _local10:int = (_local6 + _local7); var _local11:int = (_local8 + _local9); var _local12:Number = ((_arg5 + _local11) / 2); var _local13:Number = ((_arg4 + _local10) / 2); var _local14:Matrix = new Matrix(); if (((leftShadow) || (topShadow))){ _local15 = Math.min((tlRadius + _local10), _local13); _local16 = Math.min((tlRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16); _arg1.endFill(); }; if (((rightShadow) || (topShadow))){ _local17 = Math.min((trRadius + _local10), _local13); _local18 = Math.min((trRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18); _arg1.endFill(); }; if (((leftShadow) || (bottomShadow))){ _local19 = Math.min((blRadius + _local10), _local13); _local20 = Math.min((blRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20); _arg1.endFill(); }; if (((rightShadow) || (bottomShadow))){ _local21 = Math.min((brRadius + _local10), _local13); _local22 = Math.min((brRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22); _arg1.endFill(); }; if (leftShadow){ _local14.tx = (_arg2 - _local6); _local14.ty = 0; _arg1.beginBitmapFill(leftShadow, _local14); _arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20)); _arg1.endFill(); }; if (rightShadow){ _local14.tx = (_arg2 + _arg4); _local14.ty = 0; _arg1.beginBitmapFill(rightShadow, _local14); _arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22)); _arg1.endFill(); }; if (topShadow){ _local14.tx = 0; _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(topShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8); _arg1.endFill(); }; if (bottomShadow){ _local14.tx = 0; _local14.ty = (_arg3 + _arg5); _arg1.beginBitmapFill(bottomShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9); _arg1.endFill(); }; } public function get brRadius():Number{ return (_brRadius); } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((_local1 < 0)) || ((_local2 < 0)))){ return; }; var _local3:Shape = new FlexShape(); var _local4:Graphics = _local3.graphics; _local4.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius); _local4.endFill(); var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0); _local5.draw(_local3, new Matrix()); var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha); _local6.knockout = true; var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2); var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6); var _local9:Number = (_local7.left - _local8.left); var _local10:Number = (_local8.right - _local7.right); var _local11:Number = (_local7.top - _local8.top); var _local12:Number = (_local8.bottom - _local7.bottom); shadow = new BitmapData(_local8.width, _local8.height); shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6); var _local13:Point = new Point(0, 0); var _local14:Rectangle = new Rectangle(); if (_local9 > 0){ _local14.x = 0; _local14.y = ((tlRadius + _local11) + _local12); _local14.width = _local9; _local14.height = 1; leftShadow = new BitmapData(_local9, 1); leftShadow.copyPixels(shadow, _local14, _local13); } else { leftShadow = null; }; if (_local10 > 0){ _local14.x = (shadow.width - _local10); _local14.y = ((trRadius + _local11) + _local12); _local14.width = _local10; _local14.height = 1; rightShadow = new BitmapData(_local10, 1); rightShadow.copyPixels(shadow, _local14, _local13); } else { rightShadow = null; }; if (_local11 > 0){ _local14.x = ((tlRadius + _local9) + _local10); _local14.y = 0; _local14.width = 1; _local14.height = _local11; topShadow = new BitmapData(1, _local11); topShadow.copyPixels(shadow, _local14, _local13); } else { topShadow = null; }; if (_local12 > 0){ _local14.x = ((blRadius + _local9) + _local10); _local14.y = (shadow.height - _local12); _local14.width = 1; _local14.height = _local12; bottomShadow = new BitmapData(1, _local12); bottomShadow.copyPixels(shadow, _local14, _local13); } else { bottomShadow = null; }; } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(_arg1:Number):void{ if (_angle != _arg1){ _angle = _arg1; changed = true; }; } public function set trRadius(_arg1:Number):void{ if (_trRadius != _arg1){ _trRadius = _arg1; changed = true; }; } public function set tlRadius(_arg1:Number):void{ if (_tlRadius != _arg1){ _tlRadius = _arg1; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(_arg1:Number):void{ if (_distance != _arg1){ _distance = _arg1; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(_arg1:Number):void{ if (_alpha != _arg1){ _alpha = _arg1; changed = true; }; } public function set blRadius(_arg1:Number):void{ if (_blRadius != _arg1){ _blRadius = _arg1; changed = true; }; } } }//package mx.graphics
Section 62
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function set defaultButton(_arg1:IButton):void; function set focusPane(_arg1:Sprite):void; function set showFocusIndicator(_arg1:Boolean):void; function moveFocus(_arg1:String, _arg2:DisplayObject=null):void; function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function removeSWFBridge(_arg1:IEventDispatcher):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent; function get nextTabIndex():int; function get defaultButton():IButton; function get showFocusIndicator():Boolean; function setFocus(_arg1:IFocusManagerComponent):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 63
//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 64
//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 65
//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 66
//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 67
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function set focusPane(_arg1:Sprite):void; function get toolTipChildren():IChildList; function useSWFBridge():Boolean; function isFontFaceEmbedded(_arg1:TextFormat):Boolean; function deployMouseShields(_arg1:Boolean):void; function get rawChildren():IChildList; function get topLevelSystemManager():ISystemManager; function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void; function getSandboxRoot():DisplayObject; function get swfBridgeGroup():ISWFBridgeGroup; function removeFocusManager(_arg1:IFocusManagerContainer):void; function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function get document():Object; function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void; function getTopLevelRoot():DisplayObject; function removeChildBridge(_arg1:IEventDispatcher):void; function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean; function get popUpChildren():IChildList; function get screen():Rectangle; function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void; function getDefinitionByName(_arg1:String):Object; function activate(_arg1:IFocusManagerContainer):void; function deactivate(_arg1:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(_arg1:Object):void; function get embeddedFontList():Object; function set numModalWindows(_arg1:int):void; function isTopLevel():Boolean; function isTopLevelRoot():Boolean; function get numModalWindows():int; function addFocusManager(_arg1:IFocusManagerContainer):void; function get stage():Stage; function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle; } }//package mx.managers
Section 68
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var changingListenersInOtherSystemManagers:Boolean; public static var bootstrapLoaderInfoURL:String; public static var showMouseCursor:Boolean; public static var dispatchingEventToOtherSystemManagers:Boolean; } }//package mx.managers
Section 69
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void; function release():void; function get error():Boolean; function get data():Object; function publish(_arg1:IFlexModuleFactory):void; function get factory():IFlexModuleFactory; function set data(_arg1:Object):void; function get url():String; function get setup():Boolean; function unload():void; } }//package mx.modules
Section 70
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.4.0.9271"; public static function getModule(_arg1:String):IModuleInfo{ return (getSingleton().getModule(_arg1)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(_arg1)); } } }//package mx.modules import mx.core.*; import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import mx.events.*; import flash.net.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(_arg1:ModuleInfo){ this.info = _arg1; _arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true); } public function get loaded():Boolean{ return (info.loaded); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get error():Boolean{ return (info.error); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function publish(_arg1:IFlexModuleFactory):void{ info.publish(_arg1); } public function set data(_arg1:Object):void{ _data = _arg1; } public function get ready():Boolean{ return (info.ready); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{ var _local4:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ _local4 = new ModuleEvent(ModuleEvent.PROGRESS); _local4.bytesLoaded = info.size; _local4.bytesTotal = info.size; dispatchEvent(_local4); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(_arg1, _arg2, _arg3); }; }; } private function moduleEventHandler(_arg1:ModuleEvent):void{ dispatchEvent(_arg1); } public function get url():String{ return (info.url); } public function get data():Object{ return (_data); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(_arg1:String):IModuleInfo{ var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo); if (!_local2){ _local2 = new ModuleInfo(_arg1); moduleList[_arg1] = _local2; }; return (new ModuleInfoProxy(_local2)); } public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = _arg1; var className:String = getQualifiedClassName(object); for each (m in moduleList) { info = (m as ModuleInfo); if (!info.ready){ } else { domain = info.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; } catch(error:Error) { }; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var _setup:Boolean;// = false private function ModuleInfo(_arg1:String){ _url = _arg1; } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; try { if (loader.content){ loader.content.removeEventListener("ready", readyHandler); loader.content.removeEventListener("error", moduleErrorHandler); }; } catch(error:Error) { }; if (_loaded){ try { loader.close(); } catch(error:Error) { }; }; try { loader.unload(); } catch(error:Error) { }; loader = null; }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function completeHandler(_arg1:Event):void{ var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; _local2.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(_local2); } public function publish(_arg1:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = _arg1; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(_arg1:Event):void{ var moduleEvent:ModuleEvent; var event = _arg1; factoryInfo = new FactoryInfo(); try { factoryInfo.factory = (loader.content as IFlexModuleFactory); } catch(error:Error) { }; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); loader.content.addEventListener("error", moduleErrorHandler); try { factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; } catch(error:Error) { }; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var _local1:Object; if (((!(factoryInfo)) && (limbo))){ for (_local1 in limbo) { factoryInfo = (_local1 as FactoryInfo); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(_arg1:ErrorEvent):void{ _error = true; var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = 0; _local2.bytesTotal = 0; _local2.errorText = _arg1.text; dispatchEvent(_local2); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{ var _local3:LoaderContext = new LoaderContext(); _local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in _local3)){ _local3["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.loadBytes(_arg2, _local3); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function progressHandler(_arg1:ProgressEvent):void{ var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{ if (_loaded){ return; }; _loaded = true; limbo = null; if (_arg3){ loadBytes(_arg1, _arg3); return; }; if (_url.indexOf("published://") == 0){ return; }; var _local4:URLRequest = new URLRequest(_url); var _local5:LoaderContext = new LoaderContext(); _local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); _local5.securityDomain = _arg2; if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){ _local5.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(_local4, _local5); } public function get url():String{ return (_url); } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function moduleErrorHandler(_arg1:Event):void{ var _local2:ModuleEvent; _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); if ((_arg1 is ModuleEvent)){ _local2 = ModuleEvent(_arg1); } else { _local2 = new ModuleEvent(ModuleEvent.ERROR); }; dispatchEvent(_local2); } public function readyHandler(_arg1:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY); _local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; _local2.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(_local2); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ } }
Section 71
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; } }//package mx.modules
Section 72
//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 73
//IResourceManager (mx.resources.IResourceManager) package mx.resources { import flash.events.*; import flash.system.*; public interface IResourceManager extends IEventDispatcher { function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher; function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean; function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class; function getLocales():Array; function removeResourceBundlesForLocale(_arg1:String):void; function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle; function get localeChain():Array; function getInt(_arg1:String, _arg2:String, _arg3:String=null):int; function update():void; function set localeChain(_arg1:Array):void; function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint; function addResourceBundle(_arg1:IResourceBundle):void; function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array; function getBundleNamesForLocale(_arg1:String):Array; function removeResourceBundle(_arg1:String, _arg2:String):void; function getObject(_arg1:String, _arg2:String, _arg3:String=null); function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String; function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void; function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void; function getPreferredLocaleChain():Array; function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle; function initializeLocaleChain(_arg1:Array):void; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resources
Section 74
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 75
//LocaleSorter (mx.resources.LocaleSorter) package mx.resources { public class LocaleSorter { mx_internal static const VERSION:String = "3.4.0.9271"; private static function normalizeLocale(_arg1:String):String{ return (_arg1.toLowerCase().replace(/-/g, "_")); } public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{ var result:Array; var hasLocale:Object; var i:int; var j:int; var k:int; var l:int; var locale:String; var plocale:LocaleID; var appLocales = _arg1; var systemPreferences = _arg2; var ultimateFallbackLocale = _arg3; var addAll = _arg4; var promote:Function = function (_arg1:String):void{ if (typeof(hasLocale[_arg1]) != "undefined"){ result.push(appLocales[hasLocale[_arg1]]); delete hasLocale[_arg1]; }; }; result = []; hasLocale = {}; var locales:Array = trimAndNormalize(appLocales); var preferenceLocales:Array = trimAndNormalize(systemPreferences); addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale); j = 0; while (j < locales.length) { hasLocale[locales[j]] = j; j = (j + 1); }; i = 0; l = preferenceLocales.length; while (i < l) { plocale = LocaleID.fromString(preferenceLocales[i]); promote(preferenceLocales[i]); promote(plocale.toString()); while (plocale.transformToParent()) { promote(plocale.toString()); }; plocale = LocaleID.fromString(preferenceLocales[i]); j = 0; while (j < l) { locale = preferenceLocales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; j = 0; k = locales.length; while (j < k) { locale = locales[j]; if (plocale.isSiblingOf(LocaleID.fromString(locale))){ promote(locale); }; j = (j + 1); }; i = (i + 1); }; if (addAll){ j = 0; k = locales.length; while (j < k) { promote(locales[j]); j = (j + 1); }; }; return (result); } private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{ var _local3:String; if (((!((_arg2 == null))) && (!((_arg2 == ""))))){ _local3 = normalizeLocale(_arg2); if (_arg1.indexOf(_local3) == -1){ _arg1.push(_local3); }; }; } private static function trimAndNormalize(_arg1:Array):Array{ var _local2:Array = []; var _local3:int; while (_local3 < _arg1.length) { _local2.push(normalizeLocale(_arg1[_local3])); _local3++; }; return (_local2); } } }//package mx.resources class LocaleID { private var privateLangs:Boolean;// = false private var script:String;// = "" private var variants:Array; private var privates:Array; private var extensions:Object; private var lang:String;// = "" private var region:String;// = "" private var extended_langs:Array; public static const STATE_PRIMARY_LANGUAGE:int = 0; public static const STATE_REGION:int = 3; public static const STATE_EXTENDED_LANGUAGES:int = 1; public static const STATE_EXTENSIONS:int = 5; public static const STATE_SCRIPT:int = 2; public static const STATE_VARIANTS:int = 4; public static const STATE_PRIVATES:int = 6; private function LocaleID(){ extended_langs = []; variants = []; extensions = {}; privates = []; super(); } public function equals(_arg1:LocaleID):Boolean{ return ((toString() == _arg1.toString())); } public function canonicalize():void{ var _local1:String; for (_local1 in extensions) { if (extensions.hasOwnProperty(_local1)){ if (extensions[_local1].length == 0){ delete extensions[_local1]; } else { extensions[_local1] = extensions[_local1].sort(); }; }; }; extended_langs = extended_langs.sort(); variants = variants.sort(); privates = privates.sort(); if (script == ""){ script = LocaleRegistry.getScriptByLang(lang); }; if ((((script == "")) && (!((region == ""))))){ script = LocaleRegistry.getScriptByLangAndRegion(lang, region); }; if ((((region == "")) && (!((script == ""))))){ region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); }; } public function toString():String{ var _local2:String; var _local1:Array = [lang]; Array.prototype.push.apply(_local1, extended_langs); if (script != ""){ _local1.push(script); }; if (region != ""){ _local1.push(region); }; Array.prototype.push.apply(_local1, variants); for (_local2 in extensions) { if (extensions.hasOwnProperty(_local2)){ _local1.push(_local2); Array.prototype.push.apply(_local1, extensions[_local2]); }; }; if (privates.length > 0){ _local1.push("x"); Array.prototype.push.apply(_local1, privates); }; return (_local1.join("_")); } public function isSiblingOf(_arg1:LocaleID):Boolean{ return ((((lang == _arg1.lang)) && ((script == _arg1.script)))); } public function transformToParent():Boolean{ var _local2:String; var _local3:Array; var _local4:String; if (privates.length > 0){ privates.splice((privates.length - 1), 1); return (true); }; var _local1:String; for (_local2 in extensions) { if (extensions.hasOwnProperty(_local2)){ _local1 = _local2; }; }; if (_local1){ _local3 = extensions[_local1]; if (_local3.length == 1){ delete extensions[_local1]; return (true); }; _local3.splice((_local3.length - 1), 1); return (true); }; if (variants.length > 0){ variants.splice((variants.length - 1), 1); return (true); }; if (script != ""){ if (LocaleRegistry.getScriptByLang(lang) != ""){ script = ""; return (true); }; if (region == ""){ _local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script); if (_local4 != ""){ region = _local4; script = ""; return (true); }; }; }; if (region != ""){ if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){ region = ""; return (true); }; }; if (extended_langs.length > 0){ extended_langs.splice((extended_langs.length - 1), 1); return (true); }; return (false); } public static function fromString(_arg1:String):LocaleID{ var _local5:Array; var _local8:String; var _local9:int; var _local10:String; var _local2:LocaleID = new (LocaleID); var _local3:int = STATE_PRIMARY_LANGUAGE; var _local4:Array = _arg1.replace(/-/g, "_").split("_"); var _local6:int; var _local7:int = _local4.length; while (_local6 < _local7) { _local8 = _local4[_local6].toLowerCase(); if (_local3 == STATE_PRIMARY_LANGUAGE){ if (_local8 == "x"){ _local2.privateLangs = true; } else { if (_local8 == "i"){ _local2.lang = (_local2.lang + "i-"); } else { _local2.lang = (_local2.lang + _local8); _local3 = STATE_EXTENDED_LANGUAGES; }; }; } else { _local9 = _local8.length; if (_local9 == 0){ } else { _local10 = _local8.charAt(0).toLowerCase(); if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){ _local2.extended_langs.push(_local8); if (_local2.extended_langs.length == 3){ _local3 = STATE_SCRIPT; }; } else { if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){ _local2.script = _local8; _local3 = STATE_REGION; } else { if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){ _local2.region = _local8; _local3 = STATE_VARIANTS; } else { if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){ _local2.variants.push(_local8); _local3 = STATE_VARIANTS; } else { if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){ if (_local8 == "x"){ _local3 = STATE_PRIVATES; _local5 = _local2.privates; } else { _local3 = STATE_EXTENSIONS; _local5 = ((_local2.extensions[_local8]) || ([])); _local2.extensions[_local8] = _local5; }; } else { if (_local3 >= STATE_EXTENSIONS){ _local5.push(_local8); }; }; }; }; }; }; }; }; _local6++; }; _local2.canonicalize(); return (_local2); } } class LocaleRegistry { private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28}; private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"]; private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}}; private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32}; private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}}; private function LocaleRegistry(){ } public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{ var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1]; if (_local3 == null){ return (""); }; var _local4:Object = _local3[_arg2]; if (_local4 == null){ return (""); }; return (SCRIPTS[int(_local4)].toLowerCase()); } public static function getScriptByLang(_arg1:String):String{ var _local2:Object = SCRIPT_ID_BY_LANG[_arg1]; if (_local2 == null){ return (""); }; return (SCRIPTS[int(_local2)].toLowerCase()); } public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{ var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1]; var _local4:Object = SCRIPT_BY_ID[_arg2]; if ((((_local3 == null)) || ((_local4 == null)))){ return (""); }; return (((_local3[int(_local4)]) || (""))); } }
Section 76
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle implements IResourceBundle { mx_internal var _locale:String; private var _content:Object; mx_internal var _bundleName:String; mx_internal static const VERSION:String = "3.4.0.9271"; mx_internal static var backupApplicationDomain:ApplicationDomain; mx_internal static var locale:String; public function ResourceBundle(_arg1:String=null, _arg2:String=null){ _content = {}; super(); mx_internal::_locale = _arg1; mx_internal::_bundleName = _arg2; _content = getContent(); } protected function getContent():Object{ return ({}); } public function getString(_arg1:String):String{ return (String(_getObject(_arg1))); } public function get content():Object{ return (_content); } public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{ var _local3:String = _getObject(_arg1).toLowerCase(); if (_local3 == "false"){ return (false); }; if (_local3 == "true"){ return (true); }; return (_arg2); } public function getStringArray(_arg1:String):Array{ var _local2:Array = _getObject(_arg1).split(","); var _local3:int = _local2.length; var _local4:int; while (_local4 < _local3) { _local2[_local4] = StringUtil.trim(_local2[_local4]); _local4++; }; return (_local2); } public function getObject(_arg1:String):Object{ return (_getObject(_arg1)); } private function _getObject(_arg1:String):Object{ var _local2:Object = content[_arg1]; if (!_local2){ throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName))); }; return (_local2); } public function get locale():String{ return (mx_internal::_locale); } public function get bundleName():String{ return (mx_internal::_bundleName); } public function getNumber(_arg1:String):Number{ return (Number(_getObject(_arg1))); } private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{ var _local3:Class; if (_arg2.hasDefinition(_arg1)){ _local3 = (_arg2.getDefinition(_arg1) as Class); }; return (_local3); } public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{ var _local3:String; var _local4:Class; var _local5:Object; var _local6:ResourceBundle; if (!_arg2){ _arg2 = ApplicationDomain.currentDomain; }; _local3 = (((mx_internal::locale + "$") + _arg1) + "_properties"); _local4 = getClassByName(_local3, _arg2); if (!_local4){ _local3 = (_arg1 + "_properties"); _local4 = getClassByName(_local3, _arg2); }; if (!_local4){ _local3 = _arg1; _local4 = getClassByName(_local3, _arg2); }; if (((!(_local4)) && (mx_internal::backupApplicationDomain))){ _local3 = (_arg1 + "_properties"); _local4 = getClassByName(_local3, mx_internal::backupApplicationDomain); if (!_local4){ _local3 = _arg1; _local4 = getClassByName(_local3, mx_internal::backupApplicationDomain); }; }; if (_local4){ _local5 = new (_local4); if ((_local5 is ResourceBundle)){ _local6 = ResourceBundle(_local5); return (_local6); }; }; throw (new Error(("Could not find resource bundle " + _arg1))); } } }//package mx.resources
Section 77
//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.4.0.9271"; private static var implClassDependency:ResourceManagerImpl; private static var instance:IResourceManager; public static function getInstance():IResourceManager{ if (!instance){ try { instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager")); } catch(e:Error) { instance = new ResourceManagerImpl(); }; }; return (instance); } } }//package mx.resources
Section 78
//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.utils.*; public class ResourceManagerImpl extends EventDispatcher implements IResourceManager { private var resourceModules:Object; private var initializedForNonFrameworkApp:Boolean;// = false private var localeMap:Object; private var _localeChain:Array; mx_internal static const VERSION:String = "3.4.0.9271"; private static var instance:IResourceManager; public function ResourceManagerImpl(){ localeMap = {}; resourceModules = {}; super(); } public function get localeChain():Array{ return (_localeChain); } public function set localeChain(_arg1:Array):void{ _localeChain = _arg1; update(); } public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (null); }; var _local5:* = _local4.content[_arg2]; var _local6:Array = String(_local5).split(","); var _local7:int = _local6.length; var _local8:int; while (_local8 < _local7) { _local6[_local8] = StringUtil.trim(_local6[_local8]); _local8++; }; return (_local6); } mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{ var _local4:String; var _local5:String = _arg3; var _local6:int = _arg3.indexOf(":"); if (_local6 != -1){ _local4 = _arg3.substring(0, _local6); _local5 = _arg3.substring((_local6 + 1)); }; if (getResourceBundle(_arg2, _arg3)){ return; }; var _local7 = (((_arg2 + "$") + _local5) + "_properties"); if (_local4 != null){ _local7 = ((_local4 + ".") + _local7); }; var _local8:Class; if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; if (!_local8){ _local7 = _arg3; if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; }; if (!_local8){ _local7 = (_arg3 + "_properties"); if (_arg1.hasDefinition(_local7)){ _local8 = Class(_arg1.getDefinition(_local7)); }; }; if (!_local8){ throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'."))); }; var _local9:ResourceBundle = ResourceBundle(new (_local8)); _local9.mx_internal::_locale = _arg2; _local9.mx_internal::_bundleName = _arg3; addResourceBundle(_local9); } public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{ var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4); if (!_local5){ return (null); }; var _local6:String = String(_local5.content[_arg2]); if (_arg3){ _local6 = StringUtil.substitute(_local6, _arg3); }; return (_local6); } public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{ var moduleInfo:IModuleInfo; var resourceEventDispatcher:ResourceEventDispatcher; var timer:Timer; var timerHandler:Function; var url = _arg1; var updateFlag = _arg2; var applicationDomain = _arg3; var securityDomain = _arg4; moduleInfo = ModuleManager.getModule(url); resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo); var readyHandler:Function = function (_arg1:ModuleEvent):void{ var _local2:* = _arg1.module.factory.create(); resourceModules[_arg1.module.url].resourceModule = _local2; if (updateFlag){ update(); }; }; moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); var errorHandler:Function = function (_arg1:ModuleEvent):void{ var _local3:ResourceEvent; var _local2:String = ("Unable to load resource module from " + url); if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){ _local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; resourceEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); moduleInfo.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (resourceEventDispatcher); } public function getLocales():Array{ var _local2:String; var _local1:Array = []; for (_local2 in localeMap) { _local1.push(_local2); }; return (_local1); } public function removeResourceBundlesForLocale(_arg1:String):void{ delete localeMap[_arg1]; } public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{ var _local3:Object = localeMap[_arg1]; if (!_local3){ return (null); }; return (_local3[_arg2]); } private function dumpResourceModule(_arg1):void{ var _local2:ResourceBundle; var _local3:String; for each (_local2 in _arg1.resourceBundles) { trace(_local2.locale, _local2.bundleName); for (_local3 in _local2.content) { }; }; } public function addResourceBundle(_arg1:IResourceBundle):void{ var _local2:String = _arg1.locale; var _local3:String = _arg1.bundleName; if (!localeMap[_local2]){ localeMap[_local2] = {}; }; localeMap[_local2][_local3] = _arg1; } public function getObject(_arg1:String, _arg2:String, _arg3:String=null){ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (undefined); }; return (_local4.content[_arg2]); } public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (0); }; var _local5:* = _local4.content[_arg2]; return (int(_local5)); } private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{ supportNonFrameworkApps(); return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2)); } private function supportNonFrameworkApps():void{ if (initializedForNonFrameworkApp){ return; }; initializedForNonFrameworkApp = true; if (getLocales().length > 0){ return; }; var _local1:ApplicationDomain = ApplicationDomain.currentDomain; if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){ return; }; var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo")); var _local3:Array = _local2.compiledLocales; var _local4:Array = _local2.compiledResourceBundleNames; installCompiledResourceBundles(_local1, _local3, _local4); localeChain = _local3; } public function getBundleNamesForLocale(_arg1:String):Array{ var _local3:String; var _local2:Array = []; for (_local3 in localeMap[_arg1]) { _local2.push(_local3); }; return (_local2); } public function getPreferredLocaleChain():Array{ return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true)); } public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (NaN); }; var _local5:* = _local4.content[_arg2]; return (Number(_local5)); } public function update():void{ dispatchEvent(new Event(Event.CHANGE)); } public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (null); }; var _local5:* = _local4.content[_arg2]; return ((_local5 as Class)); } public function removeResourceBundle(_arg1:String, _arg2:String):void{ delete localeMap[_arg1][_arg2]; if (getBundleNamesForLocale(_arg1).length == 0){ delete localeMap[_arg1]; }; } public function initializeLocaleChain(_arg1:Array):void{ localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true); } public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{ var _local5:String; var _local6:Object; var _local7:ResourceBundle; if (!_localeChain){ return (null); }; var _local3:int = _localeChain.length; var _local4:int; while (_local4 < _local3) { _local5 = localeChain[_local4]; _local6 = localeMap[_local5]; if (!_local6){ } else { _local7 = _local6[_arg1]; if (!_local7){ } else { if ((_arg2 in _local7.content)){ return (_local7); }; }; }; _local4++; }; return (null); } public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (0); }; var _local5:* = _local4.content[_arg2]; return (uint(_local5)); } private function getSystemPreferredLocales():Array{ var _local1:Array; if (Capabilities["languages"]){ _local1 = Capabilities["languages"]; } else { _local1 = [Capabilities.language]; }; return (_local1); } public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{ var _local7:String; var _local8:int; var _local9:String; var _local4:int = (_arg2) ? _arg2.length : 0; var _local5:int = (_arg3) ? _arg3.length : 0; var _local6:int; while (_local6 < _local4) { _local7 = _arg2[_local6]; _local8 = 0; while (_local8 < _local5) { _local9 = _arg3[_local8]; mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9); _local8++; }; _local6++; }; } public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{ var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3); if (!_local4){ return (false); }; var _local5:* = _local4.content[_arg2]; return ((String(_local5).toLowerCase() == "true")); } public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{ var _local4:Array; var _local5:int; var _local6:int; var _local7:String; var _local8:String; var _local3:ResourceModuleInfo = resourceModules[_arg1]; if (!_local3){ return; }; if (_local3.resourceModule){ _local4 = _local3.resourceModule.resourceBundles; if (_local4){ _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local7 = _local4[_local6].locale; _local8 = _local4[_local6].bundleName; removeResourceBundle(_local7, _local8); _local6++; }; }; }; resourceModules[_arg1] = null; delete resourceModules[_arg1]; _local3.moduleInfo.unload(); if (_arg2){ this.update(); }; } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.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 79
//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.4.0.9271"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ BORDER_WIDTHS["default"] = 3; } override public function styleChanged(_arg1:String):void{ if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if (((isNaN(_arg1)) || (isNaN(_arg2)))){ return; }; super.updateDisplayList(_arg1, _arg2); backgroundColor = getBackgroundColor(); bRoundedCorners = false; backgroundAlphaName = "backgroundAlpha"; backgroundHole = null; radius = 0; radiusObj = null; drawBorder(_arg1, _arg2); drawBackground(_arg1, _arg2); } mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{ var _local5:Number; var _local6:uint; var _local7:uint; var _local8:String; var _local9:Number; var _local10:uint; var _local11:Boolean; var _local12:uint; var _local13:Array; var _local14:Array; var _local15:uint; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:Boolean; var _local20:Object; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Object; var _local27:Number; var _local28:Number; var _local29:IContainer; var _local30:EdgeMetrics; var _local31:Boolean; var _local32:Number; var _local33:Array; var _local34:uint; var _local35:Boolean; var _local36:Number; var _local3:String = getStyle("borderStyle"); var _local4:Array = getStyle("highlightAlphas"); var _local21:Boolean; var _local26:Graphics = graphics; _local26.clear(); if (_local3){ switch (_local3){ case "none": break; case "inset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, 25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25)); break; case "outset": _local7 = getStyle("borderColor"); _local22 = ColorUtil.adjustBrightness2(_local7, -40); _local23 = ColorUtil.adjustBrightness2(_local7, -25); _local24 = ColorUtil.adjustBrightness2(_local7, 40); _local25 = backgroundColor; if ((((_local25 === null)) || ((_local25 === "")))){ _local25 = _local7; }; draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25)); break; case "alert": case "default": if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local27 = getStyle("backgroundAlpha"); _local5 = getStyle("borderAlpha"); backgroundAlphaName = "borderAlpha"; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local28 = (bRoundedCorners) ? radius : 0; drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28); if (!bRoundedCorners){ radiusObj = {}; }; _local29 = (parent as IContainer); if (_local29){ _local30 = _local29.viewMetrics; backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0}; if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){ if (_local27 != _local5){ drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0); }; _local26.beginFill(Number(backgroundColor), _local27); _local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h); _local26.endFill(); }; }; backgroundColor = getStyle("borderColor"); }; break; case "dropdown": _local12 = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); if (!isNaN(_local12)){ drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); }; backgroundColor = null; break; case "menuBorder": _local7 = getStyle("borderColor"); drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1); drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((_arg1 == 0)) || ((_arg2 == 0)))){ backgroundColor = null; break; }; _local14 = getStyle("footerColors"); _local31 = !((_local14 == null)); _local32 = getStyle("borderAlpha"); if (_local31){ _local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32); _local26.moveTo(0, 0); _local26.lineTo(_arg1, 0); _local26.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ radius = IStyleClient(parent.parent).getStyle("cornerRadius"); _local32 = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(radius)){ radius = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ radius = 0; }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; }; backgroundColor = null; break; case "applicationControlBar": _local13 = getStyle("fillColors"); _local5 = getStyle("backgroundAlpha"); _local4 = getStyle("highlightAlphas"); _local33 = getStyle("fillAlphas"); _local11 = getStyle("docked"); _local34 = uint(backgroundColor); radius = getStyle("cornerRadius"); if (!radius){ radius = 0; }; drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius); if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1))); drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}}); backgroundColor = null; break; default: _local7 = getStyle("borderColor"); _local9 = getStyle("borderThickness"); _local8 = getStyle("borderSides"); _local35 = true; radius = getStyle("cornerRadius"); bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local36 = Math.max((radius - _local9), 0); _local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36}; if (!bRoundedCorners){ radiusObj = {tl:radius, tr:radius, bl:0, br:0}; _local20.r = {tl:_local36, tr:_local36, bl:0, br:0}; }; if (_local8 != "left top right bottom"){ _local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0}; radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0}; _local8 = _local8.toLowerCase(); if (_local8.indexOf("left") == -1){ _local20.x = 0; _local20.w = (_local20.w + _local9); _local20.r.tl = 0; _local20.r.bl = 0; radiusObj.tl = 0; radiusObj.bl = 0; _local35 = false; }; if (_local8.indexOf("top") == -1){ _local20.y = 0; _local20.h = (_local20.h + _local9); _local20.r.tl = 0; _local20.r.tr = 0; radiusObj.tl = 0; radiusObj.tr = 0; _local35 = false; }; if (_local8.indexOf("right") == -1){ _local20.w = (_local20.w + _local9); _local20.r.tr = 0; _local20.r.br = 0; radiusObj.tr = 0; radiusObj.br = 0; _local35 = false; }; if (_local8.indexOf("bottom") == -1){ _local20.h = (_local20.h + _local9); _local20.r.bl = 0; _local20.r.br = 0; radiusObj.bl = 0; radiusObj.br = 0; _local35 = false; }; }; if ((((radius == 0)) && (_local35))){ drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0); _local26.beginFill(_local7); _local26.drawRect(0, 0, _arg1, _arg2); _local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9))); _local26.endFill(); } else { if (radiusObj){ drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl); drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20); radiusObj.tl = Math.max((radius - _local9), 0); radiusObj.tr = Math.max((radius - _local9), 0); radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0; } else { drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius); drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20); radius = Math.max((getStyle("cornerRadius") - _local9), 0); }; }; }; }; } mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{ var _local4:Number; var _local5:Number; var _local6:EdgeMetrics; var _local7:Graphics; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Array; var _local12:Number; if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ _local4 = Number(backgroundColor); _local5 = 1; _local6 = getBackgroundColorMetrics(); _local7 = graphics; if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){ _local5 = 0; _local4 = 0xFFFFFF; } else { _local5 = getStyle(backgroundAlphaName); }; if (((!((radius == 0))) || (backgroundHole))){ _local8 = _local6.bottom; if (radiusObj){ _local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0); _local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0; radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10}; drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); } else { drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole); }; } else { _local7.beginFill(_local4, _local5); _local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top)); _local7.endFill(); }; }; var _local3:String = getStyle("borderStyle"); if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){ _local11 = getStyle("highlightAlphas"); _local12 = (_local11) ? _local11[0] : 0.3; drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}}); }; } mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local11:Number; var _local12:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){ return; }; var _local9:Number = getStyle("shadowDistance"); var _local10:String = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ _local12 = getStyle("docked"); _local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10); _local9 = Math.abs(_local9); } else { _local11 = getDropShadowAngle(_local9, _local10); _local9 = (Math.abs(_local9) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = _local9; dropShadow.angle = _local11; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = _arg5; dropShadow.trRadius = _arg6; dropShadow.blRadius = _arg8; dropShadow.brRadius = _arg7; dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4); } mx_internal function getBackgroundColor():Object{ var _local2:Object; var _local1:IUIComponent = (parent as IUIComponent); if (((_local1) && (!(_local1.enabled)))){ _local2 = getStyle("backgroundDisabledColor"); if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){ return (_local2); }; }; return (getStyle("backgroundColor")); } mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Number = width; var _local8:Number = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); var _local9:Graphics = graphics; _local9.beginFill(_arg1); _local9.drawRect(0, 0, _local7, _local8); _local9.drawRect(1, 0, (_local7 - 2), _local8); _local9.endFill(); _local9.beginFill(_arg2); _local9.drawRect(1, 0, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg3); _local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg4); _local9.drawRect(1, 1, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg5); _local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg6); _local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4)); _local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4)); _local9.endFill(); } mx_internal function getBackgroundColorMetrics():EdgeMetrics{ return (borderMetrics); } mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{ if (_arg2 == "left"){ return (((_arg1 >= 0)) ? 135 : 225); //unresolved jump }; if (_arg2 == "right"){ return (((_arg1 >= 0)) ? 45 : 315); //unresolved jump }; return (((_arg1 >= 0)) ? 90 : 270); } override public function get borderMetrics():EdgeMetrics{ var _local1:Number; var _local3:String; if (_borderMetrics){ return (_borderMetrics); }; var _local2:String = getStyle("borderStyle"); if ((((_local2 == "default")) || ((_local2 == "alert")))){ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { return (EdgeMetrics.EMPTY); }; } else { if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (_local2 == "solid"){ _local1 = getStyle("borderThickness"); if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); _local3 = getStyle("borderSides"); if (_local3 != "left top right bottom"){ if (_local3.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (_local3.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (_local3.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (_local3.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { _local1 = BORDER_WIDTHS[_local2]; if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); }; }; }; return (_borderMetrics); } } }//package mx.skins.halo
Section 80
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.skins.*; import mx.utils.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "3.4.0.9271"; public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function set inheritingStyles(_arg1:Object):void{ } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function registerEffects(_arg1:Array):void{ } public function regenerateStyleCache(_arg1:Boolean):void{ } public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function getClassStyleDeclarations():Array{ return ([]); } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(_arg1:String):void{ if (_arg1 == "focusColor"){ _focusColor = NaN; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "focusColor"){ _focusColor = _arg2; }; } public function set nonInheritingStyles(_arg1:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; super.updateDisplayList(_arg1, _arg2); var _local3:String = getStyle("focusBlendMode"); var _local4:Number = getStyle("focusAlpha"); var _local5:Number = getStyle("focusColor"); var _local6:Number = getStyle("cornerRadius"); var _local7:Number = getStyle("focusThickness"); var _local8:String = getStyle("focusRoundedCorners"); var _local9:Number = getStyle("themeColor"); var _local10:Number = _local5; if (isNaN(_local10)){ _local10 = _local9; }; var _local11:Graphics = graphics; _local11.clear(); if (_local3){ blendMode = _local3; }; if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){ _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = (_local6 + _local7); if (_local8.indexOf("tl") >= 0){ _local12 = _local16; }; if (_local8.indexOf("tr") >= 0){ _local14 = _local16; }; if (_local8.indexOf("bl") >= 0){ _local13 = _local16; }; if (_local8.indexOf("br") >= 0){ _local15 = _local16; }; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); _local16 = (_local6 + (_local7 / 2)); _local12 = (_local12) ? _local16 : 0; _local14 = (_local14) ? _local16 : 0; _local13 = (_local13) ? _local16 : 0; _local15 = (_local15) ? _local16 : 0; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); } else { _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2); _local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2); _local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); }; } override public function getStyle(_arg1:String){ return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1)); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ } } }//package mx.skins.halo
Section 81
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.4.0.9271"; public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 82
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.geom.*; import mx.managers.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin { private var _initialized:Boolean;// = false private var _height:Number; private var invalidateDisplayListFlag:Boolean;// = false private var _styleName:IStyleClient; private var _nestLevel:int;// = 0 private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; mx_internal static const VERSION:String = "3.4.0.9271"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ _width = measuredWidth; _height = measuredHeight; } public function getStyle(_arg1:String){ return ((_styleName) ? _styleName.getStyle(_arg1) : null); } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ _nestLevel = _arg1; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90)); } public function validateSize(_arg1:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0)); } override public function set height(_arg1:Number):void{ _height = _arg1; invalidateDisplayList(); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } override public function set width(_arg1:Number):void{ _width = _arg1; invalidateDisplayList(); } public function get measuredHeight():Number{ return (0); } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{ var _local13:Number; var _local14:Array; var _local15:Object; var _local12:Graphics = graphics; if ((((_arg3 == 0)) || ((_arg4 == 0)))){ return; }; if (_arg6 !== null){ if ((_arg6 is uint)){ _local12.beginFill(uint(_arg6), Number(_arg7)); } else { if ((_arg6 is Array)){ _local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7]; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8); }; }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local15 = _arg11.r; if ((_local15 is Number)){ _local13 = (Number(_local15) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(_arg1:Object):void{ if (_styleName != _arg1){ _styleName = (_arg1 as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; if (_width != _arg1){ _width = _arg1; _local3 = true; }; if (_height != _arg2){ _height = _arg2; _local3 = true; }; if (_local3){ invalidateDisplayList(); }; } public function styleChanged(_arg1:String):void{ invalidateDisplayList(); } override public function get width():Number{ return (_width); } public function invalidateProperties():void{ } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{ tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2); return (tempMatrix); } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get styleName():Object{ return (_styleName); } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } public function invalidateSize():void{ } public function validateProperties():void{ } } }//package mx.skins
Section 83
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import mx.core.*; import flash.events.*; import flash.display.*; import flash.utils.*; import mx.styles.*; import flash.system.*; import flash.geom.*; import mx.resources.*; import flash.net.*; public class RectangularBorder extends Border implements IRectangularBorder { private var backgroundImage:DisplayObject; private var backgroundImageHeight:Number; private var _backgroundImageBounds:Rectangle; private var backgroundImageStyle:Object; private var backgroundImageWidth:Number; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.4.0.9271"; public function RectangularBorder(){ resourceManager = ResourceManager.getInstance(); super(); addEventListener(Event.REMOVED, removedHandler); } public function layoutBackgroundImage():void{ var _local4:Number; var _local5:Number; var _local7:Number; var _local8:Number; var _local14:Number; var _local15:Graphics; var _local1:DisplayObject = parent; var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics; var _local3 = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageBounds){ _local4 = _backgroundImageBounds.width; _local5 = _backgroundImageBounds.height; } else { _local4 = ((width - _local2.left) - _local2.right); _local5 = ((height - _local2.top) - _local2.bottom); }; var _local6:Number = getBackgroundSize(); if (isNaN(_local6)){ _local7 = 1; _local8 = 1; } else { _local14 = (_local6 * 0.01); _local7 = ((_local14 * _local4) / backgroundImageWidth); _local8 = ((_local14 * _local5) / backgroundImageHeight); }; backgroundImage.scaleX = _local7; backgroundImage.scaleY = _local8; var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7)))); var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8)))); backgroundImage.x = _local2.left; backgroundImage.y = _local2.top; var _local11:Shape = Shape(backgroundImage.mask); _local11.x = _local2.left; _local11.y = _local2.top; if (((_local3) && ((_local1 is IContainer)))){ _local9 = (_local9 - IContainer(_local1).horizontalScrollPosition); _local10 = (_local10 - IContainer(_local1).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + _local9); backgroundImage.y = (backgroundImage.y + _local10); var _local12:Number = ((width - _local2.left) - _local2.right); var _local13:Number = ((height - _local2.top) - _local2.bottom); if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){ _local15 = _local11.graphics; _local15.clear(); _local15.beginFill(0xFFFFFF); _local15.drawRect(0, 0, _local12, _local13); _local15.endFill(); }; } public function set backgroundImageBounds(_arg1:Rectangle):void{ if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){ return; }; _backgroundImageBounds = _arg1; invalidateDisplayList(); } private function getBackgroundSize():Number{ var _local3:int; var _local1:Number = NaN; var _local2:Object = getStyle("backgroundSize"); if (((_local2) && ((_local2 is String)))){ _local3 = _local2.indexOf("%"); if (_local3 != -1){ _local1 = Number(_local2.substr(0, _local3)); }; }; return (_local1); } private function removedHandler(_arg1:Event):void{ var _local2:IChildList; if (backgroundImage){ _local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); _local2.removeChild(backgroundImage.mask); _local2.removeChild(backgroundImage); backgroundImage = null; }; } private function initBackgroundImage(_arg1:DisplayObject):void{ backgroundImage = _arg1; if ((_arg1 is Loader)){ backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width; backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = styleName; }; }; var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent); var _local3:Shape = new FlexShape(); _local3.name = "backgroundMask"; _local3.x = 0; _local3.y = 0; _local2.addChild(_local3); var _local4:int = _local2.getChildIndex(this); _local2.addChildAt(backgroundImage, (_local4 + 1)); backgroundImage.mask = _local3; } public function get backgroundImageBounds():Rectangle{ return (_backgroundImageBounds); } public function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function completeEventHandler(_arg1:Event):void{ if (!parent){ return; }; var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); layoutBackgroundImage(); dispatchEvent(_arg1.clone()); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var message:String; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if (!parent){ return; }; var newStyle:Object = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ removedHandler(null); backgroundImageStyle = newStyle; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ try { cls = Class(getDefinitionByName(String(newStyle))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ message = resourceManager.getString("skins", "notLoaded", [newStyle]); throw (new Error(message)); }; }; }; }; if (backgroundImage){ layoutBackgroundImage(); }; } private function errorEventHandler(_arg1:Event):void{ } } }//package mx.skins
Section 84
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import mx.core.*; import flash.events.*; import flash.display.*; import flash.utils.*; import mx.managers.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; protected var overrides:Object; public var defaultFactory:Function; public var factory:Function; mx_internal var selectorRefCount:int;// = 0 private var styleManager:IStyleManager2; private var clones:Dictionary; mx_internal static const VERSION:String = "3.4.0.9271"; private static const NOT_A_COLOR:uint = 4294967295; private static const FILTERMAP_PROP:String = "__reserved__filterMap"; public function CSSStyleDeclaration(_arg1:String=null){ clones = new Dictionary(true); super(); if (_arg1){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); styleManager.setStyleDeclaration(_arg1, this, false); }; } mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{ var p:String; var emptyObjectFactory:Function; var filteredChain:Object; var filterObjectFactory:Function; var i:String; var chain = _arg1; var target = _arg2; var filterMap = _arg3; var nodeAddedToChain:Boolean; var originalChain:Object = chain; if (filterMap){ chain = {}; }; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (filterMap){ if (nodeAddedToChain){ filteredChain = {}; filterObjectFactory = function ():void{ }; filterObjectFactory.prototype = originalChain; filteredChain = new (filterObjectFactory); for (i in chain) { if (filterMap[i] != null){ filteredChain[filterMap[i]] = chain[i]; }; }; chain = filteredChain; chain[FILTERMAP_PROP] = filterMap; } else { chain = originalChain; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(_arg1:String){ var _local2:*; var _local3:*; if (overrides){ if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){ return (undefined); }; _local3 = overrides[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (factory != null){ factory.prototype = {}; _local2 = new factory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; _local2 = new defaultFactory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; return (undefined); } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function setStyle(_arg1:String, _arg2):void{ var _local7:int; var _local8:Object; var _local3:Object = getStyle(_arg1); var _local4:Boolean; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){ _local4 = true; }; if (_arg2 !== undefined){ setStyle(_arg1, _arg2); } else { if (_arg2 == _local3){ return; }; setStyle(_arg1, _arg2); }; var _local5:Array = SystemManagerGlobals.topLevelSystemManagers; var _local6:int = _local5.length; if (_local4){ _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.regenerateStyleCache(true); _local7++; }; }; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.notifyStyleChangeInChildren(_arg1, true); _local7++; }; } private function clearStyleAttr(_arg1:String):void{ var _local2:*; if (!overrides){ overrides = {}; }; overrides[_arg1] = undefined; for (_local2 in clones) { delete _local2[_arg1]; }; } mx_internal function createProtoChainRoot():Object{ var _local1:Object = {}; if (defaultFactory != null){ defaultFactory.prototype = _local1; _local1 = new defaultFactory(); }; if (factory != null){ factory.prototype = _local1; _local1 = new factory(); }; clones[_local1] = 1; return (_local1); } mx_internal function clearOverride(_arg1:String):void{ if (((overrides) && (overrides[_arg1]))){ delete overrides[_arg1]; }; } mx_internal function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:*; var _local5:Number; var _local6:Object; if (_arg2 === undefined){ clearStyleAttr(_arg1); return; }; if ((_arg2 is String)){ if (!styleManager){ styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2); }; _local5 = styleManager.getColorName(_arg2); if (_local5 != NOT_A_COLOR){ _arg2 = _local5; }; }; if (defaultFactory != null){ _local3 = new defaultFactory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if (factory != null){ _local3 = new factory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; }; for (_local4 in clones) { _local6 = _local4[FILTERMAP_PROP]; if (_local6){ if (_local6[_arg1] != null){ _local4[_local6[_arg1]] = _arg2; }; } else { _local4[_arg1] = _arg2; }; }; } } }//package mx.styles
Section 85
//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 86
//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 87
//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 88
//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 89
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 90
//StyleManager (mx.styles.StyleManager) package mx.styles { import mx.core.*; import flash.events.*; import flash.system.*; public class StyleManager { mx_internal static const VERSION:String = "3.4.0.9271"; public static const NOT_A_COLOR:uint = 4294967295; private static var _impl:IStyleManager2; private static var implClassDependency:StyleManagerImpl; public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(_arg1)); } public static function registerInheritingStyle(_arg1:String):void{ impl.registerInheritingStyle(_arg1); } mx_internal static function set stylesRoot(_arg1:Object):void{ impl.stylesRoot = _arg1; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ impl.setStyleDeclaration(_arg1, _arg2, _arg3); } public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ impl.registerParentDisplayListInvalidatingStyle(_arg1); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(_arg1:Object):void{ impl.inheritingStyles = _arg1; } public static function isColorName(_arg1:String):Boolean{ return (impl.isColorName(_arg1)); } public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(_arg1)); } public static function isSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isSizeInvalidatingStyle(_arg1)); } public static function getColorName(_arg1:Object):uint{ return (impl.getColorName(_arg1)); } mx_internal static function set typeSelectorCache(_arg1:Object):void{ impl.typeSelectorCache = _arg1; } public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ impl.unloadStyleDeclarations(_arg1, _arg2); } public static function getColorNames(_arg1:Array):void{ impl.getColorNames(_arg1); } public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{ return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5)); } private static function get impl():IStyleManager2{ if (!_impl){ _impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2")); }; return (_impl); } public static function isValidStyleValue(_arg1):Boolean{ return (impl.isValidStyleValue(_arg1)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(_arg1:String):Boolean{ return (impl.isInheritingStyle(_arg1)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(_arg1:String):void{ impl.registerParentSizeInvalidatingStyle(_arg1); } public static function get selectors():Array{ return (impl.selectors); } public static function registerSizeInvalidatingStyle(_arg1:String):void{ impl.registerSizeInvalidatingStyle(_arg1); } public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ impl.clearStyleDeclaration(_arg1, _arg2); } public static function registerColorName(_arg1:String, _arg2:uint):void{ impl.registerColorName(_arg1, _arg2); } public static function isInheritingTextFormatStyle(_arg1:String):Boolean{ return (impl.isInheritingTextFormatStyle(_arg1)); } public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(_arg1)); } } }//package mx.styles
Section 91
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import mx.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.resources.*; import mx.managers.*; public class StyleManagerImpl implements IStyleManager2 { private var _stylesRoot:Object; private var _selectors:Object; private var styleModules:Object; private var _inheritingStyles:Object; private var resourceManager:IResourceManager; private var _typeSelectorCache:Object; mx_internal static const VERSION:String = "3.4.0.9271"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager2; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ _selectors = {}; styleModules = {}; resourceManager = ResourceManager.getInstance(); _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ _arg2.selectorRefCount++; _selectors[_arg1] = _arg2; typeSelectorCache = {}; if (_arg3){ styleDeclarationsChanged(); }; } public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ parentDisplayListInvalidatingStyles[_arg1] = true; } public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ var _local2:int; if (_arg1.charAt(0) != "."){ _local2 = _arg1.lastIndexOf("."); if (_local2 != -1){ _arg1 = _arg1.substr((_local2 + 1)); }; }; return (_selectors[_arg1]); } public function set typeSelectorCache(_arg1:Object):void{ _typeSelectorCache = _arg1; } public function isColorName(_arg1:String):Boolean{ return (!((colorNames[_arg1.toLowerCase()] === undefined))); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getColorNames(_arg1:Array):void{ var _local4:uint; if (!_arg1){ return; }; var _local2:int = _arg1.length; var _local3:int; while (_local3 < _local2) { if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){ _local4 = getColorName(_arg1[_local3]); if (_local4 != StyleManager.NOT_A_COLOR){ _arg1[_local3] = _local4; }; }; _local3++; }; } public function isInheritingTextFormatStyle(_arg1:String):Boolean{ return ((inheritingTextFormatStyles[_arg1] == true)); } public function registerParentSizeInvalidatingStyle(_arg1:String):void{ parentSizeInvalidatingStyles[_arg1] = true; } public function registerColorName(_arg1:String, _arg2:uint):void{ colorNames[_arg1.toLowerCase()] = _arg2; } public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return ((parentSizeInvalidatingStyles[_arg1] == true)); } public function registerInheritingStyle(_arg1:String):void{ inheritingStyles[_arg1] = true; } public function set stylesRoot(_arg1:Object):void{ _stylesRoot = _arg1; } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return ((parentDisplayListInvalidatingStyles[_arg1] == true)); } public function isSizeInvalidatingStyle(_arg1:String):Boolean{ return ((sizeInvalidatingStyles[_arg1] == true)); } public function styleDeclarationsChanged():void{ var _local4:Object; var _local1:Array = SystemManagerGlobals.topLevelSystemManagers; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { _local4 = _local1[_local3]; _local4.regenerateStyleCache(true); _local4.notifyStyleChangeInChildren(null, true); _local3++; }; } public function isValidStyleValue(_arg1):Boolean{ return (!((_arg1 === undefined))); } public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ return (loadStyleDeclarations2(_arg1, _arg2)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ var _local4:IModuleInfo; var _local3:StyleModuleInfo = styleModules[_arg1]; if (_local3){ _local3.styleModule.unload(); _local4 = _local3.module; _local4.unload(); _local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler); _local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler); styleModules[_arg1] = null; }; if (_arg2){ styleDeclarationsChanged(); }; } public function getColorName(_arg1:Object):uint{ var _local2:Number; var _local3:*; if ((_arg1 is String)){ if (_arg1.charAt(0) == "#"){ _local2 = Number(("0x" + _arg1.slice(1))); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){ _local2 = Number(_arg1); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; _local3 = colorNames[_arg1.toLowerCase()]; if (_local3 === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(_local3)); }; return (uint(_arg1)); } public function isInheritingStyle(_arg1:String):Boolean{ return ((inheritingStyles[_arg1] == true)); } public function get stylesRoot():Object{ return (_stylesRoot); } public function initProtoChainRoots():void{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ delete _inheritingStyles["textDecoration"]; delete _inheritingStyles["leading"]; }; if (!stylesRoot){ stylesRoot = _selectors["global"].addStyleToProtoChain({}, null); }; } public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{ var module:IModuleInfo; var styleEventDispatcher:StyleEventDispatcher; var timer:Timer; var timerHandler:Function; var url = _arg1; var update = _arg2; var applicationDomain = _arg3; var securityDomain = _arg4; module = ModuleManager.getModule(url); var readyHandler:Function = function (_arg1:ModuleEvent):void{ var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create()); styleModules[_arg1.module.url].styleModule = _local2; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); var errorHandler:Function = function (_arg1:ModuleEvent):void{ var _local3:StyleEvent; var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ _local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; styleEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); module.load(applicationDomain, securityDomain); }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerSizeInvalidatingStyle(_arg1:String):void{ sizeInvalidatingStyles[_arg1] = true; } public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1); if (((_local3) && ((_local3.selectorRefCount > 0)))){ _local3.selectorRefCount--; }; delete _selectors[_arg1]; if (_arg2){ styleDeclarationsChanged(); }; } public function get selectors():Array{ var _local2:String; var _local1:Array = []; for (_local2 in _selectors) { _local1.push(_local2); }; return (_local1); } public static function getInstance():IStyleManager2{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.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); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; _local2.errorText = _arg1.errorText; dispatchEvent(_local2); } } class StyleModuleInfo { public var errorHandler:Function; public var readyHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){ this.module = _arg1; this.readyHandler = _arg2; this.errorHandler = _arg3; } }
Section 92
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; if (_arg2 == 0){ return (_arg1); }; if (_arg2 < 0){ _arg2 = ((100 + _arg2) / 100); _local3 = (((_arg1 >> 16) & 0xFF) * _arg2); _local4 = (((_arg1 >> 8) & 0xFF) * _arg2); _local5 = ((_arg1 & 0xFF) * _arg2); } else { _arg2 = (_arg2 / 100); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local3 = (_local3 + ((0xFF - _local3) * _arg2)); _local4 = (_local4 + ((0xFF - _local4) * _arg2)); _local5 = (_local5 + ((0xFF - _local5) * _arg2)); _local3 = Math.min(_local3, 0xFF); _local4 = Math.min(_local4, 0xFF); _local5 = Math.min(_local5, 0xFF); }; return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{ var _local3:Number = ((_arg1 >> 16) & 0xFF); var _local4:Number = ((_arg1 >> 8) & 0xFF); var _local5:Number = (_arg1 & 0xFF); var _local6:Number = ((_arg2 >> 16) & 0xFF); var _local7:Number = ((_arg2 >> 8) & 0xFF); var _local8:Number = (_arg2 & 0xFF); return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF))); } public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{ var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0); var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0); var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0); return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } } }//package mx.utils
Section 93
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ var _local10:Number = (_arg2 + _arg4); var _local11:Number = (_arg3 + _arg5); var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2); _arg6 = ((_arg6 < _local12)) ? _arg6 : _local12; _arg7 = ((_arg7 < _local12)) ? _arg7 : _local12; _arg8 = ((_arg8 < _local12)) ? _arg8 : _local12; _arg9 = ((_arg9 < _local12)) ? _arg9 : _local12; var _local13:Number = (_arg9 * 0.292893218813453); var _local14:Number = (_arg9 * 0.585786437626905); _arg1.moveTo(_local10, (_local11 - _arg9)); _arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13)); _arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11); _local13 = (_arg8 * 0.292893218813453); _local14 = (_arg8 * 0.585786437626905); _arg1.lineTo((_arg2 + _arg8), _local11); _arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13)); _arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8)); _local13 = (_arg6 * 0.292893218813453); _local14 = (_arg6 * 0.585786437626905); _arg1.lineTo(_arg2, (_arg3 + _arg6)); _arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13)); _arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3); _local13 = (_arg7 * 0.292893218813453); _local14 = (_arg7 * 0.585786437626905); _arg1.lineTo((_local10 - _arg7), _arg3); _arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13)); _arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7)); _arg1.lineTo(_local10, (_local11 - _arg9)); } } }//package mx.utils
Section 94
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.4.0.9271"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = _arg1; try { o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; } catch(e:SecurityError) { }; return (result); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 95
//StringUtil (mx.utils.StringUtil) package mx.utils { public class StringUtil { mx_internal static const VERSION:String = "3.4.0.9271"; public static function trim(_arg1:String):String{ if (_arg1 == null){ return (""); }; var _local2:int; while (isWhitespace(_arg1.charAt(_local2))) { _local2++; }; var _local3:int = (_arg1.length - 1); while (isWhitespace(_arg1.charAt(_local3))) { _local3--; }; if (_local3 >= _local2){ return (_arg1.slice(_local2, (_local3 + 1))); }; return (""); } public static function isWhitespace(_arg1:String):Boolean{ switch (_arg1){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(_arg1:String, ... _args):String{ var _local4:Array; if (_arg1 == null){ return (""); }; var _local3:uint = _args.length; if ((((_local3 == 1)) && ((_args[0] is Array)))){ _local4 = (_args[0] as Array); _local3 = _local4.length; } else { _local4 = _args; }; var _local5:int; while (_local5 < _local3) { _arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]); _local5++; }; return (_arg1); } public static function trimArrayElements(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:int; var _local5:int; if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ _local3 = _arg1.split(_arg2); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local3[_local5] = StringUtil.trim(_local3[_local5]); _local5++; }; if (_local4 > 0){ _arg1 = _local3.join(_arg2); }; }; return (_arg1); } } }//package mx.utils
Section 96
//Bomb (net.odd1.AsteroidWar.bombs.Bomb) package net.odd1.AsteroidWar.bombs { import flash.display.*; public class Bomb extends Sprite { public var size:Number; private var display:MovieClip; public var isAlive:Boolean; private var lifeSpan:Number; private var stayTimer:Number;// = 3 private var targetSize:Number; public var radius:Number;// = 140 public var phase:String; private var life:Number; public function Bomb(_arg1:MovieClip, _arg2:Number, _arg3:Number){ addChild(_arg1); isAlive = true; this.display = _arg1; x = _arg2; y = _arg3; size = 0.1; targetSize = 1; phase = "grow"; lifeSpan = 8; life = lifeSpan; scaleX = size; scaleY = size; } public function render(_arg1:Number):void{ if ((((phase == "grow")) && ((size > 0.95)))){ phase = "stay"; }; if (phase == "stay"){ stayTimer = (stayTimer - _arg1); if (stayTimer < 0){ phase = "reduce"; }; }; if (phase == "reduce"){ targetSize = (targetSize - _arg1); }; size = (size + ((((targetSize - size) / 10) * _arg1) * 100)); scaleX = size; scaleY = size; alpha = Math.min(1, (size * 2)); if (targetSize < 0.1){ isAlive = false; }; } } }//package net.odd1.AsteroidWar.bombs
Section 97
//BombsClass (net.odd1.AsteroidWar.bombs.BombsClass) package net.odd1.AsteroidWar.bombs { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class BombsClass extends Sprite { public var bombs:Array; private var max:int; private var content:MovieClip; public function BombsClass(){ bombs = new Array(); content = GlobalVars.particulesAssets; } public function render(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Bomb; var _local5:Array; _local5 = new Array(); _local3 = bombs.length; _local2 = 0; while (_local2 < _local3) { _local4 = bombs[_local2]; if (!_local4.isAlive){ removeChild(_local4); _local5.push(_local4); } else { _local4.render(_arg1); }; _local2++; }; _local3 = _local5.length; _local2 = 0; while (_local2 < _local3) { bombs.splice(bombs.indexOf(_local5[_local2]), 1); _local2++; }; } public function createBomb(_arg1:Number, _arg2:Number):void{ var _local3:Class = (content.loaderInfo.applicationDomain.getDefinition("bomb") as Class); var _local4:Bomb = new Bomb(new (_local3), _arg1, _arg2); addChild(_local4); bombs.push(_local4); } public function cleanAll():void{ var _local1:int; var _local2:int; var _local3:Bomb; var _local4:Array; _local2 = bombs.length; _local1 = 0; while (_local1 < _local2) { _local3 = bombs[_local1]; _local3.isAlive = false; _local1++; }; } } }//package net.odd1.AsteroidWar.bombs
Section 98
//Bullet (net.odd1.AsteroidWar.bullets.Bullet) package net.odd1.AsteroidWar.bullets { import flash.display.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.players.*; import net.odd1.AsteroidWar.bombs.*; import net.odd1.AsteroidWar.global.*; public class Bullet extends Sprite { private var size:Number; public var waypoint:Number; private var target:Object; private var turningSpeed:Number;// = 1.5 private var isMissile:Boolean; private var targetTimerR:Number;// = 1 private var ys:Number;// = 0 private var dist:Number; private var targetTimer:Number;// = 1 private var display:MovieClip; public var isAlive:Boolean; private var turning:Number; private var speed:Number; private var angle:Number; private var side:int; private var shipSize:Number; private var lifeSpan:Number; private var targetX:Number; private var targetY:Number; private var lrot:Number;// = 0 private var damage:Number; private var rot:Number; private var xs:Number;// = 0 private var life:Number; public function Bullet(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:int, _arg9:Boolean, _arg10:Number){ turning = (turningSpeed * (Math.PI / 180)); super(); addChild(_arg1); isAlive = true; this.display = _arg1; this.speed = _arg5; this.angle = _arg4; x = _arg2; y = _arg3; this.lifeSpan = _arg7; life = lifeSpan; this.rotation = _arg4; shipSize = GlobalVars.shipSize; this.side = _arg8; this.isMissile = _arg9; this.turningSpeed = _arg10; this.turning = (this.turningSpeed * (Math.PI / 180)); rot = _arg4; if (_arg9){ rot = (rot + (90 + ((0.5 - Math.random()) * 40))); }; rotation = _arg4; this.damage = _arg6; getSpeeds(); target = this; if (_arg8 == 2){ targetY = (((GlobalVars.stageHeight / 2) - 200) + (Math.random() * 300)); targetX = (((GlobalVars.stageWidth / 2) - 20) + (Math.random() * 40)); }; } public function getTarget():void{ var _local3:Enemy; var _local4:Array; var _local1:Number = 400000; var _local2:Boolean; if (side == 0){ _local4 = GameScreen.enemiesLayer.enemies; for each (_local3 in _local4) { dist = getDistance(_local3.x, _local3.y); if (dist < _local1){ _local1 = dist; target = _local3; _local2 = true; }; }; if (!_local2){ target = this; }; }; } public function getSpeeds():void{ xs = cXspeed(); ys = cYspeed(); } public function cXspeed():Number{ return ((Math.cos(((Math.PI / 180) * rotation)) * 15)); } public function render(_arg1:Number):void{ var _local2:Bomb; var _local3:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Enemy; var _local15:Array; var _local16:Number; var _local17:Number; var _local4:Array = GameScreen.bombsLayer.bombs; for each (_local2 in _local4) { dist = getDistance(_local2.x, _local2.y); _local3 = (_local2.size * _local2.radius); if (dist < (_local3 * _local3)){ _local5 = (1 - ((dist - (_local3 * _local3)) / (_local3 * _local3))); _arg1 = (_arg1 / (_local5 * _local5)); break; }; }; life = (life - _arg1); if (life < 0){ isAlive = false; }; if ((((side == 1)) && ((GlobalVars.gameState == "goingMother")))){ isAlive = false; }; if (isMissile){ _local9 = ((turning * _arg1) * 60); if (side == 1){ targetY = GlobalVars.shipY; targetX = GlobalVars.shipX; } else { if (side == 0){ targetTimerR = (targetTimerR + _arg1); if (targetTimerR >= targetTimer){ getTarget(); targetTimerR = 0; }; if (!target){ }; targetX = target.x; targetY = target.y; }; }; if ((((targetX == x)) && ((targetY == y)))){ } else { _local10 = lrot; lrot = rot; _local11 = Math.atan(((x - targetX) / (targetY - y))); if (targetY > y){ _local11 = (_local11 + Math.PI); }; if (_local11 < 0){ _local11 = (_local11 + (Math.PI * 2)); } else { if (_local11 >= (Math.PI * 2)){ _local11 = (_local11 - (Math.PI * 2)); }; }; _local12 = (rot * (Math.PI / 180)); if (_local12 < 0){ _local12 = (_local12 + (Math.PI * 2)); } else { if (_local12 >= (Math.PI * 2)){ _local12 = (_local12 - (Math.PI * 2)); }; }; _local13 = (_local11 - _local12); if (_local13 < 0){ _local13 = (_local13 + (Math.PI * 2)); } else { if (_local13 >= (Math.PI * 2)){ _local13 = (_local13 - (Math.PI * 2)); }; }; if ((((_local12 < ((_local11 - (_local9 / 2)) + _local9))) && ((_local12 > (_local11 - (_local9 / 2)))))){ _local12 = _local11; } else { if (_local13 <= Math.PI){ _local12 = (_local12 + _local9); } else { _local12 = (_local12 - _local9); }; }; if (rot == 0){ rot++; _local12 = (rot * (Math.PI / 180)); }; rot = ((_local12 * 180) / Math.PI); rotation = (rot - 90); }; getSpeeds(); }; if (side == 1){ dist = getDistance(GlobalVars.shipX, GlobalVars.shipY); shipSize = GlobalVars.shipSize; if (dist < (shipSize * shipSize)){ isAlive = false; _local6 = x; _local7 = y; GameScreen.particules.createParticule("explosion", _local6, _local7, Number((Math.random() * 360)), 0, 0.4, 1); GlobalVars.game.playerDamage(damage); }; } else { if (side == 0){ _local15 = GameScreen.enemiesLayer.enemies; for each (_local14 in _local15) { dist = getDistance(_local14.x, _local14.y); shipSize = _local14.size; if (dist < (shipSize * shipSize)){ isAlive = false; _local6 = x; _local7 = y; GameScreen.particules.createParticule("explosion", _local6, _local7, Number((Math.random() * 360)), 0, 0.4, 1); _local14.hp = (_local14.hp - damage); break; }; }; } else { if (side == 2){ dist = getDistance(targetX, targetY); shipSize = 50; if (dist < (shipSize * shipSize)){ isAlive = false; _local6 = x; _local7 = y; GameScreen.particules.createParticule("explosion", _local6, _local7, Number((Math.random() * 360)), 0, 0.7, 1); GameScreen.isShaking = true; SoundPlayer.explodeSound(); if (GlobalVars.game.mother.hp > 0){ GlobalVars.game.mother.hp--; }; }; }; }; }; if (side == 0){ _local16 = (x + GameScreen.gameCamLayer.x); _local17 = (y + GameScreen.gameCamLayer.y); if ((((((((_local16 < 0)) || ((_local16 > 720)))) || ((_local17 < 0)))) || ((_local17 > 520)))){ isAlive = false; }; }; x = (x + (((xs * 4) * _arg1) * speed)); y = (y + (((ys * 4) * _arg1) * speed)); } public function cYspeed():Number{ return ((Math.sin(((Math.PI / 180) * rotation)) * 15)); } private function getDistance(_arg1:Number, _arg2:Number):Number{ var _local3:Number = (x - _arg1); var _local4:Number = (y - _arg2); var _local5:Number = ((_local3 * _local3) + (_local4 * _local4)); return (_local5); } } }//package net.odd1.AsteroidWar.bullets
Section 99
//BulletsClass (net.odd1.AsteroidWar.bullets.BulletsClass) package net.odd1.AsteroidWar.bullets { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class BulletsClass extends Sprite { private var bullets:Array; private var content:MovieClip; public function BulletsClass(){ bullets = new Array(); content = GlobalVars.particulesAssets; } public function render(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Bullet; var _local5:Array; _local5 = new Array(); _local3 = bullets.length; _local2 = 0; while (_local2 < _local3) { _local4 = bullets[_local2]; if (!_local4.isAlive){ removeChild(_local4); _local5.push(_local4); } else { _local4.render(_arg1); }; _local2++; }; _local3 = _local5.length; _local2 = 0; while (_local2 < _local3) { bullets.splice(bullets.indexOf(_local5[_local2]), 1); _local2++; }; } public function cleanAll():void{ var _local1:int; var _local2:int; var _local3:Bullet; var _local4:Array; _local2 = bullets.length; _local1 = 0; while (_local1 < _local2) { _local3 = bullets[_local1]; _local3.isAlive = false; _local1++; }; } public function createBullet(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:int, _arg9:Boolean, _arg10:Number):void{ var _local11:Class = (content.loaderInfo.applicationDomain.getDefinition(_arg1) as Class); var _local12:Bullet = new Bullet(new (_local11), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10); addChild(_local12); bullets.push(_local12); } } }//package net.odd1.AsteroidWar.bullets
Section 100
//FontCommand (net.odd1.AsteroidWar.fonts.FontCommand) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontCommand extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 101
//FontDefault (net.odd1.AsteroidWar.fonts.FontDefault) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontDefault extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 102
//FontEurostile (net.odd1.AsteroidWar.fonts.FontEurostile) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontEurostile extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 103
//FontOratorStd (net.odd1.AsteroidWar.fonts.FontOratorStd) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontOratorStd extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 104
//FontPerfect16Pixel (net.odd1.AsteroidWar.fonts.FontPerfect16Pixel) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontPerfect16Pixel extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 105
//FontUni (net.odd1.AsteroidWar.fonts.FontUni) package net.odd1.AsteroidWar.fonts { import mx.core.*; public class FontUni extends FontAsset { } }//package net.odd1.AsteroidWar.fonts
Section 106
//GlobalVars (net.odd1.AsteroidWar.global.GlobalVars) package net.odd1.AsteroidWar.global { import flash.display.*; public class GlobalVars { public static var continueTimeCost:Number; public static var lives:int; public static var damageMulti:Number; public static var enemiesNumber:Number; public static var enemiesNumberAdd:Number; public static var healthPriceMultiAdd:Number; public static var continueTime:Number; public static var timerAdd:Number; public static var timerStart:Number; public static var enemiesDamageAdd:Number; public static var trails:Boolean = true; public static var cash:int; public static var enemiesDamage:Number; public static var damageMultiAdd:Number; public static var enemiesAvailMax:Number; public static var ship:Object; public static var healthMulti:Number; public static var enemiesLife:Number; public static var healthMultiAdd:Number; public static var rocksArray:Array; public static var startingRocks:int = 3; public static var shipSize:Number = 20; public static var upHideWarning:Boolean = false; public static var stageWidth:int = 720; public static var enemiesAvail:Number; public static var screen:Sprite; public static var effectsScale:Number = 0.3; public static var enemiesRewardAdd:Number; public static var particulesAssets:MovieClip; public static var enemiesAvailAdd:Number; public static var powerUpDivider:Number = 20; public static var upReduceTime:Boolean = false; public static var upAntiShake:Boolean = false; public static var level:int; public static var slowMoTimer:Number = 0; public static var score:Number; public static var maxPowerups:int = 20; public static var shipX:Number; public static var shipY:Number; public static var shieldBlock:Number; public static var startingLives:int = 5; public static var userShip:Object; public static var healthMultiCost:Number; public static var bombsLeft:Number; public static var gameState:String; public static var multiplier:int; public static var stageHeight:int = 520; public static var continueTimePriceAdd:Number; public static var enemiesNumberMax:Number; public static var maxParticules:int = 160; public static var damagePriceMultiAdd:Number; public static var shipAssets:MovieClip; public static var stageTimer:Number; public static var shieldUp:Boolean = false; public static var frameRate:int = 35; public static var continueTimeAdd:Number; public static var enemiesReward:Number; public static var damageMultiCost:Number; public static var isPaused:Boolean = false; public static var game:Object; public static var enemiesLifeAdd:Number; } }//package net.odd1.AsteroidWar.global
Section 107
//Ressources (net.odd1.AsteroidWar.global.Ressources) package net.odd1.AsteroidWar.global { import flash.media.*; public final class Ressources { public static const PRELOADERSCREEN_PATH:String = "./assets/movieclips/screens/PreloaderScreen.swf"; public static const HUD_PATH:String = "./assets/movieclips/screens/hud.swf"; public static const SHIPASSETS_PATH:String = "./assets/movieclips/players/shipAssets.swf"; public static const PARTICULESASSETS_PATH:String = "./assets/movieclips/particules/particulesAssets.swf"; public static const GAMESCREEN_PATH:String = "./assets/movieclips/screens/GameScreen.swf"; public static var MUSICINTRO_CLASS:Class = Ressources_MUSICINTRO_CLASS; public static var hit4:Sound = new HIT4_CLASS(); public static var PARTICULESASSETS_CLASS:Class = Ressources_PARTICULESASSETS_CLASS; public static var HUD_CLASS:Class = Ressources_HUD_CLASS; public static var shoot1:Sound = new SHOOT1_CLASS(); public static var shoot2:Sound = new SHOOT2_CLASS(); public static var hit3:Sound = new HIT3_CLASS(); public static var DESTROY2_CLASS:Class = Ressources_DESTROY2_CLASS; public static var shoot4:Sound = new SHOOT4_CLASS(); public static var introMusic:Sound = new MUSICINTRO_CLASS(); public static var PRELOADERSCREEN_CLASS:Class = Ressources_PRELOADERSCREEN_CLASS; public static var BOMB_CLASS:Class = Ressources_BOMB_CLASS; public static var MUSIC_CLASS:Class = Ressources_MUSIC_CLASS; public static var destroy1:Sound = new DESTROY1_CLASS(); public static var SHOOT3_CLASS:Class = Ressources_SHOOT3_CLASS; public static var bomb:Sound = new BOMB_CLASS(); public static var SHOOT0_CLASS:Class = Ressources_SHOOT0_CLASS; public static var SHOOT2_CLASS:Class = Ressources_SHOOT2_CLASS; public static var SHOOT4_CLASS:Class = Ressources_SHOOT4_CLASS; public static var destroy2:Sound = new DESTROY2_CLASS(); public static var GAMESCREEN_CLASS:Class = Ressources_GAMESCREEN_CLASS; public static var HIT2_CLASS:Class = Ressources_HIT2_CLASS; public static var HIT4_CLASS:Class = Ressources_HIT4_CLASS; public static var HIT0_CLASS:Class = Ressources_HIT0_CLASS; public static var DESTROY1_CLASS:Class = Ressources_DESTROY1_CLASS; public static var SHIPASSETS_CLASS:Class = Ressources_SHIPASSETS_CLASS; public static var SHOOT1_CLASS:Class = Ressources_SHOOT1_CLASS; public static var mainMusic:Sound = new MUSIC_CLASS(); public static var DESTROY0_CLASS:Class = Ressources_DESTROY0_CLASS; public static var shoot0:Sound = new SHOOT0_CLASS(); public static var destroy0:Sound = new DESTROY0_CLASS(); public static var HIT1_CLASS:Class = Ressources_HIT1_CLASS; public static var HIT3_CLASS:Class = Ressources_HIT3_CLASS; public static var shoot3:Sound = new SHOOT3_CLASS(); public static var hit0:Sound = new HIT0_CLASS(); public static var hit1:Sound = new HIT1_CLASS(); public static var hit2:Sound = new HIT2_CLASS(); } }//package net.odd1.AsteroidWar.global
Section 108
//Ressources_BOMB_CLASS (net.odd1.AsteroidWar.global.Ressources_BOMB_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_BOMB_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 109
//Ressources_DESTROY0_CLASS (net.odd1.AsteroidWar.global.Ressources_DESTROY0_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_DESTROY0_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 110
//Ressources_DESTROY1_CLASS (net.odd1.AsteroidWar.global.Ressources_DESTROY1_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_DESTROY1_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 111
//Ressources_DESTROY2_CLASS (net.odd1.AsteroidWar.global.Ressources_DESTROY2_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_DESTROY2_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 112
//Ressources_GAMESCREEN_CLASS (net.odd1.AsteroidWar.global.Ressources_GAMESCREEN_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; import flash.utils.*; public class Ressources_GAMESCREEN_CLASS extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Ressources_GAMESCREEN_CLASS(){ dataClass = Ressources_GAMESCREEN_CLASS_dataClass; super(); initialWidth = (14400 / 20); initialHeight = (10400 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.global
Section 113
//Ressources_GAMESCREEN_CLASS_dataClass (net.odd1.AsteroidWar.global.Ressources_GAMESCREEN_CLASS_dataClass) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_GAMESCREEN_CLASS_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.global
Section 114
//Ressources_HIT0_CLASS (net.odd1.AsteroidWar.global.Ressources_HIT0_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HIT0_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 115
//Ressources_HIT1_CLASS (net.odd1.AsteroidWar.global.Ressources_HIT1_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HIT1_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 116
//Ressources_HIT2_CLASS (net.odd1.AsteroidWar.global.Ressources_HIT2_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HIT2_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 117
//Ressources_HIT3_CLASS (net.odd1.AsteroidWar.global.Ressources_HIT3_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HIT3_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 118
//Ressources_HIT4_CLASS (net.odd1.AsteroidWar.global.Ressources_HIT4_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HIT4_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 119
//Ressources_HUD_CLASS (net.odd1.AsteroidWar.global.Ressources_HUD_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; import flash.utils.*; public class Ressources_HUD_CLASS extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Ressources_HUD_CLASS(){ dataClass = Ressources_HUD_CLASS_dataClass; super(); initialWidth = (14400 / 20); initialHeight = (10400 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.global
Section 120
//Ressources_HUD_CLASS_dataClass (net.odd1.AsteroidWar.global.Ressources_HUD_CLASS_dataClass) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_HUD_CLASS_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.global
Section 121
//Ressources_MUSIC_CLASS (net.odd1.AsteroidWar.global.Ressources_MUSIC_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_MUSIC_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 122
//Ressources_MUSICINTRO_CLASS (net.odd1.AsteroidWar.global.Ressources_MUSICINTRO_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_MUSICINTRO_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 123
//Ressources_PARTICULESASSETS_CLASS (net.odd1.AsteroidWar.global.Ressources_PARTICULESASSETS_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; import flash.utils.*; public class Ressources_PARTICULESASSETS_CLASS extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Ressources_PARTICULESASSETS_CLASS(){ dataClass = Ressources_PARTICULESASSETS_CLASS_dataClass; super(); initialWidth = (11000 / 20); initialHeight = (8000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.global
Section 124
//Ressources_PARTICULESASSETS_CLASS_dataClass (net.odd1.AsteroidWar.global.Ressources_PARTICULESASSETS_CLASS_dataClass) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_PARTICULESASSETS_CLASS_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.global
Section 125
//Ressources_PRELOADERSCREEN_CLASS (net.odd1.AsteroidWar.global.Ressources_PRELOADERSCREEN_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; import flash.utils.*; public class Ressources_PRELOADERSCREEN_CLASS extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Ressources_PRELOADERSCREEN_CLASS(){ dataClass = Ressources_PRELOADERSCREEN_CLASS_dataClass; super(); initialWidth = (14400 / 20); initialHeight = (10400 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.global
Section 126
//Ressources_PRELOADERSCREEN_CLASS_dataClass (net.odd1.AsteroidWar.global.Ressources_PRELOADERSCREEN_CLASS_dataClass) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_PRELOADERSCREEN_CLASS_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.global
Section 127
//Ressources_SHIPASSETS_CLASS (net.odd1.AsteroidWar.global.Ressources_SHIPASSETS_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; import flash.utils.*; public class Ressources_SHIPASSETS_CLASS extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Ressources_SHIPASSETS_CLASS(){ dataClass = Ressources_SHIPASSETS_CLASS_dataClass; super(); initialWidth = (11000 / 20); initialHeight = (8000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.global
Section 128
//Ressources_SHIPASSETS_CLASS_dataClass (net.odd1.AsteroidWar.global.Ressources_SHIPASSETS_CLASS_dataClass) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHIPASSETS_CLASS_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.global
Section 129
//Ressources_SHOOT0_CLASS (net.odd1.AsteroidWar.global.Ressources_SHOOT0_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHOOT0_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 130
//Ressources_SHOOT1_CLASS (net.odd1.AsteroidWar.global.Ressources_SHOOT1_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHOOT1_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 131
//Ressources_SHOOT2_CLASS (net.odd1.AsteroidWar.global.Ressources_SHOOT2_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHOOT2_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 132
//Ressources_SHOOT3_CLASS (net.odd1.AsteroidWar.global.Ressources_SHOOT3_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHOOT3_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 133
//Ressources_SHOOT4_CLASS (net.odd1.AsteroidWar.global.Ressources_SHOOT4_CLASS) package net.odd1.AsteroidWar.global { import mx.core.*; public class Ressources_SHOOT4_CLASS extends SoundAsset { } }//package net.odd1.AsteroidWar.global
Section 134
//SoundPlayer (net.odd1.AsteroidWar.global.SoundPlayer) package net.odd1.AsteroidWar.global { import net.odd1.minig.managers.*; public class SoundPlayer { public static function shootSound(_arg1:int):void{ SoundManager.getInstance().playSound(Ressources[("shoot" + _arg1)], 0, false, 1); } public static function hitSound():void{ var _local1:int = (Math.random() * 5); SoundManager.getInstance().playSound(Ressources[("hit" + _local1)], 0, false, 1); } public static function bombSound():void{ SoundManager.getInstance().playSound(Ressources.bomb, 0, false, 1); } public static function explodeSound():void{ var _local1:int = (Math.random() * 2); SoundManager.getInstance().playSound(Ressources[("destroy" + _local1)], 0, false, 1); } } }//package net.odd1.AsteroidWar.global
Section 135
//Version (net.odd1.AsteroidWar.global.Version) package net.odd1.AsteroidWar.global { public final class Version { public static var BUILD_AUTHOR:String = "jdboivin"; public static var BUILD_NUMBER:String = "321"; public static var BUILD_TIME:String = "08.06.2009 11:56"; } }//package net.odd1.AsteroidWar.global
Section 136
//Controls (net.odd1.AsteroidWar.particules.Controls) package net.odd1.AsteroidWar.particules { import flash.display.*; import net.odd1.AsteroidWar.screens.*; public class Controls extends Sprite { private var display:MovieClip; public function Controls(_arg1:MovieClip){ this.display = _arg1; visible = false; addChild(_arg1); } public function render(_arg1:Number):void{ x = GameScreen.userShip.x; y = GameScreen.userShip.y; } } }//package net.odd1.AsteroidWar.particules
Section 137
//Cursor (net.odd1.AsteroidWar.particules.Cursor) package net.odd1.AsteroidWar.particules { import flash.display.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.minig.display.*; import net.odd1.AsteroidWar.global.*; import net.odd1.minig.global.*; import flash.ui.*; public class Cursor extends SpriteInt { private var display:MovieClip; private var mouseHidden:Boolean;// = false public function Cursor(_arg1:MovieClip){ this.display = _arg1; visible = false; addChild(_arg1); } public function render(_arg1:Number):void{ if (!GameScreen.isInContinue){ if ((((((GlobalVars.gameState == "surviving")) || ((GlobalVars.gameState == "motherComing")))) || ((GlobalVars.gameState == "motherThere")))){ if (!mouseHidden){ Mouse.hide(); visible = true; mouseHidden = true; }; x = GlobalVariables.stage.mouseX; y = GlobalVariables.stage.mouseY; } else { if (mouseHidden){ Mouse.show(); visible = false; mouseHidden = false; }; }; } else { if (mouseHidden){ Mouse.show(); visible = false; mouseHidden = false; }; }; } } }//package net.odd1.AsteroidWar.particules
Section 138
//Particule (net.odd1.AsteroidWar.particules.Particule) package net.odd1.AsteroidWar.particules { import flash.display.*; public class Particule extends Sprite { private var size:Number; private var display:MovieClip; public var isAlive:Boolean; private var speed:Number; private var angle:Number; private var ys:Number;// = 0 private var lifeSpan:Number; private var rotSpeed:Number;// = 0 private var xs:Number;// = 0 private var life:Number; public function Particule(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Boolean){ addChild(_arg1); isAlive = true; this.display = _arg1; this.size = _arg6; this.speed = _arg5; this.angle = _arg4; getSpeeds(); x = _arg2; y = _arg3; getSpeeds(); this.lifeSpan = _arg7; life = lifeSpan; scaleX = (_arg6 * 2); scaleY = (_arg6 * 2); this.rotation = _arg4; if (_arg8){ rotSpeed = (0.5 - Math.random()); getSpeedsRandom(); }; } public function getSpeeds():void{ xs = cXspeed(); ys = cYspeed(); } public function cXspeed():Number{ return ((Math.cos(((Math.PI / 180) * angle)) * 15)); } public function cYspeedRandom():Number{ return ((Math.sin(((Math.PI / 180) * (Math.random() * 360))) * 15)); } public function render(_arg1:Number):void{ x = (x - (((xs * 4) * _arg1) * speed)); y = (y - (((ys * 4) * _arg1) * speed)); life = (life - _arg1); alpha = (life / lifeSpan); if (life < 0){ isAlive = false; }; if (rotSpeed != 0){ rotation = (rotation + ((rotSpeed * _arg1) * 50)); speed = (speed / (1 + _arg1)); } else { speed = (speed / (1 + (_arg1 * 3))); }; } public function getSpeedsRandom():void{ xs = cXspeedRandom(); ys = cYspeedRandom(); } public function cYspeed():Number{ return ((Math.sin(((Math.PI / 180) * angle)) * 15)); } public function cXspeedRandom():Number{ return ((Math.cos(((Math.PI / 180) * (Math.random() * 360))) * 15)); } } }//package net.odd1.AsteroidWar.particules
Section 139
//ParticulesClass (net.odd1.AsteroidWar.particules.ParticulesClass) package net.odd1.AsteroidWar.particules { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class ParticulesClass extends Sprite { private var particules:Array; private var content:MovieClip; private var max:int; public function ParticulesClass(){ particules = new Array(); max = GlobalVars.maxParticules; content = GlobalVars.particulesAssets; } public function createParticule(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Boolean=false):void{ var _local9:Class = (content.loaderInfo.applicationDomain.getDefinition(_arg1) as Class); var _local10:Particule = new Particule(new (_local9), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); addChild(_local10); particules.push(_local10); } public function render(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Particule; var _local5:Array; var _local6:int; _local5 = new Array(); _local3 = particules.length; _local2 = 0; while (_local2 < _local3) { _local4 = particules[_local2]; if (!_local4.isAlive){ removeChild(_local4); _local5.push(_local4); } else { _local4.render(_arg1); }; _local2++; }; _local3 = _local5.length; _local2 = 0; while (_local2 < _local3) { particules.splice(particules.indexOf(_local5[_local2]), 1); _local2++; }; if ((particules.length - 1) > max){ _local6 = ((particules.length - 1) - max); _local2 = 0; while (_local2 < _local6) { particules[_local2].isAlive = false; _local2++; }; }; } public function cleanAll():void{ var _local1:int; var _local2:int; var _local3:Particule; var _local4:Array; _local2 = particules.length; _local1 = 0; while (_local1 < _local2) { _local3 = particules[_local1]; _local3.isAlive = false; _local1++; }; } } }//package net.odd1.AsteroidWar.particules
Section 140
//Enemy (net.odd1.AsteroidWar.players.Enemy) package net.odd1.AsteroidWar.players { import flash.display.*; import flash.geom.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.bombs.*; import net.odd1.minig.display.*; import net.odd1.AsteroidWar.global.*; import net.odd1.minig.global.*; public class Enemy extends MovieclipInt { private var missilesCoord:Array; public var waypoint:Number; public var hp:int; private var turningSpeed:Number; private var shootSide:int;// = 0 private var fireRateMissile:Number; public var size:Number; private var ys:Number;// = 0 private var id:int; private var thrustTimerR:Number;// = -0.3 private var firesight:int;// = 90000 private var AI:String;// = "chase" private var reward:int; public var targetTimer:Number;// = 0.5 private var resistance:Number;// = 0.7 private var fireRate:Number; private var canShoot:Boolean; private var fireRateMissileR:Number; private var turning:Number; private var speed:Number; private var missileTurningSpeed:Number; private var collideDamage:Number; private var roundsPerShot:int; private var numberOfMissileShots:int; private var shotsPerRaid:int; private var collide:Boolean; private var shooting:Boolean; private var shootSoundId:int; private var weaponsCoord:Array; private var damage:Number; private var bulletSpeed:Number; private var acc:Number;// = 0 private var numberOfShots:int; private var sight:int;// = 10000 public var targetTimerR:Number;// = 0 private var bulletName:String; private var damageMissile:Number; private var missileSpeed:Number; private var vx:Number;// = 0 public var isAlive:Boolean;// = true private var shotsPerRaidR:int; private var vy:Number;// = 0 private var thrustTimer:Number;// = 0.01 private var missileName:String; private var fireRateR:Number; private var shipDisplay:MovieClip; public var targetX:Number; private var roundsPerMissileShot:int; private var lrot:Number;// = 0 private var collided:Boolean;// = false public var targetY:Number; private var canShootMissile:Boolean; private var rot:Number;// = 0 private var xs:Number;// = 0 private var shootMissileSide:int;// = 0 public function Enemy(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number){ var enemyId = _arg1; var xPos = _arg2; var yPos = _arg3; var angle = _arg4; turningSpeed = (2 + (Math.random() / 5)); turning = (turningSpeed * (Math.PI / 180)); super(); id = enemyId; var shipContent:Class = (GlobalVars.shipAssets.loaderInfo.applicationDomain.getDefinition("shipAssets") as Class); shipDisplay = new (shipContent); addChild(shipDisplay); shipDisplay.gotoAndStop((enemyId + 2)); x = xPos; y = yPos; rot = angle; shipDisplay.addFrameScript((enemyId + 1), function ():void{ shipDisplay.addFrameScript((shipDisplay.currentFrame - 1), null); updateData(); }); } public function cXspeed():Number{ return ((((Math.cos(((Math.PI / 180) * (rot - 90))) * acc) * speed) / 100)); } private function updateData():void{ var _local1:XMLList; var _local2:XMLList; var _local3:XML; var _local4:String; var _local5:String; missileTurningSpeed = 4; shotsPerRaidR = 0; _local1 = GlobalVariables.data.game.enemies; _local2 = _local1.enemy[id].@*; for each (_local3 in _local2) { _local5 = String(_local3.name()); _local4 = String(_local3); if (_local4 == "true"){ this[_local5] = true; } else { if (_local4 == "false"){ this[_local5] = false; } else { if (_local4.charAt(0) == "s"){ this[_local5] = _local4.substring(1); } else { this[_local5] = Number(_local4); }; }; }; }; shootSide = 0; shotsPerRaidR = shotsPerRaid; cacheWeapons(); turning = (turningSpeed * (Math.PI / 180)); hp = (hp * GlobalVars.enemiesLife); damage = (damage * GlobalVars.enemiesDamage); damageMissile = (damageMissile * GlobalVars.enemiesDamage); reward = (reward * GlobalVars.enemiesReward); } private function deadExplosion():void{ var _local1:int; GameScreen.particules.createParticule("explosion", x, y, Number((Math.random() * 360)), 0, 0.6, 1); } private function shootParts(_arg1:Number, _arg2:Number):void{ } private function getDistance2(_arg1:Number, _arg2:Number):Number{ var _local3:Number = (x - _arg1); var _local4:Number = (y - _arg2); var _local5:Number = ((_local3 * _local3) + (_local4 * _local4)); return (_local5); } public function getVectors(_arg1:Number):void{ vx = (vx + ((xs * 100) * _arg1)); vy = (vy + ((ys * 100) * _arg1)); vx = (vx / (1 + (resistance * _arg1))); vy = (vy / (1 + (resistance * _arg1))); } public function getSpeeds():void{ xs = cXspeed(); ys = cYspeed(); } private function getDistance():Number{ var _local1:Number = (x - targetX); var _local2:Number = (y - targetY); var _local3:Number = ((_local1 * _local1) + (_local2 * _local2)); return (_local3); } public function render(_arg1:Number):void{ var _local2:Bomb; var _local3:Number; var _local5:Number; var _local6:Number; var _local7:Point; var _local8:Point; var _local9:int; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local4:Array = GameScreen.bombsLayer.bombs; for each (_local2 in _local4) { _local16 = getDistance2(_local2.x, _local2.y); _local3 = (_local2.size * _local2.radius); if (_local16 < (_local3 * _local3)){ _local5 = (1 - ((_local16 - (_local3 * _local3)) / (_local3 * _local3))); _arg1 = (_arg1 / (_local5 * _local5)); break; }; }; if (id < 6){ targetTimerR = (targetTimerR + _arg1); if (targetTimerR >= targetTimer){ if (AI == "chase"){ targetX = (GlobalVars.shipX + ((0.5 - Math.random()) * 30)); targetY = (GlobalVars.shipY + ((0.5 - Math.random()) * 30)); targetTimerR = 0; } else { if (AI == "shoot"){ targetX = (x + (xs * 5)); targetY = (y + (ys * 5)); targetTimerR = 0; } else { if (AI == "getReturn"){ targetX = (Math.random() * 720); targetY = (Math.random() * 520); AI = "return"; shooting = false; }; }; }; }; if (AI == "shoot"){ shooting = true; }; if (shooting){ if (canShoot){ fireRateR = (fireRateR + _arg1); if (fireRateR >= fireRate){ _local9 = roundsPerShot; while (_local9 > 0) { _local7 = weaponsCoord[shootSide][0]; _local8 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local7)); GameScreen.bullets.createBullet(bulletName, _local8.x, _local8.y, (rotation + weaponsCoord[shootSide][1]), bulletSpeed, damage, 5, 1, false, 0); shootParts(_local8.x, _local8.y); shootSide++; SoundPlayer.shootSound(shootSoundId); if (shootSide == numberOfShots){ shootSide = 0; }; _local9--; }; fireRateR = 0; shotsPerRaidR--; }; }; if (canShootMissile){ fireRateMissileR = (fireRateMissileR + _arg1); if (fireRateMissileR >= fireRateMissile){ _local9 = roundsPerMissileShot; while (_local9 > 0) { _local7 = missilesCoord[shootMissileSide][0]; _local8 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local7)); GameScreen.bullets.createBullet(missileName, _local8.x, _local8.y, (rotation + missilesCoord[shootMissileSide][1]), missileSpeed, damageMissile, 4, 1, true, missileTurningSpeed); shootParts(_local8.x, _local8.y); shootMissileSide++; SoundPlayer.shootSound(shootSoundId); if (shootMissileSide == numberOfMissileShots){ shootMissileSide = 0; }; _local9--; }; fireRateMissileR = 0; shotsPerRaidR--; }; }; if (shotsPerRaidR <= 0){ shotsPerRaidR = shotsPerRaid; AI = "getReturn"; }; }; if (acc < 1){ acc = (acc + _arg1); }; if (acc > 1){ acc = 1; }; if ((((AI == "chase")) || ((AI == "return")))){ _local10 = ((turning * _arg1) * 60); _local11 = lrot; lrot = rot; _local12 = Math.atan(((x - targetX) / (targetY - y))); if (targetY > y){ _local12 = (_local12 + Math.PI); }; if (_local12 < 0){ _local12 = (_local12 + (Math.PI * 2)); } else { if (_local12 >= (Math.PI * 2)){ _local12 = (_local12 - (Math.PI * 2)); }; }; _local13 = (rot * (Math.PI / 180)); if (_local13 < 0){ _local13 = (_local13 + (Math.PI * 2)); } else { if (_local13 >= (Math.PI * 2)){ _local13 = (_local13 - (Math.PI * 2)); }; }; _local14 = (_local12 - _local13); if (_local14 < 0){ _local14 = (_local14 + (Math.PI * 2)); } else { if (_local14 >= (Math.PI * 2)){ _local14 = (_local14 - (Math.PI * 2)); }; }; if ((((_local13 < ((_local12 - (_local10 / 2)) + _local10))) && ((_local13 > (_local12 - (_local10 / 2)))))){ _local13 = _local12; } else { if (_local14 <= Math.PI){ _local13 = (_local13 + _local10); } else { _local13 = (_local13 - _local10); }; }; if (rot == 0){ rot++; _local13 = (rot * (Math.PI / 180)); }; rot = ((_local13 * 180) / Math.PI); rotation = (rot - 90); }; getSpeeds(); getVectors(_arg1); x = (x + ((vx * 100) * _arg1)); y = (y + ((vy * 100) * _arg1)); _local6 = getDistance(); if (AI == "chase"){ if (id != 2){ if ((((_local6 < firesight)) && ((_local14 < 0.1)))){ AI = "shoot"; }; }; } else { if (_local6 < sight){ if (AI == "return"){ AI = "chase"; }; }; }; if (hp <= 0){ SoundPlayer.explodeSound(); GlobalVars.multiplier++; GlobalVars.game.gainScore(reward); GlobalVars.game.updateHudScore(); if (!collided){ GameScreen.powerups.createPowerup("powerUpRed", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 0); GameScreen.powerups.createPowerup("powerUpBlue", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 1); GameScreen.powerups.createPowerup("powerUpRed", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 0); GameScreen.powerups.createPowerup("powerUpBlue", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 1); _local15 = Math.random(); if (_local15 < 0.15){ GameScreen.powerups.createPowerup("powerUpSlow", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 2); }; if ((((_local15 < 0.3)) && ((_local15 > 0.1)))){ GameScreen.powerups.createPowerup("powerUpBomb", (x + ((0.5 - Math.random()) * size)), (y + ((0.5 - Math.random()) * size)), 8, 20, 3); }; }; deadExplosion(); isAlive = false; }; if (collide){ _local16 = getDistance2(GlobalVars.shipX, GlobalVars.shipY); _local17 = GlobalVars.shipSize; if (_local16 < (_local17 * _local17)){ hp = 0; GlobalVars.game.playerDamage(collideDamage); collided = true; }; }; }; } public function cYspeed():Number{ return ((((Math.sin(((Math.PI / 180) * (rot - 90))) * acc) * speed) / 100)); } private function cacheWeapons():void{ var _local1:int; var _local2:Number; var _local3:Point; var _local4:Array; weaponsCoord = new Array(); missilesCoord = new Array(); _local1 = 0; while (_local1 < numberOfShots) { _local2 = shipDisplay.ship.weapons[("w" + _local1)].rotation; _local3 = new Point(shipDisplay.ship.weapons[("w" + _local1)].x, shipDisplay.ship.weapons[("w" + _local1)].y); _local4 = new Array(_local3, _local2); weaponsCoord.push(_local4); _local1++; }; _local1 = 0; while (_local1 < numberOfMissileShots) { _local2 = shipDisplay.ship.weapons[("m" + _local1)].rotation; _local3 = new Point(shipDisplay.ship.weapons[("m" + _local1)].x, shipDisplay.ship.weapons[("m" + _local1)].y); _local4 = new Array(_local3, _local2); missilesCoord.push(_local4); _local1++; }; } } }//package net.odd1.AsteroidWar.players
Section 141
//EnemyManagerClass (net.odd1.AsteroidWar.players.EnemyManagerClass) package net.odd1.AsteroidWar.players { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class EnemyManagerClass extends Sprite { public var content:MovieClip; public var enemies:Array; public function EnemyManagerClass(){ enemies = new Array(); content = GlobalVars.shipAssets; } public function render(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Enemy; var _local5:Array; _local5 = new Array(); _local3 = enemies.length; _local2 = 0; while (_local2 < _local3) { _local4 = enemies[_local2]; if (!_local4.isAlive){ removeChild(_local4); _local5.push(_local4); } else { _local4.render(_arg1); }; _local2++; }; _local3 = _local5.length; _local2 = 0; while (_local2 < _local3) { enemies.splice(enemies.indexOf(_local5[_local2]), 1); _local2++; }; } public function cleanAll():void{ var _local1:int; var _local2:int; var _local3:Enemy; var _local4:Array; _local2 = enemies.length; _local1 = 0; while (_local1 < _local2) { _local3 = enemies[_local1]; _local3.isAlive = false; _local1++; }; } public function createEnemy(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number):void{ var _local5:Enemy = new Enemy(_arg1, _arg2, _arg3, _arg4); addChild(_local5); enemies.push(_local5); } } }//package net.odd1.AsteroidWar.players
Section 142
//Mother (net.odd1.AsteroidWar.players.Mother) package net.odd1.AsteroidWar.players { import flash.display.*; import flash.geom.*; import gs.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.global.*; import gs.easing.*; public class Mother extends MovieClip { private var shootMissileSide:int;// = 0 public var hp:Number; public var isReadyToShoot:Boolean; private var fireRateMissile:Number; private var shootSide:int;// = 0 private var numberOfShots:int; private var bulletName:String; private var canShoot:Boolean; public var firstDie:Boolean; private var fireRate:Number; private var damageMissile:Number; private var missileSpeed:Number; private var fireRateMissileR:Number; private var missileName:String; private var roundsPerShot:int; private var numberOfMissileShots:int; private var fireRateR:Number; private var weaponsCoord:Array; private var bulletSpeed:Number; private var shipDisplay:MovieClip; private var missilesCoord:Array; private var roundsPerMissileShot:int; private var canShootMissile:Boolean; private var damage:Number; public function Mother(_arg1:Class){ firstDie = true; isReadyToShoot = false; shipDisplay = new (_arg1); addChild(shipDisplay); x = (GlobalVars.stageWidth / 2); y = (GlobalVars.stageHeight / 2); shipDisplay.cacheAsBitmap = true; hp = 16; } private function shootParts(_arg1:Number, _arg2:Number):void{ GameScreen.particules.createParticule("circleWhite", _arg1, _arg2, Number((Math.random() * 360)), 0, 2, 0.1); } private function cacheWeapons():void{ var _local1:int; var _local2:Number; var _local3:Point; var _local4:Array; weaponsCoord = new Array(); missilesCoord = new Array(); _local1 = 0; while (_local1 < numberOfShots) { _local2 = shipDisplay[("w" + _local1)].rotation; _local3 = new Point(shipDisplay[("w" + _local1)].x, shipDisplay[("w" + _local1)].y); _local4 = new Array(_local3, _local2); weaponsCoord.push(_local4); _local1++; }; _local1 = 0; while (_local1 < numberOfMissileShots) { _local2 = shipDisplay[("m" + _local1)].rotation; _local3 = new Point(shipDisplay[("m" + _local1)].x, shipDisplay[("m" + _local1)].y); _local4 = new Array(_local3, _local2); missilesCoord.push(_local4); _local1++; }; } private function afterMoveDown():void{ setWeaponStats(); cacheWeapons(); hp = 16; isReadyToShoot = true; GlobalVars.gameState = "motherThere"; } public function moveDown():void{ visible = true; TweenMax.to(this, 3, {x:(GlobalVars.stageWidth / 2), y:(GlobalVars.stageHeight / 2), ease:Sine.easeOut, onComplete:afterMoveDown}); } private function setWeaponStats():void{ numberOfShots = 8; roundsPerShot = 2; canShoot = true; fireRate = 0.6; fireRateR = 0; numberOfMissileShots = 8; roundsPerMissileShot = 2; canShootMissile = true; fireRateMissile = 0.4; fireRateMissileR = 0; damage = 100; damageMissile = 100; bulletName = "UB1"; bulletSpeed = 10; missileName = "MM"; missileSpeed = 10; shootSide = 0; } public function reset():void{ firstDie = true; isReadyToShoot = false; x = (GlobalVars.stageWidth / 2); y = (GlobalVars.stageHeight / 2); hp = 16; visible = true; } public function step(_arg1:Number):void{ var _local2:int; var _local3:Point; var _local4:Point; var _local5:Point; var _local6:Point; var _local7:int; if (hp == 0){ visible = false; _local2 = 0; while (_local2 < 9) { _local3 = new Point(shipDisplay[("p" + _local2)].x, shipDisplay[("p" + _local2)].y); _local4 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local3)); GameScreen.particules.createParticule(("motherPart" + _local2), _local4.x, _local4.y, 0, (1 + (Math.random() * 1)), 0.5, (1 + (Math.random() * 2)), true); _local2++; }; hp = -10; x = (GlobalVars.stageWidth / 2); y = -300; GlobalVars.gameState = "quitQueenStart"; if (firstDie){ GlobalVars.userShip.visible = true; GameScreen.controls.visible = true; GlobalVars.userShip.myTimer.start(); GlobalVars.game.hud.hud.visible = true; firstDie = false; }; }; if (GlobalVars.gameState == "getMother"){ moveDown(); GlobalVars.gameState = "motherComing"; }; if (GlobalVars.gameState == "motherComing"){ GameScreen.isShaking = true; }; if (isReadyToShoot){ if (GlobalVars.gameState == "goingMother"){ isReadyToShoot = false; }; if (canShoot){ fireRateR = (fireRateR + _arg1); if (fireRateR >= fireRate){ _local7 = roundsPerShot; while (_local7 > 0) { _local5 = weaponsCoord[shootSide][0]; _local6 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local5)); GameScreen.bullets.createBullet(bulletName, _local6.x, _local6.y, (rotation + weaponsCoord[shootSide][1]), bulletSpeed, damage, 5, 0, false, 0); shootParts(_local6.x, _local6.y); SoundPlayer.shootSound(0); shootSide++; if (shootSide == numberOfShots){ shootSide = 0; }; _local7--; }; fireRateR = 0; }; }; if (canShootMissile){ fireRateMissileR = (fireRateMissileR + _arg1); if (fireRateMissileR >= fireRateMissile){ _local7 = roundsPerMissileShot; while (_local7 > 0) { _local5 = missilesCoord[shootMissileSide][0]; _local6 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local5)); GameScreen.bullets.createBullet(missileName, _local6.x, _local6.y, (rotation + missilesCoord[shootMissileSide][1]), missileSpeed, damageMissile, 4, 0, true, 10); shootParts(_local6.x, _local6.y); SoundPlayer.shootSound(0); shootMissileSide++; if (shootMissileSide == numberOfMissileShots){ shootMissileSide = 0; }; _local7--; }; fireRateMissileR = 0; }; }; }; } } }//package net.odd1.AsteroidWar.players
Section 143
//Queen (net.odd1.AsteroidWar.players.Queen) package net.odd1.AsteroidWar.players { import flash.display.*; import flash.geom.*; import gs.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.global.*; import gs.easing.*; public class Queen extends MovieClip { private var shootMissileSide:int;// = 0 private var isReadyToShoot:Boolean; private var fireRateMissile:Number; private var shootSide:int;// = 0 private var numberOfShots:int; private var bulletName:String; private var canShoot:Boolean; private var fireRate:Number; private var damageMissile:Number; private var missileSpeed:Number; private var fireRateMissileR:Number; private var shotsPerRaid:int; private var missileName:String; private var roundsPerShot:int; private var numberOfMissileShots:int; private var fireRateR:Number; private var weaponsCoord:Array; private var bulletSpeed:Number; private var shipDisplay:MovieClip; private var missilesCoord:Array; private var roundsPerMissileShot:int; private var canShootMissile:Boolean; private var damage:Number; public function Queen(_arg1:Class){ isReadyToShoot = false; shipDisplay = new (_arg1); addChild(shipDisplay); x = -600; y = GlobalVars.stageHeight; shipDisplay.cacheAsBitmap = true; visible = false; } private function shootParts(_arg1:Number, _arg2:Number):void{ GameScreen.particules.createParticule("circleWhite", _arg1, _arg2, Number((Math.random() * 360)), 0, 2, 0.1); } private function setWeaponStats():void{ numberOfShots = 0; roundsPerShot = 0; canShoot = false; fireRate = 0; fireRateR = 0; numberOfMissileShots = 8; roundsPerMissileShot = 1; canShootMissile = true; fireRateMissile = 0.05; fireRateMissileR = 0; damage = 100; damageMissile = 100; bulletName = "UB1"; bulletSpeed = 5; missileName = "QM"; missileSpeed = 5; shootSide = 0; shotsPerRaid = 16; } public function moveRight():void{ visible = true; TweenMax.to(this, 2, {x:(GlobalVars.stageWidth / 2), y:GlobalVars.stageHeight, ease:Sine.easeOut, onComplete:afterMove}); } private function afterMove():void{ setWeaponStats(); cacheWeapons(); isReadyToShoot = true; GlobalVars.gameState = "queenFiring"; } public function reset():void{ isReadyToShoot = false; x = -600; y = GlobalVars.stageHeight; visible = false; } public function step(_arg1:Number):void{ var _local2:Point; var _local3:Point; var _local4:int; if (GlobalVars.gameState == "byeMotherStart"){ moveRight(); GlobalVars.gameState = "queenComing"; }; if (GlobalVars.gameState == "queenComing"){ GameScreen.isShaking = true; }; if ((((GlobalVars.gameState == "surviving")) && ((visible == true)))){ GameScreen.isShaking = true; }; if (GlobalVars.gameState == "quitQueenStart"){ GlobalVars.gameState = "surviving"; GlobalVars.game.initRound(); goAway(); }; if (((isReadyToShoot) && ((GlobalVars.gameState == "queenFiring")))){ if (GlobalVars.gameState == "queenDoneFiring"){ isReadyToShoot = false; }; if (canShoot){ fireRateR = (fireRateR + _arg1); if (fireRateR >= fireRate){ _local4 = roundsPerShot; while (_local4 > 0) { _local2 = weaponsCoord[shootSide][0]; _local3 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local2)); GameScreen.bullets.createBullet(bulletName, _local3.x, _local3.y, (rotation + weaponsCoord[shootSide][1]), bulletSpeed, damage, 5, 2, false, 0); shootParts(_local3.x, _local3.y); shootSide++; SoundPlayer.shootSound(0); if (shootSide == numberOfShots){ shootSide = 0; }; _local4--; }; fireRateR = 0; }; }; if (canShootMissile){ fireRateMissileR = (fireRateMissileR + _arg1); if (fireRateMissileR >= fireRateMissile){ _local4 = roundsPerMissileShot; while (_local4 > 0) { _local2 = missilesCoord[shootMissileSide][0]; _local3 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local2)); GameScreen.bullets.createBullet(missileName, _local3.x, _local3.y, (rotation + missilesCoord[shootMissileSide][1]), missileSpeed, damageMissile, 4, 2, true, 10); shootParts(_local3.x, _local3.y); shootMissileSide++; SoundPlayer.shootSound(0); if (shootMissileSide == numberOfMissileShots){ shootMissileSide = 0; }; shotsPerRaid--; _local4--; }; fireRateMissileR = 0; }; }; if (shotsPerRaid <= 0){ }; }; } public function afterGoAway():void{ visible = false; x = -600; y = GlobalVars.stageHeight; } private function cacheWeapons():void{ var _local1:int; var _local2:Number; var _local3:Point; var _local4:Array; weaponsCoord = new Array(); missilesCoord = new Array(); _local1 = 0; while (_local1 < numberOfShots) { _local2 = shipDisplay[("w" + _local1)].rotation; _local3 = new Point(shipDisplay[("w" + _local1)].x, shipDisplay[("w" + _local1)].y); _local4 = new Array(_local3, _local2); weaponsCoord.push(_local4); _local1++; }; _local1 = 0; while (_local1 < numberOfMissileShots) { _local2 = shipDisplay[("m" + _local1)].rotation; _local3 = new Point(shipDisplay[("m" + _local1)].x, shipDisplay[("m" + _local1)].y); _local4 = new Array(_local3, _local2); missilesCoord.push(_local4); _local1++; }; } public function goAway():void{ TweenMax.to(this, 2, {x:(GlobalVars.stageWidth + 600), y:GlobalVars.stageHeight, ease:Sine.easeIn, onComplete:afterGoAway}); } } }//package net.odd1.AsteroidWar.players
Section 144
//User (net.odd1.AsteroidWar.players.User) package net.odd1.AsteroidWar.players { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; import gs.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.global.*; import gs.easing.*; import net.odd1.minig.global.*; public class User extends MovieClip { private var targetY:Number; public var size:Number;// = 6 public var hp:Number; public var kLEFT:Boolean;// = false private var shootSide:int;// = 0 private var fireRateMissile:Number; private var waypoint:Number; public var weapon:int;// = 0 private var rot:Number;// = 0 private var controlsChanged:Boolean;// = true private var turningSpeed:Number;// = 30 private var thrustTimerR:Number;// = 0 private var ys:Number;// = 0 private var canShoot:Boolean; private var goingUp:Boolean; private var fireRate:Number; private var resistance:Number;// = 0.7 private var fireRateMissileR:Number; private var turning:Number; public var kUP:Boolean;// = false private var speed:Number; public var hull:int;// = 0 private var roundsPerShot:int; private var numberOfMissileShots:int; public var myTimer2:Timer; private var accAdd:Number;// = 1 private var weaponsCoord:Array; public var shield:int;// = 0 private var damage:Number; public var kRIGHT:Boolean;// = false private var bulletSpeed:Number; private var acc:Number;// = 0 public var shieldTimeFull:Number; public var kDOWN:Boolean;// = false public var maxHp:Number; public var kSHIELD:Boolean;// = false private var targetRot:Number;// = 50 private var numberOfShots:int; public var kBOMB:Boolean;// = false public var shieldBlock:Number; private var bulletName:String; private var damageMissile:Number; private var missileSpeed:Number; private var vx:Number;// = 0 private var vy:Number;// = 0 private var quart:Number;// = 0.785398163397448 private var thrustTimer:Number;// = 0.03 private var missileName:String; private var angle:Number;// = 0 public var shieldTime:Number; private var fireRateR:Number; private var shipDisplay:MovieClip; private var targetX:Number; private var missilesCoord:Array; private var lrot:Number;// = 0 private var roundsPerMissileShot:int; private var canShootMissile:Boolean; public var myTimer:Timer; private var xs:Number;// = 0 private var shootMissileSide:int;// = 0 public function User(_arg1:Class){ var display = _arg1; myTimer = new Timer(7000, 1); myTimer2 = new Timer(2000, 1); turning = (turningSpeed * (Math.PI / 180)); super(); shipDisplay = new (display); addChild(shipDisplay); shipDisplay.gotoAndStop(1); x = GlobalVars.shipX; y = GlobalVars.shipY; myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler); shipDisplay.addFrameScript(0, function ():void{ shipDisplay.addFrameScript((shipDisplay.currentFrame - 1), null); updateData(); }); visible = false; shipDisplay.ship.shield.visible = false; rot = rotation; } public function cXspeed():Number{ return ((((Math.cos(((Math.PI / 180) * angle)) * acc) * speed) / 100)); } public function updateData():void{ var node:XMLList; var attributes:XMLList; var attribute:XML; var value:String; var name:String; shipDisplay.ship.weapons.gotoAndStop((weapon + 1)); shipDisplay.ship.weapons.addFrameScript(weapon, function ():void{ shipDisplay.ship.weapons.addFrameScript((shipDisplay.ship.weapons.currentFrame - 1), null); cacheWeapons(); }); shipDisplay.ship.shape.gotoAndStop((hull + 1)); node = GlobalVariables.data.game.weapons; attributes = node.weapon[weapon].@*; for each (attribute in attributes) { name = String(attribute.name()); value = String(attribute); if (value == "true"){ this[name] = true; } else { if (value == "false"){ this[name] = false; } else { if (value.charAt(0) == "s"){ this[name] = value.substring(1); } else { this[name] = Number(value); }; }; }; }; node = GlobalVariables.data.game.hulls; attributes = node.hull[hull].@*; for each (attribute in attributes) { name = String(attribute.name()); value = String(attribute); this[name] = Number(value); }; node = GlobalVariables.data.game.shields; attributes = node.shield[shield].@*; for each (attribute in attributes) { name = String(attribute.name()); value = String(attribute); this[name] = Number(value); }; hp = (hp * GlobalVars.healthMulti); damage = (damage * GlobalVars.damageMulti); maxHp = hp; shieldTimeFull = shieldTime; shootSide = 0; GlobalVars.game.updateHudHp(); GlobalVars.game.updateHudShield(); GlobalVars.shieldBlock = shieldBlock; } private function shootParts(_arg1:Number, _arg2:Number):void{ GameScreen.particules.createParticule("circleWhite", _arg1, _arg2, Number((Math.random() * 360)), 0, 2, 0.1); } private function checkKeys():void{ if (((kLEFT) && (kUP))){ targetRot = 225; } else { if (((kRIGHT) && (kUP))){ targetRot = 315; } else { if (((kRIGHT) && (kDOWN))){ targetRot = 45; } else { if (((kLEFT) && (kDOWN))){ targetRot = 135; } else { if (kLEFT){ targetRot = 180; } else { if (kRIGHT){ targetRot = 0; } else { if (kUP){ targetRot = 270; } else { if (kDOWN){ targetRot = 90; }; }; }; }; }; }; }; }; } public function getSpeeds():void{ xs = cXspeed(); ys = cYspeed(); } private function deadExplosion():void{ var _local1:int; _local1 = 0; while (_local1 < 6) { GameScreen.particules.createParticule("circle", Number((x + ((0.5 - Math.random()) * 20))), Number((y - (Math.random() * 20))), Number((Math.random() * 360)), (1 + (Math.random() * 1)), (1 + ((0.5 - Math.random()) * 4)), (0.2 + Math.random())); _local1++; }; _local1 = 0; while (_local1 < 4) { GameScreen.particules.createParticule("Sparkle", Number((x + ((0.5 - Math.random()) * 5))), Number((y - (Math.random() * 5))), Number((Math.random() * 360)), (0.2 + Math.random()), (0.4 + ((0.5 - Math.random()) * 0.1)), (0.5 + (Math.random() / 2))); _local1++; }; GameScreen.particules.createParticule("circleWhite", x, y, Number((Math.random() * 360)), 0, 8, 0.2); } private function afterGetInMother():void{ if (GlobalVars.gameState == "goingMother"){ GlobalVars.gameState = "inMother"; GlobalVars.game.showUpgrades(); vx = 0; vy = 0; ys = 0; xs = 0; acc = 0; }; } private function timerHandler(_arg1:Event):void{ showControls(); } public function reset():void{ x = GlobalVars.shipX; y = GlobalVars.shipY; weapon = 0; shield = 0; hull = 0; visible = false; updateData(); } public function getVectors(_arg1:Number):void{ vx = (vx + ((xs * 100) * _arg1)); vy = (vy + ((ys * 100) * _arg1)); vx = (vx / (1 + (resistance * _arg1))); vy = (vy / (1 + (resistance * _arg1))); } private function getRotationToDir(_arg1:Number):void{ var _local2:Number = (angle - targetRot); while (_local2 > 180) { _local2 = (_local2 - 360); }; while (_local2 < -180) { _local2 = (_local2 + 360); }; _local2 = (_local2 / ((1.4 * _arg1) * 100)); angle = (angle - _local2); rotation = angle; } private function timerHandler2(_arg1:Event):void{ GlobalVars.game.getContinue(); } public function cYspeed():Number{ return ((((Math.sin(((Math.PI / 180) * angle)) * acc) * speed) / 100)); } private function sparkExplosion():void{ var _local1:int; while (_local1 < 10) { GameScreen.particules.createParticule("Sparkle", Number((x + ((0.5 - Math.random()) * 20))), Number((y - (Math.random() * 20))), Number((Math.random() * 360)), (1 + (Math.random() * 5)), (0.2 + ((0.5 - Math.random()) * 0.5)), (2 + Math.random())); _local1++; }; } private function showControls():void{ GameScreen.controls.visible = false; } public function step(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:Point; var _local6:int; var _local7:Point; var _local8:Point; if ((((((GlobalVars.gameState == "surviving")) || ((GlobalVars.gameState == "motherComing")))) || ((GlobalVars.gameState == "motherThere")))){ if (kBOMB){ if (GlobalVars.bombsLeft > 0){ SoundPlayer.bombSound(); GameScreen.bombsLayer.createBomb(x, y); GlobalVars.bombsLeft--; GlobalVars.game.updateHudBombs(); }; kBOMB = false; }; _local2 = (GameScreen.gameCamLayer.mouseX - x); _local3 = (GameScreen.gameCamLayer.mouseY - y); shipDisplay.ship.weapons.rotation = ((Math.atan2(_local3, _local2) / (Math.PI / 180)) - rotation); cacheWeapons(); if (alpha != 100){ alpha = 100; }; if (((((((kUP) || (kLEFT))) || (kRIGHT))) || (kDOWN))){ if (acc < 1){ acc = (acc + _arg1); }; if (acc > 1){ acc = 1; }; } else { if (acc > 0){ acc = (acc - (_arg1 * 2)); }; if (acc < 0){ acc = 0; }; }; if (controlsChanged){ checkKeys(); getRotationToDir(_arg1); } else { if (kLEFT){ angle = (angle - (300 * _arg1)); } else { if (kRIGHT){ angle = (angle + (300 * _arg1)); }; }; rotation = angle; }; getSpeeds(); getVectors(_arg1); x = (x + ((vx * 100) * _arg1)); y = (y + ((vy * 100) * _arg1)); if ((((x < 0)) && ((vx < 0)))){ vx = (vx * -1); }; if ((((x > 720)) && ((vx > 0)))){ vx = (vx * -1); }; if ((((y < 0)) && ((vy < 0)))){ vy = (vy * -1); }; if ((((y > 520)) && ((vy > 0)))){ vy = (vy * -1); }; if (canShoot){ fireRateR = (fireRateR + _arg1); if (fireRateR >= fireRate){ _local6 = roundsPerShot; while (_local6 > 0) { _local4 = weaponsCoord[shootSide][0]; _local5 = GlobalVars.screen.globalToLocal(shipDisplay.ship.weapons.localToGlobal(_local4)); GameScreen.bullets.createBullet(bulletName, _local5.x, _local5.y, (rotation + weaponsCoord[shootSide][1]), bulletSpeed, damage, 5, 0, false, 0); SoundPlayer.shootSound(0); shootParts(_local5.x, _local5.y); shootSide++; if (shootSide == numberOfShots){ shootSide = 0; }; _local6--; }; fireRateR = 0; }; }; if (canShootMissile){ fireRateMissileR = (fireRateMissileR + _arg1); if (fireRateMissileR >= fireRateMissile){ _local6 = roundsPerMissileShot; while (_local6 > 0) { _local4 = missilesCoord[shootMissileSide][0]; _local5 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local4)); GameScreen.bullets.createBullet(missileName, _local5.x, _local5.y, (rotation + missilesCoord[shootMissileSide][1]), missileSpeed, damageMissile, 4, 0, true, 6); shootParts(_local5.x, _local5.y); shootMissileSide++; if (shootMissileSide == numberOfMissileShots){ shootMissileSide = 0; }; _local6--; }; fireRateMissileR = 0; }; }; GlobalVars.shipX = x; GlobalVars.shipY = y; if (visible == true){ if (acc > 0){ thrustTimerR = (thrustTimerR + _arg1); if (thrustTimerR >= thrustTimer){ _local7 = new Point(shipDisplay.ship.shape.t0.x, shipDisplay.ship.shape.t0.y); _local8 = GlobalVars.screen.globalToLocal(shipDisplay.localToGlobal(_local7)); GameScreen.particules.createParticule("podThruster", _local8.x, _local8.y, (angle + ((0.5 - Math.random()) * 30)), (acc * speed), ((acc * speed) / 4), 0.2); thrustTimerR = 0; }; }; }; if (shieldTime > 0){ if (kSHIELD){ if (!GlobalVars.shieldUp){ shipDisplay.ship.shield.visible = true; GlobalVars.shieldUp = true; }; shieldTime = (shieldTime - _arg1); GlobalVars.game.updateHudShield(); } else { if (GlobalVars.shieldUp){ shipDisplay.ship.shield.visible = false; GlobalVars.shieldUp = false; }; }; } else { shieldTime = 0; shipDisplay.ship.shield.visible = false; GlobalVars.shieldUp = false; }; } else { if (GlobalVars.gameState == "getInMother"){ TweenMax.to(this, 2, {alpha:0, x:(GlobalVars.stageWidth / 2), y:(GlobalVars.stageHeight / 2), rotation:-90, ease:Sine.easeInOut, onComplete:afterGetInMother}); GlobalVars.gameState = "goingMother"; GlobalVars.slowMoTimer = 0; }; }; if (hp <= 0){ hp = 0; if (visible == true){ myTimer2.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler2); myTimer2.start(); sparkExplosion(); deadExplosion(); visible = false; }; }; } private function cacheWeapons():void{ var _local1:int; var _local2:Number; var _local3:Point; var _local4:Array; weaponsCoord = null; missilesCoord = null; weaponsCoord = new Array(); missilesCoord = new Array(); _local1 = 0; while (_local1 < numberOfShots) { _local2 = (shipDisplay.ship.weapons[("w" + _local1)].rotation + shipDisplay.ship.weapons.rotation); _local3 = new Point(shipDisplay.ship.weapons[("w" + _local1)].x, shipDisplay.ship.weapons[("w" + _local1)].y); _local4 = new Array(_local3, _local2); weaponsCoord.push(_local4); _local1++; }; _local1 = 0; while (_local1 < numberOfMissileShots) { _local2 = (shipDisplay.ship.weapons[("m" + _local1)].rotation + shipDisplay.ship.weapons.rotation); _local3 = new Point(shipDisplay.ship.weapons[("m" + _local1)].x, shipDisplay.ship.weapons[("m" + _local1)].y); _local4 = new Array(_local3, _local2); missilesCoord.push(_local4); _local1++; }; } } }//package net.odd1.AsteroidWar.players
Section 145
//Powerup (net.odd1.AsteroidWar.powerups.Powerup) package net.odd1.AsteroidWar.powerups { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class Powerup extends Sprite { private var type:int; private var display:MovieClip; public var isAlive:Boolean; private var lifeSpan:Number; private var regain:Number; private var ys:Number; private var xs:Number; private var life:Number; public function Powerup(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int){ addChild(_arg1); isAlive = true; this.display = _arg1; this.regain = _arg5; this.type = _arg6; x = _arg2; y = _arg3; this.lifeSpan = _arg4; life = lifeSpan; xs = (2 * (0.5 - Math.random())); ys = (2 * (0.5 - Math.random())); } private function getDistance(_arg1:Number, _arg2:Number):Number{ var _local3:Number = (x - _arg1); var _local4:Number = (y - _arg2); var _local5:Number = ((_local3 * _local3) + (_local4 * _local4)); return (_local5); } public function render(_arg1:Number):void{ var _local2:Number; var _local3:Number; x = (x + ((xs * _arg1) * 30)); y = (y + ((ys * _arg1) * 30)); xs = (xs / (1 + _arg1)); ys = (ys / (1 + _arg1)); life = (life - _arg1); alpha = (life / lifeSpan); if (life < 0){ isAlive = false; }; _local2 = getDistance(GlobalVars.shipX, GlobalVars.shipY); _local3 = (GlobalVars.shipSize + 10); if (_local2 < (_local3 * _local3)){ isAlive = false; if (type == 0){ GlobalVars.game.powerUpHealth(); } else { if (type == 1){ GlobalVars.game.powerUpShield(); } else { if (type == 2){ GlobalVars.slowMoTimer = 6; } else { if (type == 3){ GlobalVars.bombsLeft++; }; }; }; }; GlobalVars.game.gainScore(1); GlobalVars.game.updateHudScore(); GlobalVars.game.updateHudHp(); GlobalVars.game.updateHudBombs(); }; } } }//package net.odd1.AsteroidWar.powerups
Section 146
//PowerupsClass (net.odd1.AsteroidWar.powerups.PowerupsClass) package net.odd1.AsteroidWar.powerups { import flash.display.*; import net.odd1.AsteroidWar.global.*; public class PowerupsClass extends Sprite { private var powerups:Array; private var max:int; private var content:MovieClip; public function PowerupsClass(){ powerups = new Array(); max = GlobalVars.maxPowerups; content = GlobalVars.particulesAssets; } public function createPowerup(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int):void{ var _local7:Class = (content.loaderInfo.applicationDomain.getDefinition(_arg1) as Class); var _local8:Powerup = new Powerup(new (_local7), _arg2, _arg3, _arg4, _arg5, _arg6); addChild(_local8); powerups.push(_local8); } public function render(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Powerup; var _local5:Array; var _local6:int; _local5 = new Array(); _local3 = powerups.length; _local2 = 0; while (_local2 < _local3) { _local4 = powerups[_local2]; if (!_local4.isAlive){ removeChild(_local4); _local5.push(_local4); } else { _local4.render(_arg1); }; _local2++; }; _local3 = _local5.length; _local2 = 0; while (_local2 < _local3) { powerups.splice(powerups.indexOf(_local5[_local2]), 1); _local2++; }; if ((powerups.length - 1) > max){ _local6 = ((powerups.length - 1) - max); _local2 = 0; while (_local2 < _local6) { powerups[_local2].isAlive = false; _local2++; }; }; } } }//package net.odd1.AsteroidWar.powerups
Section 147
//GameScreen (net.odd1.AsteroidWar.screens.GameScreen) package net.odd1.AsteroidWar.screens { import net.odd1.minig.managers.*; import flash.events.*; import flash.display.*; import flash.system.*; import flash.geom.*; import org.flintparticles.twoD.zones.*; import org.flintparticles.common.initializers.*; import org.flintparticles.common.actions.*; import org.flintparticles.common.counters.*; import flash.filters.*; import flash.text.*; import net.odd1.minig.screens.*; import net.odd1.AsteroidWar.players.*; import org.flintparticles.twoD.renderers.*; import net.odd1.AsteroidWar.particules.*; import org.flintparticles.twoD.actions.*; import org.flintparticles.twoD.initializers.*; import net.odd1.AsteroidWar.bombs.*; import net.odd1.minig.display.*; import net.odd1.AsteroidWar.bullets.*; import org.flintparticles.common.displayObjects.*; import org.flintparticles.twoD.emitters.*; import net.odd1.AsteroidWar.global.*; import net.odd1.AsteroidWar.powerups.*; import net.odd1.minig.global.*; import flash.net.*; import flash.ui.*; public class GameScreen extends Screen implements IScreen { private var upgradeCost:int; private var alertShake:Number;// = 10 private var bmpBack:Bitmap; private var drawStage:Sprite; public var particulesLayer:Sprite; public var bulletsLayer:Sprite; public var ownedHulls:int;// = 0 private var shakeSize:Number;// = 5 private var _devKey:String;// = "0277c23ebc4ad99cb63c49d2bede09f6" public var queen:Queen; public var m_agi; private var _loader:Loader; private var filterTimerR:Number;// = 0 private var isAlert:Boolean; private var bmpDataBack:BitmapData; private var blur:BlurFilter; private var effectsScale:Number; public var effectsLayer:Sprite; public var ownedWeapons:int;// = 0 public var info_desc:String; public var slowMo:Boolean; private var _agiURL:String;// = "http://agi.armorgames.com/assets/agi/AGI.swf" public var info_name:String; public var hudLayer:Sprite; private var filterTimer:Number;// = 0.01 public var secretCode:int; public var info_cost:String; private var shakeTimeR:Number;// = 0 private var stopThis:Boolean; public var mother:Mother; public var ownedShields:int;// = 0 private var shakeIntervalR:Number;// = 0 public var renderer:BitmapRenderer; private var _gameKey:String;// = "asteroid-war" private var upgradeSelected:int; private var shakeInterval:Number;// = 0.02 public var playerLayer:Sprite; private var shakeTime:Number;// = 0.2 public var hud:MovieClip; public var continueTimerShow:Number; public static var bombsLayer:BombsClass; public static var enemiesLayer:EnemyManagerClass; public static var ymouse:int; public static var particules:ParticulesClass; public static var powerups:PowerupsClass; public static var gameCamLayer:SpriteInt; public static var cursor:Cursor; public static var userShip:User; public static var xmouse:int; public static var bullets:BulletsClass; public static var isInContinue:Boolean; public static var isShaking:Boolean = false; public static var controls:Controls; public static var gameLayer:SpriteInt; public function GameScreen(){ m_agi = new Sprite(); stopThis = false; effectsScale = GlobalVars.effectsScale; super(); } private function mouseMove_Handler(_arg1:Event):void{ xmouse = GlobalVariables.stage.mouseX; ymouse = GlobalVariables.stage.mouseY; } private function allLoaded():void{ SoundManager.getInstance().playSong(Ressources.introMusic, 1, true); secretCode = Math.round((Math.random() * 9999)); GlobalVars.gameState = "intro"; stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.quality = StageQuality.HIGH; drawStage = new Sprite(); bmpDataBack = new BitmapData((stage.stageWidth * effectsScale), (stage.stageHeight * effectsScale), false, 0); bmpBack = new Bitmap(bmpDataBack); bmpBack.blendMode = BlendMode.SCREEN; effectsLayer.addChild(bmpBack); blur = new BlurFilter(2, 2, 1); setHudUpgrades(); setHudOptions(); updateHudScore(); updateHudBombs(); createBulletsContainer(); createParticulesContainer(); createPowerupsContainer(); createMother(); createQueen(); createUser(); hud.hud.radar.dots.mask = hud.hud.radar.masker; hud.hud.radar.spin.mask = hud.hud.radar.masker2; isLoaded = true; var _local1:Array = Font.enumerateFonts(false); var _local2:uint; while (_local2 < _local1.length) { _local2++; }; } public function infoPosition(_arg1:Event):void{ if (hud.hud.upgrades.upwindow.info.visible == true){ hud.hud.upgrades.upwindow.info.x = stage.mouseX; hud.hud.upgrades.upwindow.info.y = stage.mouseY; }; } public function init():void{ loadSWF(Ressources.GAMESCREEN_CLASS, Ressources.GAMESCREEN_PATH, completeHandler); GlobalVars.game = this; addEventListener(MouseEvent.MOUSE_MOVE, mouseMove_Handler); Security.allowDomain(_agiURL); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, _loadAGIHandler, false, 0, true); _loader.load(new URLRequest(_agiURL)); } public function showInfoRelay(_arg1:MouseEvent):void{ var _local2:int; var _local3:String; trace(_arg1.target.name); trace(_arg1.target.id); trace(_arg1.target.type); trace(_arg1.currentTarget.id); _local2 = int(_arg1.currentTarget.id); _local3 = _arg1.currentTarget.type; showInfo(_local2, _local3); } private function createPowerupsContainer():void{ powerups = new PowerupsClass(); particulesLayer.addChild(powerups); } public function updateHudHp():void{ hud.hud.HPbar.scaleX = (GlobalVars.userShip.hp / GlobalVars.userShip.maxHp); hud.hud.hpTXT.text = ((String(Math.round(GlobalVars.userShip.hp)) + "/") + String(Math.round(GlobalVars.userShip.maxHp))); } public function drawRadar():void{ var _local1:Enemy; var _local3:Number; var _local4:Number; var _local2:Array = GameScreen.enemiesLayer.enemies; hud.hud.radar.dots.dots.graphics.clear(); hud.hud.radar.dots.grid.x = (userShip.x / -10); hud.hud.radar.dots.grid.y = (userShip.y / -10); for each (_local1 in _local2) { _local3 = (_local1.x - userShip.x); _local4 = (_local1.y - userShip.y); _local3 = (_local3 / 10); _local4 = (_local4 / 10); hud.hud.radar.dots.dots.graphics.beginFill(0xFF0000, 1); hud.hud.radar.dots.dots.graphics.lineStyle(0, 0, 0); hud.hud.radar.dots.dots.graphics.drawCircle(_local3, _local4, 3); hud.hud.radar.dots.dots.graphics.endFill(); }; } private function showIcons():void{ var _local2:int; var _local1 = 7; _local2 = 0; while (_local2 < _local1) { hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].visible = true; hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].visible = true; _local2++; }; var _local3 = 7; _local2 = 0; while (_local2 < _local3) { hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].visible = true; hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].visible = true; _local2++; }; var _local4 = 7; _local2 = 0; while (_local2 < _local4) { hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].visible = true; hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].visible = true; _local2++; }; var _local5 = 4; _local2 = 0; while (_local2 < _local5) { hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].visible = true; hud.hud.upgrades.upwindow.upgrades[("oi" + _local2)].visible = true; _local2++; }; } private function doneClick(_arg1:Event):void{ doneUpgrades(); } private function fixXMLNewLines(_arg1:String):String{ var _local2:String = _arg1.split("\\n").join("\n"); return (_local2); } public function powerUpShield():void{ var _local1:Number = (userShip.shieldTimeFull / GlobalVars.powerUpDivider); userShip.shieldTime = (userShip.shieldTime + _local1); if (userShip.shieldTime > userShip.shieldTimeFull){ userShip.shieldTime = userShip.shieldTimeFull; }; updateHudShield(); } public function setHudUpgrades():void{ var _local2:int; hud.hud.upgrades.upwindow.visible = false; hud.hud.upgrades.upwindow.info.visible = false; hud.hud.upgrades.upwindow.info.addEventListener(Event.ENTER_FRAME, infoPosition); hud.hud.upgrades.upwindow.options.visible = false; ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades.doneBtn, doneClick); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades.damagePlus, buyDamagePlusClick); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades.healthPlus, buyHealthPlusClick); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades.optionsBtn, optionsClick); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.returnBtn, returnClick); var _local1 = 7; _local2 = 0; while (_local2 < _local1) { hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].gotoAndStop((_local2 + 1)); hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].type = "weapon"; hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].id = _local2; hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].addEventListener(MouseEvent.MOUSE_OUT, hideInfo); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades[("w" + _local2)], buyWeaponClick); _local2++; }; var _local3 = 7; _local2 = 0; while (_local2 < _local3) { hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].gotoAndStop((_local2 + 1)); hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].type = "hull"; hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].id = _local2; hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].addEventListener(MouseEvent.MOUSE_OUT, hideInfo); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades[("h" + _local2)], buyHullClick); _local2++; }; var _local4 = 7; _local2 = 0; while (_local2 < _local4) { hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].gotoAndStop((_local2 + 1)); hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].type = "shield"; hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].id = _local2; hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].addEventListener(MouseEvent.MOUSE_OUT, hideInfo); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades[("s" + _local2)], buyShieldClick); _local2++; }; var _local5 = 4; _local2 = 0; while (_local2 < _local5) { hud.hud.upgrades.upwindow.upgrades[("oi" + _local2)].gotoAndStop((_local2 + 1)); hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].type = "other"; hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].id = _local2; hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].addEventListener(MouseEvent.MOUSE_OUT, hideInfo); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.upgrades[("o" + _local2)], buyOtherClick); _local2++; }; hud.hud.upgrades.upwindow.upgrades.damagePlus.type = "addDamage"; hud.hud.upgrades.upwindow.upgrades.damagePlus.id = 0; hud.hud.upgrades.upwindow.upgrades.damagePlus.addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades.damagePlus.addEventListener(MouseEvent.MOUSE_OUT, hideInfo); hud.hud.upgrades.upwindow.upgrades.healthPlus.type = "addHealth"; hud.hud.upgrades.upwindow.upgrades.healthPlus.id = 1; hud.hud.upgrades.upwindow.upgrades.healthPlus.addEventListener(MouseEvent.MOUSE_OVER, showInfoRelay); hud.hud.upgrades.upwindow.upgrades.healthPlus.addEventListener(MouseEvent.MOUSE_OUT, hideInfo); updateUpgradesIcons(); } private function trailsOnClick_Handler(_arg1:Event):void{ GlobalVars.trails = true; hud.hud.upgrades.upwindow.options.trailsShow.gotoAndStop(1); } public function mouseUp():void{ } public function getContinue():void{ GlobalVars.isPaused = true; hud.hud.continueScreen.visible = true; hud.hud.continueScreen.codeTXT.text = ""; continueTimerShow = GlobalVars.continueTime; hud.hud.upgrades.upwindow.visible = false; isInContinue = true; enemiesLayer.cleanAll(); particules.cleanAll(); bullets.cleanAll(); } private function returnClick(_arg1:Event):void{ hud.hud.upgrades.upwindow.options.visible = false; hud.hud.upgrades.upwindow.upgrades.visible = true; updateUpgradesIcons(); } private function buyShieldClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); userShip.shield++; userShip.updateData(); ownedShields++; hideInfo(null); updateUpgradesIcons(); }; } public function updateUpgradesIcons():void{ var _local2:int; var _local6:int; hud.hud.upgrades.upwindow.upgrades.cash.text = (String(GlobalVars.cash) + "$"); hud.hud.upgrades.upwindow.upgrades.damagesTXT.text = (String(Math.round((Number(GlobalVars.damageMulti) * 100))) + "%"); hud.hud.upgrades.upwindow.upgrades.healthTXT.text = (String(Math.round((Number(GlobalVars.healthMulti) * 100))) + "%"); var _local1 = 7; _local2 = 0; while (_local2 < _local1) { hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].equiped.visible = false; _local6 = (_local2 - ownedWeapons); if (_local6 > 0){ hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].alpha = (1 - (_local6 / 3)); } else { hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].alpha = 1; }; if (_local2 == (ownedWeapons + 1)){ hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].visible = true; }; if (_local2 == ownedWeapons){ hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].equiped.visible = true; }; _local2++; }; var _local3 = 7; _local2 = 0; while (_local2 < _local3) { hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].equiped.visible = false; _local6 = (_local2 - ownedHulls); if (_local6 > 0){ hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].alpha = (1 - (_local6 / 3)); } else { hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].alpha = 1; }; if (_local2 == (ownedHulls + 1)){ hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].visible = true; }; if (_local2 == ownedHulls){ hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].equiped.visible = true; }; _local2++; }; var _local4 = 7; _local2 = 0; while (_local2 < _local4) { hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].equiped.visible = false; _local6 = (_local2 - ownedShields); if (_local6 > 0){ hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].alpha = (1 - (_local6 / 3)); } else { hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].alpha = 1; }; if (_local2 == (ownedShields + 1)){ hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].visible = true; }; if (_local2 == ownedShields){ hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].equiped.visible = true; }; _local2++; }; var _local5 = 4; _local2 = 0; while (_local2 < _local5) { hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("oi" + _local2)].alpha = 1; _local2++; }; hud.hud.upgrades.upwindow.upgrades["o0"].visible = true; hud.hud.upgrades.upwindow.upgrades["oi0"].alpha = 1; if (!GlobalVars.upReduceTime){ hud.hud.upgrades.upwindow.upgrades["o1"].visible = true; hud.hud.upgrades.upwindow.upgrades["oi1"].alpha = 0.75; }; if (!GlobalVars.upHideWarning){ hud.hud.upgrades.upwindow.upgrades["o2"].visible = true; hud.hud.upgrades.upwindow.upgrades["oi2"].alpha = 0.75; }; if (!GlobalVars.upAntiShake){ hud.hud.upgrades.upwindow.upgrades["o3"].visible = true; hud.hud.upgrades.upwindow.upgrades["oi3"].alpha = 0.75; }; } public function keyPress(_arg1:int, _arg2:Boolean):void{ switch (_arg1){ case 87: if (_arg2){ userShip.kUP = false; } else { userShip.kUP = true; }; break; case 65: if (_arg2){ userShip.kLEFT = false; } else { userShip.kLEFT = true; }; break; case 68: if (_arg2){ userShip.kRIGHT = false; } else { userShip.kRIGHT = true; }; break; case 83: if (_arg2){ userShip.kDOWN = false; } else { userShip.kDOWN = true; }; break; case 69: if (_arg2){ userShip.kBOMB = false; } else { userShip.kBOMB = true; }; break; case Keyboard.SPACE: if (isInContinue){ if (int(hud.hud.continueScreen.codeTXT.text) == secretCode){ continueGame(); }; }; if ((((GlobalVars.gameState == "intro")) && (_arg2))){ hud.intro.play(); }; if (_arg2){ userShip.kSHIELD = false; } else { userShip.kSHIELD = true; }; }; } public function hideInfo(_arg1:MouseEvent):void{ hud.hud.upgrades.upwindow.info.visible = false; } public function updateHudBombs():void{ hud.hud.bombsTXT.text = GlobalVars.bombsLeft; } public function continueGame():void{ GlobalVars.isPaused = false; hud.hud.upgrades.upwindow.visible = false; hud.hud.continueScreen.visible = false; continueTimerShow = GlobalVars.continueTime; isInContinue = false; userShip.visible = true; userShip.updateData(); GlobalVars.score = 0; GlobalVars.multiplier = 0; updateHudHp(); updateHudScore(); updateHudShield(); updateHudTimer(); } public function mouseDown():void{ } public function showInfo(_arg1:int, _arg2:String):void{ var _local3:XMLList; var _local4:XMLList; var _local5:XML; var _local6:String; var _local7:String; upgradeSelected = _arg1; info_name = "no data"; info_desc = "no data"; info_cost = "no data"; hud.hud.upgrades.upwindow.info.visible = true; trace(("Type: " + _arg2)); if (_arg2 == "weapon"){ _local3 = GlobalVariables.data.game.weaponsDesc; _local4 = _local3.weaponDesc[_arg1].@*; } else { if (_arg2 == "hull"){ _local3 = GlobalVariables.data.game.hullsDesc; _local4 = _local3.hullDesc[_arg1].@*; } else { if (_arg2 == "shield"){ _local3 = GlobalVariables.data.game.shieldsDesc; _local4 = _local3.shieldDesc[_arg1].@*; } else { if (_arg2 == "addDamage"){ _local3 = GlobalVariables.data.game.addDamagesDesc; _local4 = _local3.addDamageDesc[0].@*; } else { if (_arg2 == "addHealth"){ _local3 = GlobalVariables.data.game.addHealthsDesc; _local4 = _local3.addHealthDesc[0].@*; } else { if (_arg2 == "other"){ _local3 = GlobalVariables.data.game.othersDesc; _local4 = _local3.otherDesc[_arg1].@*; }; }; }; }; }; }; for each (_local5 in _local4) { _local7 = String(_local5.name()); _local6 = String(_local5); this[("info_" + _local7)] = String(_local6); }; if (_arg2 == "addDamage"){ info_desc = (info_desc + (("\nAdd " + (GlobalVars.damageMultiAdd * 100)) + "% Damage")); info_cost = String(Math.round(GlobalVars.damageMultiCost)); } else { if (_arg2 == "addHealth"){ info_desc = (info_desc + (("\nAdd " + (GlobalVars.healthMultiAdd * 100)) + "% Health")); info_cost = String(Math.round(GlobalVars.healthMultiCost)); } else { if ((((_arg2 == "other")) && ((_arg1 == 0)))){ info_desc = (info_desc + (((("\nAdd : " + String(Math.round(GlobalVars.continueTimeAdd))) + " seconds\nCurrent Time: ") + String(Math.round(GlobalVars.continueTime))) + " seconds")); info_cost = String(Math.round(GlobalVars.continueTimeCost)); }; }; }; info_desc = fixXMLNewLines(info_desc); upgradeCost = int(info_cost); hud.hud.upgrades.upwindow.info.cost.text = (info_cost + "$"); hud.hud.upgrades.upwindow.info.desc.text = info_desc; hud.hud.upgrades.upwindow.info.title.text = info_name; } public function gainScore(_arg1:Number):void{ GlobalVars.score = (GlobalVars.score + Math.round((_arg1 * GlobalVars.multiplier))); updateHudScore(); GlobalVars.cash = (GlobalVars.cash + Math.round((_arg1 / 50))); } private function buyHullClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); userShip.hull++; userShip.updateData(); ownedHulls++; hideInfo(null); updateUpgradesIcons(); }; } private function createLayers():void{ gameLayer = new SpriteInt(); effectsLayer = new Sprite(); gameLayer.addChild(effectsLayer); effectsLayer.scaleX = (1 / effectsScale); effectsLayer.scaleY = (1 / effectsScale); effectsLayer.alpha = 0.7; gameCamLayer = new SpriteInt(); GlobalVars.screen = gameCamLayer; gameCamLayer.mouseEnabled = false; gameCamLayer.mouseChildren = false; gameLayer.addChild(gameCamLayer); addChild(gameLayer); playerLayer = new Sprite(); gameCamLayer.addChild(playerLayer); enemiesLayer = new EnemyManagerClass(); gameCamLayer.addChild(enemiesLayer); bombsLayer = new BombsClass(); gameCamLayer.addChild(bombsLayer); bulletsLayer = new Sprite(); gameCamLayer.addChild(bulletsLayer); particulesLayer = new Sprite(); gameCamLayer.addChild(particulesLayer); var _local1:Class = (GlobalVars.particulesAssets.loaderInfo.applicationDomain.getDefinition("controls") as Class); controls = new Controls(new (_local1)); gameCamLayer.addChild(controls); hudLayer = new Sprite(); gameLayer.addChild(hudLayer); var _local2:Class = (GlobalVars.particulesAssets.loaderInfo.applicationDomain.getDefinition("cursor") as Class); cursor = new Cursor(new (_local2)); gameLayer.addChild(cursor); } public function initRound():void{ if (!GlobalVars.upHideWarning){ hud.hud.warning.visible = true; }; hud.hud.rescueTXT.visible = true; GlobalVars.level++; if (GlobalVars.enemiesAvail < GlobalVars.enemiesAvailMax){ GlobalVars.enemiesAvail = (GlobalVars.enemiesAvail + GlobalVars.enemiesAvailAdd); }; GlobalVars.enemiesDamage = (GlobalVars.enemiesDamage + GlobalVars.enemiesDamageAdd); GlobalVars.enemiesLife = (GlobalVars.enemiesLife + GlobalVars.enemiesLifeAdd); GlobalVars.enemiesReward = (GlobalVars.enemiesReward + GlobalVars.enemiesRewardAdd); if (GlobalVars.enemiesNumber < GlobalVars.enemiesNumberMax){ GlobalVars.enemiesNumber = (GlobalVars.enemiesNumber + GlobalVars.enemiesNumberAdd); }; startStageTimer(); } private function buyWeaponClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); userShip.weapon++; userShip.updateData(); ownedWeapons++; hideInfo(null); updateUpgradesIcons(); }; } private function _loadAGIHandler(_arg1:Event):void{ _loader.removeEventListener(_arg1.type, _loadAGIHandler); m_agi = _arg1.currentTarget.content; addChild(m_agi); m_agi.init(_devKey, _gameKey); m_agi.initAGUI({x:100, y:100, onClose:handleAGUIClose}); } private function soundOffClick_Handler(_arg1:Event):void{ SoundManager.getInstance().isMuteSound = true; } public function deactivate():void{ } public function updateHudShield():void{ hud.hud.ShieldBar.scaleX = (GlobalVars.userShip.shieldTime / GlobalVars.userShip.shieldTimeFull); if (GlobalVars.userShip.shieldTime == 0){ hud.hud.ShieldBar.scaleX = 0; }; hud.hud.shieldTXT.text = (((String((Math.round((GlobalVars.userShip.shieldTime * 10)) / 10)) + "/") + String(GlobalVars.userShip.shieldTimeFull)) + "s"); } private function doneUpgrades():void{ hud.hud.upgrades.upwindow.visible = false; GlobalVars.gameState = "byeMotherStart"; } private function lowClick_Handler(_arg1:Event):void{ stage.quality = StageQuality.LOW; } private function buyOtherClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); switch (upgradeSelected){ case 0: GlobalVars.continueTime = (GlobalVars.continueTime + GlobalVars.continueTimeAdd); GlobalVars.continueTimeCost = (GlobalVars.continueTimeCost * GlobalVars.continueTimePriceAdd); showInfo(0, "other"); break; case 1: GlobalVars.upReduceTime = true; break; case 2: GlobalVars.upHideWarning = true; break; case 3: GlobalVars.upAntiShake = true; shakeSize = 0; break; }; userShip.updateData(); updateUpgradesIcons(); }; } private function musicOffClick_Handler(_arg1:Event):void{ if (!SoundManager.getInstance().isMuteMusic){ SoundManager.getInstance().muteMusic(); }; } public function updateHudTimer():void{ var _local1:String = String(Math.round(GlobalVars.stageTimer)); var _local2:String = String(Math.round((GlobalVars.stageTimer * 100))); var _local3:String = (_local2.charAt((_local2.length - 1)) + _local2.charAt((_local2.length - 2))); if (Number(_local1) < 10){ _local1 = ("0" + _local1); }; if (_local3.length < 2){ _local3 = ("0" + _local3); }; hud.hud.rescueTXT.text = ((("RESCUE IN: " + _local1) + ":") + _local3); } private function createQueen():void{ var _local1:Class = (GlobalVars.shipAssets.loaderInfo.applicationDomain.getDefinition("queen") as Class); queen = new Queen(_local1); playerLayer.addChild(queen); } public function render(_arg1:Number):void{ var m:DisplayObject; var matrix:Matrix; var enemyId:int; var hor:int; var xSide:int; var ySide:int; var cx:Number; var cy:Number; var delta = _arg1; try { if (m_agi){ m = (m_agi as Sprite).getChildAt(0); }; stage.focus = (m_agi as Sprite).getChildAt(0)[0]; } catch(e:Error) { }; if (!GlobalVars.isPaused){ if (GlobalVars.slowMoTimer > 0){ if (hud.hud.slowMotion.alpha < 1){ hud.hud.slowMotion.alpha = (hud.hud.slowMotion.alpha + (delta * 2)); }; if (hud.hud.slowMotion.alpha > 1){ hud.hud.slowMotion.alpha = 1; }; GlobalVars.slowMoTimer = (GlobalVars.slowMoTimer - delta); delta = (delta / 2.5); } else { if (hud.hud.slowMotion.alpha > 0){ hud.hud.slowMotion.alpha = (hud.hud.slowMotion.alpha - (delta * 2)); }; if (hud.hud.slowMotion.alpha < 0){ hud.hud.slowMotion.alpha = 0; }; }; controls.render(delta); cursor.render(delta); bombsLayer.render(delta); userShip.step(delta); enemiesLayer.render(delta); particules.render(delta); powerups.render(delta); bullets.render(delta); mother.step(delta); queen.step(delta); updateHudTimer(); if (GlobalVars.trails){ if (!effectsLayer.visible){ effectsLayer.visible = true; }; filterTimerR = (filterTimerR + delta); if (filterTimerR >= filterTimer){ matrix = new Matrix(); matrix.translate(gameCamLayer.x, gameCamLayer.y); matrix.scale(effectsScale, effectsScale); bmpDataBack.draw(playerLayer, matrix); bmpDataBack.draw(enemiesLayer, matrix); bmpDataBack.draw(bulletsLayer, matrix); bmpDataBack.draw(renderer, matrix); bmpDataBack.applyFilter(bmpDataBack, bmpDataBack.rect, new Point(0, 0), blur); bmpDataBack.colorTransform(bmpDataBack.rect, new ColorTransform(1, 1, 1, 0.99)); filterTimerR = 0; }; } else { if (effectsLayer.visible){ effectsLayer.visible = false; }; }; if (userShip.hp < (userShip.maxHp / 7.5)){ isShaking = true; isAlert = true; } else { isAlert = false; hud.hud.alert.visible = false; }; if (isShaking == true){ shakeTimeR = (shakeTimeR + delta); shakeIntervalR = (shakeIntervalR + delta); if (shakeIntervalR >= shakeInterval){ x = 0; y = 0; if (isAlert){ x = (x + ((0.5 - Math.random()) * (shakeSize + alertShake))); y = (y + ((0.5 - Math.random()) * (shakeSize + alertShake))); } else { x = (x + ((0.5 - Math.random()) * shakeSize)); y = (y + ((0.5 - Math.random()) * shakeSize)); }; shakeIntervalR = 0; }; if (shakeTimeR >= shakeTime){ x = 0; y = 0; shakeTimeR = 0; isShaking = false; }; }; if (GlobalVars.gameState == "surviving"){ if (enemiesLayer.enemies.length < GlobalVars.enemiesNumber){ enemyId = Math.round((Math.random() * int(GlobalVars.enemiesAvail))); hor = Math.round(Math.random()); xSide = Math.round(Math.random()); ySide = Math.round(Math.random()); if (hor == 0){ cx = (-100 + ((GlobalVars.stageWidth + 200) * xSide)); cy = (Math.random() * GlobalVars.stageHeight); } else { cy = (-100 + ((GlobalVars.stageHeight + 200) * ySide)); cx = (Math.random() * GlobalVars.stageWidth); }; enemiesLayer.createEnemy(enemyId, cx, cy, (Math.random() * 360)); }; GlobalVars.stageTimer = (GlobalVars.stageTimer - delta); if (GlobalVars.stageTimer <= 0){ GlobalVars.stageTimer = 0; GlobalVars.gameState = "getMother"; hud.hud.warning.visible = false; hud.hud.rescueTXT.visible = false; }; } else { if (GlobalVars.gameState == "motherThere"){ if (enemiesLayer.enemies.length == 0){ GlobalVars.gameState = "getInMother"; }; }; }; }; if (isInContinue){ continueTimerShow = (continueTimerShow - delta); hud.hud.continueScreen.timeTXT.text = Math.ceil(continueTimerShow); hud.hud.continueScreen.scoreTXT.text = hud.hud.scoreTXT.text; hud.hud.continueScreen.Deadtext.visible = false; (hud.hud.continueScreen["submit_btn"] as Sprite).visible = false; (hud.hud.continueScreen["show_btn"] as Sprite).visible = false; (hud.hud.continueScreen["ReplayBtn"] as Sprite).visible = false; Mouse.show(); if (continueTimerShow <= 0){ cursor.visible = false; (hud.hud.continueScreen["submit_btn"] as Sprite).visible = true; (hud.hud.continueScreen["show_btn"] as Sprite).visible = true; (hud.hud.continueScreen["ReplayBtn"] as Sprite).visible = true; hud.hud.continueScreen.Deadtext.visible = true; hud.hud.continueScreen.timeTXT.visible = false; hud.hud.continueScreen.codeTXT.visible = false; hud.hud.continueScreen.continuetext.visible = false; hud.hud.continueScreen.TimeLeftText.visible = false; hud.hud.continueScreen.EnterCodeText.visible = false; hud.hud.continueScreen.codeTXT.visible = false; if (!stopThis){ stopThis = true; ButtonManager.getInstance().addButton(hud.hud.continueScreen["submit_btn"], _submitHiScore); ButtonManager.getInstance().addButton(hud.hud.continueScreen["show_btn"], _showHiScores); ButtonManager.getInstance().addButton(hud.hud.continueScreen["ReplayBtn"], ReplayEvent); }; }; }; if ((((GlobalVars.gameState == "intro")) && (hud.intro.done))){ resetGame(); SoundManager.getInstance().playSong(Ressources.mainMusic, 1, true); hud.intro.visible = false; }; drawRadar(); hud.hud.radar.spin.rotation = (hud.hud.radar.spin.rotation + (delta * 200)); } private function trailsOffClick_Handler(_arg1:Event):void{ GlobalVars.trails = false; hud.hud.upgrades.upwindow.options.trailsShow.gotoAndStop(2); } private function optionsClick(_arg1:Event):void{ hud.hud.upgrades.upwindow.options.visible = true; hud.hud.upgrades.upwindow.upgrades.visible = false; } public function _showHiScores(_arg1:Event):void{ addChild(m_agi); m_agi.showScoreboardList([]); } public function reload():void{ } public function setHudOptions():void{ ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnLOW, lowClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnMEDIUM, mediumClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnHIGH, highClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnMusicON, musicOnClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnMusicOFF, musicOffClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnSoundON, soundOnClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnSoundOFF, soundOffClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnTrailsON, trailsOnClick_Handler); ButtonManager.getInstance().addButton(hud.hud.upgrades.upwindow.options.btnTrailsOFF, trailsOffClick_Handler); hud.hud.upgrades.upwindow.options.trailsShow.gotoAndStop(1); } public function partBoom(_arg1:Number, _arg2:Number):void{ var _local3:Emitter2D = new Emitter2D(); _local3.counter = new Blast(20); _local3.addInitializer(new SharedImage(new Line(5))); _local3.addInitializer(new ColorInit(4294901760, 4294967040)); _local3.addInitializer(new Velocity(new DiscZone(new Point(0, 0), 140, 140))); _local3.addInitializer(new Position(new DiscZone(new Point(0, 0), 1))); _local3.addInitializer(new Lifetime(0.2, 2)); _local3.addAction(new Age()); _local3.addAction(new Move()); _local3.addAction(new Fade()); _local3.addAction(new RotateToDirection()); _local3.y = _arg2; renderer.addEmitter(_local3); _local3.start(); } public function playerDamage(_arg1:Number):void{ if (GlobalVars.gameState == "surviving"){ if (GlobalVars.shieldUp){ _arg1 = (_arg1 * (1 - GlobalVars.shieldBlock)); } else { isShaking = true; GlobalVars.multiplier = 1; }; userShip.hp = (userShip.hp - _arg1); if (userShip.hp < 0){ userShip.hp = 0; }; updateHudHp(); updateHudScore(); }; SoundPlayer.hitSound(); } private function createParticulesContainer():void{ particules = new ParticulesClass(); particulesLayer.addChild(particules); renderer = new BitmapRenderer(new Rectangle(0, 0, 720, 520)); particulesLayer.addChild(renderer); } public function handleAGUIClose():void{ } private function buyHealthPlusClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); GlobalVars.healthMulti = (GlobalVars.healthMulti + GlobalVars.healthMultiAdd); GlobalVars.healthMultiCost = (GlobalVars.healthMultiCost * GlobalVars.healthPriceMultiAdd); userShip.updateData(); showInfo(0, "addHealth"); updateUpgradesIcons(); }; } private function shipAssetsLoaded(_arg1:MovieClip):void{ GlobalVars.shipAssets = _arg1; RessourceManager.getInstance().loadSWF(Ressources.PARTICULESASSETS_CLASS, Ressources.PARTICULESASSETS_PATH, particulesAssetsLoaded); } public function updateHudScore():void{ var _local1:int; var _local2:String = new String(""); var _local3 = (String(GlobalVars.multiplier) + "x "); _local1 = (12 - GlobalVars.score.toString().length); while (_local1 > 0) { _local2 = (_local2 + "0"); _local1--; }; hud.hud.scoreTXT.text = ((_local2 + "") + GlobalVars.score.toString()); hud.hud.comboTXT.text = _local3; } private function soundOnClick_Handler(_arg1:Event):void{ SoundManager.getInstance().isMuteSound = false; } private function completeHandler():void{ isLoaded = false; GlobalVariables.stage.frameRate = GlobalVars.frameRate; RessourceManager.getInstance().loadSWF(Ressources.SHIPASSETS_CLASS, Ressources.SHIPASSETS_PATH, shipAssetsLoaded); } private function ReplayEvent(_arg1:Event):void{ resetGame(); stopThis = false; ButtonManager.getInstance().removeButton(hud.hud.continueScreen["submit_btn"]); ButtonManager.getInstance().removeButton(hud.hud.continueScreen["show_btn"]); ButtonManager.getInstance().removeButton(hud.hud.continueScreen["ReplayBtn"]); (hud.hud.continueScreen["submit_btn"] as Sprite).alpha = 1; cursor.visible = true; (hud.hud.continueScreen["submit_btn"] as Sprite).visible = false; (hud.hud.continueScreen["show_btn"] as Sprite).visible = false; (hud.hud.continueScreen["ReplayBtn"] as Sprite).visible = false; hud.hud.continueScreen.Deadtext.visible = false; hud.hud.continueScreen.timeTXT.visible = true; hud.hud.continueScreen.codeTXT.visible = true; hud.hud.continueScreen.continuetext.visible = true; hud.hud.continueScreen.TimeLeftText.visible = true; hud.hud.continueScreen.EnterCodeText.visible = true; hud.hud.continueScreen.codeTXT.visible = true; } private function particulesAssetsLoaded(_arg1:MovieClip):void{ GlobalVars.particulesAssets = _arg1; RessourceManager.getInstance().loadSWF(Ressources.HUD_CLASS, Ressources.HUD_PATH, hudLoaded); } private function hudLoaded(_arg1:MovieClip):void{ createLayers(); hudLayer.addChild(_arg1); hud = _arg1; allLoaded(); hud.hud.visible = false; hud.hud.continueScreen.Deadtext.visible = false; (hud.hud.continueScreen["submit_btn"] as Sprite).visible = false; (hud.hud.continueScreen["show_btn"] as Sprite).visible = false; (hud.hud.continueScreen["ReplayBtn"] as Sprite).visible = false; } private function createMother():void{ var _local1:Class = (GlobalVars.shipAssets.loaderInfo.applicationDomain.getDefinition("mother") as Class); mother = new Mother(_local1); playerLayer.addChild(mother); } private function resetGame():void{ var _local1:XMLList; var _local2:XMLList; var _local3:XML; var _local4:String; var _local5:String; _local1 = GlobalVariables.data.game.gameBalances; _local2 = _local1.gameBalance[0].@*; for each (_local3 in _local2) { _local5 = String(_local3.name()); _local4 = String(_local3); GlobalVars[_local5] = Number(_local4); }; GlobalVars.score = 0; GlobalVars.level = 0; GlobalVars.multiplier = 1; ownedShields = 0; ownedHulls = 0; ownedWeapons = 0; GlobalVars.upAntiShake = false; GlobalVars.upHideWarning = false; GlobalVars.upReduceTime = false; GlobalVars.gameState = "byeMotherStart"; GlobalVars.shipX = (720 / 2); GlobalVars.shipY = (520 / 2); if (mother){ enemiesLayer.cleanAll(); particules.cleanAll(); bullets.cleanAll(); mother.reset(); queen.reset(); userShip.reset(); }; hud.hud.visible = false; hud.hud.warning.visible = false; hud.hud.alert.visible = false; hud.hud.rescueTXT.visible = false; hud.hud.continueScreen.visible = false; isInContinue = false; GlobalVars.isPaused = false; slowMo = false; updateHudBombs(); updateHudHp(); updateHudScore(); updateHudShield(); updateUpgradesIcons(); } private function createUser():void{ var _local1:Class = (GlobalVars.shipAssets.loaderInfo.applicationDomain.getDefinition("shipAssets") as Class); userShip = new User(_local1); playerLayer.addChild(userShip); GlobalVars.userShip = userShip; } private function startStageTimer():void{ GlobalVars.stageTimer = (GlobalVars.timerStart + (GlobalVars.level * GlobalVars.timerAdd)); if (GlobalVars.upReduceTime){ GlobalVars.stageTimer = (GlobalVars.stageTimer / 2); GlobalVars.stageTimer = Math.round(GlobalVars.stageTimer); GlobalVars.upReduceTime = false; }; if (GlobalVars.stageTimer > 999.99){ GlobalVars.stageTimer = 999.99; }; GlobalVars.gameState = "surviving"; } private function createBulletsContainer():void{ bullets = new BulletsClass(); bulletsLayer.addChild(bullets); } private function musicOnClick_Handler(_arg1:Event):void{ if (SoundManager.getInstance().isMuteMusic){ SoundManager.getInstance().muteMusic(); }; } private function highClick_Handler(_arg1:Event):void{ stage.quality = StageQuality.HIGH; } private function _submitHiScore(_arg1:Event):void{ addChild(m_agi); m_agi.showScoreboardSubmit(GlobalVars.score, "", ""); hud.hud.continueScreen.timeTXT.text = Math.ceil(continueTimerShow); hud.hud.continueScreen.timeTXT.visible = true; hud.hud.continueScreen.continuetext.visible = true; hud.hud.continueScreen.TimeLeftText.visible = true; (hud.hud.continueScreen["submit_btn"] as Sprite).alpha = 0.5; ButtonManager.getInstance().removeButton(hud.hud.continueScreen["submit_btn"]); (hud.hud.continueScreen["submit_btn"] as Sprite).mouseEnabled = false; } public function showUpgrades():void{ hud.hud.upgrades.upwindow.visible = true; secretCode = Math.round((Math.random() * 9999)); hud.hud.upgrades.upwindow.upgrades.cash.text = (String(GlobalVars.cash) + "$"); hud.hud.upgrades.upwindow.upgrades.codeTXT.text = secretCode; userShip.updateData(); } private function buyDamagePlusClick(_arg1:Event):void{ if (GlobalVars.cash >= upgradeCost){ GlobalVars.cash = (GlobalVars.cash - upgradeCost); GlobalVars.damageMulti = (GlobalVars.damageMulti + GlobalVars.damageMultiAdd); GlobalVars.damageMultiCost = (GlobalVars.damageMultiCost * GlobalVars.damagePriceMultiAdd); userShip.updateData(); showInfo(0, "addDamage"); updateUpgradesIcons(); }; } public function destroy():void{ } public function powerUpHealth():void{ var _local1:Number = (userShip.maxHp / GlobalVars.powerUpDivider); userShip.hp = (userShip.hp + _local1); if (userShip.hp > userShip.maxHp){ userShip.hp = userShip.maxHp; }; updateHudHp(); } private function mediumClick_Handler(_arg1:Event):void{ stage.quality = StageQuality.MEDIUM; } private function hideIcons():void{ var _local2:int; var _local1 = 7; _local2 = 0; while (_local2 < _local1) { hud.hud.upgrades.upwindow.upgrades[("w" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("wi" + _local2)].visible = false; _local2++; }; var _local3 = 7; _local2 = 0; while (_local2 < _local3) { hud.hud.upgrades.upwindow.upgrades[("h" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("hi" + _local2)].visible = false; _local2++; }; var _local4 = 7; _local2 = 0; while (_local2 < _local4) { hud.hud.upgrades.upwindow.upgrades[("s" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("si" + _local2)].visible = false; _local2++; }; var _local5 = 4; _local2 = 0; while (_local2 < _local5) { hud.hud.upgrades.upwindow.upgrades[("o" + _local2)].visible = false; hud.hud.upgrades.upwindow.upgrades[("oi" + _local2)].visible = false; _local2++; }; } GlobalVars.upReduceTime = false; } }//package net.odd1.AsteroidWar.screens
Section 148
//LogosIntro (net.odd1.AsteroidWar.screens.LogosIntro) package net.odd1.AsteroidWar.screens { import flash.display.*; import net.odd1.minig.screens.*; public class LogosIntro extends Screen implements IScreen { public var m_ArmorGameLogo:Sprite; public function destroy():void{ } public function keyPress(_arg1:int, _arg2:Boolean):void{ } public function mouseDown():void{ } public function mouseUp():void{ } public function init():void{ } public function render(_arg1:Number):void{ } public function reload():void{ } public function deactivate():void{ } } }//package net.odd1.AsteroidWar.screens
Section 149
//Preloader (net.odd1.AsteroidWar.screens.Preloader) package net.odd1.AsteroidWar.screens { import flash.events.*; import net.odd1.minig.managers.*; import flash.display.*; import net.odd1.minig.screens.*; import net.odd1.minig.transitions.*; import net.odd1.minig.events.*; import net.odd1.minig.global.*; import net.odd1.AsteroidWar.global.*; import flash.net.*; import flash.system.*; public final class Preloader extends Screen implements IScreen { private const TRANSITION_TIME:Number = 0.2; public var m_armorgamenumberframe:int;// = 0 private var _agiURL:String;// = "http://agi.armorgames.com/assets/agi/AGI.swf" private var _devKey:String;// = "0277c23ebc4ad99cb63c49d2bede09f6" public var m_ArmorGameLogo:MovieClip; public var m_Odd1numberframe:int;// = 0 public var m_agi; private var _loader:Loader; private var _gameKey:String;// = "asteroid-war" public var m_ODD1Logo:MovieClip; public var m_MainMenuScreen:Sprite; private static var ArmoreGameLogo:Class = Preloader_ArmoreGameLogo; public static var is_odd1Logoisadded:Boolean = false; public static var is_gameAded:Boolean = false; private static var MainMenuClassScreen:Class = Preloader_MainMenuClassScreen; private static var ODD1GameLogo:Class = Preloader_ODD1GameLogo; public function Preloader(){ m_agi = new Sprite(); super(); addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); Security.allowDomain(_agiURL); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, _loadAGIHandler, false, 0, true); _loader.load(new URLRequest(_agiURL)); } public function destroy():void{ } public function handleAGIError(_arg1:String):void{ trace(("################################################# ERROR######################: " + _arg1)); } public function init():void{ } public function render(_arg1:Number):void{ if (stage){ stage.frameRate = 30; }; content.progressBar.bar.scaleX = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal); if ((((content.progressBar.bar.scaleX == 1)) && (GlobalVariables.nextScreen))){ dispatchEvent(new ScreenEvent(ScreenEvent.QUIT, (new GlobalVariables.nextScreen() as IScreen), new Fadeout(TRANSITION_TIME))); }; } public function mouseUp():void{ } public function reload():void{ } public function keyPress(_arg1:int, _arg2:Boolean):void{ } private function ODD1logo(_arg1:Event):void{ stage.removeEventListener(Event.COMPLETE, ODD1logo); is_gameAded = true; removeChild(m_ODD1Logo); m_MainMenuScreen = (addChild(new MainMenuClassScreen()) as Sprite); ButtonManager.getInstance().addButton(m_MainMenuScreen["PlayBtn"], PlayHandler); ButtonManager.getInstance().addButton(m_MainMenuScreen["showScoreMainMenu_btn"], _showHiScores); ButtonManager.getInstance().addButton(m_MainMenuScreen["moregamebtn"], MoreGameHandler); ButtonManager.getInstance().addButton(m_MainMenuScreen["twitterbtn"], TwitterHandler); ButtonManager.getInstance().addButton(m_MainMenuScreen["odd1"], ODD1Handler); ButtonManager.getInstance().addButton(m_MainMenuScreen["armorGame"], ArmorGameHandler); } private function addedToStageHandler(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); var _local2:Sprite = new Sprite(); _local2.graphics.beginFill(0, 1); _local2.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); _local2.graphics.endFill(); addChild(_local2); m_ArmorGameLogo = (addChild(new ArmoreGameLogo()) as MovieClip); stage.addEventListener(Event.COMPLETE, loadOdd1); m_ArmorGameLogo.x = 80; m_ArmorGameLogo.y = 80; } public function handleAGUIClose():void{ trace("#################################################AGUI closed."); } private function MoreGameHandler(_arg1:Event):void{ navigateToURL(new URLRequest("http://armorgames.com"), "_blank"); } private function completeHandler():void{ GlobalVariables.stage.frameRate = GlobalVars.frameRate; } private function PlayHandler(_arg1:Event):void{ loadSWF(Ressources.PRELOADERSCREEN_CLASS, Ressources.PRELOADERSCREEN_PATH, completeHandler); } private function ArmorGameHandler(_arg1:Event):void{ navigateToURL(new URLRequest("http://armorgames.com"), "_blank"); } private function loadOdd1(_arg1:Event):void{ stage.removeEventListener(Event.COMPLETE, loadOdd1); removeChild(m_ArmorGameLogo); is_odd1Logoisadded = true; m_ODD1Logo = (addChild(new ODD1GameLogo()) as MovieClip); m_ODD1Logo.x = 50; m_ODD1Logo.y = 30; stage.addEventListener(Event.COMPLETE, ODD1logo); } private function ODD1Handler(_arg1:Event):void{ navigateToURL(new URLRequest("http://odd1.net"), "_blank"); } private function _loadAGIHandler(_arg1:Event):void{ _loader.removeEventListener(_arg1.type, _loadAGIHandler); m_agi = _arg1.currentTarget.content; addChild(m_agi); m_agi.init(_devKey, _gameKey); m_agi.initAGUI({x:100, y:100, onClose:handleAGUIClose}); stage.frameRate = 30; } private function TwitterHandler(_arg1:Event):void{ navigateToURL(new URLRequest("http://twitter.com/armorgames"), "_blank"); } public function deactivate():void{ } public function _showHiScores(_arg1:Event):void{ addChild(m_agi); m_agi.showScoreboardList([]); } public function mouseDown():void{ } } }//package net.odd1.AsteroidWar.screens
Section 150
//Preloader_ArmoreGameLogo (net.odd1.AsteroidWar.screens.Preloader_ArmoreGameLogo) package net.odd1.AsteroidWar.screens { import mx.core.*; import flash.utils.*; public class Preloader_ArmoreGameLogo extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Preloader_ArmoreGameLogo(){ dataClass = Preloader_ArmoreGameLogo_dataClass; super(); initialWidth = (11000 / 20); initialHeight = (8000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.screens
Section 151
//Preloader_ArmoreGameLogo_dataClass (net.odd1.AsteroidWar.screens.Preloader_ArmoreGameLogo_dataClass) package net.odd1.AsteroidWar.screens { import mx.core.*; public class Preloader_ArmoreGameLogo_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.screens
Section 152
//Preloader_MainMenuClassScreen (net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen) package net.odd1.AsteroidWar.screens { import flash.display.*; import mx.core.*; public class Preloader_MainMenuClassScreen extends SpriteAsset { public var shape:DisplayObject; public var odd1:DisplayObject; public var PlayBtn:DisplayObject; public var twitterbtn:DisplayObject; public var showScoreMainMenu_btn:DisplayObject; public var armorGame:DisplayObject; public var moregamebtn:DisplayObject; public var weapons:DisplayObject; public var ship:DisplayObject; } }//package net.odd1.AsteroidWar.screens
Section 153
//Preloader_ODD1GameLogo (net.odd1.AsteroidWar.screens.Preloader_ODD1GameLogo) package net.odd1.AsteroidWar.screens { import mx.core.*; import flash.utils.*; public class Preloader_ODD1GameLogo extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Preloader_ODD1GameLogo(){ dataClass = Preloader_ODD1GameLogo_dataClass; super(); initialWidth = (0x3200 / 20); initialHeight = (9600 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package net.odd1.AsteroidWar.screens
Section 154
//Preloader_ODD1GameLogo_dataClass (net.odd1.AsteroidWar.screens.Preloader_ODD1GameLogo_dataClass) package net.odd1.AsteroidWar.screens { import mx.core.*; public class Preloader_ODD1GameLogo_dataClass extends ByteArrayAsset { } }//package net.odd1.AsteroidWar.screens
Section 155
//FactoryClass (net.odd1.AsteroidWar.FactoryClass) package net.odd1.AsteroidWar { import net.odd1.minig.global.*; import net.odd1.minig.factories.*; import flash.text.*; import net.odd1.AsteroidWar.fonts.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.AsteroidWar.global.*; public class FactoryClass extends Factory { private const IS_DEBUGGING:Boolean = true; private const IS_LOADING_EMBEDDED:Boolean = true; private const MOCHIBOT:String = ""; private const DATA_URL:String = "./assets/data/data.xml"; private const IS_RENEW_SAVE:Boolean = true; private const MOCHIBOT_JALUDO:String = ""; private const LOCALE_BYTE:Array; private const DOMAINS:Array; private const CLASS_NAME:String = "AsteroidWar"; private const IS_SKIPPING_TRANSITIONS:Boolean = false; private const LOCALE:Array; private const SAVE_URL:String = "./assets/data/save.xml"; private const STAGE_WIDTH:int = 720; private const LOCALE_EN_US_URL:String = "./assets/data/locale/en-US.xml"; private const STAGE_HEIGHT:int = 520; private const LOCALE_URL:Array; private const IS_SKIPPING_ADS:Boolean = true; private const CREDIT:String = "AsteroidWar by ODD1.net Programmer: Louissi"; private const IS_SKIPPING_PRELOADER:Boolean = false; private static var DATA_CLASS:Class = FactoryClass_DATA_CLASS; private static var LOCALE_EN_US_CLASS:Class = FactoryClass_LOCALE_EN_US_CLASS; private static var SAVE_CLASS:Class = FactoryClass_SAVE_CLASS; public function FactoryClass(){ DOMAINS = []; LOCALE = ["en-US"]; LOCALE_BYTE = [LOCALE_EN_US_CLASS]; LOCALE_URL = [LOCALE_EN_US_URL]; Font.registerFont(FontCommand); Font.registerFont(FontDefault); Font.registerFont(FontOratorStd); Font.registerFont(FontEurostile); Font.registerFont(FontUni); Font.registerFont(FontPerfect16Pixel); super(CLASS_NAME, Preloader, DOMAINS, LOCALE, LOCALE_BYTE, LOCALE_URL, SAVE_CLASS, SAVE_URL, DATA_CLASS, DATA_URL, MOCHIBOT, CREDIT, STAGE_WIDTH, STAGE_HEIGHT, IS_DEBUGGING, IS_SKIPPING_ADS, IS_SKIPPING_TRANSITIONS, IS_LOADING_EMBEDDED, IS_RENEW_SAVE, IS_SKIPPING_PRELOADER); Debug.getInstance().println("-----------"); Debug.getInstance().println("AsteroidWar, by Louissi"); Debug.getInstance().println(""); Debug.getInstance().println(("Build : " + Version.BUILD_NUMBER)); Debug.getInstance().println(("Date : " + Version.BUILD_TIME)); Debug.getInstance().println(("Author : " + Version.BUILD_AUTHOR)); Debug.getInstance().println(""); Debug.getInstance().println("-----------"); } } }//package net.odd1.AsteroidWar
Section 156
//FactoryClass_DATA_CLASS (net.odd1.AsteroidWar.FactoryClass_DATA_CLASS) package net.odd1.AsteroidWar { import mx.core.*; public class FactoryClass_DATA_CLASS extends ByteArrayAsset { } }//package net.odd1.AsteroidWar
Section 157
//FactoryClass_LOCALE_EN_US_CLASS (net.odd1.AsteroidWar.FactoryClass_LOCALE_EN_US_CLASS) package net.odd1.AsteroidWar { import mx.core.*; public class FactoryClass_LOCALE_EN_US_CLASS extends ByteArrayAsset { } }//package net.odd1.AsteroidWar
Section 158
//FactoryClass_SAVE_CLASS (net.odd1.AsteroidWar.FactoryClass_SAVE_CLASS) package net.odd1.AsteroidWar { import mx.core.*; public class FactoryClass_SAVE_CLASS extends ByteArrayAsset { } }//package net.odd1.AsteroidWar
Section 159
//Animation (net.odd1.minig.animations.Animation) package net.odd1.minig.animations { public class Animation implements IAnimation { public var stop:Boolean; public var currentData:AnimationData; private var stopHandler:Function; public var fps:int; protected var frame:int; protected var currentFrame:Number; private var lastFrame:int; private var skipLastFrame:Boolean; public var animationsData:Array; private var looping:Boolean; public function Animation(){ looping = false; stopAnim(); } public function render(_arg1:Number):void{ currentFrame = (currentFrame + (_arg1 * fps)); if (int(currentFrame) != frame){ if (((stop) || (((!(looping)) && ((int(currentFrame) >= lastFrame)))))){ frame = (lastFrame - 1); currentFrame = (lastFrame - 1); setFrame(((lastFrame + currentData.start) - 1)); stopAnim(); } else { frame = (int(currentFrame) % lastFrame); currentFrame = (currentFrame % lastFrame); setFrame((frame + currentData.start)); }; }; } public function playLabel(_arg1:String, _arg2:Boolean=true, _arg3:Function=null, _arg4:Boolean=false):void{ var _local5:AnimationData; var _local6:int; var _local7:Boolean; _local7 = false; for each (_local5 in animationsData) { if (_local5.label == _arg1){ _local7 = true; break; }; }; if (_local7){ frame = 0; currentFrame = 0; looping = _arg2; stop = false; currentData = _local5; if (_arg4){ lastFrame = (currentData.length - 1); } else { lastFrame = currentData.length; }; this.stopHandler = _arg3; this.skipLastFrame = _arg4; setFrame((frame + currentData.start)); }; } public function get loop():Boolean{ return (looping); } public function playAnim(_arg1:int=-1, _arg2:int=-1, _arg3:Boolean=false):void{ } public function setFrame(_arg1:int):void{ } public function destroyAnim():void{ } public function stopAnim():void{ var _local1:Function; var _local2:AnimationData; _local1 = stopHandler; stopHandler = null; stop = true; if (_local1 != null){ _local1(this); }; } public function destroy():void{ stopHandler = null; stopAnim(); animationsData = null; destroyAnim(); currentData = null; } } }//package net.odd1.minig.animations
Section 160
//AnimationData (net.odd1.minig.animations.AnimationData) package net.odd1.minig.animations { public class AnimationData { public var label:String; public var start:int; public var length:int; public var end:int; public function AnimationData(_arg1:String, _arg2:int, _arg3:int){ this.label = _arg1; this.start = _arg2; this.end = _arg3; this.length = ((_arg3 - _arg2) + 1); } } }//package net.odd1.minig.animations
Section 161
//IAnimation (net.odd1.minig.animations.IAnimation) package net.odd1.minig.animations { public interface IAnimation { function playLabel(_arg1:String, _arg2:Boolean=true, _arg3:Function=null, _arg4:Boolean=false):void; function stopAnim():void; function playAnim(_arg1:int=-1, _arg2:int=-1, _arg3:Boolean=false):void; function render(_arg1:Number):void; function destroy():void; } }//package net.odd1.minig.animations
Section 162
//MovieClipAnimation (net.odd1.minig.animations.MovieClipAnimation) package net.odd1.minig.animations { import flash.display.*; import net.odd1.minig.utils.*; public final class MovieClipAnimation extends Animation { public var recursive:Boolean; public var mc:MovieClip; public function MovieClipAnimation(_arg1:MovieClip, _arg2:Array, _arg3:int, _arg4:Boolean=true){ this.mc = _arg1; this.fps = _arg3; this.animationsData = _arg2; this.recursive = _arg4; super(); } override public function setFrame(_arg1:int):void{ if (recursive){ MovieClipUtil.gotoAndStopNextFrame(mc, (_arg1 + 1)); } else { mc.gotoAndStop((_arg1 + 1)); }; } override public function destroyAnim():void{ mc = null; } } }//package net.odd1.minig.animations
Section 163
//MovieclipInt (net.odd1.minig.display.MovieclipInt) package net.odd1.minig.display { import flash.display.*; public dynamic class MovieclipInt extends MovieClip { private var realX:Number; private var realY:Number; override public function set x(_arg1:Number):void{ realX = _arg1; if (super.x != int(realX)){ super.x = int(realX); }; } override public function set y(_arg1:Number):void{ realY = _arg1; if (super.y != int(realY)){ super.y = int(realY); }; } override public function get x():Number{ return (realX); } override public function get y():Number{ return (realY); } } }//package net.odd1.minig.display
Section 164
//SpriteInt (net.odd1.minig.display.SpriteInt) package net.odd1.minig.display { import flash.display.*; public class SpriteInt extends Sprite { private var realX:Number; private var realY:Number; public function SpriteInt(){ realX = 0; realY = 0; } override public function set x(_arg1:Number):void{ realX = _arg1; if (super.x != int(realX)){ super.x = int(realX); }; } override public function set y(_arg1:Number):void{ realY = _arg1; if (super.y != int(realY)){ super.y = int(realY); }; } override public function get x():Number{ return (realX); } override public function get y():Number{ return (realY); } } }//package net.odd1.minig.display
Section 165
//DataEvent (net.odd1.minig.events.DataEvent) package net.odd1.minig.events { import flash.events.*; public final class DataEvent extends Event { public static const LOAD_COMPLETE:String = "dataLoadComplete"; public static const LOCALE_COMPLETE:String = "localeComplete"; public function DataEvent(_arg1:String){ super(_arg1); } } }//package net.odd1.minig.events
Section 166
//ScreenEvent (net.odd1.minig.events.ScreenEvent) package net.odd1.minig.events { import flash.events.*; import net.odd1.minig.screens.*; import net.odd1.minig.transitions.*; public final class ScreenEvent extends Event { public var transition:Transition; public var nextScreen:IScreen; public static const COMPLETE:String = "screenComplete"; public static const QUIT:String = "screenQuit"; public function ScreenEvent(_arg1:String, _arg2:IScreen=null, _arg3:Transition=null){ super(_arg1); this.nextScreen = _arg2; this.transition = _arg3; } } }//package net.odd1.minig.events
Section 167
//TransitionEvent (net.odd1.minig.events.TransitionEvent) package net.odd1.minig.events { import flash.events.*; public final class TransitionEvent extends Event { public static const FINISH:String = "transitionFinish"; public function TransitionEvent(_arg1:String){ super(_arg1); } } }//package net.odd1.minig.events
Section 168
//Factory (net.odd1.minig.factories.Factory) package net.odd1.minig.factories { import flash.events.*; import net.odd1.minig.managers.*; import flash.display.*; import net.odd1.minig.transitions.*; import net.odd1.minig.events.*; import net.odd1.minig.global.*; import com.mochibot.*; import flash.utils.*; import net.odd1.minig.ui.*; import flash.text.*; import flash.net.*; import flash.ui.*; import flash.system.*; public class Factory extends MovieClip { public const LOCALE_HIGH_QUALITY:String = "Q00"; private const ONE_SECOND:int = 1000; private const MEGABYTES:Number = 0x100000; public const LOCALE_MEDIUM_QUALITY:String = "Q01"; private const BORDER_WIDTH:int = 1000; public const LOCALE_LOW_QUALITY:String = "Q02"; private const BORDER_COLOR:int = 0; private const BACKGROUND_COLOR:int = 0; private const TRANSITION_TIME:Number = 1; private var lastTime:int; private var preloader_completeHandler:Function; private var preloaderURL:String; private var screenManager:ScreenManager; private var preloaderClass:Class; private var className:String; private var border:Shape; public var paused:Boolean; private var fpsCount:int; private var mainClass:Object; private var fpsTime:int; private var notice:String; public var debug:Debug; private var frameRate:TextShadow; private var fps:int; public function Factory(_arg1:String, _arg2:Class, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:Array, _arg7:Class, _arg8:String, _arg9:Class, _arg10:String, _arg11:String, _arg12:String, _arg13:int, _arg14:int, _arg15:Boolean=false, _arg16:Boolean=false, _arg17:Boolean=false, _arg18:Boolean=true, _arg19:Boolean=false, _arg20:Boolean=false){ var item:ContextMenuItem; var sharedObject:SharedObject; var sender:LocalConnection; var text:TextField; var className = _arg1; var preloaderClass = _arg2; var domains = _arg3; var xmlLocale = _arg4; var xmlLocaleByte = _arg5; var xmlLocaleURL = _arg6; var saveByte = _arg7; var saveURL = _arg8; var dataByte = _arg9; var dataURL = _arg10; var mochibot = _arg11; var notice = _arg12; var stageWidth = _arg13; var stageHeight = _arg14; var isDebugging = _arg15; var isSkippingAds = _arg16; var isSkippingTransitions = _arg17; var isLoadingEmbedded = _arg18; var isRenewSave = _arg19; var isSkippingPreloader = _arg20; super(); sender = new LocalConnection(); paused = false; try { if (mochibot != ""){ MochiBot.track(this, mochibot); }; } catch(e:Error) { }; if ((((domains.length == 0)) || (!((domains.indexOf(sender.domain) == -1))))){ addEventListener(Event.ADDED_TO_STAGE, addedToStagehandler); Security.allowDomain("*"); this.notice = notice; this.className = className; this.preloaderClass = preloaderClass; GlobalVariables.isDebugging = isDebugging; GlobalVariables.isSkippingAds = isSkippingAds; GlobalVariables.isSkippingTransitions = isSkippingTransitions; GlobalVariables.isSkippingPreloader = isSkippingPreloader; GlobalVariables.stageWidth = stageWidth; GlobalVariables.stageHeight = stageHeight; stop(); RessourceManager.getInstance().isLoadingEmbedded = isLoadingEmbedded; LocaleManager.getInstance().addLocale(xmlLocale, xmlLocaleByte, xmlLocaleURL); sharedObject = SharedObject.getLocal(className); if ((((sharedObject.data.save == undefined)) || (isRenewSave))){ GlobalVariables.isFirstTime = true; RessourceManager.getInstance().loadXML(saveByte, saveURL, save_completeHandler); } else { GlobalVariables.isFirstTime = false; GlobalVariables.save = sharedObject.data.save; LocaleManager.getInstance().setLocale(GlobalVariables.save.global.@locale, locale_completeHandler); }; GlobalVariables.sharedObject = sharedObject; RessourceManager.getInstance().loadXML(dataByte, dataURL, data_completeHandler); if (isDebugging){ fpsCount = 0; fpsTime = getTimer(); frameRate = new TextShadow(true, 16773103); frameRate.visible = false; }; Debug.getInstance().println("-----------"); Debug.getInstance().println("Minig Frameworks, by Jean-Denis Boivin"); Debug.getInstance().println(""); Debug.getInstance().println(("Build : " + Version.BUILD_NUMBER)); Debug.getInstance().println(("Date : " + Version.BUILD_TIME)); Debug.getInstance().println(("Author : " + Version.BUILD_AUTHOR)); Debug.getInstance().println(""); Debug.getInstance().println("-----------"); debug = Debug.getInstance(); if (isDebugging){ CheatManager.getInstance().addCheat("fps", toggleFrameRate); CheatManager.getInstance().addCheat("save", outputSave); }; CheatManager.getInstance().addCheat("credit", displayCredit); CheatManager.getInstance().addCheat("debug", toggleConsole); } else { text = new TextField(); text.text = (("You cannot play this game on this domain : " + sender.domain) + " !"); text.width = (text.textWidth + 5); text.selectable = false; addChild(text); }; } private function mouseUpHandler(_arg1:MouseEvent):void{ if (!paused){ screenManager.mouseUp(); }; } private function save_completeHandler(_arg1:XML):void{ GlobalVariables.save = _arg1; if (_arg1){ LocaleManager.getInstance().setLocale(_arg1.global.@locale, locale_completeHandler); } else { locale_completeHandler(); }; checkLoaded(); } private function keyUpHandler(_arg1:KeyboardEvent):void{ if (!paused){ CheatManager.getInstance().pressKey(_arg1.keyCode); screenManager.keyPress(_arg1.keyCode, true); }; } private function enterFrameHandler(_arg1:Event):void{ var _local2:Class; if (framesLoaded == totalFrames){ nextFrame(); _local2 = Class(getDefinitionByName(className)); if (_local2){ this.mainClass = new _local2(screenManager); }; stage.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function highquality_menuItemSelectHandler(_arg1:ContextMenuEvent):void{ stage.quality = StageQuality.HIGH; } private function outputSave():void{ System.setClipboard(GlobalVariables.save.toString()); } private function mediumquality_menuItemSelectHandler(_arg1:ContextMenuEvent):void{ stage.quality = StageQuality.MEDIUM; } private function lowquality_menuItemSelectHandler(_arg1:ContextMenuEvent):void{ stage.quality = StageQuality.LOW; } public function resume():void{ paused = false; } private function deactivateHandler(_arg1:Event):void{ if (!paused){ screenManager.deactivate(); }; } private function data_completeHandler(_arg1:XML):void{ GlobalVariables.data = _arg1; checkLoaded(); } private function checkLoaded():void{ if (((((((((!(screenManager)) && (!((stage == null))))) && (GlobalVariables.data))) && (GlobalVariables.save))) && (LocaleManager.getInstance().isLoaded))){ screenManager = new ScreenManager(GlobalVariables.stageWidth, GlobalVariables.stageHeight); addChildAt(screenManager, 0); screenManager.loadScreen(new preloaderClass(), new Fadeout(TRANSITION_TIME)); lastTime = getTimer(); stage.addEventListener(Event.ENTER_FRAME, calculate_enterFrameHandler); stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); stage.addEventListener(Event.DEACTIVATE, deactivateHandler); }; } private function addedToStagehandler(_arg1:Event):void{ var _local2:Graphics; removeEventListener(Event.ADDED_TO_STAGE, addedToStagehandler); stage.frameRate = 0xFFFF; if (GlobalVariables.isDebugging){ frameRate.x = (GlobalVariables.stageWidth - 120); frameRate.y = (GlobalVariables.stageHeight - 44); addChild(frameRate); addChild(Debug.getInstance().text); }; stage.scaleMode = StageScaleMode.SHOW_ALL; stage.quality = StageQuality.HIGH; GlobalVariables.stage = stage; border = new Shape(); _local2 = border.graphics; _local2.beginFill(BORDER_COLOR); _local2.drawRect(-(BORDER_WIDTH), -(BORDER_WIDTH), ((BORDER_WIDTH << 1) + GlobalVariables.stageWidth), BORDER_WIDTH); _local2.drawRect(-(BORDER_WIDTH), GlobalVariables.stageHeight, ((BORDER_WIDTH << 1) + GlobalVariables.stageWidth), BORDER_WIDTH); _local2.drawRect(-(BORDER_WIDTH), 0, BORDER_WIDTH, GlobalVariables.stageHeight); _local2.drawRect(GlobalVariables.stageWidth, 0, BORDER_WIDTH, GlobalVariables.stageHeight); _local2.endFill(); graphics.beginFill(BACKGROUND_COLOR); graphics.drawRect(0, 0, GlobalVariables.stageWidth, GlobalVariables.stageHeight); graphics.endFill(); addChild(border); checkLoaded(); } private function displayCredit():void{ if (!Debug.getInstance().text.visible){ Debug.getInstance().toggle(); }; Debug.getInstance().println(""); Debug.getInstance().println("//////******************************************///////"); Debug.getInstance().println(""); Debug.getInstance().println("Credit :"); Debug.getInstance().println(""); Debug.getInstance().println(" _|_| _| _| _| "); Debug.getInstance().println("_| _| _|_|_| _|_|_| _|_| "); Debug.getInstance().println("_| _| _| _| _| _| _| "); Debug.getInstance().println("_| _| _| _| _| _| _| "); Debug.getInstance().println(" _|_| _|_|_| _|_|_| _| "); Debug.getInstance().println(""); Debug.getInstance().println(notice); Debug.getInstance().println(""); Debug.getInstance().println("//////******************************************///////"); Debug.getInstance().println(""); } private function toggleConsole():void{ Debug.getInstance().toggle(); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (!paused){ screenManager.keyPress(_arg1.keyCode, false); }; } private function mouseDownHandler(_arg1:MouseEvent):void{ if (!paused){ screenManager.mouseDown(); }; } private function locale_completeHandler():void{ var _local1:ContextMenuItem; var _local2:ContextMenu; _local2 = new ContextMenu(); _local2.hideBuiltInItems(); _local1 = new ContextMenuItem(LocaleManager.getInstance().getLocale(LOCALE_HIGH_QUALITY), true); _local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, highquality_menuItemSelectHandler); _local2.customItems.push(_local1); _local1 = new ContextMenuItem(LocaleManager.getInstance().getLocale(LOCALE_MEDIUM_QUALITY)); _local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, mediumquality_menuItemSelectHandler); _local2.customItems.push(_local1); _local1 = new ContextMenuItem(LocaleManager.getInstance().getLocale(LOCALE_LOW_QUALITY)); _local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, lowquality_menuItemSelectHandler); _local2.customItems.push(_local1); contextMenu = _local2; GlobalVariables.contextMenu = contextMenu; dispatchEvent(new DataEvent(DataEvent.LOCALE_COMPLETE)); checkLoaded(); } public function pause():void{ paused = true; } private function toggleFrameRate():void{ frameRate.visible = !(frameRate.visible); } private function calculate_enterFrameHandler(_arg1:Event):void{ var _local2:int; var _local3:Number; var _local4:int; _local2 = getTimer(); _local3 = ((_local2 - lastTime) / ONE_SECOND); lastTime = _local2; if (!paused){ screenManager.render((_local3 * GlobalVariables.timeScale)); SoundManager.getInstance().render(_local3); }; if (GlobalVariables.isDebugging){ _local4 = getTimer(); fpsCount++; if ((_local4 - fpsTime) > ONE_SECOND){ fps = fpsCount; fpsCount = 0; fpsTime = _local4; }; frameRate.text = (((((((("FPS : " + fps) + "\n") + "Memory : ") + (System.totalMemory / MEGABYTES).toFixed(2)) + " MB\n") + "Code : ") + (_local4 - _local2)) + " ms"); }; } } }//package net.odd1.minig.factories
Section 169
//Debug (net.odd1.minig.global.Debug) package net.odd1.minig.global { import net.odd1.minig.ui.*; public final class Debug { public var string:String; public var text:TextShadow; private static var _instance:Debug = new (Debug); ; public function Debug(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; string = ""; text = new TextShadow(true); text.visible = false; } public function toggle():void{ text.visible = !(text.visible); if (text.visible){ updateText(); }; } public function updateText():void{ text.text = string; text.setHeight(GlobalVariables.stageHeight); text.scrollMax(); } public function println(_arg1:String):void{ if (GlobalVariables.isDebugging){ string = (string + (_arg1 + "\n")); if (text.visible){ updateText(); }; }; } public static function getInstance():Debug{ return (_instance); } } }//package net.odd1.minig.global
Section 170
//GlobalVariables (net.odd1.minig.global.GlobalVariables) package net.odd1.minig.global { import flash.display.*; import flash.net.*; import flash.ui.*; public final class GlobalVariables { public static var isSkippingTransitions:Boolean = false; public static var sharedObject:SharedObject; public static var stageHeight:int; public static var timeScale:Number = 1; public static var stage:Stage; public static var isFirstTime:Boolean = false; public static var gameName:String; public static var isDebugging:Boolean = false; public static var stageWidth:int; public static var data:XML; public static var contextMenu:ContextMenu; public static var isSkippingAds:Boolean = false; public static var isSkippingPreloader:Boolean = false; public static var save:XML; public static var nextScreen:Class; } }//package net.odd1.minig.global
Section 171
//Version (net.odd1.minig.global.Version) package net.odd1.minig.global { public final class Version { public static var BUILD_AUTHOR:String = "jdboivin"; public static var BUILD_NUMBER:String = "1599"; public static var BUILD_TIME:String = "10.07.2009 15:30"; } }//package net.odd1.minig.global
Section 172
//AnimationManager (net.odd1.minig.managers.AnimationManager) package net.odd1.minig.managers { import flash.display.*; import net.odd1.minig.animations.*; import net.odd1.minig.utils.*; public class AnimationManager { private var m_paused:Boolean; private var m_animations:Array; private static var s_instance:AnimationManager = new (AnimationManager); ; public function AnimationManager(){ if (s_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; m_animations = new Array(); m_paused = false; } public function render(_arg1:Number):void{ var _local2:MovieClipAnimation; if (!m_paused){ for each (_local2 in m_animations) { _local2.render(_arg1); }; }; } public function isPaused():Boolean{ return (m_paused); } public function togglePause():void{ m_paused = !(m_paused); } public function addAnimation(_arg1:MovieClip, _arg2:int=30, _arg3:Boolean=true):MovieClipAnimation{ var _local4:MovieClipAnimation; _local4 = new MovieClipAnimation(_arg1, MovieClipUtil.getAnimationData(_arg1), _arg2, _arg3); m_animations.push(_local4); _local4.playLabel(""); _local4.stopAnim(); return (_local4); } public function clear():void{ var _local1:int; _local1 = m_animations.length; while (_local1 > 0) { removeAnimation(m_animations[0]); _local1--; }; } public function removeAnimation(_arg1:MovieClipAnimation):void{ ArrayUtil.removeElement(m_animations, _arg1); } public static function getInstance():AnimationManager{ return (s_instance); } } }//package net.odd1.minig.managers
Section 173
//ButtonManager (net.odd1.minig.managers.ButtonManager) package net.odd1.minig.managers { import flash.events.*; import flash.display.*; import flash.media.*; public final class ButtonManager { private const SOUNDOVER:int = 2; private const STATE_MOUSEOVER:int = 1; private const SOUNDDOWN:int = 3; private const LABEL_MOUSEOUT:String = "out"; private const STATE_MOUSEOUT:int = 0; private const STATE_MOUSEDOWN:int = 2; private const SOUNDOUT:int = 4; private const SOUNDCLICK:int = 1; private const LABEL_MOUSEOVER:String = "over"; private const LABEL_MOUSEDOWN:String = "down"; private var infos:Array; private var states:Array; private var buttons:Array; private var currentButton:MovieClip; public var isClicking:Boolean; private static const LISTENER:int = 0; private static var _instance:ButtonManager = new (ButtonManager); ; public function ButtonManager(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; buttons = new Array(); infos = new Array(); states = new Array(); isClicking = false; } private function changeState(_arg1:MovieClip, _arg2:String):void{ _arg1.gotoAndStop(_arg2); } public function updateLocale(_arg1:Event=null):void{ var _local2:MovieClip; for each (_local2 in buttons) { LocaleManager.getInstance().setMovieClip(_local2); }; } public function clear():void{ while (buttons.length != 0) { removeButton(buttons[0]); }; } public function removeButton(_arg1:MovieClip):void{ var _local2:int; _local2 = buttons.indexOf(_arg1); if (_local2 != -1){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); _arg1.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); _arg1.addEventListener(MouseEvent.MOUSE_UP, mouseOverHandler); _arg1.removeEventListener(MouseEvent.CLICK, clickHandler); buttons.splice(_local2, 1); states.splice(_local2, 1); infos.splice(_local2, 1); _arg1.buttonMode = false; _arg1.useHandCursor = false; _arg1.mouseEnabled = false; _arg1.mouseChildren = false; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ var _local2:MovieClip; var _local3:int; _local2 = (_arg1.currentTarget as MovieClip); _local3 = buttons.indexOf(_local2); if (_local3 != -1){ if (states[_local3] != STATE_MOUSEOUT){ states[_local3] = STATE_MOUSEOUT; changeState(_local2, LABEL_MOUSEOUT); }; if (infos[_local3][SOUNDOUT]){ SoundManager.getInstance().playSound(infos[_local3][SOUNDOUT]); }; }; } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:MovieClip; var _local3:int; _local2 = (_arg1.currentTarget as MovieClip); _local3 = buttons.indexOf(_local2); isClicking = true; if (_local3 != -1){ if (states[_local3] != STATE_MOUSEDOWN){ states[_local3] = STATE_MOUSEDOWN; changeState(_local2, LABEL_MOUSEDOWN); }; if (infos[_local3][SOUNDDOWN]){ SoundManager.getInstance().playSound(infos[_local3][SOUNDDOWN]); }; }; } private function clickHandler(_arg1:MouseEvent):void{ var _local2:MovieClip; var _local3:int; _local2 = (_arg1.currentTarget as MovieClip); _local3 = buttons.indexOf(_local2); if (((!((_local3 == -1))) && (infos[_local3][SOUNDCLICK]))){ SoundManager.getInstance().playSound(infos[_local3][SOUNDCLICK]); }; if (infos[_local3][LISTENER]){ var _local4 = infos[_local3]; _local4[LISTENER](_arg1); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ var _local2:MovieClip; var _local3:int; _local2 = (_arg1.currentTarget as MovieClip); _local3 = buttons.indexOf(_local2); if (_local3 != -1){ if (((_arg1.buttonDown) && (!((states[_local3] == STATE_MOUSEDOWN))))){ states[_local3] = STATE_MOUSEDOWN; changeState(_local2, LABEL_MOUSEDOWN); } else { if (states[_local3] != STATE_MOUSEOVER){ states[_local3] = STATE_MOUSEOVER; changeState(_local2, LABEL_MOUSEOVER); }; }; if (infos[_local3][SOUNDOVER]){ SoundManager.getInstance().playSound(infos[_local3][SOUNDOVER]); }; }; } public function addButton(_arg1:MovieClip, _arg2:Function, _arg3:Sound=null, _arg4:Sound=null, _arg5:Sound=null, _arg6:Sound=null):void{ buttons.push(_arg1); infos.push([_arg2, _arg3, _arg4, _arg5, _arg6]); states.push(STATE_MOUSEOUT); _arg1.gotoAndStop(LABEL_MOUSEOUT); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); _arg1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); _arg1.addEventListener(MouseEvent.MOUSE_UP, mouseOverHandler); _arg1.addEventListener(MouseEvent.CLICK, clickHandler); _arg1.buttonMode = true; _arg1.useHandCursor = true; _arg1.mouseEnabled = true; _arg1.mouseChildren = true; } public static function getInstance():ButtonManager{ return (_instance); } } }//package net.odd1.minig.managers
Section 174
//CheatManager (net.odd1.minig.managers.CheatManager) package net.odd1.minig.managers { import net.odd1.minig.global.*; public final class CheatManager { private const CHEAT_POS:int = 0; private const HANDLER_POS:int = 1; private var cheats:Array; private var positions:Array; private static var _instance:CheatManager = new (CheatManager); ; public function CheatManager(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; cheats = []; positions = []; } public function addCheat(_arg1:String, _arg2:Function):void{ cheats.push([_arg1.toUpperCase(), _arg2]); positions.push(0); Debug.getInstance().println(("Added cheat : " + _arg1)); } public function removeCheat(_arg1:String):void{ var _local2:int; var _local3:Boolean; var _local4:int; _arg1 = _arg1.toUpperCase(); _local3 = false; _local4 = cheats.length; _local2 = 0; while (_local2 < _local4) { if (cheats[_local2][CHEAT_POS] == _arg1){ _local3 = true; break; }; _local2++; }; if (_local3){ cheats.splice(_local2, 1); positions.splice(_local2, 1); Debug.getInstance().println(("Removed cheat : " + _arg1)); }; } public function pressKey(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:Array; for each (_local5 in cheats) { _local2 = cheats.indexOf(_local5); _local4 = _local5[CHEAT_POS]; if (_local4.charCodeAt(positions[_local2]) == _arg1){ var _local8 = positions; var _local9 = _local2; var _local10 = (_local8[_local9] + 1); _local8[_local9] = _local10; if (_local10 == _local4.length){ Debug.getInstance().println(("Cheat Activated : " + _local4)); positions[_local2] = 0; _local8 = _local5; _local8[HANDLER_POS](); }; } else { positions[_local2] = 0; }; }; } public static function getInstance():CheatManager{ return (_instance); } } }//package net.odd1.minig.managers
Section 175
//LocaleManager (net.odd1.minig.managers.LocaleManager) package net.odd1.minig.managers { import flash.display.*; import flash.text.*; public final class LocaleManager { private const OPEN_TAG:String = "<"; private const CLOSE_TAG:String = ">"; private var localeByte:Array; private var localeName:Array; public var isLoaded:Boolean; private var localeIndex:int; private var localeXML:XML; private var currentCompleteHandler:Function; public var currentLocale:String; private var localeURL:Array; public static const FONT_SUFFIX:String = "_Embed"; private static var _instance:LocaleManager = new (LocaleManager); ; public function LocaleManager(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; localeIndex = -1; isLoaded = false; } public function getLocale(_arg1:String):String{ var id = _arg1; if (((!((localeIndex == -1))) && (localeXML))){ return (localeXML.strings.string.(@id == id).@value); //unresolved jump }; return (""); } private function completeHandler(_arg1:XML):void{ localeXML = _arg1; isLoaded = true; currentCompleteHandler(); } public function addLocale(_arg1:Array, _arg2:Array, _arg3:Array):void{ this.localeName = _arg1; this.localeByte = _arg2; this.localeURL = _arg3; } public function setLocale(_arg1:String, _arg2:Function):void{ localeIndex = localeName.indexOf(_arg1); if (localeIndex != -1){ currentLocale = _arg1; currentCompleteHandler = _arg2; isLoaded = false; RessourceManager.getInstance().loadXML(localeByte[localeIndex], localeURL[localeIndex], this.completeHandler); }; } private function checkContainer(_arg1:DisplayObjectContainer):void{ var _local2:int; var _local3:DisplayObject; var _local4:TextField; var _local5:TextFormat; _local2 = 0; while (_local2 < _arg1.numChildren) { _local3 = _arg1.getChildAt(_local2); if ((_local3 is TextField)){ _local4 = (_local3 as TextField); if (_local4.type == TextFieldType.DYNAMIC){ _local4.mouseEnabled = false; if ((((_local4.text.charAt(0) == OPEN_TAG)) && ((_local4.text.charAt((_local4.text.length - 1)) == CLOSE_TAG)))){ _local4.text = getLocale(_local4.text.substr(1, (_local4.text.length - 2))); }; }; _local4.embedFonts = true; _local5 = _local4.getTextFormat(); _local4.getTextFormat().font = (_local5.font + FONT_SUFFIX); _local4.setTextFormat(_local5); _local4.defaultTextFormat = _local5; } else { if ((_local3 is DisplayObjectContainer)){ checkContainer((_local3 as DisplayObjectContainer)); }; }; _local2++; }; } public function setMovieClip(_arg1:MovieClip):void{ if (isLoaded){ checkContainer(_arg1); }; } public static function getInstance():LocaleManager{ return (_instance); } } }//package net.odd1.minig.managers
Section 176
//RessourceManager (net.odd1.minig.managers.RessourceManager) package net.odd1.minig.managers { import flash.events.*; import flash.display.*; import net.odd1.minig.utils.*; import flash.net.*; public final class RessourceManager { private const POS_URL:int = 2; private const POS_TYPE:int = 0; private const POS_BYTE:int = 1; private const POS_HANDLER:int = 3; private var queue:Array; public var isLoadingEmbedded:Boolean;// = true private var _force:Boolean;// = false private var loaders:Array; public static const RESSOURCE_XML:int = 1; public static const RESSOURCE_SWF:int = 0; private static var _instance:RessourceManager = new (RessourceManager); ; public function RessourceManager(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; queue = []; loaders = []; } private function XMLCompleteHandler(_arg1:Event):void{ var _local2:URLLoader; _local2 = (_arg1.currentTarget as URLLoader); var _local3 = queue[0]; _local3[POS_HANDLER](new XML(_local2.data)); _local2.removeEventListener(Event.COMPLETE, XMLCompleteHandler); ArrayUtil.removeElement(loaders, _local2); checkNextItem(); } private function checkNextItem():void{ queue.shift(); if (queue.length != 0){ _force = true; loadRessource(queue[0]); }; } private function SWFCompleteHandler(_arg1:Event):void{ var _local2:LoaderInfo; var _local3:MovieClip; _local2 = (_arg1.currentTarget as LoaderInfo); _local3 = (_local2.content as MovieClip); var _local4 = queue[0]; _local4[POS_HANDLER](_local3); LocaleManager.getInstance().setMovieClip(_local3); _local2.removeEventListener(Event.COMPLETE, SWFCompleteHandler); ArrayUtil.removeElement(loaders, _local2.loader); checkNextItem(); } public function loadXML(_arg1:Class, _arg2:String, _arg3:Function):void{ var _local4:URLLoader; if (((_arg1) || (!((_arg2 == ""))))){ if (((((isLoadingEmbedded) && (_arg1))) || ((_arg2 == "")))){ _arg3(new XML(new (_arg1))); } else { if (!_force){ queue.push([RESSOURCE_XML, _arg1, _arg2, _arg3]); }; if ((((((queue.length == 1)) || (_force))) && (!((_arg2 == ""))))){ _force = false; _local4 = new URLLoader(new URLRequest(_arg2)); _local4.addEventListener(Event.COMPLETE, XMLCompleteHandler); loaders.push(_local4); }; }; } else { _arg3(null); }; } private function loadRessource(_arg1:Array):void{ switch (_arg1[POS_TYPE]){ case RESSOURCE_SWF: loadSWF(_arg1[POS_BYTE], _arg1[POS_URL], _arg1[POS_HANDLER]); break; case RESSOURCE_XML: loadXML(_arg1[POS_BYTE], _arg1[POS_URL], _arg1[POS_HANDLER]); break; default: throw (new Error("Invalid ressource type")); }; } public function loadSWF(_arg1:Class, _arg2:String, _arg3:Function):void{ var _local4:MovieClip; var _local5:Loader; if (((_arg1) || (!((_arg2 == ""))))){ if (!_force){ queue.push([RESSOURCE_SWF, _arg1, _arg2, _arg3]); }; if ((((queue.length == 1)) || (_force))){ _force = false; if (((((isLoadingEmbedded) && (_arg1))) || ((_arg2 == "")))){ _local4 = new (_arg1); _local5 = (_local4.getChildAt(0) as Loader); } else { _local5 = new Loader(); _local5.load(new URLRequest(_arg2)); }; _local5.contentLoaderInfo.addEventListener(Event.COMPLETE, SWFCompleteHandler); loaders.push(_local5); }; } else { _arg3(null); }; } public static function getInstance():RessourceManager{ return (_instance); } } }//package net.odd1.minig.managers
Section 177
//ScreenManager (net.odd1.minig.managers.ScreenManager) package net.odd1.minig.managers { import flash.display.*; import net.odd1.minig.screens.*; import net.odd1.minig.transitions.*; import net.odd1.minig.events.*; import net.odd1.minig.global.*; import flash.utils.*; import flash.system.*; public class ScreenManager extends Sprite { public var stageHeight:int; public var stageWidth:int; public var screen:IScreen; private var transitionManager:TransitionManager; public function ScreenManager(_arg1:int, _arg2:int){ this.stageWidth = _arg1; this.stageHeight = _arg2; transitionManager = new TransitionManager(this); addChild(transitionManager); } public function mouseUp():void{ ButtonManager.getInstance().isClicking = false; if (Screen(screen).isLoaded){ screen.mouseUp(); }; } public function keyPress(_arg1:int, _arg2:Boolean):void{ if (Screen(screen).isLoaded){ screen.keyPress(_arg1, _arg2); }; } public function mouseDown():void{ if (((Screen(screen).isLoaded) && (!(ButtonManager.getInstance().isClicking)))){ screen.mouseDown(); }; } public function loadScreen(_arg1:IScreen, _arg2:Transition=null):void{ var newScreen = _arg1; var transition = _arg2; Debug.getInstance().println(""); Debug.getInstance().println(("Loading screen : " + getQualifiedClassName(newScreen))); Debug.getInstance().println(""); if (screen){ if (((!(GlobalVariables.isSkippingTransitions)) && (transition))){ transitionManager.loadTransition((screen as IBitmapDrawable), transition); }; screen.destroy(); Screen(screen).destroyContent(); removeChild((screen as Screen)); try { System.gc(); } catch(e:Error) { }; } else { if (((!(GlobalVariables.isSkippingTransitions)) && (stage))){ transitionManager.loadTransition((stage.getChildAt(0) as IBitmapDrawable), transition); }; }; screen = newScreen; addChildAt((screen as Screen), 0); if (transition){ transition.screen = (screen as Screen); }; if (AnimationManager.getInstance().isPaused()){ AnimationManager.getInstance().togglePause(); }; screen.addEventListener(ScreenEvent.QUIT, quitHandler); stage.focus = stage; screen.init(); } public function deactivate():void{ if (Screen(screen).isLoaded){ screen.deactivate(); }; } public function render(_arg1:Number):void{ if (Screen(screen).destroyEvent){ loadScreen(Screen(screen).destroyEvent.nextScreen, Screen(screen).destroyEvent.transition); } else { if (Screen(screen).isLoaded){ screen.render(_arg1); }; transitionManager.render(_arg1); AnimationManager.getInstance().render(_arg1); }; } public function reload():void{ if (Screen(screen).isLoaded){ screen.reload(); }; } private function quitHandler(_arg1:ScreenEvent):void{ screen.removeEventListener(ScreenEvent.QUIT, quitHandler); Screen(screen).destroyEvent = _arg1; } } }//package net.odd1.minig.managers
Section 178
//SoundManager (net.odd1.minig.managers.SoundManager) package net.odd1.minig.managers { import flash.events.*; import flash.media.*; import flash.geom.*; import flash.utils.*; public final class SoundManager { private const VOLUME_POS:int = 1; private const POINT_POS:int = 0; public var isMuteMusic:Boolean; private var _speakerOrigin:Point; public var soundVolume:Number; private var _3DSoundsKey:Array; private var song:SoundChannel; private var newVolume:Number; private var newSong:SoundChannel; private var _3DSounds:Array; private var _sounds:Array; public var isMuteSound:Boolean; private var _3DInfo:Array; private var lastSong:Sound; private var isMute:Boolean; private var _soundsKey:Array; private var _maxDistance:Number; private static var _instance:SoundManager = new (SoundManager); ; public function SoundManager(){ if (_instance){ throw (new Error("Singleton can only be accessed through Singleton.getInstance()")); }; isMute = false; isMuteSound = false; isMuteMusic = false; song = null; newSong = null; _3DSounds = new Array(); _3DSoundsKey = new Array(); _3DInfo = new Array(); _sounds = new Array(); _soundsKey = new Array(); soundVolume = 1; } public function stopMusic():void{ if (song){ song.stop(); }; if (newSong){ newSong.stop(); }; } public function muteMusic():void{ isMuteMusic = !(isMuteMusic); if (((!(isMuteMusic)) && (lastSong))){ playSong(lastSong, 1, true, true); } else { if (song){ song.stop(); } else { if (newSong){ newSong.stop(); }; }; }; } private function _3D_soundCompleteHandler(_arg1:Event):void{ var _local2:SoundChannel; var _local3:int; _local2 = (_arg1.currentTarget as SoundChannel); _local3 = _3DSounds.indexOf(_local2); _local2.removeEventListener(Event.SOUND_COMPLETE, _3D_soundCompleteHandler); _3DInfo.splice(_local3, 1); _3DSounds.splice(_local3, 1); _3DSoundsKey.splice(_local3, 1); } public function render(_arg1:Number):void{ var _local2:SoundTransform; var _local3:int; var _local4:int; if (!isMute){ if (newSong){ if (song){ _local2 = song.soundTransform; _local2.volume = (_local2.volume - (0.75 * _arg1)); song.soundTransform = _local2; if (_local2.volume <= 0){ song.stop(); song = null; }; }; if (newSong){ _local2 = newSong.soundTransform; _local2.volume = (_local2.volume + ((0.75 * newVolume) * _arg1)); newSong.soundTransform = _local2; if (_local2.volume >= newVolume){ _local2.volume = newVolume; newSong.soundTransform = _local2; song = newSong; newSong = null; }; }; }; }; } private function _sound_soundCompleteHandler(_arg1:Event):void{ var _local2:SoundChannel; var _local3:int; _local2 = (_arg1.currentTarget as SoundChannel); _local3 = _sounds.indexOf(_local2); _local2.removeEventListener(Event.SOUND_COMPLETE, _sound_soundCompleteHandler); _sounds.splice(_local3, 1); _soundsKey.splice(_local3, 1); } public function mute():Boolean{ isMute = !(isMute); if (isMute){ SoundMixer.soundTransform = new SoundTransform(0); } else { SoundMixer.soundTransform = new SoundTransform(1); }; return (isMute); } public function playSong(_arg1:Sound, _arg2:Number=1, _arg3:Boolean=true, _arg4:Boolean=false):void{ var _local5:SoundTransform; if (((!(isMuteMusic)) && (((_arg4) || (!((getQualifiedClassName(_arg1) == getQualifiedClassName(lastSong)))))))){ lastSong = _arg1; if (newSong){ newSong.stop(); }; newVolume = _arg2; if (_arg3){ newSong = _arg1.play(0, 9999); } else { newSong = _arg1.play(0, 0); }; _local5 = newSong.soundTransform; _local5.volume = 0; newSong.soundTransform = _local5; }; } public function play3DSound(_arg1:Sound, _arg2:Point, _arg3:int=0, _arg4:Number=1, _arg5:Boolean=false):void{ var _local6:SoundTransform; var _local7:SoundChannel; var _local8:int; var _local9:String; _arg4 = (_arg4 * soundVolume); if (!isMuteSound){ _local9 = getQualifiedClassName(_arg1); _local8 = _3DSoundsKey.indexOf(_local9); if (_arg5){ _local8 = -1; }; if (_local8 != -1){ _local7 = _3DSounds[_local8]; _local7.removeEventListener(Event.SOUND_COMPLETE, _3D_soundCompleteHandler); _local7.stop(); }; _local6 = new SoundTransform(0, 0); _local7 = _arg1.play(_arg3, 0, _local6); if (_local7){ _local7.addEventListener(Event.SOUND_COMPLETE, _3D_soundCompleteHandler); if (_local8 == -1){ _3DInfo.push([_arg2, _arg4]); _local8 = (_3DSounds.push(_local7) - 1); _3DSoundsKey.push(_local9); } else { _3DInfo[_local8] = [_arg2, _arg4]; _3DSounds[_local8] = _local7; }; adjust3DSound(_local8); } else { if (_local8 != -1){ _3DInfo.splice(_local8, 1); _3DSounds.splice(_local8, 1); _3DSoundsKey.splice(_local8, 1); }; }; }; } public function adjust3DSound(_arg1:int):void{ var _local2:SoundChannel; var _local3:SoundTransform; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Point; _local2 = _3DSounds[_arg1]; _local3 = _local2.soundTransform; _local7 = _3DInfo[_arg1][POINT_POS]; _local4 = Point.distance(_speakerOrigin, _local7); if (_local4 < _maxDistance){ _local5 = (Math.atan2((_local7.x - _speakerOrigin.x), (_local7.y - _speakerOrigin.y)) - (Math.PI / 2)); if (_local5 < 0){ _local5 = (_local5 + (Math.PI * 2)); }; if (_local5 < (Math.PI / 2)){ _local6 = (((Math.PI / 2) - _local5) / (Math.PI / 2)); } else { if (_local5 < Math.PI){ _local6 = ((_local5 - (Math.PI / 2)) / -((Math.PI / 2))); } else { if (_local5 < ((Math.PI * 3) / 2)){ _local6 = (((Math.PI / 2) - (_local5 - Math.PI)) / -((Math.PI / 2))); } else { _local6 = ((_local5 - ((Math.PI * 3) / 2)) / (Math.PI / 2)); }; }; }; _local3.volume = ((((_maxDistance - _local4) / _maxDistance) * _3DInfo[_arg1][VOLUME_POS]) * soundVolume); _local3.pan = _local6; } else { _local3.volume = 0; _local3.pan = 0; }; _local2.soundTransform = _local3; } public function muteSound():void{ isMuteSound = !(isMuteSound); } public function playSound(_arg1:Sound, _arg2:int=0, _arg3:Boolean=false, _arg4:Number=1, _arg5:Number=0, _arg6:Boolean=false):void{ var _local7:SoundTransform; var _local8:SoundChannel; var _local9:int; var _local10:String; _arg4 = (_arg4 * soundVolume); if (!isMuteSound){ _local10 = getQualifiedClassName(_arg1); _local9 = _soundsKey.indexOf(_local10); if (!_arg6){ if (_local9 != -1){ _local8 = _sounds[_local9]; _local8.removeEventListener(Event.SOUND_COMPLETE, _sound_soundCompleteHandler); _local8.stop(); }; }; if (((!(_arg6)) || ((_local9 == -1)))){ if (_arg3){ _local7 = new SoundTransform((((Math.random() * 0.5) + 0.5) * _arg4), ((Math.random() * 2) - 1)); } else { _local7 = new SoundTransform(_arg4, _arg5); }; _local8 = _arg1.play(_arg2, 0, _local7); if (_local8){ if (_local9 == -1){ _sounds.push(_local8); _soundsKey.push(_local10); } else { _sounds[_local9] = _local8; }; _local8.addEventListener(Event.SOUND_COMPLETE, _sound_soundCompleteHandler); } else { if (_local9 != -1){ _sounds.splice(_local9, 1); _soundsKey.splice(_local9, 1); }; }; }; }; } public function set3DSound(_arg1:Point, _arg2:Number=-1):void{ _speakerOrigin = _arg1; if (_arg2 != -1){ _maxDistance = _arg2; }; } public static function getInstance():SoundManager{ return (_instance); } } }//package net.odd1.minig.managers
Section 179
//TransitionManager (net.odd1.minig.managers.TransitionManager) package net.odd1.minig.managers { import flash.display.*; import net.odd1.minig.transitions.*; import net.odd1.minig.events.*; import net.odd1.minig.utils.*; public final class TransitionManager extends Sprite { private const WAIT:int = 2; private var screenManager:ScreenManager; private var transitions:Array; public function TransitionManager(_arg1:ScreenManager){ this.screenManager = _arg1; transitions = []; mouseEnabled = false; mouseChildren = false; } public function render(_arg1:Number):void{ var _local2:Transition; for each (_local2 in transitions) { if (((((!(_local2.screen)) || (_local2.screen.isLoaded))) && ((_local2.wait++ > WAIT)))){ ITransition(_local2).render(_arg1); }; }; } private function finishHandler(_arg1:TransitionEvent):void{ var _local2:Transition; _local2 = (_arg1.currentTarget as Transition); (_local2 as ITransition).destroy(); ArrayUtil.removeElement(transitions, _local2); removeChild(_local2); _local2.removeEventListener(TransitionEvent.FINISH, finishHandler); } public function loadTransition(_arg1:IBitmapDrawable, _arg2:Transition):void{ _arg2.setScreen(_arg1, screenManager.stageWidth, screenManager.stageHeight); transitions.push(_arg2); addChildAt(_arg2, 0); _arg2.addEventListener(TransitionEvent.FINISH, finishHandler); } } }//package net.odd1.minig.managers
Section 180
//IScreen (net.odd1.minig.screens.IScreen) package net.odd1.minig.screens { import flash.events.*; public interface IScreen extends IEventDispatcher { function init():void; function keyPress(_arg1:int, _arg2:Boolean):void; function render(_arg1:Number):void; function mouseDown():void; function reload():void; function destroy():void; function deactivate():void; function mouseUp():void; } }//package net.odd1.minig.screens
Section 181
//Screen (net.odd1.minig.screens.Screen) package net.odd1.minig.screens { import flash.events.*; import net.odd1.minig.managers.*; import flash.display.*; import net.odd1.minig.events.*; public class Screen extends Sprite { private const DEFAULT_FRAMERATE:int = 0xFFFF; private const BACKGROUND_COLOR:int = 0x666666; public var content:MovieClip; private var frameRate:int; public var isLoaded:Boolean; private var completeHandler:Function; public var destroyEvent:ScreenEvent; public function Screen(){ this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); isLoaded = false; destroyEvent = null; frameRate = DEFAULT_FRAMERATE; } private function addedToStageHandler(_arg1:Event):void{ stage.frameRate = frameRate; graphics.beginFill(BACKGROUND_COLOR); graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); graphics.endFill(); } private function loadSWF_completeHandler(_arg1:MovieClip):void{ isLoaded = true; this.content = _arg1; addChild(_arg1.loaderInfo.loader); frameRate = _arg1.loaderInfo.frameRate; if (stage){ stage.frameRate = frameRate; }; if (completeHandler != null){ completeHandler(); }; } public function loadSWF(_arg1:Class, _arg2:String, _arg3:Function=null):void{ this.completeHandler = _arg3; RessourceManager.getInstance().loadSWF(_arg1, _arg2, loadSWF_completeHandler); } public function destroyContent():void{ if (content){ removeChild(content.loaderInfo.loader); try { content.loaderInfo.loader.unload(); } catch(e:Error) { }; }; content = null; completeHandler = null; } } }//package net.odd1.minig.screens
Section 182
//Fadeout (net.odd1.minig.transitions.Fadeout) package net.odd1.minig.transitions { import net.odd1.minig.events.*; public final class Fadeout extends Transition implements ITransition { private var alphaDelta:Number; public function Fadeout(_arg1:Number){ super(null); alpha = 1; alphaDelta = (1 / _arg1); } public function destroy():void{ alphaDelta = -1; dispose(); } public function render(_arg1:Number):void{ alpha = (alpha - (alphaDelta * _arg1)); if (alpha <= 0){ alpha = 0; dispatchEvent(new TransitionEvent(TransitionEvent.FINISH)); }; } } }//package net.odd1.minig.transitions
Section 183
//ITransition (net.odd1.minig.transitions.ITransition) package net.odd1.minig.transitions { import flash.events.*; public interface ITransition extends IEventDispatcher { function destroy():void; function render(_arg1:Number):void; } }//package net.odd1.minig.transitions
Section 184
//Transition (net.odd1.minig.transitions.Transition) package net.odd1.minig.transitions { import net.odd1.minig.managers.*; import flash.display.*; import net.odd1.minig.screens.*; public class Transition extends Bitmap { private const DEFAULT_COLOR:uint = 0; private const TRANSPARENT:Boolean = true; private const SMOOTHING:Boolean = false; public var screenManager:ScreenManager; public var screen:Screen; public var wait:int; public function Transition(_arg1:ScreenManager){ wait = 0; screen = null; this.screenManager = _arg1; super(null, PixelSnapping.ALWAYS, SMOOTHING); } public function setScreen(_arg1:IBitmapDrawable, _arg2:int, _arg3:int):void{ bitmapData = new BitmapData(_arg2, _arg3, TRANSPARENT, DEFAULT_COLOR); bitmapData.draw(_arg1); } public function dispose():void{ screenManager = null; screen = null; bitmapData.dispose(); } } }//package net.odd1.minig.transitions
Section 185
//TextShadow (net.odd1.minig.ui.TextShadow) package net.odd1.minig.ui { import flash.display.*; import flash.text.*; import flash.filters.*; public final class TextShadow extends Sprite { private const SPACE:int = 5; private const BACKGROUND_Y:int = 1; private const FONT_NAME:String = "Default"; private var foreground:TextField; private var background:TextField; public function TextShadow(_arg1:Boolean=false, _arg2:int=0xFFFFFF, _arg3:int=0x666666, _arg4:String="Default"){ var _local5:TextFormat; super(); mouseEnabled = false; mouseChildren = false; _local5 = new TextFormat(_arg4, 9); foreground = new TextField(); background = new TextField(); foreground.mouseEnabled = false; background.mouseEnabled = false; foreground.textColor = _arg2; background.textColor = _arg3; foreground.defaultTextFormat = _local5; background.defaultTextFormat = _local5; foreground.selectable = false; background.selectable = false; foreground.embedFonts = true; background.embedFonts = true; background.y = BACKGROUND_Y; addChild(foreground); if (_arg1){ filters = [new GlowFilter(0, 1, 3, 3, 4, 1, false, false)]; }; } public function setHeight(_arg1:int):void{ background.height = _arg1; foreground.height = _arg1; } public function get text():String{ return (foreground.text); } public function scrollMax():void{ foreground.scrollV = foreground.maxScrollV; background.scrollV = background.maxScrollV; } public function set text(_arg1:String):void{ foreground.text = _arg1; background.text = _arg1; foreground.width = (foreground.textWidth + SPACE); foreground.height = (foreground.textHeight + SPACE); background.width = (background.textWidth + SPACE); background.height = (background.textHeight + SPACE); } } }//package net.odd1.minig.ui
Section 186
//ArrayUtil (net.odd1.minig.utils.ArrayUtil) package net.odd1.minig.utils { public final class ArrayUtil { public static function removeElement(_arg1:Array, _arg2):Boolean{ var _local3:int; _local3 = _arg1.indexOf(_arg2); if (_local3 != -1){ _arg1.splice(_local3, 1); return (true); }; return (false); } public static function randomArray(_arg1:Array){ var _local2:int; var _local3:*; _local2 = (Math.random() * _arg1.length); _local3 = _arg1[_local2]; _arg1.splice(_local2, 1); return (_local3); } } }//package net.odd1.minig.utils
Section 187
//MovieClipUtil (net.odd1.minig.utils.MovieClipUtil) package net.odd1.minig.utils { import flash.display.*; import net.odd1.minig.animations.*; public final class MovieClipUtil { public static function getAnimationData(_arg1:MovieClip):Array{ var _local2:FrameLabel; var _local3:AnimationData; var _local4:int; var _local5:int; var _local6:Array; _local6 = []; _local5 = _arg1.currentLabels.length; _local6.push(new AnimationData("", 0, (_arg1.totalFrames - 1))); _local4 = 0; while (_local4 < _local5) { _local2 = _arg1.currentLabels[_local4]; if (_local4 == (_local5 - 1)){ _local3 = new AnimationData(_local2.name, (_local2.frame - 1), (_arg1.totalFrames - 1)); } else { _local3 = new AnimationData(_local2.name, (_local2.frame - 1), (FrameLabel(_arg1.currentLabels[(_local4 + 1)]).frame - 2)); }; _local6.push(_local3); _local4++; }; return (_local6); } public static function nextFrame(_arg1:MovieClip):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; _local2 = _arg1.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = _arg1.getChildAt(_local3); if ((_local4 is MovieClip)){ nextFrame((_local4 as MovieClip)); }; _local3++; }; if (_arg1.currentFrame == _arg1.totalFrames){ _arg1.gotoAndStop(1); } else { _arg1.nextFrame(); }; } public static function gotoAndStopNextFrame(_arg1:MovieClip, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:DisplayObject; _local3 = _arg1.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1.getChildAt(_local4); if ((((_local5 is MovieClip)) && (!(MovieClip(_local5).animation)))){ nextFrame((_local5 as MovieClip)); }; _local4++; }; _arg1.gotoAndStop(_arg2); } public static function nextFrameAnimation(_arg1:MovieClip):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; _local2 = _arg1.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = _arg1.getChildAt(_local3); if ((((_local4 is MovieClip)) && (((!(MovieClip(_local4).animation)) || (((MovieClip(_local4).animation) && ((MovieClipAnimation(MovieClip(_local4).animation).animationsData.length > 2)))))))){ nextFrameAnimation((_local4 as MovieClip)); }; _local3++; }; if (_arg1.currentFrame == _arg1.totalFrames){ _arg1.gotoAndStop(1); } else { _arg1.nextFrame(); }; } public static function gotoAndStop(_arg1:MovieClip, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:DisplayObject; _local3 = _arg1.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1.getChildAt(_local4); if ((_local5 is MovieClip)){ gotoAndStop((_local5 as MovieClip), _arg2); }; _local4++; }; _arg1.gotoAndStop(_arg2); } } }//package net.odd1.minig.utils
Section 188
//Action (org.flintparticles.common.actions.Action) package org.flintparticles.common.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.behaviours.*; public interface Action extends Behaviour { function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void; } }//package org.flintparticles.common.actions
Section 189
//ActionBase (org.flintparticles.common.actions.ActionBase) package org.flintparticles.common.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; public class ActionBase implements Action { protected var _priority:int;// = 0 public function set priority(_arg1:int):void{ _priority = _arg1; } public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{ } public function removedFromEmitter(_arg1:Emitter):void{ } public function addedToEmitter(_arg1:Emitter):void{ } public function get priority():int{ return (_priority); } } }//package org.flintparticles.common.actions
Section 190
//Age (org.flintparticles.common.actions.Age) package org.flintparticles.common.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.energyEasing.*; public class Age extends ActionBase { private var _easing:Function; public function Age(_arg1:Function=null){ if (_arg1 == null){ _easing = Linear.easeNone; } else { _easing = _arg1; }; } public function set easing(_arg1:Function):void{ _easing = _arg1; } override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{ _arg2.age = (_arg2.age + _arg3); if (_arg2.age >= _arg2.lifetime){ _arg2.energy = 0; _arg2.isDead = true; } else { _arg2.energy = _easing(_arg2.age, _arg2.lifetime); }; } public function get easing():Function{ return (_easing); } } }//package org.flintparticles.common.actions
Section 191
//Fade (org.flintparticles.common.actions.Fade) package org.flintparticles.common.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; public class Fade extends ActionBase { private var _endAlpha:Number; private var _diffAlpha:Number; public function Fade(_arg1:Number=1, _arg2:Number=0){ priority = -5; _diffAlpha = (_arg1 - _arg2); _endAlpha = _arg2; } public function get endAlpha():Number{ return (_endAlpha); } public function set endAlpha(_arg1:Number):void{ _diffAlpha = ((_endAlpha + _diffAlpha) - _arg1); _endAlpha = _arg1; } public function set startAlpha(_arg1:Number):void{ _diffAlpha = (_arg1 - _endAlpha); } override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{ var _local4:Number = (_endAlpha + (_diffAlpha * _arg2.energy)); _arg2.color = ((_arg2.color & 0xFFFFFF) | (Math.round((_local4 * 0xFF)) << 24)); } public function get startAlpha():Number{ return ((_endAlpha + _diffAlpha)); } } }//package org.flintparticles.common.actions
Section 192
//Activity (org.flintparticles.common.activities.Activity) package org.flintparticles.common.activities { import org.flintparticles.common.emitters.*; import org.flintparticles.common.behaviours.*; public interface Activity extends Behaviour { function initialize(_arg1:Emitter):void; function update(_arg1:Emitter, _arg2:Number):void; } }//package org.flintparticles.common.activities
Section 193
//Behaviour (org.flintparticles.common.behaviours.Behaviour) package org.flintparticles.common.behaviours { import org.flintparticles.common.emitters.*; public interface Behaviour { function set priority(_arg1:int):void; function addedToEmitter(_arg1:Emitter):void; function get priority():int; function removedFromEmitter(_arg1:Emitter):void; } }//package org.flintparticles.common.behaviours
Section 194
//BehaviourArrayUtils (org.flintparticles.common.behaviours.BehaviourArrayUtils) package org.flintparticles.common.behaviours { public class BehaviourArrayUtils { public static function add(_arg1:Array, _arg2:Behaviour):uint{ var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { if (_arg1[_local4].priority < _arg2.priority){ break; }; _local4++; }; _arg1.splice(_local4, 0, _arg2); return ((_local3 + 1)); } public static function remove(_arg1:Array, _arg2:Behaviour):Boolean{ var _local3:int = _arg1.indexOf(_arg2); if (_local3 != -1){ _arg1.splice(_local3, 1); return (true); }; return (false); } public static function removeAt(_arg1:Array, _arg2:uint):Behaviour{ var _local3:Behaviour = (_arg1[_arg2] as Behaviour); _arg1.splice(_arg2, 1); return (_local3); } public static function containsType(_arg1:Array, _arg2:Class):Boolean{ var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { if ((_arg1[_local4] is _arg2)){ return (true); }; _local4++; }; return (false); } public static function sortArray(_arg1:Array):void{ _arg1.sortOn("priority", Array.NUMERIC); } public static function clear(_arg1:Array):void{ _arg1.length = 0; } public static function contains(_arg1:Array, _arg2:Behaviour):Boolean{ return (!((_arg1.indexOf(_arg2) == -1))); } } }//package org.flintparticles.common.behaviours
Section 195
//Blast (org.flintparticles.common.counters.Blast) package org.flintparticles.common.counters { import org.flintparticles.common.emitters.*; public class Blast implements Counter { private var _done:Boolean;// = false private var _startCount:uint; public function Blast(_arg1:uint=0){ _startCount = _arg1; } public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{ return (0); } public function startEmitter(_arg1:Emitter):uint{ _arg1.dispatchCounterComplete(); return (_startCount); } public function resume():void{ } public function stop():void{ } public function get startCount():Number{ return (_startCount); } public function get complete():Boolean{ return (_done); } public function set startCount(_arg1:Number):void{ _startCount = _arg1; } } }//package org.flintparticles.common.counters
Section 196
//Counter (org.flintparticles.common.counters.Counter) package org.flintparticles.common.counters { import org.flintparticles.common.emitters.*; public interface Counter { function stop():void; function updateEmitter(_arg1:Emitter, _arg2:Number):uint; function get complete():Boolean; function startEmitter(_arg1:Emitter):uint; function resume():void; } }//package org.flintparticles.common.counters
Section 197
//ZeroCounter (org.flintparticles.common.counters.ZeroCounter) package org.flintparticles.common.counters { import org.flintparticles.common.emitters.*; public class ZeroCounter implements Counter { public function get complete():Boolean{ return (true); } public function stop():void{ } public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{ return (0); } public function startEmitter(_arg1:Emitter):uint{ return (0); } public function resume():void{ } } }//package org.flintparticles.common.counters
Section 198
//Line (org.flintparticles.common.displayObjects.Line) package org.flintparticles.common.displayObjects { import flash.display.*; public class Line extends Shape { private var _color:uint; private var _length:Number; public function Line(_arg1:Number=1, _arg2:uint=0xFFFFFF, _arg3:String="normal"){ _length = _arg1; _color = _arg2; draw(); blendMode = _arg3; } public function get color():uint{ return (_color); } public function get length():Number{ return (_length); } private function draw():void{ graphics.clear(); graphics.lineStyle(1, _color); graphics.moveTo((-(_length) * 0.5), 0); graphics.lineTo((_length * 0.5), 0); } public function set length(_arg1:Number):void{ _length = _arg1; draw(); } public function set color(_arg1:uint):void{ _color = _arg1; draw(); } } }//package org.flintparticles.common.displayObjects
Section 199
//Emitter (org.flintparticles.common.emitters.Emitter) package org.flintparticles.common.emitters { import flash.events.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.initializers.*; import org.flintparticles.common.actions.*; import org.flintparticles.common.activities.*; import org.flintparticles.common.counters.*; import org.flintparticles.common.events.*; import org.flintparticles.common.behaviours.*; import org.flintparticles.common.utils.*; public class Emitter extends EventDispatcher { protected var _running:Boolean;// = false protected var _activities:Array; protected var _particles:Array; protected var _initializers:Array; protected var _dispatchCounterComplete:Boolean;// = false protected var _counter:Counter; protected var _started:Boolean;// = false protected var _actions:Array; protected var _useInternalTick:Boolean;// = true protected var _particleFactory:ParticleFactory; protected var _fixedFrameTime:Number;// = 0 protected var _maximumFrameTime:Number;// = 0.1 public function Emitter(){ _particles = new Array(); _actions = new Array(); _initializers = new Array(); _activities = new Array(); _counter = new ZeroCounter(); } public function addInitializer(_arg1:Initializer):void{ BehaviourArrayUtils.add(_initializers, _arg1); _arg1.addedToEmitter(this); } public function stop():void{ if (_useInternalTick){ FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener); }; _started = false; killAllParticles(); } public function pause():void{ _running = false; } public function killAllParticles():void{ var _local1:int = _particles.length; var _local2:int; while (_local2 < _local1) { dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _particles[_local2])); _particleFactory.disposeParticle(_particles[_local2]); _local2++; }; _particles.length = 0; } public function runAhead(_arg1:Number, _arg2:Number=10):void{ var _local3:Number = _maximumFrameTime; var _local4:Number = (1 / _arg2); _maximumFrameTime = _local4; while (_arg1 > 0) { _arg1 = (_arg1 - _local4); update(_local4); }; _maximumFrameTime = _local3; } public function set fixedFrameTime(_arg1:Number):void{ _fixedFrameTime = _arg1; } public function get maximumFrameTime():Number{ return (_maximumFrameTime); } public function set particles(_arg1:Array):void{ killAllParticles(); addExistingParticles(_arg1, false); } public function get useInternalTick():Boolean{ return (_useInternalTick); } public function set initializers(_arg1:Array):void{ var _local2:Initializer; for each (_local2 in _initializers) { _local2.removedFromEmitter(this); }; _initializers = _arg1.slice(); BehaviourArrayUtils.sortArray(_initializers); for each (_local2 in _arg1) { _local2.addedToEmitter(this); }; } public function get particleFactory():ParticleFactory{ return (_particleFactory); } private function updateEventListener(_arg1:UpdateEvent):void{ if (_fixedFrameTime){ update(_fixedFrameTime); } else { update(_arg1.time); }; } protected function createParticle():Particle{ var _local1:Particle = _particleFactory.createParticle(); var _local2:int = _initializers.length; initParticle(_local1); var _local3:int; while (_local3 < _local2) { _initializers[_local3].initialize(this, _local1); _local3++; }; _particles.push(_local1); dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_CREATED, _local1)); return (_local1); } public function get particles():Array{ return (_particles); } protected function sortParticles():void{ } public function removeActivity(_arg1:Activity):void{ if (BehaviourArrayUtils.remove(_activities, _arg1)){ _arg1.removedFromEmitter(this); }; } public function set maximumFrameTime(_arg1:Number):void{ _maximumFrameTime = _arg1; } protected function initParticle(_arg1:Particle):void{ } public function addAction(_arg1:Action):void{ BehaviourArrayUtils.add(_actions, _arg1); _arg1.addedToEmitter(this); } public function hasInitializerOfType(_arg1:Class):Boolean{ return (BehaviourArrayUtils.containsType(_initializers, _arg1)); } public function removeInitializer(_arg1:Initializer):void{ if (BehaviourArrayUtils.remove(_initializers, _arg1)){ _arg1.removedFromEmitter(this); }; } public function get running():Boolean{ return (_running); } public function hasActionOfType(_arg1:Class):Boolean{ return (BehaviourArrayUtils.containsType(_actions, _arg1)); } public function get fixedFrameTime():Number{ return (_fixedFrameTime); } public function set particleFactory(_arg1:ParticleFactory):void{ _particleFactory = _arg1; } public function set useInternalTick(_arg1:Boolean):void{ if (_useInternalTick != _arg1){ _useInternalTick = _arg1; if (_started){ if (_useInternalTick){ FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true); } else { FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener); }; }; }; } public function resume():void{ _running = true; } public function addActivity(_arg1:Activity):void{ BehaviourArrayUtils.add(_activities, _arg1); _arg1.addedToEmitter(this); } public function get initializers():Array{ return (_initializers); } public function addExistingParticles(_arg1:Array, _arg2:Boolean=false):void{ var _local4:int; var _local5:int; var _local6:int; var _local3:int = _arg1.length; if (_arg2){ _local5 = _initializers.length; _local6 = 0; while (_local6 < _local5) { _local4 = 0; while (_local4 < _local3) { _initializers[_local6].initialize(this, _arg1[_local4]); _local4++; }; _local6++; }; }; _local4 = 0; while (_local4 < _local3) { _particles.push(_arg1[_local4]); dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_ADDED, _arg1[_local4])); _local4++; }; } public function hasActivityOfType(_arg1:Class):Boolean{ return (BehaviourArrayUtils.containsType(_activities, _arg1)); } public function set activities(_arg1:Array):void{ var _local2:Activity; for each (_local2 in _activities) { _local2.removedFromEmitter(this); }; _activities = _arg1.slice(); BehaviourArrayUtils.sortArray(_activities); for each (_local2 in _activities) { _local2.addedToEmitter(this); }; } public function hasInitializer(_arg1:Initializer):Boolean{ return (BehaviourArrayUtils.contains(_initializers, _arg1)); } public function removeAction(_arg1:Action):void{ if (BehaviourArrayUtils.remove(_actions, _arg1)){ _arg1.removedFromEmitter(this); }; } public function hasActivity(_arg1:Activity):Boolean{ return (BehaviourArrayUtils.contains(_activities, _arg1)); } public function get activities():Array{ return (_activities); } public function hasAction(_arg1:Action):Boolean{ return (BehaviourArrayUtils.contains(_actions, _arg1)); } public function start():void{ if (_useInternalTick){ FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true); }; _started = true; _running = true; var _local1:int = _activities.length; var _local2:int; while (_local2 < _local1) { _activities[_local2].initialize(this); _local2++; }; _local1 = _counter.startEmitter(this); _local2 = 0; while (_local2 < _local1) { createParticle(); _local2++; }; } public function update(_arg1:Number):void{ var _local2:int; var _local3:Particle; var _local5:Action; var _local6:int; var _local7:int; if (!_running){ return; }; if (_arg1 > _maximumFrameTime){ _arg1 = _maximumFrameTime; }; var _local4:int = _counter.updateEmitter(this, _arg1); _local2 = 0; while (_local2 < _local4) { createParticle(); _local2++; }; sortParticles(); _local4 = _activities.length; _local2 = 0; while (_local2 < _local4) { _activities[_local2].update(this, _arg1); _local2++; }; if (_particles.length > 0){ _local4 = _actions.length; _local6 = _particles.length; _local7 = 0; while (_local7 < _local4) { _local5 = _actions[_local7]; _local2 = 0; while (_local2 < _local6) { _local3 = _particles[_local2]; _local5.update(this, _local3, _arg1); _local2++; }; _local7++; }; _local2 = _local6; while (_local2--) { _local3 = _particles[_local2]; if (_local3.isDead){ dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _local3)); _particleFactory.disposeParticle(_local3); _particles.splice(_local2, 1); }; }; } else { dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_EMPTY)); }; dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_UPDATED)); if (_dispatchCounterComplete){ _dispatchCounterComplete = false; dispatchEvent(new EmitterEvent(EmitterEvent.COUNTER_COMPLETE)); }; } public function set counter(_arg1:Counter):void{ _counter = _arg1; if (running){ _counter.startEmitter(this); }; } public function set actions(_arg1:Array):void{ var _local2:Action; for each (_local2 in _actions) { _local2.removedFromEmitter(this); }; _actions = _arg1.slice(); BehaviourArrayUtils.sortArray(_actions); for each (_local2 in _arg1) { _local2.addedToEmitter(this); }; } public function dispatchCounterComplete():void{ _dispatchCounterComplete = true; } public function get counter():Counter{ return (_counter); } public function get actions():Array{ return (_actions); } } }//package org.flintparticles.common.emitters
Section 200
//Linear (org.flintparticles.common.energyEasing.Linear) package org.flintparticles.common.energyEasing { public class Linear { public static function easeOut(_arg1:Number, _arg2:Number):Number{ return ((1 - (_arg1 / _arg2))); } public static function easeIn(_arg1:Number, _arg2:Number):Number{ return ((1 - (_arg1 / _arg2))); } public static function easeInOut(_arg1:Number, _arg2:Number):Number{ return ((1 - (_arg1 / _arg2))); } public static function easeNone(_arg1:Number, _arg2:Number):Number{ return ((1 - (_arg1 / _arg2))); } } }//package org.flintparticles.common.energyEasing
Section 201
//EmitterEvent (org.flintparticles.common.events.EmitterEvent) package org.flintparticles.common.events { import flash.events.*; public class EmitterEvent extends Event { public static var COUNTER_COMPLETE:String = "counterComplete"; public static var EMITTER_UPDATED:String = "emitterUpdated"; public static var EMITTER_EMPTY:String = "emitterEmpty"; public function EmitterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } } }//package org.flintparticles.common.events
Section 202
//ParticleEvent (org.flintparticles.common.events.ParticleEvent) package org.flintparticles.common.events { import flash.events.*; import org.flintparticles.common.particles.*; public class ParticleEvent extends Event { public var particle:Particle; public var otherObject; public static var PARTICLES_COLLISION:String = "particlesCollision"; public static var PARTICLE_ADDED:String = "particleAdded"; public static var PARTICLE_DEAD:String = "particleDead"; public static var PARTICLE_CREATED:String = "particleCreated"; public function ParticleEvent(_arg1:String, _arg2:Particle=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.particle = _arg2; } override public function clone():Event{ var _local1:ParticleEvent = new ParticleEvent(type, particle, bubbles, cancelable); _local1.otherObject = otherObject; return (_local1); } } }//package org.flintparticles.common.events
Section 203
//UpdateEvent (org.flintparticles.common.events.UpdateEvent) package org.flintparticles.common.events { import flash.events.*; public class UpdateEvent extends Event { public var time:Number; public static var UPDATE:String = "update"; public function UpdateEvent(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.time = _arg2; } override public function clone():Event{ return (new UpdateEvent(type, time, bubbles, cancelable)); } } }//package org.flintparticles.common.events
Section 204
//ColorInit (org.flintparticles.common.initializers.ColorInit) package org.flintparticles.common.initializers { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.utils.*; public class ColorInit extends InitializerBase { private var _max:uint; private var _min:uint; public function ColorInit(_arg1:uint=0xFFFFFF, _arg2:uint=0xFFFFFF){ _min = _arg1; _max = _arg2; } public function set minColor(_arg1:uint):void{ _min = _arg1; } public function get color():uint{ return (((_min == _max)) ? _min : interpolateColors(_max, _min, 0.5)); } public function set color(_arg1:uint):void{ _max = (_min = _arg1); } override public function initialize(_arg1:Emitter, _arg2:Particle):void{ if (_max == _min){ _arg2.color = _min; } else { _arg2.color = interpolateColors(_min, _max, Math.random()); }; } public function get minColor():uint{ return (_min); } public function set maxColor(_arg1:uint):void{ _max = _arg1; } public function get maxColor():uint{ return (_max); } } }//package org.flintparticles.common.initializers
Section 205
//Initializer (org.flintparticles.common.initializers.Initializer) package org.flintparticles.common.initializers { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.behaviours.*; public interface Initializer extends Behaviour { function initialize(_arg1:Emitter, _arg2:Particle):void; } }//package org.flintparticles.common.initializers
Section 206
//InitializerBase (org.flintparticles.common.initializers.InitializerBase) package org.flintparticles.common.initializers { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; public class InitializerBase implements Initializer { protected var _priority:int;// = 0 public function set priority(_arg1:int):void{ _priority = _arg1; } public function initialize(_arg1:Emitter, _arg2:Particle):void{ } public function removedFromEmitter(_arg1:Emitter):void{ } public function addedToEmitter(_arg1:Emitter):void{ } public function get priority():int{ return (_priority); } } }//package org.flintparticles.common.initializers
Section 207
//Lifetime (org.flintparticles.common.initializers.Lifetime) package org.flintparticles.common.initializers { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; public class Lifetime extends InitializerBase { private var _max:Number; private var _min:Number; public function Lifetime(_arg1:Number=1.79769313486232E308, _arg2:Number=NaN){ _max = _arg2; _min = _arg1; } public function get lifetime():Number{ return (((_min == _max)) ? _min : ((_max + _min) * 0.5)); } public function get maxLifetime():Number{ return (_max); } override public function initialize(_arg1:Emitter, _arg2:Particle):void{ if (isNaN(_max)){ _arg2.lifetime = _min; } else { _arg2.lifetime = (_min + (Math.random() * (_max - _min))); }; } public function set lifetime(_arg1:Number):void{ _max = (_min = _arg1); } public function set minLifetime(_arg1:Number):void{ _min = _arg1; } public function set maxLifetime(_arg1:Number):void{ _max = _arg1; } public function get minLifetime():Number{ return (_min); } } }//package org.flintparticles.common.initializers
Section 208
//SharedImage (org.flintparticles.common.initializers.SharedImage) package org.flintparticles.common.initializers { import flash.display.*; import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; public class SharedImage extends InitializerBase { private var _image:DisplayObject; public function SharedImage(_arg1:DisplayObject=null){ _image = _arg1; } override public function initialize(_arg1:Emitter, _arg2:Particle):void{ _arg2.image = _image; } public function set image(_arg1:DisplayObject):void{ _image = _arg1; } public function get image():DisplayObject{ return (_image); } } }//package org.flintparticles.common.initializers
Section 209
//Particle (org.flintparticles.common.particles.Particle) package org.flintparticles.common.particles { import flash.utils.*; import flash.geom.*; public class Particle { public var energy:Number;// = 1 public var lifetime:Number;// = 0 public var scale:Number;// = 1 public var image;// = null public var color:uint;// = 4294967295 public var collisionRadius:Number;// = 1 private var _colorTransform:ColorTransform;// = null private var _previousColor:uint; public var isDead:Boolean;// = false public var mass:Number;// = 1 private var _dictionary:Dictionary;// = null public var age:Number;// = 0 public function get dictionary():Dictionary{ if (_dictionary == null){ _dictionary = new Dictionary(true); }; return (_dictionary); } public function get colorTransform():ColorTransform{ if (((!(_colorTransform)) || (!((_previousColor == color))))){ _colorTransform = new ColorTransform((((color >>> 16) & 0xFF) / 0xFF), (((color >>> 8) & 0xFF) / 0xFF), ((color & 0xFF) / 0xFF), (((color >>> 24) & 0xFF) / 0xFF), 0, 0, 0, 0); _previousColor = color; }; return (_colorTransform); } protected function cloneInto(_arg1:Particle):Particle{ var _local2:Object; _arg1.color = color; _arg1.scale = scale; _arg1.mass = mass; _arg1.collisionRadius = collisionRadius; _arg1.lifetime = lifetime; _arg1.age = age; _arg1.energy = energy; _arg1.isDead = isDead; _arg1.image = image; if (_dictionary){ _arg1._dictionary = new Dictionary(true); for (_local2 in _dictionary) { _arg1._dictionary[_local2] = _dictionary[_local2]; }; }; return (_arg1); } public function get alpha():Number{ return ((((color & 4278190080) >>> 24) / 0xFF)); } public function initialize():void{ color = 4294967295; scale = 1; mass = 1; collisionRadius = 1; lifetime = 0; age = 0; energy = 1; isDead = false; image = null; _dictionary = null; _colorTransform = null; } public function clone(_arg1:ParticleFactory=null):Particle{ var _local2:Particle; if (_arg1){ _local2 = _arg1.createParticle(); } else { _local2 = new Particle(); }; return (cloneInto(_local2)); } } }//package org.flintparticles.common.particles
Section 210
//ParticleFactory (org.flintparticles.common.particles.ParticleFactory) package org.flintparticles.common.particles { public interface ParticleFactory { function clearAllParticles():void; function createParticle():Particle; function disposeParticle(_arg1:Particle):void; } }//package org.flintparticles.common.particles
Section 211
//Renderer (org.flintparticles.common.renderers.Renderer) package org.flintparticles.common.renderers { import org.flintparticles.common.emitters.*; public interface Renderer { function removeEmitter(_arg1:Emitter):void; function addEmitter(_arg1:Emitter):void; } }//package org.flintparticles.common.renderers
Section 212
//SpriteRendererBase (org.flintparticles.common.renderers.SpriteRendererBase) package org.flintparticles.common.renderers { import flash.events.*; import flash.display.*; import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.events.*; public class SpriteRendererBase extends Sprite implements Renderer { protected var _emitters:Array; public function SpriteRendererBase(){ _emitters = new Array(); mouseEnabled = false; mouseChildren = false; addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true); } private function particleAdded(_arg1:ParticleEvent):void{ addParticle(_arg1.particle); if (stage){ stage.invalidate(); }; } public function set emitters(_arg1:Array):void{ var _local2:Emitter; for each (_local2 in _emitters) { removeEmitter(_local2); }; for each (_local2 in _arg1) { addEmitter(_local2); }; } private function addedToStage(_arg1:Event):void{ if (stage){ stage.invalidate(); }; } public function get emitters():Array{ return (_emitters); } protected function addParticle(_arg1:Particle):void{ } private function updateParticles(_arg1:Event):void{ var _local2:Array = new Array(); var _local3:int; while (_local3 < _emitters.length) { _local2 = _local2.concat(_emitters[_local3].particles); _local3++; }; renderParticles(_local2); } private function emitterUpdated(_arg1:EmitterEvent):void{ if (stage){ stage.invalidate(); }; } public function removeEmitter(_arg1:Emitter):void{ var _local3:Particle; var _local2:int; while (_local2 < _emitters.length) { if (_emitters[_local2] == _arg1){ _emitters.splice(_local2, 1); _arg1.removeEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated); _arg1.removeEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded); _arg1.removeEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded); _arg1.removeEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved); for each (_local3 in _arg1.particles) { removeParticle(_local3); }; if (_emitters.length == 0){ removeEventListener(Event.RENDER, updateParticles); renderParticles([]); } else { stage.invalidate(); }; return; }; _local2++; }; } protected function renderParticles(_arg1:Array):void{ } protected function removeParticle(_arg1:Particle):void{ } private function particleRemoved(_arg1:ParticleEvent):void{ removeParticle(_arg1.particle); if (stage){ stage.invalidate(); }; } public function addEmitter(_arg1:Emitter):void{ var _local2:Particle; _emitters.push(_arg1); if (stage){ stage.invalidate(); }; _arg1.addEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated, false, 0, true); _arg1.addEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded, false, 0, true); _arg1.addEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded, false, 0, true); _arg1.addEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved, false, 0, true); for each (_local2 in _arg1.particles) { addParticle(_local2); }; if (_emitters.length == 1){ addEventListener(Event.RENDER, updateParticles, false, 0, true); }; } } }//package org.flintparticles.common.renderers
Section 213
//FrameUpdater (org.flintparticles.common.utils.FrameUpdater) package org.flintparticles.common.utils { import flash.events.*; import flash.display.*; import flash.utils.*; import org.flintparticles.common.events.*; public class FrameUpdater extends EventDispatcher { private var _shape:Shape; private var _running:Boolean;// = false private var _time:Number; private static var _instance:FrameUpdater; public function FrameUpdater(){ _shape = new Shape(); } private function startTimer():void{ _shape.addEventListener(Event.ENTER_FRAME, frameUpdate, false, 0, true); _time = getTimer(); _running = true; } private function stopTimer():void{ _shape.removeEventListener(Event.ENTER_FRAME, frameUpdate); _running = false; } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); if (((_running) && (!(hasEventListener(UpdateEvent.UPDATE))))){ stopTimer(); }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); if (((!(_running)) && (hasEventListener(UpdateEvent.UPDATE)))){ startTimer(); }; } private function frameUpdate(_arg1:Event):void{ var _local2:int = _time; _time = getTimer(); var _local3:Number = ((_time - _local2) * 0.001); dispatchEvent(new UpdateEvent(UpdateEvent.UPDATE, _local3)); } public static function get instance():FrameUpdater{ if (_instance == null){ _instance = new (FrameUpdater); }; return (_instance); } } }//package org.flintparticles.common.utils
Section 214
//interpolateColors (org.flintparticles.common.utils.interpolateColors) package org.flintparticles.common.utils { public function interpolateColors(_arg1:uint, _arg2:uint, _arg3:Number):uint{ var _local4:Number = (1 - _arg3); var _local5:uint = Math.round(((((_arg1 >>> 16) & 0xFF) * _arg3) + (((_arg2 >>> 16) & 0xFF) * _local4))); var _local6:uint = Math.round(((((_arg1 >>> 8) & 0xFF) * _arg3) + (((_arg2 >>> 8) & 0xFF) * _local4))); var _local7:uint = Math.round((((_arg1 & 0xFF) * _arg3) + ((_arg2 & 0xFF) * _local4))); var _local8:uint = Math.round(((((_arg1 >>> 24) & 0xFF) * _arg3) + (((_arg2 >>> 24) & 0xFF) * _local4))); return (((((_local8 << 24) | (_local5 << 16)) | (_local6 << 8)) | _local7)); } }//package org.flintparticles.common.utils
Section 215
//Maths (org.flintparticles.common.utils.Maths) package org.flintparticles.common.utils { public class Maths { private static const DEGTORAD:Number = (Math.PI / 180); private static const RADTODEG:Number = (180 / Math.PI); public static function asRadians(_arg1:Number):Number{ return ((_arg1 * DEGTORAD)); } public static function asDegrees(_arg1:Number):Number{ return ((_arg1 * RADTODEG)); } } }//package org.flintparticles.common.utils
Section 216
//Move (org.flintparticles.twoD.actions.Move) package org.flintparticles.twoD.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.actions.*; import org.flintparticles.twoD.particles.*; public class Move extends ActionBase { private var p:Particle2D; public function Move(){ priority = -10; } override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{ p = Particle2D(_arg2); p.x = (p.x + (p.velX * _arg3)); p.y = (p.y + (p.velY * _arg3)); } } }//package org.flintparticles.twoD.actions
Section 217
//RotateToDirection (org.flintparticles.twoD.actions.RotateToDirection) package org.flintparticles.twoD.actions { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.common.actions.*; import org.flintparticles.twoD.particles.*; public class RotateToDirection extends ActionBase { override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{ var _local4:Particle2D = Particle2D(_arg2); _local4.rotation = Math.atan2(_local4.velY, _local4.velX); } } }//package org.flintparticles.twoD.actions
Section 218
//Emitter2D (org.flintparticles.twoD.emitters.Emitter2D) package org.flintparticles.twoD.emitters { import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.twoD.particles.*; import org.flintparticles.common.utils.*; public class Emitter2D extends Emitter { protected var _y:Number;// = 0 public var spaceSort:Boolean;// = false public var spaceSortedX:Array; protected var _x:Number;// = 0 protected var _rotation:Number;// = 0 protected static var _creator:ParticleCreator2D = new ParticleCreator2D(); public function Emitter2D(){ _particleFactory = _creator; } public function get y():Number{ return (_y); } override protected function initParticle(_arg1:Particle):void{ var _local2:Particle2D; _local2 = Particle2D(_arg1); _local2.x = _x; _local2.y = _y; _local2.rotation = _rotation; } override protected function sortParticles():void{ var _local1:int; var _local2:int; if (spaceSort){ spaceSortedX = _particles.sortOn("x", (Array.NUMERIC | Array.RETURNINDEXEDARRAY)); _local1 = _particles.length; _local2 = 0; while (_local2 < _local1) { _particles[spaceSortedX[_local2]].sortID = _local2; _local2++; }; }; } public function set x(_arg1:Number):void{ _x = _arg1; } public function set rotRadians(_arg1:Number):void{ _rotation = _arg1; } public function get x():Number{ return (_x); } public function get rotRadians():Number{ return (_rotation); } public function set rotation(_arg1:Number):void{ _rotation = Maths.asRadians(_arg1); } public function get rotation():Number{ return (Maths.asDegrees(_rotation)); } public function set y(_arg1:Number):void{ _y = _arg1; } public static function get defaultParticleFactory():ParticleFactory{ return (_creator); } } }//package org.flintparticles.twoD.emitters
Section 219
//Position (org.flintparticles.twoD.initializers.Position) package org.flintparticles.twoD.initializers { import flash.geom.*; import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.twoD.zones.*; import org.flintparticles.common.initializers.*; import org.flintparticles.twoD.particles.*; public class Position extends InitializerBase { private var _zone:Zone2D; public function Position(_arg1:Zone2D=null){ this.zone = _arg1; } override public function initialize(_arg1:Emitter, _arg2:Particle):void{ var _local5:Number; var _local6:Number; var _local3:Particle2D = Particle2D(_arg2); var _local4:Point = _zone.getLocation(); if (_local3.rotation == 0){ _local3.x = (_local3.x + _local4.x); _local3.y = (_local3.y + _local4.y); } else { _local5 = Math.sin(_local3.rotation); _local6 = Math.cos(_local3.rotation); _local3.x = (_local3.x + ((_local6 * _local4.x) - (_local5 * _local4.y))); _local3.y = (_local3.y + ((_local6 * _local4.y) + (_local5 * _local4.x))); }; } public function set zone(_arg1:Zone2D):void{ _zone = _arg1; } public function get zone():Zone2D{ return (_zone); } } }//package org.flintparticles.twoD.initializers
Section 220
//Velocity (org.flintparticles.twoD.initializers.Velocity) package org.flintparticles.twoD.initializers { import flash.geom.*; import org.flintparticles.common.emitters.*; import org.flintparticles.common.particles.*; import org.flintparticles.twoD.zones.*; import org.flintparticles.common.initializers.*; import org.flintparticles.twoD.particles.*; public class Velocity extends InitializerBase { private var _zone:Zone2D; public function Velocity(_arg1:Zone2D=null){ this.zone = _arg1; } override public function initialize(_arg1:Emitter, _arg2:Particle):void{ var _local3:Particle2D; var _local5:Number; var _local6:Number; _local3 = Particle2D(_arg2); var _local4:Point = _zone.getLocation(); if (_local3.rotation == 0){ _local3.velX = _local4.x; _local3.velY = _local4.y; } else { _local5 = Math.sin(_local3.rotation); _local6 = Math.cos(_local3.rotation); _local3.velX = ((_local6 * _local4.x) - (_local5 * _local4.y)); _local3.velY = ((_local6 * _local4.y) + (_local5 * _local4.x)); }; } public function set zone(_arg1:Zone2D):void{ _zone = _arg1; } public function get zone():Zone2D{ return (_zone); } } }//package org.flintparticles.twoD.initializers
Section 221
//Particle2D (org.flintparticles.twoD.particles.Particle2D) package org.flintparticles.twoD.particles { import flash.geom.*; import org.flintparticles.common.particles.*; public class Particle2D extends Particle { public var sortID:int;// = -1 private var _inertia:Number; public var velY:Number;// = 0 private var _previousRadius:Number; private var _previousMass:Number; public var angVelocity:Number;// = 0 public var x:Number;// = 0 public var y:Number;// = 0 public var velX:Number;// = 0 public var rotation:Number;// = 0 override public function clone(_arg1:ParticleFactory=null):Particle{ var _local2:Particle2D; if (_arg1){ _local2 = (_arg1.createParticle() as Particle2D); } else { _local2 = new Particle2D(); }; cloneInto(_local2); _local2.x = x; _local2.y = y; _local2.velX = velX; _local2.velY = velY; _local2.rotation = rotation; _local2.angVelocity = angVelocity; return (_local2); } override public function initialize():void{ super.initialize(); x = 0; y = 0; velX = 0; velY = 0; rotation = 0; angVelocity = 0; sortID = -1; } public function get matrixTransform():Matrix{ var _local1:Number = (scale * Math.cos(rotation)); var _local2:Number = (scale * Math.sin(rotation)); return (new Matrix(_local1, _local2, -(_local2), _local1, x, y)); } public function get inertia():Number{ if (((!((mass == _previousMass))) || (!((collisionRadius == _previousRadius))))){ _inertia = (((mass * collisionRadius) * collisionRadius) * 0.5); _previousMass = mass; _previousRadius = collisionRadius; }; return (_inertia); } } }//package org.flintparticles.twoD.particles
Section 222
//ParticleCreator2D (org.flintparticles.twoD.particles.ParticleCreator2D) package org.flintparticles.twoD.particles { import org.flintparticles.common.particles.*; public class ParticleCreator2D implements ParticleFactory { private var _particles:Array; public function ParticleCreator2D(){ _particles = new Array(); } public function clearAllParticles():void{ _particles = new Array(); } public function disposeParticle(_arg1:Particle):void{ if ((_arg1 is Particle2D)){ _arg1.initialize(); _particles.push(_arg1); }; } public function createParticle():Particle{ if (_particles.length){ return (_particles.pop()); }; return (new Particle2D()); } } }//package org.flintparticles.twoD.particles
Section 223
//BitmapRenderer (org.flintparticles.twoD.renderers.BitmapRenderer) package org.flintparticles.twoD.renderers { import flash.display.*; import flash.geom.*; import flash.filters.*; import org.flintparticles.twoD.particles.*; import org.flintparticles.common.renderers.*; public class BitmapRenderer extends SpriteRendererBase { protected var _bitmap:Bitmap; protected var _bitmapData:BitmapData; protected var _smoothing:Boolean; protected var _canvas:Rectangle; protected var _colorMap:Array; protected var _postFilters:Array; protected var _preFilters:Array; protected static var ZERO_POINT:Point = new Point(0, 0); public function BitmapRenderer(_arg1:Rectangle, _arg2:Boolean=false){ mouseEnabled = false; mouseChildren = false; _smoothing = _arg2; _preFilters = new Array(); _postFilters = new Array(); _canvas = _arg1; createBitmap(); } public function get bitmapData():BitmapData{ return (_bitmapData); } override protected function renderParticles(_arg1:Array):void{ var _local2:int; var _local3:int; if (!_bitmap){ return; }; _bitmapData.lock(); _local3 = _preFilters.length; _local2 = 0; while (_local2 < _local3) { _bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _preFilters[_local2]); _local2++; }; if ((((_local3 == 0)) && ((_postFilters.length == 0)))){ _bitmapData.fillRect(_bitmap.bitmapData.rect, 0); }; _local3 = _arg1.length; if (_local3){ _local2 = _local3; while (_local2--) { drawParticle(_arg1[_local2]); }; }; _local3 = _postFilters.length; _local2 = 0; while (_local2 < _local3) { _bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _postFilters[_local2]); _local2++; }; if (_colorMap){ _bitmapData.paletteMap(_bitmapData, _bitmapData.rect, ZERO_POINT, _colorMap[1], _colorMap[2], _colorMap[3], _colorMap[0]); }; _bitmapData.unlock(); } protected function createBitmap():void{ if (!_canvas){ return; }; if (((_bitmap) && (_bitmapData))){ _bitmapData.dispose(); _bitmapData = null; }; if (_bitmap){ removeChild(_bitmap); _bitmap = null; }; _bitmap = new Bitmap(null, "auto", _smoothing); _bitmapData = new BitmapData(Math.ceil(_canvas.width), Math.ceil(_canvas.height), true, 0); _bitmap.bitmapData = _bitmapData; addChild(_bitmap); _bitmap.x = _canvas.x; _bitmap.y = _canvas.y; } public function set canvas(_arg1:Rectangle):void{ _canvas = _arg1; createBitmap(); } public function clearPaletteMap():void{ _colorMap = null; } public function get canvas():Rectangle{ return (_canvas); } public function removeFilter(_arg1:BitmapFilter):void{ var _local2:int; while (_local2 < _preFilters.length) { if (_preFilters[_local2] == _arg1){ _preFilters.splice(_local2, 1); return; }; _local2++; }; _local2 = 0; while (_local2 < _postFilters.length) { if (_postFilters[_local2] == _arg1){ _postFilters.splice(_local2, 1); return; }; _local2++; }; } public function get preFilters():Array{ return (_preFilters.slice()); } public function set smoothing(_arg1:Boolean):void{ _smoothing = _arg1; if (_bitmap){ _bitmap.smoothing = _arg1; }; } public function set preFilters(_arg1:Array):void{ var _local2:BitmapFilter; for each (_local2 in _preFilters) { removeFilter(_local2); }; for each (_local2 in _arg1) { addFilter(_local2, false); }; } protected function drawParticle(_arg1:Particle2D):void{ var _local2:Matrix; _local2 = _arg1.matrixTransform; _local2.translate(-(_canvas.x), -(_canvas.y)); _bitmapData.draw(_arg1.image, _local2, _arg1.colorTransform, DisplayObject(_arg1.image).blendMode, null, _smoothing); } public function setPaletteMap(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null, _arg4:Array=null):void{ _colorMap = new Array(4); _colorMap[0] = _arg4; _colorMap[1] = _arg1; _colorMap[2] = _arg2; _colorMap[3] = _arg3; } public function get smoothing():Boolean{ return (_smoothing); } public function set postFilters(_arg1:Array):void{ var _local2:BitmapFilter; for each (_local2 in _postFilters) { removeFilter(_local2); }; for each (_local2 in _arg1) { addFilter(_local2, true); }; } public function addFilter(_arg1:BitmapFilter, _arg2:Boolean=false):void{ if (_arg2){ _postFilters.push(_arg1); } else { _preFilters.push(_arg1); }; } public function get postFilters():Array{ return (_postFilters.slice()); } } }//package org.flintparticles.twoD.renderers
Section 224
//DiscZone (org.flintparticles.twoD.zones.DiscZone) package org.flintparticles.twoD.zones { import flash.geom.*; public class DiscZone implements Zone2D { private var _innerRadius:Number; private var _innerSq:Number; private var _outerRadius:Number; private var _center:Point; private var _outerSq:Number; private static const TWOPI:Number = 6.28318530717959; public function DiscZone(_arg1:Point=null, _arg2:Number=0, _arg3:Number=0){ if (_arg2 < _arg3){ throw (new Error((((("The outerRadius (" + _arg2) + ") can't be smaller than the innerRadius (") + _arg3) + ") in your DiscZone. N.B. the outerRadius is the second argument in the constructor and the innerRadius is the third argument."))); }; if (_arg1 == null){ _center = new Point(0, 0); } else { _center = _arg1; }; _innerRadius = _arg3; _outerRadius = _arg2; _innerSq = (_innerRadius * _innerRadius); _outerSq = (_outerRadius * _outerRadius); } public function getArea():Number{ return ((Math.PI * (_outerSq - _innerSq))); } public function set centerX(_arg1:Number):void{ _center.x = _arg1; } public function set centerY(_arg1:Number):void{ _center.y = _arg1; } public function get innerRadius():Number{ return (_innerRadius); } public function set innerRadius(_arg1:Number):void{ _innerRadius = _arg1; _innerSq = (_innerRadius * _innerRadius); } public function get center():Point{ return (_center); } public function set outerRadius(_arg1:Number):void{ _outerRadius = _arg1; _outerSq = (_outerRadius * _outerRadius); } public function get centerX():Number{ return (_center.x); } public function get centerY():Number{ return (_center.y); } public function contains(_arg1:Number, _arg2:Number):Boolean{ _arg1 = (_arg1 - _center.x); _arg2 = (_arg2 - _center.y); var _local3:Number = ((_arg1 * _arg1) + (_arg2 * _arg2)); return ((((_local3 <= _outerSq)) && ((_local3 >= _innerSq)))); } public function getLocation():Point{ var _local1:Number = Math.random(); var _local2:Point = Point.polar((_innerRadius + ((1 - (_local1 * _local1)) * (_outerRadius - _innerRadius))), (Math.random() * TWOPI)); _local2.x = (_local2.x + _center.x); _local2.y = (_local2.y + _center.y); return (_local2); } public function get outerRadius():Number{ return (_outerRadius); } public function set center(_arg1:Point):void{ _center = _arg1; } } }//package org.flintparticles.twoD.zones
Section 225
//Zone2D (org.flintparticles.twoD.zones.Zone2D) package org.flintparticles.twoD.zones { import flash.geom.*; public interface Zone2D { function getArea():Number; function getLocation():Point; function contains(_arg1:Number, _arg2:Number):Boolean; } }//package org.flintparticles.twoD.zones
Section 226
//_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 227
//_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 228
//_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 229
//_comboDropdownStyle (_comboDropdownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropdownStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropdown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.leading = 0; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; this.paddingLeft = 5; this.paddingRight = 5; }; }; } } }//package
Section 230
//_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 231
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 232
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 233
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.iconColor = 0x111111; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.textDecoration = "none"; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.modalTransparencyColor = 0xDDDDDD; this.cornerRadius = 0; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.version = "3.0.0"; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.disabledIconColor = 0x999999; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 234
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 235
//_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 236
//_linkButtonStyleStyle (_linkButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _linkButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".linkButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 2; this.paddingLeft = 2; this.paddingBottom = 2; this.paddingRight = 2; }; }; } } }//package
Section 237
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 238
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 239
//_popUpMenuStyle (_popUpMenuStyle) package { import mx.core.*; import mx.styles.*; public class _popUpMenuStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".popUpMenu", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "normal"; this.textAlign = "left"; }; }; } } }//package
Section 240
//_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 241
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle) package { import mx.core.*; import mx.styles.*; public class _swatchPanelTextFieldStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "inset"; this.borderColor = 14015965; this.highlightColor = 12897484; this.backgroundColor = 0xFFFFFF; this.shadowCapColor = 14015965; this.shadowColor = 14015965; this.paddingLeft = 5; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.paddingRight = 5; }; }; } } }//package
Section 242
//_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 243
//_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 244
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 245
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var fbs = _arg1; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 246
//_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 247
//_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 248
//AsteroidWar (AsteroidWar) package { import net.odd1.minig.managers.*; import flash.display.*; import net.odd1.AsteroidWar.screens.*; import net.odd1.minig.global.*; public class AsteroidWar extends MovieClip { public var m_Logointro:LogosIntro; public function AsteroidWar(_arg1:ScreenManager){ GlobalVariables.nextScreen = GameScreen; } } }//package
Section 249
//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 250
//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 251
//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

Library Items

Symbol 1 BitmapUsed by:2
Symbol 2 GraphicUses:1Used by:43
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:14
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:14
Symbol 7 GraphicUsed by:14
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClipUses:8Used by:14
Symbol 10 GraphicUsed by:13
Symbol 11 FontUsed by:12
Symbol 12 TextUses:11Used by:13
Symbol 13 MovieClipUses:10 12Used by:14
Symbol 14 MovieClipUses:4 6 7 9 13Used by:43
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClipUses:15Used by:20 26 29 31
Symbol 17 FontUsed by:18 24
Symbol 18 TextUses:17Used by:20
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClipUses:16 18 19Used by:43
Symbol 21 FontUsed by:22 23
Symbol 22 TextUses:21Used by:43
Symbol 23 TextUses:21Used by:43
Symbol 24 TextUses:17Used by:26
Symbol 25 GraphicUsed by:26 29 31
Symbol 26 MovieClipUses:16 24 25Used by:43
Symbol 27 FontUsed by:28 30
Symbol 28 TextUses:27Used by:29
Symbol 29 MovieClipUses:16 28 25Used by:43
Symbol 30 TextUses:27Used by:31
Symbol 31 MovieClipUses:16 30 25Used by:43
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClipUses:32Used by:43
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:43
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:40
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:38Used by:40
Symbol 40 MovieClipUses:37 39Used by:43
Symbol 41 FontUsed by:42
Symbol 42 TextUses:41Used by:43
Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu]Uses:2 14 20 22 23 26 29 31 33 35 40 42
Symbol 44 Sound {net.odd1.AsteroidWar.global.Ressources_HIT3_CLASS} [net.odd1.AsteroidWar.global.Ressources_HIT3_CLASS]
Symbol 45 Sound {net.odd1.AsteroidWar.global.Ressources_DESTROY1_CLASS} [net.odd1.AsteroidWar.global.Ressources_DESTROY1_CLASS]
Symbol 46 Sound {net.odd1.AsteroidWar.global.Ressources_BOMB_CLASS} [net.odd1.AsteroidWar.global.Ressources_BOMB_CLASS]
Symbol 47 Sound {net.odd1.AsteroidWar.global.Ressources_SHOOT3_CLASS} [net.odd1.AsteroidWar.global.Ressources_SHOOT3_CLASS]
Symbol 48 Sound {net.odd1.AsteroidWar.global.Ressources_SHOOT2_CLASS} [net.odd1.AsteroidWar.global.Ressources_SHOOT2_CLASS]
Symbol 49 Sound {net.odd1.AsteroidWar.global.Ressources_SHOOT4_CLASS} [net.odd1.AsteroidWar.global.Ressources_SHOOT4_CLASS]
Symbol 50 Sound {net.odd1.AsteroidWar.global.Ressources_DESTROY2_CLASS} [net.odd1.AsteroidWar.global.Ressources_DESTROY2_CLASS]
Symbol 51 Sound {net.odd1.AsteroidWar.global.Ressources_MUSICINTRO_CLASS} [net.odd1.AsteroidWar.global.Ressources_MUSICINTRO_CLASS]
Symbol 52 Sound {net.odd1.AsteroidWar.global.Ressources_MUSIC_CLASS} [net.odd1.AsteroidWar.global.Ressources_MUSIC_CLASS]
Symbol 53 Sound {net.odd1.AsteroidWar.global.Ressources_HIT2_CLASS} [net.odd1.AsteroidWar.global.Ressources_HIT2_CLASS]
Symbol 54 Sound {net.odd1.AsteroidWar.global.Ressources_HIT0_CLASS} [net.odd1.AsteroidWar.global.Ressources_HIT0_CLASS]
Symbol 55 Sound {net.odd1.AsteroidWar.global.Ressources_HIT4_CLASS} [net.odd1.AsteroidWar.global.Ressources_HIT4_CLASS]
Symbol 56 Sound {net.odd1.AsteroidWar.global.Ressources_HIT1_CLASS} [net.odd1.AsteroidWar.global.Ressources_HIT1_CLASS]
Symbol 57 Sound {net.odd1.AsteroidWar.global.Ressources_DESTROY0_CLASS} [net.odd1.AsteroidWar.global.Ressources_DESTROY0_CLASS]
Symbol 58 Sound {net.odd1.AsteroidWar.global.Ressources_SHOOT1_CLASS} [net.odd1.AsteroidWar.global.Ressources_SHOOT1_CLASS]
Symbol 59 Sound {net.odd1.AsteroidWar.global.Ressources_SHOOT0_CLASS} [net.odd1.AsteroidWar.global.Ressources_SHOOT0_CLASS]
Symbol 60 Font {net.odd1.AsteroidWar.fonts.FontPerfect16Pixel}
Symbol 61 MovieClip {net.odd1.AsteroidWar.global.Ressources_GAMESCREEN_CLASS}
Symbol 62 BinaryData {net.odd1.AsteroidWar.screens.Preloader_ODD1GameLogo_dataClass}
Symbol 63 BinaryData {net.odd1.AsteroidWar.FactoryClass_LOCALE_EN_US_CLASS}
Symbol 64 Font {net.odd1.AsteroidWar.fonts.FontDefault}
Symbol 65 BinaryData {net.odd1.AsteroidWar.global.Ressources_GAMESCREEN_CLASS_dataClass}
Symbol 66 BinaryData {net.odd1.AsteroidWar.global.Ressources_SHIPASSETS_CLASS_dataClass}
Symbol 67 Font {net.odd1.AsteroidWar.fonts.FontUni}
Symbol 68 BinaryData {net.odd1.AsteroidWar.global.Ressources_PRELOADERSCREEN_CLASS_dataClass}
Symbol 69 BinaryData {net.odd1.AsteroidWar.FactoryClass_SAVE_CLASS}
Symbol 70 Font {net.odd1.AsteroidWar.fonts.FontEurostile}
Symbol 71 BinaryData {net.odd1.AsteroidWar.global.Ressources_HUD_CLASS_dataClass}
Symbol 72 Font {net.odd1.AsteroidWar.fonts.FontOratorStd}
Symbol 73 BinaryData {net.odd1.AsteroidWar.FactoryClass_DATA_CLASS}
Symbol 74 BinaryData {net.odd1.AsteroidWar.screens.Preloader_ArmoreGameLogo_dataClass}
Symbol 75 Font {net.odd1.AsteroidWar.fonts.FontCommand}
Symbol 76 BinaryData {net.odd1.AsteroidWar.global.Ressources_PARTICULESASSETS_CLASS_dataClass}

Instance Names

"shape"Symbol 40 MovieClip Frame 1Symbol 37 MovieClip
"weapons"Symbol 40 MovieClip Frame 1Symbol 39 MovieClip
"showScoreMainMenu_btn"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 20 MovieClip
"PlayBtn"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 26 MovieClip
"moregamebtn"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 29 MovieClip
"twitterbtn"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 31 MovieClip
"armorGame"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 33 MovieClip
"odd1"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 35 MovieClip
"ship"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 40 MovieClip
"ship"Symbol 43 MovieClip {net.odd1.AsteroidWar.screens.Preloader_MainMenuClassScreen} [MainMenu] Frame 1Symbol 40 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 43 as "MainMenu"
ExportAssets (56)Timeline Frame 1Symbol 44 as "net.odd1.AsteroidWar.global.Ressources_HIT3_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 45 as "net.odd1.AsteroidWar.global.Ressources_DESTROY1_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 46 as "net.odd1.AsteroidWar.global.Ressources_BOMB_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 47 as "net.odd1.AsteroidWar.global.Ressources_SHOOT3_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 48 as "net.odd1.AsteroidWar.global.Ressources_SHOOT2_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 49 as "net.odd1.AsteroidWar.global.Ressources_SHOOT4_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 50 as "net.odd1.AsteroidWar.global.Ressources_DESTROY2_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 51 as "net.odd1.AsteroidWar.global.Ressources_MUSICINTRO_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 52 as "net.odd1.AsteroidWar.global.Ressources_MUSIC_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 53 as "net.odd1.AsteroidWar.global.Ressources_HIT2_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 54 as "net.odd1.AsteroidWar.global.Ressources_HIT0_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 55 as "net.odd1.AsteroidWar.global.Ressources_HIT4_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 56 as "net.odd1.AsteroidWar.global.Ressources_HIT1_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 57 as "net.odd1.AsteroidWar.global.Ressources_DESTROY0_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 58 as "net.odd1.AsteroidWar.global.Ressources_SHOOT1_CLASS"
ExportAssets (56)Timeline Frame 1Symbol 59 as "net.odd1.AsteroidWar.global.Ressources_SHOOT0_CLASS"
SerialNumber (41)Timeline Frame 1

Labels

"net_odd1_AsteroidWar_FactoryClass"Frame 1
"AsteroidWar"Frame 2




http://swfchan.com/28/135247/info.shtml
Created: 9/2 -2019 15:12:08 Last modified: 9/2 -2019 15:12:08 Server time: 05/11 -2024 10:41:52