Section 1
//GameTracker (FGL.GameTracker.GameTracker)
package FGL.GameTracker {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.external.*;
public class GameTracker extends EventDispatcher {
protected var _passphrase:String;// = ""
protected var _responder:Responder;// = null
protected var _timer:Timer;// = null
protected var _serverVersionMajor:int;// = 0
protected var _conn:NetConnection;// = null
protected var _currentGame:int;// = 0
protected var _msg_queue:Array;
protected var _inGame:Boolean;// = false
protected var _inLevel:Boolean;// = false
protected var _serviceName:String;// = ""
protected var _currentLevel:int;// = 0
protected var _hostUrl:String;// = ""
protected var _sessionID:uint;
protected var _isEnabled:Boolean;// = false
protected var _serverVersionMinor:int;// = 0
public static const GAMETRACKER_SERVER_ERROR:String = "gametracker_server_error";
private static const TIMER_DELAY:int = 15000;
public static const GAMETRACKER_CODING_ERROR:String = "gametracker_coding_error";
public function GameTracker(){
_msg_queue = new Array();
super();
setGlobalConfig();
if (_isEnabled){
_responder = new Responder(onSuccess, onNetworkingError);
_conn = new NetConnection();
_conn.connect(_hostUrl);
_timer = new Timer(TIMER_DELAY);
_timer.addEventListener("timer", onTimer);
_timer.start();
_sessionID = Math.floor((new Date().getTime() / 1000));
addToMsgQueue("begin_app", null, 0, null, null);
};
}
public function beginGame(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (_inGame){
endGame(_arg1, _arg2, "AUTO:(this game automatically ended when new game was started)");
};
_currentGame++;
_inGame = true;
addToMsgQueue("begin_game", null, _arg1, _arg2, _arg3);
}
protected function setGlobalConfig():void{
var ret:Array;
_isEnabled = false;
_serverVersionMajor = 0;
_serverVersionMinor = 0;
_hostUrl = "";
_serviceName = "";
_passphrase = "";
try {
if (ExternalInterface.available){
ret = ExternalInterface.call("get_gametracker_info");
_serverVersionMajor = ret[0];
_serverVersionMinor = ret[1];
_hostUrl = ret[2];
_serviceName = ret[3];
_passphrase = ret[4];
_isEnabled = (_serverVersionMajor == 1);
};
} catch(e) {
};
}
public function checkpoint(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "checkpoint() called before startGame() was called!"));
} else {
addToMsgQueue("checkpoint", null, _arg1, _arg2, _arg3);
};
}
protected function onNetworkingError(_arg1):void{
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_SERVER_ERROR, "Networking error"));
}
protected function submitMsgQueue():void{
var _local1:Object;
if (((_isEnabled) && ((_msg_queue.length > 0)))){
_local1 = new Object();
_local1["actions"] = _msg_queue;
_local1["identifier"] = _passphrase;
_conn.call(_serviceName, _responder, _local1);
_msg_queue = new Array();
};
}
public function customMsg(_arg1:String, _arg2:Number=0, _arg3:String=null, _arg4:String=null):void{
addToMsgQueue("custom", _arg1, _arg2, _arg3, _arg4);
}
public function beginLevel(_arg1:int, _arg2:Number=0, _arg3:String=null, _arg4:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "beginLevel() called before beginGame() was called!"));
} else {
if (_inLevel){
endLevel(_arg2, _arg3, "AUTO:(this level automatically ended when new level was started)");
};
_currentLevel = _arg1;
_inLevel = true;
addToMsgQueue("begin_level", null, _arg2, _arg3, _arg4);
};
}
public function alert(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
addToMsgQueue("alert", null, _arg1, _arg2, _arg3);
submitMsgQueue();
}
protected function onTimer(_arg1:TimerEvent):void{
submitMsgQueue();
}
public function endLevel(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inLevel){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "endLevel() called before beginLevel() was called!"));
} else {
_inLevel = false;
addToMsgQueue("end_level", null, _arg1, _arg2, _arg3);
};
}
protected function onSuccess(_arg1):void{
if (_arg1.toString() != ""){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_SERVER_ERROR, _arg1.toString()));
};
}
protected function addToMsgQueue(_arg1:String, _arg2:String, _arg3:Number, _arg4:String, _arg5:String):void{
var _local6:Object;
if (_isEnabled){
_local6 = new Object();
_local6["action"] = _arg1;
_local6["custom_action"] = _arg2;
_local6["session_id"] = _sessionID;
_local6["game_idx"] = _currentGame;
_local6["level"] = _currentLevel;
_local6["score"] = _arg3;
_local6["game_state"] = _arg4;
_local6["time"] = Math.floor((new Date().getTime() / 1000));
_local6["msg"] = _arg5;
_msg_queue.push(_local6);
};
}
public function endGame(_arg1:Number=0, _arg2:String=null, _arg3:String=null):void{
if (!_inGame){
dispatchEvent(new GameTrackerErrorEvent(GAMETRACKER_CODING_ERROR, "endGame() called before beginGame() was called!"));
} else {
if (_inLevel){
endLevel(_arg1, _arg2, "AUTO:(this level automatically ended when game ended)");
};
addToMsgQueue("end_game", null, _arg1, _arg2, _arg3);
_inGame = false;
submitMsgQueue();
};
}
public function isEnabled():Boolean{
return (_isEnabled);
}
}
}//package FGL.GameTracker
Section 2
//GameTrackerErrorEvent (FGL.GameTracker.GameTrackerErrorEvent)
package FGL.GameTracker {
import flash.events.*;
public class GameTrackerErrorEvent extends Event {
public var _msg:String;
public function GameTrackerErrorEvent(_arg1:String, _arg2:String){
_msg = _arg2;
super(_arg1, false, false);
}
public function get msg():String{
return (_msg);
}
}
}//package FGL.GameTracker
Section 3
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.4.1.10084";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 4
//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.1.10084";
}
}//package mx.core
Section 5
//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.1.10084";
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 6
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 7
//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.1.10084";
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 8
//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.1.10084";
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 9
//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.1.10084";
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 10
//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.1.10084";
}
}//package mx.core
Section 11
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 12
//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 13
//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 14
//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 15
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 16
//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 17
//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 18
//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 19
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 20
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 21
//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 22
//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 23
//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 24
//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 25
//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 26
//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 27
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.4.1.10084";
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 28
//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.1.10084";
}
}//package mx.core
Section 29
//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 30
//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.1.10084";
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 31
//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.1.10084";
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 32
//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.1.10084";
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 33
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.4.1.10084";
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 34
//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 35
//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 36
//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 37
//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 38
//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 39
//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 40
//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 41
//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 42
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.4.1.10084";
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.utils.*;
import flash.system.*;
import flash.display.*;
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 43
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 44
//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 45
//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 46
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 47
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
public class LocaleSorter {
mx_internal static const VERSION:String = "3.4.1.10084";
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 48
//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.1.10084";
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 49
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.4.1.10084";
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 50
//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.1.10084";
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 51
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
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.1.10084";
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 52
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.styles.*;
import flash.display.*;
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.1.10084";
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 53
//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.1.10084";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 54
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import mx.styles.*;
import flash.display.*;
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.1.10084";
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 55
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import mx.core.*;
import flash.events.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import flash.display.*;
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.1.10084";
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 56
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import mx.core.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
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.1.10084";
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 57
//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 58
//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 59
//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 60
//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 61
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 62
//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.1.10084";
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 63
//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.1.10084";
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 64
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
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 65
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
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 66
//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.1.10084";
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 67
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
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 68
//FlxAnim (org.flixel.data.FlxAnim)
package org.flixel.data {
public class FlxAnim {
public var delay:Number;
public var frames:Array;
public var looped:Boolean;
public var name:String;
public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){
name = _arg1;
delay = 0;
if (_arg3 > 0){
delay = (1 / _arg3);
};
frames = _arg2;
looped = _arg4;
}
}
}//package org.flixel.data
Section 69
//FlxConsole (org.flixel.data.FlxConsole)
package org.flixel.data {
import flash.display.*;
import org.flixel.*;
import flash.text.*;
public class FlxConsole extends Sprite {
protected const MAX_CONSOLE_LINES:uint = 0x0100;
protected var _lines:Array;
protected var _text:TextField;
public var mtrUpdate:FlxMonitor;
public var mtrTotal:FlxMonitor;
protected var _Y:Number;
protected var _console:Sprite;
public var mtrRender:FlxMonitor;
protected var _curFPS:uint;
protected var _extraDisplay:TextField;
protected var _bx:int;
protected var _by:int;
protected var _YT:Number;
protected var _byt:int;
protected var _fpsDisplay:TextField;
public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){
visible = false;
x = (_arg1 * _arg3);
_by = (_arg2 * _arg3);
_byt = (_by - (FlxG.height * _arg3));
_YT = (_Y = (y = _byt));
var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432));
addChild(_local4);
mtrUpdate = new FlxMonitor(8);
mtrRender = new FlxMonitor(8);
mtrTotal = new FlxMonitor(8);
_text = new TextField();
_text.width = _local4.width;
_text.height = _local4.height;
_text.multiline = true;
_text.wordWrap = true;
_text.embedFonts = true;
_text.selectable = false;
_text.antiAliasType = AntiAliasType.NORMAL;
_text.gridFitType = GridFitType.PIXEL;
_text.defaultTextFormat = new TextFormat("system", 20, 0xFFFFFF);
addChild(_text);
_fpsDisplay = new TextField();
_fpsDisplay.width = 100;
_fpsDisplay.x = (_local4.width - 100);
_fpsDisplay.height = 20;
_fpsDisplay.multiline = true;
_fpsDisplay.wordWrap = true;
_fpsDisplay.embedFonts = true;
_fpsDisplay.selectable = false;
_fpsDisplay.antiAliasType = AntiAliasType.NORMAL;
_fpsDisplay.gridFitType = GridFitType.PIXEL;
_fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right");
addChild(_fpsDisplay);
_extraDisplay = new TextField();
_extraDisplay.width = 100;
_extraDisplay.x = (_local4.width - 100);
_extraDisplay.height = 64;
_extraDisplay.y = 20;
_extraDisplay.alpha = 0.5;
_extraDisplay.multiline = true;
_extraDisplay.wordWrap = true;
_extraDisplay.embedFonts = true;
_extraDisplay.selectable = false;
_extraDisplay.antiAliasType = AntiAliasType.NORMAL;
_extraDisplay.gridFitType = GridFitType.PIXEL;
_extraDisplay.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, true, null, null, null, null, "right");
addChild(_extraDisplay);
_lines = new Array();
}
public function log(_arg1:String):void{
var _local2:String;
var _local3:uint;
if (_arg1 == null){
_arg1 = "NULL";
};
trace(_arg1);
_lines.push(_arg1);
if (_lines.length > MAX_CONSOLE_LINES){
_lines.shift();
_local2 = "";
_local3 = 0;
while (_local3 < _lines.length) {
_local2 = (_local2 + (_lines[_local3] + "\n"));
_local3++;
};
_text.text = _local2;
} else {
_text.appendText((_arg1 + "\n"));
};
_text.scrollV = _text.height;
}
public function update():void{
var _local1:Number = mtrTotal.average();
_fpsDisplay.text = (uint((1000 / _local1)) + " fps");
var _local2:uint = mtrUpdate.average();
var _local3:uint = mtrRender.average();
var _local4:uint = (_local2 + _local3);
var _local5:uint = uint(_local1);
_extraDisplay.text = (((((((((_local2 + "ms update\n") + _local3) + "ms render\n") + _local4) + "ms flixel\n") + (_local5 - _local4)) + "ms flash\n") + _local5) + "ms total");
if (_Y < _YT){
_Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed));
} else {
if (_Y > _YT){
_Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed));
};
};
if (_Y > _by){
_Y = _by;
} else {
if (_Y < _byt){
_Y = _byt;
visible = false;
};
};
y = Math.floor(_Y);
}
public function toggle():void{
if (_YT == _by){
_YT = _byt;
} else {
_YT = _by;
visible = true;
};
}
}
}//package org.flixel.data
Section 70
//FlxFade (org.flixel.data.FlxFade)
package org.flixel.data {
import org.flixel.*;
public class FlxFade extends FlxSprite {
protected var _delay:Number;
protected var _complete:Function;
public function FlxFade(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
exists = false;
}
override public function update():void{
alpha = (alpha + (FlxG.elapsed / _delay));
if (alpha >= 1){
alpha = 1;
if (_complete != null){
_complete();
};
};
}
public function start(_arg1:uint=4278190080, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (((!(_arg4)) && (exists))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
alpha = 0;
exists = true;
}
public function stop():void{
exists = false;
}
}
}//package org.flixel.data
Section 71
//FlxFlash (org.flixel.data.FlxFlash)
package org.flixel.data {
import org.flixel.*;
public class FlxFlash extends FlxSprite {
protected var _delay:Number;
protected var _complete:Function;
public function FlxFlash(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
exists = false;
}
override public function update():void{
alpha = (alpha - (FlxG.elapsed / _delay));
if (alpha <= 0){
exists = false;
if (_complete != null){
_complete();
};
};
}
public function start(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (((!(_arg4)) && (exists))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
alpha = 1;
exists = true;
}
public function stop():void{
exists = false;
}
}
}//package org.flixel.data
Section 72
//FlxKeyboard (org.flixel.data.FlxKeyboard)
package org.flixel.data {
import flash.events.*;
public class FlxKeyboard {
protected const _t:uint = 0x0100;
public var RIGHT:Boolean;
public var LEFT:Boolean;
public var FOUR:Boolean;
public var TWO:Boolean;
public var CONTROL:Boolean;
public var A:Boolean;
public var B:Boolean;
public var C:Boolean;
public var D:Boolean;
public var E:Boolean;
public var ONE:Boolean;
public var G:Boolean;
public var H:Boolean;
public var I:Boolean;
public var J:Boolean;
public var K:Boolean;
public var F:Boolean;
public var N:Boolean;
public var O:Boolean;
public var Q:Boolean;
public var R:Boolean;
public var S:Boolean;
public var T:Boolean;
public var U:Boolean;
public var MINUS:Boolean;
public var Y:Boolean;
public var L:Boolean;
public var Z:Boolean;
public var QUOTE:Boolean;
public var V:Boolean;
public var X:Boolean;
public var P:Boolean;
public var SHIFT:Boolean;
public var SLASH:Boolean;
public var BACKSPACE:Boolean;
public var EIGHT:Boolean;
public var W:Boolean;
public var M:Boolean;
public var THREE:Boolean;
public var ESCAPE:Boolean;
public var SEMICOLON:Boolean;
public var CAPSLOCK:Boolean;
protected var _lookup:Object;
public var PLUS:Boolean;
protected var _map:Array;
public var ZERO:Boolean;
public var DOWN:Boolean;
public var F1:Boolean;
public var F2:Boolean;
public var F3:Boolean;
public var F4:Boolean;
public var F5:Boolean;
public var F6:Boolean;
public var F7:Boolean;
public var NINE:Boolean;
public var F9:Boolean;
public var ALT:Boolean;
public var F8:Boolean;
public var DELETE:Boolean;
public var LBRACKET:Boolean;
public var UP:Boolean;
public var ENTER:Boolean;
public var FIVE:Boolean;
public var SIX:Boolean;
public var COMMA:Boolean;
public var PERIOD:Boolean;
public var BACKSLASH:Boolean;
public var F10:Boolean;
public var F11:Boolean;
public var F12:Boolean;
public var SEVEN:Boolean;
public var SPACE:Boolean;
public var RBRACKET:Boolean;
public function FlxKeyboard(){
var _local1:uint;
_lookup = new Object();
_map = new Array(_t);
_local1 = 65;
while (_local1 <= 90) {
addKey(String.fromCharCode(_local1), _local1);
_local1++;
};
_local1 = 48;
var _temp1 = _local1;
_local1 = (_local1 + 1);
addKey("ZERO", _temp1);
var _temp2 = _local1;
_local1 = (_local1 + 1);
addKey("ONE", _temp2);
var _temp3 = _local1;
_local1 = (_local1 + 1);
addKey("TWO", _temp3);
var _temp4 = _local1;
_local1 = (_local1 + 1);
addKey("THREE", _temp4);
var _temp5 = _local1;
_local1 = (_local1 + 1);
addKey("FOUR", _temp5);
var _temp6 = _local1;
_local1 = (_local1 + 1);
addKey("FIVE", _temp6);
var _temp7 = _local1;
_local1 = (_local1 + 1);
addKey("SIX", _temp7);
var _temp8 = _local1;
_local1 = (_local1 + 1);
addKey("SEVEN", _temp8);
var _temp9 = _local1;
_local1 = (_local1 + 1);
addKey("EIGHT", _temp9);
var _temp10 = _local1;
_local1 = (_local1 + 1);
addKey("NINE", _temp10);
_local1 = 1;
while (_local1 <= 12) {
addKey(("F" + _local1), (111 + _local1));
_local1++;
};
addKey("ESCAPE", 27);
addKey("MINUS", 189);
addKey("PLUS", 187);
addKey("DELETE", 46);
addKey("BACKSPACE", 8);
addKey("LBRACKET", 219);
addKey("RBRACKET", 221);
addKey("BACKSLASH", 220);
addKey("CAPSLOCK", 20);
addKey("SEMICOLON", 186);
addKey("QUOTE", 222);
addKey("ENTER", 13);
addKey("SHIFT", 16);
addKey("COMMA", 188);
addKey("PERIOD", 190);
addKey("SLASH", 191);
addKey("CONTROL", 17);
addKey("ALT", 27);
addKey("SPACE", 32);
addKey("UP", 38);
addKey("DOWN", 40);
addKey("LEFT", 37);
addKey("RIGHT", 39);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = -1;
} else {
_local2.current = 0;
};
this[_local2.name] = false;
}
public function pressed(_arg1:String):Boolean{
return (this[_arg1]);
}
public function justReleased(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == -1));
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = 1;
} else {
_local2.current = 2;
};
this[_local2.name] = true;
}
public function reset():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
this[_local2.name] = false;
_local2.current = 0;
_local2.last = 0;
};
_local1++;
};
}
public function justPressed(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == 2));
}
public function update():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
if ((((_local2.last == -1)) && ((_local2.current == -1)))){
_local2.current = 0;
} else {
if ((((_local2.last == 2)) && ((_local2.current == 2)))){
_local2.current = 1;
};
};
_local2.last = _local2.current;
};
_local1++;
};
}
protected function addKey(_arg1:String, _arg2:uint):void{
_lookup[_arg1] = _arg2;
_map[_arg2] = {name:_arg1, current:0, last:0};
}
}
}//package org.flixel.data
Section 73
//FlxKong (org.flixel.data.FlxKong)
package org.flixel.data {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class FlxKong extends Sprite {
public var API;
public function FlxKong(){
API = null;
}
public function init():void{
var _local1:Object = LoaderInfo(root.loaderInfo).parameters;
var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
var _local3:URLRequest = new URLRequest(_local2);
var _local4:Loader = new Loader();
_local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded);
_local4.load(_local3);
this.addChild(_local4);
}
protected function APILoaded(_arg1:Event):void{
API = _arg1.target.content;
API.services.connect();
}
}
}//package org.flixel.data
Section 74
//FlxList (org.flixel.data.FlxList)
package org.flixel.data {
import org.flixel.*;
public class FlxList {
public var next:FlxList;
public var object:FlxObject;
public function FlxList(){
object = null;
next = null;
}
}
}//package org.flixel.data
Section 75
//FlxMouse (org.flixel.data.FlxMouse)
package org.flixel.data {
import flash.events.*;
import org.flixel.*;
public class FlxMouse {
protected var ImgDefaultCursor:Class;
protected var _out:Boolean;
public var cursor:FlxSprite;
public var screenY:int;
protected var _last:int;
public var x:int;
public var y:int;
protected var _current:int;
public var screenX:int;
public function FlxMouse(){
ImgDefaultCursor = FlxMouse_ImgDefaultCursor;
super();
x = 0;
y = 0;
screenX = 0;
screenY = 0;
_current = 0;
_last = 0;
cursor = null;
_out = false;
}
public function hide():void{
if (cursor != null){
cursor.visible = false;
_out = false;
};
}
public function update(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{
screenX = _arg1;
screenY = _arg2;
x = (screenX - FlxU.floor(_arg3));
y = (screenY - FlxU.floor(_arg4));
if (cursor != null){
cursor.x = x;
cursor.y = y;
};
if ((((_last == -1)) && ((_current == -1)))){
_current = 0;
} else {
if ((((_last == 2)) && ((_current == 2)))){
_current = 1;
};
};
_last = _current;
}
public function reset():void{
_current = 0;
_last = 0;
}
public function justReleased():Boolean{
return ((_current == -1));
}
public function handleMouseOver(_arg1:MouseEvent):void{
if (cursor != null){
cursor.visible = _out;
};
}
public function handleMouseDown(_arg1:MouseEvent):void{
if (_current > 0){
_current = 1;
} else {
_current = 2;
};
}
public function pressed():Boolean{
return ((_current > 0));
}
public function justPressed():Boolean{
return ((_current == 2));
}
public function load(_arg1:Class, _arg2:int=0, _arg3:int=0):void{
if (_arg1 == null){
_arg1 = ImgDefaultCursor;
};
cursor = new FlxSprite(screenX, screenY, _arg1);
cursor.offset.x = _arg2;
cursor.offset.y = _arg3;
}
public function handleMouseUp(_arg1:MouseEvent):void{
if (_current > 0){
_current = -1;
} else {
_current = 0;
};
}
public function handleMouseOut(_arg1:MouseEvent):void{
if (cursor != null){
_out = cursor.visible;
cursor.visible = false;
};
}
public function show(_arg1:Class=null, _arg2:int=0, _arg3:int=0):void{
_out = true;
if (_arg1 != null){
load(_arg1, _arg2, _arg3);
} else {
if (cursor != null){
cursor.visible = true;
} else {
load(null);
};
};
}
public function unload():void{
if (cursor != null){
if (cursor.visible){
load(null);
} else {
cursor = null;
};
};
}
}
}//package org.flixel.data
Section 76
//FlxMouse_ImgDefaultCursor (org.flixel.data.FlxMouse_ImgDefaultCursor)
package org.flixel.data {
import mx.core.*;
public class FlxMouse_ImgDefaultCursor extends BitmapAsset {
}
}//package org.flixel.data
Section 77
//FlxPanel (org.flixel.data.FlxPanel)
package org.flixel.data {
import org.flixel.*;
import flash.ui.*;
public class FlxPanel extends FlxObject {
protected var _close:FlxButton;
protected var _digg:FlxButton;
protected var _gameTitle:String;
protected var _closed:Boolean;
protected var _payPalID:String;
protected var _donate:FlxButton;
private var ImgClose:Class;
protected var _topBar:FlxSprite;
protected var _ty:Number;
protected var _caption:FlxText;
protected var _initialized:Boolean;
protected var _twitter:FlxButton;
protected var _delicious:FlxButton;
protected var _stumble:FlxButton;
private var ImgDelicious:Class;
private var ImgTwitter:Class;
protected var _mainBar:FlxSprite;
protected var _gameURL:String;
private var ImgStumble:Class;
private var ImgReddit:Class;
private var ImgDigg:Class;
protected var _bottomBar:FlxSprite;
protected var _payPalAmount:Number;
protected var _s:Number;
private var ImgDonate:Class;
protected var _reddit:FlxButton;
public function FlxPanel(){
ImgDonate = FlxPanel_ImgDonate;
ImgStumble = FlxPanel_ImgStumble;
ImgDigg = FlxPanel_ImgDigg;
ImgReddit = FlxPanel_ImgReddit;
ImgDelicious = FlxPanel_ImgDelicious;
ImgTwitter = FlxPanel_ImgTwitter;
ImgClose = FlxPanel_ImgClose;
super();
y = -21;
_ty = y;
_closed = false;
_initialized = false;
_topBar = new FlxSprite();
_topBar.createGraphic(FlxG.width, 1, 2147483647);
_topBar.scrollFactor.x = 0;
_topBar.scrollFactor.y = 0;
_mainBar = new FlxSprite();
_mainBar.createGraphic(FlxG.width, 19, 2130706432);
_mainBar.scrollFactor.x = 0;
_mainBar.scrollFactor.y = 0;
_bottomBar = new FlxSprite();
_bottomBar.createGraphic(FlxG.width, 1, 2147483647);
_bottomBar.scrollFactor.x = 0;
_bottomBar.scrollFactor.y = 0;
_donate = new FlxButton(3, 0, onDonate);
_donate.loadGraphic(new FlxSprite(0, 0, ImgDonate));
_donate.scrollFactor.x = 0;
_donate.scrollFactor.y = 0;
_stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble);
_stumble.loadGraphic(new FlxSprite(0, 0, ImgStumble));
_stumble.scrollFactor.x = 0;
_stumble.scrollFactor.y = 0;
_digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg);
_digg.loadGraphic(new FlxSprite(0, 0, ImgDigg));
_digg.scrollFactor.x = 0;
_digg.scrollFactor.y = 0;
_reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit);
_reddit.loadGraphic(new FlxSprite(0, 0, ImgReddit));
_reddit.scrollFactor.x = 0;
_reddit.scrollFactor.y = 0;
_delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious);
_delicious.loadGraphic(new FlxSprite(0, 0, ImgDelicious));
_delicious.scrollFactor.x = 0;
_delicious.scrollFactor.y = 0;
_twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter);
_twitter.loadGraphic(new FlxSprite(0, 0, ImgTwitter));
_twitter.scrollFactor.x = 0;
_twitter.scrollFactor.y = 0;
_caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), "");
_caption.alignment = "right";
_caption.scrollFactor.x = 0;
_caption.scrollFactor.y = 0;
_close = new FlxButton((FlxG.width - 16), 0, onClose);
_close.loadGraphic(new FlxSprite(0, 0, ImgClose));
_close.scrollFactor.x = 0;
_close.scrollFactor.y = 0;
hide();
visible = false;
_s = 50;
}
public function onDelicious():void{
FlxU.openURL(((("http://delicious.com/save?v=5&noui&jump=close&url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function onTwitter():void{
FlxU.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL))));
}
public function setup(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{
_payPalID = _arg1;
if (_payPalID.length <= 0){
_donate.visible = false;
};
_payPalAmount = _arg2;
_gameTitle = _arg3;
_gameURL = _arg4;
_caption.text = _arg5;
_initialized = true;
}
public function onStumble():void{
FlxU.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL)));
}
override public function render():void{
if (!_initialized){
return;
};
if (_topBar.visible){
_topBar.render();
};
if (_mainBar.visible){
_mainBar.render();
};
if (_bottomBar.visible){
_bottomBar.render();
};
if (_donate.visible){
_donate.render();
};
if (_stumble.visible){
_stumble.render();
};
if (_digg.visible){
_digg.render();
};
if (_reddit.visible){
_reddit.render();
};
if (_delicious.visible){
_delicious.render();
};
if (_twitter.visible){
_twitter.render();
};
if (_caption.visible){
_caption.render();
};
if (_close.visible){
_close.render();
};
}
public function onDigg():void{
FlxU.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function onReddit():void{
FlxU.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL)));
}
public function onDonate():void{
FlxU.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")¤cy_code=USD&amount=") + _payPalAmount));
}
override public function update():void{
if (!_initialized){
return;
};
if (_ty != y){
if (y < _ty){
y = (y + (FlxG.elapsed * _s));
if (y > _ty){
y = _ty;
};
} else {
y = (y - (FlxG.elapsed * _s));
if (y < _ty){
y = _ty;
};
};
_topBar.y = y;
_mainBar.y = (y + 1);
_bottomBar.y = (y + 20);
_donate.reset(_donate.x, (y + 4));
_stumble.reset(_stumble.x, (y + 4));
_digg.reset(_digg.x, (y + 4));
_reddit.reset(_reddit.x, (y + 4));
_delicious.reset(_delicious.x, (y + 5));
_twitter.reset(_twitter.x, (y + 4));
_caption.reset(_caption.x, (y + 4));
_close.reset(_close.x, (y + 4));
};
if ((((y <= -21)) || ((y >= FlxG.height)))){
visible = false;
} else {
visible = true;
};
if (visible){
if (_donate.active){
_donate.update();
};
if (_stumble.active){
_stumble.update();
};
if (_digg.active){
_digg.update();
};
if (_reddit.active){
_reddit.update();
};
if (_delicious.active){
_delicious.update();
};
if (_twitter.active){
_twitter.update();
};
if (_caption.active){
_caption.update();
};
if (_close.active){
_close.update();
};
};
}
public function show(_arg1:Boolean=true):void{
if (_closed){
return;
};
if (!_initialized){
FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor.");
return;
};
if (_arg1){
y = -21;
_ty = -1;
} else {
y = FlxG.height;
_ty = (FlxG.height - 20);
};
_donate.reset(_donate.x, (y + 4));
_stumble.reset(_stumble.x, (y + 4));
_digg.reset(_digg.x, (y + 4));
_reddit.reset(_reddit.x, (y + 4));
_delicious.reset(_delicious.x, (y + 5));
_twitter.reset(_twitter.x, (y + 4));
_caption.reset(_caption.x, (y + 4));
_close.reset(_close.x, (y + 4));
if (!FlxG.mouse.cursor.visible){
Mouse.show();
};
visible = true;
}
public function onClose():void{
_closed = true;
hide();
}
public function hide():void{
if (y < 0){
_ty = -21;
} else {
_ty = FlxG.height;
};
Mouse.hide();
}
}
}//package org.flixel.data
Section 78
//FlxPanel_ImgClose (org.flixel.data.FlxPanel_ImgClose)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgClose extends BitmapAsset {
}
}//package org.flixel.data
Section 79
//FlxPanel_ImgDelicious (org.flixel.data.FlxPanel_ImgDelicious)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDelicious extends BitmapAsset {
}
}//package org.flixel.data
Section 80
//FlxPanel_ImgDigg (org.flixel.data.FlxPanel_ImgDigg)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDigg extends BitmapAsset {
}
}//package org.flixel.data
Section 81
//FlxPanel_ImgDonate (org.flixel.data.FlxPanel_ImgDonate)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDonate extends BitmapAsset {
}
}//package org.flixel.data
Section 82
//FlxPanel_ImgReddit (org.flixel.data.FlxPanel_ImgReddit)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgReddit extends BitmapAsset {
}
}//package org.flixel.data
Section 83
//FlxPanel_ImgStumble (org.flixel.data.FlxPanel_ImgStumble)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgStumble extends BitmapAsset {
}
}//package org.flixel.data
Section 84
//FlxPanel_ImgTwitter (org.flixel.data.FlxPanel_ImgTwitter)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgTwitter extends BitmapAsset {
}
}//package org.flixel.data
Section 85
//FlxPause (org.flixel.data.FlxPause)
package org.flixel.data {
import org.flixel.*;
public class FlxPause extends FlxGroup {
private var ImgKeyP:Class;
private var ImgKey0:Class;
private var ImgKeyPlus:Class;
private var ImgKeyMinus:Class;
public function FlxPause(){
var _local2:uint;
ImgKeyMinus = FlxPause_ImgKeyMinus;
ImgKeyPlus = FlxPause_ImgKeyPlus;
ImgKey0 = FlxPause_ImgKey0;
ImgKeyP = FlxPause_ImgKeyP;
super();
scrollFactor.x = 0;
scrollFactor.y = 0;
var _local1:uint = 80;
_local2 = 92;
x = ((FlxG.width - _local1) / 2);
y = ((FlxG.height - _local2) / 2);
add(new FlxSprite().createGraphic(_local1, _local2, 2852126720, true), true);
(add(new FlxText(0, 0, _local1, "this game is"), true) as FlxText).alignment = "center";
add(new FlxText(0, 10, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true);
add(new FlxSprite(4, 36, ImgKeyP), true);
add(new FlxText(16, 36, (_local1 - 16), "Pause Game"), true);
add(new FlxSprite(4, 50, ImgKey0), true);
add(new FlxText(16, 50, (_local1 - 16), "Mute Sound"), true);
add(new FlxSprite(4, 64, ImgKeyMinus), true);
add(new FlxText(16, 64, (_local1 - 16), "Sound Down"), true);
add(new FlxSprite(4, 78, ImgKeyPlus), true);
add(new FlxText(16, 78, (_local1 - 16), "Sound Up"), true);
}
}
}//package org.flixel.data
Section 86
//FlxPause_ImgKey0 (org.flixel.data.FlxPause_ImgKey0)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKey0 extends BitmapAsset {
}
}//package org.flixel.data
Section 87
//FlxPause_ImgKeyMinus (org.flixel.data.FlxPause_ImgKeyMinus)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyMinus extends BitmapAsset {
}
}//package org.flixel.data
Section 88
//FlxPause_ImgKeyP (org.flixel.data.FlxPause_ImgKeyP)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyP extends BitmapAsset {
}
}//package org.flixel.data
Section 89
//FlxPause_ImgKeyPlus (org.flixel.data.FlxPause_ImgKeyPlus)
package org.flixel.data {
import mx.core.*;
public class FlxPause_ImgKeyPlus extends BitmapAsset {
}
}//package org.flixel.data
Section 90
//FlxQuake (org.flixel.data.FlxQuake)
package org.flixel.data {
import org.flixel.*;
public class FlxQuake {
public var y:int;
protected var _timer:Number;
protected var _intensity:Number;
public var x:int;
protected var _zoom:uint;
public function FlxQuake(_arg1:uint){
_zoom = _arg1;
start(0);
}
public function update():void{
if (_timer > 0){
_timer = (_timer - FlxG.elapsed);
if (_timer <= 0){
_timer = 0;
x = 0;
y = 0;
} else {
x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom);
y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom);
};
};
}
public function start(_arg1:Number=0.05, _arg2:Number=0.5):void{
stop();
_intensity = _arg1;
_timer = _arg2;
}
public function stop():void{
x = 0;
y = 0;
_intensity = 0;
_timer = 0;
}
}
}//package org.flixel.data
Section 91
//FlxButton (org.flixel.FlxButton)
package org.flixel {
import flash.events.*;
public class FlxButton extends FlxGroup {
public var _on:FlxSprite;
protected var _offT:FlxText;
protected var _initialized:Boolean;
protected var _onT:FlxText;
protected var _pressed:Boolean;
protected var _callback:Function;
public var _off:FlxSprite;
protected var _onToggle:Boolean;
protected var _sf:FlxPoint;
public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){
x = _arg1;
y = _arg2;
width = 100;
height = 20;
_off = new FlxSprite().createGraphic(width, height, 4286545791);
_off.solid = false;
add(_off, true);
_on = new FlxSprite().createGraphic(width, height, 4294967295);
_on.solid = false;
add(_on, true);
_offT = null;
_onT = null;
_callback = _arg3;
_onToggle = false;
_pressed = false;
_initialized = false;
_sf = null;
}
protected function onMouseUp(_arg1:MouseEvent):void{
if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){
return;
};
if (((overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)) && ((FlxG.button_disable == false)))){
_callback();
};
}
override public function update():void{
if (!_initialized){
if (FlxG.stage != null){
FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_initialized = true;
};
};
_on.x = x;
_on.y = y;
super.update();
if (FlxG.button_disable == false){
visibility(false);
if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
if (!FlxG.mouse.pressed()){
_pressed = false;
} else {
if (!_pressed){
_pressed = true;
};
};
visibility(!(_pressed));
};
if (_onToggle){
visibility(_off.visible);
};
};
}
protected function visibility(_arg1:Boolean):void{
if (_arg1){
_off.visible = false;
if (_offT != null){
_offT.visible = false;
};
_on.visible = true;
if (_onT != null){
_onT.visible = true;
};
} else {
_on.visible = false;
if (_onT != null){
_onT.visible = false;
};
_off.visible = true;
if (_offT != null){
_offT.visible = true;
};
};
}
public function get on():Boolean{
return (_onToggle);
}
public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{
_off = (replace(_off, _arg1) as FlxSprite);
if (_arg2 == null){
if (_on != _off){
remove(_on);
};
_on = _off;
} else {
_on = (replace(_on, _arg2) as FlxSprite);
};
_on.solid = (_off.solid = false);
_off.scrollFactor = scrollFactor;
_on.scrollFactor = scrollFactor;
width = _off.width;
height = _off.height;
refreshHulls();
return (this);
}
public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{
if (_arg1 != null){
if (_offT == null){
_offT = _arg1;
add(_offT);
} else {
_offT = (replace(_offT, _arg1) as FlxText);
};
};
if (_arg2 == null){
_onT = _offT;
} else {
if (_onT == null){
_onT = _arg2;
add(_onT);
} else {
_onT = (replace(_onT, _arg2) as FlxText);
};
};
_offT.scrollFactor = scrollFactor;
_onT.scrollFactor = scrollFactor;
return (this);
}
override public function destroy():void{
if (FlxG.stage != null){
FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
};
}
public function set on(_arg1:Boolean):void{
_onToggle = _arg1;
}
}
}//package org.flixel
Section 92
//FlxEmitter (org.flixel.FlxEmitter)
package org.flixel {
public class FlxEmitter extends FlxGroup {
public var maxRotation:Number;
public var delay:Number;
public var quantity:uint;
protected var _timer:Number;
public var gravity:Number;
public var particleDrag:FlxPoint;
public var maxParticleSpeed:FlxPoint;
public var on:Boolean;
protected var _explode:Boolean;
protected var _particle:uint;
public var minParticleSpeed:FlxPoint;
public var minRotation:Number;
public var resize:Boolean;
protected var _counter:uint;
public function FlxEmitter(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
width = 0;
height = 0;
minParticleSpeed = new FlxPoint(-100, -100);
maxParticleSpeed = new FlxPoint(100, 100);
minRotation = -360;
maxRotation = 360;
gravity = 400;
resize = false;
particleDrag = new FlxPoint();
delay = 0.1;
quantity = 0;
_counter = 0;
_explode = true;
exists = false;
on = false;
}
public function setRotation(_arg1:Number=0, _arg2:Number=0):void{
minRotation = _arg1;
maxRotation = _arg2;
}
override public function update():void{
super.update();
updateEmitter();
}
public function setYSpeed(_arg1:Number=0, _arg2:Number=0):void{
minParticleSpeed.y = _arg1;
maxParticleSpeed.y = _arg2;
}
public function stop(_arg1:Number=3):void{
_explode = true;
delay = _arg1;
if (delay < 0){
delay = -(_arg1);
};
on = false;
}
public function setSize(_arg1:uint, _arg2:uint):void{
width = _arg1;
height = _arg2;
}
public function at(_arg1:FlxObject):void{
x = (_arg1.x + _arg1.origin.x);
y = (_arg1.y + _arg1.origin.y);
}
override protected function updateMembers():void{
var _local1:FlxSprite;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxSprite);
if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.active))){
if (resize){
_local1.scale.x = (_local1.scale.x + (FlxG.elapsed * 2));
_local1.scale.y = _local1.scale.x;
};
_local1.alpha = (_local1.alpha - (FlxG.elapsed * 2));
_local1.update();
};
_local3++;
};
}
public function start(_arg1:Boolean=true, _arg2:Number=0, _arg3:uint=0):void{
if (members.length <= 0){
FlxG.log("WARNING: there are no sprites loaded in your emitter.\nAdd some to FlxEmitter.members or use FlxEmitter.createSprites().");
return;
};
_explode = _arg1;
if (!_explode){
_counter = 0;
};
if (!exists){
_particle = 0;
};
exists = true;
visible = true;
active = true;
dead = false;
on = true;
_timer = 0;
if (quantity == 0){
quantity = _arg3;
};
if (_arg2 != 0){
delay = _arg2;
};
if (delay < 0){
delay = -(delay);
};
}
protected function updateEmitter():void{
var _local1:uint;
var _local2:uint;
if (_explode){
_timer = (_timer + FlxG.elapsed);
if ((((delay > 0)) && ((_timer > delay)))){
kill();
return;
};
if (on){
on = false;
_local2 = members.length;
if (quantity > 0){
_local2 = quantity;
};
_local2 = (_local2 + _particle);
_local1 = _particle;
while (_local1 < _local2) {
emitParticle();
_local1++;
};
};
return;
};
if (!on){
return;
};
_timer = (_timer + FlxG.elapsed);
while ((((_timer > delay)) && ((((quantity <= 0)) || ((_counter < quantity)))))) {
_timer = (_timer - delay);
emitParticle();
};
}
override public function kill():void{
super.kill();
on = false;
}
public function setXSpeed(_arg1:Number=0, _arg2:Number=0):void{
minParticleSpeed.x = _arg1;
maxParticleSpeed.x = _arg2;
}
public function createSprites(_arg1:Class, _arg2:uint=50, _arg3:uint=16, _arg4:Boolean=true, _arg5:Number=0):FlxEmitter{
var _local6:uint;
var _local7:FlxSprite;
var _local9:Number;
var _local10:Number;
members = new Array();
var _local8:uint = 1;
if (_arg4){
_local7 = new FlxSprite(0, 0, _arg1);
_local8 = (_local7.width / _local7.height);
};
var _local11:uint;
while (_local11 < _arg2) {
_local7 = new FlxSprite();
if (_arg4){
_local6 = (FlxU.random() * _local8);
if (_arg3 > 0){
_local7.loadRotatedGraphic(_arg1, _arg3, _local6);
} else {
_local7.loadGraphic(_arg1, true);
_local7.frame = _local6;
};
} else {
if (_arg3 > 0){
_local7.loadRotatedGraphic(_arg1, _arg3);
} else {
_local7.loadGraphic(_arg1);
};
};
if (_arg5 > 0){
_local9 = _local7.width;
_local10 = _local7.height;
_local7.width = (_local7.width * _arg5);
_local7.height = (_local7.height * _arg5);
_local7.offset.x = ((_local9 - _local7.width) / 2);
_local7.offset.y = ((_local10 - _local7.height) / 2);
_local7.solid = true;
} else {
_local7.solid = false;
};
_local7.exists = false;
_local7.scrollFactor = scrollFactor;
add(_local7);
_local11++;
};
return (this);
}
public function emitParticle():void{
_counter++;
var _local1:FlxSprite = (members[_particle] as FlxSprite);
_local1.scale.x = (_local1.scale.y = (_local1.alpha = 1));
_local1.visible = true;
_local1.exists = true;
_local1.active = true;
_local1.x = ((x - (_local1.width >> 1)) + (FlxU.random() * width));
_local1.y = ((y - (_local1.height >> 1)) + (FlxU.random() * height));
_local1.velocity.x = minParticleSpeed.x;
if (minParticleSpeed.x != maxParticleSpeed.x){
_local1.velocity.x = (_local1.velocity.x + (FlxU.random() * (maxParticleSpeed.x - minParticleSpeed.x)));
};
_local1.velocity.y = minParticleSpeed.y;
if (minParticleSpeed.y != maxParticleSpeed.y){
_local1.velocity.y = (_local1.velocity.y + (FlxU.random() * (maxParticleSpeed.y - minParticleSpeed.y)));
};
_local1.acceleration.y = gravity;
_local1.angularVelocity = minRotation;
if (minRotation != maxRotation){
_local1.angularVelocity = (_local1.angularVelocity + (FlxU.random() * (maxRotation - minRotation)));
};
if (_local1.angularVelocity != 0){
_local1.angle = ((FlxU.random() * 360) - 180);
};
_local1.drag.x = particleDrag.x;
_local1.drag.y = particleDrag.y;
_local1.visible = true;
_particle++;
if (_particle >= members.length){
_particle = 0;
};
_local1.onEmit();
}
}
}//package org.flixel
Section 93
//FlxG (org.flixel.FlxG)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
import org.mecha.*;
public class FlxG {
public static var global6:Number = 0;
public static var panel:FlxPanel;
public static var global9:Number = 0;
public static var guide_toggle:Boolean = true;
public static var global3:Number = 0;
public static var bot_list:BotPool = new BotPool();
public static var kong:FlxKong;
public static var scores:Array;
public static var music:FlxSound;
public static var height:uint;
public static var flash:FlxFlash;
public static var elapsed2:Number;
protected static var _volume:Number;
public static var buffer:BitmapData;
public static var sounds:Array;
public static var debug:Boolean;
public static var LIBRARY_MINOR_VERSION:uint = 34;
public static var LIBRARY_MAJOR_VERSION:uint = 2;
public static var levels:Array;
public static var elapsed:Number;
public static var timeScale:Number;
public static var maxElapsed:Number;
protected static var _cache:Object;
public static var level:int;
public static var fade:FlxFade;
public static var score:int;
public static var save:int;
public static var saves:Array;
protected static var _scrollTarget:Point;
public static var mouse:FlxMouse;
public static var followTarget:FlxObject;
public static var followLead:Point;
public static var LIBRARY_NAME:String = "flixel";
public static var team_member:Array = [-1, -1, -1];
public static var width:uint;
public static var followLerp:Number;
public static var scroll:Point;
protected static var _game:FlxGame;
public static var quake:FlxQuake;
public static var button_disable:Boolean = false;
public static var followMin:Point;
public static var tournament:Array = [0, 1, 2, 3, 4, 5, 6, 7, 8];
public static var global1:Number = 0;
public static var global4:Number = 0;
public static var global5:Number = 0;
public static var followMax:Point;
public static var keys:FlxKeyboard;
public static var global8:Number = 0;
public static var global2:Number = 0;
public static var global7:Number = 0;
public static var global0:Number = 0;
public static var pl_name:String;
protected static var _pause:Boolean;
protected static var _mute:Boolean;
static function destroySounds(_arg1:Boolean=false):void{
var _local2:FlxSound;
if (sounds == null){
return;
};
if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){
music.destroy();
};
var _local3:uint = sounds.length;
var _local4:uint;
while (_local4 < _local3) {
_local2 = (sounds[_local4] as FlxSound);
if (((!((_local2 == null))) && (((_arg1) || (!(_local2.survive)))))){
_local2.destroy();
};
_local4++;
};
}
public static function get stage():Stage{
if (((!((_game._state == null))) && (!((_game._state.parent == null))))){
return (_game._state.parent.stage);
};
return (null);
}
public static function get pause():Boolean{
return (_pause);
}
public static function get framerate():uint{
return (_game._framerate);
}
protected static function changeSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.updateTransform();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.updateTransform();
};
_local3++;
};
}
public static function set pause(_arg1:Boolean):void{
var _local2:Boolean = _pause;
_pause = _arg1;
if (_pause != _local2){
if (_pause){
_game.pauseGame();
pauseSounds();
} else {
_game.unpauseGame();
playSounds();
};
};
}
public static function get volume():Number{
return (_volume);
}
static function doFollow():void{
if (followTarget != null){
_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1));
_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1));
if (((!((followLead == null))) && ((followTarget is FlxSprite)))){
_scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x));
_scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y));
};
scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed));
scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed));
if (followMin != null){
if (scroll.x > followMin.x){
scroll.x = followMin.x;
};
if (scroll.y > followMin.y){
scroll.y = followMin.y;
};
};
if (followMax != null){
if (scroll.x < followMax.x){
scroll.x = followMax.x;
};
if (scroll.y < followMax.y){
scroll.y = followMax.y;
};
};
};
}
public static function get mute():Boolean{
return (_mute);
}
protected static function pauseSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.pause();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.pause();
};
_local3++;
};
}
public static function addBitmap(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null):BitmapData{
var _local8:uint;
var _local9:String;
var _local10:BitmapData;
var _local11:Matrix;
var _local5:Boolean;
var _local6:String = _arg4;
if (_local6 == null){
_local6 = String(_arg1);
if (((((_arg3) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){
_local8 = 0;
do {
var _temp1 = _local8;
_local8 = (_local8 + 1);
_local9 = (_local6 + _temp1);
} while (((!((_cache[_local9] == undefined))) && (!((_cache[_local9] == null)))));
_local6 = _local9;
};
};
if (!checkBitmapCache(_local6)){
_cache[_local6] = new (_arg1).bitmapData;
if (_arg2){
_local5 = true;
};
};
var _local7:BitmapData = _cache[_local6];
if (((((!(_local5)) && (_arg2))) && ((_local7.width == new (_arg1).bitmapData.width)))){
_local5 = true;
};
if (_local5){
_local10 = new BitmapData((_local7.width << 1), _local7.height, true, 0);
_local10.draw(_local7);
_local11 = new Matrix();
_local11.scale(-1, 1);
_local11.translate(_local10.width, 0);
_local10.draw(_local7, _local11);
_local7 = _local10;
};
return (_local7);
}
public static function getMuteValue():uint{
if (_mute){
return (0);
};
return (1);
}
public static function set mute(_arg1:Boolean):void{
_mute = _arg1;
changeSounds();
}
public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint = sounds.length;
var _local5:uint;
while (_local5 < _local4) {
if (!(sounds[_local5] as FlxSound).active){
break;
};
_local5++;
};
if (sounds[_local5] == null){
sounds[_local5] = new FlxSound();
};
var _local6:FlxSound = sounds[_local5];
_local6.loadEmbedded(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
public static function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
changeSounds();
}
static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint, _arg4:uint):void{
_game = _arg1;
_cache = new Object();
width = _arg2;
height = _arg3;
_mute = false;
_volume = 0.5;
sounds = new Array();
mouse = new FlxMouse();
keys = new FlxKeyboard();
scroll = null;
_scrollTarget = null;
unfollow();
FlxG.levels = new Array();
FlxG.scores = new Array();
level = 0;
score = 0;
FlxU.seed = NaN;
kong = null;
pause = false;
timeScale = 1;
framerate = 60;
frameratePaused = 10;
maxElapsed = 0.0333333;
panel = new FlxPanel();
quake = new FlxQuake(_arg4);
flash = new FlxFlash();
fade = new FlxFade();
FlxU.setWorldBounds();
}
public static function set state(_arg1:FlxState):void{
_game.switchState(_arg1);
}
public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:String=null):BitmapData{
var _local7:uint;
var _local8:String;
var _local6:String = _arg5;
if (_local6 == null){
_local6 = ((((_arg1 + "x") + _arg2) + ":") + _arg3);
if (((((_arg4) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){
_local7 = 0;
do {
var _temp1 = _local7;
_local7 = (_local7 + 1);
_local8 = (_local6 + _temp1);
} while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null)))));
_local6 = _local8;
};
};
if (!checkBitmapCache(_local6)){
_cache[_local6] = new BitmapData(_arg1, _arg2, true, _arg3);
};
return (_cache[_local6]);
}
public static function playMusic(_arg1:Class, _arg2:Number=1):void{
if (music == null){
music = new FlxSound();
} else {
if (music.active){
music.stop();
};
};
music.loadEmbedded(_arg1, true);
music.volume = _arg2;
music.survive = true;
music.play();
}
public static function get frameratePaused():uint{
return (_game._frameratePaused);
}
public static function log(_arg1:Object):void{
if (((!((_game == null))) && (!((_game._console == null))))){
_game._console.log(((_arg1)==null) ? "ERROR: null object" : _arg1.toString());
};
}
public static function checkBitmapCache(_arg1:String):Boolean{
return (((!((_cache[_arg1] == undefined))) && (!((_cache[_arg1] == null)))));
}
static function updateSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.update();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.update();
};
_local3++;
};
}
static function updateInput():void{
keys.update();
mouse.update(state.mouseX, state.mouseY, scroll.x, scroll.y);
}
public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint = sounds.length;
var _local5:uint;
while (_local5 < _local4) {
if (!(sounds[_local5] as FlxSound).active){
break;
};
_local5++;
};
if (sounds[_local5] == null){
sounds[_local5] = new FlxSound();
};
var _local6:FlxSound = sounds[_local5];
_local6.loadStream(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
if (scroll == null){
scroll = new Point();
} else {
scroll.x = (scroll.y = 0);
};
if (_scrollTarget == null){
_scrollTarget = new Point();
} else {
_scrollTarget.x = (_scrollTarget.y = 0);
};
}
public static function get state():FlxState{
return (_game._state);
}
protected static function playSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.play();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.play();
};
_local3++;
};
}
public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{
followLead = new Point(_arg1, _arg2);
}
public static function set framerate(_arg1:uint):void{
_game._framerate = _arg1;
if (((!(_game._paused)) && (!((_game.stage == null))))){
_game.stage.frameRate = _arg1;
};
}
public static function follow(_arg1:FlxObject, _arg2:Number=1):void{
followTarget = _arg1;
followLerp = _arg2;
_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1));
_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1));
scroll.x = _scrollTarget.x;
scroll.y = _scrollTarget.y;
doFollow();
}
public static function resetInput():void{
keys.reset();
mouse.reset();
}
public static function set frameratePaused(_arg1:uint):void{
_game._frameratePaused = _arg1;
if (((_game._paused) && (!((_game.stage == null))))){
_game.stage.frameRate = _arg1;
};
}
public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:Boolean=true):void{
followMin = new Point(-(_arg1), -(_arg2));
followMax = new Point((-(_arg3) + width), (-(_arg4) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
if (_arg5){
FlxU.setWorldBounds(_arg1, _arg2, (_arg3 - _arg1), (_arg4 - _arg2));
};
doFollow();
}
}
}//package org.flixel
Section 94
//FlxGame (org.flixel.FlxGame)
package org.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
public class FlxGame extends Sprite {
var _screen:Sprite;
var _state:FlxState;
protected var SndBeep:Class;
var _console:FlxConsole;
var _gameXOffset:int;
var _frameratePaused:uint;
var _created:Boolean;
var _zoom:uint;
var _elapsed:Number;
var _total:uint;
var _soundTrayBars:Array;
var _iState:Class;
protected var junk:String;// = "FlxGame_junk"
var _zeroPoint:Point;
var _paused:Boolean;
public var useDefaultHotKeys:Boolean;
var _framerate:uint;
var _gameYOffset:int;
var _buffer:Bitmap;
var _soundTray:Sprite;
var _frame:Class;
public var pause:FlxGroup;
var _soundTrayTimer:Number;
public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){
SndBeep = FlxGame_SndBeep;
super();
Mouse.hide();
_zoom = _arg4;
FlxState.bgColor = 4278190080;
FlxG.setGameData(this, _arg1, _arg2, _arg4);
_elapsed = 0;
_total = 0;
pause = new FlxPause();
_state = null;
_iState = _arg3;
_zeroPoint = new Point();
useDefaultHotKeys = true;
_frame = null;
_gameXOffset = 0;
_gameYOffset = 0;
_paused = false;
_created = false;
addEventListener(Event.ENTER_FRAME, create);
}
function pauseGame():void{
if (((!((x == 0))) || (!((y == 0))))){
x = 0;
y = 0;
};
Mouse.show();
_paused = true;
stage.frameRate = _frameratePaused;
}
function unpauseGame():void{
if (!FlxG.panel.visible){
Mouse.hide();
};
FlxG.resetInput();
_paused = false;
stage.frameRate = _framerate;
}
protected function onFocus(_arg1:Event=null):void{
if (FlxG.pause){
FlxG.pause = false;
};
}
protected function onKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:String;
if (useDefaultHotKeys){
_local2 = _arg1.keyCode;
_local3 = String.fromCharCode(_arg1.charCode);
switch (_local2){
case 48:
case 96:
FlxG.mute = !(FlxG.mute);
showSoundTray();
return;
case 109:
case 189:
FlxG.mute = false;
FlxG.volume = (FlxG.volume - 0.1);
showSoundTray();
return;
case 107:
case 187:
FlxG.mute = false;
FlxG.volume = (FlxG.volume + 0.1);
showSoundTray();
return;
default:
break;
};
};
FlxG.keys.handleKeyUp(_arg1);
}
public function switchState(_arg1:FlxState):void{
FlxG.panel.hide();
FlxG.unfollow();
FlxG.resetInput();
FlxG.destroySounds();
FlxG.flash.stop();
FlxG.fade.stop();
FlxG.quake.stop();
_screen.x = 0;
_screen.y = 0;
_screen.addChild(_arg1);
if (_state != null){
_state.destroy();
_screen.removeChild(_state);
System.gc();
};
_state = _arg1;
_state.scaleX = (_state.scaleY = _zoom);
_state.create();
}
protected function update(_arg1:Event):void{
var _local3:uint;
var _local4:FlxSave;
var _local2:uint = getTimer();
var _local5:uint = (_local2 - _total);
_elapsed = (_local5 / 1000);
_console.mtrTotal.add(_local5);
_total = _local2;
FlxG.elapsed = (FlxG.elapsed2 = _elapsed);
if (FlxG.elapsed > FlxG.maxElapsed){
FlxG.elapsed = FlxG.maxElapsed;
};
FlxG.elapsed = (FlxG.elapsed * FlxG.timeScale);
if (_soundTray != null){
if (_soundTrayTimer > 0){
_soundTrayTimer = (_soundTrayTimer - _elapsed);
} else {
if (_soundTray.y > -(_soundTray.height)){
_soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2));
if (_soundTray.y <= -(_soundTray.height)){
_soundTray.visible = false;
_local4 = new FlxSave();
if (_local4.bind("flixel")){
if (_local4.data.sound == null){
_local4.data.sound = new Object();
};
_local4.data.mute = FlxG.mute;
_local4.data.volume = FlxG.volume;
_local4.forceSave();
};
};
};
};
};
FlxG.panel.update();
if (_console.visible){
_console.update();
};
FlxG.updateInput();
FlxG.updateSounds();
if (_paused){
pause.update();
} else {
FlxG.doFollow();
_state.update();
if (FlxG.flash.exists){
FlxG.flash.update();
};
if (FlxG.fade.exists){
FlxG.fade.update();
};
FlxG.quake.update();
_screen.x = FlxG.quake.x;
_screen.y = FlxG.quake.y;
};
var _local6:uint = getTimer();
_console.mtrUpdate.add((_local6 - _local2));
FlxG.buffer.lock();
_state.preProcess();
_state.render();
if (FlxG.flash.exists){
FlxG.flash.render();
};
if (FlxG.fade.exists){
FlxG.fade.render();
};
if (FlxG.panel.visible){
FlxG.panel.render();
};
if (FlxG.mouse.cursor != null){
if (FlxG.mouse.cursor.active){
FlxG.mouse.cursor.update();
};
if (FlxG.mouse.cursor.visible){
FlxG.mouse.cursor.render();
};
};
_state.postProcess();
if (_paused){
pause.render();
};
FlxG.buffer.unlock();
_console.mtrRender.add((getTimer() - _local6));
}
protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{
_frame = _arg1;
_gameXOffset = _arg2;
_gameYOffset = _arg3;
return (this);
}
public function showSoundTray(_arg1:Boolean=false):void{
if (!_arg1){
FlxG.play(SndBeep);
};
_soundTrayTimer = 1;
_soundTray.y = (_gameYOffset * _zoom);
_soundTray.visible = true;
var _local2:uint = Math.round((FlxG.volume * 10));
if (FlxG.mute){
_local2 = 0;
};
var _local3:uint;
while (_local3 < _soundTrayBars.length) {
if (_local3 < _local2){
_soundTrayBars[_local3].alpha = 1;
} else {
_soundTrayBars[_local3].alpha = 0.5;
};
_local3++;
};
}
function create(_arg1:Event):void{
var _local2:uint;
var _local3:FlxSave;
var _local10:Bitmap;
if (root == null){
return;
};
stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.align = StageAlign.TOP;
stage.frameRate = _framerate;
_screen = new Sprite();
addChild(_screen);
var _local4:Bitmap = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor));
_local4.x = _gameXOffset;
_local4.y = _gameYOffset;
_local4.scaleX = (_local4.scaleY = _zoom);
_screen.addChild(_local4);
FlxG.buffer = _local4.bitmapData;
_console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom);
addChild(_console);
var _local5:String = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION);
if (FlxG.debug){
_local5 = (_local5 + " [debug]");
} else {
_local5 = (_local5 + " [release]");
};
var _local6 = "";
_local2 = 0;
while (_local2 < (_local5.length + 32)) {
_local6 = (_local6 + "-");
_local2++;
};
FlxG.log(_local5);
FlxG.log(_local6);
stage.addEventListener(KeyboardEvent.KEY_DOWN, FlxG.keys.handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, FlxG.mouse.handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, FlxG.mouse.handleMouseUp);
stage.addEventListener(MouseEvent.MOUSE_OUT, FlxG.mouse.handleMouseOut);
stage.addEventListener(MouseEvent.MOUSE_OVER, FlxG.mouse.handleMouseOver);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
_local4 = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local4.width / 2) * _soundTray.scaleX));
_soundTray.addChild(_local4);
var _local7:TextField = new TextField();
_local7.width = _local4.width;
_local7.height = _local4.height;
_local7.multiline = true;
_local7.wordWrap = true;
_local7.selectable = false;
_local7.embedFonts = true;
_local7.antiAliasType = AntiAliasType.NORMAL;
_local7.gridFitType = GridFitType.PIXEL;
_local7.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(_local7);
_local7.text = "VOLUME";
_local7.y = 16;
var _local8:uint = 10;
var _local9:uint = 14;
_soundTrayBars = new Array();
_local2 = 0;
while (_local2 < 10) {
_local4 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF));
_local4.x = _local8;
_local4.y = _local9;
_soundTrayBars.push(_soundTray.addChild(_local4));
_local8 = (_local8 + 6);
_local9--;
_local2++;
};
addChild(_soundTray);
if (_frame != null){
_local10 = new _frame();
_local10.scaleX = _zoom;
_local10.scaleY = _zoom;
addChild(_local10);
};
_local3 = new FlxSave();
if (((_local3.bind("flixel")) && (!((_local3.data.sound == null))))){
if (_local3.data.volume != null){
FlxG.volume = _local3.data.volume;
};
if (_local3.data.mute != null){
FlxG.mute = _local3.data.mute;
};
showSoundTray(true);
};
switchState(new _iState());
FlxState.screen.unsafeBind(FlxG.buffer);
removeEventListener(Event.ENTER_FRAME, create);
addEventListener(Event.ENTER_FRAME, update);
}
protected function onFocusLost(_arg1:Event=null):void{
FlxG.pause = true;
}
}
}//package org.flixel
Section 95
//FlxGame_junk (org.flixel.FlxGame_junk)
package org.flixel {
import mx.core.*;
public class FlxGame_junk extends FontAsset {
}
}//package org.flixel
Section 96
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep)
package org.flixel {
import mx.core.*;
public class FlxGame_SndBeep extends SoundAsset {
}
}//package org.flixel
Section 97
//FlxGroup (org.flixel.FlxGroup)
package org.flixel {
public class FlxGroup extends FlxObject {
public var members:Array;
protected var _first:Boolean;
protected var _last:FlxPoint;
public function FlxGroup(){
_group = true;
solid = false;
members = new Array();
_last = new FlxPoint();
_first = true;
}
public function getFirstExtant():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (_local1.exists))){
return (_local1);
};
_local3++;
};
return (null);
}
override public function destroy():void{
destroyMembers();
super.destroy();
}
public function getFirstAlive():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((((!((_local1 == null))) && (_local1.exists))) && (!(_local1.dead)))){
return (_local1);
};
_local3++;
};
return (null);
}
public function remove(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{
var _local3:int = members.indexOf(_arg1);
if ((((_local3 < 0)) || ((_local3 >= members.length)))){
return (null);
};
if (_arg2){
members.splice(_local3, 1);
} else {
members[_local3] = null;
};
return (_arg1);
}
override public function update():void{
saveOldPosition();
updateMotion();
updateMembers();
updateFlickering();
}
public function resetFirstAvail(_arg1:Number=0, _arg2:Number=0):Boolean{
var _local3:FlxObject = getFirstAvail();
if (_local3 == null){
return (false);
};
_local3.reset(_arg1, _arg2);
return (true);
}
override public function reset(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local6:FlxObject;
saveOldPosition();
super.reset(_arg1, _arg2);
var _local5:Boolean;
if (((!((x == _last.x))) || (!((y == _last.y))))){
_local5 = true;
_local3 = (x - _last.x);
_local4 = (y - _last.y);
};
var _local7:uint = members.length;
var _local8:uint;
while (_local8 < _local7) {
_local6 = (members[_local8] as FlxObject);
if (((!((_local6 == null))) && (_local6.exists))){
if (_local5){
if (_local6._group){
_local6.reset((_local6.x + _local3), (_local6.y + _local4));
} else {
_local6.x = (_local6.x + _local3);
_local6.y = (_local6.y + _local4);
if (solid){
_local6.colHullX.width = (_local6.colHullX.width + ((_local3)>0) ? _local3 : -(_local3));
if (_local3 < 0){
_local6.colHullX.x = (_local6.colHullX.x + _local3);
};
_local6.colHullY.x = x;
_local6.colHullY.height = (_local6.colHullY.height + ((_local4)>0) ? _local4 : -(_local4));
if (_local4 < 0){
_local6.colHullY.y = (_local6.colHullY.y + _local4);
};
_local6.colVector.x = (_local6.colVector.x + _local3);
_local6.colVector.y = (_local6.colVector.y + _local4);
};
};
};
};
_local8++;
};
}
protected function updateMembers():void{
var _local1:Number;
var _local2:Number;
var _local4:FlxObject;
var _local3:Boolean;
if (((!((x == _last.x))) || (!((y == _last.y))))){
_local3 = true;
_local1 = (x - _last.x);
_local2 = (y - _last.y);
};
var _local5:uint = members.length;
var _local6:uint;
while (_local6 < _local5) {
_local4 = (members[_local6] as FlxObject);
if (((!((_local4 == null))) && (_local4.exists))){
if (_local3){
if (_local4._group){
_local4.reset((_local4.x + _local1), (_local4.y + _local2));
} else {
_local4.x = (_local4.x + _local1);
_local4.y = (_local4.y + _local2);
};
};
if (_local4.active){
_local4.update();
};
if (((_local3) && (_local4.solid))){
_local4.colHullX.width = (_local4.colHullX.width + ((_local1)>0) ? _local1 : -(_local1));
if (_local1 < 0){
_local4.colHullX.x = (_local4.colHullX.x + _local1);
};
_local4.colHullY.x = x;
_local4.colHullY.height = (_local4.colHullY.height + ((_local2)>0) ? _local2 : -(_local2));
if (_local2 < 0){
_local4.colHullY.y = (_local4.colHullY.y + _local2);
};
_local4.colVector.x = (_local4.colVector.x + _local1);
_local4.colVector.y = (_local4.colVector.y + _local2);
};
};
_local6++;
};
}
public function countDead():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (_local1.dead){
_local2++;
};
};
_local4++;
};
return (_local2);
}
public function getFirstAvail():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (!(_local1.exists)))){
return (_local1);
};
_local3++;
};
return (null);
}
override public function render():void{
renderMembers();
}
public function countLiving():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (((_local1.exists) && (!(_local1.dead)))){
_local2++;
};
};
_local4++;
};
return (_local2);
}
public function countOnScreen():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (_local1.onScreen()){
_local2++;
};
};
_local4++;
};
return (_local2);
}
protected function killMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (_local1 != null){
_local1.kill();
};
_local3++;
};
}
override public function kill():void{
killMembers();
super.kill();
}
public function getFirstNull():int{
var _local1:uint = members.length;
var _local2:uint;
while (_local2 < _local1) {
if (members[_local2] == null){
return (_local2);
};
_local2++;
};
return (-1);
}
protected function renderMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.visible))){
_local1.render();
};
_local3++;
};
}
public function add(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{
members.push(_arg1);
if (_arg2){
_arg1.scrollFactor = scrollFactor;
};
return (_arg1);
}
protected function saveOldPosition():void{
if (_first){
_first = false;
_last.x = 0;
_last.y = 0;
return;
};
_last.x = x;
_last.y = y;
}
public function replace(_arg1:FlxObject, _arg2:FlxObject):FlxObject{
var _local3:int = members.indexOf(_arg1);
if ((((_local3 < 0)) || ((_local3 >= members.length)))){
return (null);
};
members[_local3] = _arg2;
return (_arg2);
}
public function getRandom():FlxObject{
var _local1:uint;
var _local2:FlxObject;
var _local3:uint = members.length;
var _local4:uint = uint((FlxU.random() * _local3));
while ((((_local2 == null)) && ((_local1 < members.length)))) {
++_local4;
_local2 = (members[(_local4 % _local3)] as FlxObject);
_local1++;
};
return (_local2);
}
public function getFirstDead():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (_local1.dead))){
return (_local1);
};
_local3++;
};
return (null);
}
protected function destroyMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (_local1 != null){
_local1.destroy();
};
_local3++;
};
}
}
}//package org.flixel
Section 98
//FlxMonitor (org.flixel.FlxMonitor)
package org.flixel {
public class FlxMonitor {
protected var _size:uint;
protected var _itr:uint;
protected var _data:Array;
public function FlxMonitor(_arg1:uint, _arg2:Number=0){
_size = _arg1;
if (_size <= 0){
_size = 1;
};
_itr = 0;
_data = new Array(_size);
var _local3:uint;
while (_local3 < _size) {
_data[_local3] = _arg2;
_local3++;
};
}
public function add(_arg1:Number):void{
var _local2 = _itr++;
_data[_local2] = _arg1;
if (_itr >= _size){
_itr = 0;
};
}
public function average():Number{
var _local1:Number = 0;
var _local2:uint;
while (_local2 < _size) {
_local1 = (_local1 + _data[_local2]);
_local2++;
};
return ((_local1 / _size));
}
}
}//package org.flixel
Section 99
//FlxObject (org.flixel.FlxObject)
package org.flixel {
import flash.geom.*;
public class FlxObject extends FlxRect {
public var is_collide_bottom:Boolean;// = false
public var active:Boolean;
public var collideBottom:Boolean;
public var colHullX:FlxRect;
public var id:int;
protected var _flashPoint:Point;
protected var _flickerTimer:Number;
public var origin:FlxPoint;
public var is_collide:Boolean;// = false
public var colHullY:FlxRect;
public var drag:FlxPoint;
public var angularDrag:Number;
public var collideTop:Boolean;
public var numbed:Number;// = 0
public var is_collide_top:Boolean;// = false
public var hit_id:int;
public var thrust:Number;
public var exists:Boolean;
public var is_collide_left:Boolean;// = false
public var maxVelocity:FlxPoint;
public var health:Number;
public var dead:Boolean;
public var collideLeft:Boolean;
public var onFloor:Boolean;
public var damage:Number;// = 0
public var visible:Boolean;
public var fixed:Boolean;
public var disrupted:Number;// = 0
public var scrollFactor:FlxPoint;
public var collideRight:Boolean;
public var acceleration:FlxPoint;
public var angularAcceleration:Number;
public var is_collide_right:Boolean;// = false
var _group:Boolean;
protected var _point:FlxPoint;
public var colOffsets:Array;
public var solid:Boolean;
protected var _flicker:Boolean;
protected var _rect:FlxRect;
public var moves:Boolean;
public var angle:Number;
public var maxThrust:Number;
public var velocity:FlxPoint;
public var angularVelocity:Number;
public var colVector:FlxPoint;
public var maxAngular:Number;
protected static const _pZero:FlxPoint = new FlxPoint();
public function FlxObject(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
super(_arg1, _arg2, _arg3, _arg4);
exists = true;
active = true;
visible = true;
solid = true;
fixed = false;
moves = true;
collideLeft = true;
collideRight = true;
collideTop = true;
collideBottom = true;
origin = new FlxPoint();
velocity = new FlxPoint();
acceleration = new FlxPoint();
drag = new FlxPoint();
maxVelocity = new FlxPoint(10000, 10000);
angle = 0;
angularVelocity = 0;
angularAcceleration = 0;
angularDrag = 0;
maxAngular = 10000;
thrust = 0;
scrollFactor = new FlxPoint(1, 1);
_flicker = false;
_flickerTimer = -1;
health = 1;
dead = false;
_point = new FlxPoint();
_rect = new FlxRect();
_flashPoint = new Point();
colHullX = new FlxRect();
colHullY = new FlxRect();
colVector = new FlxPoint();
colOffsets = new Array(new FlxPoint());
_group = false;
is_collide = false;
}
public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
kill();
};
}
public function preCollide(_arg1:FlxObject):void{
}
public function onScreen():Boolean{
getScreenXY(_point);
if (((((((((_point.x + width) < 0)) || ((_point.x > FlxG.width)))) || (((_point.y + height) < 0)))) || ((_point.y > FlxG.height)))){
return (false);
};
return (true);
}
public function overlaps(_arg1:FlxObject):Boolean{
var _local10:FlxSprite;
var _local11:FlxSprite;
getScreenXY(_point);
var _local2:Number = _point.x;
var _local3:Number = _point.y;
var _local4:Number = width;
var _local5:Number = height;
if ((this is FlxSprite)){
_local10 = (this as FlxSprite);
_local4 = _local10.frameWidth;
_local5 = _local10.frameHeight;
};
_arg1.getScreenXY(_point);
var _local6:Number = _point.x;
var _local7:Number = _point.y;
var _local8:Number = _arg1.width;
var _local9:Number = _arg1.height;
if ((_arg1 is FlxSprite)){
_local11 = (_arg1 as FlxSprite);
_local8 = _local11.frameWidth;
_local9 = _local11.frameHeight;
};
if ((((((((_local6 <= (_local2 - _local8))) || ((_local6 >= (_local2 + _local4))))) || ((_local7 <= (_local3 - _local9))))) || ((_local7 >= (_local3 + _local5))))){
return (false);
};
return (true);
}
public function hitLeft(_arg1:FlxObject, _arg2:Number):void{
is_collide_left = true;
is_collide = true;
if (!fixed){
velocity.x = _arg2;
};
}
public function collide(_arg1:FlxObject=null):Boolean{
return (FlxU.collide(this, ((_arg1)==null) ? this : _arg1));
}
public function hitRight(_arg1:FlxObject, _arg2:Number):void{
is_collide_right = true;
is_collide = true;
hitLeft(_arg1, _arg2);
}
public function reset(_arg1:Number, _arg2:Number):void{
x = _arg1;
y = _arg2;
exists = true;
dead = false;
}
public function kill():void{
exists = false;
dead = true;
}
protected function updateFlickering():void{
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
if (_flickerTimer == 0){
_flickerTimer = -1;
};
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
}
public function render():void{
}
public function hitBottom(_arg1:FlxObject, _arg2:Number):void{
is_collide_bottom = true;
is_collide = true;
onFloor = true;
if (!fixed){
velocity.y = _arg2;
};
}
public function refreshHulls():void{
colHullX.x = x;
colHullX.y = y;
colHullX.width = width;
colHullX.height = height;
colHullY.x = x;
colHullY.y = y;
colHullY.width = width;
colHullY.height = height;
}
public function update():void{
updateMotion();
updateFlickering();
}
public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
_arg1 = (_arg1 + FlxU.floor(FlxG.scroll.x));
_arg2 = (_arg2 + FlxU.floor(FlxG.scroll.y));
getScreenXY(_point);
if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + width))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + height))))){
return (false);
};
return (true);
}
protected function updateMotion():void{
var _local1:Number;
var _local2:FlxPoint;
var _local5:FlxPoint;
var _local6:Number;
if (!moves){
return;
};
is_collide = false;
is_collide_left = false;
is_collide_right = false;
is_collide_bottom = false;
is_collide_top = false;
if (solid){
refreshHulls();
};
onFloor = false;
_local1 = ((FlxU.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular) - angularVelocity) / 2);
angularVelocity = (angularVelocity + _local1);
angle = (angle + (angularVelocity * FlxG.elapsed));
angularVelocity = (angularVelocity + _local1);
if (thrust != 0){
_local2 = FlxU.rotatePoint((-(thrust) * 5), 0, 0, 0, angle);
_local5 = FlxU.rotatePoint(-(maxThrust), 0, 0, 0, angle);
_local6 = ((_local5.x)>0) ? _local5.x : -(_local5.x);
if (_local6 > ((_local5.y)>0) ? _local5.y : -(_local5.y)){
_local5.y = _local6;
} else {
_local6 = ((_local5.y)>0) ? _local5.y : -(_local5.y);
};
maxVelocity.x = (maxVelocity.y = ((_local6)>0) ? _local6 : -(_local6));
} else {
_local2 = _pZero;
};
_local1 = ((FlxU.computeVelocity(velocity.x, (acceleration.x + _local2.x), drag.x, maxVelocity.x) - velocity.x) / 2);
velocity.x = (velocity.x + _local1);
var _local3:Number = (velocity.x * FlxG.elapsed);
velocity.x = (velocity.x + _local1);
_local1 = ((FlxU.computeVelocity(velocity.y, (acceleration.y + _local2.y), drag.y, maxVelocity.y) - velocity.y) / 2);
velocity.y = (velocity.y + _local1);
var _local4:Number = (velocity.y * FlxG.elapsed);
velocity.y = (velocity.y + _local1);
x = (x + _local3);
y = (y + _local4);
if (!solid){
return;
};
colVector.x = _local3;
colVector.y = _local4;
colHullX.width = (colHullX.width + ((colVector.x)>0) ? colVector.x : -(colVector.x));
if (colVector.x < 0){
colHullX.x = (colHullX.x + colVector.x);
};
colHullY.x = x;
colHullY.height = (colHullY.height + ((colVector.y)>0) ? colVector.y : -(colVector.y));
if (colVector.y < 0){
colHullY.y = (colHullY.y + colVector.y);
};
}
public function flickering():Boolean{
return ((_flickerTimer >= 0));
}
public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{
if (_arg1 == null){
_arg1 = new FlxPoint();
};
_arg1.x = (FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y)));
return (_arg1);
}
public function destroy():void{
}
public function hitTop(_arg1:FlxObject, _arg2:Number):void{
is_collide_top = true;
is_collide = true;
if (!fixed){
velocity.y = _arg2;
};
}
public function flicker(_arg1:Number=1):void{
_flickerTimer = _arg1;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
}
}//package org.flixel
Section 100
//FlxPoint (org.flixel.FlxPoint)
package org.flixel {
public class FlxPoint {
public var x:Number;
public var y:Number;
public function FlxPoint(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function toString():String{
return (FlxU.getClassName(this, true));
}
}
}//package org.flixel
Section 101
//FlxPreloader (org.flixel.FlxPreloader)
package org.flixel {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class FlxPreloader extends MovieClip {
protected var _height:uint;
protected var _width:uint;
protected var ImgLogoLight:Class;
protected var _logo:Bitmap;
protected var _text:TextField;
protected var _min:uint;
protected var _buffer:Sprite;
public var className:String;
public var myURL:String;
protected var _bmpBar:Bitmap;
protected var ImgLogo:Class;
protected var _init:Boolean;
protected var ImgLogoCorners:Class;
protected var _logoGlow:Bitmap;
public var minDisplayTime:Number;// = 1
public function FlxPreloader(){
var tmp:Bitmap;
var re:RegExp;
var fmt:TextFormat;
var txt:TextField;
ImgLogo = FlxPreloader_ImgLogo;
ImgLogoCorners = FlxPreloader_ImgLogoCorners;
ImgLogoLight = FlxPreloader_ImgLogoLight;
super();
minDisplayTime = 0;
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
try {
throw (new Error("Setting global debug flag..."));
} catch(e:Error) {
re = /\[.*:[0-9]+\]/;
FlxG.debug = re.test(e.getStackTrace());
};
if (((((!(FlxG.debug)) && (!((myURL == null))))) && ((root.loaderInfo.url.indexOf(myURL) < 0)))){
tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295));
addChild(tmp);
fmt = new TextFormat();
fmt.color = 0;
fmt.size = 28;
fmt.align = "center";
fmt.bold = true;
fmt.font = "system";
txt = new TextField();
txt.width = (tmp.width - 16);
txt.height = (tmp.height - 16);
txt.y = 8;
txt.multiline = true;
txt.wordWrap = true;
txt.embedFonts = true;
txt.defaultTextFormat = fmt;
txt.text = (("Hi there! It looks like somebody copied this game without my permission. Just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nto play the game at my site. Thanks, and have fun!");
addChild(txt);
txt.addEventListener(MouseEvent.CLICK, goToMyURL);
tmp.addEventListener(MouseEvent.CLICK, goToMyURL);
return;
};
_init = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
protected function update(_arg1:Number):void{
_bmpBar.scaleX = (_arg1 * (_width - 8));
_text.text = (((((("FLX v" + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION) + " ") + FlxU.floor((_arg1 * 100))) + "%");
_text.setTextFormat(_text.defaultTextFormat);
if (_arg1 < 0.1){
_logoGlow.alpha = 0;
_logo.alpha = 0;
} else {
if (_arg1 < 0.15){
_logoGlow.alpha = FlxU.random(false);
_logo.alpha = 0;
} else {
if (_arg1 < 0.2){
_logoGlow.alpha = 0;
_logo.alpha = 0;
} else {
if (_arg1 < 0.25){
_logoGlow.alpha = 0;
_logo.alpha = FlxU.random(false);
} else {
if (_arg1 < 0.7){
_logoGlow.alpha = ((_arg1 - 0.45) / 0.45);
_logo.alpha = 1;
} else {
if ((((_arg1 > 0.8)) && ((_arg1 < 0.9)))){
_logoGlow.alpha = (1 - ((_arg1 - 0.8) / 0.1));
_logo.alpha = 0;
} else {
if (_arg1 > 0.9){
_buffer.alpha = (1 - ((_arg1 - 0.9) / 0.1));
};
};
};
};
};
};
};
}
private function goToMyURL(_arg1:MouseEvent=null):void{
navigateToURL(new URLRequest(("http://" + myURL)));
}
private function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local4:Class;
var _local5:Object;
var _local6:Number;
if (!_init){
if ((((stage.stageWidth <= 0)) || ((stage.stageHeight <= 0)))){
return;
};
create();
_init = true;
};
graphics.clear();
var _local3:uint = getTimer();
if ((((framesLoaded >= totalFrames)) && ((_local3 > _min)))){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
_local4 = Class(getDefinitionByName(className));
if (_local4){
_local5 = new (_local4);
addChild((_local5 as DisplayObject));
};
removeChild(_buffer);
} else {
_local6 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
if ((((_min > 0)) && ((_local6 > (_local3 / _min))))){
_local6 = (_local3 / _min);
};
update(_local6);
};
}
protected function create():void{
var _local3:uint;
_min = 0;
if (!FlxG.debug){
_min = (minDisplayTime * 1000);
};
_buffer = new Sprite();
_buffer.scaleX = 2;
_buffer.scaleY = 2;
addChild(_buffer);
_width = (stage.stageWidth / _buffer.scaleX);
_height = (stage.stageHeight / _buffer.scaleY);
_buffer.addChild(new Bitmap(new BitmapData(_width, _height, false, 13406)));
var _local1:Bitmap = new ImgLogoLight();
_local1.smoothing = true;
_local1.width = (_local1.height = _height);
_local1.x = ((_width - _local1.width) / 2);
_buffer.addChild(_local1);
_bmpBar = new Bitmap(new BitmapData(1, 7, false, 6253311));
_bmpBar.x = 4;
_bmpBar.y = (_height - 11);
_buffer.addChild(_bmpBar);
_text = new TextField();
_text.defaultTextFormat = new TextFormat("system", 8, 6253311);
_text.embedFonts = true;
_text.selectable = false;
_text.multiline = false;
_text.x = 2;
_text.y = (_bmpBar.y - 11);
_text.width = 80;
_buffer.addChild(_text);
_logo = new ImgLogo();
_logo.scaleX = (_logo.scaleY = (_height / 8));
_logo.x = ((_width - _logo.width) / 2);
_logo.y = ((_height - _logo.height) / 2);
_buffer.addChild(_logo);
_logoGlow = new ImgLogo();
_logoGlow.smoothing = true;
_logoGlow.blendMode = "screen";
_logoGlow.scaleX = (_logoGlow.scaleY = (_height / 8));
_logoGlow.x = ((_width - _logoGlow.width) / 2);
_logoGlow.y = ((_height - _logoGlow.height) / 2);
_buffer.addChild(_logoGlow);
_local1 = new ImgLogoCorners();
_local1.smoothing = true;
_local1.width = _width;
_local1.height = _height;
_buffer.addChild(_local1);
_local1 = new Bitmap(new BitmapData(_width, _height, false, 0xFFFFFF));
var _local2:uint;
while (_local2 < _height) {
_local3 = 0;
while (_local3 < _width) {
_local1.bitmapData.setPixel(_local3, _local2, 0);
_local3++;
};
_local2 = (_local2 + 2);
};
_local1.blendMode = "overlay";
_local1.alpha = 0.25;
_buffer.addChild(_local1);
}
}
}//package org.flixel
Section 102
//FlxPreloader_ImgLogo (org.flixel.FlxPreloader_ImgLogo)
package org.flixel {
import mx.core.*;
public class FlxPreloader_ImgLogo extends BitmapAsset {
}
}//package org.flixel
Section 103
//FlxPreloader_ImgLogoCorners (org.flixel.FlxPreloader_ImgLogoCorners)
package org.flixel {
import mx.core.*;
public class FlxPreloader_ImgLogoCorners extends BitmapAsset {
}
}//package org.flixel
Section 104
//FlxPreloader_ImgLogoLight (org.flixel.FlxPreloader_ImgLogoLight)
package org.flixel {
import mx.core.*;
public class FlxPreloader_ImgLogoLight extends BitmapAsset {
}
}//package org.flixel
Section 105
//FlxQuadTree (org.flixel.FlxQuadTree)
package org.flixel {
import org.flixel.data.*;
public class FlxQuadTree extends FlxRect {
protected var _sw:FlxQuadTree;
protected var _mx:Number;
protected var _my:Number;
protected var _ne:FlxQuadTree;
protected var _hh:Number;
protected var _headA:FlxList;
protected var _headB:FlxList;
protected var _canSubdivide:Boolean;
protected var _l:Number;
protected var _hw:Number;
protected var _nw:FlxQuadTree;
protected var _se:FlxQuadTree;
protected var _tailA:FlxList;
protected var _r:Number;
protected var _t:Number;
protected var _tailB:FlxList;
protected var _b:Number;
public static const A_LIST:uint = 0;
public static const B_LIST:uint = 1;
protected static var _ot:Number;
protected static var _or:Number;
protected static var _o:FlxObject;
protected static var _ob:Number;
protected static var _min:uint;
protected static var _oc:Function;
protected static var _ol:Number;
protected static var _oa:uint;
public function FlxQuadTree(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxQuadTree=null){
var _local6:FlxList;
var _local7:FlxList;
super(_arg1, _arg2, _arg3, _arg4);
_headA = (_tailA = new FlxList());
_headB = (_tailB = new FlxList());
if (_arg5 != null){
if (_arg5._headA.object != null){
_local6 = _arg5._headA;
while (_local6 != null) {
if (_tailA.object != null){
_local7 = _tailA;
_tailA = new FlxList();
_local7.next = _tailA;
};
_tailA.object = _local6.object;
_local6 = _local6.next;
};
};
if (_arg5._headB.object != null){
_local6 = _arg5._headB;
while (_local6 != null) {
if (_tailB.object != null){
_local7 = _tailB;
_tailB = new FlxList();
_local7.next = _tailB;
};
_tailB.object = _local6.object;
_local6 = _local6.next;
};
};
} else {
_min = ((width + height) / (2 * FlxU.quadTreeDivisions));
};
_canSubdivide = (((width > _min)) || ((height > _min)));
_nw = null;
_ne = null;
_se = null;
_sw = null;
_l = x;
_r = (x + width);
_hw = (width / 2);
_mx = (_l + _hw);
_t = y;
_b = (y + height);
_hh = (height / 2);
_my = (_t + _hh);
}
protected function addObject():void{
if (((!(_canSubdivide)) || ((((((((_l >= _ol)) && ((_r <= _or)))) && ((_t >= _ot)))) && ((_b <= _ob)))))){
addToList();
return;
};
if ((((_ol > _l)) && ((_or < _mx)))){
if ((((_ot > _t)) && ((_ob < _my)))){
if (_nw == null){
_nw = new FlxQuadTree(_l, _t, _hw, _hh, this);
};
_nw.addObject();
return;
};
if ((((_ot > _my)) && ((_ob < _b)))){
if (_sw == null){
_sw = new FlxQuadTree(_l, _my, _hw, _hh, this);
};
_sw.addObject();
return;
};
};
if ((((_ol > _mx)) && ((_or < _r)))){
if ((((_ot > _t)) && ((_ob < _my)))){
if (_ne == null){
_ne = new FlxQuadTree(_mx, _t, _hw, _hh, this);
};
_ne.addObject();
return;
};
if ((((_ot > _my)) && ((_ob < _b)))){
if (_se == null){
_se = new FlxQuadTree(_mx, _my, _hw, _hh, this);
};
_se.addObject();
return;
};
};
if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _t)))) && ((_ot < _my)))){
if (_nw == null){
_nw = new FlxQuadTree(_l, _t, _hw, _hh, this);
};
_nw.addObject();
};
if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _t)))) && ((_ot < _my)))){
if (_ne == null){
_ne = new FlxQuadTree(_mx, _t, _hw, _hh, this);
};
_ne.addObject();
};
if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _my)))) && ((_ot < _b)))){
if (_se == null){
_se = new FlxQuadTree(_mx, _my, _hw, _hh, this);
};
_se.addObject();
};
if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _my)))) && ((_ot < _b)))){
if (_sw == null){
_sw = new FlxQuadTree(_l, _my, _hw, _hh, this);
};
_sw.addObject();
};
}
protected function addToList():void{
var _local1:FlxList;
if (_oa == A_LIST){
if (_tailA.object != null){
_local1 = _tailA;
_tailA = new FlxList();
_local1.next = _tailA;
};
_tailA.object = _o;
} else {
if (_tailB.object != null){
_local1 = _tailB;
_tailB = new FlxList();
_local1.next = _tailB;
};
_tailB.object = _o;
};
if (!_canSubdivide){
return;
};
if (_nw != null){
_nw.addToList();
};
if (_ne != null){
_ne.addToList();
};
if (_se != null){
_se.addToList();
};
if (_sw != null){
_sw.addToList();
};
}
public function overlap(_arg1:Boolean=true, _arg2:Function=null):Boolean{
var _local4:FlxList;
_oc = _arg2;
var _local3:Boolean;
if (_arg1){
_oa = B_LIST;
if (_headA.object != null){
_local4 = _headA;
while (_local4 != null) {
_o = _local4.object;
if (((((_o.exists) && (_o.solid))) && (overlapNode()))){
_local3 = true;
};
_local4 = _local4.next;
};
};
_oa = A_LIST;
if (_headB.object != null){
_local4 = _headB;
while (_local4 != null) {
_o = _local4.object;
if (((_o.exists) && (_o.solid))){
if (((!((_nw == null))) && (_nw.overlapNode()))){
_local3 = true;
};
if (((!((_ne == null))) && (_ne.overlapNode()))){
_local3 = true;
};
if (((!((_se == null))) && (_se.overlapNode()))){
_local3 = true;
};
if (((!((_sw == null))) && (_sw.overlapNode()))){
_local3 = true;
};
};
_local4 = _local4.next;
};
};
} else {
if (_headA.object != null){
_local4 = _headA;
while (_local4 != null) {
_o = _local4.object;
if (((((_o.exists) && (_o.solid))) && (overlapNode(_local4.next)))){
_local3 = true;
};
_local4 = _local4.next;
};
};
};
if (((!((_nw == null))) && (_nw.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_ne == null))) && (_ne.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_se == null))) && (_se.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_sw == null))) && (_sw.overlap(_arg1, _oc)))){
_local3 = true;
};
return (_local3);
}
public function add(_arg1:FlxObject, _arg2:uint):void{
var _local3:FlxObject;
var _local4:Array;
var _local5:uint;
var _local6:uint;
_oa = _arg2;
if (_arg1._group){
_local4 = (_arg1 as FlxGroup).members;
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local3 = (_local4[_local6] as FlxObject);
if (((!((_local3 == null))) && (_local3.exists))){
if (_local3._group){
add(_local3, _arg2);
} else {
if (_local3.solid){
_o = _local3;
_ol = _o.x;
_ot = _o.y;
_or = (_o.x + _o.width);
_ob = (_o.y + _o.height);
addObject();
};
};
};
_local6++;
};
};
if (_arg1.solid){
_o = _arg1;
_ol = _o.x;
_ot = _o.y;
_or = (_o.x + _o.width);
_ob = (_o.y + _o.height);
addObject();
};
}
protected function overlapNode(_arg1:FlxList=null):Boolean{
var _local3:FlxObject;
var _local2:Boolean;
var _local4:FlxList = _arg1;
if (_local4 == null){
if (_oa == A_LIST){
_local4 = _headA;
} else {
_local4 = _headB;
};
};
if (_local4.object != null){
while (_local4 != null) {
_local3 = _local4.object;
if ((((((((((((((((((_o === _local3)) || (!(_local3.exists)))) || (!(_o.exists)))) || (!(_local3.solid)))) || (!(_o.solid)))) || (((_o.x + _o.width) < (_local3.x + FlxU.roundingError))))) || (((_o.x + FlxU.roundingError) > (_local3.x + _local3.width))))) || (((_o.y + _o.height) < (_local3.y + FlxU.roundingError))))) || (((_o.y + FlxU.roundingError) > (_local3.y + _local3.height))))){
_local4 = _local4.next;
} else {
if (_oc == null){
_o.kill();
_local3.kill();
_local2 = true;
} else {
if (_oc(_o, _local3)){
_local2 = true;
};
};
_local4 = _local4.next;
};
};
};
return (_local2);
}
}
}//package org.flixel
Section 106
//FlxRect (org.flixel.FlxRect)
package org.flixel {
public class FlxRect extends FlxPoint {
public var width:Number;
public var height:Number;
public function FlxRect(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
super(_arg1, _arg2);
width = _arg3;
height = _arg4;
}
public function get bottom():Number{
return ((y + height));
}
public function get top():Number{
return (y);
}
public function get left():Number{
return (x);
}
public function get right():Number{
return ((x + width));
}
}
}//package org.flixel
Section 107
//FlxSave (org.flixel.FlxSave)
package org.flixel {
import flash.net.*;
public class FlxSave {
protected var _so:SharedObject;
public var data:Object;
public var name:String;
public function FlxSave(){
name = null;
_so = null;
data = null;
}
public function read(_arg1:String):Object{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.read().");
return (null);
};
return (data[_arg1]);
}
public function forceSave(_arg1:uint=0):Boolean{
var MinFileSize = _arg1;
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.forceSave().");
return (false);
};
var status:Object;
try {
status = _so.flush(MinFileSize);
} catch(e:Error) {
FlxG.log("WARNING: There was a problem flushing\nthe shared object data from FlxSave.");
return (false);
};
return ((status == SharedObjectFlushStatus.FLUSHED));
}
public function bind(_arg1:String):Boolean{
var Name = _arg1;
name = null;
_so = null;
data = null;
name = Name;
try {
_so = SharedObject.getLocal(name);
} catch(e:Error) {
FlxG.log("WARNING: There was a problem binding to\nthe shared object data from FlxSave.");
name = null;
_so = null;
data = null;
return (false);
};
data = _so.data;
return (true);
}
public function erase(_arg1:uint=0):Boolean{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.erase().");
return (false);
};
_so.clear();
return (forceSave(_arg1));
}
public function write(_arg1:String, _arg2:Object, _arg3:uint=0):Boolean{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.write().");
return (false);
};
data[_arg1] = _arg2;
return (forceSave(_arg3));
}
}
}//package org.flixel
Section 108
//FlxSound (org.flixel.FlxSound)
package org.flixel {
import flash.events.*;
import flash.media.*;
import flash.net.*;
public class FlxSound extends FlxObject {
public var name:String;
protected var _position:Number;
protected var _fadeOutTotal:Number;
protected var _fadeOutTimer:Number;
protected var _sound:Sound;
protected var _pauseOnFadeOut:Boolean;
protected var _volumeAdjust:Number;
public var playing:Boolean;
protected var _radius:Number;
protected var _volume:Number;
protected var _point2:FlxPoint;
protected var _fadeInTimer:Number;
public var artist:String;
protected var _channel:SoundChannel;
protected var _fadeInTotal:Number;
protected var _looped:Boolean;
protected var _pan:Boolean;
protected var _transform:SoundTransform;
protected var _init:Boolean;
public var survive:Boolean;
protected var _core:FlxObject;
public function FlxSound(){
_point2 = new FlxPoint();
_transform = new SoundTransform();
init();
fixed = true;
}
public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new Sound();
_sound.addEventListener(Event.ID3, gotID3);
_sound.load(new URLRequest(_arg1));
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
public function stop():void{
_position = 0;
if (_channel != null){
_channel.stop();
stopped();
};
}
public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new (_arg1);
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
public function get volume():Number{
return (_volume);
}
function updateTransform():void{
_transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust);
if (_channel != null){
_channel.soundTransform = _transform;
};
}
public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{
_pauseOnFadeOut = _arg2;
_fadeInTimer = 0;
_fadeOutTimer = _arg1;
_fadeOutTotal = _fadeOutTimer;
}
public function play():void{
if (_position < 0){
return;
};
if (_looped){
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 9999, _transform);
};
if (_channel == null){
active = false;
};
} else {
_channel = _sound.play(_position, 0, _transform);
if (_channel == null){
active = false;
} else {
_channel.addEventListener(Event.SOUND_COMPLETE, looped);
};
};
} else {
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 0, _transform);
if (_channel == null){
active = false;
} else {
_channel.addEventListener(Event.SOUND_COMPLETE, stopped);
};
};
} else {
_channel = _sound.play(_position, 0, _transform);
if (_channel == null){
active = false;
};
};
};
playing = !((_channel == null));
_position = 0;
}
public function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
updateTransform();
}
protected function init():void{
_transform.pan = 0;
_sound = null;
_position = 0;
_volume = 1;
_volumeAdjust = 1;
_looped = false;
_core = null;
_radius = 0;
_pan = false;
_fadeOutTimer = 0;
_fadeOutTotal = 0;
_pauseOnFadeOut = false;
_fadeInTimer = 0;
_fadeInTotal = 0;
active = false;
visible = false;
solid = false;
playing = false;
name = null;
artist = null;
}
protected function looped(_arg1:Event=null):void{
if (_channel == null){
return;
};
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
_channel = null;
play();
}
protected function updateSound():void{
var _local3:FlxPoint;
var _local4:FlxPoint;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_position != 0){
return;
};
var _local1:Number = 1;
var _local2:Number = 1;
if (_core != null){
_local3 = new FlxPoint();
_local4 = new FlxPoint();
_core.getScreenXY(_local3);
getScreenXY(_local4);
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius);
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
if (_pan){
_local7 = (-(_local5) / _radius);
if (_local7 < -1){
_local7 = -1;
} else {
if (_local7 > 1){
_local7 = 1;
};
};
_transform.pan = _local7;
};
};
if (_fadeOutTimer > 0){
_fadeOutTimer = (_fadeOutTimer - FlxG.elapsed);
if (_fadeOutTimer <= 0){
if (_pauseOnFadeOut){
pause();
} else {
stop();
};
};
_local2 = (_fadeOutTimer / _fadeOutTotal);
if (_local2 < 0){
_local2 = 0;
};
} else {
if (_fadeInTimer > 0){
_fadeInTimer = (_fadeInTimer - FlxG.elapsed);
_local2 = (_fadeInTimer / _fadeInTotal);
if (_local2 < 0){
_local2 = 0;
};
_local2 = (1 - _local2);
};
};
_volumeAdjust = (_local1 * _local2);
updateTransform();
}
public function fadeIn(_arg1:Number):void{
_fadeOutTimer = 0;
_fadeInTimer = _arg1;
_fadeInTotal = _fadeInTimer;
play();
}
override public function update():void{
super.update();
updateSound();
}
protected function stopped(_arg1:Event=null):void{
if (!_looped){
_channel.removeEventListener(Event.SOUND_COMPLETE, stopped);
} else {
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
};
_channel = null;
active = false;
playing = false;
}
protected function gotID3(_arg1:Event=null):void{
FlxG.log("got ID3 info!");
if (_sound.id3.songName.length > 0){
name = _sound.id3.songName;
};
if (_sound.id3.artist.length > 0){
artist = _sound.id3.artist;
};
_sound.removeEventListener(Event.ID3, gotID3);
}
public function pause():void{
if (_channel == null){
_position = -1;
return;
};
_position = _channel.position;
_channel.stop();
if (_looped){
while (_position >= _sound.length) {
_position = (_position - _sound.length);
};
};
_channel = null;
playing = false;
}
override public function destroy():void{
if (active){
stop();
};
}
public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxObject, _arg4:Number, _arg5:Boolean=true):FlxSound{
x = _arg1;
y = _arg2;
_core = _arg3;
_radius = _arg4;
_pan = _arg5;
return (this);
}
}
}//package org.flixel
Section 109
//FlxSprite (org.flixel.FlxSprite)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
public class FlxSprite extends FlxObject {
protected var _mtx:Matrix;
protected var _caf:uint;
public var finished:Boolean;
protected var _animations:Array;
protected var _ct:ColorTransform;
public var offset:FlxPoint;
protected var _callback:Function;
protected var _curAnim:FlxAnim;
public var _framePixels:BitmapData;
protected var _flipped:uint;
public var scale:FlxPoint;
protected var _pixels:BitmapData;
protected var _bakedRotation:Number;
public var blend:String;
public var frameWidth:uint;
protected var _flashRect2:Rectangle;
protected var _alpha:Number;
protected var _flashPointZero:Point;
protected var _curFrame:uint;
public var frameHeight:uint;
protected var _flashRect:Rectangle;
protected var _frameTimer:Number;
protected var _facing:uint;
public var antialiasing:Boolean;
protected var _color:uint;
public static const LEFT:uint = 0;
public static const DOWN:uint = 3;
public static const UP:uint = 2;
public static const RIGHT:uint = 1;
public function FlxSprite(_arg1:Number=0, _arg2:Number=0, _arg3:Class=null){
x = _arg1;
y = _arg2;
_flashRect = new Rectangle();
_flashRect2 = new Rectangle();
_flashPointZero = new Point();
if (_arg3 == null){
createGraphic(160, 120);
} else {
loadGraphic(_arg3);
};
offset = new FlxPoint();
scale = new FlxPoint(1, 1);
_alpha = 1;
_color = 0xFFFFFF;
blend = null;
antialiasing = false;
finished = false;
_facing = RIGHT;
_animations = new Array();
_flipped = 0;
_curAnim = null;
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
_mtx = new Matrix();
_callback = null;
}
protected function renderSprite():void{
getScreenXY(_point);
_flashPoint.x = _point.x;
_flashPoint.y = _point.y;
if ((((((((((angle == 0)) || ((_bakedRotation > 0)))) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){
FlxG.buffer.copyPixels(_framePixels, _flashRect, _flashPoint, null, null, true);
return;
};
_mtx.identity();
_mtx.translate(-(origin.x), -(origin.y));
_mtx.scale(scale.x, scale.y);
if (angle != 0){
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
};
_mtx.translate((_point.x + origin.x), (_point.y + origin.y));
FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing);
}
public function fill(_arg1:uint):void{
_pixels.fillRect(_flashRect2, _arg1);
calcFrame();
}
public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{
_animations.push(new FlxAnim(_arg1, _arg2, _arg3, _arg4));
}
override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
_arg1 = (_arg1 - FlxU.floor(FlxG.scroll.x));
_arg2 = (_arg2 - FlxU.floor(FlxG.scroll.y));
getScreenXY(_point);
if (_arg3){
return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _point.x), (_arg2 - _point.y))));
};
if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + frameWidth))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + frameHeight))))){
return (false);
};
return (true);
}
override public function render():void{
renderSprite();
}
protected function calcFrame():void{
var _local1:uint = (_caf * frameWidth);
var _local2:uint;
var _local3:uint = (_flipped) ? _flipped : _pixels.width;
if (_local1 >= _local3){
_local2 = (uint((_local1 / _local3)) * frameHeight);
_local1 = (_local1 % _local3);
};
if (((_flipped) && ((_facing == LEFT)))){
_local1 = (((_flipped << 1) - _local1) - frameWidth);
};
_flashRect.x = _local1;
_flashRect.y = _local2;
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
_flashRect.x = (_flashRect.y = 0);
if (_ct != null){
_framePixels.colorTransform(_flashRect, _ct);
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _caf);
};
}
function unsafeBind(_arg1:BitmapData):void{
_pixels = (_framePixels = _arg1);
}
public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{
_bakedRotation = 0;
_pixels = FlxG.addBitmap(_arg1, _arg3, _arg6);
if (_arg3){
_flipped = (_pixels.width >> 1);
} else {
_flipped = 0;
};
if (_arg4 == 0){
if (_arg2){
_arg4 = _pixels.height;
} else {
if (_flipped > 0){
_arg4 = (_pixels.width / 2);
} else {
_arg4 = _pixels.width;
};
};
};
width = (frameWidth = _arg4);
if (_arg5 == 0){
if (_arg2){
_arg5 = width;
} else {
_arg5 = _pixels.height;
};
};
height = (frameHeight = _arg5);
resetHelpers();
return (this);
}
public function get pixels():BitmapData{
return (_pixels);
}
public function set facing(_arg1:uint):void{
var _local2 = !((_facing == _arg1));
_facing = _arg1;
if (_local2){
calcFrame();
};
}
protected function resetHelpers():void{
_flashRect.x = 0;
_flashRect.y = 0;
_flashRect.width = frameWidth;
_flashRect.height = frameHeight;
_flashRect2.x = 0;
_flashRect2.y = 0;
_flashRect2.width = _pixels.width;
_flashRect2.height = _pixels.height;
if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){
_framePixels = new BitmapData(width, height);
};
origin.x = (frameWidth / 2);
origin.y = (frameHeight / 2);
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
_caf = 0;
refreshHulls();
}
override public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{
if (_arg1 == null){
_arg1 = new FlxPoint();
};
_arg1.x = ((FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))) - offset.x);
_arg1.y = ((FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))) - offset.y);
return (_arg1);
}
public function set alpha(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 == _alpha){
return;
};
_alpha = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
protected function updateAnimation():void{
var _local1:uint;
var _local2:int;
if (_bakedRotation){
_local1 = _caf;
_local2 = (angle % 360);
if (_local2 < 0){
_local2 = (_local2 + 360);
};
_caf = (_local2 / _bakedRotation);
if (_local1 != _caf){
calcFrame();
};
return;
};
if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){
_frameTimer = (_frameTimer + FlxG.elapsed);
if (_frameTimer > _curAnim.delay){
_frameTimer = (_frameTimer - _curAnim.delay);
if (_curFrame == (_curAnim.frames.length - 1)){
if (_curAnim.looped){
_curFrame = 0;
};
finished = true;
} else {
_curFrame++;
};
_caf = _curAnim.frames[_curFrame];
calcFrame();
};
};
}
public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{
var _local4:BitmapData = _arg1._framePixels;
if ((((((((((_arg1.angle == 0)) || ((_arg1._bakedRotation > 0)))) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){
_flashPoint.x = _arg2;
_flashPoint.y = _arg3;
_flashRect2.width = _local4.width;
_flashRect2.height = _local4.height;
_pixels.copyPixels(_local4, _flashRect2, _flashPoint, null, null, true);
_flashRect2.width = _pixels.width;
_flashRect2.height = _pixels.height;
calcFrame();
return;
};
_mtx.identity();
_mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y));
_mtx.scale(_arg1.scale.x, _arg1.scale.y);
if (_arg1.angle != 0){
_mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360)));
};
_mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y));
_pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing);
calcFrame();
}
public function loadRotatedGraphic(_arg1:Class, _arg2:uint=16, _arg3:int=-1, _arg4:Boolean=false, _arg5:Boolean=false):FlxSprite{
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local6:uint = 4;
var _local7:FlxSprite = new FlxSprite().loadGraphic(_arg1, (_arg3 >= 0));
if (_arg3 >= 0){
_local7.frame = _arg3;
};
_local7.antialiasing = _arg4;
var _local8:uint = _local7.width;
if (_local7.height > _local8){
_local8 = _local7.height;
};
if (_arg5){
_local8 = (_local8 * 1.5);
};
var _local9:uint = Math.ceil((_arg2 / _local6));
width = (_local8 * _local9);
height = (_local8 * _local6);
var _local10:String = ((((((String(_arg1) + ":") + _arg3) + ":") + width) + "x") + height);
var _local11:Boolean = FlxG.checkBitmapCache(_local10);
createGraphic(width, height, 0, true, _local10);
_bakedRotation = (360 / _arg2);
if (!_local11){
_local14 = (_local7.width / 2);
_local15 = (_local7.height / 2);
_local16 = (_local8 / 2);
_local17 = (_local8 / 2);
_local12 = 0;
while (_local12 < _local6) {
_local13 = 0;
while (_local13 < _local9) {
draw(_local7, ((_local16 + (_local8 * _local13)) - _local14), (_local17 - _local15));
_local7.angle = (_local7.angle + _bakedRotation);
_local13++;
};
_local17 = (_local17 + _local8);
_local12++;
};
};
frameWidth = (frameHeight = (width = (height = _local8)));
resetHelpers();
return (this);
}
public function set color(_arg1:uint):void{
_arg1 = (_arg1 & 0xFFFFFF);
if (_color == _arg1){
return;
};
_color = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
override public function update():void{
updateMotion();
updateAnimation();
updateFlickering();
}
public function onEmit():void{
}
public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false, _arg5:String=null):FlxSprite{
_bakedRotation = 0;
_pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4, _arg5);
width = (frameWidth = _pixels.width);
height = (frameHeight = _pixels.height);
resetHelpers();
return (this);
}
public function play(_arg1:String, _arg2:Boolean=false):void{
if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){
return;
};
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
var _local3:uint = _animations.length;
var _local4:uint;
while (_local4 < _local3) {
if (_animations[_local4].name == _arg1){
_curAnim = _animations[_local4];
if (_curAnim.delay <= 0){
finished = true;
} else {
finished = false;
};
_caf = _curAnim.frames[_curFrame];
calcFrame();
return;
};
_local4++;
};
}
public function addAnimationCallback(_arg1:Function):void{
_callback = _arg1;
}
public function set pixels(_arg1:BitmapData):void{
_pixels = _arg1;
width = (frameWidth = _pixels.width);
height = (frameHeight = _pixels.height);
resetHelpers();
}
public function get alpha():Number{
return (_alpha);
}
public function get facing():uint{
return (_facing);
}
public function get color():uint{
return (_color);
}
public function set frame(_arg1:uint):void{
_curAnim = null;
_caf = _arg1;
calcFrame();
}
public function get frame():uint{
return (_caf);
}
public function randomFrame():void{
_curAnim = null;
_caf = int((FlxU.random() * (_pixels.width / frameWidth)));
calcFrame();
}
}
}//package org.flixel
Section 110
//FlxState (org.flixel.FlxState)
package org.flixel {
import flash.display.*;
public class FlxState extends Sprite {
public var defaultGroup:FlxGroup;
public static var screen:FlxSprite;
public static var bgColor:uint;
public function FlxState(){
defaultGroup = new FlxGroup();
if (screen == null){
screen = new FlxSprite();
screen.createGraphic(FlxG.width, FlxG.height, 0, true);
screen.origin.x = (screen.origin.y = 0);
screen.antialiasing = true;
};
}
public function add(_arg1:FlxObject):FlxObject{
return (defaultGroup.add(_arg1));
}
public function preProcess():void{
screen.fill(bgColor);
}
public function collide():void{
FlxU.collide(defaultGroup, defaultGroup);
}
public function render():void{
defaultGroup.render();
}
public function update():void{
defaultGroup.update();
}
public function destroy():void{
defaultGroup.destroy();
}
public function create():void{
}
public function postProcess():void{
}
}
}//package org.flixel
Section 111
//FlxText (org.flixel.FlxText)
package org.flixel {
import flash.display.*;
import flash.text.*;
public class FlxText extends FlxSprite {
protected var _tf:TextField;
protected var _regen:Boolean;
protected var _shadow:uint;
public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){
super(_arg1, _arg2);
createGraphic(_arg3, 1, 0);
if (_arg4 == null){
_arg4 = "";
};
_tf = new TextField();
_tf.width = _arg3;
_tf.embedFonts = true;
_tf.selectable = false;
_tf.sharpness = 100;
_tf.multiline = true;
_tf.wordWrap = true;
_tf.text = _arg4;
var _local5:TextFormat = new TextFormat("system", 8, 0xFFFFFF);
_tf.defaultTextFormat = _local5;
_tf.setTextFormat(_local5);
if (_arg4.length <= 0){
_tf.height = 1;
} else {
_tf.height = 10;
};
_regen = true;
_shadow = 0;
solid = false;
calcFrame();
}
public function get shadow():uint{
return (_shadow);
}
public function get size():Number{
return ((_tf.defaultTextFormat.size as Number));
}
override public function get color():uint{
return ((_tf.defaultTextFormat.color as uint));
}
override public function set color(_arg1:uint):void{
var _local2:TextFormat = dtfCopy();
_local2.color = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
public function set shadow(_arg1:uint):void{
_shadow = _arg1;
calcFrame();
}
public function set size(_arg1:Number):void{
var _local2:TextFormat = dtfCopy();
_local2.size = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
public function get alignment():String{
return (_tf.defaultTextFormat.align);
}
protected function dtfCopy():TextFormat{
var _local1:TextFormat = _tf.defaultTextFormat;
return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align));
}
public function get text():String{
return (_tf.text);
}
public function get font():String{
return (_tf.defaultTextFormat.font);
}
public function set alignment(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.align = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
calcFrame();
}
public function set font(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.font = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
override protected function calcFrame():void{
var _local1:uint;
var _local2:uint;
var _local3:TextFormat;
var _local4:TextFormat;
if (_regen){
_local1 = _tf.numLines;
height = 0;
_local2 = 0;
while (_local2 < _local1) {
height = (height + _tf.getLineMetrics(_local2).height);
_local2++;
};
height = (height + 4);
_pixels = new BitmapData(width, height, true, 0);
frameHeight = height;
_tf.height = (height * 1.2);
_flashRect.x = 0;
_flashRect.y = 0;
_flashRect.width = width;
_flashRect.height = height;
_regen = false;
} else {
_pixels.fillRect(_flashRect, 0);
};
if (((((!((_tf == null))) && (!((_tf.text == null))))) && ((_tf.text.length > 0)))){
_local3 = _tf.defaultTextFormat;
_local4 = _local3;
_mtx.identity();
if ((((_local3.align == "center")) && ((_tf.numLines == 1)))){
_local4 = new TextFormat(_local3.font, _local3.size, _local3.color, null, null, null, null, null, "left");
_tf.setTextFormat(_local4);
_mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0);
};
if (_shadow > 0){
_tf.setTextFormat(new TextFormat(_local4.font, _local4.size, _shadow, null, null, null, null, null, _local4.align));
_mtx.translate(1, 1);
_pixels.draw(_tf, _mtx, _ct);
_mtx.translate(-1, -1);
_tf.setTextFormat(new TextFormat(_local4.font, _local4.size, _local4.color, null, null, null, null, null, _local4.align));
};
_pixels.draw(_tf, _mtx, _ct);
_tf.setTextFormat(new TextFormat(_local3.font, _local3.size, _local3.color, null, null, null, null, null, _local3.align));
};
_framePixels = new BitmapData(_pixels.width, _pixels.height, true, 0);
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
if (solid){
refreshHulls();
};
}
public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null, _arg5:uint=0):FlxText{
if (_arg1 == null){
_arg1 = "";
};
var _local6:TextFormat = dtfCopy();
_local6.font = _arg1;
_local6.size = _arg2;
_local6.color = _arg3;
_local6.align = _arg4;
_tf.defaultTextFormat = _local6;
_tf.setTextFormat(_local6);
_shadow = _arg5;
_regen = true;
calcFrame();
return (this);
}
public function set text(_arg1:String):void{
_tf.text = _arg1;
_regen = true;
calcFrame();
}
}
}//package org.flixel
Section 112
//FlxTilemap (org.flixel.FlxTilemap)
package org.flixel {
import flash.display.*;
import flash.geom.*;
public class FlxTilemap extends FlxObject {
protected var _screenRows:uint;
protected var _data:Array;
protected var _block:FlxObject;
protected var _rects:Array;
protected var _tileHeight:uint;
public var totalTiles:uint;
protected var _screenCols:uint;
public var auto:uint;
public var collideIndex:uint;
public var heightInTiles:uint;
public var widthInTiles:uint;
protected var _tileWidth:uint;
protected var _pixels:BitmapData;
protected var _callbacks:Array;
public var alpha:Number;// = 1
public var drawIndex:uint;
public var startingIndex:uint;
protected var _flashRect:Rectangle;
public static const ALT:uint = 2;
public static const AUTO:uint = 1;
public static const OFF:uint = 0;
public static var ImgAutoAlt:Class = FlxTilemap_ImgAutoAlt;
public static var ImgAuto:Class = FlxTilemap_ImgAuto;
public function FlxTilemap(){
auto = OFF;
collideIndex = 1;
startingIndex = 0;
drawIndex = 1;
widthInTiles = 0;
heightInTiles = 0;
totalTiles = 0;
_data = null;
_tileWidth = 0;
_tileHeight = 0;
_rects = null;
_pixels = null;
_block = new FlxObject();
_block.width = (_block.height = 0);
_block.fixed = true;
_callbacks = new Array();
fixed = true;
}
override public function overlaps(_arg1:FlxObject):Boolean{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array = new Array();
var _local7:uint = Math.floor(((_arg1.x - x) / _tileWidth));
var _local8:uint = Math.floor(((_arg1.y - y) / _tileHeight));
var _local9:uint = (Math.ceil((_arg1.width / _tileWidth)) + 1);
var _local10:uint = (Math.ceil((_arg1.height / _tileHeight)) + 1);
var _local11:uint;
while (_local11 < _local10) {
if (_local11 >= heightInTiles){
break;
};
_local3 = (((_local8 + _local11) * widthInTiles) + _local7);
_local2 = 0;
while (_local2 < _local9) {
if (_local2 >= widthInTiles){
break;
};
_local5 = (_data[(_local3 + _local2)] as uint);
if (_local5 >= collideIndex){
_local6.push({x:(x + ((_local7 + _local2) * _tileWidth)), y:(y + ((_local8 + _local11) * _tileHeight)), data:_local5});
};
_local2++;
};
_local11++;
};
var _local12:uint = _local6.length;
var _local13:Boolean;
_local4 = 0;
while (_local4 < _local12) {
_block.x = _local6[_local4].x;
_block.y = _local6[_local4].y;
if (_block.overlaps(_arg1)){
return (true);
};
_local4++;
};
return (false);
}
public function loadMap(_arg1:String, _arg2:Class, _arg3:uint=0, _arg4:uint=0):FlxTilemap{
var _local5:uint;
var _local6:Array;
var _local9:uint;
var _local7:Array = _arg1.split("\n");
heightInTiles = _local7.length;
_data = new Array();
var _local8:uint;
while (_local8 < heightInTiles) {
_local6 = _local7[_local8].split(",");
if (_local6.length <= 1){
heightInTiles--;
} else {
if (widthInTiles == 0){
widthInTiles = _local6.length;
};
_local5 = 0;
while (_local5 < widthInTiles) {
_data.push(uint(_local6[_local5]));
_local5++;
};
};
_local8++;
};
totalTiles = (widthInTiles * heightInTiles);
if (auto > 0){
cleanTile();
};
_pixels = FlxG.addBitmap(_arg2);
_tileWidth = _arg3;
if (_tileWidth == 0){
_tileWidth = _pixels.height;
};
_tileHeight = _arg4;
if (_tileHeight == 0){
_tileHeight = _tileWidth;
};
_block.width = _tileWidth;
_block.height = _tileHeight;
width = (widthInTiles * _tileWidth);
height = (heightInTiles * _tileHeight);
_rects = new Array(totalTiles);
_local9 = 0;
while (_local9 < totalTiles) {
updateTile(_local9);
_local9++;
};
_screenRows = (Math.ceil((FlxG.height / _tileHeight)) + 1);
if (_screenRows > heightInTiles){
_screenRows = heightInTiles;
};
_screenCols = (Math.ceil((FlxG.width / _tileWidth)) + 1);
if (_screenCols > widthInTiles){
_screenCols = widthInTiles;
};
refreshHulls();
return (this);
}
protected function cleanTile():void{
var _local2:int;
var _local3:int;
var _local1:int;
while (_local1 < widthInTiles) {
_local2 = 0;
while (_local2 < heightInTiles) {
_local3 = (_local1 + (_local2 * widthInTiles));
if (_data[_local3] != 1){
if (_data[(_local3 + 1)] <= 1){
_data[_local3] = 5;
};
if (_data[(_local3 - 1)] <= 1){
_data[_local3] = 7;
};
if (_data[(_local3 + widthInTiles)] <= 1){
_data[_local3] = (_data[_local3] - 3);
};
if (_data[(_local3 - widthInTiles)] <= 1){
_data[_local3] = (_data[_local3] + 3);
};
if (_data[(_local3 + 1)] > 1){
if ((((_data[((_local3 + 1) + widthInTiles)] <= 1)) && ((_data[(_local3 + widthInTiles)] > 1)))){
_data[_local3] = 14;
};
if ((((_data[((_local3 + 1) - widthInTiles)] <= 1)) && ((_data[(_local3 - widthInTiles)] > 1)))){
_data[_local3] = 12;
};
};
if (_data[(_local3 - 1)] > 1){
if ((((_data[((_local3 - 1) + widthInTiles)] <= 1)) && ((_data[(_local3 + widthInTiles)] > 1)))){
_data[_local3] = 13;
};
if ((((_data[((_local3 - 1) - widthInTiles)] <= 1)) && ((_data[(_local3 - widthInTiles)] > 1)))){
_data[_local3] = 11;
};
};
};
_local2++;
};
_local1++;
};
}
override public function preCollide(_arg1:FlxObject):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:int = FlxU.floor(((_arg1.x - x) / _tileWidth));
var _local7:int = FlxU.floor(((_arg1.y - y) / _tileHeight));
var _local8:uint = ((_local6 + FlxU.ceil((_arg1.width / _tileWidth))) + 1);
var _local9:uint = ((_local7 + FlxU.ceil((_arg1.height / _tileHeight))) + 1);
if (_local6 < 0){
_local6 = 0;
};
if (_local7 < 0){
_local7 = 0;
};
if (_local8 > widthInTiles){
_local8 = widthInTiles;
};
if (_local9 > heightInTiles){
_local9 = heightInTiles;
};
_local4 = (_local7 * widthInTiles);
_local2 = _local7;
while (_local2 < _local9) {
_local3 = _local6;
while (_local3 < _local8) {
if ((_data[(_local4 + _local3)] as uint) >= collideIndex){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local10 = _temp1;
colOffsets[_local10] = new FlxPoint((x + (_local3 * _tileWidth)), (y + (_local2 * _tileHeight)));
};
_local3++;
};
_local4 = (_local4 + widthInTiles);
_local2++;
};
if (colOffsets.length != _local5){
colOffsets.length = _local5;
};
}
override public function render():void{
renderTilemap();
}
public function getTile(_arg1:uint, _arg2:uint):uint{
return (getTileByIndex(((_arg2 * widthInTiles) + _arg1)));
}
protected function updateTile(_arg1:uint):void{
if (_data[_arg1] < drawIndex){
_rects[_arg1] = null;
return;
};
var _local2:uint = ((_data[_arg1] - startingIndex) * _tileWidth);
var _local3:uint;
if (_local2 >= _pixels.width){
_local3 = (uint((_local2 / _pixels.width)) * _tileHeight);
_local2 = (_local2 % _pixels.width);
};
_rects[_arg1] = new Rectangle(_local2, _local3, _tileWidth, _tileHeight);
}
public function ray(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxPoint, _arg6:Number=1, _arg7:Number=0):Boolean{
var _local17:uint;
var _local18:uint;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local8:Number = _tileWidth;
if (_tileHeight < _tileWidth){
_local8 = _tileHeight;
};
_local8 = (_local8 / _arg6);
var _local9:Number = (_arg3 - _arg1);
var _local10:Number = (_arg4 - _arg2);
var _local11:Number = Math.sqrt(((_local9 * _local9) + (_local10 * _local10)));
var _local12:uint = Math.ceil((_local11 / _local8));
var _local13:Number = (_local9 / _local12);
var _local14:Number = (_local10 / _local12);
var _local15:Number = (_arg1 - _local13);
var _local16:Number = (_arg2 - _local14);
var _local19:uint;
while (_local19 < _local12) {
_local15 = (_local15 + _local13);
_local16 = (_local16 + _local14);
if ((((((((_local15 < 0)) || ((_local15 > width)))) || ((_local16 < 0)))) || ((_local16 > height)))){
} else {
_local17 = (_local15 / _tileWidth);
_local18 = (_local16 / _tileHeight);
if ((_data[((_local18 * widthInTiles) + _local17)] as uint) >= collideIndex){
_local17 = (_local17 * _tileWidth);
_local18 = (_local18 * _tileHeight);
_local20 = 0;
_local21 = 0;
_local23 = (_local15 - _local13);
_local24 = (_local16 - _local14);
_local22 = _local17;
if (_local9 < 0){
_local22 = (_local22 + _tileWidth);
};
_local20 = _local22;
_local21 = (_local24 + (_local14 * ((_local22 - _local23) / _local13)));
if ((((_local21 > (_local18 - _arg7))) && ((_local21 < ((_local18 + _tileHeight) + _arg7))))){
if (_arg5 == null){
_arg5 = new FlxPoint();
};
_arg5.x = _local20;
_arg5.y = _local21;
return (true);
};
_local22 = _local18;
if (_local10 < 0){
_local22 = (_local22 + _tileHeight);
};
_local20 = (_local23 + (_local13 * ((_local22 - _local24) / _local14)));
_local21 = _local22;
if ((((_local20 > (_local17 - _arg7))) && ((_local20 < ((_local17 + _tileWidth) + _arg7))))){
if (_arg5 == null){
_arg5 = new FlxPoint();
};
_arg5.x = _local20;
_arg5.y = _local21;
return (true);
};
return (false);
};
};
_local19++;
};
return (false);
}
override public function refreshHulls():void{
colHullX.x = 0;
colHullX.y = 0;
colHullX.width = _tileWidth;
colHullX.height = _tileHeight;
colHullY.x = 0;
colHullY.y = 0;
colHullY.width = _tileWidth;
colHullY.height = _tileHeight;
}
public function setTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=true):Boolean{
if ((((_arg1 >= widthInTiles)) || ((_arg2 >= heightInTiles)))){
return (false);
};
return (setTileByIndex(((_arg2 * widthInTiles) + _arg1), _arg3, _arg4));
}
public function follow(_arg1:int=0):void{
FlxG.followBounds((x + (_arg1 * _tileWidth)), (y + (_arg1 * _tileHeight)), (width - (_arg1 * _tileWidth)), (height - (_arg1 * _tileHeight)));
}
public function setCallback(_arg1:uint, _arg2:Function, _arg3:uint=1):void{
FlxG.log("FlxTilemap.setCallback() has been temporarily deprecated, sorry!");
if (_arg3 <= 0){
return;
};
var _local4:uint = _arg1;
while (_local4 < (_arg1 + _arg3)) {
_callbacks[_local4] = _arg2;
_local4++;
};
}
public function setTileByIndex(_arg1:uint, _arg2:uint, _arg3:Boolean=true):Boolean{
var _local5:uint;
if (_arg1 >= _data.length){
return (false);
};
var _local4:Boolean;
_data[_arg1] = _arg2;
if (!_arg3){
return (_local4);
};
if (auto == OFF){
updateTile(_arg1);
return (_local4);
};
var _local6:int = (int((_arg1 / widthInTiles)) - 1);
var _local7:int = (_local6 + 3);
var _local8:int = ((_arg1 % widthInTiles) - 1);
var _local9:int = (_local8 + 3);
while (_local6 < _local7) {
_local8 = (_local9 - 3);
while (_local8 < _local9) {
if ((((((((_local6 >= 0)) && ((_local6 < heightInTiles)))) && ((_local8 >= 0)))) && ((_local8 < widthInTiles)))){
_local5 = ((_local6 * widthInTiles) + _local8);
autoTile(_local5);
updateTile(_local5);
};
_local8++;
};
_local6++;
};
return (_local4);
}
public function getTileByIndex(_arg1:uint):uint{
return ((_data[_arg1] as uint));
}
protected function renderTilemap():void{
var _local5:uint;
var _local6:uint;
getScreenXY(_point);
_flashPoint.x = _point.x;
_flashPoint.y = _point.y;
var _local1:int = Math.floor((-(_flashPoint.x) / _tileWidth));
var _local2:int = Math.floor((-(_flashPoint.y) / _tileHeight));
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > (widthInTiles - _screenCols)){
_local1 = (widthInTiles - _screenCols);
};
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > (heightInTiles - _screenRows)){
_local2 = (heightInTiles - _screenRows);
};
var _local3:int = ((_local2 * widthInTiles) + _local1);
_flashPoint.x = (_flashPoint.x + (_local1 * _tileWidth));
_flashPoint.y = (_flashPoint.y + (_local2 * _tileHeight));
var _local4:int = _flashPoint.x;
var _local7:uint;
while (_local7 < _screenRows) {
_local6 = _local3;
_local5 = 0;
while (_local5 < _screenCols) {
var _temp1 = _local6;
_local6 = (_local6 + 1);
_flashRect = (_rects[_temp1] as Rectangle);
if (_flashRect != null){
FlxG.buffer.copyPixels(_pixels, _flashRect, _flashPoint, null, null, true);
};
_flashPoint.x = (_flashPoint.x + _tileWidth);
_local5++;
};
_local3 = (_local3 + widthInTiles);
_flashPoint.x = _local4;
_flashPoint.y = (_flashPoint.y + _tileHeight);
_local7++;
};
}
protected function autoTile(_arg1:uint):void{
if (_data[_arg1] == 0){
return;
};
_data[_arg1] = 0;
if (((((_arg1 - widthInTiles) < 0)) || ((_data[(_arg1 - widthInTiles)] > 0)))){
_data[_arg1] = (_data[_arg1] + 1);
};
if (((((_arg1 % widthInTiles) >= (widthInTiles - 1))) || ((_data[(_arg1 + 1)] > 0)))){
_data[_arg1] = (_data[_arg1] + 2);
};
if (((((_arg1 + widthInTiles) >= totalTiles)) || ((_data[(_arg1 + widthInTiles)] > 0)))){
_data[_arg1] = (_data[_arg1] + 4);
};
if (((((_arg1 % widthInTiles) <= 0)) || ((_data[(_arg1 - 1)] > 0)))){
_data[_arg1] = (_data[_arg1] + 8);
};
if ((((auto == ALT)) && ((_data[_arg1] == 15)))){
if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) - 1)] <= 0)))){
_data[_arg1] = 1;
};
if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) - 1)] <= 0)))){
_data[_arg1] = 2;
};
if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) + 1)] <= 0)))){
_data[_arg1] = 4;
};
if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) + 1)] <= 0)))){
_data[_arg1] = 8;
};
};
_data[_arg1] = (_data[_arg1] + 1);
}
public static function arrayToCSV(_arg1:Array, _arg2:int):String{
var _local3:uint;
var _local4:uint;
var _local5:String;
var _local6:int = (_arg1.length / _arg2);
_local3 = 0;
while (_local3 < _local6) {
_local4 = 0;
while (_local4 < _arg2) {
if (_local4 == 0){
if (_local3 == 0){
_local5 = (_local5 + _arg1[0]);
} else {
_local5 = (_local5 + ("\n" + _arg1[(_local3 * _arg2)]));
};
} else {
_local5 = (_local5 + (", " + _arg1[((_local3 * _arg2) + _local4)]));
};
_local4++;
};
_local3++;
};
return (_local5);
}
public static function pngToCSV(_arg1:Class, _arg2:Boolean=false, _arg3:uint=1):String{
var _local4:Bitmap;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:String;
var _local12:Bitmap;
var _local13:Matrix;
if (_arg3 <= 1){
_local4 = new (_arg1);
} else {
_local12 = new (_arg1);
_local4 = new Bitmap(new BitmapData((_local12.width * _arg3), (_local12.height * _arg3)));
_local13 = new Matrix();
_local13.scale(_arg3, _arg3);
_local4.bitmapData.draw(_local12, _local13);
};
var _local5:BitmapData = _local4.bitmapData;
var _local10:uint = _local4.width;
var _local11:uint = _local4.height;
_local6 = 0;
while (_local6 < _local11) {
_local7 = 0;
while (_local7 < _local10) {
_local8 = _local5.getPixel(_local7, _local6);
if (((((_arg2) && ((_local8 > 0)))) || (((!(_arg2)) && ((_local8 == 0)))))){
_local8 = 1;
} else {
_local8 = 0;
};
if (_local7 == 0){
if (_local6 == 0){
_local9 = (_local9 + _local8);
} else {
_local9 = (_local9 + ("\n" + _local8));
};
} else {
_local9 = (_local9 + (", " + _local8));
};
_local7++;
};
_local6++;
};
return (_local9);
}
}
}//package org.flixel
Section 113
//FlxTilemap_ImgAuto (org.flixel.FlxTilemap_ImgAuto)
package org.flixel {
import mx.core.*;
public class FlxTilemap_ImgAuto extends BitmapAsset {
}
}//package org.flixel
Section 114
//FlxTilemap_ImgAutoAlt (org.flixel.FlxTilemap_ImgAutoAlt)
package org.flixel {
import mx.core.*;
public class FlxTilemap_ImgAutoAlt extends BitmapAsset {
}
}//package org.flixel
Section 115
//FlxU (org.flixel.FlxU)
package org.flixel {
import flash.net.*;
import flash.utils.*;
public class FlxU {
protected static var _originalSeed:Number;
public static var quadTree:FlxQuadTree;
protected static var _seed:Number;
static var roundingError:Number = 1E-7;
public static var quadTreeBounds:FlxRect;
public static var quadTreeDivisions:uint = 3;
public static function random(_arg1:Boolean=true):Number{
var _local2:Number;
if (((_arg1) && (!(isNaN(_seed))))){
_local2 = randomize(_seed);
_seed = mutate(_seed, _local2);
return (_local2);
};
return (Math.random());
}
public static function mutate(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 + _arg2);
if (_arg1 > 1){
_arg1 = (_arg1 - int(_arg1));
};
return (_arg1);
}
public static function overlap(_arg1:FlxObject, _arg2:FlxObject, _arg3:Function=null):Boolean{
if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){
return (false);
};
quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height);
quadTree.add(_arg1, FlxQuadTree.A_LIST);
if (_arg1 === _arg2){
return (quadTree.overlap(false, _arg3));
};
quadTree.add(_arg2, FlxQuadTree.B_LIST);
return (quadTree.overlap(true, _arg3));
}
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1), "_blank");
}
public static function endProfile(_arg1:uint, _arg2:String="Profiler", _arg3:Boolean=true):uint{
var _local4:uint = getTimer();
if (_arg3){
FlxG.log((((_arg2 + ": ") + ((_local4 - _arg1) / 1000)) + "s"));
};
return (_local4);
}
public static function getClass(_arg1:String):Class{
return ((getDefinitionByName(_arg1) as Class));
}
public static function floor(_arg1:Number):Number{
var _local2:Number = int(_arg1);
return (((_arg1)>0) ? _local2 : ((_local2)!=_arg1) ? (_local2 - 1) : _local2);
}
public static function get_direction(_arg1:Number, _arg2:Number):Number{
while ((_arg1 - _arg2) < -180) {
_arg1 = (_arg1 + 360);
};
while ((_arg1 - _arg2) > 180) {
_arg1 = (_arg1 - 360);
};
_arg1 = (_arg1 - _arg2);
return (_arg1);
}
public static function solveYCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{
var _local5:Number;
var _local7:Boolean;
var _local14:uint;
var _local15:uint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local3:Number = _arg1.colVector.y;
var _local4:Number = _arg2.colVector.y;
if (_local3 == _local4){
return (false);
};
_arg1.preCollide(_arg2);
_arg2.preCollide(_arg1);
var _local6:Boolean;
var _local8 = (_local3 == 0);
var _local9 = (_local3 < 0);
var _local10 = (_local3 > 0);
var _local11 = (_local4 == 0);
var _local12 = (_local4 < 0);
var _local13 = (_local4 > 0);
var _local16:FlxRect = _arg1.colHullY;
var _local17:FlxRect = _arg2.colHullY;
var _local18:Array = _arg1.colOffsets;
var _local19:Array = _arg2.colOffsets;
var _local20:uint = _local18.length;
var _local21:uint = _local19.length;
_local7 = ((((((((((_local8) && (_local12))) || (((_local10) && (_local11))))) || (((_local10) && (_local12))))) || (((((_local9) && (_local12))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local10) && (_local13))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4))))));
if ((_local7) ? ((!(_arg1.collideBottom)) || (!(_arg2.collideTop))) : ((!(_arg1.collideTop)) || (!(_arg2.collideBottom)))){
return (false);
};
_local14 = 0;
while (_local14 < _local20) {
_local22 = _local18[_local14].x;
_local23 = _local18[_local14].y;
_local16.x = (_local16.x + _local22);
_local16.y = (_local16.y + _local23);
_local15 = 0;
while (_local15 < _local21) {
_local24 = _local19[_local15].x;
_local25 = _local19[_local15].y;
_local17.x = (_local17.x + _local24);
_local17.y = (_local17.y + _local25);
if (((((((((_local16.x + _local16.width) < (_local17.x + roundingError))) || (((_local16.x + roundingError) > (_local17.x + _local17.width))))) || (((_local16.y + _local16.height) < (_local17.y + roundingError))))) || (((_local16.y + roundingError) > (_local17.y + _local17.height))))){
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
} else {
if (_local7){
if (_local9){
_local26 = (_local16.y + _arg1.colHullX.height);
} else {
_local26 = (_local16.y + _local16.height);
};
if (_local12){
_local27 = _local17.y;
} else {
_local27 = ((_local17.y + _local17.height) - _arg2.colHullX.height);
};
} else {
if (_local12){
_local26 = (-(_local17.y) - _arg2.colHullX.height);
} else {
_local26 = (-(_local17.y) - _local17.height);
};
if (_local9){
_local27 = -(_local16.y);
} else {
_local27 = ((-(_local16.y) - _local16.height) + _arg1.colHullX.height);
};
};
_local5 = (_local26 - _local27);
if ((((((_local5 == 0)) || (((!(_arg1.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local16.height * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local17.height * 0.8))))))){
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
} else {
_local6 = true;
_local28 = _arg2.velocity.y;
_local29 = _arg1.velocity.y;
if (((!(_arg1.fixed)) && (_arg2.fixed))){
if (_arg1._group){
_arg1.reset(_arg1.x, (_arg1.y - _local5));
} else {
_arg1.y = (_arg1.y - _local5);
};
} else {
if (((_arg1.fixed) && (!(_arg2.fixed)))){
if (_arg2._group){
_arg2.reset(_arg2.x, (_arg2.y + _local5));
} else {
_arg2.y = (_arg2.y + _local5);
};
} else {
if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){
_local5 = (_local5 / 2);
if (_arg1._group){
_arg1.reset(_arg1.x, (_arg1.y - _local5));
} else {
_arg1.y = (_arg1.y - _local5);
};
if (_arg2._group){
_arg2.reset(_arg2.x, (_arg2.y + _local5));
} else {
_arg2.y = (_arg2.y + _local5);
};
_local28 = (_local28 / 2);
_local29 = (_local29 / 2);
};
};
};
if (_local7){
_arg1.hitBottom(_arg2, _local28);
_arg2.hitTop(_arg1, _local29);
} else {
_arg1.hitTop(_arg2, _local28);
_arg2.hitBottom(_arg1, _local29);
};
if (((!(_arg1.fixed)) && (!((_local5 == 0))))){
if (_local7){
_local16.y = (_local16.y - _local5);
if (((_arg2.fixed) && (_arg2.moves))){
_local28 = _arg2.colVector.x;
_arg1.x = (_arg1.x + _local28);
_local16.x = (_local16.x + _local28);
_arg1.colHullX.x = (_arg1.colHullX.x + _local28);
};
} else {
_local16.y = (_local16.y - _local5);
_local16.height = (_local16.height + _local5);
};
};
if (((!(_arg2.fixed)) && (!((_local5 == 0))))){
if (_local7){
_local17.y = (_local17.y + _local5);
_local17.height = (_local17.height - _local5);
} else {
_local17.height = (_local17.height + _local5);
if (((_arg1.fixed) && (_arg1.moves))){
_local29 = _arg1.colVector.x;
_arg2.x = (_arg2.x + _local29);
_local17.x = (_local17.x + _local29);
_arg2.colHullX.x = (_arg2.colHullX.x + _local29);
};
};
};
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
};
};
_local15++;
};
_local16.x = (_local16.x - _local22);
_local16.y = (_local16.y - _local23);
_local14++;
};
return (_local6);
}
public static function ceil(_arg1:Number):Number{
var _local2:Number = int(_arg1);
return (((_arg1)>0) ? ((_local2)!=_arg1) ? (_local2 + 1) : _local2 : _local2);
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
public static function setWorldBounds(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:uint=3):void{
if ((((((((_arg1 == 0)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){
_arg1 = (-128 * FlxG.width);
_arg2 = (-128 * FlxG.height);
_arg3 = (0x0100 * FlxG.width);
_arg4 = (0x0100 * FlxG.height);
};
if (quadTreeBounds == null){
quadTreeBounds = new FlxRect();
};
quadTreeBounds.x = _arg1;
quadTreeBounds.y = _arg2;
if (_arg3 != 0){
quadTreeBounds.width = _arg3;
};
if (_arg4 != 0){
quadTreeBounds.height = _arg4;
};
if (_arg5 > 0){
quadTreeDivisions = _arg5;
};
}
public static function startProfile():uint{
return (getTimer());
}
public static function set seed(_arg1:Number):void{
_seed = _arg1;
_originalSeed = _seed;
}
public static function getClassName(_arg1:Object, _arg2:Boolean=false):String{
var _local3:String = getQualifiedClassName(_arg1);
_local3 = _local3.replace("::", ".");
if (_arg2){
_local3 = _local3.substr((_local3.lastIndexOf(".") + 1));
};
return (_local3);
}
public static function randomize(_arg1:Number):Number{
return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647));
}
public static function abs(_arg1:Number):Number{
return (((_arg1)>0) ? _arg1 : -(_arg1));
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:FlxPoint=null):FlxPoint{
if (_arg6 == null){
_arg6 = new FlxPoint();
};
var _local7:Number = ((-(_arg5) / 180) * Math.PI);
var _local8:Number = (_arg1 - _arg3);
var _local9:Number = (_arg4 - _arg2);
_arg6.x = ((_arg3 + (Math.cos(_local7) * _local8)) - (Math.sin(_local7) * _local9));
_arg6.y = (_arg4 - ((Math.sin(_local7) * _local8) + (Math.cos(_local7) * _local9)));
return (_arg6);
}
public static function get seed():Number{
return (_originalSeed);
}
public static function solveXCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{
var _local5:Boolean;
var _local6:Boolean;
var _local7:Number;
var _local9:Boolean;
var _local16:uint;
var _local17:uint;
var _local18:FlxRect;
var _local19:FlxRect;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local3:Number = _arg1.colVector.x;
var _local4:Number = _arg2.colVector.x;
if (_local3 == _local4){
return (false);
};
_arg1.preCollide(_arg2);
_arg2.preCollide(_arg1);
var _local8:Boolean;
var _local10 = (_local3 == 0);
var _local11 = (_local3 < 0);
var _local12 = (_local3 > 0);
var _local13 = (_local4 == 0);
var _local14 = (_local4 < 0);
var _local15 = (_local4 > 0);
_local18 = _arg1.colHullX;
_local19 = _arg2.colHullX;
var _local20:Array = _arg1.colOffsets;
var _local21:Array = _arg2.colOffsets;
var _local22:uint = _local20.length;
var _local23:uint = _local21.length;
_local9 = ((((((((((_local10) && (_local14))) || (((_local12) && (_local13))))) || (((_local12) && (_local14))))) || (((((_local11) && (_local14))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local12) && (_local15))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4))))));
if ((_local9) ? ((!(_arg1.collideRight)) || (!(_arg2.collideLeft))) : ((!(_arg1.collideLeft)) || (!(_arg2.collideRight)))){
return (false);
};
_local16 = 0;
while (_local16 < _local22) {
_local24 = _local20[_local16].x;
_local25 = _local20[_local16].y;
_local18.x = (_local18.x + _local24);
_local18.y = (_local18.y + _local25);
_local17 = 0;
while (_local17 < _local23) {
_local26 = _local21[_local17].x;
_local27 = _local21[_local17].y;
_local19.x = (_local19.x + _local26);
_local19.y = (_local19.y + _local27);
if (((((((((_local18.x + _local18.width) < (_local19.x + roundingError))) || (((_local18.x + roundingError) > (_local19.x + _local19.width))))) || (((_local18.y + _local18.height) < (_local19.y + roundingError))))) || (((_local18.y + roundingError) > (_local19.y + _local19.height))))){
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
} else {
if (_local9){
if (_local11){
_local28 = (_local18.x + _arg1.colHullY.width);
} else {
_local28 = (_local18.x + _local18.width);
};
if (_local14){
_local29 = _local19.x;
} else {
_local29 = ((_local19.x + _local19.width) - _arg2.colHullY.width);
};
} else {
if (_local14){
_local28 = (-(_local19.x) - _arg2.colHullY.width);
} else {
_local28 = (-(_local19.x) - _local19.width);
};
if (_local11){
_local29 = -(_local18.x);
} else {
_local29 = ((-(_local18.x) - _local18.width) + _arg1.colHullY.width);
};
};
_local7 = (_local28 - _local29);
if ((((((_local7 == 0)) || (((!(_arg1.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local18.width * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local19.width * 0.8))))))){
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
} else {
_local8 = true;
_local30 = _arg2.velocity.x;
_local31 = _arg1.velocity.x;
if (((!(_arg1.fixed)) && (_arg2.fixed))){
if (_arg1._group){
_arg1.reset((_arg1.x - _local7), _arg1.y);
} else {
_arg1.x = (_arg1.x - _local7);
};
} else {
if (((_arg1.fixed) && (!(_arg2.fixed)))){
if (_arg2._group){
_arg2.reset((_arg2.x + _local7), _arg2.y);
} else {
_arg2.x = (_arg2.x + _local7);
};
} else {
if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){
_local7 = (_local7 / 2);
if (_arg1._group){
_arg1.reset((_arg1.x - _local7), _arg1.y);
} else {
_arg1.x = (_arg1.x - _local7);
};
if (_arg2._group){
_arg2.reset((_arg2.x + _local7), _arg2.y);
} else {
_arg2.x = (_arg2.x + _local7);
};
_local30 = (_local30 / 2);
_local31 = (_local31 / 2);
};
};
};
if (_local9){
_arg1.hitRight(_arg2, _local30);
_arg2.hitLeft(_arg1, _local31);
} else {
_arg1.hitLeft(_arg2, _local30);
_arg2.hitRight(_arg1, _local31);
};
if (((!(_arg1.fixed)) && (!((_local7 == 0))))){
if (_local9){
_local18.width = (_local18.width - _local7);
} else {
_local18.x = (_local18.x - _local7);
_local18.width = (_local18.width + _local7);
};
_arg1.colHullY.x = (_arg1.colHullY.x - _local7);
};
if (((!(_arg2.fixed)) && (!((_local7 == 0))))){
if (_local9){
_local19.x = (_local19.x + _local7);
_local19.width = (_local19.width - _local7);
} else {
_local19.width = (_local19.width + _local7);
};
_arg2.colHullY.x = (_arg2.colHullY.x + _local7);
};
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
};
};
_local17++;
};
_local18.x = (_local18.x - _local24);
_local18.y = (_local18.y - _local25);
_local16++;
};
return (_local8);
}
public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{
_arg1 = (_arg1 + (_arg2 * FlxG.elapsed));
var _local5:Number = (_arg3 * FlxG.elapsed);
if ((_arg1 - _local5) > 0){
_arg1 = (_arg1 - _local5);
} else {
if ((_arg1 + _local5) < 0){
_arg1 = (_arg1 + _local5);
};
};
if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){
if (_arg1 > _arg4){
_arg1 = _arg4;
} else {
if (_arg1 < -(_arg4)){
_arg1 = -(_arg4);
};
};
};
return (_arg1);
}
public static function collide(_arg1:FlxObject, _arg2:FlxObject):Boolean{
if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){
return (false);
};
quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height);
quadTree.add(_arg1, FlxQuadTree.A_LIST);
var _local3 = (_arg1 === _arg2);
if (!_local3){
quadTree.add(_arg2, FlxQuadTree.B_LIST);
};
var _local4:Boolean = quadTree.overlap(!(_local3), solveXCollision);
var _local5:Boolean = quadTree.overlap(!(_local3), solveYCollision);
return (((_local4) || (_local5)));
}
}
}//package org.flixel
Section 116
//bot (org.mecha.bot)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
public class bot extends FlxSprite {
private var SndLaser:Class;
private var turn_speed:int;
public var die:int;// = 0
public var spc_ctr:Number;// = 0
private var respawnable:Boolean;
private var pid:Player;
private var ray_ctr:int;
private var flipper:int;// = 1
private var target:FlxSprite;
public var score:FlxText;
private var SndMissile:Class;
private var loose:Number;// = 0
private var SndZap:Class;
private var weapon:int;
private var last:Point;
private var SndCannon:Class;
private var _explode:FlxEmitter;
private var tipe:int;
public var score_win:int;// = 0
private var lattach:FlxSprite;
private var path:Array;
private var SndGun:Class;
private var rattach:FlxSprite;
private var timer:Number;// = 0
private var disruptedfx:FlxSprite;
public var _parent:PlayState;
private var numbedfx:FlxSprite;
public var order:int;
private var skill:int;// = 0
private var move_priority:int;// = -1
public var kills:int;// = 0
private var SndExplode:Class;
public var botname:String;
private var score_die:int;// = 0
private var bullet_array:FlxGroup;
private var team_mode:Boolean;// = true
private var maxHealth:int;
private var bot_array:FlxGroup;
private var r2f:Number;// = 0
private var redbar:FlxSprite;
public var score_kill:int;// = 0
private var spc_charge:Number;// = 0
private var stillblocked:Number;// = 0
private var swave:FlxSprite;
private var speed:Number;
private var _wpn:FlxSprite;
private var spawn:Point;
public function bot(_arg1:Number, _arg2:Number, _arg3:PlayState, _arg4:int, _arg5:int){
SndMissile = bot_SndMissile;
SndLaser = bot_SndLaser;
SndCannon = bot_SndCannon;
SndGun = bot_SndGun;
SndZap = bot_SndZap;
SndExplode = bot_SndExplode;
lattach = new FlxSprite(320, 240);
rattach = new FlxSprite(320, 240);
spawn = new Point();
score = new FlxText(0, 0, 70, "0");
swave = new FlxSprite();
numbedfx = new FlxSprite();
disruptedfx = new FlxSprite();
last = new Point();
redbar = new FlxSprite(5, 40);
super();
id = _arg5;
tipe = (_arg4 % 100);
skill = (_arg4 / 100);
fixed = false;
if (_arg3.mode == -1){
team_mode = false;
respawnable = false;
fixed = true;
};
if (_arg3.mode == 1){
team_mode = false;
respawnable = false;
};
if (_arg3.mode == 2){
team_mode = false;
respawnable = true;
};
if (_arg3.mode == 3){
team_mode = true;
respawnable = false;
};
if (_arg3.mode == 4){
team_mode = true;
respawnable = true;
};
swave.loadGraphic(_arg3.Imgswave);
swave.exists = false;
numbedfx.loadGraphic(_arg3.ImgNumbed);
numbedfx.exists = false;
disruptedfx.loadGraphic(_arg3.ImgDisrupted);
disruptedfx.exists = false;
loadGraphic(_arg3.ImgPlayer, true, false, 32, 32);
addAnimation("red", [0]);
addAnimation("white", [1]);
addAnimation("cyclone", [2]);
addAnimation("sting", [3]);
addAnimation("arm", [4]);
addAnimation("shell", [5]);
addAnimation("reaper", [6]);
addAnimation("drone", [8]);
_wpn = new FlxSprite(320, 240);
_wpn.loadGraphic(_arg3.ImgWpn, true, false, 32, 32);
_wpn.addAnimation("gatling", [0]);
_wpn.addAnimation("dual", [1]);
_wpn.addAnimation("beam", [2]);
_wpn.addAnimation("rocket", [3]);
_wpn.addAnimation("cannon", [4]);
_wpn.addAnimation("bigcannon", [5]);
_wpn.addAnimation("ion", [6]);
_wpn.addAnimation("disruptor", [7]);
order = (Math.random() * 3);
pid = _arg3.pid;
_parent = _arg3;
bot_array = _arg3.bot_array;
bullet_array = _arg3.bullet_array;
_explode = new FlxEmitter(x, y);
_explode.createSprites(_arg3.ImgExplode, 20, 8);
_explode.gravity = 0;
_explode.delay = 1;
_arg3.add(_explode);
if (_arg3.training){
tipe = -1;
};
lattach.loadGraphic(_arg3.ImgAttach, false, true, 32, 32);
rattach.loadGraphic(_arg3.ImgAttach, false, true, 32, 32);
lattach.addAnimation("burner", [0]);
rattach.addAnimation("burner", [0]);
lattach.addAnimation("wing", [1]);
rattach.addAnimation("wing", [1]);
lattach.addAnimation("cyclone", [8]);
rattach.addAnimation("cyclone", [2]);
lattach.addAnimation("sting", [3]);
rattach.addAnimation("sting", [3]);
lattach.addAnimation("arm", [4]);
rattach.addAnimation("arm", [4]);
lattach.addAnimation("shell", [5]);
rattach.addAnimation("shell", [5]);
lattach.addAnimation("scythe", [6]);
rattach.addAnimation("scythe", [6]);
if (tipe == -1){
play("drone");
_arg3.add(lattach);
_arg3.add(rattach);
lattach.exists = (rattach.exists = false);
_arg3.bot_array.add(_arg3.add(this));
_wpn.exists = false;
weapon = 1;
if (id < 4){
weapon = -1;
};
_arg3.add(_wpn);
scale.x = (scale.y = 1);
maxThrust = 0;
turn_speed = 100;
maxHealth = 10;
};
if (tipe == 1){
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(_wpn);
scale.x = (scale.y = 1.5);
maxThrust = 100;
drag.x = (drag.y = 250);
lattach.play("burner");
rattach.play("burner");
turn_speed = 100;
maxHealth = 40;
};
if (tipe == 2){
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(_wpn);
maxThrust = 200;
drag.x = (drag.y = 250);
play("white");
lattach.play("wing");
rattach.play("wing");
lattach.scale.x = -1;
turn_speed = 250;
maxHealth = 25;
rattach.origin.x = 0;
rattach.origin.y = rattach.frameHeight;
lattach.origin.x = 0;
lattach.origin.y = lattach.frameHeight;
};
if (tipe == 3){
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(_wpn);
maxHealth = 20;
maxThrust = 200;
drag.x = (drag.y = 250);
play("cyclone");
rattach.play("cyclone");
lattach.play("cyclone");
lattach.exists = false;
lattach.visible = false;
turn_speed = 300;
};
if (tipe == 4){
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(_wpn);
maxHealth = 25;
maxThrust = 150;
drag.x = (drag.y = 350);
play("sting");
rattach.play("sting");
lattach.play("sting");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
};
if (tipe == 5){
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.add(_wpn);
maxHealth = 20;
maxThrust = 280;
drag.x = (drag.y = 350);
play("arm");
rattach.play("arm");
lattach.play("arm");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 160;
lattach.scale.x = -1;
rattach.origin.x = 0;
rattach.origin.y = rattach.frameHeight;
lattach.origin.x = 0;
lattach.origin.y = lattach.frameHeight;
};
if (tipe == 6){
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.add(_wpn);
maxHealth = 30;
maxThrust = 180;
drag.x = (drag.y = 350);
play("shell");
rattach.play("shell");
lattach.play("shell");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
lattach.scale.y = -1;
lattach.scale.y = -1;
};
if (tipe == 7){
_arg3.bot_array.add(_arg3.add(this));
_arg3.add(lattach);
_arg3.add(rattach);
_arg3.add(_wpn);
maxHealth = 25;
maxThrust = 250;
drag.x = (drag.y = 350);
play("reaper");
rattach.play("scythe");
lattach.play("scythe");
rattach.scale.y = -1;
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
rattach.scrollFactor.x = (rattach.scrollFactor.y = 1);
lattach.scrollFactor.x = (lattach.scrollFactor.y = 1);
rattach.origin.y = 0;
rattach.origin.x = rattach.frameHeight;
lattach.origin.y = 0;
lattach.origin.x = lattach.frameHeight;
};
if ((((((team_mode == true)) && ((id == 3)))) && ((pid.tipe == 7)))){
pixels.colorTransform(pixels.rect, new ColorTransform(1, 0.5, 0.5));
lattach.pixels.colorTransform(pixels.rect, new ColorTransform(1, 0.5, 0.5));
};
_arg3.add(swave);
_arg3.add(numbedfx);
_arg3.add(disruptedfx);
maxHealth = (10 + ((maxHealth * skill) / 10));
health = maxHealth;
r2f = Math.random();
x = (spawn.x = _arg1);
y = (spawn.y = _arg2);
FlxU.randomize(2);
timer = FlxU.random();
if (team_mode == true){
weapon = ((Math.random() * 8) + 1);
} else {
weapon = ((Math.random() * 6) + 1);
};
if (weapon == 1){
_wpn.play("gatling");
};
if (weapon == 2){
_wpn.play("dual");
};
if (weapon == 3){
_wpn.play("beam");
};
if (weapon == 4){
_wpn.play("rocket");
};
if (weapon == 5){
_wpn.play("cannon");
};
if (weapon == 6){
_wpn.play("bigcannon");
};
if (weapon == 7){
_wpn.play("ion");
};
if (weapon == 8){
_wpn.play("disruptor");
};
redbar.createGraphic(70, 20, 2164195328);
redbar.scrollFactor.x = (redbar.scrollFactor.y = 0);
redbar.exists = false;
_arg3.add(redbar);
last.x = x;
last.y = y;
if (_arg3.training){
_wpn.exists = (lattach.exists = (rattach.exists = false));
};
FlxG.log(((((id.toString() + ":") + skill.toString()) + ":") + maxHealth.toString()));
}
public function respawn():void{
redbar.exists = false;
y = spawn.y;
x = spawn.x;
last.x = x;
last.y = y;
rattach.x = (lattach.x = x);
rattach.y = (lattach.y = y);
health = maxHealth;
dead = false;
visible = true;
exists = true;
numbed = 0;
disrupted = 0;
_wpn.exists = (rattach.exists = (lattach.exists = true));
_wpn.visible = (rattach.visible = (lattach.visible = true));
if (tipe == 3){
lattach.exists = false;
};
flicker(3);
super.update();
}
private function shoot(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int):void{
var _local5:bullet;
_local5 = (bullet_array.getFirstAvail() as bullet);
if (_local5 != null){
_local5.shoot(_arg1, _arg2, _arg3, _arg4, id);
};
}
override public function hurt(_arg1:Number):void{
health = (health - _arg1);
target = bot_array.members[hit_id];
if (health <= 0){
kill();
};
}
override public function update():void{
var _local7:int;
var _local8:int;
var _local9:Boolean;
var _local10:Boolean;
var _local11:int;
var _local12:FlxPoint;
var _local13:int;
var _local14:Number;
var _local15:int;
var _local16:Number;
var _local17:FlxPoint;
var _local18:Number;
if (_parent == null){
bot_array = null;
bullet_array = null;
return;
};
if (_parent.training){
weapon = 3;
if ((((id < 4)) || ((exists == false)))){
r2f = 9999;
};
spc_charge = 0;
target = pid;
};
if (flickering()){
health = maxHealth;
};
lattach.antialiasing = (rattach.antialiasing = antialiasing);
var _local1:Number = FlxG.elapsed;
if (stillblocked <= 0){
stillblocked = 0;
timer = (timer + _local1);
};
var _local2:Boolean;
if ((((timer > 2)) || ((target == null)))){
if (!team_mode){
target = (bot_array.getRandom() as FlxSprite);
} else {
_local15 = (Math.random() * 4);
if (id < 4){
_local15 = (_local15 + 4);
};
target = (bot_array.members[_local15] as FlxSprite);
};
if ((((_parent.mode == 4)) && ((Math.random() < 0.5)))){
if (id >= 4){
if (_parent.redartifact.id < 0){
target = _parent.redartifact;
};
} else {
if (_parent.blueartifact.id < 0){
target = _parent.blueartifact;
};
};
};
if ((((target == this)) || (target.dead))){
target = null;
};
order = (Math.random() * 4);
timer = 0;
};
if (((((_parent.idctr % 8) == id)) && (!((target == null))))){
_local2 = _parent.playground.ray(x, y, target.x, target.y, null);
if (_local2 == true){
target = null;
} else {
stillblocked = 0;
};
};
var _local3:Point = new Point();
var _local4:FlxPoint = new FlxPoint();
var _local5:Number = 0;
if (_parent.mode == 4){
if (id < 4){
if (_parent.blueartifact.id == (id + 900)){
target = null;
};
} else {
if (_parent.redartifact.id == (id + 900)){
target = null;
};
};
};
if (target != null){
if (order <= 1){
_local3.x = (x - target.x);
_local3.y = (y - target.y);
} else {
if (order <= 2.5){
_local4 = FlxU.rotatePoint(loose, 0, 0, 0, (target.angle - 90));
_local3.x = ((x - target.x) + _local4.x);
_local3.y = ((y - target.y) + _local4.y);
} else {
if (order <= 4){
_local4 = FlxU.rotatePoint(loose, 0, 0, 0, (target.angle + 90));
_local3.x = ((x - target.x) + _local4.x);
_local3.y = ((y - target.y) + _local4.y);
};
};
};
if ((((((timer == 0)) && (!((target == _parent.redartifact))))) && (!((target == _parent.blueartifact))))){
if (Math.random() < 0.5){
_parent.chat.addchat(3, id);
} else {
_parent.chat.addchat(4, target.id);
};
};
loose = (loose - _local1);
_local5 = FlxU.getAngle(_local3.x, _local3.y);
} else {
_parent.chat.addchat(6, id);
loose = (1000 - (skill * 100));
_local7 = _parent.playground.widthInTiles;
_local8 = (((x + 16) / 32) + (_local7 * Math.floor(((y + 16) / 32))));
_local9 = false;
if (_parent.mode == 4){
if (id >= 4){
if (_parent.redartifact.id < 0){
_local9 = true;
} else {
_local9 = false;
};
} else {
if (_parent.blueartifact.id < 0){
_local9 = false;
} else {
_local9 = true;
};
};
};
if (stillblocked <= 0){
if (_local9 == true){
_local13 = _parent.path[_local8];
if (_parent.path[(_local8 - _local7)] > _local13){
_local5 = 90;
} else {
if (_parent.path[(_local8 - 1)] > _local13){
_local5 = 0;
} else {
if (_parent.path[(_local8 + _local7)] > _local13){
_local5 = 270;
} else {
if (_parent.path[(_local8 + 1)] > _local13){
_local5 = 180;
};
};
};
};
} else {
_local13 = _parent.path2[_local8];
if (_parent.path2[(_local8 - _local7)] > _local13){
_local5 = 90;
} else {
if (_parent.path2[(_local8 - 1)] > _local13){
_local5 = 0;
} else {
if (_parent.path2[(_local8 + _local7)] > _local13){
_local5 = 270;
} else {
if (_parent.path2[(_local8 + 1)] > _local13){
_local5 = 180;
};
};
};
};
};
};
_local10 = false;
_local11 = 0;
while (_local11 < 8) {
if (new Point((bot_array.members[_local11].x - x), (bot_array.members[_local11].y - y)).length < 250){
_local14 = FlxU.getAngle((bot_array.members[_local11].x - x), (bot_array.members[_local11].y - y));
if (FlxU.get_direction(_local14, angle) < 30){
_local10 = true;
thrust = 0;
break;
};
};
_local11++;
};
_local12 = new FlxPoint();
if ((((stillblocked <= 0)) && ((is_collide == true)))){
if (is_collide_top){
if (FlxU.get_direction(angle, 90) > 0){
stillblocked = (stillblocked + 30);
} else {
stillblocked = (stillblocked - 30);
};
} else {
if (is_collide_left){
stillblocked = (stillblocked - 90);
} else {
if (is_collide_bottom){
if (FlxU.get_direction(angle, 270) > 0){
stillblocked = (stillblocked + 30);
} else {
stillblocked = (stillblocked - 30);
};
} else {
if (is_collide_right){
if (FlxU.get_direction(angle, 180) > 0){
stillblocked = (stillblocked + 30);
} else {
stillblocked = (stillblocked - 30);
};
stillblocked = (stillblocked - 90);
};
};
};
};
stillblocked = (stillblocked * (1 + Math.random()));
move_priority = 1;
if (stillblocked < 0){
stillblocked = (stillblocked * -1);
move_priority = -1;
};
};
};
if (stillblocked <= 0){
if (FlxU.get_direction(angle, _local5) > 5){
angularVelocity = -(turn_speed);
};
if (FlxU.get_direction(angle, _local5) < -5){
angularVelocity = turn_speed;
};
if (Math.abs(FlxU.get_direction(angle, _local5)) < 15){
angle = _local5;
if (target != null){
_local2 = false;
};
};
} else {
angularVelocity = (turn_speed * move_priority);
stillblocked = (stillblocked - (turn_speed * _local1));
};
if ((((_local3.length > 150)) || ((target == null)))){
speed = maxThrust;
if (target != null){
if ((((target.id >= 0)) && ((target.id < 900)))){
speed = (_local3.length * 2);
if (speed > maxThrust){
speed = maxThrust;
};
};
};
} else {
speed = (maxThrust / 2);
_local5 = (_local5 + 180);
};
if (stillblocked > 0){
speed = (maxThrust / 4);
};
thrust = speed;
var _local6:FlxPoint = new FlxPoint();
if (((((((!((_local2 == true))) || ((((spc_charge > 3)) && ((spc_charge < 5)))))) || (FlxG.keys.C))) || ((target == null)))){
spc_charge = (spc_charge + _local1);
if (spc_charge > 5){
spc_charge = 5;
};
if (spc_charge > 3){
thrust = (thrust / 2);
};
} else {
if (_parent.spc_ready == true){
if (spc_charge >= 5){
_parent.spc_req = true;
_parent.spc_ready = false;
spc_ctr = 1;
};
spc_charge = 0;
};
};
if ((((((((((((r2f <= 0)) && ((_local2 == false)))) && ((disrupted <= 0)))) && ((spc_charge <= 3)))) && ((spc_ctr <= 0)))) && ((Math.abs(FlxU.get_direction(angle, _local5)) < 30)))){
if (weapon == 1){
r2f = 1;
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), ((angle + (Math.random() * 10)) - 5), 1);
if (onScreen()){
FlxG.play(SndGun, 0.8);
};
};
if (weapon == 2){
r2f = 5;
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 2);
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 2);
if (onScreen()){
FlxG.play(SndLaser);
};
};
if (weapon == 3){
r2f = 10;
_local15 = 0;
while (_local15 < 5) {
_local6 = FlxU.rotatePoint((-16 * _local15), -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 3);
_local15 = (_local15 + 2);
};
if (onScreen()){
FlxG.play(SndLaser);
};
};
if (weapon == 4){
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 4);
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 4);
r2f = 20;
if (onScreen()){
FlxG.play(SndMissile);
};
};
if (weapon == 5){
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), ((angle + (Math.random() * 10)) - 5), 5);
if (onScreen()){
FlxG.play(SndGun);
};
r2f = 5;
};
if (weapon == 6){
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), ((angle + (Math.random() * 10)) - 5), 9);
if (onScreen()){
FlxG.play(SndCannon);
};
r2f = 25;
};
if (weapon == 7){
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 10);
FlxG.play(SndZap);
r2f = 8;
};
if (weapon == 8){
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), angle, 11);
FlxG.play(SndZap);
r2f = 8;
};
};
if (tipe == 1){
if (angularVelocity == 0){
rattach.scale.x = (rattach.scale.y = (speed / 150));
lattach.scale.x = (lattach.scale.y = (speed / 150));
_local6 = FlxU.rotatePoint(16, (8 + (24 * rattach.scale.x)), 0, 0, (angle - 90));
rattach.scale.y = (rattach.scale.y * flipper);
rattach.x = (x + _local6.x);
rattach.y = (y + _local6.y);
rattach.angle = angle;
_local6 = FlxU.rotatePoint(16, -((8 + (24 * rattach.scale.x))), 0, 0, (angle + 90));
lattach.scale.y = (lattach.scale.y * flipper);
lattach.x = (x + _local6.x);
lattach.y = (y + _local6.y);
lattach.angle = angle;
} else {
lattach.scale.x = (lattach.scale.y = 0);
rattach.scale.y = (rattach.scale.y * flipper);
rattach.scale.x = 0.5;
if (angularVelocity < 0){
_local6 = FlxU.rotatePoint(-16, -32, 0, 0, angle);
rattach.x = (x + _local6.x);
rattach.y = (y + _local6.y);
rattach.angle = (angle - 90);
} else {
_local6 = FlxU.rotatePoint(-16, 32, 0, 0, angle);
rattach.x = (x + _local6.x);
rattach.y = (y + _local6.y);
rattach.angle = (angle + 90);
};
};
if (spc_ctr > 0){
spc_ctr = (spc_ctr - _local1);
if (r2f <= 0){
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), (angle + (spc_ctr * 10)), 4);
_local6 = FlxU.rotatePoint(-8, 0, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), (angle - (spc_ctr * 10)), 4);
FlxG.play(SndMissile);
r2f = 2.5;
};
};
};
if ((((tipe == 2)) || ((tipe == 5)))){
_local3.x = velocity.x;
_local3.y = velocity.y;
_local16 = ((_local3.length * 0.25) - 30);
if (_local16 > 30){
_local16 = 30;
};
rattach.angle = ((angle + _local16) - 0);
lattach.angle = ((angle - _local16) - 180);
if (spc_ctr > 0){
velocity.x = (velocity.x * 0.25);
velocity.y = (velocity.y * 0.25);
angularVelocity = (angularVelocity * 0.25);
spc_ctr = (spc_ctr - _local1);
if (tipe == 5){
if (spc_ctr > 0.8){
rattach.angle = ((angle - 135) + ((spc_ctr - 0.8) * 675));
lattach.angle = (((angle + 135) - ((spc_ctr - 0.8) * 675)) - 180);
};
if (spc_ctr < 0.2){
rattach.angle = ((angle - 135) + ((0.2 - spc_ctr) * 675));
lattach.angle = (((angle + 135) - ((0.2 - spc_ctr) * 675)) - 180);
_parent.laser.exists = false;
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
spc_ctr = (spc_ctr + (_local1 * 0.75));
_parent.laser.exists = true;
_local17 = new FlxPoint();
_local17 = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
if (_parent.playground.ray((x + 16), (y + 16), (x + _local17.x), (y + _local17.y), _local17)){
_local17.x = (_local17.x - (x + 16));
_local17.y = (_local17.y - (y + 16));
_parent.laser.scale.x = (new Point(_local17.x, _local17.y).length / 100);
} else {
_parent.laser.scale.x = 3;
};
rattach.angle = (angle - 135);
lattach.angle = ((angle + 135) - 180);
_local6 = FlxU.rotatePoint(-(((50 * _parent.laser.scale.x) + 20)), 0, 0, 0, angle);
_parent.laser.x = ((_local6.x + x) - 34);
_parent.laser.y = ((_local6.y + y) + 8);
_parent.laser.angle = angle;
_local15 = 0;
while (_local15 < 8) {
if (((!((_local15 == id))) && ((bot_array.members[_local15].dead == false)))){
_local17 = FlxU.rotatePoint((bot_array.members[_local15].x - x), (bot_array.members[_local15].y - y), 0, 0, -(angle));
if ((((((((_local17.y > -32)) && ((_local17.y < 32)))) && ((_local17.x < 0)))) && ((_local17.x > (-(_parent.laser.scale.x) * 100))))){
if ((((((((bot_array.members[_local15].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local15].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local15].hit_id = id;
bot_array.members[_local15].hurt((FlxG.elapsed * 100));
};
};
};
_local15++;
};
};
} else {
spc_ctr = (spc_ctr + (_local1 * 0.5));
if (spc_ctr > 0.8){
rattach.angle = ((angle - 90) + ((spc_ctr - 0.8) * 450));
lattach.angle = (((angle + 90) - ((spc_ctr - 0.8) * 450)) - 180);
};
if (spc_ctr < 0.2){
rattach.angle = ((angle - 90) + ((0.2 - spc_ctr) * 450));
lattach.angle = (((angle + 90) - ((0.2 - spc_ctr) * 450)) - 180);
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
rattach.angle = (angle - 90);
lattach.angle = ((angle + 90) - 180);
if (r2f <= 0){
_local6 = FlxU.rotatePoint(16, -16, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), ((angle + 45) + (spc_ctr * 30)), 6);
_local6 = FlxU.rotatePoint(16, 16, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local6.x), ((y + (height * 0.25)) + _local6.y), ((angle - 45) - (spc_ctr * 30)), 6);
FlxG.play(SndZap);
r2f = 2;
};
};
};
};
_local6 = FlxU.rotatePoint(-8, -8, 0, 0, angle);
rattach.x = ((x + _local6.x) + 16);
rattach.y = ((y + _local6.y) - 16);
_local6 = FlxU.rotatePoint(-8, 8, 0, 0, angle);
lattach.x = ((x + _local6.x) + 16);
lattach.y = ((y + _local6.y) - 16);
};
if (tipe == 3){
_local3.x = velocity.x;
_local3.y = velocity.y;
rattach.scale.x = (rattach.scale.y = 1.5);
rattach.x = x;
rattach.y = y;
rattach.angle = (rattach.angle + (_local1 * (300 + speed)));
if (spc_ctr > 0){
rattach.angle = (rattach.angle + (_local1 * 500));
spc_ctr = (spc_ctr - (_local1 * 0.2));
if (spc_ctr <= 0.25){
lattach.exists = (lattach.visible = (swave.exists = false));
};
if ((((spc_ctr > 0.25)) && ((spc_ctr < 0.75)))){
rattach.angle = (rattach.angle + (_local1 * 500));
lattach.angle = (rattach.angle * 0.5);
lattach.x = x;
lattach.y = y;
lattach.scale.x = (lattach.scale.y = 3);
lattach.exists = (lattach.visible = (swave.exists = true));
swave.scale.x = (swave.scale.x + (_local1 * 10));
if (swave.scale.x > 2){
swave.scale.x = 0;
};
swave.scale.y = swave.scale.x;
swave.x = (x - 32);
swave.y = (y - 32);
swave.alpha = (2 - swave.scale.x);
_local15 = 0;
while (_local15 < 8) {
if (((!((_local15 == id))) && ((bot_array.members[_local15].dead == false)))){
if (new Point((x - bot_array.members[_local15].x), (y - bot_array.members[_local15].y)).length < 100){
if ((((((((bot_array.members[_local15].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local15].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local15].hurt((_local1 * 50));
bot_array.members[_local15].hit_id = id;
};
};
};
_local15++;
};
};
};
};
if (tipe == 4){
_local3.x = (x - rattach.x);
_local3.y = (y - rattach.y);
if (_local3.length > 10){
rattach.velocity.x = (_local3.x * 10);
rattach.velocity.y = (_local3.y * 10);
} else {
rattach.velocity.x = (rattach.velocity.y = 0);
};
rattach.angle = FlxU.getAngle(-(_local3.x), -(_local3.y));
_local3.x = (rattach.x - lattach.x);
_local3.y = (rattach.y - lattach.y);
if (_local3.length > 10){
lattach.velocity.x = (_local3.x * 10);
lattach.velocity.y = (_local3.y * 10);
} else {
lattach.velocity.x = (lattach.velocity.y = 0);
};
lattach.angle = FlxU.getAngle(-(_local3.x), -(_local3.y));
if ((timer % 2) < 0.5){
speed = 0;
} else {
speed = (maxThrust * 2);
};
if (spc_ctr > 0){
_parent.chat.addchat(-1, id, "FREEZE!!!");
_local15 = 0;
while (_local15 < 360) {
_local6 = FlxU.rotatePoint(-32, 0, 0, 0, _local15);
shoot((x + _local6.x), (y + _local6.y), _local15, 8);
_local15 = (_local15 + 10);
};
spc_ctr = 0;
};
};
if (tipe == 6){
rattach.angle = angle;
lattach.angle = angle;
if (spc_ctr > 0){
velocity.x = (velocity.x * 0.25);
velocity.y = (velocity.y * 0.25);
angularVelocity = (angularVelocity * 0.25);
spc_ctr = (spc_ctr - (_local1 * 0.5));
if (spc_ctr > 0.8){
rattach.angle = (rattach.angle + (90 - ((spc_ctr - 0.8) * 450)));
lattach.angle = (lattach.angle - (90 - ((spc_ctr - 0.8) * 450)));
};
if (spc_ctr < 0.2){
rattach.angle = (rattach.angle + (90 - ((0.2 - spc_ctr) * 450)));
lattach.angle = (lattach.angle - (90 - ((0.2 - spc_ctr) * 450)));
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
rattach.angle = (rattach.angle + 90);
lattach.angle = (lattach.angle - 90);
if (r2f <= 0){
_local6 = FlxU.rotatePoint(((Math.random() * 8) - 4), -8, 0, 0, (angle - 90));
shoot((x + _local6.x), (y + _local6.y), ((angle + (Math.random() * 30)) - 15), 7);
FlxG.play(SndZap);
r2f = 1;
};
};
};
_local6 = FlxU.rotatePoint(16, -16, 0, 0, (rattach.angle - 90));
rattach.x = (x + _local6.x);
rattach.y = (y + _local6.y);
_local6 = FlxU.rotatePoint(16, 16, 0, 0, (lattach.angle + 90));
lattach.x = (x + _local6.x);
lattach.y = (y + _local6.y);
};
if (tipe == 7){
_local3.x = ((x - 16) - rattach.x);
_local3.y = ((y + 16) - rattach.y);
if (_local3.length > 10){
rattach.velocity.x = (_local3.x * 10);
rattach.velocity.y = (_local3.y * 10);
} else {
rattach.velocity.x = (rattach.velocity.y = 0);
};
rattach.angle = (FlxU.getAngle(-(_local3.x), -(_local3.y)) + 15);
_local3.x = ((x - 16) - lattach.x);
_local3.y = ((y + 16) - lattach.y);
if (_local3.length > 10){
lattach.velocity.x = (_local3.x * 10);
lattach.velocity.y = (_local3.y * 10);
} else {
lattach.velocity.x = (lattach.velocity.y = 0);
};
lattach.angle = (FlxU.getAngle(-(_local3.x), -(_local3.y)) - 15);
if (spc_ctr > 0.9){
spc_ctr = (spc_ctr - _local1);
rattach.angle = ((angle + 90) - (270 * 0.9));
};
if ((((spc_ctr > 0)) && ((spc_ctr <= 0.9)))){
rattach.scale.x = 2;
rattach.scale.y = -2;
rattach.angle = ((angle + 90) - (spc_ctr * 270));
spc_ctr = (spc_ctr - (_local1 * 5));
_local15 = 0;
while (_local15 < 8) {
if (((!((_local15 == id))) && ((bot_array.members[_local15].dead == false)))){
if (new Point((x - bot_array.members[_local15].x), (y - bot_array.members[_local15].y)).length < 100){
_local18 = FlxU.getAngle((x - bot_array.members[_local15].x), (y - bot_array.members[_local15].y));
if (Math.abs(FlxU.get_direction(_local18, angle)) < 90){
if ((((((((bot_array.members[_local15].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local15].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local15].hurt(99);
};
};
};
};
_local15++;
};
};
if (spc_ctr <= 0){
spc_ctr = 0;
rattach.scale.x = 1;
rattach.scale.y = -1;
};
};
ray_ctr++;
r2f = (r2f - (_local1 * 10));
flipper = (flipper * -1);
if (r2f < 0){
r2f = 0;
};
_local6 = FlxU.rotatePoint(r2f, -8, 0, 0, angle);
if ((((weapon == 2)) || ((weapon == 4)))){
_local6.x = (_local6.y = 0);
};
if (FlxG.keys.B){
velocity.x = (velocity.y = 0);
};
_wpn.x = (x + _local6.x);
_wpn.y = (y + _local6.y);
_wpn.angle = angle;
if (swave.exists){
swave.alpha = (swave.alpha - (_local1 * 2));
swave.scale.x = (swave.scale.y = (1 - swave.alpha));
if (swave.alpha <= 0){
if (dead){
exists = false;
};
swave.exists = false;
};
};
if ((((numbed > 0)) && (!(dead)))){
numbedfx.visible = (numbedfx.exists = true);
numbedfx.angle = (Math.random() * 360);
velocity.x = (velocity.y = (angularVelocity = 0));
numbed = (numbed - _local1);
numbedfx.x = x;
numbedfx.y = y;
} else {
numbedfx.exists = false;
};
if ((((disrupted > 0)) && (!(dead)))){
disruptedfx.visible = (disruptedfx.exists = true);
disruptedfx.angle = (angle - 90);
disrupted = (disrupted - _local1);
disruptedfx.scale.x = (disruptedfx.scale.x * -1);
disruptedfx.x = x;
disruptedfx.y = y;
} else {
disruptedfx.exists = false;
};
lattach.alpha = (rattach.alpha = alpha);
super.update();
last.x = x;
last.y = y;
}
override public function kill():void{
var _local1:Point;
if (!dead){
if (_parent.mode == 4){
if ((((_parent.redartifact.id == (id + 900))) && ((id >= 4)))){
_parent.redartifact.id = -999;
};
if ((((_parent.blueartifact.id == (id + 900))) && ((id < 4)))){
_parent.blueartifact.id = -999;
};
};
if (Math.random() > 0.5){
_parent.chat.addchat(2, id);
} else {
_parent.chat.addchat(5, hit_id);
};
swave.exists = true;
swave.x = (x - width);
swave.y = (y - height);
swave.alpha = 1;
FlxG.quake.start(0.01, 0.5);
die++;
score_die++;
bot_array.members[hit_id].kills++;
if ((((hit_id == 0)) && ((_parent.training == false)))){
_parent.kills++;
_parent.money = (_parent.money + (maxHealth * 2));
};
if (_parent.mode >= 2){
bot_array.members[hit_id].score.text = bot_array.members[hit_id].kills.toString();
};
_local1 = new Point((x - pid.x), (y - pid.y));
FlxG.play(SndExplode, (100 / _local1.length));
_explode.at(this);
_explode.start();
if (_parent.training == false){
redbar.y = (40 + (50 * id));
redbar.exists = true;
};
_parent.laser.exists = false;
_wpn.exists = (rattach.exists = (lattach.exists = false));
_wpn.visible = (rattach.visible = (lattach.visible = false));
target = null;
numbedfx.visible = (disruptedfx.visible = false);
numbedfx.exists = (disruptedfx.exists = false);
spc_charge = (spc_ctr = 0);
numbed = (disrupted = 0);
};
visible = false;
dead = true;
if (((((!(_parent.bonus.exists)) && ((hit_id == 0)))) && ((_parent.training == false)))){
_parent.bonus.x = x;
_parent.bonus.y = y;
_parent.bonus.visible = (_parent.bonus.exists = true);
_parent.bonus.dead = false;
_parent.bonus.health = 5;
if (Math.random() > 0.5){
_parent.bonus.frame = 1;
} else {
_parent.bonus.frame = 0;
};
};
if (respawnable){
respawn();
};
}
}
}//package org.mecha
Section 117
//bot_SndCannon (org.mecha.bot_SndCannon)
package org.mecha {
import mx.core.*;
public class bot_SndCannon extends SoundAsset {
}
}//package org.mecha
Section 118
//bot_SndExplode (org.mecha.bot_SndExplode)
package org.mecha {
import mx.core.*;
public class bot_SndExplode extends SoundAsset {
}
}//package org.mecha
Section 119
//bot_SndGun (org.mecha.bot_SndGun)
package org.mecha {
import mx.core.*;
public class bot_SndGun extends SoundAsset {
}
}//package org.mecha
Section 120
//bot_SndLaser (org.mecha.bot_SndLaser)
package org.mecha {
import mx.core.*;
public class bot_SndLaser extends SoundAsset {
}
}//package org.mecha
Section 121
//bot_SndMissile (org.mecha.bot_SndMissile)
package org.mecha {
import mx.core.*;
public class bot_SndMissile extends SoundAsset {
}
}//package org.mecha
Section 122
//bot_SndZap (org.mecha.bot_SndZap)
package org.mecha {
import mx.core.*;
public class bot_SndZap extends SoundAsset {
}
}//package org.mecha
Section 123
//BotClass (org.mecha.BotClass)
package org.mecha {
import org.flixel.*;
public class BotClass {
public var price:int;// = 0
public var name:String;
public var rank:int;// = 0
public var available:Boolean;// = true
public var bot_pool:Array;
public var face:FlxSprite;
}
}//package org.mecha
Section 124
//BotPool (org.mecha.BotPool)
package org.mecha {
import org.flixel.*;
public class BotPool {
public var bot_pool:Array;
public function shuffle_bot():void{
var _local2:BotClass;
var _local3:int;
var _local1:int;
while (_local1 < (bot_pool.length - 1)) {
_local2 = bot_pool[_local1];
_local3 = (Math.random() * (bot_pool.length - 1));
bot_pool[_local1] = bot_pool[_local3];
bot_pool[_local3] = _local2;
_local1++;
};
}
public function init_bot():void{
bot_pool = new Array();
var _local1:BotClass = new BotClass();
_local1.name = "STEELE";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "LEET";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "XAVIER";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "REEVE";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "DRAKE";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "RAVEN";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "GARRET";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "BLUE";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "STAGGER";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "HUNTER";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "CREAM";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "PEACH";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "STRIFE";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "MCCOY";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "MCKNIGHT";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "MCDONALD";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "MAGUS";
bot_pool.push(_local1);
_local1 = new BotClass();
_local1.name = "CRAY";
bot_pool.push(_local1);
}
}
}//package org.mecha
Section 125
//bullet (org.mecha.bullet)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
public class bullet extends FlxSprite {
private var target2:bot;
private var arena:FlxTilemap;
private var trail:Boolean;
private var smoke_array:FlxGroup;
private var target:FlxSprite;
public var hit:Boolean;// = false
private var speed:Number;
public var _parent:PlayState;
private var tpost:Point;
private var expl:FlxEmitter;
private var tangle:Number;
private var ctr:int;
private var exploded:Boolean;
private var ImgPlayer:Class;
private var bot_array:FlxGroup;
private var last_post:Point;
public var tipe:int;
private var chase:Boolean;
private var splode_array:FlxGroup;
private var dctr:Number;// = 0
public function bullet(_arg1:PlayState){
ImgPlayer = bullet_ImgPlayer;
last_post = new Point();
expl = new FlxEmitter();
super();
loadGraphic(ImgPlayer, true, false, 16, 16);
addAnimation("nshot", [0]);
addAnimation("spark", [1]);
addAnimation("lshot", [2]);
addAnimation("blshot", [4]);
addAnimation("lspark", [3]);
addAnimation("rocket", [5]);
addAnimation("rocketbl", [6]);
addAnimation("cannon", [7]);
addAnimation("feather", [8]);
addAnimation("plasma", [9]);
addAnimation("fatherbl", [10]);
addAnimation("plasmabl", [11]);
addAnimation("elec", [12]);
addAnimation("elec2", [12]);
addAnimation("plasma2", [14]);
addAnimation("elecbl", [15]);
target = _arg1.pid;
exists = false;
dead = true;
_parent = _arg1;
arena = _arg1.playground;
smoke_array = _arg1.smoke_array;
bot_array = _arg1.bot_array;
splode_array = _arg1.explotion_array;
}
override public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:smoke;
var _local4:Point;
var _local5:FlxPoint;
if (_parent == null){
bot_array = null;
splode_array = null;
smoke_array = null;
return;
};
dctr = (dctr - FlxG.elapsed);
if ((((((((((dctr < 0)) || ((x < 0)))) || ((x > _parent.playground.width)))) || ((y < 0)))) || ((y > _parent.playground.height)))){
kill();
};
if (!hit){
if ((((tipe == 8)) || ((tipe == 10)))){
alpha = (alpha - (FlxG.elapsed * 2));
damage = (alpha + 1);
if (alpha <= 0){
kill();
};
};
if (tipe == 4){
if (((((!((target == null))) && (target.exists))) && (!((target == bot_array.members[id]))))){
_local1 = (target.x - x);
_local2 = (target.y - y);
tangle = FlxU.getAngle(-(_local1), -(_local2));
if (Math.abs(FlxU.get_direction(angle, tangle)) < 5){
speed = (speed + (FlxG.elapsed * 1000));
if (speed > 500){
speed = 500;
};
angularVelocity = 0;
};
if (FlxU.get_direction(angle, tangle) > 5){
angularVelocity = -100;
};
if (FlxU.get_direction(angle, tangle) < -5){
angularVelocity = 100;
};
if (tipe == 6){
angularVelocity = (angularVelocity * 3);
};
if (Math.abs(FlxU.get_direction(angle, tangle)) > 15){
target = null;
};
if (new Point(_local1, _local2).length > 400){
target = null;
};
} else {
target = (bot_array.getRandom() as FlxSprite);
};
};
if (tipe == 6){
tangle = FlxU.getAngle((x - tpost.x), (y - tpost.y));
angularVelocity = 0;
if (FlxU.get_direction(angle, tangle) > 5){
angularVelocity = -200;
};
if (FlxU.get_direction(angle, tangle) < -5){
angularVelocity = 200;
};
speed = (speed + (FlxG.elapsed * 500));
scale.x = (speed / 200);
};
if ((((trail == true)) && (((ctr % 2) == 0)))){
if (onScreen()){
_local3 = (smoke_array.getFirstAvail() as smoke);
_local4 = new Point((x - last_post.x), (y - last_post.y));
_local5 = new FlxPoint();
_local5 = FlxU.rotatePoint(20, 0, 0, 0, angle);
if (_local3 != null){
if (tipe == 4){
_local3.spawn((x + _local5.x), (y + _local5.y), FlxU.getAngle(_local4.x, _local4.y), _local4.length, 2.5);
};
if (tipe == 5){
_local3.spawn((x + _local5.x), (y + _local5.y), FlxU.getAngle(_local4.x, _local4.y), _local4.length, 5);
};
};
last_post.x = x;
last_post.y = y;
} else {
last_post.x = x;
};
last_post.y = y;
};
if (chase){
velocity = FlxU.rotatePoint(-(speed), 0, 0, 0, angle);
};
hit = FlxU.collide(this, arena);
if (hit){
health = 0;
hurt(1);
};
} else {
damage = 0;
alpha = (alpha - (FlxG.elapsed * 5));
if (alpha <= 0.1){
kill();
};
if ((((tipe == 4)) || ((tipe == 5)))){
scale.x = (scale.y = (3 - (alpha * 3)));
angle = (720 * alpha);
} else {
scale.x = (scale.y = (2 - (alpha * 2)));
};
};
ctr++;
super.update();
}
override public function hurt(_arg1:Number):void{
var _local4:explotion;
var _local5:int;
var _local6:Point;
var _local2:Number = x;
var _local3:Number = y;
if (health == 0){
hit = true;
velocity.x = (velocity.y = 0);
scale.x = (scale.y = 0);
if (tipe == 1){
play("spark");
};
if (tipe == 2){
play("lspark");
};
if (tipe == 3){
play("lspark");
};
if (tipe == 4){
play("rocketbl");
};
if (tipe == 5){
play("rocketbl");
scale.x = (scale.y = 2);
};
if (tipe == 10){
play("elecbl");
scale.x = (scale.y = 5);
};
if ((((tipe == 9)) && (!(exploded)))){
exploded = true;
_local4 = (splode_array.getFirstDead() as explotion);
if (_local4 != null){
_local4.spawn(x, y, (Math.random() * 360));
};
_local5 = 0;
while (_local5 < 8) {
if (((!((_local5 == id))) && ((bot_array.members[_local5].dead == false)))){
if (bot_array.members[_local5] != null){
_local6 = new Point((x - bot_array.members[_local5].x), (y - bot_array.members[_local5].y));
if (_local6.length < 100){
if ((((((((bot_array.members[_local5].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local5].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local5].hit_id = id;
bot_array.members[_local5].hurt(5);
bot_array.members[_local5].velocity.x = (200 - (_local6.x * 2));
bot_array.members[_local5].velocity.y = (200 - (_local6.y * 2));
};
};
};
};
_local5++;
};
};
if (tipe == 6){
play("fatherbl");
};
if (tipe == 7){
play("plasmabl");
};
if ((((tipe < 6)) || ((tipe == 10)))){
angle = (Math.random() * 360);
};
};
}
public function shoot(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int):void{
trail = false;
chase = false;
x = _arg1;
y = _arg2;
id = _arg5;
exists = true;
dead = false;
angle = _arg3;
ctr = 20;
alpha = 1;
exploded = (hit = false);
tipe = _arg4;
target = null;
visible = true;
angularVelocity = 0;
dctr = 5;
if (_arg4 == 1){
scale.x = (scale.y = 1);
damage = 2;
health = 0;
velocity = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
play("nshot");
};
if (_arg4 == 2){
scale.x = (scale.y = 1);
health = 0;
damage = 2;
velocity = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
play("lshot");
};
if (_arg4 == 3){
scale.y = 1;
scale.x = 2;
health = 0;
damage = 3;
velocity = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
play("blshot");
};
if (_arg4 == 4){
scale.x = (scale.y = 1);
damage = 5;
health = 0;
velocity = FlxU.rotatePoint(-500, 0, 0, 0, angle);
play("rocket");
speed = 300;
target = (bot_array.getRandom() as FlxSprite);
trail = true;
chase = true;
last_post.x = x;
last_post.y = y;
};
if (_arg4 == 5){
scale.x = (scale.y = 1);
damage = 3;
health = 0;
velocity = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
play("cannon");
trail = true;
last_post.x = x;
last_post.y = y;
};
if (_arg4 == 6){
scale.x = (scale.y = 1);
damage = 3;
health = 0;
velocity = FlxU.rotatePoint(-250, 0, 0, 0, angle);
play("feather");
speed = 100;
target = (bot_array.getRandom() as FlxSprite);
chase = true;
if (id == 0){
tpost = new Point(FlxG.mouse.x, FlxG.mouse.y);
} else {
tpost = new Point(target.x, target.y);
};
};
if (_arg4 == 7){
scale.x = (scale.y = 2);
health = 0;
damage = 2;
velocity = FlxU.rotatePoint(-750, 0, 0, 0, angle);
play("plasma");
};
if (_arg4 == 8){
scale.x = (scale.y = 2);
health = 0;
damage = 2;
velocity = FlxU.rotatePoint(-500, 0, 0, 0, angle);
play("elec");
};
if (_arg4 == 9){
scale.x = (scale.y = 2);
damage = 10;
health = 0;
velocity = FlxU.rotatePoint(-1000, 0, 0, 0, angle);
play("cannon");
trail = true;
last_post.x = x;
last_post.y = y;
};
if (_arg4 == 10){
scale.x = (scale.y = 1);
damage = 0;
health = 0;
velocity = FlxU.rotatePoint(-750, 0, 0, 0, angle);
play("elec2");
dctr = 20;
};
if (_arg4 == 11){
scale.x = (scale.y = 1);
damage = 0;
health = 0;
velocity = FlxU.rotatePoint(-700, 0, 0, 0, angle);
play("plasma2");
};
}
}
}//package org.mecha
Section 126
//bullet_ImgPlayer (org.mecha.bullet_ImgPlayer)
package org.mecha {
import mx.core.*;
public class bullet_ImgPlayer extends BitmapAsset {
}
}//package org.mecha
Section 127
//chatter (org.mecha.chatter)
package org.mecha {
import org.flixel.*;
public class chatter extends FlxSprite {
private var string1:String;
private var string2:String;
private var string4:String;
private var string3:String;
private var string5:String;
private var _timer:Number;
private var txt:FlxText;
private var textctr:int;// = 0
public var _parent:PlayState;
public function chatter(_arg1:PlayState){
txt = new FlxText(0, 0, 400);
super();
_parent = _arg1;
scrollFactor.x = (scrollFactor.y = 0);
createGraphic(400, 150, 0);
x = 110;
y = 300;
txt.setFormat(null, 16, 0xFFFFFF, "left");
}
public function addchat(_arg1:int, _arg2:int, _arg3:String=" "):void{
var _local4:String;
var _local6:int;
var _local5:Boolean;
textctr++;
if (_arg1 == 1001){
string1 = (string2 = (string3 = (string4 = (string5 = " "))));
_local4 = "Bunny : Testing... Testing...";
_local5 = true;
};
if (_arg1 == 1002){
_local4 = (("Bunny : Hey, " + _parent.pid.botname) + "! It's me Bunny!");
_local5 = true;
};
if (_arg1 == 1003){
_local4 = "Bunny : I'll guide you to the entire course of this training";
_local5 = true;
};
if (_arg1 == 1004){
_local4 = "Bunny : First of all, try to move around until you";
_local5 = true;
};
if (_arg1 == 1005){
_local4 = "Bunny : become familiar with the movement control";
_local5 = true;
};
if (_arg1 == 1006){
_local4 = "Bunny : You can change the movement control";
_local5 = true;
};
if (_arg1 == 1007){
_local4 = "Bunny : by entering the ingame menu[ESC]";
_local5 = true;
};
if (_arg1 == 1008){
_local4 = "Bunny : Now follow the path until you reach a big room";
_local5 = true;
};
if (_arg1 == 1009){
_local4 = "Bunny : There are several drones in this room";
_local5 = true;
};
if (_arg1 == 1010){
_local4 = "Bunny : Shoot down all of them";
_local5 = true;
};
if (_arg1 == 1011){
_local4 = "Bunny : Nice shooting!";
_local5 = true;
};
if (_arg1 == 1012){
_local4 = "Bunny : Now for a real challenge, the drones will shootback at you";
_local5 = true;
};
if (_arg1 == 1013){
_local4 = "Bunny : Destroy all of them before they destroy you";
_local5 = true;
};
if (_arg1 == 1014){
_local4 = "Bunny : If you manage to avoid all damage,";
_local5 = true;
};
if (_arg1 == 1015){
_local4 = "Bunny : I will let you borrow my SpaceBunny ship";
_local5 = true;
};
if (_arg1 == 1016){
_local4 = "Bunny : Don't forget that every ship is equipped with special weapon";
_local5 = true;
};
if (_arg1 == 1017){
_local4 = "Bunny : This SpaceBunny, for instance, has special Regeneration Power";
_local5 = true;
};
if (_arg1 == 1018){
_local4 = "Bunny : Charge the special weapon by holding the attack button";
_local5 = true;
};
if (_arg1 == 1019){
_local4 = "Bunny : When the special weapon bar is full, release the button";
_local5 = true;
};
if (_arg1 == 1020){
_local4 = "Bunny : Well, that is all the basic knowledge I can teach";
_local5 = true;
};
if (_arg1 == 1021){
_local4 = "Bunny : You will have to learn any advanced tactics at your own";
_local5 = true;
};
if (_arg1 == 1022){
_local4 = "Bunny : See you again...";
_local5 = true;
};
if (_arg1 == -1){
_local4 = (_parent.bot_array.members[(Math.round((Math.random() * 6)) + 1)].botname + " : ");
_local4 = (_local4 + _arg3);
_local5 = true;
};
if (_arg1 == 1){
string1 = (string2 = (string3 = (string4 = (string5 = " "))));
_local4 = (_parent.bot_array.members[(Math.round((Math.random() * 6)) + 1)].botname + " : ");
_local6 = (FlxU.random() * 5);
if ((textctr % 5) == 0){
_local4 = (_local4 + "OK, let's go!!");
} else {
if ((textctr % 5) == 1){
_local4 = (_local4 + "Move out ladies!");
} else {
if ((textctr % 5) == 2){
_local4 = (_local4 + "Let's kick ass!");
} else {
if ((textctr % 5) == 3){
_local4 = (_local4 + "Bring it on!!!");
} else {
if ((textctr % 5) == 4){
_local4 = (_local4 + "Here we go again!");
};
};
};
};
};
_local5 = true;
};
if (_arg1 == 2){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 10);
if ((textctr % 10) == 0){
_local4 = (_local4 + "You cheater!!");
} else {
if ((textctr % 10) == 1){
_local4 = (_local4 + "*throwing keyboard across the room*");
} else {
if ((textctr % 10) == 2){
_local4 = (_local4 + "How dare you!!");
} else {
if ((textctr % 10) == 3){
_local4 = (_local4 + "Man, I' not in the mood today");
} else {
if ((textctr % 10) == 4){
_local4 = (_local4 + "WTF?!");
};
};
};
};
};
if ((textctr % 10) == 5){
_local4 = (_local4 + "WTH?!");
};
if ((textctr % 10) == 6){
_local4 = (_local4 + "What the...?!");
};
if ((textctr % 10) == 7){
_local4 = (_local4 + "Oh gawd I'm suck T_T");
};
if ((textctr % 10) == 8){
_local4 = (_local4 + "*blamin the mouse*");
};
if ((textctr % 10) == 9){
_local4 = (_local4 + "Hey, not fair! I was from the toilet room");
};
_local5 = true;
};
if (_parent.chat_timer > 3){
_parent.chat_timer = 0;
if (_arg1 == 3){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 8);
if ((textctr % 8) == 0){
_local4 = (_local4 + "Stop moving so I can shoot you!");
} else {
if ((textctr % 8) == 1){
_local4 = (_local4 + "You can run but you can't hide");
} else {
if ((textctr % 8) == 2){
_local4 = (_local4 + "*TARGET LOCKED*");
} else {
if ((textctr % 8) == 3){
_local4 = (_local4 + "You're goin down");
} else {
if ((textctr % 8) == 4){
_local4 = (_local4 + "Got you!!");
} else {
if ((textctr % 8) == 5){
_local4 = (_local4 + "Any last word?");
} else {
if ((textctr % 8) == 6){
_local4 = (_local4 + "Got your back");
} else {
if ((textctr % 8) == 7){
_local4 = (_local4 + "Come to papa");
};
};
};
};
};
};
};
};
_local5 = true;
};
if ((((_arg1 == 4)) && (!((_arg2 == 0))))){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 8);
if ((textctr % 8) == 0){
_local4 = (_local4 + "Stop following me!");
} else {
if ((textctr % 8) == 1){
_local4 = (_local4 + "I can't shake him!!");
} else {
if ((textctr % 8) == 2){
_local4 = (_local4 + "Need help!");
} else {
if ((textctr % 8) == 3){
_local4 = (_local4 + "How can you type and play at the same time?");
} else {
if ((textctr % 8) == 4){
_local4 = (_local4 + "*PANIC*");
} else {
if ((textctr % 8) == 5){
_local4 = (_local4 + "Eat my dust!!");
} else {
if ((textctr % 8) == 6){
_local4 = (_local4 + "Go somewhere else!!");
} else {
if ((textctr % 8) == 7){
_local4 = (_local4 + "Stop yappin and start shootin");
};
};
};
};
};
};
};
};
_local5 = true;
};
if ((((_arg1 == 5)) && (!((_arg2 == 0))))){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 8);
if ((textctr % 8) == 0){
_local4 = (_local4 + "Incoming!... Too slow");
} else {
if ((textctr % 8) == 1){
_local4 = (_local4 + "Cmon, will anyone fight back?");
} else {
if ((textctr % 8) == 2){
_local4 = (_local4 + "Back to training ground, you go");
} else {
if ((textctr % 8) == 3){
_local4 = (_local4 + "Am I good, or am I good");
} else {
if ((textctr % 8) == 4){
_local4 = (_local4 + "Look, look, no hand!");
} else {
if ((textctr % 8) == 5){
_local4 = (_local4 + "Add that to my kills");
} else {
if ((textctr % 8) == 6){
_local4 = (_local4 + "Ouch! That gotta hurt");
} else {
if ((textctr % 8) == 7){
_local4 = (_local4 + "Toasted another sitting duck");
};
};
};
};
};
};
};
};
_local5 = true;
};
if ((((_arg1 == 6)) && (!((_arg2 == 0))))){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 8);
if ((textctr % 8) == 0){
_local4 = (_local4 + "Come out, come out, where ever you are");
} else {
if ((textctr % 8) == 1){
_local4 = (_local4 + "You can run but you can't hide");
} else {
if ((textctr % 8) == 2){
_local4 = (_local4 + "I hate campers");
} else {
if ((textctr % 8) == 3){
_local4 = (_local4 + "Where are they?");
} else {
if ((textctr % 8) == 4){
_local4 = (_local4 + "He got away");
} else {
if ((textctr % 8) == 5){
_local4 = (_local4 + "Am I playing all alone here?");
} else {
if ((textctr % 8) == 6){
_local4 = (_local4 + "Are we still in a battle or what?");
} else {
if ((textctr % 8) == 7){
_local4 = (_local4 + "Tell me you are not quiting");
};
};
};
};
};
};
};
};
_local5 = true;
};
if ((((_arg1 == 7)) && (!((_arg2 == 0))))){
_local4 = (_parent.bot_array.members[_arg2].botname + " : ");
_local6 = (FlxU.random() * 4);
if ((textctr % 8) == 0){
_local4 = (_local4 + "They stole our artifact!");
} else {
if ((textctr % 8) == 1){
_local4 = (_local4 + "He got the artifact! Get him!");
} else {
if ((textctr % 8) == 2){
_local4 = (_local4 + "I hate campers");
} else {
if ((textctr % 8) == 3){
_local4 = (_local4 + "Where are they?");
} else {
_local5 = true;
};
};
};
};
};
};
if (_local5){
pixels.fillRect(pixels.rect, 0);
string1 = string2;
string2 = string3;
string3 = string4;
string4 = string5;
string5 = _local4;
txt.text = ((((((((string1 + "\n") + string2) + "\n") + string3) + "\n") + string4) + "\n") + string5);
draw(txt);
};
}
}
}//package org.mecha
Section 128
//CheckProfileState (org.mecha.CheckProfileState)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
import flash.filters.*;
public class CheckProfileState extends FlxState {
private var selectlevel:int;// = 0
private var saves:FlxSave;
private var faceselect:int;
private var Sndbeep2:Class;
private var guidegirl:guide;
private var ImgEnterName:Class;
private var choice:int;// = 0
private var ImgFace:Class;
private var ImgFaceFrame:Class;
private var faceframe:FlxSprite;
private var namelength:int;
private var button:FlxSprite;
private var ImgButton:Class;
private var spritemask:FlxSprite;
private var Imgcursor:Class;
private var imgbutton:FlxButton;
private var hcursor:FlxSprite;
private var button1:FlxButton;
private var vcursor:FlxSprite;
private var button2:FlxButton;
private var fx:FlxSprite;
private var ImgButtoff:Class;
private var fx_toggle:Boolean;
private var menubg:FlxSprite;
private var Imgbullet:Class;
private var ImgMenuBG:Class;
private var enternamebg:FlxSprite;
private var ImgTunnel:Class;
private var playername:FlxText;
private var tunnel:FlxSprite;
private var Sndbeep:Class;
private var SndMsg:Class;
private var buttoff:FlxSprite;
public function CheckProfileState(){
SndMsg = CheckProfileState_SndMsg;
Imgbullet = CheckProfileState_Imgbullet;
Imgcursor = CheckProfileState_Imgcursor;
ImgMenuBG = CheckProfileState_ImgMenuBG;
ImgEnterName = CheckProfileState_ImgEnterName;
ImgFace = CheckProfileState_ImgFace;
ImgFaceFrame = CheckProfileState_ImgFaceFrame;
ImgButton = CheckProfileState_ImgButton;
ImgButtoff = CheckProfileState_ImgButtoff;
Sndbeep = CheckProfileState_Sndbeep;
Sndbeep2 = CheckProfileState_Sndbeep2;
ImgTunnel = CheckProfileState_ImgTunnel;
saves = new FlxSave();
super();
}
override public function create():void{
var profile_found:int;
FlxG.flash.start(4278190080, 0.5);
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("kills");
saves.bind("killed");
saves.bind("shothit");
saves.bind("shotfired");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("battle_mode");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
profile_found = (saves.read("played") as int);
enternamebg = new FlxSprite((320 - 140), 140, ImgEnterName);
button = new FlxSprite(0, 0, ImgButton);
buttoff = new FlxSprite(0, 0, ImgButtoff);
spritemask = new FlxSprite(0, 0, null);
tunnel = new FlxSprite(0, 0, ImgTunnel);
tunnel.x = (320 - (tunnel.width / 2));
tunnel.y = (240 - (tunnel.height / 2));
tunnel.scale.x = (tunnel.scale.y = 0.1);
add(tunnel);
fx_toggle = saves.read("fx");
fx = new FlxSprite();
fx.createGraphic(160, 120, 4278190335, true, "screen");
fx.scale.x = (fx.scale.y = 4);
fx.blend = "screen";
fx.antialiasing = true;
FlxState.screen.scale.x = (FlxState.screen.scale.y = 0.25);
var text1:FlxText = new FlxText(280, 160, 200, "NO PROFILE FOUND");
var text2:FlxText = new FlxText(280, 200, 200, "CREATE NEW PROFILE");
text1.setFormat(null, 26, 15794175, "center");
text2.setFormat(null, 26, 15794175, "center");
menubg = new FlxSprite((320 - 140), 140);
menubg.loadGraphic(ImgMenuBG, false, false, 0, 0, true);
with ({}) {
with ({}) {
!ERROR!.fadeout = function ():void{
choice = 1;
};
};
button1 = new FlxButton(270, 280, function ():void{
choice = 1;
});
button1.loadGraphic(buttoff, button);
spritemask.createGraphic(300, 200, 2281701376);
spritemask.exists = false;
button1.loadText(new FlxText(0, 5, 100, "OK").setFormat(null, 26, 15794175, "center"), new FlxText(0, 5, 100, "OK").setFormat(null, 26, 15794175, "center"));
if (profile_found > 0){
text1.text = "PROFILE FOUND";
text2.text = "PRESS OK TO LOAD OR NO TO CREATE NEW";
button1.x = (button1.x - 50);
with ({}) {
with ({}) {
!ERROR!.fadeout = function ():void{
choice = 2;
};
};
button2 = new FlxButton(320, 280, function ():void{
choice = 2;
});
button2.loadGraphic(new FlxSprite(0, 0, ImgButtoff), new FlxSprite(0, 0, ImgButton));
button2.loadText(new FlxText(0, 5, 100, "NO").setFormat(null, 26, 15794175, "center"), new FlxText(0, 5, 100, "NO").setFormat(null, 26, 15794175, "center"));
};
playername = new FlxText(200, 180, 200, "PLAYER");
playername.setFormat(null, 26, 15794175, "left");
playername.exists = false;
menubg.draw(text1, 40, 30);
menubg.draw(text2, 40, 70);
menubg.scale.y = 0;
text1.alignment = "left";
text1.text = "ENTER YOUR NAME";
enternamebg.draw(text1, 10, 10);
text1.text = "SELECT YOUR PICTURE";
enternamebg.draw(text1, 10, 90);
enternamebg.scale.y = 0;
enternamebg.exists = false;
add(menubg);
add(enternamebg);
add(playername);
add(button1);
if (button2 != null){
add(button2);
};
add(spritemask);
playername.text = (playername.text + "_");
with ({}) {
with ({}) {
!ERROR!.selectpic = function ():void{
selectlevel = 5;
imgbutton.exists = false;
FlxG.play(Sndbeep);
};
};
imgbutton = new FlxButton(185, 270, function ():void{
selectlevel = 5;
imgbutton.exists = false;
FlxG.play(Sndbeep);
});
imgbutton.loadGraphic(new FlxSprite(0, 0, ImgFace));
imgbutton.exists = false;
faceframe = new FlxSprite(imgbutton.x, imgbutton.y, ImgFaceFrame);
faceframe.exists = false;
hcursor = new FlxSprite();
hcursor.loadGraphic(Imgcursor);
hcursor.scale.x = 11;
vcursor = new FlxSprite();
vcursor.loadGraphic(Imgcursor);
vcursor.scale.x = 8;
vcursor.angle = 90;
guidegirl = new guide(this);
if (profile_found > 0){
guidegirl.show(-2);
};
add(imgbutton);
add(faceframe);
add(hcursor);
add(vcursor);
}
override public function postProcess():void{
var _local1:BlurFilter = new BlurFilter(4, 4, 1);
fx.draw(FlxState.screen);
fx._framePixels.colorTransform(fx._framePixels.rect, new ColorTransform(2, 2, 2, 1, -200, -200, -200));
fx._framePixels.applyFilter(fx._framePixels, new Rectangle(0, 0, 160, 120), new Point(), _local1);
FlxState.screen.draw(fx, 240, 180);
}
override public function update():void{
var i:int;
var keypressed:String;
var xint:int;
var bot_select:int;
tunnel.scale.y = (tunnel.scale.y * 1.1);
tunnel.scale.x = tunnel.scale.y;
if (tunnel.scale.y > 10){
tunnel.scale.y = 0.1;
};
hcursor.x = 300;
hcursor.y = FlxG.mouse.y;
vcursor.y = 220;
vcursor.x = (FlxG.mouse.x - 32);
var elapsed:Number = FlxG.elapsed;
if (selectlevel == 0){
if (menubg.scale.y < 1){
menubg.scale.y = (menubg.scale.y + (elapsed * 5));
button1.exists = false;
if (button2 != null){
button2.exists = false;
};
} else {
button1.exists = true;
if (button2 != null){
button2.exists = true;
};
menubg.scale.y = 1;
};
if (choice != 0){
selectlevel++;
FlxG.play(Sndbeep);
};
};
if (selectlevel == 1){
if (menubg.scale.y > 0){
menubg.scale.y = (menubg.scale.y - (elapsed * 5));
button1.exists = false;
if (button2 != null){
button2.exists = false;
};
} else {
menubg.scale.y = 0;
selectlevel = 2;
if ((((choice == 1)) && (!((button2 == null))))){
with ({}) {
with ({}) {
!ERROR!.fadeout = function ():void{
FlxG.state = new ProfileState();
};
};
FlxG.fade.start(4278190080, 1, function ():void{
FlxG.state = new ProfileState();
});
} else {
enternamebg.exists = true;
};
};
};
if (selectlevel == 2){
if (enternamebg.scale.y < 1){
enternamebg.scale.y = (enternamebg.scale.y + (elapsed * 5));
} else {
enternamebg.scale.y = 1;
selectlevel = 3;
playername.exists = true;
playername.text = "_";
spritemask.exists = true;
spritemask.y = 220;
spritemask.x = enternamebg.x;
};
};
if (selectlevel == 3){
i = 0;
while (i < 26) {
keypressed = String.fromCharCode((i + 65));
if (FlxG.keys.justPressed(keypressed)){
FlxG.play(Sndbeep2);
if (namelength < 10){
playername.text = playername.text.slice(0, namelength);
playername.text = (playername.text + keypressed);
namelength++;
playername.text = (playername.text + "_");
};
};
i = (i + 1);
};
if (FlxG.keys.justPressed("SPACE")){
FlxG.play(Sndbeep2);
if (namelength > 0){
playername.text = playername.text.slice(0, namelength);
playername.text = (playername.text + " ");
namelength++;
playername.text = (playername.text + "_");
};
};
if (FlxG.keys.justPressed("BACKSPACE")){
FlxG.play(Sndbeep2);
if (namelength > 0){
playername.text = playername.text.slice(0, namelength);
namelength--;
playername.text = playername.text.slice(0, namelength);
playername.text = (playername.text + "_");
};
};
if (FlxG.keys.justPressed("ENTER")){
FlxG.play(Sndbeep);
if (namelength == 0){
playername.text = "PLAYER";
} else {
playername.text = playername.text.slice(0, namelength);
};
selectlevel = 4;
faceframe.exists = true;
spritemask.scale.y = (80 / 200);
spritemask.y = (enternamebg.y - 60);
imgbutton.exists = true;
};
};
if (selectlevel == 4){
if (((imgbutton.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)) && (!((faceframe == null))))){
xint = (FlxG.mouse.x / 48);
if (xint > 3){
faceframe.x = ((xint * 48) - 8);
faceselect = (xint - 4);
};
};
};
if (selectlevel == 5){
playername.exists = false;
faceframe.exists = false;
if (enternamebg.scale.y > 0){
enternamebg.scale.y = (enternamebg.scale.y - (elapsed * 3));
saves.write("my_name", playername.text);
saves.write("my_picture", faceselect);
switch (faceselect){
case 0:
saves.write("bot_open", 4);
break;
case 1:
saves.write("bot_open", 8);
break;
case 2:
saves.write("bot_open", 32);
break;
case 3:
saves.write("bot_open", 16);
break;
case 4:
saves.write("bot_open", 2);
break;
case 5:
saves.write("bot_open", 64);
break;
};
saves.write("played", 1);
saves.write("kills", 0);
saves.write("killed", 0);
saves.write("shothit", 0);
saves.write("shotfired", 0);
saves.write("money", 1000);
saves.write("class", 0);
saves.write("wins", 0);
saves.write("current_level", 0);
saves.write("battle_mode", 0);
saves.write("medal1", false);
saves.write("medal2", false);
saves.write("medal3", false);
saves.write("medal4", false);
saves.write("medal5", false);
saves.write("dummy", 0);
if (playername.text == "OVERKILL"){
saves.write("kills", 999);
};
if (playername.text == "BOTMASTER"){
saves.write("bot_open", (((((((2 + 4) + 8) + 16) + 32) + 64) + 128) + 0x0100));
};
if (playername.text == "RICHIE"){
saves.write("money", 50000);
};
if (playername.text == "LEON"){
saves.write("class", 3);
};
with ({}) {
with ({}) {
!ERROR!.fadeout = function ():void{
FlxG.state = new ProfileState();
};
};
FlxG.fade.start(4278190080, 1, function ():void{
FlxG.state = new ProfileState();
});
spritemask.exists = false;
};
};
super.update();
}
}
}//package org.mecha
Section 129
//CheckProfileState_Imgbullet (org.mecha.CheckProfileState_Imgbullet)
package org.mecha {
import mx.core.*;
public class CheckProfileState_Imgbullet extends BitmapAsset {
}
}//package org.mecha
Section 130
//CheckProfileState_ImgButtoff (org.mecha.CheckProfileState_ImgButtoff)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgButtoff extends BitmapAsset {
}
}//package org.mecha
Section 131
//CheckProfileState_ImgButton (org.mecha.CheckProfileState_ImgButton)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgButton extends BitmapAsset {
}
}//package org.mecha
Section 132
//CheckProfileState_Imgcursor (org.mecha.CheckProfileState_Imgcursor)
package org.mecha {
import mx.core.*;
public class CheckProfileState_Imgcursor extends BitmapAsset {
}
}//package org.mecha
Section 133
//CheckProfileState_ImgEnterName (org.mecha.CheckProfileState_ImgEnterName)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgEnterName extends BitmapAsset {
}
}//package org.mecha
Section 134
//CheckProfileState_ImgFace (org.mecha.CheckProfileState_ImgFace)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgFace extends BitmapAsset {
}
}//package org.mecha
Section 135
//CheckProfileState_ImgFaceFrame (org.mecha.CheckProfileState_ImgFaceFrame)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgFaceFrame extends BitmapAsset {
}
}//package org.mecha
Section 136
//CheckProfileState_ImgMenuBG (org.mecha.CheckProfileState_ImgMenuBG)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgMenuBG extends BitmapAsset {
}
}//package org.mecha
Section 137
//CheckProfileState_ImgTunnel (org.mecha.CheckProfileState_ImgTunnel)
package org.mecha {
import mx.core.*;
public class CheckProfileState_ImgTunnel extends BitmapAsset {
}
}//package org.mecha
Section 138
//CheckProfileState_Sndbeep (org.mecha.CheckProfileState_Sndbeep)
package org.mecha {
import mx.core.*;
public class CheckProfileState_Sndbeep extends SoundAsset {
}
}//package org.mecha
Section 139
//CheckProfileState_Sndbeep2 (org.mecha.CheckProfileState_Sndbeep2)
package org.mecha {
import mx.core.*;
public class CheckProfileState_Sndbeep2 extends SoundAsset {
}
}//package org.mecha
Section 140
//CheckProfileState_SndMsg (org.mecha.CheckProfileState_SndMsg)
package org.mecha {
import mx.core.*;
public class CheckProfileState_SndMsg extends SoundAsset {
}
}//package org.mecha
Section 141
//explotion (org.mecha.explotion)
package org.mecha {
import org.flixel.*;
public class explotion extends FlxSprite {
private var die:Number;
private var ctr:int;
private var _explode:FlxEmitter;
public var tipe:int;
private var ImgPlayer:Class;
public var hit:Boolean;// = false
public function explotion(_arg1:PlayState){
ImgPlayer = explotion_ImgPlayer;
super();
loadGraphic(ImgPlayer);
exists = false;
dead = true;
blend = "add";
_explode = new FlxEmitter(x, y);
_explode.createSprites(_arg1.ImgExplode, 20, 8);
_explode.gravity = 0;
_explode.delay = 1;
_arg1.add(_explode);
}
override public function update():void{
alpha = (alpha - (FlxG.elapsed * die));
scale.x = (scale.y = (1 - alpha));
if (alpha <= 0){
kill();
};
super.update();
}
public function spawn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=2):void{
die = _arg4;
exists = true;
dead = false;
x = (_arg1 - (width / 2));
y = (_arg2 - (height / 2));
alpha = 1;
angle = _arg3;
scale.x = (0.11 * length);
_explode.at(this);
_explode.start();
}
}
}//package org.mecha
Section 142
//explotion_ImgPlayer (org.mecha.explotion_ImgPlayer)
package org.mecha {
import mx.core.*;
public class explotion_ImgPlayer extends BitmapAsset {
}
}//package org.mecha
Section 143
//guide (org.mecha.guide)
package org.mecha {
import org.flixel.*;
public class guide extends FlxSprite {
private var Imgbunny:Class;
private var bg:FlxSprite;
private var showing:Boolean;// = false
private var text:FlxText;
private var _Off:Boolean;// = false
private var textctr:int;// = 0
private var last_show:int;
private var Imgtextbox:Class;
private var textbox:FlxSprite;
public function guide(_arg1:FlxState):void{
Imgbunny = guide_Imgbunny;
Imgtextbox = guide_Imgtextbox;
super();
antialiasing = true;
loadGraphic(Imgbunny);
text = new FlxText(40, 320, 580, "TEST");
text.setFormat(null, 26, 15794175, "left");
textbox = new FlxSprite();
textbox.loadGraphic(Imgtextbox);
textbox.x = 20;
textbox.y = 310;
bg = new FlxSprite();
bg.createGraphic(640, 480, 2281701376);
_arg1.add(bg);
_arg1.add(this);
_arg1.add(textbox);
_arg1.add(text);
bg.visible = (text.visible = (textbox.visible = (visible = false)));
x = 300;
y = 30;
scale.y = 0;
}
public function show(_arg1:int=0):void{
if (_Off){
return;
};
last_show = _arg1;
FlxG.button_disable = true;
visible = (showing = true);
if (FlxG.mouse.cursor != null){
FlxG.mouse.cursor.exists = false;
};
if (_arg1 == -2){
text.text = "YOU ALREADY HAVE A PROFILE IN THIS STATION, PRESS OK TO LOAD THE PROFILE OR NO TO CREATE NEW PROFILE.\nWARNING, CREATING NEW PROFILE WILL DELETE ANY PREVIOUSLY SAVED PROFILE";
};
if (_arg1 == -1){
text.text = (("WELCOME TO THE ARENA, " + FlxG.pl_name) + "\nMY NAME IS BUNNY, I'LL BE YOUR GUIDE IN THIS BATTLE ARENA\nLOOKS LIKE YOU ARE NEW IN THIS BATTLE,SO I SUGGEST YOU TAKE THE TRAINING GROUND FIRST BEFORE YOU JUMP IN TO THE ARENA");
};
if (_arg1 == 0){
text.text = "";
};
if (_arg1 == 1){
text.text = "YOU NEED A TEAM WITH A MEMBER OF FOUR TO ENTER THIS TOURNAMENT.\nGO TO THE TEAM SECTION TO RECRUIT TEAM MEMBERS OR CHOOSE ANOTHER TOURNAMENT";
};
if ((((_arg1 == 2)) || ((_arg1 == 22)))){
text.text = (("WELCOME TO THE ARENA AGAIN, " + FlxG.pl_name) + "\nGLAD YOU COME BACK AGAIN\nARE YOU READY FOR ANOTHER BATTLE?");
};
if (_arg1 == 3){
text.text = "LAST MAN STANDING:\nEVERYONE IS EVERYONE'S ENEMY. YOU MUST FIGHT EACHOTHER UNTIL THERE'S ONLY ONE LEFT, THE WINNER";
};
if (_arg1 == 4){
text.text = "FRAG MASTER:\nTHE OBJECT IN THIS BATTLE MODE IS TO SHOOT DOWN OTHER SHIP AS MANY AS YOU CAN. THE ONE WITH THE HIGHEST KILLS WHEN THE TIME IS UP IS THE WINNER";
};
if (_arg1 == 5){
text.text = "TEAM DEATHMATCH:\nYOU AND YOUR TEAM MUST FIGHT THE OTHER TEAM. THE WINNING TEAM IS THE ONE THAT DESTROY ALL MEMBER OF THE OPPOSITE TEAM";
};
if (_arg1 == 6){
text.text = "ARTIFACT STEAL:\nEACH TEAM HAS THEIR OWN ARTIFACT AND COLLECT POINT. TRY TO STEAL OPPONENT'S ARTIFACT AND TAKE IT TO YOUR COLLECT POINT WITHOUT LOSING YOUR OWN ARTIFACT";
};
if (_arg1 == 7){
text.text = "TRAINING GROUND:\nTHERE IS NO SUCH A THING LIKE HAVING TOO MUCH PRACTISE. THIS TRAINING GROUND WILL TEACH YOU ALL THE BASIC SKILL NEEDED TO WIN THE BATTLE";
};
if (_arg1 == 8){
text.text = "THIS IS THE BATTLE MODE SELECTION SCREEN, CLICK ON THE BATTLE MODE SELECTION BUTTON TO SELECT THE BATTLE, AND CLICK ON THE ENTER TOURNAMENT BUTTON TO ENTER THE BATTLE";
};
if (_arg1 == 9){
text.text = "SINCE THIS IS YOUR FIRST VISIT TO THE ARENA, WHY DON'T YOU JUST SELECT THE TRAINING GROUND AND HIT THE ENTER TRAINING BUTTON?";
};
if (_arg1 == 10){
text.text = "WELCOME TO THE TEAM SELECTION SCREEN. THIS IS WHERE YOU CAN RECRUIT TEAM MEMBERS FOR YOU TEAM. YOU WILL NEED TEAM MEMBER TO ENTER TEAM BASED TOURNAMENT";
};
if (_arg1 == 11){
text.text = "EACH MEMBER HAS THEIR OWN PRICE BASED FROM THEIR RANK. THE ONE WITH HIGHER RANK THAN YOURS WILL COST YOU MORE, BUT THE LOWER ONE WILL BE WILLINGLY JOIN YOU FOR FREE";
};
if (_arg1 == 12){
text.text = "YOU CAN CHOOSE ANOTHER BATTLE USING THIS BUTTON, BUT FOR NOW, I THINK YOU SHOULD ENTER THE TRAINING GROUND";
};
if (_arg1 == 13){
text.text = "IT LOOKS LIKE YOU STILL HAVE UNFINISHED TOURNAMENT ON THIS STATION. CLICK ON CONTINUE BUTTON TO CONTINUE YOUR TOURNAMENT OR CHOOSE ANOTHER BATTLE MODE TO ENTER THE NEW ONE";
};
if (_arg1 == 30){
text.text = "WELCOME TO THE BOT SELECTION SCREEN, THIS IS WHERE YOU CAN BUY AND SELECT YOUR BOT, CHOOSE WEAPON TO EQUIP AND LOAD IT WITH AMMUNITION AND SHIELD PLATE";
};
if (_arg1 == 31){
text.text = "NOW SELECT YOUR BOT, EACH BOT HAS DIFFERENT SPEED, MAXIMUM TAKE OFF WEIGHT(MTOW) AND SPECIAL ABILITY, AND OF COURSE PRICE IF YOU HAVEN'T BUY IT";
};
if (_arg1 == 32){
text.text = "SELECT THE WEAPON FOR YOUR BOT, SOME WEAPON ARE LOCKED AND WILL BE OPENED IF YOU ACHIEVED CERTAIN RANK, THEY ALSO SORTED FROM THE EASIEST TO USE AT THE TOP TO THE HARDEST ONE AT THE VERY BOTTOM";
};
if (_arg1 == 33){
text.text = "LOAD OUT YOUR WEAPON AND SHIELD, PLEASE NOTE THAT YOU NEED AMMUNITION TO SHOOT AND SHIELD TO WITHSTAND FROM DAMAGE, MY SUGGESTION IS TO LOAD SHIELD FIRST AND AMMUNITION COME SECOND";
};
}
override public function update():void{
if (visible){
if (showing){
if (scale.y < 1){
scale.y = (scale.y + (FlxG.elapsed * 10));
} else {
scale.y = 1;
textbox.visible = (text.visible = (bg.visible = true));
};
} else {
if (scale.y > 0){
scale.y = (scale.y - (FlxG.elapsed * 10));
} else {
textbox.visible = (text.visible = (bg.visible = (visible = false)));
if (FlxG.mouse.cursor != null){
FlxG.mouse.cursor.exists = true;
};
FlxG.button_disable = false;
};
};
};
if (((FlxG.mouse.justReleased()) && ((scale.y >= 1)))){
hide();
if (last_show == 8){
show(9);
};
if (last_show == 10){
show(11);
};
if (last_show == 22){
show(13);
};
if (last_show == 30){
show(31);
};
};
}
public function hide(_arg1:int=0):void{
showing = false;
}
public function toggle_onoff():void{
_Off = !(_Off);
}
}
}//package org.mecha
Section 144
//guide_Imgbunny (org.mecha.guide_Imgbunny)
package org.mecha {
import mx.core.*;
public class guide_Imgbunny extends BitmapAsset {
}
}//package org.mecha
Section 145
//guide_Imgtextbox (org.mecha.guide_Imgtextbox)
package org.mecha {
import mx.core.*;
public class guide_Imgtextbox extends BitmapAsset {
}
}//package org.mecha
Section 146
//logo (org.mecha.logo)
package org.mecha {
import flash.events.*;
import flash.display.*;
import org.flixel.*;
import flash.ui.*;
public class logo extends FlxState {
private var ImgHole:Class;
private var intro:Class;
private var ImgLogo:Class;
private var hole1:FlxSprite;
private var hole2:FlxSprite;
private var hole3:FlxSprite;
private var mc:MovieClip;
private var SndGun:Class;
private var loader:Loader;
public function logo(){
ImgLogo = logo_ImgLogo;
ImgHole = logo_ImgHole;
SndGun = logo_SndGun;
intro = logo_intro;
super();
}
private function loaded(_arg1:Event):void{
mc = (loader.content as MovieClip);
addChild(mc);
loader.removeEventListener(Event.COMPLETE, loaded);
}
override public function update():void{
if (mc){
if (mc.visible){
Mouse.show();
} else {
mc.stop();
FlxG.framerate = 60;
Mouse.hide();
defaultGroup.members[0].alpha = (defaultGroup.members[0].alpha + (FlxG.elapsed / 2));
if (defaultGroup.members[0].alpha >= 1){
defaultGroup.members[0].alpha = 1;
if (!hole1.exists){
hole1.exists = true;
FlxG.play(SndGun);
};
hole1.health = (hole1.health + (FlxG.elapsed * 10));
if (hole1.health > 1){
if (!hole2.exists){
hole2.exists = true;
FlxG.play(SndGun);
};
hole2.health = (hole2.health + (FlxG.elapsed * 10));
if (hole2.health > 1){
if (!hole3.exists){
hole3.exists = true;
FlxG.play(SndGun);
};
hole3.health = (hole3.health + (FlxG.elapsed * 10));
if (hole3.health > 1){
FlxG.fade.start(4278190080, 2, function ():void{
FlxG.state = new MenuState();
});
};
};
};
};
};
};
super.update();
}
override public function create():void{
add(new FlxSprite((FlxG.width / 2), (FlxG.height / 2), ImgLogo));
defaultGroup.members[0].alpha = 0;
defaultGroup.members[0].x = (defaultGroup.members[0].x - (defaultGroup.members[0].width / 2));
defaultGroup.members[0].y = (defaultGroup.members[0].y - (defaultGroup.members[0].height / 2));
hole1 = new FlxSprite((FlxG.width / 2), (FlxG.height / 2), ImgHole);
hole2 = new FlxSprite(((FlxG.width / 2) + 32), ((FlxG.height / 2) + 32), ImgHole);
hole3 = new FlxSprite(((FlxG.width / 2) + 64), ((FlxG.height / 2) + 8), ImgHole);
hole1.exists = (hole2.exists = (hole3.exists = false));
hole1.health = (hole2.health = (hole2.health = 0));
add(hole1);
add(hole2);
add(hole3);
loader = new Loader();
loader.loadBytes(new intro());
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
FlxG.framerate = 24;
}
}
}//package org.mecha
Section 147
//logo_ImgHole (org.mecha.logo_ImgHole)
package org.mecha {
import mx.core.*;
public class logo_ImgHole extends BitmapAsset {
}
}//package org.mecha
Section 148
//logo_ImgLogo (org.mecha.logo_ImgLogo)
package org.mecha {
import mx.core.*;
public class logo_ImgLogo extends BitmapAsset {
}
}//package org.mecha
Section 149
//logo_intro (org.mecha.logo_intro)
package org.mecha {
import mx.core.*;
public class logo_intro extends ByteArrayAsset {
}
}//package org.mecha
Section 150
//logo_SndGun (org.mecha.logo_SndGun)
package org.mecha {
import mx.core.*;
public class logo_SndGun extends SoundAsset {
}
}//package org.mecha
Section 151
//MenuState (org.mecha.MenuState)
package org.mecha {
import org.flixel.*;
public class MenuState extends FlxState {
private var Music:Class;
private var ImgBiglock:Class;
private var rbigdoor:FlxSprite;
private var b1:FlxButton;
private var b3:FlxButton;
private var b4:FlxButton;
private var b2:FlxButton;
private var sndctr:Number;// = 0
private var Machine:Class;
private var biglock:FlxSprite;
private var Imgmainmenu:Class;
private var SndAir:Class;
private var timer:Number;
private var vcursor:FlxSprite;
private var ImgOnoff:Class;
private var ImgSmalllock:Class;
private var ImgMidlock:Class;
private var detail:Boolean;// = true
private var optionmenu:FlxSprite;
private var title:FlxSprite;
private var Imgcredit:Class;
private var detailsprite:FlxSprite;
private var selecting:int;// = 0
private var midlock:FlxSprite;
private var ImgTitle:Class;
private var ticks:int;// = 0
private var SndMsg:Class;
private var ImgSelect:Class;
private var soundonoffsprite:FlxSprite;
private var ImgFrame:Class;
private var ImgSmoke:Class;
private var saves:FlxSave;
private var ImgUnselect:Class;
private var mainmenu:FlxSprite;
private var fxonoff:Boolean;// = true
private var lbigyell:FlxSprite;
private var smalllock:FlxSprite;
private var Imgcursor:Class;
private var hcursor:FlxSprite;
private var lbigdoor:FlxSprite;
private var creditmenu:FlxSprite;
private var rbigyell:FlxSprite;
private var Imgoption:Class;
private var fxonoffsprite:FlxSprite;
private var ImgDoor:Class;
private var titleFrame:FlxSprite;
private var ImgYellow:Class;
private var airBurst1:FlxEmitter;
private var select:int;// = 0
public function MenuState(){
Imgmainmenu = MenuState_Imgmainmenu;
SndMsg = MenuState_SndMsg;
Imgoption = MenuState_Imgoption;
Imgcredit = MenuState_Imgcredit;
ImgDoor = MenuState_ImgDoor;
ImgYellow = MenuState_ImgYellow;
Imgcursor = MenuState_Imgcursor;
ImgUnselect = MenuState_ImgUnselect;
ImgSelect = MenuState_ImgSelect;
ImgOnoff = MenuState_ImgOnoff;
ImgBiglock = MenuState_ImgBiglock;
ImgMidlock = MenuState_ImgMidlock;
ImgSmalllock = MenuState_ImgSmalllock;
Music = MenuState_Music;
Machine = MenuState_Machine;
SndAir = MenuState_SndAir;
ImgSmoke = MenuState_ImgSmoke;
ImgFrame = MenuState_ImgFrame;
ImgTitle = MenuState_ImgTitle;
super();
}
override public function create():void{
FlxG.flash.start(4278190080, 0.5);
FlxG.playMusic(Music);
FlxG.bot_list.init_bot();
FlxG.bot_list.shuffle_bot();
saves = new FlxSave();
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("kills");
saves.bind("killed");
saves.bind("shothit");
saves.bind("shotfired");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("battle_mode");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
FlxG.global7 = 2;
if (saves.read("fx") == null){
fxonoff = (detail = true);
} else {
fxonoff = saves.read("fx");
detail = saves.read("detail");
};
title = new FlxSprite(0, 34, ImgTitle);
title.scale.y = 0;
titleFrame = new FlxSprite(0, 0, ImgFrame);
titleFrame.x = (320 - (titleFrame.width / 2));
title.x = (320 - (title.width / 2));
lbigdoor = new FlxSprite(-20, 0, ImgDoor);
rbigdoor = new FlxSprite(300, 0, ImgDoor);
lbigyell = new FlxSprite(240, 0, ImgYellow);
rbigyell = new FlxSprite(320, 0, ImgYellow);
biglock = new FlxSprite(270, 240, ImgBiglock);
midlock = new FlxSprite(270, 240, ImgMidlock);
smalllock = new FlxSprite(270, 240, ImgSmalllock);
biglock.antialiasing = (smalllock.antialiasing = (midlock.antialiasing = true));
biglock.angle = (midlock.angle = (smalllock.angle = 0));
mainmenu = new FlxSprite();
mainmenu.loadGraphic(Imgmainmenu);
mainmenu.blend = "screen";
mainmenu.x = (320 - (mainmenu.width / 2));
mainmenu.y = (480 - mainmenu.height);
optionmenu = new FlxSprite();
optionmenu.loadGraphic(Imgoption);
optionmenu.blend = "screen";
optionmenu.x = -(optionmenu.width);
optionmenu.y = (480 - optionmenu.height);
creditmenu = new FlxSprite();
creditmenu.loadGraphic(Imgcredit);
creditmenu.blend = "screen";
creditmenu.x = 640;
creditmenu.y = (480 - creditmenu.height);
soundonoffsprite = new FlxSprite();
soundonoffsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
soundonoffsprite.blend = "screen";
soundonoffsprite.y = 235;
detailsprite = new FlxSprite();
detailsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
detailsprite.blend = "screen";
detailsprite.y = 285;
fxonoffsprite = new FlxSprite();
fxonoffsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
fxonoffsprite.blend = "screen";
fxonoffsprite.y = 335;
fxonoffsprite.frame = 1;
hcursor = new FlxSprite();
hcursor.loadGraphic(Imgcursor);
hcursor.scale.x = 11;
vcursor = new FlxSprite();
vcursor.loadGraphic(Imgcursor);
vcursor.scale.x = 8;
vcursor.angle = 90;
var _local1:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local2:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local2.blend = "screen";
_local2.alpha = 0.75;
b1 = new FlxButton(0, 230, enter_1);
b1.loadGraphic(_local1, _local2);
var _local3:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local4:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local4.blend = "screen";
_local4.alpha = 0.75;
b2 = new FlxButton(0, 280, enter_2);
b2.loadGraphic(_local3, _local4);
var _local5:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local6:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local6.blend = "screen";
_local6.alpha = 0.75;
b3 = new FlxButton(0, 330, enter_3);
b3.loadGraphic(_local5, _local6);
var _local7:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local8:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local8.blend = "screen";
_local8.alpha = 0.75;
b4 = new FlxButton(0, 380, enter_4);
b4.loadGraphic(_local7, _local8);
b1.x = (320 - (b1.width / 2));
b2.x = (320 - (b2.width / 2));
b3.x = (320 - (b3.width / 2));
b4.x = (320 - (b4.width / 2));
airBurst1 = new FlxEmitter(320, 300);
airBurst1.createSprites(ImgSmoke, 40, 0);
airBurst1.particleDrag.x = (airBurst1.particleDrag.y = 1000);
airBurst1.delay = 1;
airBurst1.resize = true;
airBurst1.gravity = 0;
add(lbigdoor);
add(rbigdoor);
add(lbigyell);
add(rbigyell);
add(titleFrame);
add(title);
add(airBurst1);
add(midlock);
add(biglock);
add(smalllock);
add(mainmenu);
add(optionmenu);
add(creditmenu);
add(soundonoffsprite);
add(detailsprite);
add(fxonoffsprite);
add(b1);
add(b2);
add(b3);
add(b4);
add(hcursor);
add(vcursor);
select = -1;
mainmenu.scale.y = 0;
b1.visible = (b2.visible = (b3.visible = (b4.visible = false)));
if (FlxG.mute == false){
soundonoffsprite.frame = 0;
} else {
soundonoffsprite.frame = 1;
};
if (fxonoff == false){
fxonoffsprite.frame = 1;
} else {
fxonoffsprite.frame = 0;
};
if (detail == false){
detailsprite.frame = 1;
} else {
detailsprite.frame = 0;
};
timer = 0;
}
private function enter_2():void{
FlxG.play(SndMsg);
if (selecting == 1){
if (detail == true){
detail = false;
detailsprite.frame = 1;
} else {
detail = true;
detailsprite.frame = 0;
};
} else {
select = 2;
};
}
private function enter_4():void{
FlxG.play(SndMsg);
if (selecting == 1){
saves.write("fx", fxonoff);
saves.write("detail", detail);
saves.write("dummy", 0);
select = -2;
} else {
FlxU.openURL("http://www.nx8.com/?utm_source=MeCha&utm_medium=MeCha&utm_campaign=MeCha");
};
}
private function enter_3():void{
FlxG.play(SndMsg);
if (selecting == 1){
if (fxonoff == true){
fxonoff = false;
fxonoffsprite.frame = 1;
} else {
fxonoff = true;
fxonoffsprite.frame = 0;
};
} else {
select = 3;
};
}
private function enter_1():void{
FlxG.play(SndMsg);
if (selecting == 1){
if (FlxG.mute == true){
FlxG.mute = false;
soundonoffsprite.frame = 0;
} else {
FlxG.mute = true;
soundonoffsprite.frame = 1;
};
} else {
select = 1;
};
}
override public function update():void{
var d:Number;
hcursor.x = 300;
hcursor.y = FlxG.mouse.y;
vcursor.y = 220;
vcursor.x = (FlxG.mouse.x - 32);
if (select >= 1){
b1.visible = (b2.visible = (b3.visible = (b4.visible = false)));
mainmenu.scale.y = (mainmenu.scale.y - (FlxG.elapsed * 2));
};
if (select == -1){
mainmenu.visible = true;
mainmenu.scale.y = (mainmenu.scale.y + (FlxG.elapsed * 2));
title.scale.y = (title.scale.y + (FlxG.elapsed * 2));
if (title.scale.y > 1){
title.scale.y = 1;
};
if (mainmenu.scale.y > 1){
b1.visible = (b2.visible = (b3.visible = (b4.visible = true)));
b1.x = (b2.x = (b3.x = (b4.x = (320 - (b1.width / 2)))));
mainmenu.scale.y = 1;
select = 0;
selecting = 0;
};
};
if (select == -2){
b1.visible = (b2.visible = (b3.visible = (b4.visible = false)));
optionmenu.x = (optionmenu.x - (FlxG.elapsed * 500));
if (optionmenu.x <= -(optionmenu.width)){
optionmenu.x = -(optionmenu.width);
select = -1;
};
};
if (select == -3){
b1.visible = (b2.visible = (b3.visible = (b4.visible = false)));
creditmenu.x = (creditmenu.x + (FlxG.elapsed * 500));
if (creditmenu.x >= 640){
creditmenu.x = 640;
select = -1;
};
};
if (mainmenu.scale.y <= 0){
mainmenu.scale.y = 0;
mainmenu.visible = false;
if (select == 1){
if (biglock.angle < 90){
biglock.angle = (biglock.angle + (FlxG.elapsed * 50));
midlock.angle = (midlock.angle + (FlxG.elapsed * 50));
smalllock.angle = (smalllock.angle - (FlxG.elapsed * 50));
sndctr = (sndctr - FlxG.elapsed);
if (sndctr <= 0){
sndctr = 0.2;
FlxG.play(Machine);
};
} else {
if (timer == 0){
FlxG.play(SndAir);
airBurst1.start(false, 0.02, 50);
};
timer = (timer + FlxG.elapsed);
if (timer > 1.5){
airBurst1.stop();
biglock.angle = (midlock.angle = 90);
smalllock.angle = -90;
d = (FlxG.elapsed * 150);
title.scale.y = (title.scale.y - (d * 0.02));
if (title.scale.y <= 0){
title.scale.y = 0;
title.exists = false;
titleFrame.y = (titleFrame.y - d);
};
lbigyell.x = (lbigyell.x - d);
rbigyell.x = (rbigyell.x + d);
biglock.x = (biglock.x + d);
smalllock.x = (smalllock.x - d);
midlock.x = (midlock.x - d);
lbigdoor.x = (lbigdoor.x - d);
rbigdoor.x = (rbigdoor.x + d);
if (lbigdoor.x < -200){
with ({}) {
with ({}) {
!ERROR!.fadeout = function ():void{
saves.write("fx", fxonoff);
saves.write("detail", detail);
FlxG.quake.stop();
saves.write("dummy", 0);
FlxG.state = new CheckProfileState();
};
};
FlxG.fade.start(4278190080, 1, function ():void{
saves.write("fx", fxonoff);
saves.write("detail", detail);
FlxG.quake.stop();
saves.write("dummy", 0);
FlxG.state = new CheckProfileState();
});
};
} else {
if (biglock.scale.x < 1.1){
biglock.scale.x = (biglock.scale.x + FlxG.elapsed);
};
midlock.scale.x = (midlock.scale.y = (smalllock.scale.y = (smalllock.scale.x = (biglock.scale.y = biglock.scale.x))));
ticks++;
ticks = (ticks % 4);
if (ticks == 0){
airBurst1.setXSpeed(300, 400);
airBurst1.setYSpeed(300, 400);
} else {
if (ticks == 1){
airBurst1.setXSpeed(300, 400);
airBurst1.setYSpeed(-400, -300);
} else {
if (ticks == 2){
airBurst1.setXSpeed(-400, -300);
airBurst1.setYSpeed(300, 400);
} else {
airBurst1.setXSpeed(-400, -300);
airBurst1.setYSpeed(-400, -300);
};
};
};
};
};
};
if (select == 2){
optionmenu.x = (optionmenu.x + (FlxG.elapsed * 500));
if (optionmenu.x >= 0){
b1.visible = (b2.visible = (b3.visible = (b4.visible = true)));
b1.x = (b2.x = (b3.x = (b4.x = -40)));
optionmenu.x = 0;
selecting = 1;
};
};
if (select == 3){
creditmenu.x = (creditmenu.x - (FlxG.elapsed * 500));
if (creditmenu.x <= (640 - creditmenu.width)){
creditmenu.x = (640 - creditmenu.width);
selecting = 1;
if (FlxG.mouse.pressed() == true){
select = -3;
selecting = 0;
};
};
};
};
fxonoffsprite.x = (detailsprite.x = (soundonoffsprite.x = (optionmenu.x + 100)));
super.update();
}
}
}//package org.mecha
Section 152
//MenuState_ImgBiglock (org.mecha.MenuState_ImgBiglock)
package org.mecha {
import mx.core.*;
public class MenuState_ImgBiglock extends BitmapAsset {
}
}//package org.mecha
Section 153
//MenuState_Imgcredit (org.mecha.MenuState_Imgcredit)
package org.mecha {
import mx.core.*;
public class MenuState_Imgcredit extends BitmapAsset {
}
}//package org.mecha
Section 154
//MenuState_Imgcursor (org.mecha.MenuState_Imgcursor)
package org.mecha {
import mx.core.*;
public class MenuState_Imgcursor extends BitmapAsset {
}
}//package org.mecha
Section 155
//MenuState_ImgDoor (org.mecha.MenuState_ImgDoor)
package org.mecha {
import mx.core.*;
public class MenuState_ImgDoor extends BitmapAsset {
}
}//package org.mecha
Section 156
//MenuState_ImgFrame (org.mecha.MenuState_ImgFrame)
package org.mecha {
import mx.core.*;
public class MenuState_ImgFrame extends BitmapAsset {
}
}//package org.mecha
Section 157
//MenuState_Imgmainmenu (org.mecha.MenuState_Imgmainmenu)
package org.mecha {
import mx.core.*;
public class MenuState_Imgmainmenu extends BitmapAsset {
}
}//package org.mecha
Section 158
//MenuState_ImgMidlock (org.mecha.MenuState_ImgMidlock)
package org.mecha {
import mx.core.*;
public class MenuState_ImgMidlock extends BitmapAsset {
}
}//package org.mecha
Section 159
//MenuState_ImgOnoff (org.mecha.MenuState_ImgOnoff)
package org.mecha {
import mx.core.*;
public class MenuState_ImgOnoff extends BitmapAsset {
}
}//package org.mecha
Section 160
//MenuState_Imgoption (org.mecha.MenuState_Imgoption)
package org.mecha {
import mx.core.*;
public class MenuState_Imgoption extends BitmapAsset {
}
}//package org.mecha
Section 161
//MenuState_ImgSelect (org.mecha.MenuState_ImgSelect)
package org.mecha {
import mx.core.*;
public class MenuState_ImgSelect extends BitmapAsset {
}
}//package org.mecha
Section 162
//MenuState_ImgSmalllock (org.mecha.MenuState_ImgSmalllock)
package org.mecha {
import mx.core.*;
public class MenuState_ImgSmalllock extends BitmapAsset {
}
}//package org.mecha
Section 163
//MenuState_ImgSmoke (org.mecha.MenuState_ImgSmoke)
package org.mecha {
import mx.core.*;
public class MenuState_ImgSmoke extends BitmapAsset {
}
}//package org.mecha
Section 164
//MenuState_ImgTitle (org.mecha.MenuState_ImgTitle)
package org.mecha {
import mx.core.*;
public class MenuState_ImgTitle extends BitmapAsset {
}
}//package org.mecha
Section 165
//MenuState_ImgUnselect (org.mecha.MenuState_ImgUnselect)
package org.mecha {
import mx.core.*;
public class MenuState_ImgUnselect extends BitmapAsset {
}
}//package org.mecha
Section 166
//MenuState_ImgYellow (org.mecha.MenuState_ImgYellow)
package org.mecha {
import mx.core.*;
public class MenuState_ImgYellow extends BitmapAsset {
}
}//package org.mecha
Section 167
//MenuState_Machine (org.mecha.MenuState_Machine)
package org.mecha {
import mx.core.*;
public class MenuState_Machine extends SoundAsset {
}
}//package org.mecha
Section 168
//MenuState_Music (org.mecha.MenuState_Music)
package org.mecha {
import mx.core.*;
public class MenuState_Music extends SoundAsset {
}
}//package org.mecha
Section 169
//MenuState_SndAir (org.mecha.MenuState_SndAir)
package org.mecha {
import mx.core.*;
public class MenuState_SndAir extends SoundAsset {
}
}//package org.mecha
Section 170
//MenuState_SndMsg (org.mecha.MenuState_SndMsg)
package org.mecha {
import mx.core.*;
public class MenuState_SndMsg extends SoundAsset {
}
}//package org.mecha
Section 171
//Player (org.mecha.Player)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
public class Player extends FlxSprite {
private var SndLaser:Class;
private var turn_speed:int;
public var die:int;// = 0
public var spc_ctr:Number;// = 0
private var respawnable:Boolean;// = false
private var flipper:int;// = 1
private var fire_ctr:int;
public var score:FlxText;
public var weapon:int;// = 1
private var SndMissile:Class;
private var SndZap:Class;
private var fspeed:Number;// = 0
private var _explode:FlxEmitter;
private var SndCannon:Class;
private var last_post:Point;
public var tipe:int;
private var fire_per_click:int;// = 5
public var score_win:int;// = 0
private var reset_ctr:Number;// = 0
private var sspeed:Number;// = 0
public var movement:int;// = 2
private var rattach:FlxSprite;
private var lattach:FlxSprite;
public var _palsu:FlxSprite;
private var timer:Number;// = 0
private var SndGun:Class;
public var maxhealth:int;
public var _parent:PlayState;
private var numbedfx:FlxSprite;
public var ammo:int;
public var crosshair:FlxSprite;
public var kills:int;// = 0
private var SndExplode:Class;
public var botname:String;
private var score_die:int;// = 0
private var bullet_array:FlxGroup;
public var shot_hit:int;// = 0
private var r2f:Number;// = 0
public var score_kill:int;// = 0
public var spc_charge:Number;// = 0
private var bot_array:FlxGroup;
private var redbar:FlxSprite;
private var swave:FlxSprite;
private var _wpn:FlxSprite;
public var shot_fired:int;// = 0
private var disruptedfx:FlxSprite;
public function Player(_arg1:PlayState, _arg2:int){
SndMissile = Player_SndMissile;
SndLaser = Player_SndLaser;
SndCannon = Player_SndCannon;
SndGun = Player_SndGun;
SndZap = Player_SndZap;
SndExplode = Player_SndExplode;
lattach = new FlxSprite(320, 240);
rattach = new FlxSprite(320, 240);
last_post = new Point();
score = new FlxText(0, 0, 70, "0");
crosshair = new FlxSprite();
swave = new FlxSprite();
redbar = new FlxSprite(5, 40);
numbedfx = new FlxSprite();
disruptedfx = new FlxSprite();
super();
weapon = (FlxG.global2 + 1);
ammo = FlxG.global3;
loadGraphic(_arg1.ImgPlayer, true, false, 32, 32);
_explode = new FlxEmitter(x, y);
_explode.createSprites(_arg1.ImgExplode, 20, 8);
_arg1.add(_explode);
_parent = _arg1;
x = (_parent.playground.width / 8);
y = (_parent.playground.height - 128);
tipe = _arg2;
_palsu = new FlxSprite(320, 240);
_palsu.loadGraphic(_arg1.ImgPlayer, true, false, 32, 32);
_palsu.scrollFactor.x = (_palsu.scrollFactor.y = 0);
_palsu.addAnimation("red", [0]);
_palsu.addAnimation("white", [1]);
_palsu.addAnimation("cyclone", [2]);
_palsu.addAnimation("sting", [3]);
_palsu.addAnimation("arm", [4]);
_palsu.addAnimation("shell", [5]);
_palsu.addAnimation("reaper", [6]);
_palsu.addAnimation("bunny", [7]);
_palsu.play("white");
_wpn = new FlxSprite(320, 240);
_wpn.loadGraphic(_arg1.ImgWpn, true, false, 32, 32);
_wpn.addAnimation("gatling", [0]);
_wpn.addAnimation("dual", [1]);
_wpn.addAnimation("beam", [2]);
_wpn.addAnimation("rocket", [3]);
_wpn.addAnimation("cannon", [4]);
_wpn.addAnimation("bigcannon", [5]);
_wpn.addAnimation("ion", [6]);
_wpn.addAnimation("disruptor", [7]);
_wpn.scrollFactor.x = (_wpn.scrollFactor.y = 0);
lattach.loadGraphic(_arg1.ImgAttach, false, true, 32, 32);
rattach.loadGraphic(_arg1.ImgAttach, false, true, 32, 32);
lattach.addAnimation("burner", [0]);
rattach.addAnimation("burner", [0]);
lattach.addAnimation("wing", [1]);
rattach.addAnimation("wing", [1]);
lattach.addAnimation("cyclone", [8]);
rattach.addAnimation("cyclone", [2]);
lattach.addAnimation("sting", [3]);
rattach.addAnimation("sting", [3]);
lattach.addAnimation("arm", [4]);
rattach.addAnimation("arm", [4]);
lattach.addAnimation("shell", [5]);
rattach.addAnimation("shell", [5]);
lattach.addAnimation("scythe", [6]);
rattach.addAnimation("scythe", [6]);
lattach.addAnimation("bunny", [7]);
rattach.addAnimation("bunny", [7]);
rattach.scrollFactor.x = (rattach.scrollFactor.y = 0);
lattach.scrollFactor.x = (lattach.scrollFactor.y = 0);
visible = false;
maxThrust = 250;
drag.x = (drag.y = 250);
health = 10;
bullet_array = _arg1.bullet_array;
_explode.gravity = 0;
_explode.delay = 1;
if (_arg1.training){
tipe = 8;
weapon = 1;
};
swave.loadGraphic(_arg1.Imgswave);
swave.exists = false;
_arg1.add(swave);
if (tipe == 1){
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_palsu);
_arg1.add(_wpn);
scale.x = (scale.y = 1.5);
_palsu.scale.x = (_palsu.scale.y = 1.5);
_palsu.x = (_palsu.x + 6);
_palsu.y = (_palsu.y + 6);
rattach.play("burner");
lattach.play("burner");
offset.x = (offset.y = -8);
width = (height = 48);
_palsu.play("red");
maxhealth = 50;
maxThrust = 125;
turn_speed = 100;
};
if (tipe == 2){
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_palsu);
_arg1.add(_wpn);
_palsu.play("white");
rattach.play("wing");
lattach.play("wing");
lattach.scale.x = -1;
maxhealth = 25;
turn_speed = 250;
rattach.origin.x = 0;
rattach.origin.y = rattach.frameHeight;
lattach.origin.x = 0;
lattach.origin.y = lattach.frameHeight;
};
if (tipe == 3){
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_palsu);
_arg1.add(_wpn);
maxhealth = 20;
_palsu.play("cyclone");
rattach.play("cyclone");
lattach.play("cyclone");
lattach.exists = false;
lattach.visible = false;
turn_speed = 300;
};
if (tipe == 4){
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_palsu);
_arg1.add(_wpn);
maxhealth = 25;
maxThrust = 150;
drag.x = (drag.y = 350);
_palsu.play("sting");
rattach.play("sting");
lattach.play("sting");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
rattach.scrollFactor.x = (rattach.scrollFactor.y = 1);
lattach.scrollFactor.x = (lattach.scrollFactor.y = 1);
};
if (tipe == 5){
_arg1.add(_palsu);
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_wpn);
maxhealth = 20;
maxThrust = 280;
drag.x = (drag.y = 350);
_palsu.play("arm");
rattach.play("arm");
lattach.play("arm");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 160;
lattach.scale.x = -1;
rattach.origin.x = 0;
rattach.origin.y = rattach.frameHeight;
lattach.origin.x = 0;
lattach.origin.y = lattach.frameHeight;
};
if (tipe == 7){
_arg1.add(_palsu);
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_wpn);
maxhealth = 25;
maxThrust = 250;
drag.x = (drag.y = 350);
_palsu.play("reaper");
rattach.play("scythe");
lattach.play("scythe");
rattach.scale.y = -1;
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
rattach.scrollFactor.x = (rattach.scrollFactor.y = 1);
lattach.scrollFactor.x = (lattach.scrollFactor.y = 1);
rattach.origin.y = 0;
rattach.origin.x = rattach.frameHeight;
lattach.origin.y = 0;
lattach.origin.x = lattach.frameHeight;
};
if (tipe == 8){
_arg1.add(_palsu);
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_wpn);
maxhealth = 25;
maxThrust = 300;
drag.x = (drag.y = 350);
_palsu.play("bunny");
rattach.play("bunny");
lattach.play("bunny");
rattach.scale.x = -1;
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 400;
rattach.origin.x = 0;
rattach.origin.y = rattach.frameHeight;
lattach.origin.x = 0;
lattach.origin.y = lattach.frameHeight;
};
if (tipe == 6){
_arg1.add(_palsu);
_arg1.add(lattach);
_arg1.add(rattach);
_arg1.add(_wpn);
maxhealth = 30;
maxThrust = 180;
drag.x = (drag.y = 350);
_palsu.play("shell");
rattach.play("shell");
lattach.play("shell");
rattach.drag.x = (lattach.drag.x = (rattach.drag.y = (lattach.drag.y = 350)));
turn_speed = 200;
lattach.scale.y = -1;
};
maxhealth = (10 + (FlxG.global4 / 10));
maxVelocity.y = (maxVelocity.x = maxThrust);
health = maxhealth;
crosshair.loadGraphic(_arg1.Imgcross);
crosshair.antialiasing = true;
if (_arg1.mode == 2){
respawnable = true;
};
if (_arg1.mode == 4){
respawnable = true;
};
_wpn.id = 10;
if (weapon == 1){
_wpn.play("gatling");
fire_per_click = 5;
};
if (weapon == 2){
_wpn.play("dual");
fire_per_click = 3;
_wpn.id = 0;
};
if (weapon == 3){
_wpn.play("beam");
fire_per_click = 1;
};
if (weapon == 4){
_wpn.play("rocket");
fire_per_click = 1;
_wpn.id = 0;
};
if (weapon == 5){
_wpn.play("cannon");
fire_per_click = 3;
};
if (weapon == 6){
_wpn.play("bigcannon");
fire_per_click = 1;
};
if (weapon == 7){
_wpn.play("ion");
fire_per_click = 3;
};
if (weapon == 8){
_wpn.play("disruptor");
fire_per_click = 1;
};
numbedfx.loadGraphic(_arg1.ImgNumbed);
numbedfx.exists = false;
disruptedfx.loadGraphic(_arg1.ImgDisrupted);
disruptedfx.exists = false;
_arg1.add(numbedfx);
_arg1.add(disruptedfx);
redbar.createGraphic(70, 20, 2164195328);
redbar.exists = false;
_arg1.add(redbar);
bot_array = _arg1.bot_array;
movement = FlxG.global7;
}
override public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
if (_parent.training){
health = 0;
} else {
kill();
};
};
}
private function shoot(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int):void{
var _local5:bullet;
_local5 = (bullet_array.getFirstAvail() as bullet);
if (((!((_local5 == null))) && ((disrupted <= 0)))){
_local5.shoot(_arg1, _arg2, _arg3, _arg4, 0);
shot_fired++;
};
}
public function respawn():void{
_parent.gt.checkpoint(0, "respawned");
ammo = FlxG.global3;
redbar.exists = false;
_wpn.visible = true;
dead = false;
_palsu.visible = true;
x = (_parent.playground.width / 8);
y = (_parent.playground.height - 128);
health = 10;
rattach.visible = true;
if (tipe != 3){
lattach.visible = true;
};
health = maxhealth;
disrupted = (numbed = 0);
}
override public function update():void{
var _local3:Point;
var _local4:Number;
var _local5:FlxPoint;
var _local6:int;
var _local7:FlxPoint;
var _local8:int;
var _local9:Number;
var _local10:FlxPoint;
var _local11:Number;
if (_parent == null){
bot_array = null;
bullet_array = null;
return;
};
lattach.antialiasing = (rattach.antialiasing = (_palsu.antialiasing = antialiasing));
var _local1:Number = FlxG.elapsed;
var _local2:Number = 0;
timer = (timer + _local1);
if (!dead){
_local3 = new Point(((x - FlxG.mouse.x) + 30), ((y - FlxG.mouse.y) + 30));
if (_local3.x > 200){
_local3.x = 200;
};
if (_local3.y > 200){
_local3.y = 200;
};
if (_local3.x < -200){
_local3.x = -200;
};
if (_local3.y < -200){
_local3.y = -200;
};
if (_local3.length > 100){
_local2 = ((_local3.length - 50) * 2);
} else {
_local2 = 0;
};
if (_local2 > maxThrust){
_local2 = maxThrust;
};
_local4 = FlxU.getAngle(_local3.x, _local3.y);
if (FlxU.get_direction(angle, _local4) > 3){
angularVelocity = -(turn_speed);
};
if (FlxU.get_direction(angle, _local4) < -3){
angularVelocity = turn_speed;
};
if (Math.abs(FlxU.get_direction(angle, _local4)) < 3){
angularVelocity = 0;
angle = _local4;
};
_wpn.angle = _palsu.angle;
if ((((movement == 2)) && ((spc_ctr <= 0)))){
_wpn.angle = angle;
thrust = 0;
acceleration.x = (acceleration.y = 0);
_local6 = 0;
if (((FlxG.keys.UP) || (FlxG.keys.W))){
acceleration.y = (-(maxThrust) * 10);
};
if (((FlxG.keys.DOWN) || (FlxG.keys.S))){
acceleration.y = (maxThrust * 10);
};
if (((FlxG.keys.RIGHT) || (FlxG.keys.D))){
acceleration.x = (maxThrust * 10);
};
if (((FlxG.keys.LEFT) || (FlxG.keys.A))){
acceleration.x = (-(maxThrust) * 10);
};
_local4 = FlxU.getAngle(-(velocity.x), -(velocity.y));
_local3.x = velocity.x;
_local3.y = velocity.y;
if (FlxU.get_direction(_palsu.angle, _local4) > 3){
_palsu.angularVelocity = -(turn_speed);
};
if (FlxU.get_direction(_palsu.angle, _local4) < -3){
_palsu.angularVelocity = turn_speed;
};
if (Math.abs(FlxU.get_direction(_palsu.angle, _local4)) < 3){
_palsu.angularVelocity = 0;
_palsu.angle = _local4;
angle = _local4;
};
_wpn.angle = FlxU.getAngle((x - FlxG.mouse.x), (y - FlxG.mouse.y));
} else {
if (movement == 1){
if (((FlxG.keys.UP) || (FlxG.keys.W))){
fspeed = (fspeed + (_local1 * maxThrust));
if (fspeed > maxThrust){
fspeed = maxThrust;
};
_local6++;
};
if (((FlxG.keys.DOWN) || (FlxG.keys.S))){
fspeed = (fspeed - (_local1 * maxThrust));
if (fspeed < (-(maxThrust) / 2)){
fspeed = (-(maxThrust) / 2);
};
_local6++;
};
if (_local6 == 0){
if (fspeed < 0){
fspeed = (fspeed + (_local1 * maxThrust));
};
if (fspeed > 0){
fspeed = (fspeed - (_local1 * maxThrust));
};
};
_local6 = 0;
if (((FlxG.keys.RIGHT) || (FlxG.keys.D))){
sspeed = (maxThrust / 2);
_local6++;
};
if (((FlxG.keys.LEFT) || (FlxG.keys.A))){
sspeed = (-(maxThrust) / 2);
_local6++;
};
if (_local6 == 0){
if (sspeed < 0){
sspeed = (sspeed + (_local1 * maxThrust));
};
if (sspeed > 0){
sspeed = (sspeed - (_local1 * maxThrust));
};
};
velocity = FlxU.rotatePoint(-(fspeed), -(sspeed), 0, 0, angle);
_palsu.angle = angle;
} else {
thrust = _local2;
_palsu.angle = angle;
};
};
if (((FlxG.mouse.justPressed()) && ((fire_ctr <= 0)))){
fire_ctr = fire_per_click;
};
if (FlxG.mouse.pressed()){
spc_charge = (spc_charge + _local1);
if (tipe == 6){
spc_charge = (spc_charge + (_local1 * 0.5));
};
if (spc_charge > 5){
spc_charge = 5;
};
if ((((spc_charge > 3)) && (!((tipe == 2))))){
thrust = (thrust / 2);
};
} else {
if (_parent.spc_ready == true){
if (spc_charge >= 5){
_parent.spc_req = true;
_parent.spc_ready = false;
spc_ctr = 1;
if (tipe == 8){
_parent.healwind.start(false, 0.05, 20);
};
};
spc_charge = 0;
};
};
if (weapon == 4){
_wpn.angle = _palsu.angle;
};
_local5 = FlxU.rotatePoint(5, -(_wpn.id), 0, 0, _palsu.angle);
_local7 = FlxU.rotatePoint(((r2f / 2) - 10), 0, 0, 0, _wpn.angle);
_wpn.x = ((_palsu.x + _local7.x) + _local5.x);
_wpn.y = ((_palsu.y + _local7.y) + _local5.y);
if ((((fire_ctr > 0)) && ((spc_ctr <= 0)))){
if (r2f <= 0){
if (ammo > 0){
ammo--;
fire_ctr--;
_local7 = new FlxPoint();
if (weapon == 1){
shoot(((x + 8) + _local5.x), ((y + 8) + _local5.y), ((_wpn.angle + (Math.random() * 10)) - 5), 1);
FlxG.play(SndGun, 0.8);
r2f = 1;
};
if (weapon == 2){
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (_wpn.angle - 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), _wpn.angle, 2);
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (_wpn.angle + 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), _wpn.angle, 2);
FlxG.play(SndLaser);
r2f = 3;
};
if (weapon == 3){
_local8 = 0;
while (_local8 < 5) {
_local7 = FlxU.rotatePoint((-16 * _local8), 0, 0, 0, _wpn.angle);
shoot((((x + 8) + _local5.x) + _local7.x), (((y + 8) + _local5.y) + _local7.y), _wpn.angle, 3);
_local8 = (_local8 + 2);
};
FlxG.play(SndLaser);
r2f = 10;
};
if (weapon == 4){
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (_wpn.angle - 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), _wpn.angle, 4);
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (_wpn.angle + 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), _wpn.angle, 4);
FlxG.play(SndMissile);
r2f = 20;
};
if (weapon == 5){
shoot(((x + 8) + _local5.x), ((y + 8) + _local5.y), ((_wpn.angle + (Math.random() * 10)) - 5), 5);
FlxG.play(SndGun);
r2f = 2;
};
if (weapon == 6){
shoot(((x + 8) + _local5.x), ((y + 8) + _local5.y), ((_wpn.angle + (Math.random() * 10)) - 5), 9);
FlxG.play(SndCannon);
r2f = 25;
};
if (weapon == 7){
shoot(((x + 8) + _local5.x), (((y + 8) + _local5.y) + _local7.y), _wpn.angle, 10);
FlxG.play(SndZap);
r2f = 5;
};
if (weapon == 8){
shoot(((x + 8) + _local5.x), ((y + 8) + _local5.y), _wpn.angle, 11);
FlxG.play(SndZap);
r2f = 3;
};
};
if (weapon == 40){
_local8 = -60;
while (_local8 <= 60) {
if (_local8 != 0){
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (angle + _local8));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), (angle + _local8), 4);
};
_local8 = (_local8 + 20);
};
FlxG.play(SndMissile);
r2f = 20;
};
};
};
r2f = (r2f - (_local1 * 10));
if (tipe == 1){
_local3.x = velocity.x;
_local3.y = velocity.y;
_local3.normalize(maxThrust);
if (_palsu.angularVelocity == 0){
rattach.scale.x = (rattach.scale.y = (_local3.length / 150));
lattach.scale.x = (lattach.scale.y = (_local3.length / 150));
_local7 = FlxU.rotatePoint(16, (16 + (24 * rattach.scale.x)), 0, 0, (_palsu.angle - 90));
rattach.scale.y = (rattach.scale.y * flipper);
rattach.x = (_palsu.x + _local7.x);
rattach.y = (_palsu.y + _local7.y);
rattach.angle = _palsu.angle;
_local7 = FlxU.rotatePoint(16, -((16 + (24 * rattach.scale.x))), 0, 0, (_palsu.angle + 90));
lattach.scale.y = (lattach.scale.y * flipper);
lattach.x = (_palsu.x + _local7.x);
lattach.y = (_palsu.y + _local7.y);
lattach.angle = _palsu.angle;
} else {
lattach.scale.x = (lattach.scale.y = 0);
rattach.scale.y = (rattach.scale.y * flipper);
rattach.scale.x = 0.5;
if (_palsu.angularVelocity < 0){
_local7 = FlxU.rotatePoint(-16, -32, 0, 0, _palsu.angle);
rattach.x = (_palsu.x + _local7.x);
rattach.y = (_palsu.y + _local7.y);
rattach.angle = (_palsu.angle - 90);
} else {
_local7 = FlxU.rotatePoint(-16, 32, 0, 0, _palsu.angle);
rattach.x = (_palsu.x + _local7.x);
rattach.y = (_palsu.y + _local7.y);
rattach.angle = (_palsu.angle + 90);
};
};
if (spc_ctr > 0){
spc_ctr = (spc_ctr - _local1);
if (r2f <= 0){
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), (angle + (spc_ctr * 10)), 4);
_local7 = FlxU.rotatePoint(-8, 0, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), (angle - (spc_ctr * 10)), 4);
FlxG.play(SndMissile);
r2f = 2.5;
};
};
};
if ((((((tipe == 2)) || ((tipe == 5)))) || ((tipe == 8)))){
_local9 = ((_local3.length * 0.5) - 30);
if (_local9 > 30){
_local9 = 30;
};
if (tipe == 8){
if (FlxU.get_direction(rattach.angle, (_palsu.angle + 120)) > 5){
rattach.angularVelocity = -200;
} else {
if (FlxU.get_direction(rattach.angle, (_palsu.angle + 120)) < -5){
rattach.angularVelocity = 200;
} else {
rattach.angle = (_palsu.angle + 120);
rattach.angularVelocity = 0;
};
};
if (FlxU.get_direction(lattach.angle, (_palsu.angle + 60)) > 5){
lattach.angularVelocity = -200;
} else {
if (FlxU.get_direction(lattach.angle, (_palsu.angle + 60)) < -5){
lattach.angularVelocity = 200;
} else {
lattach.angularVelocity = 0;
lattach.angle = (_palsu.angle + 60);
};
};
} else {
rattach.angle = (_palsu.angle + _local9);
lattach.angle = ((_palsu.angle - _local9) - 180);
};
if ((((spc_ctr > 0)) || (FlxG.keys.SPACE))){
velocity.x = (velocity.x * 0.25);
velocity.y = (velocity.y * 0.25);
angularVelocity = (angularVelocity * 0.25);
spc_ctr = (spc_ctr - _local1);
if (tipe == 5){
if (spc_ctr > 0.8){
rattach.angle = ((angle - 135) + ((spc_ctr - 0.8) * 675));
lattach.angle = (((angle + 135) - ((spc_ctr - 0.8) * 675)) - 180);
};
if (spc_ctr < 0.2){
rattach.angle = ((angle - 135) + ((0.2 - spc_ctr) * 675));
lattach.angle = (((angle + 135) - ((0.2 - spc_ctr) * 675)) - 180);
_parent.laser.exists = false;
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
spc_ctr = (spc_ctr + (_local1 * 0.75));
_parent.laser.exists = true;
_local10 = new FlxPoint();
_local10 = FlxU.rotatePoint(-500, 0, 0, 0, angle);
if (_parent.playground.ray((x + 16), (y + 16), (x + _local10.x), (y + _local10.y), _local10)){
_local10.x = (_local10.x - (x + 16));
_local10.y = (_local10.y - (y + 16));
_parent.laser.scale.x = (new Point(_local10.x, _local10.y).length / 100);
} else {
_parent.laser.scale.x = 3;
};
rattach.angle = (angle - 135);
lattach.angle = ((angle + 135) - 180);
_local7 = FlxU.rotatePoint(-(((50 * _parent.laser.scale.x) + 20)), 0, 0, 0, angle);
_parent.laser.x = ((_local7.x + x) - 34);
_parent.laser.y = ((_local7.y + y) + 8);
_parent.laser.angle = angle;
_local8 = 0;
while (_local8 < 8) {
if (((!((_local8 == id))) && ((bot_array.members[_local8].dead == false)))){
_local10 = FlxU.rotatePoint((bot_array.members[_local8].x - x), (bot_array.members[_local8].y - y), 0, 0, -(angle));
if ((((((((_local10.y > -32)) && ((_local10.y < 32)))) && ((_local10.x < 0)))) && ((_local10.x > (-(_parent.laser.scale.x) * 100))))){
if ((((((((bot_array.members[_local8].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local8].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local8].hit_id = id;
bot_array.members[_local8].hurt((FlxG.elapsed * 100));
};
};
};
_local8++;
};
};
} else {
if (tipe == 2){
spc_ctr = (spc_ctr + (_local1 * 0.5));
if (spc_ctr > 0.8){
rattach.angle = ((angle - 90) + ((spc_ctr - 0.8) * 450));
lattach.angle = (((angle + 90) - ((spc_ctr - 0.8) * 450)) - 180);
};
if (spc_ctr < 0.2){
rattach.angle = ((angle - 90) + ((0.2 - spc_ctr) * 450));
lattach.angle = (((angle + 90) - ((0.2 - spc_ctr) * 450)) - 180);
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
rattach.angle = (angle - 90);
lattach.angle = ((angle + 90) - 180);
if (r2f <= 0){
_local7 = FlxU.rotatePoint(16, -16, 0, 0, (angle - 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), ((angle + 45) + (spc_ctr * 30)), 6);
_local7 = FlxU.rotatePoint(16, 16, 0, 0, (angle + 90));
shoot(((x + (width * 0.25)) + _local7.x), ((y + (height * 0.25)) + _local7.y), ((angle - 45) - (spc_ctr * 30)), 6);
FlxG.play(SndZap);
r2f = 2;
};
};
};
};
};
_local7 = FlxU.rotatePoint(-8, -8, 0, 0, _palsu.angle);
rattach.x = ((_palsu.x + _local7.x) + 16);
rattach.y = ((_palsu.y + _local7.y) - 16);
_local7 = FlxU.rotatePoint(-8, 8, 0, 0, _palsu.angle);
lattach.x = ((_palsu.x + _local7.x) + 16);
lattach.y = ((_palsu.y + _local7.y) - 16);
};
if (tipe == 3){
rattach.scale.x = (rattach.scale.y = 1.5);
rattach.x = _palsu.x;
rattach.y = _palsu.y;
rattach.angle = (rattach.angle + (_local1 * (300 + _local2)));
if (spc_ctr > 0){
rattach.angle = (rattach.angle + (_local1 * 500));
spc_ctr = (spc_ctr - (_local1 * 0.2));
if (spc_ctr <= 0.25){
lattach.exists = (lattach.visible = (swave.exists = false));
};
if ((((spc_ctr > 0.25)) && ((spc_ctr < 0.75)))){
rattach.angle = (rattach.angle + (_local1 * 500));
lattach.angle = (rattach.angle * 0.5);
lattach.x = _palsu.x;
lattach.y = _palsu.y;
lattach.scale.x = (lattach.scale.y = 3);
lattach.exists = (lattach.visible = (swave.exists = true));
swave.scale.x = (swave.scale.x + (_local1 * 10));
if (swave.scale.x > 2){
swave.scale.x = 0;
};
swave.scale.y = swave.scale.x;
swave.x = (x - 32);
swave.y = (y - 32);
swave.alpha = (2 - swave.scale.x);
_local8 = 0;
while (_local8 < 8) {
if (((!((_local8 == id))) && ((bot_array.members[_local8].dead == false)))){
if (new Point((x - bot_array.members[_local8].x), (y - bot_array.members[_local8].y)).length < 100){
if ((((((((bot_array.members[_local8].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local8].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local8].hurt((_local1 * 50));
bot_array.members[_local8].hit_id = id;
};
};
};
_local8++;
};
};
};
};
if (tipe == 4){
_local3.x = (x - rattach.x);
_local3.y = (y - rattach.y);
if (_local3.length > 10){
rattach.velocity.x = (_local3.x * 10);
rattach.velocity.y = (_local3.y * 10);
} else {
rattach.velocity.x = (rattach.velocity.y = 0);
};
rattach.angle = FlxU.getAngle(-(_local3.x), -(_local3.y));
_local3.x = (rattach.x - lattach.x);
_local3.y = (rattach.y - lattach.y);
if (_local3.length > 10){
lattach.velocity.x = (_local3.x * 10);
lattach.velocity.y = (_local3.y * 10);
} else {
lattach.velocity.x = (lattach.velocity.y = 0);
};
lattach.angle = FlxU.getAngle(-(_local3.x), -(_local3.y));
if ((timer % 2) < 0.5){
_local2 = 0;
} else {
_local2 = (maxThrust * 2);
};
if (spc_ctr > 0){
_local8 = 0;
while (_local8 < 360) {
_local7 = FlxU.rotatePoint(-32, 0, 0, 0, _local8);
shoot((x + _local7.x), (y + _local7.y), _local8, 8);
_local8 = (_local8 + 10);
};
spc_ctr = 0;
};
};
if (tipe == 6){
rattach.angle = _palsu.angle;
lattach.angle = _palsu.angle;
if (spc_ctr > 0){
velocity.x = (velocity.x * 0.25);
velocity.y = (velocity.y * 0.25);
angularVelocity = (angularVelocity * 0.25);
spc_ctr = (spc_ctr - (_local1 * 0.5));
if (spc_ctr > 0.8){
rattach.angle = (rattach.angle + (90 - ((spc_ctr - 0.8) * 450)));
lattach.angle = (lattach.angle - (90 - ((spc_ctr - 0.8) * 450)));
};
if (spc_ctr < 0.2){
rattach.angle = (rattach.angle + (90 - ((0.2 - spc_ctr) * 450)));
lattach.angle = (lattach.angle - (90 - ((0.2 - spc_ctr) * 450)));
};
if ((((spc_ctr > 0.2)) && ((spc_ctr < 0.8)))){
rattach.angle = (rattach.angle + 90);
lattach.angle = (lattach.angle - 90);
if (r2f <= 0){
_local7 = FlxU.rotatePoint(((Math.random() * 8) - 4), -8, 0, 0, (angle - 90));
shoot((x + _local7.x), (y + _local7.y), ((angle + (Math.random() * 30)) - 15), 7);
FlxG.play(SndZap);
r2f = 1;
};
};
};
_local7 = FlxU.rotatePoint(16, -16, 0, 0, (rattach.angle - 90));
rattach.x = (_palsu.x + _local7.x);
rattach.y = (_palsu.y + _local7.y);
_local7 = FlxU.rotatePoint(16, 16, 0, 0, (lattach.angle + 90));
lattach.x = (_palsu.x + _local7.x);
lattach.y = (_palsu.y + _local7.y);
};
if (tipe == 7){
_local3.x = ((x - 16) - rattach.x);
_local3.y = ((y + 16) - rattach.y);
if (_local3.length > 10){
rattach.velocity.x = (_local3.x * 10);
rattach.velocity.y = (_local3.y * 10);
} else {
rattach.velocity.x = (rattach.velocity.y = 0);
};
rattach.angle = (FlxU.getAngle(-(_local3.x), -(_local3.y)) + 15);
_local3.x = ((x - 16) - lattach.x);
_local3.y = ((y + 16) - lattach.y);
if (_local3.length > 10){
lattach.velocity.x = (_local3.x * 10);
lattach.velocity.y = (_local3.y * 10);
} else {
lattach.velocity.x = (lattach.velocity.y = 0);
};
lattach.angle = (FlxU.getAngle(-(_local3.x), -(_local3.y)) - 15);
if (spc_ctr > 0.9){
spc_ctr = (spc_ctr - _local1);
rattach.angle = ((angle + 90) - (270 * 0.9));
};
if ((((spc_ctr > 0)) && ((spc_ctr <= 0.9)))){
rattach.scale.x = 2;
rattach.scale.y = -2;
rattach.angle = ((angle + 90) - (spc_ctr * 270));
spc_ctr = (spc_ctr - (_local1 * 5));
_local8 = 0;
while (_local8 < 8) {
if (((!((_local8 == id))) && ((bot_array.members[_local8].dead == false)))){
if (new Point((x - bot_array.members[_local8].x), (y - bot_array.members[_local8].y)).length < 100){
_local11 = FlxU.getAngle((x - bot_array.members[_local8].x), (y - bot_array.members[_local8].y));
if (Math.abs(FlxU.get_direction(_local11, angle)) < 90){
if ((((((((bot_array.members[_local8].id < 4)) && ((id >= 4)))) || ((((bot_array.members[_local8].id >= 4)) && ((id < 4)))))) || ((_parent.mode <= 2)))){
bot_array.members[_local8].hurt(99);
};
};
};
};
_local8++;
};
};
if (spc_ctr <= 0){
spc_ctr = 0;
rattach.scale.x = 1;
rattach.scale.y = -1;
};
};
if ((((tipe == 8)) && ((spc_ctr > 0)))){
_parent.healwind.x = (x - 16);
_parent.healwind.y = (y - 16);
health = (health + (_local1 * 10));
if (health > maxhealth){
_parent.healwind.stop();
health = maxhealth;
spc_ctr = 0;
};
};
if (numbed > 0){
numbedfx.visible = (numbedfx.exists = true);
numbedfx.angle = (Math.random() * 360);
velocity.x = (velocity.y = (angularVelocity = 0));
numbed = (numbed - _local1);
numbedfx.x = x;
numbedfx.y = y;
} else {
numbedfx.exists = false;
};
if (disrupted > 0){
disruptedfx.visible = (disruptedfx.exists = true);
disruptedfx.angle = (_palsu.angle - 90);
disrupted = (disrupted - _local1);
disruptedfx.scale.x = (disruptedfx.scale.x * -1);
disruptedfx.x = x;
disruptedfx.y = y;
} else {
disruptedfx.exists = false;
};
} else {
_parent.laser.exists = false;
rattach.visible = false;
lattach.visible = false;
_wpn.visible = false;
if (respawnable){
reset_ctr = (reset_ctr - _local1);
};
if (reset_ctr <= 0){
respawn();
};
velocity.x = (velocity.y = 0);
};
flipper = (flipper * -1);
if (r2f < 0){
r2f = 0;
};
super.update();
crosshair.x = (FlxG.mouse.x - 15);
crosshair.y = (FlxG.mouse.y - 15);
crosshair.angle = (angle - 90);
redbar.scrollFactor.x = (redbar.scrollFactor.y = 0);
}
override public function kill():void{
var _local1:int;
if (!dead){
_parent.cam_id = (hit_id - 1);
FlxG.quake.start(0.01, 0.5);
die++;
score_die++;
_local1 = (_parent.saves.read("killed") as int);
_local1++;
_parent.gt.checkpoint(_local1, "killed by", bot_array.members[hit_id].botname);
_parent.saves.write("killed", _local1);
bot_array.members[hit_id].kills++;
if (_parent.mode >= 2){
bot_array.members[hit_id].score.text = bot_array.members[hit_id].kills.toString();
};
FlxG.play(SndExplode);
_explode.at(this);
_explode.start();
dead = true;
_palsu.visible = false;
reset_ctr = 2;
spc_charge = (spc_ctr = 0);
swave.exists = false;
numbedfx.visible = (disruptedfx.visible = (numbedfx.exists = (disruptedfx.exists = false)));
if (respawnable == false){
x = -100;
y = -100;
redbar.exists = true;
};
};
}
}
}//package org.mecha
Section 172
//Player_SndCannon (org.mecha.Player_SndCannon)
package org.mecha {
import mx.core.*;
public class Player_SndCannon extends SoundAsset {
}
}//package org.mecha
Section 173
//Player_SndExplode (org.mecha.Player_SndExplode)
package org.mecha {
import mx.core.*;
public class Player_SndExplode extends SoundAsset {
}
}//package org.mecha
Section 174
//Player_SndGun (org.mecha.Player_SndGun)
package org.mecha {
import mx.core.*;
public class Player_SndGun extends SoundAsset {
}
}//package org.mecha
Section 175
//Player_SndLaser (org.mecha.Player_SndLaser)
package org.mecha {
import mx.core.*;
public class Player_SndLaser extends SoundAsset {
}
}//package org.mecha
Section 176
//Player_SndMissile (org.mecha.Player_SndMissile)
package org.mecha {
import mx.core.*;
public class Player_SndMissile extends SoundAsset {
}
}//package org.mecha
Section 177
//Player_SndZap (org.mecha.Player_SndZap)
package org.mecha {
import mx.core.*;
public class Player_SndZap extends SoundAsset {
}
}//package org.mecha
Section 178
//PlayState (org.mecha.PlayState)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
import FGL.GameTracker.*;
import flash.filters.*;
public class PlayState extends FlxState {
private var Music:Class;
private var Imgflare:Class;
private var b1:FlxButton;
public var ImgDisrupted:Class;
public var ImgWpn:Class;
private var b5:FlxButton;
private var b6:FlxButton;
private var b7:FlxButton;
private var ImgLebar:Class;
private var b3:FlxButton;
private var mili:Number;
private var ctr:int;
public var path:Array;
public var Imgswave:Class;
public var ImgHeal:Class;
public var blueartifact:FlxSprite;
private var pauseGroup:FlxGroup;
private var anti_alisaing:Boolean;
private var b4:FlxButton;
public var bluebase:FlxSprite;
private var temppoint:Point;
private var b2:FlxButton;
private var winner:int;// = -999
public var bonus:FlxSprite;
private var prize:int;// = 0
public var redcollectp:FlxSprite;
private var TrainMap:Class;
private var Imgbonus:Class;
private var spectating:FlxText;
private var resultGroup:FlxGroup;
public var ImgPlayer:Class;
private var detailsprite:FlxSprite;
private var ImgLifebar:Class;
public var Imgcross:Class;
private var ImgSelect:Class;
private var ImgArtB:Class;
private var ImgB2B2:Class;
public var spc_req:Boolean;// = false
private var seconds:int;
private var ImgQuit:Class;
public var saves:FlxSave;
private var ImgArtR:Class;
private var finish_counting:Boolean;
private var totalkill:int;// = 0
public var scoreUI:FlxSprite;
public var path2:Array;
private var Imgcursor:Class;
public var ImgNumbed:Class;
public var money:int;
private var TxtMap1:Class;
private var TxtMap5:Class;
private var TxtMap0:Class;
private var Music2:Class;
private var ammo:FlxText;
private var TxtMap6:Class;
private var TxtMap7:Class;
private var time:FlxText;
private var TxtMap3:Class;
private var TxtMap4:Class;
private var fx:FlxSprite;
private var battle_end:Boolean;
public var bullet_array:FlxGroup;
private var SingleMap2:Class;
private var my_rank:int;
private var SingleMap4:Class;
private var SingleMap5:Class;
private var SingleMap6:Class;
private var SingleMap7:Class;
private var SingleMap1:Class;
private var minutes:int;
public var bluecollectp:FlxSprite;
public var redbase:FlxSprite;
private var ptimer:Point;
private var SingleMap3:Class;
private var ImgTile:Class;
public var training:Boolean;
private var TxtMap2:Class;
private var ImgQB:Class;
private var powerbar:FlxSprite;
public var kills:int;// = 0
public var laser:FlxSprite;
public var gt:GameTracker;
public var Imglaser:Class;
public var _bot:bot;
private var sndcling:Class;
private var ImgBase:Class;
private var lose:int;// = 0
private var ImgTarget:Class;
private var resultBG:FlxSprite;
public var idctr:int;// = 0
private var cash:FlxText;
public var paused:Boolean;
private var SndGun:Class;
private var target_sprite:FlxSprite;
private var friendly_fire:Boolean;// = false
private var ImgOnoff:Class;
private var vcursor:FlxSprite;
public var chat:chatter;
private var control:FlxText;
private var ImgTile1:Class;
private var ImgTile2:Class;
private var ImgTile3:Class;
private var ImgTile4:Class;
private var ImgTile5:Class;
private var ImgTile6:Class;
private var ImgTile7:Class;
private var ImgMenuBG:Class;
private var fx_toggle:Boolean;
public var redartifact:FlxSprite;
private var spc_timer:Number;// = 0
private var ImgTile8:Class;
private var ImgCash:Class;
private var SndMsg:Class;
private var soundonoffsprite:FlxSprite;
public var smoke_array:FlxGroup;
public var cam_id:int;// = 1
private var ImgB2B:Class;
private var ImgUnselect:Class;
private var pawsbg:FlxSprite;
public var tutor_ctr:int;// = 0
private var fx2:FlxSprite;
private var ImgB2M:Class;
private var Imgscoreui:Class;
public var chat_timer:Number;// = 0
private var lifebar:FlxSprite;
private var ImgCArea:Class;
private var pctr:Point;
public var mode:int;// = 2
private var win_text:FlxText;
public var playground:FlxTilemap;
public var ImgAttach:Class;
public var spc_ready:Boolean;// = false
public var ImgExplode:Class;
public var explotion_array:FlxGroup;
public var pid:Player;
private var start_counting:Boolean;
private var ImgB2M2:Class;
private var win:int;// = 0
private var flare:FlxSprite;
private var ImgQB2:Class;
public var bot_array:FlxGroup;
private var ImgPbar:Class;
private var pausescreen:FlxSprite;
private var fxonoffsprite:FlxSprite;
private var hcursor:FlxSprite;
public var healwind:FlxEmitter;
private var lebar:FlxSprite;
private var fctr:int;
public function PlayState(){
ImgQuit = PlayState_ImgQuit;
ImgOnoff = PlayState_ImgOnoff;
SndMsg = PlayState_SndMsg;
ImgMenuBG = PlayState_ImgMenuBG;
Imgswave = PlayState_Imgswave;
sndcling = PlayState_sndcling;
ImgExplode = PlayState_ImgExplode;
ImgWpn = PlayState_ImgWpn;
Imglaser = PlayState_Imglaser;
ImgPlayer = PlayState_ImgPlayer;
ImgAttach = PlayState_ImgAttach;
ImgNumbed = PlayState_ImgNumbed;
ImgHeal = PlayState_ImgHeal;
ImgDisrupted = PlayState_ImgDisrupted;
ImgTile = PlayState_ImgTile;
ImgTile1 = PlayState_ImgTile1;
ImgTile2 = PlayState_ImgTile2;
ImgTile3 = PlayState_ImgTile3;
ImgTile4 = PlayState_ImgTile4;
ImgTile5 = PlayState_ImgTile5;
ImgTile6 = PlayState_ImgTile6;
ImgTile7 = PlayState_ImgTile7;
ImgTile8 = PlayState_ImgTile8;
TrainMap = PlayState_TrainMap;
TxtMap0 = PlayState_TxtMap0;
SingleMap1 = PlayState_SingleMap1;
SingleMap2 = PlayState_SingleMap2;
SingleMap3 = PlayState_SingleMap3;
SingleMap4 = PlayState_SingleMap4;
SingleMap5 = PlayState_SingleMap5;
SingleMap6 = PlayState_SingleMap6;
SingleMap7 = PlayState_SingleMap7;
TxtMap1 = PlayState_TxtMap1;
TxtMap2 = PlayState_TxtMap2;
TxtMap3 = PlayState_TxtMap3;
TxtMap4 = PlayState_TxtMap4;
TxtMap5 = PlayState_TxtMap5;
TxtMap6 = PlayState_TxtMap6;
TxtMap7 = PlayState_TxtMap7;
Music2 = PlayState_Music2;
Music = PlayState_Music;
SndGun = PlayState_SndGun;
ImgLifebar = PlayState_ImgLifebar;
ImgLebar = PlayState_ImgLebar;
ImgPbar = PlayState_ImgPbar;
Imgscoreui = PlayState_Imgscoreui;
Imgcursor = PlayState_Imgcursor;
ImgUnselect = PlayState_ImgUnselect;
ImgSelect = PlayState_ImgSelect;
ImgB2B = PlayState_ImgB2B;
ImgB2B2 = PlayState_ImgB2B2;
ImgB2M = PlayState_ImgB2M;
ImgB2M2 = PlayState_ImgB2M2;
ImgQB = PlayState_ImgQB;
ImgQB2 = PlayState_ImgQB2;
ImgArtR = PlayState_ImgArtR;
ImgArtB = PlayState_ImgArtB;
ImgCArea = PlayState_ImgCArea;
ImgBase = PlayState_ImgBase;
ImgTarget = PlayState_ImgTarget;
ImgCash = PlayState_ImgCash;
Imgcross = PlayState_Imgcross;
Imgbonus = PlayState_Imgbonus;
Imgflare = PlayState_Imgflare;
temppoint = new Point(0, 0);
smoke_array = new FlxGroup();
bot_array = new FlxGroup();
bullet_array = new FlxGroup();
pctr = new Point(0, 0);
ptimer = new Point(0, 0);
gt = new GameTracker();
explotion_array = new FlxGroup();
super();
}
private function enter_1():void{
if (paused == false){
return;
};
FlxG.play(SndMsg);
if (FlxG.mute == true){
FlxG.mute = false;
soundonoffsprite.frame = 0;
} else {
FlxG.mute = true;
soundonoffsprite.frame = 1;
};
}
private function enter_2():void{
if (paused == false){
return;
};
FlxG.play(SndMsg);
if (anti_alisaing == true){
anti_alisaing = false;
detailsprite.frame = 1;
} else {
anti_alisaing = true;
detailsprite.frame = 0;
};
pawsbg.antialiasing = anti_alisaing;
control.antialiasing = anti_alisaing;
resultBG.antialiasing = anti_alisaing;
var _local1:int;
while (_local1 < 8) {
bot_array.members[_local1].antialiasing = anti_alisaing;
_local1++;
};
saves.write("detail", anti_alisaing);
}
private function enter_3():void{
if (paused == false){
return;
};
FlxG.play(SndMsg);
if (fx_toggle == true){
fx_toggle = false;
fxonoffsprite.frame = 1;
} else {
fx_toggle = true;
fxonoffsprite.frame = 0;
};
saves.write("fx", fx_toggle);
}
private function enter_4():void{
if (paused == false){
return;
};
FlxG.play(SndMsg);
paused = false;
}
private function enter_5():void{
if (paused == false){
return;
};
FlxG.music.stop();
FlxG.play(SndMsg);
chat._parent = null;
var _local1:int;
while (_local1 < bullet_array.members.length) {
bullet_array.members[_local1]._parent = null;
_local1++;
};
_local1 = 0;
while (_local1 < bot_array.members.length) {
bot_array.members[_local1]._parent = null;
_local1++;
};
pauseGroup.destroy();
bot_array.destroy();
bullet_array.destroy();
smoke_array.destroy();
explotion_array.destroy();
FlxG.state = new MenuState();
}
private function enter_7():void{
if (paused == false){
return;
};
FlxG.play(SndMsg);
if (pid.movement == 0){
control.text = "Mouse + WSAD";
pid.movement = 2;
} else {
control.text = "Mouse Only";
pid.movement = 0;
};
FlxG.global7 = pid.movement;
}
private function end_battle():void{
var _local2:int;
var _local3:int;
FlxG.music.stop();
FlxG.playMusic(Music2);
if ((((winner == 0)) || ((win >= 2)))){
_local2 = (saves.read("current_level") as int);
_local2 = (_local2 + 1);
saves.write("current_level", _local2);
};
saves.write("money", money);
saves.write("shothit", pid.shot_hit);
saves.write("shotfired", pid.shot_fired);
saves.write("kills", totalkill);
if (((training) && ((pid.health == pid.maxhealth)))){
_local3 = (saves.read("bot_open") as int);
_local3 = (_local3 | Math.pow(2, 8));
saves.write("bot_open", _local3);
};
FlxG.global8 = money;
chat._parent = null;
var _local1:int;
while (_local1 < bullet_array.members.length) {
bullet_array.members[_local1]._parent = null;
_local1++;
};
_local1 = 0;
while (_local1 < bot_array.members.length) {
bot_array.members[_local1]._parent = null;
_local1++;
};
pauseGroup.destroy();
bot_array.destroy();
bullet_array.destroy();
smoke_array.destroy();
explotion_array.destroy();
FlxG.scroll.x = (FlxG.scroll.y = 0);
if ((((((((lose >= 3)) && ((mode > 2)))) || (((!((winner == 0))) && ((mode <= 2)))))) || (training))){
FlxG.state = new ProfileState();
} else {
if (_local2 > 6){
FlxG.state = new WinnerState();
} else {
FlxG.state = new SelectState();
};
};
}
private function enter_6():void{
if (paused == false){
return;
};
FlxG.music.stop();
training = true;
end_battle();
}
override public function update():void{
var i:int;
var maxkill:int;
var anywins:Boolean;
var tailp:FlxPoint;
idctr++;
chat_timer = (chat_timer + FlxG.elapsed);
FlxU.overlap(bonus, pid, function ():void{
if (bonus.frame == 0){
if (pid.weapon == 0){
pid.ammo = (pid.ammo + 100);
} else {
if (pid.weapon == 1){
pid.ammo = (pid.ammo + 50);
} else {
if (pid.weapon == 2){
pid.ammo = (pid.ammo + 10);
} else {
if (pid.weapon == 3){
pid.ammo = (pid.ammo + 10);
} else {
if (pid.weapon == 4){
pid.ammo = (pid.ammo + 40);
} else {
if (pid.weapon == 5){
pid.ammo = (pid.ammo + 10);
} else {
if (pid.weapon == 6){
pid.ammo = (pid.ammo + 60);
} else {
if (pid.weapon == 7){
pid.ammo = (pid.ammo + 30);
};
};
};
};
};
};
};
};
} else {
pid.health = (pid.health + 5);
if (pid.health > pid.maxhealth){
pid.health = pid.maxhealth;
};
};
bonus.kill();
});
if (bonus.exists){
flare.x = (bonus.x - 4);
flare.y = (bonus.y - 4);
bonus.hurt(FlxG.elapsed);
flare.angle = (flare.angle + (FlxG.elapsed * 100));
flare.scale.x = (flare.scale.y = (2 + (Math.sin((flare.angle / 50)) * 0.2)));
flare.exists = (flare.visible = true);
} else {
flare.exists = (flare.visible = false);
};
if (training){
if (chat_timer > 2){
chat.addchat((1001 + tutor_ctr), 0);
chat_timer = 0;
chat_timer = 0;
tutor_ctr++;
};
if ((((((((tutor_ctr >= 23)) && ((bot_array.members[4].exists == false)))) && ((bot_array.members[5].exists == false)))) && ((bot_array.members[6].exists == false)))){
show_result();
};
if (tutor_ctr == 10){
if ((((((bot_array.members[1].exists == false)) && ((bot_array.members[2].exists == false)))) && ((bot_array.members[3].exists == false)))){
if ((((((bot_array.members[4].exists == false)) && ((bot_array.members[5].exists == false)))) && ((bot_array.members[6].exists == false)))){
bot_array.members[4].exists = true;
bot_array.members[4].x = 100;
bot_array.members[4].y = 400;
bot_array.members[5].exists = true;
bot_array.members[5].x = 400;
bot_array.members[5].y = 400;
bot_array.members[6].exists = true;
bot_array.members[6].x = 700;
bot_array.members[6].y = 400;
};
} else {
chat_timer = 0;
};
};
if (redartifact.exists){
redartifact.angle = (redartifact.angle + (FlxG.elapsed * 5));
if (tutor_ctr >= 8){
tutor_ctr = 8;
chat_timer = 0;
};
if (redartifact.overlaps(pid)){
pid.ammo = 999;
redartifact.exists = false;
bot_array.members[1].exists = true;
bot_array.members[1].x = 100;
bot_array.members[1].y = 100;
bot_array.members[2].exists = true;
bot_array.members[2].x = 400;
bot_array.members[2].y = 100;
bot_array.members[3].exists = true;
bot_array.members[3].x = 700;
bot_array.members[3].y = 100;
};
};
};
cash.text = ("CASH :" + money.toString());
if ((((spc_req == true)) && ((spc_timer == 0)))){
fx.blend = "invert";
spc_timer = 1;
FlxG.timeScale = 0;
FlxG.play(sndcling);
};
if (spc_timer > 0){
spc_timer = (spc_timer - FlxG.elapsed2);
} else {
fx.blend = "screen";
FlxG.timeScale = 1;
spc_timer = 0;
spc_req = false;
spc_ready = true;
i = 0;
while (i < 8) {
if ((((bot_array.members[i].dead == false)) && ((bot_array.members[i].exists == true)))){
if (bot_array.members[i].spc_ctr > 0){
spc_ready = false;
};
};
i = (i + 1);
};
};
FlxU.collide(bot_array, playground);
FlxU.collide(bot_array, bot_array);
FlxU.overlap(bullet_array, bot_array, bullet_hit);
FlxG.scroll.x = -((pid.x - 320));
FlxG.scroll.y = -((pid.y - 240));
if (pid.dead == true){
if (((FlxG.mouse.justPressed()) || (bot_array.members[cam_id].dead))){
cam_id++;
cam_id = (cam_id % 8);
};
if (bot_array.members[cam_id].dead == false){
FlxG.scroll.x = -((bot_array.members[cam_id].x - 320));
FlxG.scroll.y = -((bot_array.members[cam_id].y - 240));
};
lifebar.exists = (lebar.exists = (ammo.exists = (powerbar.exists = false)));
spectating.exists = true;
} else {
lebar.x = ((437 + 166) - ((lebar.width * pid.health) / pid.maxhealth));
powerbar.x = ((437 + 177) - ((powerbar.width * pid.spc_charge) / 5));
lifebar.exists = (lebar.exists = (ammo.exists = (powerbar.exists = true)));
ammo.text = pid.ammo.toString();
spectating.exists = false;
};
var deads:int;
if (mode == 1){
i = 0;
while (i < 8) {
if (bot_array.members[i].dead == true){
deads = (deads + 1);
} else {
winner = i;
};
i = (i + 1);
};
if (deads == 7){
bot_array.members[winner].score.text = bot_array.members[winner].score_win.toString();
win_text.exists = true;
bullet_array.exists = false;
if (bot_array.members[winner].score_win >= 3){
show_result();
} else {
win_text.text = (bot_array.members[winner].botname + " WIN");
if (FlxG.fade.exists == false){
bot_array.members[winner].score_win++;
};
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
chat.addchat(1, 0);
FlxG.fade.stop();
win_text.exists = false;
respawn();
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
chat.addchat(1, 0);
FlxG.fade.stop();
win_text.exists = false;
respawn();
});
};
};
if (deads >= 8){
win_text.text = "NO BODY WINS";
if (bot_array.members[winner].score_win >= 3){
show_result();
} else {
chat.addchat(1, 0);
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win_text.exists = false;
respawn();
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win_text.exists = false;
respawn();
});
};
};
};
if (mode == 2){
mili = (mili - FlxG.elapsed);
if (mili <= 0){
mili = 1;
seconds--;
if (seconds <= 0){
seconds = 59;
minutes--;
};
if ((((minutes >= 0)) && ((seconds > 0)))){
if (seconds > 0){
time.text = (((" TIME=" + minutes.toString()) + ":") + seconds.toString());
} else {
time.text = (((" TIME=" + minutes.toString()) + ":0") + seconds.toString());
};
} else {
bullet_array.exists = false;
winner = 0;
maxkill = 0;
anywins = false;
i = 0;
while (i < 8) {
if (bot_array.members[i].kills > maxkill){
winner = i;
maxkill = bot_array.members[i].kills;
anywins = true;
};
i = (i + 1);
};
if (anywins){
win_text.text = (bot_array.members[winner].botname + " WIN");
} else {
win_text.text = "DRAW";
};
show_result();
};
};
};
if (mode == 3){
if ((((((((bot_array.members[4].exists == false)) && ((bot_array.members[5].exists == false)))) && ((bot_array.members[6].exists == false)))) && ((bot_array.members[7].exists == false)))){
win_text.exists = true;
if (win >= 2){
show_result();
} else {
win_text.text = "PLAYER'S TEAM WIN";
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
});
};
};
if ((((((((bot_array.members[0].dead == true)) && ((bot_array.members[1].exists == false)))) && ((bot_array.members[2].exists == false)))) && ((bot_array.members[3].exists == false)))){
win_text.exists = true;
if (lose >= 2){
show_result();
} else {
win_text.text = "PLAYER'S TEAM LOSE";
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
lose++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
lose++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
});
};
};
};
if (mode == 4){
FlxU.overlap(bot_array, redartifact, check_redart);
FlxU.overlap(bot_array, blueartifact, check_blueart);
FlxU.overlap(redcollectp, redartifact, check_bluecp);
FlxU.overlap(bluecollectp, blueartifact, check_redcp);
if (redartifact.id >= 0){
if (bot_array.members[(redartifact.id - 900)].health <= 0){
redartifact.id = -999;
} else {
tailp = new FlxPoint();
if ((redartifact.id - 900) > 0){
tailp = FlxU.rotatePoint(32, 0, 0, 0, bot_array.members[(redartifact.id - 900)].angle);
} else {
tailp = FlxU.rotatePoint(32, 0, 0, 0, bot_array.members[(redartifact.id - 900)]._palsu.angle);
};
redartifact.x = (bot_array.members[(redartifact.id - 900)].x + tailp.x);
redartifact.y = (bot_array.members[(redartifact.id - 900)].y + tailp.y);
};
} else {
if (redartifact.id == -999){
redartifact.x = (playground.width / 2);
redartifact.y = (playground.height - 0x0100);
};
};
if (blueartifact.id >= 0){
if (bot_array.members[(blueartifact.id - 900)].health <= 0){
blueartifact.id = -999;
} else {
tailp = FlxU.rotatePoint(32, 0, 0, 0, bot_array.members[(blueartifact.id - 900)].angle);
blueartifact.x = (bot_array.members[(blueartifact.id - 900)].x + tailp.x);
blueartifact.y = (bot_array.members[(blueartifact.id - 900)].y + tailp.y);
};
} else {
if (blueartifact.id == -999){
blueartifact.x = (playground.width / 2);
blueartifact.y = 0x0100;
};
};
};
if ((((((win >= 3)) || ((lose >= 3)))) || (battle_end))){
show_result();
i = 0;
while (i < 8) {
bot_array.members[i].spc_ctr = 0;
i = (i + 1);
};
};
if (((FlxG.keys.justPressed("P")) || (FlxG.keys.justPressed("ALT")))){
paused = !(paused);
if (paused == true){
temppoint.x = FlxG.scroll.x;
temppoint.y = FlxG.scroll.y;
pausescreen.draw(FlxState.screen);
FlxG.mouse.show();
pausescreen._framePixels.applyFilter(pausescreen._framePixels, pausescreen._framePixels.rect, new Point(0, 0), new BlurFilter(4, 4, 3));
pausescreen.alpha = 0.5;
} else {
FlxG.scroll.x = temppoint.x;
FlxG.scroll.y = temppoint.y;
};
};
if (paused){
FlxG.scroll.x = (FlxG.scroll.y = 0);
hcursor.x = 300;
hcursor.y = FlxG.mouse.y;
vcursor.y = 220;
vcursor.x = (FlxG.mouse.x - 32);
return (pauseGroup.update());
};
if (((FlxG.mouse.justReleased()) && (battle_end))){
if (!start_counting){
start_counting = true;
};
if (finish_counting){
FlxG.fade.start(4278190080, 1, end_battle);
};
};
super.update();
}
private function bullet_hit(_arg1:bullet, _arg2:FlxObject):void{
if (_arg1.id != _arg2.id){
if ((((((((_arg1.id < 4)) && ((_arg2.id >= 4)))) || ((((_arg1.id >= 4)) && ((_arg2.id < 4)))))) || (friendly_fire))){
if (_arg1.id == pid.id){
pid.shot_hit++;
};
_arg1.hurt(0);
_arg2.hurt(_arg1.damage);
if ((((_arg1.tipe == 8)) || ((_arg1.tipe == 10)))){
_arg2.numbed = 3;
};
if ((((_arg1.tipe == 7)) || ((_arg1.tipe == 11)))){
_arg2.disrupted = 3;
};
if (_arg1.tipe == 6){
_arg2.disrupted = 2;
_arg2.numbed = 2;
};
_arg2.hit_id = _arg1.id;
};
};
}
private function check_redcp(_arg1:FlxObject, _arg2:FlxObject):void{
var _bot = _arg1;
var _art = _arg2;
win_text.exists = true;
blueartifact.id = (redartifact.id = -990);
if (win >= 2){
show_result();
} else {
win_text.text = "PLAYER'S TEAM WIN";
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
redartifact.x = (blueartifact.x = (playground.width / 2));
redartifact.y = (playground.height - 0x0100);
blueartifact.y = 0x0100;
blueartifact.id = (redartifact.id = -999);
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
win++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
redartifact.x = (blueartifact.x = (playground.width / 2));
redartifact.y = (playground.height - 0x0100);
blueartifact.y = 0x0100;
blueartifact.id = (redartifact.id = -999);
});
};
}
override public function create():void{
var _local3:String;
var _local21:int;
var _local22:Point;
var _local23:int;
var _local24:explotion;
var _local25:smoke;
var _local26:bullet;
var _local27:FlxSprite;
FlxG.mouse.hide();
saves = new FlxSave();
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("kills");
saves.bind("killed");
saves.bind("shothit");
saves.bind("shotfired");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("battle_mode");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
fx_toggle = saves.read("fx");
anti_alisaing = saves.read("detail");
my_rank = (saves.read("class") as int);
money = (saves.read("money") as int);
totalkill = (saves.read("kills") as int);
var _local1:int = (saves.read("current_level") as int);
var _local2:int = FlxG.global1;
mode = (FlxG.global0 + 1);
if (mode <= 2){
friendly_fire = true;
};
healwind = new FlxEmitter();
playground = new FlxTilemap();
playground.auto = 1;
playground.startingIndex = 1;
playground.drawIndex = 0;
playground.collideIndex = 2;
if (mode == 0){
training = true;
mode = 1;
};
if (training){
_local3 = new TrainMap();
playground.loadMap(_local3, ImgTile);
redartifact = new FlxSprite(((3 * 32) - 16), ((22 * 32) - 16), Imgcross);
redartifact.pixels.colorTransform(redartifact.pixels.rect, new ColorTransform(1, 1, 1, 1, 100, 100));
this.add(playground);
add(redartifact);
redartifact.visible = false;
} else {
if (mode <= 2){
if (_local1 == 0){
_local3 = new SingleMap1();
} else {
if (_local1 == 1){
_local3 = new SingleMap2();
} else {
if (_local1 == 2){
_local3 = new SingleMap3();
} else {
if (_local1 == 3){
_local3 = new SingleMap4();
} else {
if (_local1 == 4){
_local3 = new SingleMap5();
} else {
if (_local1 == 5){
_local3 = new SingleMap6();
} else {
if (_local1 == 6){
_local3 = new SingleMap7();
};
};
};
};
};
};
};
} else {
if (_local1 == 0){
_local3 = new TxtMap1();
} else {
if (_local1 == 1){
_local3 = new TxtMap2();
} else {
if (_local1 == 2){
_local3 = new TxtMap3();
} else {
if (_local1 == 3){
_local3 = new TxtMap4();
} else {
if (_local1 == 4){
_local3 = new TxtMap5();
} else {
if (_local1 == 5){
_local3 = new TxtMap6();
} else {
if (_local1 == 6){
_local3 = new TxtMap7();
};
};
};
};
};
};
};
};
_local1 = (_local1 % 8);
if (_local1 == 7){
playground.loadMap(_local3, ImgTile8);
} else {
if (_local1 == 6){
playground.loadMap(_local3, ImgTile7);
} else {
if (_local1 == 5){
playground.loadMap(_local3, ImgTile6);
} else {
if (_local1 == 4){
playground.loadMap(_local3, ImgTile5);
} else {
if (_local1 == 3){
playground.loadMap(_local3, ImgTile4);
} else {
if (_local1 == 2){
playground.loadMap(_local3, ImgTile3);
} else {
if (_local1 == 1){
playground.loadMap(_local3, ImgTile2);
} else {
if (_local1 == 0){
playground.loadMap(_local3, ImgTile1);
};
};
};
};
};
};
};
};
this.add(playground);
};
flare = new FlxSprite(0, 0, Imgflare);
flare.exists = (flare.visible = false);
add(flare);
bonus = new FlxSprite();
bonus.loadGraphic(Imgbonus, false, false, 21, 21);
bonus.exists = (bonus.visible = false);
add(bonus);
if (mode == 4){
redcollectp = new FlxSprite(((playground.width / 2) - 32), 244, ImgCArea);
redcollectp.width = (redcollectp.height = 64);
redcollectp.offset.x = (redcollectp.offset.y = 32);
add(redcollectp);
bluecollectp = new FlxSprite(((playground.width / 2) - 32), (playground.height - 296), ImgCArea);
bluecollectp.width = (bluecollectp.height = 64);
bluecollectp.offset.x = (bluecollectp.offset.y = 32);
add(bluecollectp);
redartifact = new FlxSprite((playground.width / 2), (playground.height - 0x0100), ImgArtR);
redartifact.id = -999;
add(redartifact);
blueartifact = new FlxSprite((playground.width / 2), 0x0100, ImgArtB);
blueartifact.id = -999;
add(blueartifact);
};
path = new Array((playground.widthInTiles * playground.heightInTiles));
path2 = new Array((playground.widthInTiles * playground.heightInTiles));
var _local4:int;
while (_local4 < playground.widthInTiles) {
_local21 = 0;
while (_local21 < playground.heightInTiles) {
path[(_local4 + (_local21 * playground.widthInTiles))] = -1;
path2[(_local4 + (_local21 * playground.widthInTiles))] = -1;
_local21++;
};
_local4++;
};
if (mode <= 3){
_local4 = (playground.widthInTiles / 2);
_local21 = (playground.heightInTiles / 2);
_local4 = (_local4 - 5);
_local21 = (_local21 - 2);
while (playground.getTile(_local4, _local21) == 6) {
_local4++;
if (_local4 > (5 + (playground.widthInTiles / 2))){
_local4 = ((playground.widthInTiles / 2) - 5);
_local21++;
};
};
path[(_local4 + (playground.widthInTiles * _local21))] = 0x0100;
path2[(_local4 + (playground.widthInTiles * _local21))] = 0x0100;
} else {
if (mode == 4){
path[((redartifact.x / 32) + (playground.widthInTiles * (redartifact.y / 32)))] = 0x0100;
path2[((blueartifact.x / 32) + (playground.widthInTiles * (blueartifact.y / 32)))] = 0x0100;
};
};
var _local5:int;
while (_local5 < 0x0100) {
_local21 = 1;
while (_local21 < (playground.heightInTiles - 1)) {
_local4 = 1;
while (_local4 < (playground.widthInTiles - 1)) {
if (playground.getTile(_local4, _local21) == 1){
if (path[(_local4 + (_local21 * playground.widthInTiles))] < path[((_local4 - 1) + (_local21 * playground.widthInTiles))]){
path[(_local4 + (_local21 * playground.widthInTiles))] = (path[((_local4 - 1) + (_local21 * playground.widthInTiles))] - 1);
};
if (path[(_local4 + (_local21 * playground.widthInTiles))] < path[((_local4 + 1) + (_local21 * playground.widthInTiles))]){
path[(_local4 + (_local21 * playground.widthInTiles))] = (path[((_local4 + 1) + (_local21 * playground.widthInTiles))] - 1);
};
if (path[(_local4 + (_local21 * playground.widthInTiles))] < path[(_local4 + ((_local21 - 1) * playground.widthInTiles))]){
path[(_local4 + (_local21 * playground.widthInTiles))] = (path[(_local4 + ((_local21 - 1) * playground.widthInTiles))] - 1);
};
if (path[(_local4 + (_local21 * playground.widthInTiles))] < path[(_local4 + ((_local21 + 1) * playground.widthInTiles))]){
path[(_local4 + (_local21 * playground.widthInTiles))] = (path[(_local4 + ((_local21 + 1) * playground.widthInTiles))] - 1);
};
if (path2[(_local4 + (_local21 * playground.widthInTiles))] < path2[((_local4 - 1) + (_local21 * playground.widthInTiles))]){
path2[(_local4 + (_local21 * playground.widthInTiles))] = (path2[((_local4 - 1) + (_local21 * playground.widthInTiles))] - 1);
};
if (path2[(_local4 + (_local21 * playground.widthInTiles))] < path2[((_local4 + 1) + (_local21 * playground.widthInTiles))]){
path2[(_local4 + (_local21 * playground.widthInTiles))] = (path2[((_local4 + 1) + (_local21 * playground.widthInTiles))] - 1);
};
if (path2[(_local4 + (_local21 * playground.widthInTiles))] < path2[(_local4 + ((_local21 - 1) * playground.widthInTiles))]){
path2[(_local4 + (_local21 * playground.widthInTiles))] = (path2[(_local4 + ((_local21 - 1) * playground.widthInTiles))] - 1);
};
if (path2[(_local4 + (_local21 * playground.widthInTiles))] < path2[(_local4 + ((_local21 + 1) * playground.widthInTiles))]){
path2[(_local4 + (_local21 * playground.widthInTiles))] = (path2[(_local4 + ((_local21 + 1) * playground.widthInTiles))] - 1);
};
};
_local4++;
};
_local21++;
};
_local5++;
};
pid = new Player(this, _local2);
bot_array.add(add(pid));
var _local6:int = (Math.random() * 6);
if ((_local6 + 1) == _local2){
_local6 = (_local6 + 1);
};
_local6 = (_local6 % 6);
_local6 = (_local6 + 1);
if (_local1 == 6){
_local6 = 7;
};
var _local7:FlxText = new FlxText(0, 0, 70);
_local7.setFormat(null, 16, 15794175, "left");
scoreUI = new FlxSprite(0, 0).loadGraphic(Imgscoreui, false, false, 0, 0, true);
scoreUI.alpha = 1;
var _local8:int;
var _local9:int = (Math.random() * 9);
ctr = 0;
while (ctr < 7) {
_local8++;
_local22 = new Point((50 + ((ctr + (1 % 4)) * 280)), 0);
_local22.x = (((((ctr + 1) % 4) + 0.5) * playground.width) / 4);
_local23 = ((Math.random() * 10) % 6);
_local23++;
if ((((_local1 == 6)) && ((ctr == 6)))){
_local23 = 7;
};
_local23 = (_local23 + (100 * FlxG.bot_list.bot_pool[ctr].rank));
if (ctr < 3){
_local22.y = (playground.height - 128);
if (mode > 2){
_local23 = (pid.tipe + (100 * FlxG.bot_list.bot_pool[ctr].rank));
};
_bot = new bot(_local22.x, _local22.y, this, _local23, (ctr + 1));
_local7.color = 16729156;
} else {
_local22.y = 128;
if (mode > 2){
_local23 = _local6;
};
_bot = new bot(_local22.x, _local22.y, this, _local23, (ctr + 1));
_local7.color = 4474111;
};
while (FlxG.bot_list.bot_pool[_local8].available == false) {
_local8++;
};
_bot.botname = FlxG.bot_list.bot_pool[_local8].name;
if ((((mode > 2)) && ((ctr < 3)))){
_bot.botname = FlxG.bot_list.bot_pool[FlxG.team_member[ctr]].name;
};
if (mode <= 2){
_local7.color = 15794175;
};
if (training){
_bot.exists = false;
_local7.text = "";
_bot.score.text = "";
scoreUI.draw(_local7, 5, (90 + (ctr * 50)));
} else {
_local7.text = _bot.botname;
scoreUI.draw(_local7, 5, (90 + (ctr * 50)));
if (mode == 1){
_local7.text = "WINS: ";
scoreUI.draw(_local7, 5, (110 + (ctr * 50)));
} else {
_local7.text = "KILLS: ";
scoreUI.draw(_local7, 5, (110 + (ctr * 50)));
};
_bot.score.scrollFactor.x = (_bot.score.scrollFactor.y = 0);
_bot.score.text = "0";
_bot.score.x = 5;
_bot.score.y = (110 + (ctr * 50));
_bot.score.setFormat(null, 16, 15794175, "right");
};
add(_bot.score);
ctr++;
};
if (anti_alisaing == true){
ctr = 0;
while (ctr < 8) {
bot_array.members[ctr].antialiasing = true;
ctr++;
};
};
laser = new FlxSprite(0, 0, Imglaser);
laser.exists = false;
healwind.createSprites(ImgHeal, 20, 0);
healwind.gravity = 0;
healwind.setSize(64, 64);
healwind.setXSpeed();
healwind.setYSpeed();
healwind.setRotation(-200, 200);
add(healwind);
add(laser);
var _local10:int;
while (_local10 < 20) {
_local24 = new explotion(this);
explotion_array.add(add(_local24));
_local10++;
};
ctr = 0;
while (ctr < 100) {
_local25 = new smoke();
smoke_array.add(add(_local25));
_local26 = new bullet(this);
bullet_array.add(add(_local26));
ctr++;
};
target_sprite = new FlxSprite(0, 0, ImgTarget);
target_sprite.id = -999;
target_sprite.exists = false;
add(target_sprite);
lifebar = new FlxSprite((640 - 230), (480 - 70), ImgLifebar);
lifebar.scrollFactor.x = (lifebar.scrollFactor.y = 0);
lebar = new FlxSprite((410 + 27), (410 + 18), ImgLebar);
lebar.scrollFactor.x = (lebar.scrollFactor.y = 0);
powerbar = new FlxSprite((410 + 55), (410 + 7), ImgPbar);
powerbar.scrollFactor.x = (powerbar.scrollFactor.y = 0);
ammo = new FlxText((410 + 35), (410 + 40), 100, "999");
ammo.scrollFactor.x = (ammo.scrollFactor.y = 0);
ammo.setFormat(null, 20, 15794175, "center");
cash = new FlxText(100, 0, 500, (" CASH :" + money.toString()));
cash.scrollFactor.x = (cash.scrollFactor.y = 0);
cash.setFormat(null, 24, 15794175, "left");
add(lebar);
add(powerbar);
add(lifebar);
add(ammo);
var _local11:FlxSprite = new FlxSprite(80, 0, ImgCash);
_local11.scrollFactor.x = (_local11.scrollFactor.y = 0);
add(_local11);
add(cash);
add(pid.crosshair);
fx = new FlxSprite();
fx.createGraphic(160, 120, 4278190080, true, "screen");
fx.scale.x = (fx.scale.y = 4);
fx.blend = "screen";
fx.antialiasing = true;
FlxState.screen.scale.x = (FlxState.screen.scale.y = 0.25);
FlxG.music.stop();
FlxG.playMusic(Music);
scoreUI.scrollFactor.x = (scoreUI.scrollFactor.y = 0);
add(scoreUI);
_local7.text = (saves.read("my_name") as String);
pid.shot_hit = (saves.read("shothit") as int);
pid.shot_fired = (saves.read("shotfired") as int);
gt.beginGame(money, mode.toString(), _local7.text);
pid.botname = _local7.text;
if (mode > 2){
_local7.color = 16729156;
};
scoreUI.draw(_local7, 5, 40);
if (mode == 1){
_local7.text = "WINS: ";
scoreUI.draw(_local7, 5, 60);
} else {
_local7.text = "KILLS: ";
scoreUI.draw(_local7, 5, 60);
};
spectating = new FlxText(120, 400, 400, "SPECTATING\n Press mouse left button to cycle through bots");
spectating.setFormat(null, 26, 15794175, "center");
spectating.scrollFactor.x = (spectating.scrollFactor.y = 0);
add(spectating);
pid.score.x = 5;
pid.score.y = 60;
pid.score.setFormat(null, 16, 15794175, "right");
pid.score.scrollFactor.x = (pid.score.scrollFactor.y = 0);
add(pid.score);
chat = new chatter(this);
add(chat);
time = new FlxText(420, 0, 300);
time.setFormat(null, 26, 15794175, "left");
time.scrollFactor.x = (time.scrollFactor.y = 0);
time.exists = false;
if (mode == 2){
time.x = 525;
minutes = 1;
seconds = 60;
mili = 0;
time.exists = true;
_local27 = new FlxSprite((640 - 120), 0, ImgCash);
_local27.scrollFactor.x = (_local27.scrollFactor.y = 0);
_local27.scale.x = -1;
add(_local27);
};
if (mode > 2){
time.x = (640 - time.width);
time.text = "PLAYER'S TEAM : 0\nOPPONENT'S TEAM : 0";
time.exists = true;
time.alignment = "right";
};
if (training){
chat.addchat(1001, 0);
} else {
chat.addchat(1, 0);
};
pausescreen = new FlxSprite(240, 180);
pausescreen.createGraphic(160, 120);
paused = false;
pauseGroup = new FlxGroup();
pauseGroup.add(pausescreen);
pausescreen.scrollFactor.x = (pausescreen.scrollFactor.y = 0);
pausescreen.scale.x = (pausescreen.scale.y = 4);
pawsbg = new FlxSprite(170, 120);
pawsbg.loadGraphic(ImgMenuBG, false, false, 0, 0, true);
pawsbg.scale.x = (pawsbg.scale.y = 2);
hcursor = new FlxSprite();
hcursor.loadGraphic(Imgcursor);
hcursor.scale.x = 11;
vcursor = new FlxSprite();
vcursor.loadGraphic(Imgcursor);
vcursor.scale.x = 8;
vcursor.angle = 90;
var _local12:FlxText = new FlxText(50, 0, 300, "GAME PAUSED");
_local12.setFormat(null, 24, 15794175, "center");
pawsbg.draw((_local12 as FlxSprite), 0, 15);
_local12.setFormat(null, 16, 15794175, "left");
_local12.text = "Sound";
pawsbg.draw((_local12 as FlxSprite), 100, 51);
_local12.text = "AntiAlias";
pawsbg.draw((_local12 as FlxSprite), 100, 71);
_local12.text = "Bloom";
pawsbg.draw((_local12 as FlxSprite), 100, 91);
_local12.text = "Control";
pawsbg.draw((_local12 as FlxSprite), 100, 111);
var _local13:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local14:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local14.blend = "screen";
_local14.alpha = 0.75;
_local14.scale.x = 1.8;
_local14.scale.y = 1.1;
b1 = new FlxButton(0, 125, enter_1);
b1.loadGraphic(_local13, _local14);
var _local15:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local16:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local16.blend = "screen";
_local16.alpha = 0.75;
_local16.scale.x = 1.8;
_local16.scale.y = 1;
b2 = new FlxButton(0, (b1.y + 40), enter_2);
b2.loadGraphic(_local15, _local16);
var _local17:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local18:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local18.blend = "screen";
_local18.alpha = 0.75;
_local18.scale.x = 1.8;
_local18.scale.y = 1;
b3 = new FlxButton(0, (b1.y + 80), enter_3);
b3.loadGraphic(_local17, _local18);
var _local19:FlxSprite = new FlxSprite(0, 0, ImgUnselect);
var _local20:FlxSprite = new FlxSprite(0, 0, ImgSelect);
_local20.blend = "screen";
_local20.alpha = 0.75;
_local20.scale.x = 1.8;
_local20.scale.y = 1;
b7 = new FlxButton(0, (b1.y + 120), enter_7);
b7.loadGraphic(_local19, _local20);
b4 = new FlxButton(0, (b1.y + 201), enter_5);
b4.loadGraphic(new FlxSprite(0, 0, ImgB2M2), new FlxSprite(0, 0, ImgB2M));
b5 = new FlxButton(0, (b1.y + 200), enter_4);
b5.loadGraphic(new FlxSprite(0, 0, ImgB2B2), new FlxSprite(0, 0, ImgB2B));
b6 = new FlxButton(0, (b1.y + 200), enter_6);
b6.loadGraphic(new FlxSprite(0, 0, ImgQB2), new FlxSprite(0, 0, ImgQB));
b1.height = (b2.height = (b3.height = (b7.height = 40)));
b1.width = (b2.width = (b3.width = (b7.width = 400)));
_local14.offset.x = (_local16.offset.x = (_local18.offset.x = (_local20.offset.x = -100)));
b1.x = (320 - (b1.width / 2));
b2.x = (320 - (b2.width / 2));
b3.x = (320 - (b3.width / 2));
b4.x = (320 - (b4.width / 2));
b5.x = ((320 - (b4.width / 2)) + 97);
b6.x = ((320 - (b4.width / 2)) - 120);
b7.x = (320 - (b7.width / 2));
soundonoffsprite = new FlxSprite(330);
soundonoffsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
soundonoffsprite.blend = "screen";
soundonoffsprite.y = b1.y;
detailsprite = new FlxSprite(330);
detailsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
detailsprite.blend = "screen";
detailsprite.y = (b1.y + 40);
fxonoffsprite = new FlxSprite(330);
fxonoffsprite.loadGraphic(ImgOnoff, true, false, 80, 40);
fxonoffsprite.blend = "screen";
fxonoffsprite.y = (b1.y + 80);
fxonoffsprite.frame = 1;
control = new FlxText(330, (b1.y + 120), 300);
if (FlxG.global7 == 0){
control.text = "Mouse Only";
} else {
control.text = "Mouse + WSAD";
};
control.setFormat(null, 32, 15794175, "left");
control.blend = "screen";
control.alpha = 0.8;
pauseGroup.add(pawsbg);
pauseGroup.add(b1);
pauseGroup.add(b2);
pauseGroup.add(b3);
pauseGroup.add(b4);
pauseGroup.add(b5);
pauseGroup.add(b6);
pauseGroup.add(b7);
pauseGroup.add(fxonoffsprite);
pauseGroup.add(detailsprite);
pauseGroup.add(soundonoffsprite);
pauseGroup.add(control);
pauseGroup.add(hcursor);
pauseGroup.add(vcursor);
pawsbg.antialiasing = anti_alisaing;
if (anti_alisaing == true){
detailsprite.frame = 0;
} else {
detailsprite.frame = 1;
};
if (fx_toggle == true){
fxonoffsprite.frame = 0;
} else {
fxonoffsprite.frame = 1;
};
if (FlxG.mute == true){
soundonoffsprite.frame = 1;
} else {
soundonoffsprite.frame = 0;
};
resultGroup = new FlxGroup();
resultGroup.scrollFactor.x = (resultGroup.scrollFactor.y = 0);
resultBG = new FlxSprite(170, 120);
resultBG.loadGraphic(ImgMenuBG, false, false, 0, 0, true);
resultBG.scale.x = (resultBG.scale.y = 2);
resultGroup.add(resultBG, true);
resultGroup.exists = false;
win_text = new FlxText((320 - 150), 200, 300);
win_text.scrollFactor.x = (win_text.scrollFactor.y = 0);
win_text.setFormat(null, 48, 0xFFFFFF, "center");
add(resultGroup);
add(time);
add(win_text);
finish_counting = (start_counting = (battle_end = false));
if (mode == 1){
prize = 2000;
};
if (mode == 2){
prize = 1500;
};
if (mode == 3){
prize = 2500;
};
if (mode == 4){
prize = 3000;
};
if (training){
prize = 0;
};
FlxG.maxElapsed = (1 / 40);
}
private function respawn():void{
var _local1:int;
bullet_array.exists = true;
if (!battle_end){
_local1 = 0;
while (_local1 < 8) {
bot_array.members[_local1].respawn();
_local1++;
};
};
}
private function check_redart(_arg1:FlxObject, _arg2:FlxObject):void{
if ((((_arg1.id >= 4)) && ((redartifact.id < 0)))){
redartifact.id = (_arg1.id + 900);
};
}
private function check_bluecp(_arg1:FlxObject, _arg2:FlxObject):void{
var _bot = _arg1;
var _art = _arg2;
win_text.exists = true;
blueartifact.id = (redartifact.id = -990);
if (win >= 2){
show_result();
} else {
win_text.text = "PLAYER'S TEAM LOSE";
with ({}) {
with ({}) {
!ERROR!.f = function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
lose++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
redartifact.x = (blueartifact.x = (playground.width / 2));
redartifact.y = (playground.height - 0x0100);
blueartifact.id = (redartifact.id = -999);
blueartifact.y = 0x0100;
};
};
FlxG.fade.start(4278190080, 3, function ():void{
chat.addchat(1, 0);
FlxG.fade.stop();
lose++;
time.text = ((("PLAYER'S TEAM : " + win.toString()) + "\nOPPONENT'S TEAM : ") + lose.toString());
win_text.exists = false;
respawn();
redartifact.x = (blueartifact.x = (playground.width / 2));
redartifact.y = (playground.height - 0x0100);
blueartifact.id = (redartifact.id = -999);
blueartifact.y = 0x0100;
});
};
}
private function show_result():void{
var _local2:int;
if (!battle_end){
FlxG.fade.stop();
time.exists = true;
win_text.y = (resultBG.y - 50);
if (((((training) || ((winner == 0)))) || ((win >= 2)))){
win_text.text = "BATTLE RESULT : WIN";
} else {
win_text.text = "BATTLE RESULT : LOSE";
prize = 0;
};
time.x = 220;
time.y = (resultBG.y + 70);
time.alignment = "left";
};
time.text = ("KILLS\t\t: " + kills.toString());
time.text = (time.text + ("\nTOTAL KILL\t: " + totalkill.toString()));
time.text = (time.text + ("\nPRIZE\t\t: " + prize.toString()));
time.text = (time.text + (("\nCREDITS\t: " + money.toString()) + "\n"));
if (start_counting){
if (kills > 0){
totalkill++;
kills--;
};
if (prize > 0){
money++;
prize--;
};
if (FlxG.mouse.justReleased()){
money = (money + prize);
totalkill = (totalkill + kills);
prize = (kills = 0);
};
if ((((kills <= 0)) && ((prize <= 0)))){
start_counting = false;
finish_counting = true;
};
};
var _local1:int = (totalkill / 100);
if (_local1 > my_rank){
time.text = (time.text + "\nRANK UP!!");
_local2 = (saves.read("class") as int);
saves.write("class", (_local2 + 1));
};
if (((training) && ((pid.health == pid.maxhealth)))){
time.text = (time.text + "\nSPACE BUNNY UNLOCKED!!");
};
resultGroup.exists = true;
battle_end = true;
}
override public function postProcess():void{
var _local1:BlurFilter;
fctr++;
if (((fx_toggle) || ((spc_timer > 0)))){
_local1 = new BlurFilter(8, 8, 1);
fx.draw(FlxState.screen);
fx._framePixels.colorTransform(fx._framePixels.rect, new ColorTransform(2, 2, 2, 1, -180, -180, -180));
fx._framePixels.applyFilter(fx._framePixels, new Rectangle(0, 0, 160, 120), new Point(), _local1);
FlxState.screen.draw(fx, 240, 180);
};
}
override public function render():void{
if (paused){
return (pauseGroup.render());
};
super.render();
}
private function check_blueart(_arg1:FlxObject, _arg2:FlxObject):void{
if ((((_arg1.id < 4)) && ((blueartifact.id < 0)))){
blueartifact.id = (_arg1.id + 900);
};
}
}
}//package org.mecha
Section 179
//PlayState_ImgArtB (org.mecha.PlayState_ImgArtB)
package org.mecha {
import mx.core.*;
public class PlayState_ImgArtB extends BitmapAsset {
}
}//package org.mecha
Section 180
//PlayState_ImgArtR (org.mecha.PlayState_ImgArtR)
package org.mecha {
import mx.core.*;
public class PlayState_ImgArtR extends BitmapAsset {
}
}//package org.mecha
Section 181
//PlayState_ImgAttach (org.mecha.PlayState_ImgAttach)
package org.mecha {
import mx.core.*;
public class PlayState_ImgAttach extends BitmapAsset {
}
}//package org.mecha
Section 182
//PlayState_ImgB2B (org.mecha.PlayState_ImgB2B)
package org.mecha {
import mx.core.*;
public class PlayState_ImgB2B extends BitmapAsset {
}
}//package org.mecha
Section 183
//PlayState_ImgB2B2 (org.mecha.PlayState_ImgB2B2)
package org.mecha {
import mx.core.*;
public class PlayState_ImgB2B2 extends BitmapAsset {
}
}//package org.mecha
Section 184
//PlayState_ImgB2M (org.mecha.PlayState_ImgB2M)
package org.mecha {
import mx.core.*;
public class PlayState_ImgB2M extends BitmapAsset {
}
}//package org.mecha
Section 185
//PlayState_ImgB2M2 (org.mecha.PlayState_ImgB2M2)
package org.mecha {
import mx.core.*;
public class PlayState_ImgB2M2 extends BitmapAsset {
}
}//package org.mecha
Section 186
//PlayState_ImgBase (org.mecha.PlayState_ImgBase)
package org.mecha {
import mx.core.*;
public class PlayState_ImgBase extends BitmapAsset {
}
}//package org.mecha
Section 187
//PlayState_Imgbonus (org.mecha.PlayState_Imgbonus)
package org.mecha {
import mx.core.*;
public class PlayState_Imgbonus extends BitmapAsset {
}
}//package org.mecha
Section 188
//PlayState_ImgCArea (org.mecha.PlayState_ImgCArea)
package org.mecha {
import mx.core.*;
public class PlayState_ImgCArea extends BitmapAsset {
}
}//package org.mecha
Section 189
//PlayState_ImgCash (org.mecha.PlayState_ImgCash)
package org.mecha {
import mx.core.*;
public class PlayState_ImgCash extends BitmapAsset {
}
}//package org.mecha
Section 190
//PlayState_Imgcross (org.mecha.PlayState_Imgcross)
package org.mecha {
import mx.core.*;
public class PlayState_Imgcross extends BitmapAsset {
}
}//package org.mecha
Section 191
//PlayState_Imgcursor (org.mecha.PlayState_Imgcursor)
package org.mecha {
import mx.core.*;
public class PlayState_Imgcursor extends BitmapAsset {
}
}//package org.mecha
Section 192
//PlayState_ImgDisrupted (org.mecha.PlayState_ImgDisrupted)
package org.mecha {
import mx.core.*;
public class PlayState_ImgDisrupted extends BitmapAsset {
}
}//package org.mecha
Section 193
//PlayState_ImgExplode (org.mecha.PlayState_ImgExplode)
package org.mecha {
import mx.core.*;
public class PlayState_ImgExplode extends BitmapAsset {
}
}//package org.mecha
Section 194
//PlayState_Imgflare (org.mecha.PlayState_Imgflare)
package org.mecha {
import mx.core.*;
public class PlayState_Imgflare extends BitmapAsset {
}
}//package org.mecha
Section 195
//PlayState_ImgHeal (org.mecha.PlayState_ImgHeal)
package org.mecha {
import mx.core.*;
public class PlayState_ImgHeal extends BitmapAsset {
}
}//package org.mecha
Section 196
//PlayState_Imglaser (org.mecha.PlayState_Imglaser)
package org.mecha {
import mx.core.*;
public class PlayState_Imglaser extends BitmapAsset {
}
}//package org.mecha
Section 197
//PlayState_ImgLebar (org.mecha.PlayState_ImgLebar)
package org.mecha {
import mx.core.*;
public class PlayState_ImgLebar extends BitmapAsset {
}
}//package org.mecha
Section 198
//PlayState_ImgLifebar (org.mecha.PlayState_ImgLifebar)
package org.mecha {
import mx.core.*;
public class PlayState_ImgLifebar extends BitmapAsset {
}
}//package org.mecha
Section 199
//PlayState_ImgMenuBG (org.mecha.PlayState_ImgMenuBG)
package org.mecha {
import mx.core.*;
public class PlayState_ImgMenuBG extends BitmapAsset {
}
}//package org.mecha
Section 200
//PlayState_ImgNumbed (org.mecha.PlayState_ImgNumbed)
package org.mecha {
import mx.core.*;
public class PlayState_ImgNumbed extends BitmapAsset {
}
}//package org.mecha
Section 201
//PlayState_ImgOnoff (org.mecha.PlayState_ImgOnoff)
package org.mecha {
import mx.core.*;
public class PlayState_ImgOnoff extends BitmapAsset {
}
}//package org.mecha
Section 202
//PlayState_ImgPbar (org.mecha.PlayState_ImgPbar)
package org.mecha {
import mx.core.*;
public class PlayState_ImgPbar extends BitmapAsset {
}
}//package org.mecha
Section 203
//PlayState_ImgPlayer (org.mecha.PlayState_ImgPlayer)
package org.mecha {
import mx.core.*;
public class PlayState_ImgPlayer extends BitmapAsset {
}
}//package org.mecha
Section 204
//PlayState_ImgQB (org.mecha.PlayState_ImgQB)
package org.mecha {
import mx.core.*;
public class PlayState_ImgQB extends BitmapAsset {
}
}//package org.mecha
Section 205
//PlayState_ImgQB2 (org.mecha.PlayState_ImgQB2)
package org.mecha {
import mx.core.*;
public class PlayState_ImgQB2 extends BitmapAsset {
}
}//package org.mecha
Section 206
//PlayState_ImgQuit (org.mecha.PlayState_ImgQuit)
package org.mecha {
import mx.core.*;
public class PlayState_ImgQuit extends BitmapAsset {
}
}//package org.mecha
Section 207
//PlayState_Imgscoreui (org.mecha.PlayState_Imgscoreui)
package org.mecha {
import mx.core.*;
public class PlayState_Imgscoreui extends BitmapAsset {
}
}//package org.mecha
Section 208
//PlayState_ImgSelect (org.mecha.PlayState_ImgSelect)
package org.mecha {
import mx.core.*;
public class PlayState_ImgSelect extends BitmapAsset {
}
}//package org.mecha
Section 209
//PlayState_Imgswave (org.mecha.PlayState_Imgswave)
package org.mecha {
import mx.core.*;
public class PlayState_Imgswave extends BitmapAsset {
}
}//package org.mecha
Section 210
//PlayState_ImgTarget (org.mecha.PlayState_ImgTarget)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTarget extends BitmapAsset {
}
}//package org.mecha
Section 211
//PlayState_ImgTile (org.mecha.PlayState_ImgTile)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile extends BitmapAsset {
}
}//package org.mecha
Section 212
//PlayState_ImgTile1 (org.mecha.PlayState_ImgTile1)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile1 extends BitmapAsset {
}
}//package org.mecha
Section 213
//PlayState_ImgTile2 (org.mecha.PlayState_ImgTile2)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile2 extends BitmapAsset {
}
}//package org.mecha
Section 214
//PlayState_ImgTile3 (org.mecha.PlayState_ImgTile3)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile3 extends BitmapAsset {
}
}//package org.mecha
Section 215
//PlayState_ImgTile4 (org.mecha.PlayState_ImgTile4)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile4 extends BitmapAsset {
}
}//package org.mecha
Section 216
//PlayState_ImgTile5 (org.mecha.PlayState_ImgTile5)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile5 extends BitmapAsset {
}
}//package org.mecha
Section 217
//PlayState_ImgTile6 (org.mecha.PlayState_ImgTile6)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile6 extends BitmapAsset {
}
}//package org.mecha
Section 218
//PlayState_ImgTile7 (org.mecha.PlayState_ImgTile7)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile7 extends BitmapAsset {
}
}//package org.mecha
Section 219
//PlayState_ImgTile8 (org.mecha.PlayState_ImgTile8)
package org.mecha {
import mx.core.*;
public class PlayState_ImgTile8 extends BitmapAsset {
}
}//package org.mecha
Section 220
//PlayState_ImgUnselect (org.mecha.PlayState_ImgUnselect)
package org.mecha {
import mx.core.*;
public class PlayState_ImgUnselect extends BitmapAsset {
}
}//package org.mecha
Section 221
//PlayState_ImgWpn (org.mecha.PlayState_ImgWpn)
package org.mecha {
import mx.core.*;
public class PlayState_ImgWpn extends BitmapAsset {
}
}//package org.mecha
Section 222
//PlayState_Music (org.mecha.PlayState_Music)
package org.mecha {
import mx.core.*;
public class PlayState_Music extends SoundAsset {
}
}//package org.mecha
Section 223
//PlayState_Music2 (org.mecha.PlayState_Music2)
package org.mecha {
import mx.core.*;
public class PlayState_Music2 extends SoundAsset {
}
}//package org.mecha
Section 224
//PlayState_SingleMap1 (org.mecha.PlayState_SingleMap1)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap1 extends ByteArrayAsset {
}
}//package org.mecha
Section 225
//PlayState_SingleMap2 (org.mecha.PlayState_SingleMap2)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap2 extends ByteArrayAsset {
}
}//package org.mecha
Section 226
//PlayState_SingleMap3 (org.mecha.PlayState_SingleMap3)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap3 extends ByteArrayAsset {
}
}//package org.mecha
Section 227
//PlayState_SingleMap4 (org.mecha.PlayState_SingleMap4)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap4 extends ByteArrayAsset {
}
}//package org.mecha
Section 228
//PlayState_SingleMap5 (org.mecha.PlayState_SingleMap5)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap5 extends ByteArrayAsset {
}
}//package org.mecha
Section 229
//PlayState_SingleMap6 (org.mecha.PlayState_SingleMap6)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap6 extends ByteArrayAsset {
}
}//package org.mecha
Section 230
//PlayState_SingleMap7 (org.mecha.PlayState_SingleMap7)
package org.mecha {
import mx.core.*;
public class PlayState_SingleMap7 extends ByteArrayAsset {
}
}//package org.mecha
Section 231
//PlayState_sndcling (org.mecha.PlayState_sndcling)
package org.mecha {
import mx.core.*;
public class PlayState_sndcling extends SoundAsset {
}
}//package org.mecha
Section 232
//PlayState_SndGun (org.mecha.PlayState_SndGun)
package org.mecha {
import mx.core.*;
public class PlayState_SndGun extends SoundAsset {
}
}//package org.mecha
Section 233
//PlayState_SndMsg (org.mecha.PlayState_SndMsg)
package org.mecha {
import mx.core.*;
public class PlayState_SndMsg extends SoundAsset {
}
}//package org.mecha
Section 234
//PlayState_TrainMap (org.mecha.PlayState_TrainMap)
package org.mecha {
import mx.core.*;
public class PlayState_TrainMap extends ByteArrayAsset {
}
}//package org.mecha
Section 235
//PlayState_TxtMap0 (org.mecha.PlayState_TxtMap0)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap0 extends ByteArrayAsset {
}
}//package org.mecha
Section 236
//PlayState_TxtMap1 (org.mecha.PlayState_TxtMap1)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap1 extends ByteArrayAsset {
}
}//package org.mecha
Section 237
//PlayState_TxtMap2 (org.mecha.PlayState_TxtMap2)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap2 extends ByteArrayAsset {
}
}//package org.mecha
Section 238
//PlayState_TxtMap3 (org.mecha.PlayState_TxtMap3)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap3 extends ByteArrayAsset {
}
}//package org.mecha
Section 239
//PlayState_TxtMap4 (org.mecha.PlayState_TxtMap4)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap4 extends ByteArrayAsset {
}
}//package org.mecha
Section 240
//PlayState_TxtMap5 (org.mecha.PlayState_TxtMap5)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap5 extends ByteArrayAsset {
}
}//package org.mecha
Section 241
//PlayState_TxtMap6 (org.mecha.PlayState_TxtMap6)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap6 extends ByteArrayAsset {
}
}//package org.mecha
Section 242
//PlayState_TxtMap7 (org.mecha.PlayState_TxtMap7)
package org.mecha {
import mx.core.*;
public class PlayState_TxtMap7 extends ByteArrayAsset {
}
}//package org.mecha
Section 243
//ProfileState (org.mecha.ProfileState)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
import flash.filters.*;
public class ProfileState extends FlxState {
private var ImgMedal:Class;
private var medal1:FlxSprite;
private var Sndbeep2:Class;
private var medal3:FlxSprite;
private var medal4:FlxSprite;
private var medal5:FlxSprite;
private var ImgEnterName:Class;
private var medal2:FlxSprite;
private var my_class:String;
private var ImgBG:Class;
private var ImgLButtoff:Class;
private var update_once:Boolean;
private var current_level:int;
private var bot_faces:FlxGroup;
private var pageselect:int;// = 1
private var vcursor:FlxSprite;
private var ImgSlots:Class;
private var bg:FlxSprite;
private var ImgButtoff:Class;
private var Imgselect:Class;
private var fx_toggle:Boolean;
private var ImgMenuBG:Class;
private var tab3text:FlxText;
private var tipToday:String;
private var beginner:Boolean;// = false
private var SndMsg:Class;
private var tabs:FlxGroup;
private var page1:FlxGroup;
private var page2:FlxGroup;
private var page3:FlxGroup;
private var ImgGuideBoff:Class;
private var bot_added:int;// = 0
private var saves:FlxSave;
private var guidegirl:guide;
private var ImgLButton:Class;
private var ImgFace:Class;
private var ImgFaceFrame:Class;
private var Imgselect1:Class;
private var ImgButton:Class;
private var Imgcursor:Class;
private var hcursor:FlxSprite;
private var money:int;// = 0
private var battle_mode:int;// = -1
private var fx:FlxSprite;
private var bot_stat:FlxText;
private var my_rank:int;
private var menubg:FlxSprite;
private var ImgGuideBon:Class;
private var ImgTab:Class;
private var Sndbeep:Class;
public function ProfileState(){
SndMsg = ProfileState_SndMsg;
Imgcursor = ProfileState_Imgcursor;
ImgTab = ProfileState_ImgTab;
ImgMenuBG = ProfileState_ImgMenuBG;
ImgBG = ProfileState_ImgBG;
ImgEnterName = ProfileState_ImgEnterName;
ImgFace = ProfileState_ImgFace;
ImgFaceFrame = ProfileState_ImgFaceFrame;
Imgselect = ProfileState_Imgselect;
Imgselect1 = ProfileState_Imgselect1;
ImgButton = ProfileState_ImgButton;
ImgButtoff = ProfileState_ImgButtoff;
Sndbeep = ProfileState_Sndbeep;
Sndbeep2 = ProfileState_Sndbeep2;
ImgMedal = ProfileState_ImgMedal;
ImgSlots = ProfileState_ImgSlots;
ImgGuideBon = ProfileState_ImgGuideBon;
ImgGuideBoff = ProfileState_ImgGuideBoff;
ImgLButton = ProfileState_ImgLButton;
ImgLButtoff = ProfileState_ImgLButtoff;
saves = new FlxSave();
menubg = new FlxSprite(0, 0, ImgMenuBG);
tabs = new FlxGroup();
page1 = new FlxGroup();
page2 = new FlxGroup();
page3 = new FlxGroup();
super();
}
override public function create():void{
var _local9:FlxSprite;
var _local10:Number;
var _local11:int;
var _local12:int;
x = (y = (FlxG.scroll.x = (FlxG.scroll.y = 0)));
FlxG.mouse.show();
FlxG.mouse.cursor.createGraphic(1, 1, 0xFFFFFF);
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("kills");
saves.bind("killed");
saves.bind("shothit");
saves.bind("shotfired");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("battle_mode");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
fx_toggle = saves.read("fx");
money = (saves.read("money") as int);
fx = new FlxSprite();
fx.createGraphic(160, 120, 4278190335, true, "screen");
fx.scale.x = (fx.scale.y = 4);
fx.blend = "screen";
fx.antialiasing = true;
FlxState.screen.scale.x = (FlxState.screen.scale.y = 0.25);
add(menubg);
menubg.antialiasing = true;
hcursor = new FlxSprite();
hcursor.loadGraphic(Imgcursor);
hcursor.scale.x = 11;
vcursor = new FlxSprite();
vcursor.loadGraphic(Imgcursor);
vcursor.scale.x = 8;
vcursor.angle = 90;
var _local1:int;
while (_local1 < 3) {
_local9 = new FlxSprite();
_local9.loadGraphic(ImgTab, true, false, 150, 50);
_local9.addAnimation("on", [0]);
_local9.addAnimation("off", [1]);
_local9.id = _local1;
_local9.x = (_local1 * 150);
_local9.y = 0;
_local9.play("off");
tabs.add(add(_local9));
_local1++;
};
var _local2:FlxText = new FlxText(0, 10, 150, "MY PROFILE");
_local2.setFormat(null, 26, 8423560, "center");
tabs.add(add(_local2));
_local2 = new FlxText(150, 10, 150, "BATTLE MODE");
_local2.setFormat(null, 26, 8423560, "center");
tabs.add(add(_local2));
_local2 = new FlxText(300, 10, 150, "TEAM SELECT");
_local2.setFormat(null, 26, 8423560, "center");
tabs.add(add(_local2));
var _local3:FlxSprite = new FlxSprite(20, 70);
_local3.loadGraphic(ImgFace, true, false, 48, 64);
_local1 = (saves.read("my_picture") as int);
_local3.frame = _local1;
page1.add(add(_local3));
_local2 = new FlxText(100, 70, 100, "NAME : \nCLASS : \nKILLS : \nKILLED : \nHIT % : \nCREDITS : \nWINS :\nMEDALS:\n\n\n");
_local2.setFormat(null, 26, 15794175, "right");
page1.add(add(_local2));
if ((saves.read("shotfired") as int) != 0){
_local10 = ((saves.read("shothit") as int) / (saves.read("shotfired") as int));
} else {
_local10 = 0;
};
_local10 = (Math.round((_local10 * 100)) / 10);
var _local4:int = (saves.read("kills") as int);
my_rank = (_local4 / 100);
if (my_rank == 0){
my_class = "ROOKIE";
};
if (my_rank == 1){
my_class = "NOVICE";
};
if (my_rank == 2){
my_class = "VETERAN";
};
if (my_rank == 3){
my_class = "PRO";
};
if (my_rank == 4){
my_class = "EXPERT";
};
if (my_rank == 5){
my_class = "CHAMPION";
};
if (my_rank == 6){
my_class = "ELITE";
};
if (my_rank == 7){
my_class = "MASTER";
};
if (my_rank == 8){
my_class = "LEGEND";
};
if (my_rank == 9){
my_class = "DEMIGOD";
};
saves.write("class", my_rank);
FlxG.pl_name = (saves.read("my_name") as String);
_local2 = new FlxText(200, 70, 200, ((((((((((((FlxG.pl_name + "\n") + my_class) + "\n") + saves.read("kills").toString()) + "\n") + saves.read("killed").toString()) + "\n") + _local10.toString()) + "\n") + money.toString()) + "\n") + saves.read("wins").toString()));
_local2.setFormat(null, 26, 15794175, "left");
page1.add(add(_local2));
medal1 = new FlxSprite(210, 270).loadGraphic(ImgMedal, true, false, 60, 100);
medal1.frame = 0;
medal2 = new FlxSprite(270, 270).loadGraphic(ImgMedal, true, false, 60, 100);
medal2.frame = 1;
medal3 = new FlxSprite(330, 270).loadGraphic(ImgMedal, true, false, 60, 100);
medal3.frame = 2;
medal4 = new FlxSprite(390, 270).loadGraphic(ImgMedal, true, false, 60, 100);
medal4.frame = 3;
medal1.scale.x = (medal2.scale.x = (medal3.scale.x = (medal4.scale.x = 0.8)));
medal1.scale.y = (medal2.scale.y = (medal3.scale.y = (medal4.scale.y = 0.8)));
medal1.antialiasing = (medal2.antialiasing = (medal3.antialiasing = (medal4.antialiasing = true)));
var _local5:Boolean = saves.read("medal1");
page1.add(add(medal1));
medal1.exists = _local5;
_local5 = saves.read("medal2");
page1.add(add(medal2));
medal2.exists = _local5;
_local5 = saves.read("medal3");
page1.add(add(medal3));
medal3.exists = _local5;
_local5 = saves.read("medal4");
page1.add(add(medal4));
medal4.exists = _local5;
_local2 = new FlxText(20, 70, 150, "BATTLE MODE : \nROUNDS : \nTIME : \nPRIZE:");
_local2.setFormat(null, 26, 15794175, "right");
_local2.exists = false;
page2.add(add(_local2));
var _local6:FlxButton = new FlxButton(205, 70, select_mode);
_local6.loadGraphic(new FlxSprite().loadGraphic(Imgselect), new FlxSprite().loadGraphic(Imgselect1));
_local6.exists = false;
page2.add(add(_local6));
_local6 = new FlxButton(170, 70, select_mode2);
_local6.loadGraphic(new FlxSprite().loadGraphic(ImgLButtoff), new FlxSprite().loadGraphic(ImgLButton));
_local6.exists = false;
_local6._off.angle = 180;
_local6._on.angle = 180;
page2.add(add(_local6));
_local6 = new FlxButton(382, 70, select_mode);
_local6.loadGraphic(new FlxSprite().loadGraphic(ImgLButtoff), new FlxSprite().loadGraphic(ImgLButton));
_local6.exists = false;
page2.add(add(_local6));
_local6 = new FlxButton(205, 216, fade_out);
_local6.loadGraphic(new FlxSprite().loadGraphic(Imgselect), new FlxSprite().loadGraphic(Imgselect1));
_local6.exists = false;
page2.add(add(_local6));
_local2 = new FlxText(205, 70, 400, "TRAINING GROUND\n- \n-\n-\n\nENTER TRAINING");
_local2.setFormat(null, 26, 15794175, "left");
_local2.exists = false;
page2.add(add(_local2));
tab3text = new FlxText(10, 70, 580, (("CURRENT TEAM MEMBERS: CREDITS : " + money.toString()) + "\n Click on the picture to dismiss from the team\n\n\n\nSELECT TEAM MEMBER:\nClick on the picture to recruit"));
tab3text.setFormat(null, 26, 15794175, "left");
tab3text.exists = false;
page3.add(add(tab3text));
page3.add(add(new FlxSprite(30, 150, ImgSlots)));
page3.members[(page3.members.length - 1)].exists = false;
bot_faces = new FlxGroup();
var _local7:FlxSprite = new FlxSprite();
_local7.loadGraphic(ImgFace, true, false, 48, 64);
var _local8:Array = new Array(18);
_local1 = 0;
while (_local1 < 18) {
_local8[_local1] = _local1;
_local1++;
};
_local1 = 0;
while (_local1 < 18) {
_local11 = _local8[_local1];
_local12 = (Math.random() * 17);
_local8[_local1] = _local8[_local12];
_local8[_local12] = _local11;
_local1++;
};
_local1 = 0;
while (_local1 < FlxG.bot_list.bot_pool.length) {
FlxG.bot_list.bot_pool[_local1].rank = ((Math.floor((((Math.random() * _local1) / 8) + (_local1 / 8))) + my_rank) - 1);
if (FlxG.bot_list.bot_pool[_local1].rank < 0){
FlxG.bot_list.bot_pool[_local1].rank = 0;
};
_local7.frame = _local8[_local1];
FlxG.bot_list.bot_pool[_local1].face = new FlxSprite(((_local1 * 64) + 30), 300).createGraphic(48, 64);
if (_local1 >= (FlxG.bot_list.bot_pool.length / 2)){
FlxG.bot_list.bot_pool[_local1].face.x = (((_local1 - (FlxG.bot_list.bot_pool.length / 2)) * 64) + 30);
FlxG.bot_list.bot_pool[_local1].face.y = (FlxG.bot_list.bot_pool[_local1].face.y + 70);
};
FlxG.bot_list.bot_pool[_local1].face.exists = false;
FlxG.bot_list.bot_pool[_local1].face.draw(_local7);
FlxG.bot_list.bot_pool[_local1].face.id = _local1;
bot_faces.add(page3.add(add(FlxG.bot_list.bot_pool[_local1].face)));
_local1++;
};
bg = new FlxSprite(200, 100, ImgBG);
bg.exists = false;
bg.scale.x = 0;
page3.add(add(bg));
bot_stat = new FlxText(250, 120, 200, "NAME:\nRANK\nPRICE\n");
bot_stat.exists = false;
bot_stat.scale.x = 0;
bot_stat.setFormat(null, 26, 15794175, "left");
page3.add(add(bot_stat));
tabs.members[0].play("on");
tabs.members[3].color = 15794175;
guidegirl = new guide(this);
bot_added = 0;
FlxG.team_member = [-1, -1, -1];
add(hcursor);
add(vcursor);
current_level = (saves.read("current_level") as int);
if ((saves.read("shothit") as int) == 0){
guidegirl.show(-1);
beginner = true;
} else {
if (current_level > 0){
guidegirl.show(22);
} else {
guidegirl.show(2);
};
beginner = false;
};
if (current_level > 0){
battle_mode = (saves.read("battle_mode") as int);
if (battle_mode == 0){
page2.members[5].text = "LAST MAN STANDING\n3 \n-\n7500\n\n CONTINUE";
};
if (battle_mode == 1){
page2.members[5].text = "FRAG MASTER\n- \n2Minutes\n5000\n\n CONTINUE";
};
if (battle_mode == 2){
page2.members[5].text = "TEAM DEATH MATCH\n3 \n-\n10000\n\n CONTINUE";
};
if (battle_mode == 3){
page2.members[5].text = "ARTIFACT STEAL\n3 \n-\n15000\n\n CONTINUE";
};
tab_click(FlxG.mouse.cursor, tabs.members[1]);
update_once = true;
};
_local6 = null;
}
private function fade_out():void{
var _local1:Boolean;
var _local2:int;
while (_local2 < 3) {
if (FlxG.team_member[_local2] < 0){
_local1 = false;
};
_local2++;
};
if ((((_local1 == false)) && ((battle_mode >= 2)))){
FlxG.play(Sndbeep2);
guidegirl.show(1);
return;
};
FlxG.play(Sndbeep);
tabs.destroy();
page1.destroy();
page2.destroy();
page3.destroy();
if (battle_mode >= 0){
if (current_level >= 1){
saves.write("current_level", current_level);
} else {
saves.write("current_level", 0);
};
saves.write("battle_mode", battle_mode);
FlxG.state = new SelectState();
} else {
FlxG.state = new PlayState();
};
}
private function select_mode():void{
current_level = 0;
if ((((beginner == true)) && (false))){
FlxG.play(Sndbeep2);
guidegirl.show(12);
} else {
FlxG.play(Sndbeep);
battle_mode = (battle_mode + 2);
battle_mode = (battle_mode % 5);
battle_mode--;
if (battle_mode == -1){
page2.members[5].text = "TRAINING GROUND\n- \n-\n-\n\nENTER TRAINING";
guidegirl.show(7);
};
if (battle_mode == 0){
page2.members[5].text = "LAST MAN STANDING\n3 \n-\n7500\n\nENTER TOURNAMENT";
guidegirl.show(3);
};
if (battle_mode == 1){
page2.members[5].text = "FRAG MASTER\n- \n2Minutes\n5000\n\nENTER TOURNAMENT";
guidegirl.show(4);
};
if (battle_mode == 2){
page2.members[5].text = "TEAM DEATH MATCH\n3 \n-\n10000\n\nENTER TOURNAMENT";
guidegirl.show(5);
};
if (battle_mode == 3){
page2.members[5].text = "ARTIFACT STEAL\n3 \n-\n15000\n\nENTER TOURNAMENT";
guidegirl.show(6);
};
};
}
private function tab_click(_arg1:FlxObject, _arg2:FlxObject):void{
var _local4:Boolean;
FlxG.play(Sndbeep2);
var _local3:int;
while (_local3 < 3) {
tabs.members[_local3].play("off");
tabs.members[(_local3 + 3)].color = 8423560;
_local3++;
};
(_arg2 as FlxSprite).play("on");
tabs.members[(_arg2.id + 3)].color = 15794175;
if (_arg2.id == 0){
_local3 = 0;
while (_local3 < page1.members.length) {
page1.members[_local3].exists = true;
_local3++;
};
_local3 = 0;
while (_local3 < page2.members.length) {
page2.members[_local3].exists = false;
_local3++;
};
_local3 = 0;
while (_local3 < page3.members.length) {
page3.members[_local3].exists = false;
_local3++;
};
_local4 = saves.read("medal1");
medal1.exists = _local4;
_local4 = saves.read("medal2");
medal2.exists = _local4;
_local4 = saves.read("medal3");
medal3.exists = _local4;
_local4 = saves.read("medal4");
medal4.exists = _local4;
};
if (_arg2.id == 1){
if (beginner == true){
guidegirl.show(8);
};
_local3 = 0;
while (_local3 < page1.members.length) {
page1.members[_local3].exists = false;
_local3++;
};
_local3 = 0;
while (_local3 < page2.members.length) {
page2.members[_local3].exists = true;
_local3++;
};
_local3 = 0;
while (_local3 < page3.members.length) {
page3.members[_local3].exists = false;
_local3++;
};
};
if (_arg2.id == 2){
if (beginner == true){
guidegirl.show(10);
};
_local3 = 0;
while (_local3 < page1.members.length) {
page1.members[_local3].exists = false;
_local3++;
};
_local3 = 0;
while (_local3 < page2.members.length) {
page2.members[_local3].exists = false;
_local3++;
};
_local3 = 0;
while (_local3 < page3.members.length) {
page3.members[_local3].exists = true;
_local3++;
};
};
}
override public function postProcess():void{
var _local1:BlurFilter = new BlurFilter(4, 4, 1);
fx.draw(FlxState.screen);
fx._framePixels.colorTransform(fx._framePixels.rect, new ColorTransform(2, 2, 2, 1, -200, -200, -200));
fx._framePixels.applyFilter(fx._framePixels, new Rectangle(0, 0, 160, 120), new Point(), _local1);
FlxState.screen.draw(fx, 240, 180);
}
private function on_face(_arg1:FlxObject, _arg2:FlxObject):void{
var _local5:String;
var _local7:int;
var _local8:int;
bg.scale.x = (bg.scale.x + (FlxG.elapsed * 10));
var _local3:int = _arg2.id;
var _local4:String = FlxG.bot_list.bot_pool[_local3].name;
var _local6:int;
if (FlxG.bot_list.bot_pool[_local3].rank == 0){
_local5 = "ROOKIE";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 1){
_local5 = "NOVICE";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 2){
_local5 = "VETERAN";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 3){
_local5 = "PRO";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 4){
_local5 = "EXPERT";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 5){
_local5 = "CHAMPION";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 6){
_local5 = "ELITE";
};
if (FlxG.bot_list.bot_pool[_local3].rank == 7){
_local5 = "MASTER";
};
if (FlxG.bot_list.bot_pool[_local3].rank >= 8){
_local5 = "LEGEND";
};
_local6 = (((FlxG.bot_list.bot_pool[_local3].rank - my_rank) * 500) + 500);
bot_stat.text = (((("NAME: " + FlxG.bot_list.bot_pool[_local3].name) + "\nRANK :") + _local5) + "\nPRICE :");
bot_stat.text = (bot_stat.text + _local6.toString());
if (FlxG.mouse.justPressed()){
if (Math.floor(_arg2.y) != 150){
if ((((bot_added < FlxG.team_member.length)) && ((money > _local6)))){
_local8 = 0;
while (_local8 < 3) {
if (FlxG.team_member[_local8] == -1){
_local7 = _local8;
break;
};
_local8++;
};
_arg2.maxVelocity.x = _arg2.x;
_arg2.maxVelocity.y = _arg2.y;
_arg2.x = ((_local7 * 64) + 30);
_arg2.y = 150;
FlxG.team_member[_local7] = _local3;
FlxG.bot_list.bot_pool[_local3].available = false;
bot_added++;
money = (money - _local6);
tab3text.text = (("CURRENT TEAM MEMBERS: CREDITS : " + money.toString()) + "\n Click on the picture to dismiss from the team\n\n\n\nSELECT TEAM MEMBER:\nClick on the picture to recruit");
saves.write("money", money);
};
} else {
if (bot_added > 0){
_local8 = 0;
while (_local8 < 3) {
if (FlxG.team_member[_local8] == _local3){
_local7 = _local8;
break;
};
_local8++;
};
bot_added--;
_arg2.y = _arg2.maxVelocity.y;
_arg2.x = _arg2.maxVelocity.x;
FlxG.bot_list.bot_pool[_local3].available = true;
FlxG.team_member[_local7] = -1;
money = (money + _local6);
saves.write("money", money);
tab3text.text = (("CURRENT TEAM MEMBERS: CREDITS : " + money.toString()) + "\n Click on the picture to dismiss from the team\n\n\n\nSELECT TEAM MEMBER:\nClick on the picture to recruit");
};
};
};
}
override public function update():void{
var _local1:Boolean;
if (((!(update_once)) && ((page1.exists == true)))){
_local1 = saves.read("medal1");
medal1.exists = _local1;
_local1 = saves.read("medal2");
medal2.exists = _local1;
_local1 = saves.read("medal3");
medal3.exists = _local1;
_local1 = saves.read("medal4");
medal4.exists = _local1;
update_once = true;
};
x = (y = (FlxG.scroll.x = (FlxG.scroll.y = 0)));
hcursor.x = 300;
hcursor.y = FlxG.mouse.y;
vcursor.y = 220;
vcursor.x = (FlxG.mouse.x - 32);
bg.scale.x = (bg.scale.x - (FlxG.elapsed * 5));
FlxU.overlap(FlxG.mouse.cursor, bot_faces, on_face);
if (bg.scale.x > 0){
bot_stat.exists = true;
bg.exists = true;
if (bg.scale.x > 1){
bg.scale.x = 1;
};
} else {
bg.exists = false;
bot_stat.exists = false;
bg.scale.x = 0;
};
bot_stat.scale.x = bg.scale.x;
if (FlxG.mouse.justReleased()){
FlxU.overlap(FlxG.mouse.cursor, tabs, tab_click);
};
FlxG.global0 = battle_mode;
super.update();
}
private function select_mode2():void{
battle_mode = (battle_mode - 2);
if (battle_mode < -2){
battle_mode = 2;
};
select_mode();
}
}
}//package org.mecha
Section 244
//ProfileState_ImgBG (org.mecha.ProfileState_ImgBG)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgBG extends BitmapAsset {
}
}//package org.mecha
Section 245
//ProfileState_ImgButtoff (org.mecha.ProfileState_ImgButtoff)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgButtoff extends BitmapAsset {
}
}//package org.mecha
Section 246
//ProfileState_ImgButton (org.mecha.ProfileState_ImgButton)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgButton extends BitmapAsset {
}
}//package org.mecha
Section 247
//ProfileState_Imgcursor (org.mecha.ProfileState_Imgcursor)
package org.mecha {
import mx.core.*;
public class ProfileState_Imgcursor extends BitmapAsset {
}
}//package org.mecha
Section 248
//ProfileState_ImgEnterName (org.mecha.ProfileState_ImgEnterName)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgEnterName extends BitmapAsset {
}
}//package org.mecha
Section 249
//ProfileState_ImgFace (org.mecha.ProfileState_ImgFace)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgFace extends BitmapAsset {
}
}//package org.mecha
Section 250
//ProfileState_ImgFaceFrame (org.mecha.ProfileState_ImgFaceFrame)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgFaceFrame extends BitmapAsset {
}
}//package org.mecha
Section 251
//ProfileState_ImgGuideBoff (org.mecha.ProfileState_ImgGuideBoff)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgGuideBoff extends BitmapAsset {
}
}//package org.mecha
Section 252
//ProfileState_ImgGuideBon (org.mecha.ProfileState_ImgGuideBon)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgGuideBon extends BitmapAsset {
}
}//package org.mecha
Section 253
//ProfileState_ImgLButtoff (org.mecha.ProfileState_ImgLButtoff)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgLButtoff extends BitmapAsset {
}
}//package org.mecha
Section 254
//ProfileState_ImgLButton (org.mecha.ProfileState_ImgLButton)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgLButton extends BitmapAsset {
}
}//package org.mecha
Section 255
//ProfileState_ImgMedal (org.mecha.ProfileState_ImgMedal)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgMedal extends BitmapAsset {
}
}//package org.mecha
Section 256
//ProfileState_ImgMenuBG (org.mecha.ProfileState_ImgMenuBG)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgMenuBG extends BitmapAsset {
}
}//package org.mecha
Section 257
//ProfileState_Imgselect (org.mecha.ProfileState_Imgselect)
package org.mecha {
import mx.core.*;
public class ProfileState_Imgselect extends BitmapAsset {
}
}//package org.mecha
Section 258
//ProfileState_Imgselect1 (org.mecha.ProfileState_Imgselect1)
package org.mecha {
import mx.core.*;
public class ProfileState_Imgselect1 extends BitmapAsset {
}
}//package org.mecha
Section 259
//ProfileState_ImgSlots (org.mecha.ProfileState_ImgSlots)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgSlots extends BitmapAsset {
}
}//package org.mecha
Section 260
//ProfileState_ImgTab (org.mecha.ProfileState_ImgTab)
package org.mecha {
import mx.core.*;
public class ProfileState_ImgTab extends BitmapAsset {
}
}//package org.mecha
Section 261
//ProfileState_Sndbeep (org.mecha.ProfileState_Sndbeep)
package org.mecha {
import mx.core.*;
public class ProfileState_Sndbeep extends SoundAsset {
}
}//package org.mecha
Section 262
//ProfileState_Sndbeep2 (org.mecha.ProfileState_Sndbeep2)
package org.mecha {
import mx.core.*;
public class ProfileState_Sndbeep2 extends SoundAsset {
}
}//package org.mecha
Section 263
//ProfileState_SndMsg (org.mecha.ProfileState_SndMsg)
package org.mecha {
import mx.core.*;
public class ProfileState_SndMsg extends SoundAsset {
}
}//package org.mecha
Section 264
//SelectState (org.mecha.SelectState)
package org.mecha {
import flash.geom.*;
import org.flixel.*;
import flash.filters.*;
public class SelectState extends FlxState {
private var midlearm:FlxSprite;
private var ImgWpn:Class;
private var bot_selected:int;// = 0
private var Sndmachine2:Class;
private var sndctr2:Number;// = 0
private var Sndbeep2:Class;
private var weapon:FlxSprite;
private var sndctr:Number;// = 0
private var ImgPanel:Class;
private var selecttext:FlxText;
private var Sndsss:Class;
private var ImgBG:Class;
private var cash:FlxText;
private var Imgweaponselect:Class;
private var weapon_anm:FlxSprite;
private var touch:Boolean;// = false
private var Imgbotselect:Class;
private var hatch:Number;// = 0
private var dlength:Number;// = 100
private var command:int;// = 3
private var Imgbacklight:Class;
private var vcursor:FlxSprite;
private var lhatch:FlxSprite;
private var ammoprice:int;
private var fx_toggle:Boolean;
private var loadselect:FlxSprite;
private var selectscreen:FlxSprite;
private var r2l:Boolean;// = false
private var upperarm:FlxSprite;
private var Imghatch:Class;
private var Imgclaw:Class;
private var ImgCash:Class;
private var done:FlxSprite;
private var Imgselectscreen:Class;
private var bots:FlxSprite;
private var backlight:FlxSprite;
private var Imgfan:Class;
private var saves:FlxSave;
private var Imgselectarmlow:Class;
private var Imgselectarm:Class;
private var guidegirl:guide;
private var ammoload:int;
private var Imgcursor:Class;
private var lowerarm:FlxSprite;
private var hcursor:FlxSprite;
private var weapon_arm:FlxSprite;
private var ImgDone:Class;
private var ammoweight:int;
private var hclaw:FlxSprite;
private var money:int;
private var bot_open:int;
private var fx:FlxSprite;
private var vclaw:FlxSprite;
private var weapon_cursor:FlxSprite;
private var Sndmachine:Class;
private var bot_array:FlxGroup;
private var menuBG:FlxSprite;
private var MTOW:int;
private var ImgWpnArm:Class;
private var uhatch:FlxSprite;
private var loadpanel:FlxSprite;
private var dangle:Number;// = 0
private var Sndbeep:Class;
private var Imgselectarmup:Class;
private var Imgcover:Class;
public function SelectState(){
Imgselectscreen = SelectState_Imgselectscreen;
Imgcursor = SelectState_Imgcursor;
Imgclaw = SelectState_Imgclaw;
Imghatch = SelectState_Imghatch;
Imgselectarmlow = SelectState_Imgselectarmlow;
Imgselectarm = SelectState_Imgselectarm;
Imgweaponselect = SelectState_Imgweaponselect;
Imgselectarmup = SelectState_Imgselectarmup;
Imgbotselect = SelectState_Imgbotselect;
Imgcover = SelectState_Imgcover;
Imgfan = SelectState_Imgfan;
Sndmachine = SelectState_Sndmachine;
Sndmachine2 = SelectState_Sndmachine2;
Sndsss = SelectState_Sndsss;
ImgWpnArm = SelectState_ImgWpnArm;
ImgWpn = SelectState_ImgWpn;
Imgbacklight = SelectState_Imgbacklight;
ImgBG = SelectState_ImgBG;
Sndbeep = SelectState_Sndbeep;
Sndbeep2 = SelectState_Sndbeep2;
ImgPanel = SelectState_ImgPanel;
ImgCash = SelectState_ImgCash;
ImgDone = SelectState_ImgDone;
backlight = new FlxSprite(240, 0, Imgbacklight);
selectscreen = new FlxSprite(0, 0, Imgselectscreen);
hclaw = new FlxSprite(0, 0, Imgclaw);
vclaw = new FlxSprite(0, 0, Imgclaw);
uhatch = new FlxSprite((250 - 2), (200 - 8), Imghatch);
lhatch = new FlxSprite((250 - 2), (200 + 32), Imghatch);
lowerarm = new FlxSprite(400, 300, Imgselectarmlow);
midlearm = new FlxSprite(400, 300, Imgselectarm);
upperarm = new FlxSprite(400, 300, Imgselectarmup);
saves = new FlxSave();
bot_array = new FlxGroup();
menuBG = new FlxSprite(200, 160, ImgBG);
selecttext = new FlxText(0, 0, 240, "---");
super();
}
override public function update():void{
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:FlxObject;
backlight.y = (backlight.y + (FlxG.elapsed * 200));
if (backlight.y > 480){
backlight.y = -180;
};
cash.text = ("CASH :" + money.toString());
hcursor.x = 300;
hcursor.y = FlxG.mouse.y;
vcursor.y = 220;
vcursor.x = (FlxG.mouse.x - 32);
var _local1:Number = FlxG.elapsed;
var _local2:Number = dlength;
var _local3:Number = upperarm.angle;
var _local4:Rectangle = new Rectangle(0, (FlxG.mouse.y % 150), 128, 50);
if (bot_selected == 0){
touch = false;
FlxU.overlap(FlxG.mouse.cursor, bot_array, bot_touch);
if (touch == true){
menuBG.scale.x = (menuBG.scale.x + (FlxG.elapsed * 5));
if (menuBG.scale.x > 1.5){
menuBG.scale.x = 1.5;
};
} else {
menuBG.scale.x = (menuBG.scale.x - (_local1 * 5));
if (menuBG.scale.x < 0){
menuBG.scale.x = 0;
};
};
selecttext.scale.x = (menuBG.scale.x / 1.5);
} else {
menuBG.scale.x = (menuBG.scale.x - (_local1 * 5));
selecttext.scale.x = (menuBG.scale.x / 1.5);
if (menuBG.scale.x < 0){
selecttext.exists = false;
menuBG.exists = false;
menuBG.scale.x = 0;
};
};
if (FlxG.mouse.justReleased()){
if ((((bot_selected == 0)) && ((dlength <= 100)))){
FlxU.overlap(FlxG.mouse.cursor, bot_array, bullet_hit);
};
};
var _local5:Point = new Point();
var _local6:FlxPoint = new FlxPoint();
if (command == 1){
_local6.x = (_local5.x = (bot_array.members[(bot_selected - 1)].x - upperarm.x));
_local6.y = (_local5.y = (-8 - upperarm.y));
dangle = (FlxU.getAngle((_local5.x + 8), (_local5.y - 32)) + 90);
if (FlxU.get_direction(upperarm.angle, dangle) > (_local1 * 50)){
upperarm.angle = (upperarm.angle - (_local1 * 50));
};
if (FlxU.get_direction(upperarm.angle, dangle) < (-(_local1) * 50)){
upperarm.angle = (upperarm.angle + (_local1 * 50));
};
if (Math.abs(FlxU.get_direction(dangle, upperarm.angle)) < (_local1 * 50)){
upperarm.angle = dangle;
if (dlength < _local5.length){
dlength = (dlength + (FlxG.elapsed * 125));
} else {
if (hclaw.scale.x > 0.6){
hclaw.scale.x = (hclaw.scale.x - _local1);
} else {
command = 2;
};
};
};
};
if (command == 2){
bot_array.members[(bot_selected - 1)].x = (hclaw.x + 18);
bot_array.members[(bot_selected - 1)].y = (hclaw.y - 18);
_local6.x = (_local5.x = (250 - upperarm.x));
_local6.y = (_local5.y = ((200 - upperarm.y) - 32));
dangle = (FlxU.getAngle((_local5.x + 8), (_local5.y - 32)) + 90);
if (dlength > _local5.length){
dlength = (dlength - (FlxG.elapsed * 125));
} else {
if (FlxU.get_direction(upperarm.angle, dangle) > (_local1 * 50)){
upperarm.angle = (upperarm.angle - (_local1 * 50));
};
if (FlxU.get_direction(upperarm.angle, dangle) < (-(_local1) * 50)){
upperarm.angle = (upperarm.angle + (_local1 * 50));
};
if (Math.abs(FlxU.get_direction(dangle, upperarm.angle)) < (_local1 * 50)){
upperarm.angle = dangle;
bot_array.members[(bot_selected - 1)].x = 250;
bot_array.members[(bot_selected - 1)].y = 200;
command = 3;
};
};
};
if (command == 3){
if (hclaw.scale.x < 1){
hclaw.scale.x = (hclaw.scale.x + _local1);
} else {
if (dlength > 100){
dlength = (dlength - (FlxG.elapsed * 250));
} else {
if (FlxU.get_direction(upperarm.angle, 90) > (_local1 * 50)){
upperarm.angle = (upperarm.angle - (_local1 * 50));
};
if (FlxU.get_direction(upperarm.angle, 90) < (-(_local1) * 50)){
upperarm.angle = (upperarm.angle + (_local1 * 50));
};
if (Math.abs(FlxU.get_direction(90, upperarm.angle)) < (_local1 * 50)){
upperarm.angle = 90;
if (bot_selected != 0){
guidegirl.show(32);
command = 4;
weapon_cursor.exists = true;
weapon.alpha = 1;
};
};
};
};
};
if (command == 15){
done.exists = true;
selecttext.setFormat(null, 28, 15794175, "left");
_local7 = ((((ammoweight * FlxG.global3) + (FlxG.global4 * 10)) * 100) / MTOW);
selecttext.text = (((((("SHIELD=" + FlxG.global4.toString()) + "\nAMMO =") + FlxG.global3.toString()) + "\nLOAD =") + _local7.toString()) + "%");
selecttext.x = (loadpanel.x + 10);
selecttext.y = (loadpanel.y + 10);
selecttext.scale.x = 1;
selecttext.width = (loadpanel.width - 10);
selecttext.scale.y = loadpanel.scale.y;
selecttext.exists = (loadpanel.exists = true);
if (loadpanel.scale.y < 1){
loadpanel.scale.y = (loadpanel.scale.y + (_local1 * 5));
} else {
loadpanel.scale.y = 1;
loadselect.exists = true;
if (((done.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)) && ((FlxG.button_disable == false)))){
done.play("on");
if (FlxG.mouse.justReleased()){
r2l = true;
saves.write("money", money);
};
} else {
done.play("off");
};
if (((loadpanel.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)) && ((FlxG.button_disable == false)))){
_local8 = (FlxG.mouse.y - loadpanel.y);
if (_local8 < 80){
if (_local8 > 40){
loadselect.y = (loadpanel.y + 45);
} else {
loadselect.y = (loadpanel.y + 15);
};
} else {
loadselect.exists = false;
};
if (((FlxG.mouse.justPressed()) && ((loadselect.exists == true)))){
if (loadselect.y == (loadpanel.y + 45)){
FlxG.play(Sndbeep);
_local9 = ((ammoweight * (FlxG.global3 + ammoload)) + (FlxG.global4 * 10));
if ((((money > ammoprice)) && ((_local9 < MTOW)))){
FlxG.global3 = (FlxG.global3 + ammoload);
money = (money - ammoprice);
};
};
if (loadselect.y == (loadpanel.y + 15)){
FlxG.play(Sndbeep);
_local9 = ((ammoweight * FlxG.global3) + ((FlxG.global4 + 50) * 10));
if ((((money > 100)) && ((_local9 < MTOW)))){
FlxG.global4 = (FlxG.global4 + 50);
money = (money - 100);
};
};
FlxG.log(_local9);
};
};
};
};
if (command == 5){
if (weapon_arm.x < 205){
sndctr = (sndctr - _local1);
if (sndctr < 0){
sndctr = 0.1;
FlxG.play(Sndmachine);
};
weapon_arm.x = (weapon_arm.x + (_local1 * 50));
if ((((FlxG.global2 == 1)) || ((FlxG.global2 == 3)))){
weapon_anm.x = (weapon_arm.x + 61);
} else {
weapon_anm.x = (weapon_arm.x + 70);
};
weapon_anm.y = weapon_arm.y;
} else {
command = 6;
sndctr = 1;
FlxG.play(Sndsss);
};
};
if (command == 6){
sndctr = (sndctr - _local1);
if (sndctr <= 0){
command = 7;
};
};
if (command == 7){
if (weapon_arm.x > 100){
sndctr = (sndctr - _local1);
if (sndctr < 0){
sndctr = 0.1;
FlxG.play(Sndmachine);
};
weapon_arm.x = (weapon_arm.x - (_local1 * 100));
} else {
weapon_arm.x = 100;
command = 15;
guidegirl.show(33);
};
};
vclaw.scale.x = hclaw.scale.x;
midlearm.angle = (lowerarm.angle = upperarm.angle);
_local6 = FlxU.rotatePoint(50, 0, -5, 0, (upperarm.angle - 90));
upperarm.x = (320 + _local6.x);
upperarm.y = (300 + _local6.y);
_local6 = FlxU.rotatePoint(((dlength * 0.5) + 25), 0, 0, 0, (midlearm.angle - 90));
midlearm.x = (320 + _local6.x);
midlearm.y = (300 + _local6.y);
_local6 = FlxU.rotatePoint((dlength * 0.96), 0, 0, 0, (upperarm.angle - 90));
lowerarm.x = (320 + _local6.x);
lowerarm.y = (300 + _local6.y);
_local6 = FlxU.rotatePoint(((dlength * 0.96) + 90), 0, 0, 0, (upperarm.angle - 90));
hclaw.x = (vclaw.x = (290 + _local6.x));
hclaw.y = (vclaw.y = (390 + _local6.y));
if (dlength != _local2){
sndctr = (sndctr - _local1);
if (sndctr < 0){
sndctr = 0.2;
FlxG.play(Sndmachine);
};
};
if (upperarm.angle != _local3){
sndctr2 = (sndctr2 - _local1);
if (sndctr2 < 0){
sndctr2 = 0.1;
FlxG.play(Sndmachine2);
};
};
if (r2l){
hatch = (hatch + (_local1 * 100));
if (hatch > 32){
FlxG.global1 = bot_selected;
hatch = 32;
bot_array.destroy();
FlxG.state = new PlayState();
};
} else {
hatch = (hatch - (_local1 * 50));
if (hatch < 0){
hatch = 0;
};
};
if (((((weapon.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)) && ((command < 5)))) && ((FlxG.button_disable == false)))){
if ((((FlxG.mouse.y > weapon.y)) && ((FlxG.mouse.y < (weapon.y + weapon.height))))){
_local10 = (FlxG.mouse.y / 25);
weapon_cursor.y = ((_local10 * 25) + 1);
};
if (command == 4){
menuBG.exists = (selecttext.exists = true);
menuBG.scale.x = (menuBG.scale.x + (_local1 * 10));
menuBG.scale.y = 1;
if (menuBG.scale.x > 1){
menuBG.scale.x = 1;
};
selecttext.scale.x = menuBG.scale.x;
selecttext.x = (menuBG.x + 50);
selecttext.y = (menuBG.y + 20);
_local11 = ((FlxG.mouse.y - weapon.y) / 25);
if (_local11 == -1){
selecttext.text = "";
};
if (_local11 == 0){
selecttext.text = "GATLING GUN\nType : Projectile\nROF : 250 RPM\n";
};
if (_local11 == 1){
selecttext.text = "DUAL LASER BEAM\nType : Energy\nROF : 50 RPM\n";
};
if (_local11 == 2){
selecttext.text = "BIG LASER GUN\nType : Energy\nROF : 25 RPM\n";
};
if (_local11 == 3){
selecttext.text = "MISSILE POD\nType : Projectile\nROF : 20 RPM\n";
};
if (_local11 == 4){
selecttext.text = "105mm CANNON\nType : Projectile\nROF : 75 RPM\n";
};
if (_local11 == 5){
selecttext.text = "255mm CANNON\nType : Projectile\nROF : 15 RPM\n";
};
if (_local11 == 6){
selecttext.text = "ION CANNON\nType : Energy\nROF : 150 RPM\n";
};
if (_local11 == 7){
selecttext.text = "DISRUPTOR\nType : Energy\nROF : 30 RPM\n";
};
_local12 = (saves.read("class") as int);
if (_local12 >= _local11){
selecttext.text = (selecttext.text + "STATUS : Ready \n");
} else {
selecttext.text = (selecttext.text + "STATUS : Locked \n ONLY FOR HIGHER RANK");
};
};
if ((((((command == 4)) && (FlxG.mouse.justPressed()))) && ((_local12 >= _local11)))){
command = 5;
_local13 = defaultGroup.members[(weapon_anm.hit_id + 4)];
defaultGroup.members[(weapon_anm.hit_id + 4)] = defaultGroup.members[(weapon_anm.hit_id + 3)];
defaultGroup.members[(weapon_anm.hit_id + 3)] = defaultGroup.members[(weapon_anm.hit_id + 2)];
defaultGroup.members[(weapon_anm.hit_id + 2)] = defaultGroup.members[(weapon_anm.hit_id + 1)];
defaultGroup.members[(weapon_anm.hit_id + 1)] = defaultGroup.members[weapon_anm.hit_id];
defaultGroup.members[weapon_anm.hit_id] = defaultGroup.members[bot_array.members[(bot_selected - 1)].hit_id];
defaultGroup.members[bot_array.members[(bot_selected - 1)].hit_id] = _local13;
FlxG.global2 = Math.floor(((FlxG.mouse.y - weapon.y) / 25));
weapon_anm.frame = FlxG.global2;
if (FlxG.global2 == 0){
FlxG.global3 = 100;
ammoload = 50;
ammoprice = 500;
ammoweight = 8;
} else {
if (FlxG.global2 == 1){
FlxG.global3 = 50;
ammoload = 20;
ammoprice = 125;
ammoweight = 20;
} else {
if (FlxG.global2 == 2){
FlxG.global3 = 10;
ammoload = 5;
ammoprice = 500;
ammoweight = 80;
} else {
if (FlxG.global2 == 3){
FlxG.global3 = 10;
ammoload = 5;
ammoprice = 2000;
ammoweight = 150;
} else {
if (FlxG.global2 == 4){
FlxG.global3 = 40;
ammoload = 20;
ammoprice = 1000;
ammoweight = 20;
} else {
if (FlxG.global2 == 5){
FlxG.global3 = 10;
ammoload = 5;
ammoprice = 1500;
ammoweight = 125;
} else {
if (FlxG.global2 == 6){
FlxG.global3 = 60;
ammoload = 30;
ammoprice = 500;
ammoweight = 20;
} else {
if (FlxG.global2 == 7){
FlxG.global3 = 30;
ammoload = 10;
ammoprice = 500;
ammoweight = 50;
};
};
};
};
};
};
};
};
};
};
uhatch.y = (192 - hatch);
lhatch.y = (232 + hatch);
if (FlxG.keys.M){
money = 50000;
};
super.update();
}
override public function postProcess():void{
var _local1:BlurFilter = new BlurFilter(8, 8, 1);
fx.draw(FlxState.screen);
fx._framePixels.colorTransform(fx._framePixels.rect, new ColorTransform(2, 2, 2, 1, -200, -200, -200));
fx._framePixels.applyFilter(fx._framePixels, new Rectangle(0, 0, 160, 120), new Point(), _local1);
FlxState.screen.draw(fx, 240, 180);
}
private function bot_touch(_arg1:FlxObject, _arg2:FlxObject):void{
if (touch == false){
selecttext.visible = true;
selecttext.x = (menuBG.x + 20);
selecttext.y = (menuBG.y - 20);
if (_arg2.id == 0){
MTOW = 5000;
selecttext.text = "VT-1/A1 \nHeavy Armored Hover Tank\n\nMTOW : 5000 KGs\nSPECIAL : MISSILE BARRAGE";
};
if (_arg2.id == 1){
MTOW = 3500;
selecttext.text = "A-11/i3 ANGEL EYE \nAerial Recon and Combat Unit\n\nMTOW : 3500 KGs\nSPECIAL : ANGEL WINGS";
};
if (_arg2.id == 2){
MTOW = 4000;
selecttext.text = "CYCLONE \nGyro Controlled Drone \n\nMTOW : 4000 KGs\nSPECIAL : GALE CUT";
};
if (_arg2.id == 3){
MTOW = 3800;
selecttext.text = "STING\n Organic Based Defensive Unit \n\nMTOW : 3800 KGs\nSPECIAL : STATIC WAVE";
};
if (_arg2.id == 4){
MTOW = 3200;
selecttext.text = "T-538/5u HAVOC\nSuper Agile Assault Aircraft\n\nMTOW : 3200 KGs\nSPECIAL : LASER BEAM";
};
if (_arg2.id == 5){
MTOW = 4250;
selecttext.text = "SHELLKNIGHT\nMulti Purpose Combat Support\n\nMTOW : 4250 KGs\nSPECIAL : PLASMA BURST";
};
if (_arg2.id == 6){
MTOW = 4000;
selecttext.text = "REAPER \nAlien Based Experimental Drone\nMTOW : 4000 KGs\nSPECIAL : DEATH SCYHTE";
};
if (_arg2.id == 7){
MTOW = 4000;
selecttext.text = "BUNNY \n-Unknown-\n\nMTOW : 4000 KGs\nSPECIAL : HEALING WIND";
};
if (_arg2.health == 1){
selecttext.text = (selecttext.text + "\nSTATUS : READY \n Press Mouse Button To Select");
};
if (_arg2.health == 0){
if (_arg2.id == 7){
selecttext.text = (selecttext.text + "\nNOT FOR SALE!!!");
} else {
selecttext.text = (selecttext.text + ("\nPRICE : " + _arg2.damage.toString()));
if (money >= _arg2.damage){
selecttext.text = (selecttext.text + "\nPress Mouse Button To Buy");
} else {
selecttext.text = (selecttext.text + "\nNot Enough Money");
};
};
};
};
touch = true;
}
private function bullet_hit(_arg1:FlxObject, _arg2:FlxObject):void{
var _local3:int;
var _local4:int;
if (_arg2.health == 1){
bot_selected = (_arg2.id + 1);
command = 1;
} else {
if (money >= _arg2.damage){
FlxG.play(Sndbeep);
_arg2.health = 1;
(_arg2 as FlxSprite).frame = _arg2.id;
money = (money - _arg2.damage);
saves.write("money", money);
_local3 = 0;
_local4 = 0;
while (_local4 < 7) {
_local3 = (_local3 + (bot_array.members[_local4].health * Math.pow(2, (_local4 + 1))));
_local4++;
};
saves.write("bot_open", _local3);
} else {
FlxG.play(Sndbeep2);
};
};
}
override public function create():void{
var _local1:FlxSprite;
var _local3:FlxSprite;
var _local4:int;
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("kills");
saves.bind("killed");
saves.bind("shothit");
saves.bind("shotfired");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("battle_mode");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
FlxG.global3 = (FlxG.global4 = 0);
bot_open = (saves.read("bot_open") as int);
money = (saves.read("money") as int);
FlxG.log(money);
fx_toggle = saves.read("fx");
backlight.scale.x = (backlight.scale.y = 4);
add(backlight);
add(selectscreen);
_local1 = new FlxSprite(171, 401, Imgfan);
_local1.angularVelocity = -300;
weapon = new FlxSprite(21, 200, Imgweaponselect);
weapon_cursor = new FlxSprite(21, 201).createGraphic(68, 24, 2155933951);
weapon.alpha = 0.2;
weapon_cursor.exists = false;
add(uhatch);
add(lhatch);
fx = new FlxSprite();
fx.createGraphic(160, 120, 4278190080, true, "screen");
fx.scale.x = (fx.scale.y = 4);
fx.blend = "screen";
fx.antialiasing = true;
FlxState.screen.scale.x = (FlxState.screen.scale.y = 0.25);
weapon_arm = new FlxSprite(100, 205, ImgWpnArm);
weapon_anm = new FlxSprite(100, 205);
weapon_anm.loadGraphic(ImgWpn, true, false, 32, 32);
weapon_anm.angle = 90;
weapon_anm.hit_id = defaultGroup.members.length;
add(weapon_anm);
add(weapon_arm);
add(_local1);
add(new FlxSprite(3, 149, Imgcover));
add(weapon_cursor);
add(weapon);
var _local2:int;
while (_local2 < 8) {
_local3 = new FlxSprite();
_local3.loadGraphic(Imgbotselect, true, false, 64, 64);
_local3.addAnimation(_local2.toString(), [_local2]);
_local3.id = _local2;
_local3.hit_id = defaultGroup.members.length;
_local4 = Math.pow(2, (_local2 + 1));
_local3.x = ((_local2 * 80) + 8);
_local3.y = 32;
_local3.play((_local2 % 8).toString());
if (((bot_open & _local4) / _local4) == 1){
_local3._framePixels.colorTransform(_local3._framePixels.rect, new ColorTransform(1, 1, 1));
_local3.health = 1;
} else {
_local3._framePixels.colorTransform(_local3._framePixels.rect, new ColorTransform(0, 0, 0));
_local3.health = 0;
};
if ((((FlxG.global0 >= 2)) && ((_local2 == 7)))){
_local3._framePixels.colorTransform(_local3._framePixels.rect, new ColorTransform(0, 0, 0));
_local3.health = 0;
};
bot_array.add(add(_local3));
if (_local2 == 0){
_local3.damage = 7500;
};
if (_local2 == 1){
_local3.damage = 4500;
};
if (_local2 == 2){
_local3.damage = 5800;
};
if (_local2 == 3){
_local3.damage = 6300;
};
if (_local2 == 4){
_local3.damage = 0x1900;
};
if (_local2 == 5){
_local3.damage = 8500;
};
if (_local2 == 6){
_local3.damage = 25000;
};
if (_local2 == 7){
_local3.damage = 999999;
};
_local2++;
};
FlxG.mouse.show();
vclaw.angle = 45;
hclaw.angle = -45;
upperarm.angle = 90;
add(hclaw);
add(vclaw);
add(lowerarm);
add(midlearm);
add(upperarm);
hcursor = new FlxSprite();
hcursor.loadGraphic(Imgcursor);
hcursor.scale.x = 11;
vcursor = new FlxSprite();
vcursor.loadGraphic(Imgcursor);
vcursor.scale.x = 8;
vcursor.angle = 90;
selecttext.setFormat(null, 24, 15794175, "left");
menuBG.scale.y = -1.5;
add(menuBG);
add(selecttext);
cash = new FlxText(0, 0, 500, (" CASH:" + money.toString()));
cash.scrollFactor.x = (cash.scrollFactor.y = 0);
cash.setFormat(null, 24, 15794175, "left");
loadpanel = new FlxSprite(444, 199, ImgPanel);
loadpanel.scale.y = 0;
loadpanel.alpha = 0.5;
loadpanel.exists = false;
add(loadpanel);
loadselect = new FlxSprite(444, 209);
loadselect.createGraphic(loadpanel.width, 30, 2290124936);
loadselect.exists = false;
loadpanel.blend = (loadselect.blend = "add");
done = new FlxSprite(525, 325);
done.loadGraphic(ImgDone, true, false, 63, 25);
done.addAnimation("off", [0]);
done.addAnimation("on", [1]);
done.exists = false;
add(done);
add(loadselect);
add(new FlxSprite(0, 0, ImgCash));
add(cash);
guidegirl = new guide(this);
add(hcursor);
add(vcursor);
FlxG.maxElapsed = (1 / 30);
guidegirl.show(30);
}
}
}//package org.mecha
Section 265
//SelectState_Imgbacklight (org.mecha.SelectState_Imgbacklight)
package org.mecha {
import mx.core.*;
public class SelectState_Imgbacklight extends BitmapAsset {
}
}//package org.mecha
Section 266
//SelectState_ImgBG (org.mecha.SelectState_ImgBG)
package org.mecha {
import mx.core.*;
public class SelectState_ImgBG extends BitmapAsset {
}
}//package org.mecha
Section 267
//SelectState_Imgbotselect (org.mecha.SelectState_Imgbotselect)
package org.mecha {
import mx.core.*;
public class SelectState_Imgbotselect extends BitmapAsset {
}
}//package org.mecha
Section 268
//SelectState_ImgCash (org.mecha.SelectState_ImgCash)
package org.mecha {
import mx.core.*;
public class SelectState_ImgCash extends BitmapAsset {
}
}//package org.mecha
Section 269
//SelectState_Imgclaw (org.mecha.SelectState_Imgclaw)
package org.mecha {
import mx.core.*;
public class SelectState_Imgclaw extends BitmapAsset {
}
}//package org.mecha
Section 270
//SelectState_Imgcover (org.mecha.SelectState_Imgcover)
package org.mecha {
import mx.core.*;
public class SelectState_Imgcover extends BitmapAsset {
}
}//package org.mecha
Section 271
//SelectState_Imgcursor (org.mecha.SelectState_Imgcursor)
package org.mecha {
import mx.core.*;
public class SelectState_Imgcursor extends BitmapAsset {
}
}//package org.mecha
Section 272
//SelectState_ImgDone (org.mecha.SelectState_ImgDone)
package org.mecha {
import mx.core.*;
public class SelectState_ImgDone extends BitmapAsset {
}
}//package org.mecha
Section 273
//SelectState_Imgfan (org.mecha.SelectState_Imgfan)
package org.mecha {
import mx.core.*;
public class SelectState_Imgfan extends BitmapAsset {
}
}//package org.mecha
Section 274
//SelectState_Imghatch (org.mecha.SelectState_Imghatch)
package org.mecha {
import mx.core.*;
public class SelectState_Imghatch extends BitmapAsset {
}
}//package org.mecha
Section 275
//SelectState_ImgPanel (org.mecha.SelectState_ImgPanel)
package org.mecha {
import mx.core.*;
public class SelectState_ImgPanel extends BitmapAsset {
}
}//package org.mecha
Section 276
//SelectState_Imgselectarm (org.mecha.SelectState_Imgselectarm)
package org.mecha {
import mx.core.*;
public class SelectState_Imgselectarm extends BitmapAsset {
}
}//package org.mecha
Section 277
//SelectState_Imgselectarmlow (org.mecha.SelectState_Imgselectarmlow)
package org.mecha {
import mx.core.*;
public class SelectState_Imgselectarmlow extends BitmapAsset {
}
}//package org.mecha
Section 278
//SelectState_Imgselectarmup (org.mecha.SelectState_Imgselectarmup)
package org.mecha {
import mx.core.*;
public class SelectState_Imgselectarmup extends BitmapAsset {
}
}//package org.mecha
Section 279
//SelectState_Imgselectscreen (org.mecha.SelectState_Imgselectscreen)
package org.mecha {
import mx.core.*;
public class SelectState_Imgselectscreen extends BitmapAsset {
}
}//package org.mecha
Section 280
//SelectState_Imgweaponselect (org.mecha.SelectState_Imgweaponselect)
package org.mecha {
import mx.core.*;
public class SelectState_Imgweaponselect extends BitmapAsset {
}
}//package org.mecha
Section 281
//SelectState_ImgWpn (org.mecha.SelectState_ImgWpn)
package org.mecha {
import mx.core.*;
public class SelectState_ImgWpn extends BitmapAsset {
}
}//package org.mecha
Section 282
//SelectState_ImgWpnArm (org.mecha.SelectState_ImgWpnArm)
package org.mecha {
import mx.core.*;
public class SelectState_ImgWpnArm extends BitmapAsset {
}
}//package org.mecha
Section 283
//SelectState_Sndbeep (org.mecha.SelectState_Sndbeep)
package org.mecha {
import mx.core.*;
public class SelectState_Sndbeep extends SoundAsset {
}
}//package org.mecha
Section 284
//SelectState_Sndbeep2 (org.mecha.SelectState_Sndbeep2)
package org.mecha {
import mx.core.*;
public class SelectState_Sndbeep2 extends SoundAsset {
}
}//package org.mecha
Section 285
//SelectState_Sndmachine (org.mecha.SelectState_Sndmachine)
package org.mecha {
import mx.core.*;
public class SelectState_Sndmachine extends SoundAsset {
}
}//package org.mecha
Section 286
//SelectState_Sndmachine2 (org.mecha.SelectState_Sndmachine2)
package org.mecha {
import mx.core.*;
public class SelectState_Sndmachine2 extends SoundAsset {
}
}//package org.mecha
Section 287
//SelectState_Sndsss (org.mecha.SelectState_Sndsss)
package org.mecha {
import mx.core.*;
public class SelectState_Sndsss extends SoundAsset {
}
}//package org.mecha
Section 288
//smoke (org.mecha.smoke)
package org.mecha {
import org.flixel.*;
public class smoke extends FlxSprite {
private var die:Number;
private var ctr:int;
private var ImgPlayer:Class;
public var tipe:int;
public var hit:Boolean;// = false
public function smoke(){
ImgPlayer = smoke_ImgPlayer;
super();
loadGraphic(ImgPlayer);
exists = false;
dead = true;
blend = "add";
}
override public function update():void{
alpha = (alpha - (FlxG.elapsed * die));
if (alpha <= 0){
kill();
};
super.update();
}
public function spawn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=2):void{
die = _arg5;
exists = true;
dead = false;
x = _arg1;
y = _arg2;
alpha = 1;
angle = _arg3;
scale.x = (0.11 * _arg4);
}
}
}//package org.mecha
Section 289
//smoke_ImgPlayer (org.mecha.smoke_ImgPlayer)
package org.mecha {
import mx.core.*;
public class smoke_ImgPlayer extends BitmapAsset {
}
}//package org.mecha
Section 290
//Winner (org.mecha.Winner)
package org.mecha {
import org.flixel.*;
public class Winner extends FlxSprite {
public var ImgBot:Class;
private var timer:Number;
private var _parent:WinnerState;
private var flip:int;// = -1
public var ImgAttach:Class;
private var mybotlattach:FlxSprite;
private var mybotrattach:FlxSprite;
public function Winner(_arg1:Number, _arg2:Number, _arg3:WinnerState){
var _local4:int;
ImgBot = Winner_ImgBot;
ImgAttach = Winner_ImgAttach;
super();
x = _arg1;
y = _arg2;
loadGraphic(ImgBot, true, false, 32, 32);
frame = (FlxG.global1 - 1);
mybotlattach = new FlxSprite(_arg1, _arg2);
mybotlattach.loadGraphic(ImgAttach, true, false, 32, 32);
mybotlattach.frame = (FlxG.global1 - 1);
mybotrattach = new FlxSprite(_arg1, _arg2);
mybotrattach.loadGraphic(ImgAttach, true, false, 32, 32);
mybotrattach.frame = (FlxG.global1 - 1);
_local4 = FlxG.global1;
antialiasing = (mybotlattach.antialiasing = (mybotrattach.antialiasing = true));
angle = (mybotlattach.angle = (mybotrattach.angle = 90));
mybotrattach.scrollFactor.x = (mybotrattach.scrollFactor.y = (mybotlattach.scrollFactor.x = (mybotlattach.scrollFactor.y = (scrollFactor.x = (scrollFactor.y = 0)))));
if (_local4 == 1){
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
_arg3.add(this);
scale.x = (scale.y = 1.5);
mybotlattach.scale.x = (mybotrattach.scale.x = 0.8);
mybotlattach.scale.y = (mybotrattach.scale.y = 0.8);
mybotlattach.x = (x - 16);
mybotrattach.x = (x + 16);
mybotlattach.y = (mybotrattach.y = (y + 32));
};
if (_local4 == 2){
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
_arg3.add(this);
mybotlattach.x = (x + 8);
mybotrattach.x = (x + 24);
mybotlattach.y = (mybotrattach.y = (y - 24));
mybotlattach.scale.y = -1;
mybotrattach.origin.x = 0;
mybotrattach.origin.y = mybotrattach.frameHeight;
mybotlattach.origin.x = 0;
mybotlattach.origin.y = mybotlattach.frameHeight;
};
if (_local4 == 3){
_arg3.add(mybotlattach);
_arg3.add(this);
mybotlattach.scale.x = (mybotlattach.scale.y = 1.5);
};
if (_local4 == 4){
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
_arg3.add(this);
};
if (_local4 == 5){
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
_arg3.add(this);
mybotlattach.x = (x + 10);
mybotrattach.x = (x + 22);
mybotlattach.y = (mybotrattach.y = (y - 20));
mybotlattach.scale.y = -1;
mybotrattach.origin.x = 0;
mybotrattach.origin.y = mybotrattach.frameHeight;
mybotlattach.origin.x = 0;
mybotlattach.origin.y = mybotlattach.frameHeight;
};
if (_local4 == 6){
_arg3.add(this);
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
mybotlattach.scale.y = -1;
mybotlattach.x = (x - 16);
mybotrattach.x = (x + 16);
mybotlattach.y = (mybotrattach.y = (y - 16));
};
if (_local4 == 7){
_arg3.add(this);
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
mybotlattach.x = (x - 16);
mybotrattach.x = (x - 16);
mybotlattach.y = (mybotrattach.y = (y + 48));
mybotlattach.scale.y = -1;
mybotrattach.origin.y = 0;
mybotrattach.origin.x = mybotrattach.frameHeight;
mybotlattach.origin.y = 0;
mybotlattach.origin.x = mybotlattach.frameHeight;
};
if (_local4 == 8){
_arg3.add(this);
_arg3.add(mybotlattach);
_arg3.add(mybotrattach);
mybotlattach.x = (x + 8);
mybotrattach.x = (x + 24);
mybotlattach.y = (mybotrattach.y = (y - 20));
mybotrattach.scale.y = -1;
mybotlattach.angle = 150;
mybotrattach.angle = 30;
mybotrattach.origin.x = 0;
mybotrattach.origin.y = mybotrattach.frameHeight;
mybotlattach.origin.x = 0;
mybotlattach.origin.y = mybotlattach.frameHeight;
};
_parent = _arg3;
}
override public function update():void{
timer = (timer + FlxG.elapsed);
if (FlxG.global1 == 1){
flip = (flip * -1);
mybotlattach.scale.y = ((flip * _parent.movespeed) / 200);
mybotrattach.scale.y = ((flip * _parent.movespeed) / 200);
};
if ((((FlxG.global1 == 2)) || ((FlxG.global1 == 5)))){
mybotlattach.angle = (90 - (_parent.movespeed / 10));
mybotrattach.angle = (90 + (_parent.movespeed / 10));
};
if (FlxG.global1 == 3){
mybotlattach.angle = (mybotlattach.angle + (FlxG.elapsed * (_parent.movespeed + 300)));
};
if (FlxG.global1 == 4){
mybotlattach.y = (y + 16);
mybotrattach.y = (y + 32);
};
super.update();
}
}
}//package org.mecha
Section 291
//Winner_ImgAttach (org.mecha.Winner_ImgAttach)
package org.mecha {
import mx.core.*;
public class Winner_ImgAttach extends BitmapAsset {
}
}//package org.mecha
Section 292
//Winner_ImgBot (org.mecha.Winner_ImgBot)
package org.mecha {
import mx.core.*;
public class Winner_ImgBot extends BitmapAsset {
}
}//package org.mecha
Section 293
//WinnerState (org.mecha.WinnerState)
package org.mecha {
import org.flixel.*;
public class WinnerState extends FlxState {
private var moneyText:FlxText;
private var prize:int;
private var ImgMedal:Class;
private var bot_list:FlxGroup;
private var saves:FlxSave;
private var mybot:FlxSprite;
public var movespeed:Number;// = 200
private var winText:FlxText;
private var ImgBG:Class;
public var playground:FlxTilemap;
private var mybotrattach:FlxSprite;
private var mybotlattach:FlxSprite;
private var money:int;
private var ImgWave:Class;
private var BG:FlxSprite;
private var firework:FlxEmitter;
private var SndSplode:Class;
private var Music2:Class;
private var firetimer:Number;
private var fx:FlxSprite;
private var smallText:FlxText;
private var TrainMap:Class;
private var startCount:Boolean;
private var swave:FlxSprite;
private var ImgTile:Class;
private var medal:FlxSprite;
private var ImgFire:Class;
public function WinnerState(){
ImgBG = WinnerState_ImgBG;
TrainMap = WinnerState_TrainMap;
ImgTile = WinnerState_ImgTile;
ImgFire = WinnerState_ImgFire;
ImgWave = WinnerState_ImgWave;
SndSplode = WinnerState_SndSplode;
ImgMedal = WinnerState_ImgMedal;
Music2 = WinnerState_Music2;
super();
}
private function fadeOut():void{
FlxG.play(Music2);
saves.write("money", money);
saves.write("current_level", 0);
var _local1:int = (saves.read("wins") as int);
var _temp1 = _local1;
_local1 = (_local1 + 1);
saves.write("wins", _temp1);
FlxG.state = new ProfileState();
if (FlxG.global0 == 0){
saves.write("medal1", true);
};
if (FlxG.global0 == 1){
saves.write("medal2", true);
};
if (FlxG.global0 == 2){
saves.write("medal3", true);
};
if (FlxG.global0 == 3){
saves.write("medal4", true);
};
if (((((((saves.read("medal4")) && (saves.read("medal3")))) && (saves.read("medal2")))) && (saves.read("medal1")))){
saves.write("medal5", true);
};
}
override public function update():void{
FlxG.scroll.y = (FlxG.scroll.y + (FlxG.elapsed * movespeed));
if (FlxG.scroll.y > -200){
if (movespeed > 0){
movespeed = (movespeed - (FlxG.elapsed * 150));
} else {
movespeed = 0;
BG.exists = true;
if (BG.scale.y < 2){
BG.scale.y = (BG.scale.y + (FlxG.elapsed * 10));
} else {
BG.scale.y = 2;
medal.exists = true;
medal.scale.x = (medal.scale.x + (FlxG.elapsed * 5));
if (medal.scale.x > 1){
medal.scale.x = 1;
if (FlxG.mouse.justReleased()){
startCount = true;
};
};
};
};
};
if (startCount){
moneyText.text = ((("PRIZE\t\t: " + prize.toString()) + "\nCREDITS\t: ") + money.toString());
if (prize <= 0){
if (FlxG.mouse.justPressed()){
FlxG.fade.start(4278190080, 2, fadeOut);
};
} else {
prize--;
money++;
if (FlxG.mouse.justPressed()){
money = (money + prize);
prize = 0;
};
};
};
moneyText.exists = (winText.exists = (smallText.exists = BG.exists));
moneyText.scale.y = (winText.scale.y = (smallText.scale.y = (BG.scale.y / 2)));
firetimer = (firetimer - (FlxG.elapsed * 2));
swave.alpha = (swave.alpha - (FlxG.elapsed * 4));
swave.scale.x = (swave.scale.y = ((1 - swave.alpha) * 2));
if (firetimer < 0){
FlxG.play(SndSplode);
firetimer = (1 + Math.random());
swave.alpha = 1;
swave.scale.x = (swave.scale.y = 0);
swave.x = (firework.x = (-(FlxG.scroll.x) + (Math.random() * 600)));
swave.y = (firework.y = (-(FlxG.scroll.y) + (Math.random() * 300)));
swave.x = (swave.x - 64);
swave.y = (swave.y - 64);
firework.start(true);
};
super.update();
}
override public function create():void{
var _local3:String;
saves = new FlxSave();
saves.bind("played");
saves.bind("detail");
saves.bind("fx");
saves.bind("my_name");
saves.bind("class");
saves.bind("my_picture");
saves.bind("bot_open");
saves.bind("money");
saves.bind("wins");
saves.bind("current_level");
saves.bind("medal1");
saves.bind("medal2");
saves.bind("medal3");
saves.bind("medal4");
saves.bind("medal5");
saves.bind("dummy");
money = (saves.read("money") as int);
playground = new FlxTilemap();
playground.auto = 1;
playground.startingIndex = 1;
playground.drawIndex = 0;
playground.collideIndex = 2;
add(playground);
var _local1:String = new TrainMap();
playground.loadMap(_local1, ImgTile);
BG = new FlxSprite(170, 120, ImgBG);
BG.scale.x = 2;
BG.scale.y = 0;
BG.scrollFactor.x = (BG.scrollFactor.y = 0);
BG.antialiasing = true;
bot_list = new FlxGroup();
bot_list.add(new Winner((320 - 16), 240, this));
if ((FlxG.global0 + 1) > 2){
bot_list.add(new Winner((260 - 16), 280, this));
bot_list.add(new Winner((380 - 16), 280, this));
bot_list.add(new Winner((320 - 16), 320, this));
};
firework = new FlxEmitter();
firework.createSprites(ImgFire, 50, 0);
firework.delay = 1;
firework.gravity = 0;
firework.setXSpeed(-400, 400);
firework.setYSpeed(-400, 400);
firework.particleDrag.x = (firework.particleDrag.y = 400);
var _local2:int;
while (_local2 < 50) {
firework.members[_local2].blend = "screen";
_local2++;
};
add(firework);
swave = new FlxSprite(0, 0, ImgWave);
winText = new FlxText(170, 70, BG.width, "CONGRATULATION");
winText.scrollFactor.x = (winText.scrollFactor.y = 0);
winText.setFormat(null, 50, 15794175, "center");
smallText = new FlxText(70, 150, (BG.width * 1.8), "");
smallText.scrollFactor.x = (smallText.scrollFactor.y = 0);
smallText.setFormat(null, 26, 15794175, "center");
moneyText = new FlxText(270, 300, 200, "");
moneyText.scrollFactor.x = (moneyText.scrollFactor.y = 0);
moneyText.setFormat(null, 26, 15794175, "left");
medal = new FlxSprite(170, 280).loadGraphic(ImgMedal, true, false, 60, 100);
medal.scrollFactor.x = (medal.scrollFactor.y = 0);
medal.antialiasing = true;
medal.scale.x = 0;
add(swave);
add(BG);
add(medal);
add(winText);
add(smallText);
add(moneyText);
medal.frame = FlxG.global0;
if (FlxG.global0 == 0){
_local3 = "LAST MAN STANDING";
prize = 7500;
} else {
if (FlxG.global0 == 1){
_local3 = "FRAG MASTER";
prize = 5000;
} else {
if (FlxG.global0 == 2){
_local3 = "TEAM DEATHMATCH";
prize = 10000;
} else {
if (FlxG.global0 == 3){
_local3 = "ARTIFACT STEAL";
prize = 15000;
};
};
};
};
smallText.text = (("YOU HAVE WON THE\n" + _local3) + "\nTOURNAMENT AND ACHIEVED A MEDAL");
moneyText.text = ((("PRIZE\t\t: " + prize.toString()) + "\nCREDITS\t: ") + money.toString());
FlxG.scroll.y = -((playground.height - 1500));
firetimer = 1;
startCount = false;
}
}
}//package org.mecha
Section 294
//WinnerState_ImgBG (org.mecha.WinnerState_ImgBG)
package org.mecha {
import mx.core.*;
public class WinnerState_ImgBG extends BitmapAsset {
}
}//package org.mecha
Section 295
//WinnerState_ImgFire (org.mecha.WinnerState_ImgFire)
package org.mecha {
import mx.core.*;
public class WinnerState_ImgFire extends BitmapAsset {
}
}//package org.mecha
Section 296
//WinnerState_ImgMedal (org.mecha.WinnerState_ImgMedal)
package org.mecha {
import mx.core.*;
public class WinnerState_ImgMedal extends BitmapAsset {
}
}//package org.mecha
Section 297
//WinnerState_ImgTile (org.mecha.WinnerState_ImgTile)
package org.mecha {
import mx.core.*;
public class WinnerState_ImgTile extends BitmapAsset {
}
}//package org.mecha
Section 298
//WinnerState_ImgWave (org.mecha.WinnerState_ImgWave)
package org.mecha {
import mx.core.*;
public class WinnerState_ImgWave extends BitmapAsset {
}
}//package org.mecha
Section 299
//WinnerState_Music2 (org.mecha.WinnerState_Music2)
package org.mecha {
import mx.core.*;
public class WinnerState_Music2 extends SoundAsset {
}
}//package org.mecha
Section 300
//WinnerState_SndSplode (org.mecha.WinnerState_SndSplode)
package org.mecha {
import mx.core.*;
public class WinnerState_SndSplode extends SoundAsset {
}
}//package org.mecha
Section 301
//WinnerState_TrainMap (org.mecha.WinnerState_TrainMap)
package org.mecha {
import mx.core.*;
public class WinnerState_TrainMap extends ByteArrayAsset {
}
}//package org.mecha
Section 302
//_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 303
//_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 304
//_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 305
//_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 306
//_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 307
//_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 308
//_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 309
//_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 310
//_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 311
//_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 312
//_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 313
//_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 314
//_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 315
//_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 316
//_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 317
//_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 318
//_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 319
//_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 320
//_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 321
//_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 322
//_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 323
//_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 324
//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 325
//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 326
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 327
//Mecha (Mecha)
package {
import org.flixel.*;
import org.mecha.*;
public class Mecha extends FlxGame {
public function Mecha():void{
super(640, 480, logo, 1);
}
}
}//package
Section 328
//Preloader (Preloader)
package {
import flash.display.*;
import org.flixel.*;
import flash.text.*;
public class Preloader extends FlxPreloader {
public function Preloader(){
className = "Mecha";
super();
}
override protected function update(_arg1:Number):void{
var _local2:int;
var _local3:int;
_text.text = "SYSTEM CHECK\n\n";
if (_arg1 > 0.1){
_text.appendText("Start Up Sequence Check");
_local2 = Math.round(((_arg1 - 0.1) * 100));
if (_arg1 < 0.2){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.2){
_text.appendText("..........OK\n\nMain Power System Check");
_local2 = Math.round(((_arg1 - 0.2) * 100));
if (_arg1 < 0.3){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.3){
_text.appendText("..........OK\n\nPilot Identification Check");
_local2 = Math.round(((_arg1 - 0.3) * 100));
if (_arg1 < 0.4){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.4){
_text.appendText("..........OK\n\nData Link Interface Check");
_local2 = Math.round(((_arg1 - 0.4) * 100));
if (_arg1 < 0.5){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.5){
_text.appendText("..........OK\n\nHull Integrity Check");
_local2 = Math.round(((_arg1 - 0.5) * 100));
if (_arg1 < 0.6){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.6){
_text.appendText("..........OK\n\nFlight Control System Check");
_local2 = Math.round(((_arg1 - 0.6) * 100));
if (_arg1 < 0.7){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.7){
_text.appendText("..........OK\n\nDeflector System Check");
_local2 = Math.round(((_arg1 - 0.7) * 100));
if (_arg1 < 0.8){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.8){
_text.appendText("..........OK\n\nTarget Acquisition System Check");
_local2 = Math.round(((_arg1 - 0.8) * 100));
if (_arg1 < 0.9){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
if (_arg1 > 0.9){
_text.appendText("..........OK\n\nCompleting Self Test");
_local2 = Math.round(((_arg1 - 0.9) * 100));
if (_arg1 < 1){
_local3 = 0;
while (_local3 < _local2) {
_text.appendText(".");
_local3++;
};
};
};
}
override protected function create():void{
_min = 0;
if (!FlxG.debug){
_min = (minDisplayTime * 1000);
};
_buffer = new Sprite();
addChild(_buffer);
_text = new TextField();
_text.defaultTextFormat = new TextFormat("system", 18, 589568);
_text.embedFonts = true;
_text.selectable = false;
_text.multiline = false;
_text.x = 20;
_text.y = 20;
_text.width = 640;
_text.height = 480;
_buffer.addChild(_text);
}
}
}//package